Trying to apply a multiplier to MaxStructure
Posted: Thu Feb 27, 2014 6:59 am
I'm currently working on an idea for some new ship parts, utilizing the core slot concept.
What I'm TRYING to do is to multiply the base Structure value (not current or max structure, but the initial value listed in ship_hulls.txt), and subtract/add said derived value from/to MaxStructure.
I've tried a few things, including adding a new BaseStructure variable via ship_hulls.txt files, no go. Either the game ignores my math or the part disappears...
I'm assuming that a new variable would need to be added somewhere out of reach of the .txt files...
I've tried a few iterations:
SetMaxStructure value - (Target.MaxStructure*.67)
This does nothing, I'm guessing modifying the same variable you are applying the modifer to is a no no. (Not a programming genius here)
And I tried a number of other 'iterations' that I can't remember now, including modifying the SetStructure modifier instead (which I don't think would do what I need anyways, i.e. I think that approach would have 'fully' repaired Structure to 1/3 of Max each turn, but I tried...).
I did try changing the part to Armour and modifying that value,i.e.:
capacity = (0 -(MaxStructure*0.33))
didn't go well...
I can't just apply a minus, as this part can go on a number of hulls. My 'goal' is to take a 15 'base' structure down to 5, but if I simply subtract 10, well then the smaller hulls go 0 or negative on structure...
My intent is to let armor add bonuses in it's usual fashion after this modifier is applied (i.e. adds the capacity value to the MaxStructure value, the same way it does now).
My goal is...
5 structure becomes 2
10 structure becomes 3/4
15 structure becomes 5
etc. etc. etc.
I also have another part that I'd like to modify MaxStructure in the other direction (adds 50% to structure).
These parts are not stackable, and are currently designed for 'core slots', which the hull types I have this in mind for would only have one of (in my idea anyways). My other 'core' parts/modifiers are working pretty well at the moment.
Any suggestions/ideas on how to do this (apply a multiplier to MaxStructure)?
What I'm TRYING to do is to multiply the base Structure value (not current or max structure, but the initial value listed in ship_hulls.txt), and subtract/add said derived value from/to MaxStructure.
I've tried a few things, including adding a new BaseStructure variable via ship_hulls.txt files, no go. Either the game ignores my math or the part disappears...
I'm assuming that a new variable would need to be added somewhere out of reach of the .txt files...
I've tried a few iterations:
SetMaxStructure value - (Target.MaxStructure*.67)
This does nothing, I'm guessing modifying the same variable you are applying the modifer to is a no no. (Not a programming genius here)
And I tried a number of other 'iterations' that I can't remember now, including modifying the SetStructure modifier instead (which I don't think would do what I need anyways, i.e. I think that approach would have 'fully' repaired Structure to 1/3 of Max each turn, but I tried...).
I did try changing the part to Armour and modifying that value,i.e.:
capacity = (0 -(MaxStructure*0.33))
didn't go well...
I can't just apply a minus, as this part can go on a number of hulls. My 'goal' is to take a 15 'base' structure down to 5, but if I simply subtract 10, well then the smaller hulls go 0 or negative on structure...
My intent is to let armor add bonuses in it's usual fashion after this modifier is applied (i.e. adds the capacity value to the MaxStructure value, the same way it does now).
My goal is...
5 structure becomes 2
10 structure becomes 3/4
15 structure becomes 5
etc. etc. etc.
I also have another part that I'd like to modify MaxStructure in the other direction (adds 50% to structure).
These parts are not stackable, and are currently designed for 'core slots', which the hull types I have this in mind for would only have one of (in my idea anyways). My other 'core' parts/modifiers are working pretty well at the moment.
Any suggestions/ideas on how to do this (apply a multiplier to MaxStructure)?