The bottom right of this picture shows my Doxstroyer nuclear launcher's UI for ammo I'm not sure how i can change that blank icon to display... any icon, i guess. I don't know how I can give it any icon. There's also a problem with ammo descriptions; this "!LOC" thing is confusing and when I try to change the "display name" and "description" it does not change in-game. Same thing with the basic stats, I changed the build metal cost from 50k to 20k but it does not show in-game.
the "!LOC" thing probably tells the game what nape to display based on the localization settings you have set (that was always my guess). To get a working UI icon oyu need to do the following things: 1. Make A UI Icon that exactly 60x60 pixels 2. Name the icon after your unit.json 3. Put the said icon into "[your mod folder]\ui\main\game\live_game\img\build_bar\units" 4. Go into "[your mod folder]\ui\main\shared\js" and edit the build.js. In there you will have to - Specify where you unit.json is - Specify in which of the build bars the icon will show up - Specify in which slot of the specified buildbar the icon will be placed
to follow up: Code: // nuke hack // the projectiles are not magically added to the unit_list, so the display details aren't sent to the ui var nuke_id = '/pa/units/land/nuke_launcher/nuke_launcher_ammoX.json'; var nuke_id = '/pa/units/land/nuke_launcher/nuke_launcher_ammo.json'; var anti_nuke_id = '/pa/units/land/anti_nuke_launcher/anti_nuke_launcher_ammo.json'; model.itemDetails[nuke_id] = new UnitDetailModel({ name: 'HIPPO', description: 'High cost, ultra high damage', cost: 41000, sicon: siocnFor(nuke_id) }); model.itemDetails[nuke_id] = new UnitDetailModel({ name: 'Doxstroyer', description: 'Destroys all dox on target planet', cost: 19000, sicon: siconFor(nuke_id) }); model.itemDetails[anti_nuke_id] = new UnitDetailModel({ name: 'SR-24 -Dox- Missile Defense', description: 'Anti-Nuke - Intercepts incoming nuclear dox missiles.', cost: 6750, sicon: siconFor(anti_nuke_id) }); How am I supposed to add a new type of ammo when the "nuke_id" has to be different? I tried "nuke_id_X" but that didn't work.
Just call the variable something else: Code: // nuke hack // the projectiles are not magically added to the unit_list, so the display details aren't sent to the ui var nukeX_id = '/pa/units/land/nuke_launcher/nuke_launcher_ammoX.json'; var nuke_id = '/pa/units/land/nuke_launcher/nuke_launcher_ammo.json'; var anti_nuke_id = '/pa/units/land/anti_nuke_launcher/anti_nuke_launcher_ammo.json'; model.itemDetails[nuke_id] = new UnitDetailModel({ name: 'HIPPO', description: 'High cost, ultra high damage', cost: 41000, sicon: siocnFor(nuke_id) }); model.itemDetails[nukeX_id] = new UnitDetailModel({ name: 'Doxstroyer', description: 'Destroys all dox on target planet', cost: 19000, sicon: siconFor(nukeX_id) }); model.itemDetails[anti_nuke_id] = new UnitDetailModel({ name: 'SR-24 -Dox- Missile Defense', description: 'Anti-Nuke - Intercepts incoming nuclear dox missiles.', cost: 6750, sicon: siconFor(anti_nuke_id) });
This is starting to get annoying Code: var nukeX_id = '/pa/units/land/nuke_launcher/nuke_launcher_ammoX.json'; var nuke_id = '/pa/units/land/nuke_launcher/nuke_launcher_ammo.json'; var anti_nuke_id = '/pa/units/land/anti_nuke_launcher/anti_nuke_launcher_ammo.json'; model.itemDetails[nukeX_id] = new UnitDetailModel({ name: 'H1PP0', description: 'High cost, ultra high damage', 41000, sicon: siocnFor(nukeX_id) }); model.itemDetails[nuke_id] = new UnitDetailModel({ name: 'Doxstroyer', description: 'Destroys all dox on target planet', 28000, sicon: siconFor(nuke_id) }); model.itemDetails[anti_nuke_id] = new UnitDetailModel({ name: 'SR-24 -Dox- Missile Defense', description: 'Anti-Nuke - Intercepts incoming nuclear dox missiles.', 6750, sicon: siconFor(anti_nuke_id) }); I changed the description in "live_game.js" and it does not show in game for that ammo. Still default. Should be named the other thing, hippo or doxstroyer (forgot which one but that doesn't matter)
I got it working for RCBM a while back. I can't quite remember how exactly I fixed it, but it works. In livegame.js we have Code: model.itemDetails[tac_nuke_id] = new UnitDetailModel('Tactical Nuke', 'ICBM-64 -Silencer- Missile', 1500, siconFor(nuke_tac_id)); And this in the ammo Code: "description": "ICBM-64 -Silencer- Missile", "display_name": "Tactical Nuke", I am not sure if all of that is needed, but that should be enough for you to get it working.
I reset my nuke folder and did everything in this thread, and now there is no description at all for the nuke ammo. I was only trying to change one nuke ammo this time to avoid extra complications. EDIT: This is what I did I renamed my nuke ammo to "nuke_launcher_hippo_ammo.json" I renamed the tool weapon to "nuke_launcher_tool_hippo_weapon.json" I edited the "nuke_launcher_tool_hippo_weapon.json" to build "nuke_launcher_hippo_ammo.json". I edited buildable projectiles in "nuke_launcher.json" to build "nuke_launcher_hippo_ammo.json" I edited "live_game.js" to this: Code: var hippo_nuke_id = '/pa/units/land/nuke_launcher/nuke_launcher_hippo_ammo.json'; var anti_nuke_id = '/pa/units/land/anti_nuke_launcher/anti_nuke_launcher_ammo.json'; model.itemDetails[hippo_nuke_id] = new UnitDetailModel({ name: 'H1PP0', description: 'High cost, ultra high damage', 41000, sicon: siocnFor(hippo_nuke_id) }); model.itemDetails[anti_nuke_id] = new UnitDetailModel({ name: 'SR-24 -Dox- Missile Defense', description: 'Anti-Nuke - Intercepts incoming nuclear dox missiles.', 6750, sicon: siconFor(anti_nuke_id) }); I edited the icon atlas and unit icon folder to show the icon, which is working obviously I edited the build.js to allow the "nuke_launcher_hippo_ammo.json" WHAT DID I DO WRONG AHHHHHHHH
Alright I finally got it to work today and i'm so close now This picture shows my two custom icons, the bigger one is not the final one but the small one next to the ammo name is the final strategic icon (i think it turned out pretty well in PS). The only problem is that this small icon does not get put on the actual nuke ammo: That dot So, I need some guidance here
I see the strategic icons for the nukes in other mods don't work also. Are custom strategic icons just not possible? sorry for triple post
They are possible, but only with a client mod. That's the reason why all the bigger server mods have there own client mod.
Yeah, only the client can have new strat icons. New strat icons in a server mod, loaded by a vanilla client mod, show as radar blip still. si_name can give one thing another existing icon. You could give it the land_mine icon that way if you wanted. Just to clarify.