Unit Design - unit property sheet

User avatar
COOLguy
Posts: 4005
Joined: Sat Jul 12, 2014 2:58 am
Location: Nenuial, Arnor

Re: Unit Design - unit property sheet

Post 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.
Thanks!
Josh
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) »

updated: added spec actions, and the new actions to the end about bypassing armors.

"Usable specActions in datasheet" section
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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)
},
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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)
User avatar
Sunrise Samurai
Posts: 2678
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Re: Unit Design - unit property sheet

Post 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.
The glorious sun rises again
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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 :)
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) »

AOF json zip updated
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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)
User avatar
General Brave
Posts: 4662
Joined: Thu Oct 19, 2017 3:12 am
Location: The Four Point Military Academy.

Re: Unit Design - unit property sheet

Post by General Brave »

Is there going to be special units?
Wise, Might, Loyalty. Forever stands Warfell.
User avatar
Puss_in_Boots
Posts: 3206
Joined: Fri Apr 21, 2017 1:23 am
Location: New Jersey

Re: Unit Design - unit property sheet

Post by Puss_in_Boots »

It would be great for AoWW especially with the ideas currently being visited.
OLÉ
User avatar
General Brave
Posts: 4662
Joined: Thu Oct 19, 2017 3:12 am
Location: The Four Point Military Academy.

Re: Unit Design - unit property sheet

Post by General Brave »

We can have the Gustav.
Wise, Might, Loyalty. Forever stands Warfell.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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)
	       },
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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"]}
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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.
User avatar
Tankhead
Posts: 1838
Joined: Fri May 18, 2018 6:46 am
Location: United states, Texas

Re: Unit Design - unit property sheet

Post 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
"The smallest pebble was once the biggest stone, the biggest stone was once bigger"
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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)
User avatar
Tankhead
Posts: 1838
Joined: Fri May 18, 2018 6:46 am
Location: United states, Texas

Re: Unit Design - unit property sheet

Post by Tankhead »

Copy some samples
Since this is years old don't so of this needs updating
"The smallest pebble was once the biggest stone, the biggest stone was once bigger"
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Unit Design - unit property sheet

Post by Midonik »

WHOOOOAAA
Maybe I will finally be able to add units of different sizes to AoG without a hours long struggle.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) »

:)
User avatar
Puss_in_Boots
Posts: 3206
Joined: Fri Apr 21, 2017 1:23 am
Location: New Jersey

Re: Unit Design - unit property sheet

Post by Puss_in_Boots »

:o

.

.

.

Editing all units to adapt to a simpler way of life.
OLÉ
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post 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"
Revolutionary
Posts: 2
Joined: Tue Dec 11, 2018 4:57 am

Re: Unit Design - unit property sheet

Post 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 :)
Post Reply

Return to “Unit Design”