Unit docs with Wikipedia images

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

Unit docs with Wikipedia images

Post by Stratego (dev) » Sun Nov 24, 2019 12:20 pm

i made this to superfortress, i think it looks cool:
Image

it has link to wiki page, and an image from same pade and a partial texting from wiki page.

How to do?
Texting is the same as earlier:

Code: Select all

    <string name="UNIT_TXT_US_PLANE_B29">The Boeing B-29 Superfortress is heavy bomber designed flown primarily by the United States during World War II and the Korean War. The Superfortress was designed for high-altitude strategic bombing but also excelled in low-altitude night incendiary bombing, and in dropping naval mines. B-29s also dropped the atomic bombs on Hiroshima and Nagasaki. </string>
Only in unit json you need to give a link to an image and a wiki page like this:

Code: Select all

         "urlImage":"https://upload.wikimedia.org/wikipedia/commons/d/d3/B-29_in_flight.jpg",
         "urlDoc":"https://en.wikipedia.org/wiki/Boeing_B-29_Superfortress"
full json sample:

Code: Select all

{
   "unitTypeName":"UNIT_US_PLANE_B29",
   "unitType":179,
   "uiDefinition":{
      "visuals":[
      
              {
                  "imgName":"unit_us_plane_b29.png", 
                  "type":"DEFAULT",
                  "shiftIndicatorsDown":60,
                  "typeExtra":0.0,
                  "imgColumns":1,
                  "imageDefParts":[
                      {"cropToRect":{"top":0, "left":0, "bottom":64, "right":73},"layer":"OVERLAPS","shiftCol":0,"shiftRow":-1,"clickable":false},
      		            {"cropToRect":{"top":64, "left":0, "bottom":128, "right":73},"layer":"UNITS","shiftCol":0,"shiftRow":0,"clickable":true}
                  ]
               } 

      
         
      ]
   },
   "unitStatSheet":{
      "unit":{
         "isTechnology":false,
         "costTurn":10,
         "grantorShopItems":null,
         "hpMax":104,
         "power":25,
         "rangeAttack":1,
         "armorPierce":0,
         "armorNormal":0,
         "sight":6,
         "unitSizeCol":1,
         "unitSizeRow":1,
         "isUnderConstruction":false,
         "isFactory":false,
         "isFactoryThatNotAffectsFactoryLimits":false,
         "isOccupiableBuilding":false,
         "isWalkableThrough":true,
         "powerAccuracyPenalty":0.0,
         "powerRange":1,
         "powerRangePenaltyPercent":50,
         "attackTypeBurningRock":false,
         "attackTypeArrow":true,
         "rangeWalk":8,
         "trnWalkTerrain":[
            {
               "terrainType":"TERRAINS_FLYABLE",
               "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,
          
          
 
          
         "trnWeaponEffects":null,
         "trnRaces":["RACE_ALLIES", "RACE_US"],
         "trnCategories":["U_PLANES_BOMBER", "U_ANTI_TANK", "DOC_PLANES"],
         "trnModifiers":null,
         "trnSpecUnitActions":["CAN_NOT_COUNTERATTACK", "CAN_FLY","CAN_BE_PASSED_BY_ENEMY"],
         "trnCanNotCarryMe":{ "categories":["U_GROUND_BUILDINGS", "U_WATER_BUILDINGS"], "excludeUnitTypes":["UNIT_US_BLD_AIRPORT", "UNIT_GER_BLD_AIRPORT"]},
         "trnRequires":{"unitTypes":["TECH_AGE_END"]},        
         "trnBuilders":{"unitTypes":["UNIT_US_BLD_AIRPORT"]},
         "trnBonusList":[
            {"modifier":1.5,"unitList":{"categories":["U_INFANTRY"]}},
            {"modifier":17,"unitList":{"categories":["U_TANKS"]}},
            {"modifier":17,"unitList":{"categories":["U_VEHICLE"]}},            
            {"modifier":17,"unitList":{"categories":["U_ARTILLERY"]}},
            {"modifier":17,"unitList":{"categories":["U_BUILDINGS"]}},
            {"modifier":20,"unitList":{"categories":["U_GROUND_BUILDING_MEGA"]}},
            {"modifier":17,"unitList":{"categories":["U_SHIPS"]}},
            {"modifier":17,"unitList":{"categories":["U_SHIPS_CARRIER"]}}           
         ],
         "trnBestAgainstMeWater":{"categories":["U_SHIPS"]},
         "trnBestAgainstMeGround":{"categories":["U_ANTI_AIR"]},
         "urlImage":"https://upload.wikimedia.org/wikipedia/commons/d/d3/B-29_in_flight.jpg",
         "urlDoc":"https://en.wikipedia.org/wiki/Boeing_B-29_Superfortress"
      }
   },
   "soundDefinition":{
      "soundPacks":[
         {"soundEvent":"UNIT_SELECTED","packName":"SOUND_PACK_UNIT_SELECT_US"},
         {"soundEvent":"UNIT_AFFIRM_MOVE","packName":"SOUND_PACK_UNIT_MOVE_PLANE_BOMBER"},
         {"soundEvent":"UNIT_ATTACK","packName":"SOUND_PACK_UNIT_ATTACK_PLANE_SHOOT"},
         {"soundEvent":"UNIT_DAMAGE","packName":"SOUND_PACK_UNIT_DAMAGE_PLANE"}         
         ]
   },
   "arrowSpriteDefinition":{
      "arrowSprites":[
         {"arrowType":"ATTACK_ARROW","spriteName":"TEXTURE_N_SPRITE_BULLET_TANK"}
         ]
   }
   
}

If anyone would like to help making all planes/ships/tanks to look like this (US M2 tank is also looks this way long ago) than please help me!

thanks!

daniel

User avatar
Belfry777
Posts: 1658
Joined: Tue Oct 17, 2017 2:34 am
Location: AZ

Re: Unit docs with Wikipedia images

Post by Belfry777 » Mon Nov 25, 2019 1:04 am

I am willing to be of service. And yes I think it looks very nice. But will only "Big units" get this special doc or all of them?
A thousand may fall at your side,
And ten thousand at your right hand;
But it shall not come near you.
Only with your eyes shall you look,
And see the reward of the wicked.

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

Re: Unit docs with Wikipedia images

Post by Stratego (dev) » Mon Nov 25, 2019 11:03 am

all units that has wikipedia page and image on it.

Awesome! please email me so i can send you a pack of unit jsons to look for wikipedia page + image.

thank you so much!

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

Re: Unit docs with Wikipedia images

Post by Puss_in_Boots » Sat Nov 30, 2019 5:40 pm

Most of my descriptions source from Tank Encyclopedia, and were reworded to avoid plagiarism. I think applying a cool image alone would be just fine. Thank you and good luck Belfry!
RED, WHITE and BLUE!

User avatar
Belfry777
Posts: 1658
Joined: Tue Oct 17, 2017 2:34 am
Location: AZ

Re: Unit docs with Wikipedia images

Post by Belfry777 » Mon Dec 02, 2019 12:53 am

Yes I like that site as well and they often have good images. I only have 21 left to go!
A thousand may fall at your side,
And ten thousand at your right hand;
But it shall not come near you.
Only with your eyes shall you look,
And see the reward of the wicked.

Post Reply

Return to “Dev Asks for Help”