Midonik - unit json 1(json edit, bonuslist, jsonizing)

Here i will list the apprentices and their learning tasks, so others also can follow how it goes.
Please DONT POST HERE any solutions on the given task earlier than the apprentice, you can ask questions from him tough.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json (json edit, bonuslist)

Post by Midonik »

Attachments
unit_human_broad_swordman.json
(4.13 KiB) Downloaded 130 times
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: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

comments:
- filename does not fit - this is ok
- unit typename has an extra space chartacter (will not work this way) - this is not yet fixed
- the image definition is not right, it is for a 64x32 (tall) unit. - this is still not right, check an existing unit that is 32x32
- i have not seend the "requires" meaning it can only be buildt if a tech is invented. - you put it in, but here again a trailing space - are u using microsoft Word? do not use Word that puts extra space everywhere..
- bonuslist U_BULDINGS_UNIT_BATTERING_RAM this is surely a non existant category name :), please use names that are in the categories list (see categories FAQ) - this is not right, category names needs tobe under "categories" unti types needs to be undet unitTypes list. check an other json that has both.

(generally true: all CAPITAL lettered ID or StringID or typename is an important ID that must be exactly spelled - so use only copy+paste to use them) - this is important, extra spaces are also not allowed.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json (json edit, bonuslist)

Post by Midonik »

I think I fixed some thinks... Also,what category name in bonus list should it be? Unit_siege_machnies?
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: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

no, you need to specify the same: not by category but by unit type: the battering ram.

there are many samples how to do it, search the library - or you can check the "Unit Design - unit property sheet" there are also samples that has different bonus settings.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json (json edit, bonuslist)

Post by Midonik »

Attachments
unit_human_broad_swordman.json
(4.13 KiB) Downloaded 139 times
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: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

not good, but i will show you.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

here,
- the blue ones defines category reference for the given "modifier" value
- the red one defines unit type reference for the given "modifier" value

"trnBonusList":[
{"modifier":1, "unitList":{"categories":["U_OTHER_BUILDINGS"],"unitTypes":["UNIT_BATTERING_RAM"]}},
{"modifier":2, "unitList":{"categories":["U_MEGA_BUILDINGS"]}},
{"modifier":7, "unitList":{"categories":["U_FORTIFIED_BUILDINGS"]}}
],

use this as bonus list.

also please fix the rest (eg. in json the unit typename still has an extra SPACE character.)
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json (json edit, bonuslist)

Post by Midonik »

Attachments
unit_human_broad_swordman.json
(4.17 KiB) Downloaded 139 times
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: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

still not right...
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

Hi, are u working on it?
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json (json edit, bonuslist)

Post by Midonik »

I take a small break. I fixed extra space thought. What else?
Attachments
unit_human_broad_swordman.json
(4.17 KiB) Downloaded 141 times
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: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

Please check back all my comments and fix all, and post result after all is fixed. Thanks.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json (json edit, bonuslist)

Post by Midonik »

Did you look at last one? Everythink is good there thought.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json (json edit, bonuslist)

Post by Midonik »

Is it ok?
Attachments
unit_human_broad_swordman.json
(4.17 KiB) Downloaded 140 times
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: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

the image is still not right.
check a 32x32 unit and use that.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

How is it going?
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - unit json (json edit, bonuslist)

Post by Stratego (dev) »

Hi, are are you about finish this lecture?
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json (json edit, bonuslist)

Post by Midonik »

I'll do that later,xmas mayby.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json 1(json edit, bonuslist)

Post by Midonik »

Something is better,it have to!
Attachments
unit_human_broad_swordman.json
(4.16 KiB) Downloaded 130 times
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: Midonik - unit json 1(json edit, bonuslist)

Post by Stratego (dev) »

seems almost good
- minor thing: "convertPossibility": should be set to 0 not null
- the image size definition is still for a 64px unit, we need no overlapping part, you need to find a 32px unit definition and use that as reference.

this part:

Code: Select all

"visuals":[
      
      {
                  "imgName":"32_unit_broad_swordman.png",
                  "type":"DEFAULT",
                  "shiftIndicatorsDown":0,
                  "typeExtra":0.0,
                  "imgColumns":1,
                  "imageDefParts":[
      	                   {
      	                      "cropToRect":{"top":0, "left":0,"bottom":32,"right":32},
      	                      "layer":"OVERLAPS",
      	                      "shiftCol":0,
      	                      "shiftRow":0,
      	                      "clickable":false
      	                   },
    	                   {
      	                      "cropToRect":{"top":0,"left":0,"bottom":32,"right":32},
      	                      "layer":"UNITS",
      	                      "shiftCol":0,
      	                      "shiftRow":0,
      	                      "clickable":true
      	                   }
                  ]
         }
      
         
         ]
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json 1(json edit, bonuslist)

Post by Midonik »

Daniel?
Attachments
unit_human_broad_swordman.json
(4.16 KiB) Downloaded 118 times
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: Midonik - unit json 1(json edit, bonuslist)

Post by Stratego (dev) »

these is still double section.
please check a 32x32 unit, do u have a sample of such?
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json 1(json edit, bonuslist)

Post by Midonik »

Yes.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json 1(json edit, bonuslist)

Post by Midonik »

Oh,I didnt notice. Is it correct now,Daniel?
Attachments
unit_human_broad_swordman.json
(3.93 KiB) Downloaded 125 times
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: Midonik - unit json 1(json edit, bonuslist)

Post by Stratego (dev) »

almost!

you left an open-close tag there, that will cause error.

i suggest replacing the whole "visuals":[...] section with a 32px sample.
and always do this, dont try to make it manually - i wouldnt be able to by heart.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json 1(json edit, bonuslist)

Post by Midonik »

Daniel? I think its good.
Attachments
unit_human_broad_swordman.json
(3.76 KiB) Downloaded 113 times
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: Midonik - unit json 1(json edit, bonuslist)

Post by Stratego (dev) »

seems good! will chk in game too
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - unit json 1(json edit, bonuslist)

Post by Midonik »

Does it work? And whats next?
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: Midonik - unit json 1(json edit, bonuslist)

Post by Stratego (dev) »

oh, i forgot to chk in game .
you can work on the sounds file while i check. thanks
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - unit json 1(json edit, bonuslist, jsonizing)

Post by Stratego (dev) »

there were these errors that i have fixed:
- EFFECT_POISONED_ARROWS naming was wrong with an extra space: "EFFECT _POISONED_ARROWS"
- image name was wrong with an extra space: "32_unit_broad_swordman.png "
- the tech reference was mistyped: TECH_UPGRADE_UNIT_BROAD_SWORDMAN instead of TECH_UPGRADE_UNIT_BROAD_SWORDSMAN - please use "copy+paste" never write references manually

all is fixed now, and in game - thanks!

also here is the fixed json
Attachments
unit_human_broad_swordman.json
(3.77 KiB) Downloaded 97 times
Post Reply

Return to “Under the Hood studies”