Jump to content

weapons_gc.xml fails to load


endersblade

Recommended Posts

After learning much from the likes of Kabill and Ilunak, I've been making my own personal mod with all the tweaks I want. Every file loads perfectly fine, except for weapons_gc.xml. The log file doesn't specify why; it just says it fails. I'm using the -modinfo tag on the exe.

Each weapon entry looks like this:

<Weapon MODMERGEATTRIBUTE="name" MODMERGE="update" name="weapon.pistol" bulletType="normal" emptySound="Empty Click 1">

<props range="10" hands="1" recoil="0" weight="2" isHeavy="0" clipSize="15" reloadAPCost="15" reloadSound="Weapon Pistol Reload" reactionModifier="1.5" />

<SingleShot MODMERGE="update" sound="Weapon Pistol Single" delay="0.6" suppressionValue="20" suppressionRadius="1">

<Set1 ap="28" accuracy="45" />

<Set2 ap="40" accuracy="80" />

</SingleShot>

<GUIImage name="gui/weapons/pistol" />

<GroundImage name="grounditemimages/ballistic_pistol.png"/>

<Ammos>

<Ammo MODMERGE="update" name="ammo.ballistic.pistol" type="kinetic" damage="30" mitigation="0">

<Projectile spectre="projectiles/bullet/bullet" speed="1500" showAfterDistance="60.0"/>

<Impact spectre="particles/bulletplume/bulletplume"/>

</Ammo>

</Ammos>

</Weapon>

I've bolded the MODMERGE parts. Are they correct? I tried it with the MODMERGEATTRIBUTE in each section as well, and that didn't work either.

The log has pointed out all of my other errors, and I've fixed them all. But it tells me nothing for this one, so I don't know what to fix >.>

This is all the log file says:

Sun Sep 14 00:31:43 2014: MOD ERROR: Merging XML for weapons_gc.xml from mod mods/darienmod/ failed

I also modified the weapons.xml file accordingly. For example, I changed all the heavy machine gun type weapons to have 50 ammo instead of 30. It's reflected in both files. However, in combat, they show up as 30/30 at the main screen, and if I open the equipment screen, they show as 30/50. So I'm assuming the weapons.xml file is loading correctly (especially since it isn't throwing any errors in the log), I'm just fudging up something in the weapons_gc.xml file.

Edited by endersblade
Link to comment
Share on other sites

The log has pointed out all of my other errors, and I've fixed them all. But it tells me nothing for this one, so I don't know what to fix >.>

And since you tell us nothing (useful) for this one, we don't know what to fix either. It's fascinating how people somehow expect developers have crystall balls that they'd tell them what's wrong with a problem they can't see.

Anyway, my crystal ball tells me the xml is invalid.

Link to comment
Share on other sites

As llunak says, it's pretty much impossible to know what's causing it without more information (although short of posting the file I'm not sure what else could be provided).

In my experience, though, the kind of issue you've reported tends to stem from an accidental error that has been introduced into the xml file, such as accidentally deleting a comma around a number, missing of the </> part of an element or something like that. Your best bet would be to comment out/remove all but the first item you've added, load the game and see if it works. If it doesn't, your problem is with that first entry and this will help you find it. If it does work, add in the next entry and repeat until you locate the part of the file that's causing the problem.

Link to comment
Share on other sites

Roger, I'll remake it tonight then. That was my next step anyway, but it was late.

And since you tell us nothing (useful) for this one, we don't know what to fix either. It's fascinating how people somehow expect developers have crystall balls that they'd tell them what's wrong with a problem they can't see.

Anyway, my crystal ball tells me the xml is invalid.

I was mainly asking if I got the modmerge stuff right (using the right ones, in the right places), more than expecting you to pull shit out of thin air. No need to be sarcastic. If the modmerge stuff is correct, at least for that entry, then that's one thing I can scratch off the list.

Edited by endersblade
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...