Logo Platform
logo amplifiers simplified

Modding Depletion Penalty

Reply
Copied to clipboard!
7 years ago
Sep 25, 2018, 3:09:22 PM

Hi!


I'd like to modify the depletion penalty from being binary 'depleted or not' to being a continuous scale (I'm aware this might hurt Cravers; I can mess with their numbers later).


SimulationDescriptors[Planet].xml has:



<SimulationDescriptor Name="PlanetDepletionNeutral" Type="PlanetDepletion">
<Modifier TargetProperty="BonusFromDepletion"   Operation="Addition"
Value="1"   Path="ClassColonizedPlanet/PopulationExploitingPlanetWhileDepleting"
 TooltipHidden="true"/>
</SimulationDescriptor>


And PlanetReserveDefinitions.xml 



<ResourceLevel Name="DepletionNeutral">
    <Condition>(Property(Planet, @ClassPlanet, PlanetDepletionPoints))
ge (Property(Planet, @ClassPlanet, PlanetDepletionThreshold)) and
((Property(Planet, @ClassPlanet, PlanetDepletionPoints))
lt(Property(Planet, @ClassPlanet, PlanetDepletionMax)))</Condition>
    <SimulationDescriptorReference Name="PlanetDepletionNeutral"/>
</ResourceLevel>

I think what I need to do is make it read something like:


<SimulationDescriptor Name="PlanetDepletionNeutral" Type="PlanetDepletion">
<Modifier TargetProperty="BonusFromDepletion"   Operation="Addition"
Value="1"   Path="ClassColonizedPlanet/PopulationExploitingPlanetWhileDepleting"
 TooltipHidden="true"/>

<Modifier TargetProperty="PlanetRawFood"   Operation="Percent"
Value="X"   Path="ClassColonizedPlanet" TooltipHidden="true" />
<Modifier TargetProperty="PlanetRawIndustry"  Operation="Percent"
Value="X"   Path="ClassColonizedPlanet" TooltipHidden="true" />
<Modifier TargetProperty="PlanetRawDust"   Operation="Percent"
Value="X"   Path="ClassColonizedPlanet" TooltipHidden="true" />
<Modifier TargetProperty="PlanetRawScience"   Operation="Percent"
Value="X"   Path="ClassColonizedPlanet" TooltipHidden="true" />
<Modifier TargetProperty="PlanetRawPrestige"  Operation="Percent"
Value="X"   Path="ClassColonizedPlanet" TooltipHidden="true" />
</SimulationDescriptor>

Except instead of X, I need:


-0.5 times Property(Planet, @ClassPlanet, PlanetDepletionPoints)) divided by Property(Planet, @ClassPlanet, PlanetDepletionMax). 


So that the value of the penalty during depletion ranges from 0 (when the depletion points are 0) to nearly 0.5 (when the depletion points are approaching the PlanetDepletionMax.


Questions:


a) Is that the right way to do this? (Am I on the right track?)

b) Where/how do I calculate X in this way, referencing those other variables? Is it just 'div(a,b)' as the function, or something more complicated?

c) Am I missing anything?



Thanks!

0Send private message
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message