questions about Units.lua stats

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, The Lordz

Post Reply
xriz
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 148
Joined: Tue Oct 21, 2008 2:17 am
Location: Los Angeles

questions about Units.lua stats

Post by xriz »

I've been looking at the script files for modding units, below is shows the armored train unit as a standard example and I have some questions;
1) I see in the first part they have hp=100 but all unit strengths are "10" and mp=24 when manpower is 2 to produce the unit, so whats up with those numbers?
2) most of the stats are straight forward but some seem duplicated' in the first section you have attack =6 then farther down groundattack = 5, Defense does the something, plus shock and assault are also duplicated, what's the duplication about or for?
3) what does 'weapon = "light"' actually mean, is this were you match up class to determine whether to use highdefence versus base defence?


name = "armouredtrain",
type = "land",
chassis = "rail",
class = "ground",
icon = "armouredtrain",
levels =
{
{
hp = 100,
mp = 24,
ap = 1,
LOS = 1,
range = 1,
shock = 1,
attack = 6,
defense = 6,
airattack = 2,
airdefense = 2,
bombard = 4,
assault = 0,
ammunition = 0,
},
},
retreat = 1,
costPP = 25,
costMP = 2,
turns = 3,
upkeepPP = 1,
upkeepMP = 0,
weapon = "light",
factions = { 0, 1, 2, 3, 4},
strengthValue = 5,


stats =
{
groundattack = 5,
airattack = 2,
armourattack = 2,
basedefense = 11,
highdefense = 6,
assault = 2,
shock = 1,
Myrddraal
The Artistocrats
The Artistocrats
Posts: 1505
Joined: Wed Feb 23, 2011 2:49 pm

Re: questions about Units.lua stats

Post by Myrddraal »

Ok... there is quite a lot of redundant data in there I'm afraid. The research and stats systems went through various iterations in the development cycle, and some of the elements of the stats file are relics from obsolete systems. Lukas knows this stuff inside out, but basically I think you should ignore everything in the ‘levels’ sub-sections. Everything outside of those sections is a valid stat iirc.
Post Reply

Return to “Commander the Great War : Mods & Scenario Design”