Modding help required: Experience. |
For a small modding practice I wanted to change the ship experience slightly, but I was having trouble getting what I wanted. I'm running out of ideas; can anyone help?
My idea was this: At first, ships gain experience a bit faster, then the experience gain slows down, and finally stops (this is the "normal" gain from staying alive etc. Combat exp. does not change). After it has stopped, ship can still gain experience through combat. Ideally, one could let the ship cruise around and get then to regular level, put them on ship training facility and get them to veterans, but would need to have them in combat to make them elites.
Unfortunately I couldn't make this happen.
I was using "Ship Training" ability, setting the exp/turn to zero and using "ship training" on lower experience levels instead, but it affected all ships in the same space, so it didn't work the way I wanted. I tried "Object" and "Space Object" as scopes, but failed to get them to work only on that ship. Can this ability be made to only effect single ship?
I also tried using "Experience Rate Percentage Change" with negative value to slow down the Exp. gain, but failed to get any effect (I changed cultural enhancement so it would not override the wanted effect). According to the pdf the Stacking is "max", so I assume it get's a +0 from somewhere instead of the -50 and -100% I wanted. Is there a way around this?
Third Idea I had was based on changing the Exp/turn to a formula that would get the ships current experience and change the exp/turn based on that, but I suspect this would only be calculated once/turn, or when the game is loaded. Can anyone tell me if this would work, and if so how to do it.
And of course, any other ideas on how this could be done are welcome. (though I'd rather not trust on high level limits for later levels and big combat exp)

Re: Modding help required: Experience.
Why would you need to check the facility? So the facility provides 100 XP or whatever - it will start decaying either immediately or on the next turn, depending on whether scripts run before or after experience gain! 
~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious 
Re: Modding help required: Experience.
New to this, so the following suggestion might not work:
Put the function for EXP gained for all the relative fields as:
(base value)/(Current EXP + some number)
or
Max (0, ( (base value)- F(current EXP) ) )
The first one means that the ship will always gain EXP, but at continually slower rates. The second one will make the EXP stop eventually, but never go negative.
For example, the suggestion Ecolis suggested done my way would be:
EXP gained = Max (0, 100-(Current EXP*.01))
Re: Modding help required: Experience.
There is no access to "current experience" in the data file functions.




Re: Modding help required: Experience.
I'm not sure about the formula idea, but you might want to look at Suicide Junkie's scripts... I think he has one of them for tweaking ship experience so that it decays over time, which (if it works the way I think) would do what you want - what I'm thinking of is a script that runs every turn and multiplies all ships' experience by, say, 0.99. What that would do is make experience gravitate toward a particular value - if the constant gain per turn were 100, for instance, a 99% multiplier would mean that a ship's experience would gravitate toward 10,000 points, as any ship with fewer points would gain 100 and lose a few, while any ship with more points would gain 100 and lose more than 100 (since the 1% lost of more than 10,000 is more than 100). Thus, only ships that constantly train, either by staying at a training facility or engaging in combat, would be able to attain higher levels of experience, and they would lose that experience gradually if they stop training.
Here's a link:
http://imagemodserver.mine.nu/other/MM/SE5/Tools/ScriptingToolkit.rar
Not sure if the script behaves the way I think, but it's worth looking into... there's a similar script in there which I wrote to manipulate research points, not quite sure about the experience one!
~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious