Logo Platform
logo amplifiers simplified

Mod Help

Reply
Copied to clipboard!
7 years ago
Oct 7, 2017, 8:07:37 PM

Hello Everyone,


I am new to the modding scene and just getting started with endless space 2. I am trying to make a new faction affinity that I am adding in via a trait. The trait is a dynamically increased value for science and industry to empire both starting at 25%. After 5 turns the value of increased science increases to 50%, but industry falls to 0%. Over the next 10 turns the two values swap again. this continues throughout the game. See below where y(blue) is the value of science, and y(red) is industry. X would be the value "CurrentTurn".





My question is: Is it possible to add a function in to determine a value. Pi I can substitute for 3.14... and it should hold true for about 500 turns as long as enough decimals are present but I would still need to use sine. 


Any help or another approach on how to do this would be much appreciated.

0Send private message
0Send private message0Send private message
7 years ago
Oct 9, 2017, 12:00:00 AM

Everything now successfully loads in to a Mod but the game freezes uponlaunching in to a game. Im not sure where I went wrong. Here is the work:

0Send private message
7 years ago
Oct 9, 2017, 8:15:25 AM

The best way to find out what's going wrong is by looking at the diagnostic file you can find them in "Documents/Endless Space 2/Temporary Files"

If your still not sure on what's going wrong, upload the diagnostic file here and I'll have a look.

0Send private message
7 years ago
Oct 9, 2017, 12:57:42 PM

Thank you, I didn't even know this exsisted. That is very helpful. The error is with the sine operation. Im guessing this means Im stuck.


The following exception was raised: System.InvalidOperationException: There is an error in XML document. ---> System.InvalidOperationException: 'Sine' is not a valid value for Amplitude.Unity.Simulation.SimulationModifierDescriptor+ModifierOperation.


I dont know enough about the language or allowances for endless space 2 to really know if there is another way around.


0Send private message
7 years ago
Oct 9, 2017, 1:42:11 PM

I can think of another way to have a similar effect such as each change being 5% each turn, 


This all works off the CurrentTurn Property in SimulationDescriptors[Empire].xml much like your original plan.


first you will want to make 2 new properties CurrentTurn20, CurrentTurn10, Clock10


For CurrentTurn10 take $CurrentTurn divide by 10 then floor the value - It should start at 0 and increase by 1 every 10 turns

For CurrentTurn20 take $CurrentTurn divide by 20 then floor the value then multiply by 2 - It should start at 0 and increase by 2 every 20 turns


$Clock10 should be set as 1 + ($CurrentTurn - ($CurrentTurn10*10) It should go in a loop of 1,2,3,4,5,6,7,8,9,10


The Science boost would be set by:  5* (10 - ( $Clock10 *  ( 1 + ($CurrentTurn20-$CurrentTurn10)) ))


The Industry boost would be set by: 5* ( $Clock10 *  ( 1 + ($CurrentTurn20-$CurrentTurn10)) )


This is just a rough idea of how it could be done, I expect it will need a lot of tweaking to actually work.


0Send private message
?

Click here to login

Reply
Comment