Page 2 of 6

Re: Unit Design - unit property sheet

Posted: Sat Nov 07, 2015 6:07 pm
by COOLguy
Daniel (the dev) wrote:(i suggest using the samples i posted, they are valid and formatted well and also indented well, simply modify those with the stats you desire.)
Actually, he started with those. Those errors were what he got, I think. But it works fine for me.

Re: Unit Design - unit property sheet

Posted: Thu Dec 24, 2015 3:59 pm
by Stratego (dev)
updated: a new sample for a neutral animal (hen)
and also a zip with some AOF unit jsons so you can check how they work.

Re: Unit Design - unit property sheet

Posted: Thu May 18, 2017 4:48 am
by Stratego (dev)
updated: added spec actions, and the new actions to the end about bypassing armors.

"Usable specActions in datasheet" section

Re: Unit Design - unit property sheet

Posted: Thu Aug 03, 2017 9:21 pm
by Stratego (dev)
new config option in json:

"rndProd":{ // this will let you make unit groups, and among the group random spawning: eg. if we want to have 2 similar orc riders, but with different images, you can set this to have it random.
"prodGroup":"AUX", // group name
"prodWeight":20 // summing up the weights in group and getting the random based on weight (eg. you have unitA(w10) unitB(w25) unitC(w15) than unitA=20%, unitB=50%, unitC = 30% chance)
},

Re: Unit Design - unit property sheet

Posted: Fri Sep 22, 2017 6:01 am
by Stratego (dev)
2 new spec ability

IS_ALL_TECH_MEMBER, //if a tech a techs to be in "all techs" section - meaning the DEFAULT techs
CAN_BE_FLOWN_TRU // if this unit is so low on ground and has no armament to reach - so flyers van fly over it (like caltrops in AOW)

Re: Unit Design - unit property sheet

Posted: Tue Sep 26, 2017 1:44 am
by Sunrise Samurai
Perhaps a stupid question, but here it is. What happens if a unit is defined to be a technology? Would it be something you can only build one of, aside from getting tossed into the technologies list? If so, it might be useful for future units that are meant to be unique, like heroes.

I had to ask. Sometimes it can be useful to see if options can be used in ways they were never intended.

Re: Unit Design - unit property sheet

Posted: Tue Sep 26, 2017 3:14 am
by Stratego (dev)
no, it influence other things too not only the fact which list it is in.

so dont make a unit be a technology :)

Re: Unit Design - unit property sheet

Posted: Thu Oct 05, 2017 8:37 am
by Stratego (dev)
AOF json zip updated

Re: Unit Design - unit property sheet

Posted: Thu Oct 05, 2017 3:22 pm
by Stratego (dev)
new specunitactions
IS_EFFECT_REDUCED_BY_ARMOR, // if the prop changer effect (that is HP changing one!) will be reduced by NORMAL armor
IS_EFFECT_REDUCED_BY_PARMOR, // if the prop changer effect (that is HP changing one!) will be reduced by PIERCE armor

Re: Unit Design - unit property sheet

Posted: Sat Dec 23, 2017 8:52 pm
by Stratego (dev)
new specunitaction:
IS_OCCUPIABLE, // - occupiable like the TC but means only occupiable and internal units get damaged(nothing else that "isoccupiablebuilding=true" means like no pop limit, visible on expőlored terrain and so on)


so from now we can have occupiable unit that is not a tc

Re: Unit Design - unit property sheet

Posted: Wed Dec 27, 2017 10:38 pm
by Stratego (dev)
new specunitaction:
IS_CARRIED_DAMAGABLE, //if the carried units are receiving damage or not (like on TC-s) - combine lthis with IS_INATTACKABLE to work like a TC

Re: Unit Design - unit property sheet

Posted: Mon Mar 12, 2018 9:26 pm
by Stratego (dev)
2 new specunitactions:
IS_LEGENDARY, //on the game area only one can exists, the second will not be produced (stops production)
IS_UNIQUE, //for the player only one can exists, the second will not be produced (stops production)

Re: Unit Design - unit property sheet

Posted: Mon Mar 12, 2018 9:42 pm
by General Brave
Is there going to be special units?

Re: Unit Design - unit property sheet

Posted: Mon Mar 12, 2018 10:40 pm
by Puss_in_Boots
It would be great for AoWW especially with the ideas currently being visited.

Re: Unit Design - unit property sheet

Posted: Mon Mar 12, 2018 10:48 pm
by General Brave
We can have the Gustav.

Re: Unit Design - unit property sheet

Posted: Sat Aug 04, 2018 6:42 am
by Stratego (dev)
new option in random production setting, you can set if the setting should work on summoning or on factory production or both

Code: Select all

  	       
  	       "rndProd":{                  // this will let you make unit groups, and among the group random spawning: eg. if we want to have 2 similar orc riders, but with different images, you can set this to have it random.
  	          "scope":"SUMMON",     //can be: PRODUCTION, SUMMON, ALL meaning the randomness will effect only production or only summoning or both
	          "prodGroup":"AUX",	// group name 	   
	    	  "prodWeight":20       // summing up the weights in group and getting the random based on weight (eg. you have unitA(w10) unitB(w25) unitC(w15) than unitA=20%, unitB=50%, unitC = 30% chance)
	       },

Re: Unit Design - unit property sheet

Posted: Fri Sep 07, 2018 6:06 am
by Stratego (dev)
trnEquivalents; //use this to set other techs to be equivalents to this (eg. elves armor1 is equivalent to human armor 1)

format:

Code: Select all

"trnEquivalents":{"unitTypes":["TECH_ELF_SOME_TECH1", "TECH_DWARF_SOME_TECH2"]}

Re: Unit Design - unit property sheet

Posted: Sat Sep 15, 2018 12:38 pm
by Stratego (dev)

Code: Select all

IS_GAIA_AI_ANIMAL_PEACEFUL, //the unit is a gaia animal and its ai is peaceful like a deer
		IS_GAIA_AI_ANIMAL_HOSTILE, //the unit is a gaia animal and its ai is hostile, attacks if you get in its sight range
		IS_GAIA_AI_ANIMAL_HOSTILE_IF_WOUNDED, //the unit is a gaia animal and its ai is hostile, attacks if it is wounded and you get in its sight range
deer/dolphin/bear is replaced with IS_GAIA_AI_ANIMAL_HOSTILE_IF_WOUNDED

and these 3 new setting available on unit.

Re: Unit Design - unit property sheet

Posted: Tue Sep 18, 2018 7:13 pm
by Stratego (dev)
new specunitactions:
ATTACK_FIRST_STRIKE, // it deals counter attack first before attacker can damage, only if attacker has no first strike.
ATTACK_FULL_COUNTER, // means the unit has a counter damage without penalty

Re: Unit Design - unit property sheet

Posted: Fri Sep 21, 2018 5:50 am
by Stratego (dev)
i have added more info on this convertPossibility field
convertPossibility = 0f; // !!! IMPORTANT if unit has any kind of spell/ability button, it needs to have >0 value for this! (read this property as "abilityPossibility") - in AOS: priest property: 0.3 = 30% priest have 30% to convert an other.

Re: Unit Design - unit property sheet

Posted: Thu Oct 04, 2018 3:33 am
by Tankhead
So I want to learn how to do Jsons
And starting from square one I'm just lost :lol:

Keep In mind I have only a mobile device for now

Re: Unit Design - unit property sheet

Posted: Thu Oct 04, 2018 5:43 am
by Stratego (dev)
read tru all topics under modders lounge (also the "under the hood studies" topics) - first: that are about unit property sheets and ask for a few "under the hood studies" in email (zerotouch)

Re: Unit Design - unit property sheet

Posted: Sun Oct 07, 2018 3:34 am
by Tankhead
Copy some samples
Since this is years old don't so of this needs updating

Re: Unit Design - unit property sheet

Posted: Fri Nov 23, 2018 1:19 pm
by Stratego (dev)
I have made a simpliofication on unit property sheet
(learn more here: Unit Design - unit property sheet/visuals)

here
instead of this

Code: Select all

            "imageDefParts":[
               {
                  "cropToRect":{"top": 0,"left":0,"bottom":32,"right":32},
                  "layer":"UNITS",
                  "shiftCol":0,
                  "shiftRow":0,
                  "clickable":true
               }
            ]
you can write this:

Code: Select all

"imageDefShort":"NORMAL_1x1"
also instead of this

Code: Select all

            "imageDefParts":[
               {
	       	                      "cropToRect":{"top":0, "left":0,"bottom":32,"right":32},
	       	                      "layer":"OVERLAPS",
	       	                      "shiftCol":0,
	       	                      "shiftRow":-1,
	       	                      "clickable":false
	       	                   },
	       	                   {
	       	                      "cropToRect":{"top":32,"left":0,"bottom":64,"right":32},
	       	                      "layer":"UNITS",
	       	                      "shiftCol":0,
	       	                      "shiftRow":0,
	       	                      "clickable":true
	                   }
            ]
you can write this

Code: Select all

"imageDefShort":"OVERLAP_1x2"
and we have 4 options currently:
- NORMAL_1x1 for a normal 1x1 tile unit
- OVERLAP_1x2 for a tall unit like a trebuchet, this will overlap the tile above its "foot" tile.
- NORMAL_COL2_2x1 this is for a 1x1 building that shows occupacy so image is 2x1 sized
- OVERLAP_COL2_2x2 this is for a 1x2 building that shows occupacy so image is 2x2 sized

Re: Unit Design - unit property sheet

Posted: Fri Nov 23, 2018 1:55 pm
by Midonik
WHOOOOAAA
Maybe I will finally be able to add units of different sizes to AoG without a hours long struggle.

Re: Unit Design - unit property sheet

Posted: Fri Nov 23, 2018 1:59 pm
by Stratego (dev)
:)

Re: Unit Design - unit property sheet

Posted: Fri Nov 23, 2018 6:51 pm
by Puss_in_Boots
:o

.

.

.

Editing all units to adapt to a simpler way of life.

Re: Unit Design - unit property sheet

Posted: Fri Nov 23, 2018 7:23 pm
by Stratego (dev)
Puss_in_Boots wrote: Fri Nov 23, 2018 6:51 pm :o

.

.

.

Editing all units to adapt to a simpler way of life.
you can do it with a few replaces in multiple files if u use notepad ++ and you can write regexp.

Re: Unit Design - unit property sheet

Posted: Fri Nov 23, 2018 9:30 pm
by Stratego (dev)
here are sample regexp for 32px tile based games (first is search second is replace with):


32 based

"imageDefParts":\[\s*\{\s*"cropToRect":\{\s*"top"\s*:\s*0\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*32\s*,\s*"right"\s*:\s*32\s*\},\s*"layer":"UNITS",\s*"shiftCol":0,\s*"shiftRow":0,\s*"clickable":true\s*\}\s*\]

"imageDefShort":"NORMAL_1x1"

------------------------------------



"imageDefParts":\[\s*\{\s*"cropToRect":\{\s*"top"\s*:\s*0\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*32\s*,\s*"right"\s*:\s*32\s*\},\s*"layer":"OVERLAPS",\s*"shiftCol":0,\s*"shiftRow":-1,\s*"clickable":false\s*\},\s*{\s*"cropToRect":\{\s*"top"\s*:\s*32\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*64\s*,\s*"right"\s*:\s*32\s*\},\s*"layer":"UNITS",\s*"shiftCol":0,\s*"shiftRow":0,\s*"clickable":true\s*\}\s*\]

"imageDefShort":"OVERLAP_1x2"

----------------------------------------


"imageDefParts":\[\s*\{\s*"cropToRect":\{\s*"top"\s*:\s*0\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*32\s*,\s*"right"\s*:\s*64\s*\},\s*"layer":"UNITS",\s*"shiftCol":0,\s*"shiftRow":0,\s*"clickable":true\s*\}\s*\]

"imageDefShort":"NORMAL_COL2_2x1"


------------------------------------


"imageDefParts":\[\s*\{\s*"cropToRect":\{\s*"top"\s*:\s*0\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*32\s*,\s*"right"\s*:\s*64\s*\},\s*"layer":"OVERLAPS",\s*"shiftCol":0,\s*"shiftRow":-1,\s*"clickable":false\s*\},\s*{\s*"cropToRect":\{\s*"top"\s*:\s*32\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*64\s*,\s*"right"\s*:\s*64\s*\},\s*"layer":"UNITS",\s*"shiftCol":0,\s*"shiftRow":0,\s*"clickable":true\s*\}\s*\]

"imageDefShort":"OVERLAP_COL2_2x2"

64 based



"imageDefParts":\[\s*\{\s*"cropToRect":\{\s*"top"\s*:\s*0\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*64\s*,\s*"right"\s*:\s*64\s*\},\s*"layer":"UNITS",\s*"shiftCol":0,\s*"shiftRow":0,\s*"clickable":true\s*\}\s*\]

"imageDefShort":"NORMAL_1x1"

------------------------------------



"imageDefParts":\[\s*\{\s*"cropToRect":\{\s*"top"\s*:\s*0\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*64\s*,\s*"right"\s*:\s*64\s*\},\s*"layer":"OVERLAPS",\s*"shiftCol":0,\s*"shiftRow":-1,\s*"clickable":false\s*\},\s*{\s*"cropToRect":\{\s*"top"\s*:\s*64\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*128\s*,\s*"right"\s*:\s*64\s*\},\s*"layer":"UNITS",\s*"shiftCol":0,\s*"shiftRow":0,\s*"clickable":true\s*\}\s*\]

"imageDefShort":"OVERLAP_1x2"

----------------------------------------


"imageDefParts":\[\s*\{\s*"cropToRect":\{\s*"top"\s*:\s*0\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*64\s*,\s*"right"\s*:\s*128\s*\},\s*"layer":"UNITS",\s*"shiftCol":0,\s*"shiftRow":0,\s*"clickable":true\s*\}\s*\]

"imageDefShort":"NORMAL_COL2_2x1"


------------------------------------


"imageDefParts":\[\s*\{\s*"cropToRect":\{\s*"top"\s*:\s*0\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*64\s*,\s*"right"\s*:\s*128\s*\},\s*"layer":"OVERLAPS",\s*"shiftCol":0,\s*"shiftRow":-1,\s*"clickable":false\s*\},\s*{\s*"cropToRect":\{\s*"top"\s*:\s*64\s*,\s*"left"\s*:\s*0\s*,\s*"bottom"\s*:\s*128\s*,\s*"right"\s*:\s*128\s*\},\s*"layer":"UNITS",\s*"shiftCol":0,\s*"shiftRow":0,\s*"clickable":true\s*\}\s*\]

"imageDefShort":"OVERLAP_COL2_2x2"

Re: Unit Design - unit property sheet

Posted: Fri Dec 14, 2018 2:46 am
by Revolutionary
I know this is off topic. But I can't figure out where to save .json files. Is there a certain folder or spot they are copied? All I can find are .js files and those are in the AI folder. Are those the same thing? This is for age of strategy. Thank you for your time :)