Unit Design - unit property sheet

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

Re: Unit Design - unit property sheet

Post by COOLguy » Sat Nov 07, 2015 6:07 pm

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Thu Dec 24, 2015 3:59 pm

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Thu May 18, 2017 4:48 am

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

"Usable specActions in datasheet" section

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

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Thu Aug 03, 2017 9:21 pm

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Fri Sep 22, 2017 6:01 am

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: 2650
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Re: Unit Design - unit property sheet

Post by Sunrise Samurai » Tue Sep 26, 2017 1:44 am

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.
Currently residing at the local ninja academy. I'm still watching though.

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

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Tue Sep 26, 2017 3:14 am

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Thu Oct 05, 2017 8:37 am

AOF json zip updated

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

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Thu Oct 05, 2017 3:22 pm

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Sat Dec 23, 2017 8:52 pm

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Wed Dec 27, 2017 10:38 pm

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Mon Mar 12, 2018 9:26 pm

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: 4258
Joined: Thu Oct 19, 2017 3:12 am
Location: The Four Point Military Academy.

Re: Unit Design - unit property sheet

Post by General Brave » Mon Mar 12, 2018 9:42 pm

Is there going to be special units?
Wise, Might, Loyalty. Forever stands Warfell.

User avatar
Puss_in_Boots
Posts: 1873
Joined: Fri Apr 21, 2017 1:23 am

Re: Unit Design - unit property sheet

Post by Puss_in_Boots » Mon Mar 12, 2018 10:40 pm

It would be great for AoWW especially with the ideas currently being visited.
RED, WHITE and BLUE!

User avatar
General Brave
Posts: 4258
Joined: Thu Oct 19, 2017 3:12 am
Location: The Four Point Military Academy.

Re: Unit Design - unit property sheet

Post by General Brave » Mon Mar 12, 2018 10:48 pm

We can have the Gustav.
Wise, Might, Loyalty. Forever stands Warfell.

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

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Sat Aug 04, 2018 6:42 am

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Fri Sep 07, 2018 6:06 am

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

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

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Tue Sep 18, 2018 7:13 pm

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Fri Sep 21, 2018 5:50 am

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: 1547
Joined: Fri May 18, 2018 6:46 am
Location: United states, Texas

Re: Unit Design - unit property sheet

Post by Tankhead » Thu Oct 04, 2018 3:33 am

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

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

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Thu Oct 04, 2018 5:43 am

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: 1547
Joined: Fri May 18, 2018 6:46 am
Location: United states, Texas

Re: Unit Design - unit property sheet

Post by Tankhead » Sun Oct 07, 2018 3:34 am

Copy some samples
Since this is years old don't so of this needs updating

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

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Fri Nov 23, 2018 1:19 pm

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

Re: Unit Design - unit property sheet

Post by Midonik » Fri Nov 23, 2018 1:55 pm

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,its sci-fi themed: http://www.androidutils.com/forum/viewforum.php?f=135
All help will be welcome.

Fielderan Crown's Great Hetman
http://www.androidutils.com/forum/viewt ... =66&t=4729

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

Re: Unit Design - unit property sheet

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

:)

User avatar
Puss_in_Boots
Posts: 1873
Joined: Fri Apr 21, 2017 1:23 am

Re: Unit Design - unit property sheet

Post by Puss_in_Boots » Fri Nov 23, 2018 6:51 pm

:o

.

.

.

Editing all units to adapt to a simpler way of life.
RED, WHITE and BLUE!

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

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Fri Nov 23, 2018 7:23 pm

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: 7369
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - unit property sheet

Post by Stratego (dev) » Fri Nov 23, 2018 9:30 pm

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"

Post Reply

Return to “Unit Design”