Pu55inBoots - Units 1(json edit, bonuslist) PASSED

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.
Post Reply
Stratego (dev)
Site Admin
Posts: 10382
Joined: Fri Apr 25, 2014 9:28 pm

Pu55inBoots - Units 1(json edit, bonuslist) PASSED

Post by Stratego (dev) » Sun Sep 24, 2017 6:45 am

Welcome!

here is your first study lecture :)


change the bonus of flak88 to this:
+300% vehicles and tank killers
+400% bonus on tanks
the latest flak json is in the uloaded json pack under faq.

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Puss_in_Boots » Sun Sep 24, 2017 1:49 pm

Code: Select all

{
   "unitTypeName":"UNIT_GER_AAA_FLAK_88_AT",
   "unitType":327,
   "uiDefinition":{
      "visuals":[
         {
            "imgName":"unit_ger_aa_flak_88at.png",
            "type":"DEFAULT",
            "shiftIndicatorsDown":0,
            "typeExtra":0.0,
            "imgColumns":1,
            "imageDefParts":[
               {
                  "cropToRect":{
                     "top":0,
                     "left":0,
                     "bottom":64,
                     "right":64
                  },
                  "layer":"UNITS",
                  "shiftCol":0,
                  "shiftRow":0,
                  "clickable":true
               }
            ]
         }
      ]
   },
   "unitStatSheet":{
      "unit":{
         "isTechnology":false,
         "costTurn":3,
         "grantorShopItems":null,
         "hpMax":15,
         "power":8,
         "rangeAttack":2,
         "armorPierce":0,
         "armorNormal":0,
         "sight":7,
         "unitSizeCol":1,
         "unitSizeRow":1,
         "isUnderConstruction":false,
         "isFactory":false,
         "isFactoryThatNotAffectsFactoryLimits":false,
         "isOccupiableBuilding":false,
         "isWalkableThrough":true,
         "powerAccuracyPenalty":0.0,
         "powerRange":0,
         "powerRangePenaltyPercent":0,
         "attackTypeBurningRock":true,
         "attackTypeArrow":false,
         "rangeWalk":1,
         "trnWalkTerrain":[
            {
               "terrainType":"TERRAINS_FORESTWALKABLE",
               "modifier":1
            }
         ],
         "convertRange":0,
         "convertResistance":0.0,
         "convertPossibility":0.0,
         "rangeHeal":0,
         "healRate":0,
         "rangeMend":0,
         "mendRate":0,
         "canBuild":false,
         "bonusMendingWhenConstructing":0.0,
         "bonusMending":1.0,
         "bonusHealing":0.0,
         "carryCapacity":0,
         "canBeCarried":true,
         "isCarriedUnitSurvivesIfIDie":false,
         "isCarrierCanCarryUnderConstruction":false,
         "isCarrierHidesCarriedUnits":true,
         "isCarrierLetCarriedUnitsToShoot":false,
         "isCarrierRemovesTerrainDrawbacks":false,
         "maxActionCount":1,
         "canOccupyBuilding":false,
         "canKillForest":false,
         "canFlyAsteroid":false,
         "isStealthUnit":false,
         "canSeeStealthUnits":false,
         "trnWeaponEffects":[
	 	{
	 	   "weaponSlot":"WEAPON_EFFECT_SLOT_SPELLCAST",
	 	   "effDefault":"EFFECT_TRANSFORM_FLAK_AA_OR_AT",
	 	   "effOptions":["EFFECT_TRANSFORM_FLAK_AA_OR_AT"]
	 	}
	],

         "trnRaces":["RACE_AXIS", "RACE_GER"],
         "trnCategories":["U_ARTILLERY_AT_STANDARD", "U_ANTI_TANK", "U_TRANSPORTABLE", "DOC_AA_ARTILLERY"],
         "trnModifiers":null,
         "trnCanNotCarryMe":{

         },
         
         
         "trnSpecUnitActions":["CAN_NOT_COUNTERATTACK"],
         "trnBuilders":null,
         "trnTransformTo1":"TO_FLAK88",
         "trnBonusList":[
		{
		"modifier":2,
		"unitList":{"categories":["U_VEHICLE_NONCOMBAT"]}
		},
		{
		"modifier":4,
		"unitList":{"categories":["U_TANKS"]}
		}            
         ],
         "trnBestAgainstMeWater":{
            "categories":[
               "U_SHIPS"
            ]
         },
         "trnBestAgainstMeGround":{
            "categories":[
               "U_INFANTRY"
            ]
         }
      }
   },
   "soundDefinition":{
      "soundPacks":[
         {"soundEvent":"UNIT_SELECTED","packName":"SOUND_PACK_UNIT_SELECT_GER"},
         {"soundEvent":"UNIT_AFFIRM_MOVE","packName":"SOUND_PACK_UNIT_MOVE_FIXED"},
         {"soundEvent":"UNIT_ATTACK","packName":"SOUND_PACK_UNIT_ATTACK_AA_SHOOT"},
         {"soundEvent":"UNIT_DAMAGE","packName":"SOUND_PACK_UNIT_DAMAGE_FIXED"}         
         ]
   },
   "arrowSpriteDefinition":{
      "arrowSprites":[
         {"arrowType":"ATTACK_FIREBURN","spriteName":"TEXTURE_N_SPRITE_BULLET_TANK"}
         ]
   }
   
}
I did not find out how to turn it into an attachment, but I did not want to waste more time cause the batteries were almost out.
RED, WHITE and BLUE!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Stratego (dev) » Sun Sep 24, 2017 1:55 pm

i see no change in the json, you have not modified the bonus section.

this was earlier, and still it is (i have quickly formatted it to 1 line bonus indentation)
"trnBonusList":[
{"modifier":2,"unitList":{"categories":["U_VEHICLE_NONCOMBAT"]}},
{"modifier":4,"unitList":{"categories":["U_TANKS"]}}
],

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Puss_in_Boots » Sun Sep 24, 2017 1:59 pm

Must've copied the wrong file.
RED, WHITE and BLUE!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Puss_in_Boots » Sun Sep 24, 2017 2:06 pm

Here is the more correct one

Code: Select all

{
   "unitTypeName":"UNIT_GER_AAA_FLAK_88_AT",
   "unitType":327,
   "uiDefinition":{
      "visuals":[
         {
            "imgName":"unit_ger_aa_flak_88at.png",
            "type":"DEFAULT",
            "shiftIndicatorsDown":0,
            "typeExtra":0.0,
            "imgColumns":1,
            "imageDefParts":[
               {
                  "cropToRect":{
                     "top":0,
                     "left":0,
                     "bottom":64,
                     "right":64
                  },
                  "layer":"UNITS",
                  "shiftCol":0,
                  "shiftRow":0,
                  "clickable":true
               }
            ]
         }
      ]
   },
   "unitStatSheet":{
      "unit":{
         "isTechnology":false,
         "costTurn":3,
         "grantorShopItems":null,
         "hpMax":15,
         "power":8,
         "rangeAttack":2,
         "armorPierce":0,
         "armorNormal":0,
         "sight":7,
         "unitSizeCol":1,
         "unitSizeRow":1,
         "isUnderConstruction":false,
         "isFactory":false,
         "isFactoryThatNotAffectsFactoryLimits":false,
         "isOccupiableBuilding":false,
         "isWalkableThrough":true,
         "powerAccuracyPenalty":0.0,
         "powerRange":0,
         "powerRangePenaltyPercent":0,
         "attackTypeBurningRock":true,
         "attackTypeArrow":false,
         "rangeWalk":1,
         "trnWalkTerrain":[
            {
               "terrainType":"TERRAINS_FORESTWALKABLE",
               "modifier":1
            }
         ],
         "convertRange":0,
         "convertResistance":0.0,
         "convertPossibility":0.0,
         "rangeHeal":0,
         "healRate":0,
         "rangeMend":0,
         "mendRate":0,
         "canBuild":false,
         "bonusMendingWhenConstructing":0.0,
         "bonusMending":1.0,
         "bonusHealing":0.0,
         "carryCapacity":0,
         "canBeCarried":true,
         "isCarriedUnitSurvivesIfIDie":false,
         "isCarrierCanCarryUnderConstruction":false,
         "isCarrierHidesCarriedUnits":true,
         "isCarrierLetCarriedUnitsToShoot":false,
         "isCarrierRemovesTerrainDrawbacks":false,
         "maxActionCount":1,
         "canOccupyBuilding":false,
         "canKillForest":false,
         "canFlyAsteroid":false,
         "isStealthUnit":false,
         "canSeeStealthUnits":false,
         "trnWeaponEffects":[
	 	{
	 	   "weaponSlot":"WEAPON_EFFECT_SLOT_SPELLCAST",
	 	   "effDefault":"EFFECT_TRANSFORM_FLAK_AA_OR_AT",
	 	   "effOptions":["EFFECT_TRANSFORM_FLAK_AA_OR_AT"]
	 	}
	],

         "trnRaces":["RACE_AXIS", "RACE_GER"],
         "trnCategories":["U_ARTILLERY_AT_STANDARD", "U_ANTI_TANK", "U_TRANSPORTABLE", "DOC_AA_ARTILLERY"],
         "trnModifiers":null,
         "trnCanNotCarryMe":{

         },
         
         
         "trnSpecUnitActions":["CAN_NOT_COUNTERATTACK"],
         "trnBuilders":null,
         "trnTransformTo1":"TO_FLAK88",
         "trnBonusList":[
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_NONCOMBAT"]}
		},
       { 
       "modifier":3,
       "unitList":{"categories":["U_TANKS_KILLER"]}
       }, 
		{
		"modifier":4,
		"unitList":{"categories":["U_TANKS"]}
		}            
         ],
         "trnBestAgainstMeWater":{
            "categories":[
               "U_SHIPS"
            ]
         },
         "trnBestAgainstMeGround":{
            "categories":[
               "U_INFANTRY"
            ]
         }
      }
   },
   "soundDefinition":{
      "soundPacks":[
         {"soundEvent":"UNIT_SELECTED","packName":"SOUND_PACK_UNIT_SELECT_GER"},
         {"soundEvent":"UNIT_AFFIRM_MOVE","packName":"SOUND_PACK_UNIT_MOVE_FIXED"},
         {"soundEvent":"UNIT_ATTACK","packName":"SOUND_PACK_UNIT_ATTACK_AA_SHOOT"},
         {"soundEvent":"UNIT_DAMAGE","packName":"SOUND_PACK_UNIT_DAMAGE_FIXED"}         
         ]
   },
   "arrowSpriteDefinition":{
      "arrowSprites":[
         {"arrowType":"ATTACK_FIREBURN","spriteName":"TEXTURE_N_SPRITE_BULLET_TANK"}
         ]
   }
   
}
RED, WHITE and BLUE!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Stratego (dev) » Sun Sep 24, 2017 2:15 pm

you can use commas to give more categories:
- "categories":["U_VEHICLE_NONCOMBAT", "some other category", "some other category", "some other category", "some other category"]
- also it was "vehicles" not only the "noncombat vehicles"
- also please try to format the bonuses this way (one bonus value in one line)

"trnBonusList":[
{"modifier":2,"unitList":{"categories":["U_VEHICLE_NONCOMBAT"]}},
{"modifier":4,"unitList":{"categories":["U_TANKS"]}}
],

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Puss_in_Boots » Mon Sep 25, 2017 2:42 am

Every ground vehicle category is in now.

Code: Select all

{
   "unitTypeName":"UNIT_GER_AAA_FLAK_88_AT",
   "unitType":327,
   "uiDefinition":{
      "visuals":[
         {
            "imgName":"unit_ger_aa_flak_88at.png",
            "type":"DEFAULT",
            "shiftIndicatorsDown":0,
            "typeExtra":0.0,
            "imgColumns":1,
            "imageDefParts":[
               {
                  "cropToRect":{
                     "top":0,
                     "left":0,
                     "bottom":64,
                     "right":64
                  },
                  "layer":"UNITS",
                  "shiftCol":0,
                  "shiftRow":0,
                  "clickable":true
               }
            ]
         }
      ]
   },
   "unitStatSheet":{
      "unit":{
         "isTechnology":false,
         "costTurn":3,
         "grantorShopItems":null,
         "hpMax":15,
         "power":8,
         "rangeAttack":2,
         "armorPierce":0,
         "armorNormal":0,
         "sight":7,
         "unitSizeCol":1,
         "unitSizeRow":1,
         "isUnderConstruction":false,
         "isFactory":false,
         "isFactoryThatNotAffectsFactoryLimits":false,
         "isOccupiableBuilding":false,
         "isWalkableThrough":true,
         "powerAccuracyPenalty":0.0,
         "powerRange":0,
         "powerRangePenaltyPercent":0,
         "attackTypeBurningRock":true,
         "attackTypeArrow":false,
         "rangeWalk":1,
         "trnWalkTerrain":[
            {
               "terrainType":"TERRAINS_FORESTWALKABLE",
               "modifier":1
            }
         ],
         "convertRange":0,
         "convertResistance":0.0,
         "convertPossibility":0.0,
         "rangeHeal":0,
         "healRate":0,
         "rangeMend":0,
         "mendRate":0,
         "canBuild":false,
         "bonusMendingWhenConstructing":0.0,
         "bonusMending":1.0,
         "bonusHealing":0.0,
         "carryCapacity":0,
         "canBeCarried":true,
         "isCarriedUnitSurvivesIfIDie":false,
         "isCarrierCanCarryUnderConstruction":false,
         "isCarrierHidesCarriedUnits":true,
         "isCarrierLetCarriedUnitsToShoot":false,
         "isCarrierRemovesTerrainDrawbacks":false,
         "maxActionCount":1,
         "canOccupyBuilding":false,
         "canKillForest":false,
         "canFlyAsteroid":false,
         "isStealthUnit":false,
         "canSeeStealthUnits":false,
         "trnWeaponEffects":[
	 	{
	 	   "weaponSlot":"WEAPON_EFFECT_SLOT_SPELLCAST",
	 	   "effDefault":"EFFECT_TRANSFORM_FLAK_AA_OR_AT",
	 	   "effOptions":["EFFECT_TRANSFORM_FLAK_AA_OR_AT"]
	 	}
	],

         "trnRaces":["RACE_AXIS", "RACE_GER"],
         "trnCategories":["U_ARTILLERY_AT_STANDARD", "U_ANTI_TANK", "U_TRANSPORTABLE", "DOC_AA_ARTILLERY"],
         "trnModifiers":null,
         "trnCanNotCarryMe":{

         },
         
         
         "trnSpecUnitActions":["CAN_NOT_COUNTERATTACK"],
         "trnBuilders":null,
         "trnTransformTo1":"TO_FLAK88",
         "trnBonusList":[
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_NONCOMBAT"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_LIGHT_AA"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_NONCOMBAT"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_LIGHT_ARTILLERY"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_LIGHT_MG"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_HEAVY"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_HEAVY_AA"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_ARTILLERY_AT_SELF_PROPELLED"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_ARTILLERY_AA_SELF_PROPELLED"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_HEAVY_MG"]}
		},
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_NONCOMBAT_TRANSPORT"]}
		},
      {
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE_NONCOMBAT_RECON"]}
       },
       {
		"modifier":3,
		"unitList":{"categories":["U_TANKS_KILLER"]}
		},
		{
		"modifier":4,
		"unitList":{"categories":["U_TANKS"]}
		},            
         ],
         "trnBestAgainstMeWater":{
            "categories":[
               "U_SHIPS"
            ]
         },
         "trnBestAgainstMeGround":{
            "categories":[
               "U_INFANTRY"
            ]
         }
      }
   },
   "soundDefinition":{
      "soundPacks":[
         {"soundEvent":"UNIT_SELECTED","packName":"SOUND_PACK_UNIT_SELECT_GER"},
         {"soundEvent":"UNIT_AFFIRM_MOVE","packName":"SOUND_PACK_UNIT_MOVE_FIXED"},
         {"soundEvent":"UNIT_ATTACK","packName":"SOUND_PACK_UNIT_ATTACK_AA_SHOOT"},
         {"soundEvent":"UNIT_DAMAGE","packName":"SOUND_PACK_UNIT_DAMAGE_FIXED"}         
         ]
   },
   "arrowSpriteDefinition":{
      "arrowSprites":[
         {"arrowType":"ATTACK_FIREBURN","spriteName":"TEXTURE_N_SPRITE_BULLET_TANK"}
         ]
   }
   
}
Including the Self propelled weapons.
RED, WHITE and BLUE!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Stratego (dev) » Mon Sep 25, 2017 5:07 am

good! this is good you did this because i can point on the category hierarchy:

comments:
- you dont need to point on a subcategory if you want ALL vehicles, you can simply write U_VEHICLE, this includes all vehicle subcategories.
- also try the bonuses in the one line form, this way:
{"modifier":3,"unitList":{"categories":["U_VEHICLE_NONCOMBAT"]}},
{"modifier":3,"unitList":{"categories":["U_VEHICLE_LIGHT_AA"]}},
{"modifier":3,"unitList":{"categories":["U_VEHICLE_NONCOMBAT"]}},

- also if you have the same bonus value than you can make list under "categories" like this:
{"modifier":3,"unitList":{"categories":["U_VEHICLE_NONCOMBAT", "ANYOTHERCATEGORY1", "ANYOTHERCATEGORY2", "ANYOTHERCATEGORY3"]}},

please fix, thanks!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Puss_in_Boots » Mon Sep 25, 2017 9:32 pm

Code: Select all

{
   "unitTypeName":"UNIT_GER_AAA_FLAK_88_AT",
   "unitType":327,
   "uiDefinition":{
      "visuals":[
         {
            "imgName":"unit_ger_aa_flak_88at.png",
            "type":"DEFAULT",
            "shiftIndicatorsDown":0,
            "typeExtra":0.0,
            "imgColumns":1,
            "imageDefParts":[
               {
                  "cropToRect":{
                     "top":0,
                     "left":0,
                     "bottom":64,
                     "right":64
                  },
                  "layer":"UNITS",
                  "shiftCol":0,
                  "shiftRow":0,
                  "clickable":true
               }
            ]
         }
      ]
   },
   "unitStatSheet":{
      "unit":{
         "isTechnology":false,
         "costTurn":3,
         "grantorShopItems":null,
         "hpMax":15,
         "power":8,
         "rangeAttack":2,
         "armorPierce":0,
         "armorNormal":0,
         "sight":7,
         "unitSizeCol":1,
         "unitSizeRow":1,
         "isUnderConstruction":false,
         "isFactory":false,
         "isFactoryThatNotAffectsFactoryLimits":false,
         "isOccupiableBuilding":false,
         "isWalkableThrough":true,
         "powerAccuracyPenalty":0.0,
         "powerRange":0,
         "powerRangePenaltyPercent":0,
         "attackTypeBurningRock":true,
         "attackTypeArrow":false,
         "rangeWalk":1,
         "trnWalkTerrain":[
            {
               "terrainType":"TERRAINS_FORESTWALKABLE",
               "modifier":1
            }
         ],
         "convertRange":0,
         "convertResistance":0.0,
         "convertPossibility":0.0,
         "rangeHeal":0,
         "healRate":0,
         "rangeMend":0,
         "mendRate":0,
         "canBuild":false,
         "bonusMendingWhenConstructing":0.0,
         "bonusMending":1.0,
         "bonusHealing":0.0,
         "carryCapacity":0,
         "canBeCarried":true,
         "isCarriedUnitSurvivesIfIDie":false,
         "isCarrierCanCarryUnderConstruction":false,
         "isCarrierHidesCarriedUnits":true,
         "isCarrierLetCarriedUnitsToShoot":false,
         "isCarrierRemovesTerrainDrawbacks":false,
         "maxActionCount":1,
         "canOccupyBuilding":false,
         "canKillForest":false,
         "canFlyAsteroid":false,
         "isStealthUnit":false,
         "canSeeStealthUnits":false,
         "trnWeaponEffects":[
	 	{
	 	   "weaponSlot":"WEAPON_EFFECT_SLOT_SPELLCAST",
	 	   "effDefault":"EFFECT_TRANSFORM_FLAK_AA_OR_AT",
	 	   "effOptions":["EFFECT_TRANSFORM_FLAK_AA_OR_AT"]
	 	}
	],

         "trnRaces":["RACE_AXIS", "RACE_GER"],
         "trnCategories":["U_ARTILLERY_AT_STANDARD", "U_ANTI_TANK", "U_TRANSPORTABLE", "DOC_AA_ARTILLERY"],
         "trnModifiers":null,
         "trnCanNotCarryMe":{

         },
         
         
         "trnSpecUnitActions":["CAN_NOT_COUNTERATTACK"],
         "trnBuilders":null,
         "trnTransformTo1":"TO_FLAK88",
         "trnBonusList":[
		{
		"modifier":3,
		"unitList":{"categories":["U_VEHICLE", "U_TANKS_KILLER"]}
		},
		{
		"modifier":4,
		"unitList":{"categories":["U_TANKS"]}
		}            
         ],
         "trnBestAgainstMeWater":{
            "categories":[
               "U_SHIPS"
            ]
         },
         "trnBestAgainstMeGround":{
            "categories":[
               "U_INFANTRY"
            ]
         }
      }
   },
   "soundDefinition":{
      "soundPacks":[
         {"soundEvent":"UNIT_SELECTED","packName":"SOUND_PACK_UNIT_SELECT_GER"},
         {"soundEvent":"UNIT_AFFIRM_MOVE","packName":"SOUND_PACK_UNIT_MOVE_FIXED"},
         {"soundEvent":"UNIT_ATTACK","packName":"SOUND_PACK_UNIT_ATTACK_AA_SHOOT"},
         {"soundEvent":"UNIT_DAMAGE","packName":"SOUND_PACK_UNIT_DAMAGE_FIXED"}         
         ]
   },
   "arrowSpriteDefinition":{
      "arrowSprites":[
         {"arrowType":"ATTACK_FIREBURN","spriteName":"TEXTURE_N_SPRITE_BULLET_TANK"}
         ]
   }
   
}
Ok I tried that shortcut, is it correct now?
RED, WHITE and BLUE!

User avatar
Sunrise Samurai
Posts: 2650
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Sunrise Samurai » Tue Sep 26, 2017 2:29 am

@puss: to put the json here, just go to upload attachment, then choose file, then find the json you want to upload. Daniel modified the forum a while ago to accept them. Easier to me than pasting it into a code box here at least. As long as Daniel is happy, it doesn't matter either way though.
Currently residing at the local ninja academy. I'm still watching though.

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Stratego (dev) » Tue Sep 26, 2017 4:11 am

yes, better to attach (since the filename also counts)

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Puss_in_Boots » Tue Sep 26, 2017 8:13 pm

Does this work?
Attachments
UNIT_GER_AAA_FLAK_88.json
(2.48 KiB) Downloaded 36 times
RED, WHITE and BLUE!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Stratego (dev) » Tue Sep 26, 2017 8:16 pm

you have removed all linebreaks please dont modify the structure this way, only modify the existing.
also use same filename as was before (also was lowercase)

i could not check json this way.

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Puss_in_Boots » Tue Sep 26, 2017 11:02 pm

Then this one is correct?
Attachments
unit_ger_aaa_flak88.json
(4.12 KiB) Downloaded 28 times
RED, WHITE and BLUE!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Stratego (dev) » Wed Sep 27, 2017 4:49 am

- this is an invalid json.
- bonuses are not in the one-line-form as i suggested in my last post
- also you have not used the list under "categories" as i suggested in my last post - you need to know it for future

thanks!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Puss_in_Boots » Wed Sep 27, 2017 10:35 am

I guess json files don't like changes.

Got more time for this since I woke up very early in the morning.
- I have retyped the name into the AT form of it.
-Done multiple checks to verify the file is valid.

I think this might function well.
Attachments
unit_ger_aaa_flak88_at.json
(4.08 KiB) Downloaded 32 times
RED, WHITE and BLUE!

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Stratego (dev) » Wed Sep 27, 2017 5:58 pm

i am doing it for you, please check the difference:

your version:

Code: Select all

         "trnBonusList":[
		{
		"modifier":3,
		"unitList":{"categories":["U_TANKS_KILLER"]}
		},
       {
       "modifier":3,
       "unitList":{"categories":["U_VEHICLE"]}
       },
		{
		"modifier":4,
		"unitList":{"categories":["U_TANKS"]}
		}            
         ],
my version (that i tried to suggest for you):

Code: Select all

         "trnBonusList":[
           {"modifier":3, "unitList":{"categories":["U_VEHICLE", "U_TANKS_KILLER"]}},
           {"modifier":4, "unitList":{"categories":["U_TANKS"]}}            
         ],
see how nice it is? also i made the 2 lines with same bonus into one line)

---

when i get home i will check the json by compiling and if it is ok than we can move on

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

Re: Pu55inBoots - Units (json edit, bonuslist)

Post by Stratego (dev) » Thu Sep 28, 2017 8:08 am

ok, as compiled in it worked, i set this passed.

Post Reply

Return to “Under the Hood studies”