Midonik - unit json 1(json edit, bonuslist, jsonizing)
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Midonik - unit json 1(json edit, bonuslist, jsonizing)
The first task was to modify a few bonuses on an AOW unit, here was the json of Hummel and the bonus list was this to be modified to.
+100% buildings
+100% infantry
+600% Ships_Carrier
+600% battleships
+100% light tanks
+50% medium tanks
+100% buildings
+100% infantry
+600% Ships_Carrier
+600% battleships
+100% light tanks
+50% medium tanks
- Attachments
-
- unit_ger_artillery_spg_hummel.json
- (3.96 KiB) Downloaded 137 times
Re: Midonik - unit json
Here it is:
https://jsonformatter.curiousconcept.com/
https://jsonformatter.curiousconcept.com/
- Attachments
-
- unit_ger_artillery_spg_hummel-1.json
- (3.97 KiB) Downloaded 118 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
good job!
- you have mistyped the category names, the game dropped an error, you have to COPY+PASTE all referencing names if you dont want to get any errors.
- dont forget to keep the filename (i need to overwrite the original if there is any file update)
- also i have indented a bit the new lines to look nice (this is just for us (you, me, anyone) who change configuration files, to see the configuration easily)
see the fixes attached.
other than that, it is fine! it is in the game in next update.
thanks!
- you have mistyped the category names, the game dropped an error, you have to COPY+PASTE all referencing names if you dont want to get any errors.
- dont forget to keep the filename (i need to overwrite the original if there is any file update)
- also i have indented a bit the new lines to look nice (this is just for us (you, me, anyone) who change configuration files, to see the configuration easily)
see the fixes attached.
other than that, it is fine! it is in the game in next update.
thanks!
- Attachments
-
- unit_ger_artillery_spg_hummel.json
- (3.97 KiB) Downloaded 138 times
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
- Attachments
-
- unit_ru_artillery_SPG_KV2.json
- (3.96 KiB) Downloaded 126 times
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
+ also fix the bonus too for the KV2. thanks.
Re: Midonik - unit json
Should I change buliders from GER_BUD_GUN_FACTORY into RUS_BUD_TANKS_FACTORY or somethink?
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
nice that you have detected it! sure!
Re: Midonik - unit json
Is everythink correct? https://jsonformatter.curiousconcept.com/
- Attachments
-
- unit_ru_artillery_SPG_KV2.json
- (3.97 KiB) Downloaded 118 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
there are mistypings in category names: i advise to use copy+paste to avoid it.
also each bonus can be one row as the original, please make such.
thanks!
also each bonus can be one row as the original, please make such.
thanks!
Re: Midonik - unit json
Ok,but is "RUS" correct,becouse I dont see any russian unit Json to copy it.Stratego (dev) wrote:there are mistypings in category names: i advise to use copy+paste to avoid it.
I dont undenstand.Stratego (dev) wrote: also each bonus can be one row as the original, please make such.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
Re: Midonik - unit json
Oh,wait,you mean in one line?
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
"nations" of AOW are updated in races json FAQ.
nice alignment:
here is a nice alignment, one bonus is one row, so we can see it tru easily:
nice alignment:
here is a nice alignment, one bonus is one row, so we can see it tru easily:
Code: Select all
"trnBonusList":[
{"modifier":1, "unitList":{"categories":["U_BUILDINGS"]}},
{"modifier":1, "unitList":{"categories":["U_INFANTRY"]}},
{"modifier":6, "unitList":{"categories":["U_SHIPS_CARRIER"]}},
{"modifier":6, "unitList":{"categories":["U_SHIPS_BATTLESHIP"]}},
{"modifier":1, "unitList":{"categories":["U_TAN KS_LIGHT"]}},
{"modifier":0.5,"unitList":{"categories":["U_TANKS_MEDIUM"]}}
],
Re: Midonik - unit json
Like that? (Change choosing sound into "RU")
https://jsonformatter.curiousconcept.com/
https://jsonformatter.curiousconcept.com/
- Attachments
-
- unit_ru_artillery_SPG_KV2.json
- (3.94 KiB) Downloaded 123 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
game says you made wrong reference to factory, please check the factory reference name and copy-paste that.
also i made the indentataion as i tried to tell you , see how it looks:
also i made the indentataion as i tried to tell you , see how it looks:
- Attachments
-
- unit_ru_artillery_SPG_KV2.json
- (3.95 KiB) Downloaded 120 times
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
Also nice you have changed sounds to russian too!
(how did u know that it is called same but RU in it? )
(how did u know that it is called same but RU in it? )
Re: Midonik - unit json
I thought its ofcourse that it sounds same but with russian "tag" instand of german,becouse... it makes sense.
Is it good now?
Is it good now?
- Attachments
-
- unit_ru_artillery_SPG_KV2.json
- (3.93 KiB) Downloaded 121 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
checking...
sound: good thoughts - however in future you always need to check the codename of everything and copy paste it - because if you type it yourself, you can have several errors so the game will not start. but this time it was a good guess!
sound: good thoughts - however in future you always need to check the codename of everything and copy paste it - because if you type it yourself, you can have several errors so the game will not start. but this time it was a good guess!
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
i see that you have not checked my indentation suggestions , so i am fixing in yours again - please check it.
also iam compiling it we will see if everything is ok.
also iam compiling it we will see if everything is ok.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
this was your indentation (top) and mine (bottom) with one-row-alignment:
Code: Select all
"trnBonusList":[
{"modifier":1, "unitList":
{"categories":["U_BUILDINGS"]}},
{"modifier":1, "unitList":
{"categories":["U_INFANTRY"]}},
{"modifier":6, "unitList":
{"categories":["U_SHIPS_CARRIER"]}},
{"modifier":6, "unitList":
{"categories":["U_SHIPS_BATTLESHIP"]}},
{"modifier":1, "unitList":
{"categories":["U_TANKS_LIGHT"]}},
{"modifier":0.5, "unitList":
{"categories":["U_TANKS_MEDIUM"]}}
],
"trnBonusList":[
{"modifier":1, "unitList": {"categories":["U_BUILDINGS"]}},
{"modifier":1, "unitList": {"categories":["U_INFANTRY"]}},
{"modifier":6, "unitList": {"categories":["U_SHIPS_CARRIER"]}},
{"modifier":6, "unitList": {"categories":["U_SHIPS_BATTLESHIP"]}},
{"modifier":1, "unitList": {"categories":["U_TANKS_LIGHT"]}},
{"modifier":0.5, "unitList": {"categories":["U_TANKS_MEDIUM"]}}
],
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json
game dropped error: on BLD_RU_TANK_FACTORY
the good identificator is this: UNIT_RU_BLD_TANK_FACTORY
You need to always check the name (i have uploaded all json files in a post in FAQ) and copy+paste it.
i have fixed it now, you can see here attached the final json.
thanks!
the good identificator is this: UNIT_RU_BLD_TANK_FACTORY
You need to always check the name (i have uploaded all json files in a post in FAQ) and copy+paste it.
i have fixed it now, you can see here attached the final json.
thanks!
- Attachments
-
- unit_ru_artillery_SPG_KV2.json
- (3.96 KiB) Downloaded 106 times
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json (json edit, bonuslist)
next is a jsonizeing
turn this AOF unit to json based
- find a similar and make the json based on that.
- id: UNIT_BROAD_SWORDMAN = 66;
- image: see in bottom section
else if (u.type == UNIT_BROAD_SWORDMAN){
u.fillTexts(c, "UNIT_BROAD_SWORDMAN");
u.costTurn = 2;
u.sight = 4; //visiblity range
u.hpMax = 21; //health points
u.armorPierce = 0; //how big the armor against arrows
u.armorNormal = 0; //how big the armor against normal attack
u.power = 11; // 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_BUILDINGS, UNIT_BATTERING_RAM), 1f);
bonusG(u,
a (U_BUILDINGS, UNIT_BATTERING_RAM), 1f,
new Gb(U_FORTIFIED_BUILDINGS, 2f),
new Gb(U_MEGA_BUILDINGS, 7f)
);
u.bestAgainstMeGround = U_ANTI_INFANTRY;
u.bestAgainstMeWater = U_SHIP_ATTACK;
u.modifiers = new int[]{//"type"-s (TECH) that modifies its properties
TECH_ARMOR_INFANTRY_LV1,
TECH_ARMOR_INFANTRY_LV2,
TECH_SWORD_LV1,
TECH_SWORD_LV2,
EFFECT_POISONED_ARROWS,
};
u.builders = new int[]{ //is it built in a TC? or in an archery range? or a worker builds it?
UNIT_TC,
UNIT_BUILDING_BARRACKS
};
u.requires = new int[]{//"type"-s that is required (eg. other techonolgies) to have/build this one
TECH_UPGRADE_UNIT_BROAD_SWORDSMAN
};
u.races = new int[] { // only these races can build this
RacesLoader.RACE_HUMAN
};
}//typeif
public static class UiUnitBroadSwordMan extends Ui.UiUnit{
//The ones you have to change when creating new Unit type
public static String IMG_NAME = "32_unit_broad_swordman.png";
@Override
public Unit getNewUnitInstance(WorldMap map){return new Unit(map, Units.UNIT_BROAD_SWORDMAN);}
//the ones need no change when creating unit types
public static TextureHolder imgBuildable;
@Override
public TiledTextureRegion getImgTexture(EColors color){return imgBuildable.get(color);}
@Override
public String getImgName(){return IMG_NAME;}
@Override
public Integer getSoundPack(ESoundEvents event){
Integer result = null;
switch (event) {
case UNIT_SELECTED: result = SoundsDefLoader.SOUND_PACK_UNIT_SELECT_LAND_UNIT; break;
case UNIT_AFFIRM_MOVE: result = SoundsDefLoader.SOUND_PACK_UNIT_AFFIRM_LAND_UNIT; break;
case UNIT_ATTACK: result = SoundsDefLoader.SOUND_PACK_UNIT_ATTACK_SWING; break;
case UNIT_DAMAGE: result = SoundsDefLoader.SOUND_PACK_UNIT_DAMAGED_HUMAN; break;
}
return result;
}
public UiUnitBroadSwordMan() {
super();
}//
}//UiUnitBroadSwordMan
turn this AOF unit to json based
- find a similar and make the json based on that.
- id: UNIT_BROAD_SWORDMAN = 66;
- image: see in bottom section
else if (u.type == UNIT_BROAD_SWORDMAN){
u.fillTexts(c, "UNIT_BROAD_SWORDMAN");
u.costTurn = 2;
u.sight = 4; //visiblity range
u.hpMax = 21; //health points
u.armorPierce = 0; //how big the armor against arrows
u.armorNormal = 0; //how big the armor against normal attack
u.power = 11; // 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_BUILDINGS, UNIT_BATTERING_RAM), 1f);
bonusG(u,
a (U_BUILDINGS, UNIT_BATTERING_RAM), 1f,
new Gb(U_FORTIFIED_BUILDINGS, 2f),
new Gb(U_MEGA_BUILDINGS, 7f)
);
u.bestAgainstMeGround = U_ANTI_INFANTRY;
u.bestAgainstMeWater = U_SHIP_ATTACK;
u.modifiers = new int[]{//"type"-s (TECH) that modifies its properties
TECH_ARMOR_INFANTRY_LV1,
TECH_ARMOR_INFANTRY_LV2,
TECH_SWORD_LV1,
TECH_SWORD_LV2,
EFFECT_POISONED_ARROWS,
};
u.builders = new int[]{ //is it built in a TC? or in an archery range? or a worker builds it?
UNIT_TC,
UNIT_BUILDING_BARRACKS
};
u.requires = new int[]{//"type"-s that is required (eg. other techonolgies) to have/build this one
TECH_UPGRADE_UNIT_BROAD_SWORDSMAN
};
u.races = new int[] { // only these races can build this
RacesLoader.RACE_HUMAN
};
}//typeif
public static class UiUnitBroadSwordMan extends Ui.UiUnit{
//The ones you have to change when creating new Unit type
public static String IMG_NAME = "32_unit_broad_swordman.png";
@Override
public Unit getNewUnitInstance(WorldMap map){return new Unit(map, Units.UNIT_BROAD_SWORDMAN);}
//the ones need no change when creating unit types
public static TextureHolder imgBuildable;
@Override
public TiledTextureRegion getImgTexture(EColors color){return imgBuildable.get(color);}
@Override
public String getImgName(){return IMG_NAME;}
@Override
public Integer getSoundPack(ESoundEvents event){
Integer result = null;
switch (event) {
case UNIT_SELECTED: result = SoundsDefLoader.SOUND_PACK_UNIT_SELECT_LAND_UNIT; break;
case UNIT_AFFIRM_MOVE: result = SoundsDefLoader.SOUND_PACK_UNIT_AFFIRM_LAND_UNIT; break;
case UNIT_ATTACK: result = SoundsDefLoader.SOUND_PACK_UNIT_ATTACK_SWING; break;
case UNIT_DAMAGE: result = SoundsDefLoader.SOUND_PACK_UNIT_DAMAGED_HUMAN; break;
}
return result;
}
public UiUnitBroadSwordMan() {
super();
}//
}//UiUnitBroadSwordMan
Re: Midonik - unit json (json edit, bonuslist)
Somethink is probably uncorrect,but I dont know what. I used halabardier,becouse I didnt find swordman in json.
https://jsonformatter.curiousconcept.com/
https://jsonformatter.curiousconcept.com/
- Attachments
-
- unit_human_halberdier.json
- (4.15 KiB) Downloaded 144 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json (json edit, bonuslist)
ok! good! checking!
comments:
- filename does not fit
- unit typename has an extra space chartacter (will not work this way)
- the image definition is not right, it is for a 64x32 (tall) unit.
- i have not seend the "requires" meaning it can only be buildt if a tech is invented.
- 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)
(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)
other than these: good job!
please fix these.
thanks!
comments:
- filename does not fit
- unit typename has an extra space chartacter (will not work this way)
- the image definition is not right, it is for a 64x32 (tall) unit.
- i have not seend the "requires" meaning it can only be buildt if a tech is invented.
- 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)
(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)
other than these: good job!
please fix these.
thanks!
Re: Midonik - unit json (json edit, bonuslist)
How to change file name?
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json (json edit, bonuslist)
it is still halberdier , but you do broad swordsman.
Re: Midonik - unit json (json edit, bonuslist)
I know,but I dint know how to change it.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
Re: Midonik - unit json (json edit, bonuslist)
Is anythink fixed? Also it have "requires". https://jsonformatter.curiousconcept.com/
- Attachments
-
- unit_human_halberdier.json
- (4.13 KiB) Downloaded 98 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json (json edit, bonuslist)
this is the same file as before.
rename: you need to find a way to rename the file, idk what file manager you use, but on pc it is right click and "rename"
rename: you need to find a way to rename the file, idk what file manager you use, but on pc it is right click and "rename"
Re: Midonik - unit json (json edit, bonuslist)
Renemed
- Attachments
-
- unit_human_broad_swordman.json
- (4.13 KiB) Downloaded 108 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
-
- Site Admin
- Posts: 15734
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Midonik - unit json (json edit, bonuslist)
ok, please check all my suggestions and fix all - thanks! (at least the unit typename was still there - not checked further)