Quote:
Originally Posted by Bhruic
There's something "extra" going on with vikings, as they seem to get different bonuses than other things do. The animals I checked with all got the +5% for the first level that it indicates they should, but the vikings seemed to get +6%. Not sure where the extra 1% comes from. Also not sure what the pars=3%,3% etc, is supposed to be doing.
|
Pars (parameters) are what the language and mechanics files pull to do calcumalations. It goes Pars=[param1],[param2],[param3], so on and so forth. The localization files (eng_skills.lng for most of us) pull these directly as [param#]. For example, level 1 of Sense Weakness has the following description (I think I reworded this one to make more sense, so don't expect it to match yours).
Code:
skill_weakness_lore_text_1=^skills_tPar^Troops. Chance of allies inflicting a critical hit [param1]. <br>Chance of allies to escape a critical hit [param2].
In game, where [param1] is supposed to be will instead display the number in the pars list.
In mechanics files these values are referenced using name of the skill, followed by a single number for which param to pull. For example, the diplomacy skill power calculation pulls the first param listed via the following (in skills.lua)
Code:
local perc_pacify = skill_power("diplomacy", 1)
This defines the local variable "perc_pacify" by pulling the first param listed in Diplomacy's pars list. This variable is then used for fancy mathematics further down the line.
Consistency is awesome, this usually(!) allows a modder to modify only the skills.txt file to have the change effected in both description as well as calculations.
EDIT: Also, some calculations are super simple to do (like adding a fixed percentage to critical chance, or increasing morale of certain troops by one), these are written directly in the skills.txt file. So changing the pars of these won't affect actual values ingame unless you also change the values in the pbonus (parameter bonus), rbonus (resistance bonus), or dbonus (not sure...) lines.