Jump to content

Weapon properties, why in weapons_gc and weapons.xml ?


Ragnarok

Recommended Posts

I think it's because the gc game and the geoscape game don't interact very well in the code. Solver or llunak will be able to say better as they've seen the code, but I'm pretty sure I've seen that used as an explanation before.

Link to comment
Share on other sites

I know that at the very least the CLIPSIZE set in weapons_gc is not applied in the geoscape, you can see that your weapons show the wrong clip size (based on weapons file) in the equip screen, but its only a visual issue.

I dont see any reason why i would need to set accuracy, damage, range in the weapons, which doesnt seem to effect battlescape.

edit

ninja'd.

Link to comment
Share on other sites

I think the equip screen stats were originally taken from the weapons.xml file while the properties the weapon has when fired in ground combat was set in weapons_gc.xml.

No idea why the same file couldn't be used for both though, maybe keeping the information separate helps loading times as unnecessarily large files are avoided?

Link to comment
Share on other sites

Most likely two different programmers worked on ground combat and geoscape, if I remember correct they were completely separate for a while. So during integration of both modules, it came up the they used different file formats, and since the data already existed and everything "worked fine", instead of migrating the data to a unified data structure, spending who knows how many hours, it was thought better (cheaper) to just stick with two separate systems. A classic case of where a little ahead-thinking could've save a lot of future troubles, especially when talking about modders. Not very uncommon in software industry, as far as I know :P

Link to comment
Share on other sites

It would be possible to merge the files now, sure, but it would take a fair bit of work for little reward. Basically, the ground combat and the geoscape are largely separate in the code, so a weapon that appears in ground combat isn't really the same thing as the weapon that appears in your equipment screen.

The code that handles the communication between Geoscape and ground combat isn't exactly the most robust of the game, so overhauling that communication would likely come with quite a few unpleasant side effects.

Link to comment
Share on other sites

One major advantage for combining at least the weapon files would be that then we could fetch the weapon data from the file with the actual weapon stats and then concatenate into the tooltip, improving weapon modding immensely. Updating the weapon stats in strings.xml is by far the most time-consuming part of weapon modding, which is a bit silly :P

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...