Sunrise Samurai(AOF)-Unit json 1(json edit, bonuses) PASSED
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Sunrise Samurai(AOF)-Unit json 1(json edit, bonuses) PASSED
The first task was to modify a few bonuses on an AOW unit, here was the json of M7 priest and the bonus list was this to be modified to.
+100% buildings
+100% infantry
+400% Ships_Carrier
+400% battleships
+100% light tanks
+20% medium tanks
(sorry i just saw you are on AOF, the next ones will be on that - however we need to ask Alexander to let you do some since he is very fast on making any jsons if come up to change any )
+100% buildings
+100% infantry
+400% Ships_Carrier
+400% battleships
+100% light tanks
+20% medium tanks
(sorry i just saw you are on AOF, the next ones will be on that - however we need to ask Alexander to let you do some since he is very fast on making any jsons if come up to change any )
- Attachments
-
- unit_us_artillery_m7_priest.json
- (3.95 KiB) Downloaded 132 times
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Daniel Ward - Unit json (AOF orientation)
Alright, modifying the bonus value is easy enough. Had to check out another one to be sure on the use of decimals to define bonuses less than 100%. The problem I'm having is with the light and medium tanks, since I can't be sure if I've got the name right. Attaching what I have so far, but it needs edited with the right names once you tell me how to reference the tanks. Right now I have them as LIGHTTANK and MEDIUMTANK, which I doubt is actually what it needs to be. Don't have any other aow json files to compare.
Including JSON checker link for personal use, rather than have to go hunting for it later. I suggest all other apprentices do the same.
https://jsonformatter.curiousconcept.com
Including JSON checker link for personal use, rather than have to go hunting for it later. I suggest all other apprentices do the same.
https://jsonformatter.curiousconcept.com
- Attachments
-
- unit_us_artillery_m7_priest.json
- (4.1 KiB) Downloaded 125 times
The glorious sun rises again
Re: Daniel Ward - Unit json (AOF orientation)
I wrote: LIGHT_TANK and MEDIUM_TANK but I also dont know if its correct ir not.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Daniel Ward - Unit json (AOF orientation)
Your guess is as good as mine until Daniel chooses to enlighten us. I've poured through everything we've been given, and can't find any lists or examples that includes them. Unfortunately our AoWW database is limited, and no matter where I look I can't seem to access the internal files already in the games. If I could find those, I'd be able to get a lot of information without needing to ask
The glorious sun rises again
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Daniel Ward - Unit json (AOF orientation)
i have posted in FAQ (categories section) the current AOW json file, there you can see the valid AOW categories.
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Daniel Ward - Unit json (AOF orientation)
very good!Sunrise Samurai wrote:Alright, modifying the bonus value is easy enough. Had to check out another one to be sure on the use of decimals to define bonuses less than 100%. The problem I'm having is with the light and medium tanks, since I can't be sure if I've got the name right. Attaching what I have so far, but it needs edited with the right names once you tell me how to reference the tanks. Right now I have them as LIGHTTANK and MEDIUMTANK, which I doubt is actually what it needs to be. Don't have any other aow json files to compare.
Including JSON checker link for personal use, rather than have to go hunting for it later. I suggest all other apprentices do the same.
https://jsonformatter.curiousconcept.com
- you need to use category name that is valid for AOw, so i have posted the current in the FAQ section - check them and use those,
- after that your json seems ok,
- so i will compile it in and the app might tell me if there is any other problem.
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Daniel Ward/Sunrise Samurai - Unit json (AOF orientation
.....duh. I should have guessed from the ships how to format it. Well, fixed that. How's this?
- Attachments
-
- unit_us_artillery_m7_priest.json
- (4.11 KiB) Downloaded 126 times
The glorious sun rises again
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Daniel Ward/Sunrise Samurai - Unit json (AOF orientation
good job!
it seems impeccable
...putting in...
it is in the game! without errors! thanks!
it seems impeccable
...putting in...
it is in the game! without errors! thanks!
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Daniel Ward/Sunrise Samurai - Unit json (AOF orientation
I await further instructions, Sensei
The glorious sun rises again
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Daniel Ward/Sunrise Samurai - Unit json (AOF orientation
hai! oss! vakarimas-ka!?
it will be a bit harder:
Make an AOF unit to be json based (from this java code convert it to JSON.
steps:
- find a json based unit wich is similar (some kind of archer) - i searched one for you, rohan archer see attached
- copy the file and name it as *human_archer*
- modify every property so the new json will work as the info you see below
- codename and ID of unit: UNIT_ARCHER = 1;
- unit image name 32_unit_archer.png, 32x32px.
u.costTurn = 2;
u.sight = 7; //visiblity range
u.rangeAttack = 5; //attack range (what maximal range it can attack) (1 means only nearby unit)
u.attackTypeArrow = true; //if arrow than some units have defense against that
u.hpMax = 11; //health points
u.armorPierce = 0; //how big the armor against arrows
u.armorNormal = 0; //how big the armor against normal attack
u.power = 5; // u.power of its attack
u.rangeWalk = 3; // how far it can walk
u.canWalkHill = false;
u.canWalkForest = true;
u.canOccupyBuilding = true;
u.canBeCarried = true;
u.bonusHealing = 1; // if this unit have bonus when it is healed by an other unit. 1,1 means 10% bonus.
u.convertResistance = 0; // victim property: 0.2 = 20% -> if priest has 30% than 30 - 30*0,2 => priest has 26% to convert.
bonus(u, a (U_CHEAP_INFANTRY_MELEE, UNIT_ORNITHOPTER), 0.5f);
u.bestAgainstMeGround = U_ANTI_ARCHER;
u.bestAgainstMeWater = U_SHIP_ATTACK;
u.builders = new int[]{ //is it built in a TC? or in an archery range? or a worker builds it?
UNIT_TC,
UNIT_BUILDING_ARCHERY
};
u.modifiers = new int[]{//"type"-s (TECH) that modifies its properties
EFFECT_POISONED_ARROWS,
};
u.revokerTechs = new int[]{ //"type"-s that revokes this as a buildable unit/tech (eg. a crossbowman upgrade revokes archer from the palette)
TECH_UPGRADE_UNIT_CROSSBOWMAN,
};
u.races = new int[] { // only these races can build this
RacesLoader.RACE_HUMAN
};
it will be a bit harder:
Make an AOF unit to be json based (from this java code convert it to JSON.
steps:
- find a json based unit wich is similar (some kind of archer) - i searched one for you, rohan archer see attached
- copy the file and name it as *human_archer*
- modify every property so the new json will work as the info you see below
- codename and ID of unit: UNIT_ARCHER = 1;
- unit image name 32_unit_archer.png, 32x32px.
u.costTurn = 2;
u.sight = 7; //visiblity range
u.rangeAttack = 5; //attack range (what maximal range it can attack) (1 means only nearby unit)
u.attackTypeArrow = true; //if arrow than some units have defense against that
u.hpMax = 11; //health points
u.armorPierce = 0; //how big the armor against arrows
u.armorNormal = 0; //how big the armor against normal attack
u.power = 5; // u.power of its attack
u.rangeWalk = 3; // how far it can walk
u.canWalkHill = false;
u.canWalkForest = true;
u.canOccupyBuilding = true;
u.canBeCarried = true;
u.bonusHealing = 1; // if this unit have bonus when it is healed by an other unit. 1,1 means 10% bonus.
u.convertResistance = 0; // victim property: 0.2 = 20% -> if priest has 30% than 30 - 30*0,2 => priest has 26% to convert.
bonus(u, a (U_CHEAP_INFANTRY_MELEE, UNIT_ORNITHOPTER), 0.5f);
u.bestAgainstMeGround = U_ANTI_ARCHER;
u.bestAgainstMeWater = U_SHIP_ATTACK;
u.builders = new int[]{ //is it built in a TC? or in an archery range? or a worker builds it?
UNIT_TC,
UNIT_BUILDING_ARCHERY
};
u.modifiers = new int[]{//"type"-s (TECH) that modifies its properties
EFFECT_POISONED_ARROWS,
};
u.revokerTechs = new int[]{ //"type"-s that revokes this as a buildable unit/tech (eg. a crossbowman upgrade revokes archer from the palette)
TECH_UPGRADE_UNIT_CROSSBOWMAN,
};
u.races = new int[] { // only these races can build this
RacesLoader.RACE_HUMAN
};
- Attachments
-
- unit_hum_rohan_archer.json
- (3.65 KiB) Downloaded 119 times
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Daniel Ward/Sunrise Samurai - Unit json (AOF orientation
Hai!
I'll probably get a decent chance to do this tonight (about 7 hours from now). You weren't kidding when you said a bit harder I'm going from editing a little bit of bonuses to making a whole new unit. Do I take it to mean that most AoF units still need to be bumped up to json form?
I'll probably get a decent chance to do this tonight (about 7 hours from now). You weren't kidding when you said a bit harder I'm going from editing a little bit of bonuses to making a whole new unit. Do I take it to mean that most AoF units still need to be bumped up to json form?
The glorious sun rises again
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Daniel Ward/Sunrise Samurai - Unit json (AOF orientation
will be not be THAT hard - you need almost to keep the rohan properties, only a few changes will be.Sunrise Samurai wrote:Hai!
I'll probably get a decent chance to do this tonight (about 7 hours from now). You weren't kidding when you said a bit harder I'm going from editing a little bit of bonuses to making a whole new unit. Do I take it to mean that most AoF units still need to be bumped up to json form?
most AOF units: no, i think the ones inherited from AOS yes, some first few AOF units too, i think approx 50-60 units, not that much
they will be good to practice jsoning, however you 3 will not make all of them - i think only 8-10 jsons per apprentice, we will see how interesting they are .
there are more complex things like spells and effects and "born with" abilities and "area damaging stuff" and such and there are several caster units out of json now to discover.
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
Not sure I got the bonus against ornithopters right. I took a wild guess, since in the game, it has a bonus vs ornithopters, but no other fliers. Checks out as a valid json, so hopefully it's good. Did I miss anything?
- Attachments
-
- unit_human_archer.json
- (3.71 KiB) Downloaded 129 times
The glorious sun rises again
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
thanks!
good!
quick reply, the things i saw in first glance to be fixed
- the image name is not right.
- the unit idString is not right
- the unit id is not right
- the ornithopter is not properly references (it is not a category, but a single unit so it needs a different kind of referencing)
good!
quick reply, the things i saw in first glance to be fixed
- the image name is not right.
- the unit idString is not right
- the unit id is not right
- the ornithopter is not properly references (it is not a category, but a single unit so it needs a different kind of referencing)
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
Fixed image name, unit Id, and unit id string (I hope)
Pretty sure I got the bonus right this time. I copied it right out of elf archer.....which after some comparison, may have been a bit easier for a starting point that's where I figured out some of the rest I did wrong.
Pretty sure I got the bonus right this time. I copied it right out of elf archer.....which after some comparison, may have been a bit easier for a starting point that's where I figured out some of the rest I did wrong.
- Attachments
-
- unit_human_archer.json
- (3.79 KiB) Downloaded 123 times
The glorious sun rises again
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
the unit idString (unitTypeName) is still not right, jsonizing an existing unit you can not change it.
but checking further.
but checking further.
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
ok by observing i see these:
- the unit typename (idString)
- you have not defined where the player can build it.
- the bonus line is not singular (maybe the elf was not either, i will make that too:
this is more readable if we have more bonus lines, and more easily copy+pasteable into other units:
"trnBonusList":[
{"modifier":0.5, "unitList":{"categories":["U_CHEAP_INFANTRY_MELEE"],"unitTypes":["UNIT_ORNITHOPTER"]}}
],
please
- the unit typename (idString)
- you have not defined where the player can build it.
- the bonus line is not singular (maybe the elf was not either, i will make that too:
this is more readable if we have more bonus lines, and more easily copy+pasteable into other units:
"trnBonusList":[
{"modifier":0.5, "unitList":{"categories":["U_CHEAP_INFANTRY_MELEE"],"unitTypes":["UNIT_ORNITHOPTER"]}}
],
please
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
Unit type name should be "UNIT_ARCHER" I assume? And not sure what you mean by not singular? Is what you posted copy/pasteable into the json? It looks like it needs spaces like the rest.
And as for not defining where it's built......oops guess it wouldn't cramp anybody's style too much if they can't make archers right?
I'll fix that when I get more time than my lunch break. 30 minutes isn't enough to do everything I want to do
And as for not defining where it's built......oops guess it wouldn't cramp anybody's style too much if they can't make archers right?
I'll fix that when I get more time than my lunch break. 30 minutes isn't enough to do everything I want to do
The glorious sun rises again
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
yesSunrise Samurai wrote:Unit type name should be "UNIT_ARCHER" I assume?
yes pput it in this form:And not sure what you mean by not singular? Is what you posted copy/pasteable into the json? It looks like it needs spaces like the rest.
"trnBonusList":[
{"modifier":1.5, "unitList":{"categories":["U_CHEAP_INFANTRY_MELEE"],"unitTypes":["UNIT_ORNITHOPTER"]}},
{"modifier":2.5, "unitList":{"categories":["U_CHEAP_INFANTRY_MELEE"],"unitTypes":["UNIT_ORNITHOPTER"]}},
{"modifier":3.5, "unitList":{"categories":["U_CHEAP_INFANTRY_MELEE"],"unitTypes":["UNIT_ORNITHOPTER"]}},
{"modifier":4.5, "unitList":{"categories":["U_CHEAP_INFANTRY_MELEE"],"unitTypes":["UNIT_ORNITHOPTER"]}},
{"modifier":5.5, "unitList":{"categories":["U_CHEAP_INFANTRY_MELEE"],"unitTypes":["UNIT_ORNITHOPTER"]}}
],
one line is one bonus line, (one "modifier" keyword)
yes please put it in.And as for not defining where it's built......oops guess it wouldn't cramp anybody's style too much if they can't make archers right?
ok!I'll fix that when I get more time than my lunch break. 30 minutes isn't enough to do everything I want to do
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
Ok. Should all be fixed now. Surprisingly, the json checker says it's valid, so hopefully it's good.
- Attachments
-
- unit_human_archer.json
- (3.72 KiB) Downloaded 105 times
The glorious sun rises again
-
- Site Admin
- Posts: 15750
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Sunrise Samurai (AOF fan) - Unit json (json edit, bonusl
perfect! PASSED!