Character Unit Files

From Halfway
Jump to: navigation, search


The charact unit files are the place where you define the start stats and items of each character. They are here to set the character attributes etc when you pick up a character for the very first time in the game.



 "class" : "UnitDefinition",
 "name" : "Josh Connor",
 "shortName" : "Josh C.",
 "gender" : "Male",
 "citizenship" : "B-Class Neutral",
 "unitTypeName" : "joshConnor",
 "actionPoints" : 2,
 "attacksPerTurn" : 2,
 "healthPoints" : 5,
 "aimingPoints" : 4,
 "agilityPoints" : 6,
 "visibilityRange" : 90,
 "hearingRange" : 10,
 "experience" : 0,
 "level" : 1,
 "movementSpeed" : 140,
 "faction" : "Human",
 "weapon" : { "class": "Weapon", "itemId": "shortRange03MK01" },
 "itemOne" : null, 
 "itemTwo" : null,
 "suit": { "class": "Suit", "itemId": "scoutSuit01" },
 "backpack" : {
   "class" : "Backpack",
   "capacity" : 8,
   "items" : [
       { "class": "Item", "itemId": "StandardAmmunition", "itemType": "Ammunition" },
       { "class": "UsableItem", "itemId": "medkit01", "itemType": "Item" }



Note:If the point is very obvious I just let it our here. ;)

"class" : Ignore this.

"name" : The name of the character

"shortName" : The short name that is used under the portraits in the UI.

"citizenship" : This is just for story background. (What level in society each character has.) (This is optional)

"unitTypeName" : The unit file you have in the the ./characters folder. (minus the file ending)

"actionPoints" : How many AP the character has.

"attacksPerTurn" : How many attacks a character has per turn.

"healthPoints" : How many health point the character has. (Note this is the health attribute of the character. the health actually is 2*HealthPoints, in Joshs case its 10)

"aimingPoints" : The base aiming attribute.

"agilityPoints": The base agility attribute

"visibilityRange" : How far in tiles the character can see enemies.

"hearingRange" : How far the character can hear in tiles. (Note:This get used only by the AI atm. for character it is not used)

"experience" :Not used anymore (Is obsolete)

"level" : Not used anymore (Is obsolete)

"movementSpeed" : How fast the character moves visually. This should be synchronized with the animation of the character to prevent visual sliding/moon walking. This value has nothing to do with the gameplay and how far a character can walk. (See agility for that)

"faction" : What faction this character belongs to. For players there are only human at the moment. (This is optional)

"weapon" :What weapon the character has equipped if you are picking him up. Get the id from the weapons.json (use "null" if none)

"itemOne" and "itemTwo": This is not used anymore. please set it to null.

"suit": What suit the character is wearing. Use the ID from the suits.json please always give the character some sort of suit or else it could get some crashes ingame. We created a Standard Ship Overall with 0 armor etc for this case. (Or make your own)

"backpack" : Here you can define what items the character has in its backpack and how big it is. Please note: Enemies can only have medkits and grenades in the backpack. If you place some they will use it if defined in the AI brain. See Ai archetypes.json