Page 1 of 1
Samuel - unit json 1 (json edit, bonuslist) PASSED
Posted: Sat Sep 23, 2017 4:41 pm
by Stratego (dev)
you first task is similar, making bonus changes in AOW
10.5 cm leFH 18
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 5:11 pm
by samuelch
Here it is.
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 5:18 pm
by Stratego (dev)
seems good in format, but you missed 2 other bonus lines (check the xls in AOW section for the needed bonus lines)
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 5:28 pm
by samuelch
Added light and med tanks.
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 5:56 pm
by Stratego (dev)
impeccable!
indentation is also good!
game dropped no errors.
good job!
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 6:33 pm
by samuelch
Thanks.
I make these. Can you check if it's working?
Garder Imperiale (napoleonic line infantry)
Abilities: Musket shot (can be used 1 time every 2 turns, damage 12 HP to enemy only).
Sounds not available.
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 6:34 pm
by samuelch
Placeholder image of chu kon nu.
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 6:35 pm
by Stratego (dev)
i answered in email - is it for a new alternative?
please dont run ahead, there are many things you need to learn, however nice try figuring out without informations!

(but you made thinks wrong way - i wrote in email detailly)
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 6:40 pm
by Stratego (dev)
here is your next:
turn this AOF unit to json based
- find a similar and make the json basd on that.
- id: UNIT_SWORDMAN = 7;
- image: 32_unit_swordman.png 32x32
u.costTurn = 2;
u.sight = 4; //visiblity range
u.hpMax = 18; //health points
u.armorPierce = 0; //how big the armor against arrows
u.armorNormal = 0; //how big the armor against normal attack
u.power = 8; // 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.
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.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_BROAD_SWORDSMAN,
};
u.races = new int[] { // only these races can build this
RacesLoader.RACE_HUMAN
};
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 6:59 pm
by samuelch
Swordman.
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:08 pm
by Stratego (dev)
you are quick!
here are my commetns:
- you can not rename the unitIDString , it must be "UNIT_SWORDMAN" (because it is an existing unit in game, if you design a new unit you can name it anyhow you want)
- you have missed to modify this: trnRevokerTechs (from this i see you took the pikeman - good choice)
at first glance i dont see other problems - nicex job! (but compiling and after testing it might bring more)
please fix these little and i willcompile
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:11 pm
by samuelch
Changed.
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:19 pm
by Stratego (dev)
compile said 2 errors:
- soundpack SOUND_PACK_UNIT_SELECT_HUMAN does not exists
- invalid category name: UNIT_BATTERING_RAM
can you find out the solution? tell me if any info missing to do that.
(you will get similar errors if you do it on your device)
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:24 pm
by samuelch
Fix
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:30 pm
by Stratego (dev)
good job!
it is uos 10 and last task here to check it in game how it is working
(if you make a new unit you need to do the same - there can be mistyping on stats and things that you only see on testing)
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:33 pm
by samuelch
I need to test it?
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:38 pm
by Stratego (dev)
samuelch wrote:I need to test it?
sure! you can only know if it works if you test it you can build it, you can read good values on statsheet that you desired (only a few turns in a random game, maybe until a clash, eg. poisoning will come out on a clash with an other unit)
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:41 pm
by samuelch
I don't have aos dev version.
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:46 pm
by Stratego (dev)
it was AOF
you dnt have it with dev version?
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:48 pm
by samuelch
No AoF to.
Re: Samuel - unit json
Posted: Sat Sep 23, 2017 7:50 pm
by Stratego (dev)
ok ,than skip this, i tested it for you.
Re: Samuel - unit json (json edit, bonuslist) PASSED
Posted: Sat Sep 23, 2017 8:04 pm
by Stratego (dev)
the first passed lecture
