Author Topic: C# Aurora Changes Discussion  (Read 441743 times)

0 Members and 3 Guests are viewing this topic.

Offline ChildServices

  • Hegemon
  • Sub-Lieutenant
  • ******
  • Posts: 140
  • Thanked: 10 times
Re: C# Aurora Changes Discussion
« Reply #1005 on: September 02, 2017, 07:22:29 AM »
It would be easy enough for me to add a rule on that basis, although I think too many senior officers is not going to be a problem.
Might not be a problem in VB6, but it sounds like in C# we're gonna have far less retiring officers than usual.
Aurora4x Discord: https://discordapp.com/invite/Q5ryqdW

Cold as steel the darkness waits, its hour will come
A cry of fear from our children, worshipping the Sun
Mother Nature's black revenge, on those who waste her life
War babies in the Garden Of Eden, she'll turn our ashes to ice
 

Offline Garfunkel

  • Registered
  • Admiral of the Fleet
  • ***********
  • Posts: 2781
  • Thanked: 1048 times
Re: C# Aurora Changes Discussion
« Reply #1006 on: September 02, 2017, 12:12:46 PM »
Clearly, the only appropriate solution to the problem is to build an entire separate, exceedingly-detailed game to simulate ground combat, designed to interface with Aurora both for initial setup and for results translation.
...
I started that off as a joke, but it would be pretty awesome.
Pretty much would require this. Any more in-depth ground combat would require planetary maps to be generated and operational movement of troops, introduction of supporting arms, more detailed supply system for ground forces, aerospace and naval units, and the list goes on and on. It's an exponential list :D
 

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: C# Aurora Changes Discussion
« Reply #1007 on: September 02, 2017, 07:31:37 PM »
Pretty much would require this. Any more in-depth ground combat would require planetary maps to be generated and operational movement of troops, introduction of supporting arms, more detailed supply system for ground forces, aerospace and naval units, and the list goes on and on. It's an exponential list :D

Sounds great! I'll get right on that. Expect the first proof of concept prototype in 20 years or so.
 

Offline DIT_grue

  • Lieutenant
  • *******
  • D
  • Posts: 197
  • Thanked: 33 times
Re: C# Aurora Changes Discussion
« Reply #1008 on: September 03, 2017, 04:50:21 AM »
Quote from: Steve Walmsley
Construction Ship
Primary: 4
Secondary: Construction Time
Bonus: Production

Wouldn't this prioritise the oldest (slowest) ships, rather than the newest?


Quote from: Steve Walmsley
The percentage chance of failure in any construction phase is equal to Overcrowding Modifier * 100 * (Increment Length / Year Length). That translates to a 3.1% chance per construction phase with an Overcrowding Modifier of 1.5, an 8.6% chance at 2.5 and a 34.2% chance at 5.0.

It looks like you've calculated these percentages from the given figures as amount of overcrowding, not the Overcrowding Modifier (i.e. they've been squared when I don't think they should be). Also, isn't that last one 34.7%, not 34.2%?
 

Offline Steve Walmsley

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: C# Aurora Changes Discussion
« Reply #1009 on: September 03, 2017, 05:09:24 AM »
Wouldn't this prioritise the oldest (slowest) ships, rather than the newest?

It looks like you've calculated these percentages from the given figures as amount of overcrowding, not the Overcrowding Modifier (i.e. they've been squared when I don't think they should be). Also, isn't that last one 34.7%, not 34.2%?

Good spot on the construction ships. One of the benefits of posting the rules is getting this type of review. I'll change it to class cost, as the more modern construction ships are likely to be more expensive.

Also correct on the overcrowding modifiers. I've changed the text.

I still get 34.2% though. If Overcrowding is 5x, then modifier is 25x. I have ROI modifier of 0.01369863, assuming 432,000 seconds for the 5-day increment and 31,536,000 for year length. I am using 365 day calendar years, rather than 365.25 astronomical years, although I suppose I could use the latter as Aurora now handles leap years.
 
The following users thanked this post: swarm_sadist, DIT_grue

Offline swarm_sadist

  • Lt. Commander
  • ********
  • s
  • Posts: 263
  • Thanked: 21 times
Re: C# Aurora Changes Discussion
« Reply #1010 on: September 03, 2017, 04:02:35 PM »
I am using 365 day calendar years, rather than 365.25 astronomical years, although I suppose I could use the latter as Aurora now handles leap years.
W00T!!

This has been bugging me for a long time, for some odd reason.
 

Offline DIT_grue

  • Lieutenant
  • *******
  • D
  • Posts: 197
  • Thanked: 33 times
Re: C# Aurora Changes Discussion
« Reply #1011 on: September 04, 2017, 01:23:05 AM »
I still get 34.2% though. If Overcrowding is 5x, then modifier is 25x. I have ROI modifier of 0.01369863, assuming 432,000 seconds for the 5-day increment and 31,536,000 for year length. I am using 365 day calendar years, rather than 365.25 astronomical years, although I suppose I could use the latter as Aurora now handles leap years.

That explains it - I just used 12months*30days/month, which was stuck in my head from habitual calculation of such things in the VB6 version. Sorry for the false alarm!
 

Offline Detros

  • Commander
  • *********
  • Posts: 389
  • Thanked: 26 times
Re: C# Aurora Changes Discussion
« Reply #1012 on: September 04, 2017, 03:45:26 AM »
Good spot on the construction ships. One of the benefits of posting the rules is getting this type of review. I'll change it to class cost, as the more modern construction ships are likely to be more expensive.
Wouldn't ordering of those construction ships in the _ascending_ order of their needed-construction-time-per-gate be enough?
 

Offline Steve Walmsley

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: C# Aurora Changes Discussion
« Reply #1013 on: September 04, 2017, 12:22:13 PM »
Wouldn't ordering of those construction ships in the _ascending_ order of their needed-construction-time-per-gate be enough?

It would if I wrote a custom function just for construction ships. At the moment one function determines the assignment types for every class, based on its type, then the function below runs all the commander assignments at once. Quick example of how you can do so much more with C# in a few lines of code, especially using LINQ.

// list of all unassigned naval officers or those in junior officer positions
List<Commander> AvailableCommanders = Aurora.Commanders.Values.Where(x => x.CommanderType == AuroraCommanderType.Naval && x.CommanderRace == this && (x.CommandType == AuroraCommandType.None || x.CommandType == AuroraCommandType.ExecutiveOfficer || x.CommandType == AuroraCommandType.ChiefEngineer || x.CommandType == AuroraCommandType.TacticalOfficer || x.CommandType == AuroraCommandType.ScienceOfficer || x.CommandType == AuroraCommandType.CAG)).ToList();
if (AvailableCommanders.Count == 0) return;

// ships without a commander
List<Ship> AvailableShips = RacialShips.Where(x => x.ReturnCommander(AuroraCommandType.Ship) == null).OrderBy(x => x.Class.CommanderPriority).ThenBy(x => x.PrimaryAssignmentPriority).ThenByDescending(x => x.SecondaryAssignmentPriority).ToList();

                foreach (Ship s in AvailableShips)
                {
                    Commander c = AvailableCommanders.Where(x => x.BonusList.ContainsKey(s.PrimaryBonusType) && x.CommanderRank == s.Class.RankRequired).OrderByDescending(x => x.ReturnBonusValue(s.PrimaryBonusType)).FirstOrDefault();
                    if (c != null)
                    {
                        c.AssignCommanderToShip(s, AuroraCommandType.Ship);
                        AvailableCommanders.Remove(c);
                        if (AvailableCommanders.Count == 0) break;
                    }
                }
 

Offline Detros

  • Commander
  • *********
  • Posts: 389
  • Thanked: 26 times
Re: C# Aurora Changes Discussion
« Reply #1014 on: September 04, 2017, 02:15:47 PM »
It would if I wrote a custom function just for construction ships. At the moment one function determines the assignment types for every class, based on its type, then the function below runs all the commander assignments at once. Quick example of how you can do so much more with C# in a few lines of code, especially using LINQ.

CODE

OK then. I thought you may be able to supply the ordering direction via parameter. It seems vanilla LINQ doesn't offer such option but it should not be too hard to add it.

Alternatively you can actually store the inverted value for construction ships, construction-speed instead of time-needed, so the value raises for more advanced ships.
 

Offline Scandinavian

  • Lieutenant
  • *******
  • S
  • Posts: 158
  • Thanked: 55 times
Re: C# Aurora Changes Discussion
« Reply #1015 on: September 04, 2017, 03:05:04 PM »
Why not just make the secondary priority 1/([gate construction time] + 1)? Picking vessels in descending order of the inverse is equivalent to picking them in ascending order of the construction time (prioritizing more modern construction vessels).
 

Offline Steve Walmsley

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: C# Aurora Changes Discussion
« Reply #1016 on: September 04, 2017, 06:07:58 PM »
Why not just make the secondary priority 1/([gate construction time] + 1)? Picking vessels in descending order of the inverse is equivalent to picking them in ascending order of the construction time (prioritizing more modern construction vessels).

Yes, good idea. No additional field required in that case.
 

Offline chrislocke2000

  • Captain
  • **********
  • c
  • Posts: 544
  • Thanked: 39 times
Re: C# Aurora Changes Discussion
« Reply #1017 on: September 05, 2017, 04:36:43 AM »
With all the new commander positions I was wondering if it would be possible to add a functional n tat allows you to prioritise training at your academies so as to tilt the skill sets of new commanders. Ie you set an academy to a surveying course to increase output of commanders with the required skills in sureveying at expense of non survey skills. If you added a lag or a course duration for this it may give you a trade off between fewer commanders coming through but more of the ones you need.
 

Offline alex_brunius

  • Vice Admiral
  • **********
  • Posts: 1240
  • Thanked: 153 times
Re: C# Aurora Changes Discussion
« Reply #1018 on: September 05, 2017, 08:20:52 AM »
With all the new commander positions I was wondering if it would be possible to add a functional n tat allows you to prioritise training at your academies so as to tilt the skill sets of new commanders. Ie you set an academy to a surveying course to increase output of commanders with the required skills in sureveying at expense of non survey skills. If you added a lag or a course duration for this it may give you a trade off between fewer commanders coming through but more of the ones you need.

I was about to suggest something similar. Like a dropdown selection of focus for Academies which after X years make Y % more of one skill an Z % less of everything else. Or maybe you could put a Commander in charge of the Education and have their skill influence what comes out the other end.
 

Offline Steve Walmsley

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: C# Aurora Changes Discussion
« Reply #1019 on: September 05, 2017, 12:56:45 PM »
I was about to suggest something similar. Like a dropdown selection of focus for Academies which after X years make Y % more of one skill an Z % less of everything else. Or maybe you could put a Commander in charge of the Education and have their skill influence what comes out the other end.

In the past I have considered specialised military academies, but I think I prefer the idea of assigning a 'Commandant' and then giving his skills an extra chance of being added when creating new officers (and maybe more chance of his type of commander - scientists, naval officer, etc.). That way, you could build military academies on different planets that can specialise in different areas.
 
The following users thanked this post: chrislocke2000, El Pip, serger, Detros