Post reply

Warning - while you were reading 57 new replies have been posted. You may wish to review your post.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Subject:
Message icon:

shortcuts: hit alt+s to submit/post or alt+p to preview

Please read the rules before you post!


Topic Summary

Posted by: db48x
« on: Today at 12:32:37 PM »

Huh. It may be that C# works differently than I expected, but the docs don’t indicate that the OrderBy method modifies the underlying list.

It's not the OrderBy, it is the Except that precedes it.

The documentation for Except doesn’t say that it modifies the list either. It is my understanding that none of the Enumerable methods modify the underlying data.
Posted by: Steve Walmsley
« on: Today at 09:33:38 AM »

How can I calculate Aphelion and Perihelion from the values in FCT_SystemBody?

                    sb.Perihelion = sb.OrbitalDistance * (1 - sb.Eccentricity);
                    sb.Aphelion = sb.OrbitalDistance * (1 + sb.Eccentricity);
                    sb.SemiMinorAxis = sb.OrbitalDistance * Math.Sqrt(1 - (sb.Eccentricity * sb.Eccentricity));
Posted by: skoormit
« on: Today at 09:12:22 AM »

How can I calculate Aphelion and Perihelion from the values in FCT_SystemBody?
Posted by: Steve Walmsley
« on: Today at 09:04:59 AM »

Huh. It may be that C# works differently than I expected, but the docs don’t indicate that the OrderBy method modifies the underlying list.

It's not the OrderBy, it is the Except that precedes it.
Posted by: db48x
« on: Yesterday at 04:47:58 PM »

I think I copied the code after fixing it.

Ah, that explains it. Fair enough.

I need a temporary list because I don't want to modify the KnownSystems list.

Huh. It may be that C# works differently than I expected, but the docs don’t indicate that the OrderBy method modifies the underlying list.
Posted by: Droll
« on: Yesterday at 03:16:20 PM »

I think I copied the code after fixing it.

Code duplication detected, billions must die.  ;D
Posted by: Steve Walmsley
« on: Yesterday at 11:46:11 AM »

Yes, you are correct.

Here is the relevant code:
 
Code: [Select]

PossibleSystems = KnownSystems.Values.Except(CurrentSystems).OrderBy(x => Math.Pow(x.X - StartSystem.RealSystem.X, 2.0) + Math.Pow(x.Y - StartSystem.RealSystem.Y, 2.0) + Math.Pow(x.Z - StartSystem.RealSystem.Z, 2.0)).ToList();


The + should be -, as you stated above. Its been like this since C# launched and you are the first person to figure it out :)

I think correcting it is better than leaving as is, as it will be easier to understand what is happening.

Am I missing something? That looks like the right distance formula to me, with minus signs in the correct place.

As an aside, are you sure that you need to call ToList() there? OrderBy returns an IOrderedEnumerable, which you can directly enumerate over with a foreach loop. Calling ToList() will allocate a new List and copy the (sorted) elements into it. Then after the loop the List will be thrown away. Seems like wasted effort, but I have only a passing acquaintance with C# and could be wrong.

I think I copied the code after fixing it.

I need a temporary list because I don't want to modify the KnownSystems list.
Posted by: skoormit
« on: Yesterday at 09:20:56 AM »

Is it the fleet commander's logistic used, or does each ship have its own schedule and speed based on the logistics of its captain?
I recall fleet members being un/loaded in series so every bonus for every ship helps. An unfortunate reality which sacrifices efficiency for reduced micromanagement. It would make me very happy to be proven wrong on this point so please do if able.

Get ready to be happy.
Ships in a fleet load in parallel, and the overall load/unload time of the fleet is just the maximum time of any single ship in the fleet.
Ship commanders only modify the time for their own ship.
Therefore, in a fleet where all the ships have the same unmodified load/unload time, the net time bonus will be based on the ship commander with the smallest logistics bonus (and other bonus sources, as usual).
Posted by: kyonkundenwa
« on: Yesterday at 01:41:31 AM »

Reading Steve's note, I'm not sure if this is a drawback or a bonus to have a small hydro extent? It seems to contribute to CC but so it's a problem?
Yes. The CC penalty is 2 at 0% at 0 at 20%.

Is it the fleet commander's logistic used, or does each ship have its own schedule and speed based on the logistics of its captain?
I recall fleet members being un/loaded in series so every bonus for every ship helps. An unfortunate reality which sacrifices efficiency for reduced micromanagement. It would make me very happy to be proven wrong on this point so please do if able.

What would an EXO on an orbital miner or jumpgate constructor do? It seems to do nothing so far for me, so perhaps I'm missing something!
Nothing as far as I know. With all surveyors being military vessels in C+ I don't think any of the extra control spaces will meaningfully contribute to commercial vessels. Perhaps commercial vessels that find themselves in combat situations such as [drop] troop transports could benefit from the training bonus of the Auxiliary Control or the engineering bonus of the Main Engineering but overall it doesn't seem worth it.
Posted by: vorpal+5
« on: Yesterday at 12:57:15 AM »

Does water do anything special for the planet, to have some?

Hydro extent (or lack thereof) contributes to colony cost if not above 20% and liquid: https://aurora2.pentarch.org/index.php?topic=8495.msg101987#msg101987

Above 75% hydro extent the population capacity of the body starts to suffer: https://aurora2.pentarch.org/index.php?topic=8495.msg100078#msg100078

Reading Steve's note, I'm not sure if this is a drawback or a bonus to have a small hydro extent? It seems to contribute to CC but so it's a problem?

Questions:
When you have a fleet with several commanders having a logistic bonus, how is it factored when unloading stuff? Is it the fleet commander's logistic used, or does each ship have its own schedule and speed based on the logistics of its captain? This means that for a fleet of many freighters, chances are you end up with a 0% bonus.

What would an EXO on an orbital miner or jumpgate constructor do? It seems to do nothing so far for me, so perhaps I'm missing something!
Posted by: pedter
« on: Yesterday at 12:41:10 AM »

I have two NPRs warring with each other; they may have originally shared a homeworld (or at least a home system) and are entirely on top of one another as a result. This in itself is not a problem, as the initial combat interrupts signified destruction of interrupt sources. However, as this has now been going on for months I've done some digging in the database to determine the source. I've tracked it down to one NPR sitting at a jump point flipping their sensors on and off every 15-30 minutes while the other NPR's homeworld detects those sensors with deep space tracking stations and generates interrupts. Combat has not occurred in more than a month according to FCT_GameLog; only hostile contact updates remain when cross-referenced with interrupt sources in DIM_EventType.

I have tried normal, none, and automatic detection settings with no change in interrupts and I do not have a jump path to the system for my military to "force" the NPR to stop toggling their sensors constantly like an idiot. Is there an easy way I'm missing to halt these interrupts without editing the database? If not, what would be the least invasive way to halt the interrupts?
Posted by: AlStar
« on: May 24, 2024, 03:20:38 PM »

Random question of the day. I've captured my first ever ship through boarding action. I now have the remnants of 8 different marine companies on board but no way to get them off the ship as there aren't any troop bays on the ship. How do I get my marines off so I can give them a victory march?

Welchbloke
When using a fleet that has open troop bays (ideally, the ships that started the boarding action), target the fleet that has the boarded troops on it. There'll be an order available to retrieve your boarders.
Posted by: welchbloke
« on: May 24, 2024, 02:43:26 PM »

Random question of the day. I've captured my first ever ship through boarding action. I now have the remnants of 8 different marine companies on board but no way to get them off the ship as there aren't any troop bays on the ship. How do I get my marines off so I can give them a victory march?

Welchbloke
Posted by: db48x
« on: May 24, 2024, 12:49:23 AM »

Yes, you are correct.

Here is the relevant code:
 
Code: [Select]

PossibleSystems = KnownSystems.Values.Except(CurrentSystems).OrderBy(x => Math.Pow(x.X - StartSystem.RealSystem.X, 2.0) + Math.Pow(x.Y - StartSystem.RealSystem.Y, 2.0) + Math.Pow(x.Z - StartSystem.RealSystem.Z, 2.0)).ToList();


The + should be -, as you stated above. Its been like this since C# launched and you are the first person to figure it out :)

I think correcting it is better than leaving as is, as it will be easier to understand what is happening.

Am I missing something? That looks like the right distance formula to me, with minus signs in the correct place.

As an aside, are you sure that you need to call ToList() there? OrderBy returns an IOrderedEnumerable, which you can directly enumerate over with a foreach loop. Calling ToList() will allocate a new List and copy the (sorted) elements into it. Then after the loop the List will be thrown away. Seems like wasted effort, but I have only a passing acquaintance with C# and could be wrong.
Posted by: pedter
« on: May 23, 2024, 11:36:19 PM »

Does water do anything special for the planet, to have some?

Hydro extent (or lack thereof) contributes to colony cost if not above 20% and liquid: https://aurora2.pentarch.org/index.php?topic=8495.msg101987#msg101987

Above 75% hydro extent the population capacity of the body starts to suffer: https://aurora2.pentarch.org/index.php?topic=8495.msg100078#msg100078