Really enjoy the game, reminds me quite a bit of one of my old favorites, Pax Imperia.
Anyway I'd like to mod planetary bombardment so that bombing a colony to destruction doesn't apply negative modifiers to the planet once the colony on it is destroyed.
I found HandleGetBombingResult in invasion.a, which calls UFMakePlanetDestruction in userfunc.a, which in trun passes the call on to the planet like so:
Code: Select all
ThisPlanet->MakeDestruction(0.01f*(float)PercentDestruction, 0.01f*(float)PercentMilitaryDestruction, 0.01f*PercentPopulationKill, Yes_==KeepColonialModuleAndSpaceport);
Code: Select all
ThisPlanet->MakeDestruction(0.0f, 0.01f*PercentMilitaryDestruction, 0.01f*PercentPopulationKill, Yes_==KeepColonialModuleAndSpaceport);
Questions:
Did I make the correct change here? in other words my mod works as it should and the smaller negative values I'm seeing are just the result of the minig/extraction that had been done by the previous occupants?
Is my change wrong?
is the change incomplete? Like the military and population overkill are getting applied to produce the negative modifiers I'm seeing?
Something else?
I'd appreciate any information/feedback that those of you more knowledgable about this would care to provide.
Thanks!