here the sample for AOW, i think everything is obvious seeing the sample
Code: Select all
{
"defStrings":[
{"key":"IMG_CROSSHAIR", "val":"64_crosshair.png"},
{"key":"IMG_BALL", "val":"64_ball.png"},
{"key":"IMG_SELECTION", "val":"64_selection.png"},
{"key":"IMG_HUD_MAPEDIT_RANGED", "val":"unit_ger_artillery_lefh18_howitzer.png"},
{"key":"IMG_HUD_MAPEDIT_BUILDING", "val":"mapeditor_buildings.png"},
{"key":"IMG_HUD_MAPEDIT_CLOSECOMBAT", "val":"unit_rus_tank_t34.png"},
{"key":"IMG_HUD_MAPEDIT_SHIPS", "val":"unit_us_ship_fletcher.png"},
{"key":"IMG_HUD_MAPEDIT_GREY_RANGED", "val":"mapeditor_ranged_off.png"},
{"key":"IMG_HUD_MAPEDIT_GREY_BUILDING", "val":"mapeditor_buildings_off.png"},
{"key":"IMG_HUD_MAPEDIT_GREY_CLOSECOMBAT", "val":"mapeditor_closecombat_off.png"},
{"key":"IMG_HUD_MAPEDIT_GREY_SHIPS", "val":"mapeditor_ships_off.png"}
],
"defIntegers":[
{"key":"MAPEDITOR_DEFAULT_UNIT_ID", "val":"105"}
],
"defBools":[
{"key":"GRAPHICS_MOSTLY_RIGHT", "val":true},
{"key":"IS_BONUS_NEGLECTS_EACH_OTHER", "val":true},
],
"trnDailyGiftUnitTypes": ["UNIT_GER_INF_ENGINEERS", "UNIT_US_INF_ENGINEERS", "UNIT_JP_INF_ENGINEERS", "UNIT_RU_INF_ENGINEERS", "UNIT_GB_INF_ENGINEERS"],
"initialUnitSpawning": [
{ "trnRaceID": "RACE_US", "mapStartingUnits": "MINIMAL", "trnUnitTypesToPlace": ["UNIT_US_INF_INFANTRY"] },
{ "trnRaceID": "RACE_US", "mapStartingUnits": "FEW", "trnUnitTypesToPlace": ["UNIT_US_INF_INFANTRY","UNIT_US_VEHICLE_JEEP"] },
{ "trnRaceID": "RACE_US", "mapStartingUnits": "MANY", "trnUnitTypesToPlace": ["UNIT_US_INF_INFANTRY", "UNIT_US_INF_INFANTRY", "UNIT_US_VEHICLE_JEEP", "UNIT_US_SHERMAN"] },
{ "trnRaceID": "RACE_GER", "mapStartingUnits": "MINIMAL", "trnUnitTypesToPlace": ["UNIT_GER_INF_INFANTRY"] },
{ "trnRaceID": "RACE_GER", "mapStartingUnits": "FEW", "trnUnitTypesToPlace": ["UNIT_GER_INF_INFANTRY","UNIT_GER_VEHICLE_KUBELWAGEN"] },
{ "trnRaceID": "RACE_GER", "mapStartingUnits": "MANY", "trnUnitTypesToPlace": ["UNIT_GER_INF_INFANTRY", "UNIT_GER_INF_INFANTRY", "UNIT_GER_VEHICLE_KUBELWAGEN", "UNIT_GER_PANZER_III"] },
{ "trnRaceID": "RACE_RU", "mapStartingUnits": "MINIMAL", "trnUnitTypesToPlace": ["UNIT_RU_INF_INFANTRY"] },
{ "trnRaceID": "RACE_RU", "mapStartingUnits": "FEW", "trnUnitTypesToPlace": ["UNIT_RU_INF_INFANTRY","UNIT_RU_VEHICLE_BA_64"] },
{ "trnRaceID": "RACE_RU", "mapStartingUnits": "MANY", "trnUnitTypesToPlace": ["UNIT_RU_INF_INFANTRY", "UNIT_RU_INF_INFANTRY", "UNIT_RU_VEHICLE_BA_64", "UNIT_RU_T34"] },
{ "trnRaceID": "RACE_AXIS", "mapStartingUnits": "MINIMAL", "trnUnitTypesToPlace": ["UNIT_GER_INF_INFANTRY"] },
{ "trnRaceID": "RACE_AXIS", "mapStartingUnits": "FEW", "trnUnitTypesToPlace": ["UNIT_GER_INF_INFANTRY","UNIT_GER_VEHICLE_KUBELWAGEN"] },
{ "trnRaceID": "RACE_AXIS", "mapStartingUnits": "MANY", "trnUnitTypesToPlace": ["UNIT_GER_INF_INFANTRY", "UNIT_GER_INF_INFANTRY", "UNIT_GER_VEHICLE_KUBELWAGEN", "UNIT_GER_PANZER_III"] },
{ "trnRaceID": "RACE_ALLIES", "mapStartingUnits": "MINIMAL", "trnUnitTypesToPlace": ["UNIT_US_INF_INFANTRY"] },
{ "trnRaceID": "RACE_ALLIES", "mapStartingUnits": "FEW", "trnUnitTypesToPlace": ["UNIT_US_INF_INFANTRY","UNIT_RU_VEHICLE_BA_64"] },
{ "trnRaceID": "RACE_ALLIES", "mapStartingUnits": "MANY", "trnUnitTypesToPlace": ["UNIT_US_INF_INFANTRY","UNIT_RU_INF_INFANTRY","UNIT_US_VEHICLE_JEEP", "UNIT_RU_T34"] }
],
"animationEntries":[
{ "customName": "AnimDieExploding2", "methodName": "AnimDieExploding2", "tags": ["case:die", "t:equipment", "t:non_plane", "a:explosion", "a:default"], "params": ["explosion:3r3"] },
{ "customName": "AnimDiePlaneCrash", "methodName": "AnimDiePlaneCrash", "tags": ["case:die", "t:plane", "a:any", "a:default"], "params": ["smoke:4r3"] },
{ "customName": "AnimDieBeamBurn", "methodName": "AnimDieBeamBurn", "tags": ["case:die", "t:vehicle", "t:building", "t:plane", "t:foot", "a:beam", "a:flame"], "params": [] },
{ "customName": "AnimDieTankCrackedInHalf", "methodName": "AnimDieTankCrackedInHalf", "tags": ["case:die", "t:vehicle", "a:explosion", "a:default"], "params": ["smoke:4r3", "explosion:3r3"] },
{ "customName": "AnimDieShipBreak", "methodName": "AnimDieShipBreak", "tags": ["case:die", "t:ship", "a:explosion", "a:default"], "params": ["smoke:4r3", "explosion:3r3"] },
{ "customName": "AnimDieBuilding", "methodName": "AnimDieBuilding", "tags": ["case:die", "t:building", "a:explosion", "a:default"], "params": ["smoke:6r5", "explosion:0"] },
{ "customName": "AnimDieFading", "methodName": "AnimDieFading", "tags": ["case:die", "t:foot", "t:todo", "a:default"], "params": [] },
{ "customName": "AnimDieExplodeLowGravity", "methodName": "AnimDieExplodeLowGravity", "tags": ["case:die", "t:spaceship", "a:explosion", "a:default"], "params": [] }
]
}
Boolean: "GRAPHICS_MOSTLY_RIGHT":
meaningall unit images are looking right (and all exceptional directions are set in unit jsons in "uiDefinition":"imageFacingDirection")
false: means they are mostly looking left.
Integer: DEFINE_UNIT_BIG_HP_VALUE, DEFINE_UNIT_BIG_POWER_VALUE,DEFINE_UNIT_SMALL_HP_VALUE, DEFINE_UNIT_SMALL_POWER_VALUE
if spell is "RESISTED_BY_HP"/"RESISTED_BY_POWER" type spell, than it will resisted based on hp or power and these boundary values
if hp/power is < small value than no resistance, if hp/power is > big value than 100% resistance, in between propotional to the value and the small-big range.
Boolean: "ENABLE_BUILDING_OCCUPACY_BY_2_FRAME_ANIM":
true = old way: when buildings can be in one image with occupied and non occupied state, false = occupacy in separate image
boolean: "IS_BONUS_NEGLECTS_EACH_OTHER"
if true than counter bonus damage is calculated only if enemy has no bonus (false: always), also counter halving is different...
(in AOF it is true all other alternatives false by deafult.)
trnDailyGiftUnitTypes
Here you can define which unit types to prefer as daily gift (if not yet owned) eg. in AOS the Castle + trebuchet should be the firsts.
(the order in the list is also matters, first will be first offered and so on)
initialUnitSpawning
Here you can set what units to spawn for the given race/nation on different startung units settings (minimal/few/many).
IMPORTANT!: you can only set units that can move onto that tiletype where the starting TC is standing.
eg. if TC is standing on grass than only units that also can stand on grass.
if you set a TC to "space" than only the unit that can walk on space (spaceships/astronauts)
Example setting in AOG for ground and space TC variations:
so instead of this:
Code: Select all
{ "trnRaceID": "RACE_HUM", "mapStartingUnits": "MINIMAL", "trnUnitTypesToPlace": ["UNIT_HUM_INF_RALFIEMENS"]},Code: Select all
{ "trnRaceID": "RACE_HUM", "mapStartingUnits": "MINIMAL", "trnUnitTypesToPlace": ["UNIT_HUM_INF_SPACEMAN", "UNIT_HUM_INF_RALFIEMENS"]},animationEntries
Here you can define the procedural animations you want to use (eg. on-die animations) on units on different events, and set some customization on them.
Code: Select all
{ "customName": "AnimDieBuilding", "methodName": "AnimDieBuilding", "tags": ["case:die", "t:building", "a:explosion", "a:default"], "params": ["smoke:6r5", "explosion:0"] },
{ "customName": "AnimDieBuilding_NO_SMOKE", "methodName": "AnimDieBuilding", "tags": ["case:die", "t:soft_building", "a:explosion", "a:default"], "params": ["smoke:0", "explosion:0"] },- but first you want it to be used by units tagged by "building" and to have smoke on it when dies.
- on second you want to use on units tagged "soft_building" and have no smoke on it
but still execute the same "animation procedure" this case a collapsing of unit sprite.
attributes you need to set:
"customName": this is totally random name you give, must be unique among entries.
"methodName": this is a FIXED possible usable procedure/method names to be called
"tags":
you have tags like:
case tags: defining when to use this animation eg: "case:die"
type tags: defining what type of units should use this animation (the tags are set on the unit statsheet visual parts) eg: "t:building", "t:plane"
attack type tags: if you want to restrict what attack type this should be effective (attack types also set in units statsheet / visual part) eg: "a:explosion", "a:beam"
"params": Some methods handle input parameters where you can define things:
"smoke:6r5" means 6 smoke puffs and +0..5 (random) extra puffs.
"explosion:3r3" means 3 explosion sprites + 0..3 random extra explosion puffs.
