unit defense modifier

Discussion of all aspects of the game engine, including development of new and existing features.

Moderators: Forum Moderators, Developers

Post Reply
Talash
Posts: 6
Joined: May 8th, 2013, 8:54 pm

unit defense modifier

Post by Talash » May 24th, 2013, 6:58 pm

I'm sure this is a simple question to answer, but I haven't yet been able to find out through searching the forum.

I'm using an older version of the game (1.7.12, sadly I can't upgrade) and am looking for a little basic info on how the unit defense modifier numbers work, for example what you get from doing something like:

Code: Select all

int defMod = unit->defense_modifier(terrain);
First, am I correct that the number returned is a percentage value (0-100)? Second, from some of the searching I did, it sounds like this value returned is actually the chance that a unit will be hit at that location, so a value of 20 means a 20% chance of a unit being hit. Basically, lower numbers are better, rather than higher?

User avatar
TheBladeRoden
Posts: 168
Joined: July 16th, 2007, 8:01 am

Re: unit defense modifier

Post by TheBladeRoden » May 24th, 2013, 7:53 pm

aye
Founding Father of Columbia

Talash
Posts: 6
Joined: May 8th, 2013, 8:54 pm

Re: unit defense modifier

Post by Talash » May 27th, 2013, 1:35 pm

Thanks. Looks like I have a little code to fix then.

Post Reply