Game definition jsons - Initialization jsons

Learn the .json format
used to define characteristics of units and other game elements
Post Reply
Stratego (dev)
Site Admin
Posts: 9675
Joined: Fri Apr 25, 2014 9:28 pm

Game definition jsons - Initialization jsons

Post by Stratego (dev) » Thu Sep 28, 2017 8:01 am

A new file where there will be some settings, the first is MINIMAL/FEW/MANY starting units definition

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}
   ],
   "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"] }
   ]
}



"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.

Stratego (dev)
Site Admin
Posts: 9675
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Initialization jsons

Post by Stratego (dev) » Wed Dec 12, 2018 11:25 pm

new items can be set (special images)

Stratego (dev)
Site Admin
Posts: 9675
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Initialization jsons

Post by Stratego (dev) » Mon Aug 19, 2019 9:28 am

new bolean alue can be set:
{"key":"GRAPHICS_MOSTLY_RIGHT", "val":true}

meaningall unit images are looking right (and all exceptional directions are sen in unit jsons in "uiDefinition":"imageFacingDirection")
false: means they are mostly looking left.

Post Reply

Return to “Game Definition .JSON”