ENDLESS™ Space 2 is turn-based 4X space-strategy that launches players into the space colonization age of different civilizations within the ENDLESS™ Universe. Your Vision. Their Future.
In trying to mod the modifiers for the effects of modules I have discovered that I cannot implement negative values. For example I would like to add a modifier to decrease ship evasion for the plasma intensifier to offset the benefits and discourage stacking. I've tried adjusting the min/maxs but to no avail.
Could you please allow for negative bonuses on modules and weapons?
I'm not a Dev but could you give me an example of the exact modifications you are trying ?
As when it comes to -1 in MinValue's & MaxValue's They can mean -infinity & +infinity respectively (See Public/Simulation/HapppinessStatusSetDefinitions.XML)
I'm not a Dev but could you give me an example of the exact modifications you are trying ?
As when it comes to -1 in MinValue's & MaxValue's They can mean -infinity & +infinity respectively (See Public/Simulation/HapppinessStatusSetDefinitions.XML)
Yes negative numbers are used throughout but they don't appear to work for upgrades like modules and weapons. I tried a whole slew of variations but you just can't seem to get it to give a negative bonus.
As for examples, you could try the one above. Take a energy weapon upgrader like the plasma intensifier (the one that gives bonus to your energy weapons) and then add a negative bonus to evasion...or movement or anything really. It just won't seem to take because I think they are hard coded somewhere. I found a file that deals with min/maxs and tried tweaking that but still no good.
I don't know why they aren't working, I may have an in-depth look into it later on if no progress is made (currently I'm focusing on understanding other ares)
a property can not be negative unless it's been specified it can in its declaration. By default a property has a MinValue of 0, and so can not be negative.
Both the Evasion property on Module and Ship do not have a MinValue, you need to modify those two ( add MinValue="Negative" ?or Minvalue="1" if it's really a percentage? ).
Modifying the property of ClassModuleDefense will mean that a module can have a negative Evasion
Modifying the property on ClassShip will mean that a Ship can have a negative Evasion
a property can not be negative unless it's been specified it can in its declaration. By default a property has a MinValue of 0, and so can not be negative.
Both the Evasion property on Module and Ship do not have a MinValue, you need to modify those two ( add MinValue="Negative" ?or Minvalue="1" if it's really a percentage? ).
Modifying the property of ClassModuleDefense will mean that a module can have a negative Evasion
Modifying the property on ClassShip will mean that a Ship can have a negative Evasion
In addition and to specify: You need to modify the files: Simulation/Battles/SimulationDescriptors[ModuleDefense].xml > Add MinValue="Negative" to take into account the minimum value of the "Evasion" property: <Property Name="Evasion" BaseValue="0" MinValue="Negative"/> > Add the property to the module you want to change (here, the base defense module on starter ships "ModuleDefenseHullPlating1"): <Modifier TargetProperty="Evasion" Operation="Addition" Value="-0.1" Path="ClassModuleDefense"/>
You need to modify the file: Gui/Miscellaneous/PanelFeatureModuleEffectsDefinition.xml > To change the minimum value (%) for the "Evasion" property: currently "0", change for "-1" to allow the "-100%" maximum negative value: <Item Name="Evasion" Title="%PanelFeatureModuleEvasionTitle" MinValue="-1" IsPercentage="true"/>
I create an example module that changes the base defense module to add a "-10% evasion" value. You can try it here: EvasionModule.zip
While you're right, the module ModuleDefenseHullPlating1 will reduce Evasion, I think the requestor was looking for a weapon that would inflict -10% evasion upon an enemy ship that it's firing on, ie, negate 10% of the Evasion on an enemy ship.
As in all coding, there's six ways to do the same thing. IMO, the easiest counter to Evasion would be the weapon property Accuracy. In order to knock down 10% Evasion, bump *up* Accuracy a like amount.
Another option would be to clone the property OpponentEnergyWeaponAccuracyPercent. It looks like that property affects an enemy vessel.
He yes! Sorry for the misunderstanding :) The way you give Knyghtefall is good!
You didn't misunderstand. What Knyghtefall is talking about is something totally different and not what I'm trying to do (although I appreciate him trying to help). The Plasma Intensifier and other support mods like it boosts offensive capability but since you can stack a lot I thought there should be a detriment to using them. The quasi logic is that you're using a lot of power to boost your weapons so in turn that is sapping power from your engines which reduces your evasion capabilities.
What you and Spaz suggested did eventually end up working! Since I was working with the Plasma Intensifier, which is a support module that increases the effectiveness of energy weapons, I had to tweak the values in the SimulationDescriptors[ModuleSupport].xml file:
Then I edited the GUI file as you said and then it worked perfectly :)
I then tested it out during battle by doing 90% evasion Vs 90% evasion + negative 90% evasion (should cancel each other out) Vs no evasion modifiers at all. The results were perfert. The results from the +90 and -90 evasion matched the results for no evasion modifiers while the results for the 90% evasion showed a 64% evasion rate.
But wait, if I had 90% evasion my evasion be much higher right? So I did some experiments and basically what I found is that there is a ~ .72 .6 modifier applied to your evasion (range penalty is left alone). I tried all sorts of different evasion percentages and this modifier held true. Not sure why it's there or if it's intended but it seems to be there.
I also discovered that minimum accuacy doesn't work the way I thought it did. I thought it ensured that no matter what other factors, accuracy would not drop below a certain rate. But it turns out that min accuracy only effects the starting accuracy, not accuracy after evasion and range are taken into consideration. I proved this by giving a ship 2 warp cores with 90% evasion each. If min accuracy worked then at least some shots would have hit but as it turned out the ship was unhittable.
So to prevent evasion from being too powerful I added a "Max" evasion and thankfuly that worked.
KloudZero
Newcomer
KloudZero
Newcomer
13 200g2g ptsReport comment
Why do you report KloudZero?
Are you sure you want to block KloudZero ?
BlockCancelAre you sure you want to unblock KloudZero ?
UnblockCancelVIPCyRob
Sentient Precursor Database in Disguise
I know a little about modding...
VIPCyRob
Sentient Precursor Database in Disguise
92 800g2g ptsReport comment
Why do you report CyRob?
Are you sure you want to block CyRob ?
BlockCancelAre you sure you want to unblock CyRob ?
UnblockCancelKloudZero
Newcomer
KloudZero
Newcomer
13 200g2g ptsReport comment
Why do you report KloudZero?
Are you sure you want to block KloudZero ?
BlockCancelAre you sure you want to unblock KloudZero ?
UnblockCancelVIPCyRob
Sentient Precursor Database in Disguise
I know a little about modding...
VIPCyRob
Sentient Precursor Database in Disguise
92 800g2g ptsReport comment
Why do you report CyRob?
Are you sure you want to block CyRob ?
BlockCancelAre you sure you want to unblock CyRob ?
UnblockCancelSpaz
Newcomer
Spaz
Newcomer
6 000g2g ptsReport comment
Why do you report Spaz?
Are you sure you want to block Spaz ?
BlockCancelAre you sure you want to unblock Spaz ?
UnblockCancelDEVDagart
Lost Guardian
DEVDagart
Lost Guardian
34 600g2g ptsReport comment
Why do you report Dagart?
Are you sure you want to block Dagart ?
BlockCancelAre you sure you want to unblock Dagart ?
UnblockCancelKnyghtefall
Enthusiast
Knyghtefall
Enthusiast
7 800g2g ptsReport comment
Why do you report Knyghtefall?
Are you sure you want to block Knyghtefall ?
BlockCancelAre you sure you want to unblock Knyghtefall ?
UnblockCancelDEVDagart
Lost Guardian
DEVDagart
Lost Guardian
34 600g2g ptsReport comment
Why do you report Dagart?
Are you sure you want to block Dagart ?
BlockCancelAre you sure you want to unblock Dagart ?
UnblockCancelKloudZero
Newcomer
KloudZero
Newcomer
13 200g2g ptsReport comment
Why do you report KloudZero?
Are you sure you want to block KloudZero ?
BlockCancelAre you sure you want to unblock KloudZero ?
UnblockCancel