OpenXcom Forum

Contributions => Programming => Topic started by: Maszek on December 12, 2013, 03:31:51 pm

Title: Base size & damage calculation
Post by: Maszek on December 12, 2013, 03:31:51 pm
Hey, tried the search function but did not find anything on either of these.

Where is the damage range for weapons (0-200%) and explosives calculated, which file do I need to edit?

And is it possible to allow bigger bases, like 2 more columns/rows or perhaps multiple floors?

Thanks!

Edit: And where would I edit the stat modifiers of aliens related to difficulty levels?
Title: Re: Base size & damage calculation
Post by: yrizoud on December 12, 2013, 09:40:44 pm
For damage :In Battlescape\TileEngine.cpp, function TileEngine::hit()
else if (part == V_UNIT)
   {
      https:// power 0 - 200%
      const int rndPower = RNG::generate(0, power*2);


Stat adjustments based on difficulty : In SaveGame/BattleUnit.cpp, function BattleUnit::adjustStats()

Bigger base seems a bad idea, since it involves ugly scrollbars or redrawing all the base structures at a smaller size.
Title: Re: Base size & damage calculation
Post by: Maszek on December 13, 2013, 12:00:55 am
Thanks for your help, it's been very useful. However, wouldn't a multi-level base solve both of your issues with more space? :P
Title: Re: Base size & damage calculation
Post by: RSSwizard on August 25, 2014, 06:59:31 am
I would like to request that the Damage Calculation be stored in Ruleset somewhere so that it can be custom edited.