Loading ALL them badgers!

panzer

Space Marshal
Donor
Jul 28, 2015
68
164
2,360
RSI Handle
panzer
<prereq>You know your way about XML-files</prereq>

So, I bought 2 more badger lasers for my Cutlas Black and proceeded to add them to the turret. But when I did that the badger on the nose of the ship magically disappeared! Dafuq?

So yea, that's a known bug, but I am not one for giving up, so I remembered that there is an inventory file in the USER directory of the game, named <username>_inventory.xml.

In that file you can find all your current items (weapons, etc.) and see how they are currently set up. Now, the easiest way to get e.g. three badgers on a Cutlas (sounds like the start of a really good joke, I know! :P) is to go in to the game, mount one on the nose, another on the turret and on the second weapon hardpoint on the turret mount some other weapon. Great, now quite the game and open the XML file.

Find the IDs of your badgers (KLWE_LaserRepeater_S2), and copy the ID of the one currently not mounted anywhere (the __EID__id attributes are used to refer to IDs of other items). Then find the ID of the other weapon you mounted on the turret and replace that with the badgers ID... also, find the section for the Cutlass inventory (section with class="DRAK_Cutlass_S1_Q2"), and replace the "other weapon" ID there with the badger ID as well... voila!

Btw... a Cutlas Black with 2 badgers on top, one on the nose, and two suckerpunches (all on gimbals) is quite fun! And yes, it still flies like a brick... but it's my brick and I love it with all my space hippie heart! <3

If you don't know jack about code and XML-files but have weapons load-out problem, reply here and I'll help you out by doing a better tutorial or perhaps a video. I just didn't feel like writing a lengthy tutorial unless someone actually needs it... or you can catch me on mumble.

panzer!
 
  • Like
Reactions: Tameron and Montoya

Tameron

Space Marshal
Jan 8, 2015
62
34
1,710
RSI Handle
Tameron
Thanks man. I was having the same trouble with the turret on my Hornet and didn't know what the hell was going on. As for fixing it, I think I got this.
 
  • Like
Reactions: panzer

Sawbones

Captain
Sep 23, 2015
11
5
175
RSI Handle
Sawbones
I have a rudimentary understanding of xml but am having issues finding the exact IDs and how they relate to my ship loadouts so a tutorial or a bit more detailed info as to which IDs to copy where would be a great help.
 

panzer

Space Marshal
Donor
Jul 28, 2015
68
164
2,360
RSI Handle
panzer
I have a rudimentary understanding of xml but am having issues finding the exact IDs and how they relate to my ship loadouts so a tutorial or a bit more detailed info as to which IDs to copy where would be a great help.
Hi Sawbones.

I'll try and catch you online on Discord during next week. It easily gets a bit confusing with all the different IDs... if they don't fix the bug soon I might actually just have to code a tool for this ;)
 

panzer

Space Marshal
Donor
Jul 28, 2015
68
164
2,360
RSI Handle
panzer
Okay, so here's more step-by-step guide, for the Cutlass with badgers ;) Should be easy to do modify to work with any other ship:

1. Quit the game

2. Delete your USER folder

3. Start the game, and once you are in the hanger, quit again. Now you have new clean <username>_inventory.xml-file in your USER-directory.

4. Copy the xml file to somewhere else, say the Desktop, and call it something like inventory-clean.xml

* If you want to add badgers that now currently mounted on another ship do steps 5. Otherwise skip it.
5. Start the game again, remove the weapons from ship that they are currently on. Quit the game again. This what you will use as your inventory-clean.xml*

6. Start the game, go to ship modification thingy in the hanger, open it, select the Cutlass and remove the weapons that are currently placed where you want your might badgers. Quit the mod-thingy and exit the game.

7. Copy the now changed xml file to the Desktop, call it inventory-noguns.xml

8. By comparing the clean and noguns xml files you will find that in noguns there <port> tags width the word "hardpoint" in their portName attribute that now have a "__EID__itemId" attributed with value "00000000-0000-0000-0000-000000000000" where in clean xml they had something else. Great, those are where you want your badgers. Note them down, e.g. in Notepad or something.

10. Copy af copy of noguns.xml and call it fixed.xml. We will be modifying fixed.xml. Copying the file is just so you have a backup in case you mess up somewhere along the way XD

9. In fixed.xml find the IDs of some unmounted badgers. To do this: Search for the text string "KLWE_LaserRepeater_S2".
* Other weapons have other names. To find them, use the trick mentioned about where we looked at the difference between two inventory xml files. *
The results you get will be the value of a "class" attribute on an <item> tags. For each such item tag that you find, copy the value of the "id" attributes. E.g. open Notepad and copy them in there. Those are the WEAPON_IDs of unmounted badgers.

10. In fixed.xml find the <hanger> tag. It has a <inventory> tag inside it. Find the WEAPON_ID <item> tags inside it. Cut the entire item tags out. Now decrement the "count" attribute in the <inventory> tag with the number of badgers you just removed.

11. Find a <ship> tag in fixed.xml with a "class" attribute saying "DefaultSpaceShips.DRAK.DRAK_Cutlass" (again, if doing this for another ship, find a <ship> tag where the "class" attribute fits your ship. Search for "DefaultSpaceShips", to find all ships). Paste the badger <item> tags in to the <inventory> tag inside it, and then increment the <inventory> "count" attribute with the number of badgers you just added.

12. Okay, finally find the hardpoints you noted down earlier, and for each hardpoints add the WEAPON_ID of a moved badger to the hardpoint's "__EID__itemId" attribute.

13. Save the file, and replace the inventory xml in your USER folder with. Done!

It's a heck of lot faster and easier to do than it was to write all these steps down :P but hey: Friendly neighbourhood tech hippie, only here to help! :)
 
Forgot your password?