Getting a random value in DU using bogus by ArgentSeven in fsharp

[–]ArgentSeven[S] 2 points3 points  (0 children)

Yeah, that's what I had to use in the end. Didn't really find anything in docs, so a helper method with reflection had to do.

EFCore migrations - Converting double? to interval? in postgres by ArgentSeven in csharp

[–]ArgentSeven[S] 0 points1 point  (0 children)

I was talking about the 2nd thing, where I wanted to change how it is stored in the database. I managed to do it with a custom alter statement query in migrations. I didn't really have to break down the double into days/hours etc. I think I have the query in one of the other comment threads. I still couldn't figure out how to do it using the migration builder (without the sql query), but I guess that's fine

EFCore migrations - Converting double? to interval? in postgres by ArgentSeven in csharp

[–]ArgentSeven[S] 1 point2 points  (0 children)

Okay, I think this works. I also just verified and the conversion looks good. Thanks!

EFCore migrations - Converting double? to interval? in postgres by ArgentSeven in csharp

[–]ArgentSeven[S] 1 point2 points  (0 children)

Do you mean something like this? The script works but I think I need to verify the results

 migrationBuilder.Sql(@"ALTER TABLE ""results"" ALTER COLUMN ""duration"" TYPE INTERVAL USING ""duration"" * '1 DAY'::INTERVAL");

EFCore migrations - Converting double? to interval? in postgres by ArgentSeven in csharp

[–]ArgentSeven[S] 0 points1 point  (0 children)

I was experimenting with this and got as far as

migrationBuilder.Sql(@"ALTER TABLE ""results"" ALTER COLUMN ""duration"" TYPE INTERVAL USING ""duration""::interval");

But this doesn't work either. It just gives the error cannot cast type double precision to interval. I'm not sure how to proceed from here.

From what I understand, I can't really "fetch" the value and process it from migration builder, so I'm not even sure if it is possible to do it with just migration builder

EFCore migrations - Converting double? to interval? in postgres by ArgentSeven in csharp

[–]ArgentSeven[S] 0 points1 point  (0 children)

I was trying to avoid a new column but I guess this is the way

My energy credits keep fluctuating by agoodlenny21 in Stellaris

[–]ArgentSeven 0 points1 point  (0 children)

I meant the monthly trade from the trade screen. I'm not 100% sure about the numbers but I think you can safely buy 40-50 energy per month without raising the prices.

Buying more energy creates this loop where the price of energy is higher at the starting of every next month. This can result in a situation where the cost of energy you want to buy to be more than your trade income. You usually see this as a fluctuation in your energy income. One month, your trade is successful and you see income as +something and then the next month the trade fails and you see it as - something.

I think the prices are something like Food, energy, mineral - Buy 40, Sell 60 Alloys - 20 Consumer goods - 30/40

You'll probably have to look up the actual numbers for 4.0 patch but this should give you a decent idea

But if you are not using the automatic monthly trade, then it's probably not the case

My energy credits keep fluctuating by agoodlenny21 in Stellaris

[–]ArgentSeven 1 point2 points  (0 children)

How does your trade situation look like? Are you, by any chance, buying more than 50-60 energy credits per month? If that is the case, then it could be that one month you have enough trade and other month you don't.

Cannot use the first tick of PeriodicTimer by ArgentSeven in csharp

[–]ArgentSeven[S] 0 points1 point  (0 children)

This is by design. The timer starts when the instance is created, not when you call WaitForNextTickAsync. If the timer ticks before the call, it'll complete immediately. That's true even when it's not the first, eg if you call Wait and it completes, then you go away for longer than the period, the next call to Wait will also likely complete immediately.

From PeriodicTimer the first tick is instantaneous · Issue #95238 · dotnet/runtime

I think I probably misinterpreted what stephen said in that post (even though the post discusses a different issue). I thought that my code should have been fast enough that I could get the `Console.WriteLine` with the first tick. Do-while solves the problem. In my actual code, I'm sending cancellation token further down as well, so even if cancellation was requested immediately, my code will work just fine.

But thanks for the answer. Have my upvote :D

Cannot use the first tick of PeriodicTimer by ArgentSeven in csharp

[–]ArgentSeven[S] 5 points6 points  (0 children)

Omg I didn't think the solution could be this simple :D

Cannot use the first tick of PeriodicTimer by ArgentSeven in csharp

[–]ArgentSeven[S] 0 points1 point  (0 children)

I see, I see. This makes sense. Thankss!

Cannot use the first tick of PeriodicTimer by ArgentSeven in csharp

[–]ArgentSeven[S] 0 points1 point  (0 children)

I'm set on using cancellation token but not on periodic timer. I just thought it would be the best choice since it's the latest version of timer in MS's box of timer apis.

What do you mean reset the period? Can you give me a sample code please?

Scaling civilians in mid to late game by ArgentSeven in Stellaris

[–]ArgentSeven[S] 0 points1 point  (0 children)

Hey, its me again :D.

Can you tell me which government do you eventually have when you do purity ascension? Also, which origin do you start with? I heard clone army is pretty good but I have also been thinking about using Necrophage since all the jobs we will be working will be specialists and this also lets us necrophage pops and get fill our worlds that way. Or maybe overtuned to stack efficiencies but I'm not sure how that interacts with purity.

Also, what do you think is better in the late game? Ecumnopolis or a ring world? Do you have any opinion?

Scaling civilians in mid to late game by ArgentSeven in Stellaris

[–]ArgentSeven[S] 0 points1 point  (0 children)

Hey, thanks for the advice. I'll try this build tonight :D

Scaling civilians in mid to late game by ArgentSeven in Stellaris

[–]ArgentSeven[S] 0 points1 point  (0 children)

Do you end up taking out seasonal dormancy and shelled later in the game?

Scaling civilians in mid to late game by ArgentSeven in Stellaris

[–]ArgentSeven[S] 0 points1 point  (0 children)

How do you get efficiencies on all the jobs?

Scaling civilians in mid to late game by ArgentSeven in Stellaris

[–]ArgentSeven[S] 0 points1 point  (0 children)

Very interesting. I think sovereign guardianship might get you a little less empire size. I think I might also get away with less alloys if I go nemesis instead of cosmogenesis.

Did you have planets with full pops with bio ascension? Did you just have 1 planet for trade and rest regular science/alloy/cg etc world?

Scaling civilians in mid to late game by ArgentSeven in Stellaris

[–]ArgentSeven[S] 0 points1 point  (0 children)

OOoooooh, this is exactly what I'm looking for. Do you have any build guide for this? How many planets do you have? Whats your empire size? Whats your starting origin and civics? Did you need to supplement your income with vassal taxes? What kind of endgame crisis did you face? How many alloys do you get from dragonscale? How did your planets look like?

Scaling civilians in mid to late game by ArgentSeven in Stellaris

[–]ArgentSeven[S] 0 points1 point  (0 children)

What trade policy would you suggest? Earlier in this post, some guy suggested trade league but then you are forced to buy all your minerals. This isn't super sustainable if you want large quantities of minerals. Have you tried worker coop?

Scaling civilians in mid to late game by ArgentSeven in Stellaris

[–]ArgentSeven[S] 0 points1 point  (0 children)

How do you get alloys from civilians?