CAPTAIN SIM FORUM
Weapon for FSX >> Weapon for FSX >> No rounds for aircraft?
https://www.captainsim.org/forum/csf.pl?num=1312158225

Message started by Copaman on Aug 1st, 2011 at 12:23am

Title: No rounds for aircraft?
Post by Copaman on Aug 1st, 2011 at 12:23am
Here's the deal:

My HUD is very small. In my attempt to resize it (as detailed in another topic), I modified the csweapons.xml file for one aircraft (F-101B). It was a colossal failure; not only did the HUD not resize, but my attempts to modify the panel.cfg resulted in the HUD no longer appearing.

When I attempted to load the CS_FA18, I noticed that it no longer showed any rounds. The gun did not fire, nor did the rockets, which was working previously. I did not modify anything for the CS_FA18 - neither its panel nor its csweapons.xml. In fact, since the loader isn't working properly for me, I use the CS_FA18 as the master copy of the panel and copy it to other aircraft. So I was perplexed as to why the weapons would no longer work for that aircraft.

I decided to uninstall Weapons for FSX and re-install it. When I did that, I noticed that once again, the CS FA-18 would fire properly with both guns and rockets.

However, the F-101B did not. I attempted to remove the "armed" portion of the aircraft via the Loader. When I pressed remove, nothing happened and it did not appear to do anything. However, visiting the aircraft's directory, I saw that it removed the panel.csweapon and the csweapon.xml. It also edited the aircraft.cfg to remove references to "armed" in the a/c description. However, when I went back to install it via the Loader program, Install wasn't an option - it only showed "Remove" as an option. And pressing Remove did nothing.

No big deal, I'll just manually move the files over. So I copied the csweapon.xml and the panel into the F-101B directory from the CS FA-18. When I select the aircraft, the main panel and the HUD show up, but when I select the guns, it shows 0000 rounds. I load up the FA-18 and it shows 0200 rounds. I return back to the F-101B and it shows 0000 rounds.

I modified the csweapon.xml to change the number of rounds from 200 to 400, but it shows up as 0000.

Is there somewhere else I need to change this? Why can't I get the weapons to work properly in the aircraft?

Title: Re: No rounds for aircraft?
Post by Markoz on Aug 1st, 2011 at 3:20am
If you make an error with the coding/syntax in the CSWeapon.xml, this will cause the the ammo to be 0000.

When I make any changes that are not done correctly (usually it's a sytax error), that happens. So far it has always been because I have made a coding/syntax error.
I am currently having this problem with the MOD I'm supposed to be doing for the Captain Sim AC-130 Spectre. I can't see where I have made the mistake, but I know I have made a mistake. When I revert to what I had before my mistake, it works as it should.

Mark

Title: Re: No rounds for aircraft?
Post by Copaman on Aug 1st, 2011 at 4:03am
I found the answer to my problem.

You have to make the corrections while the FSX sim itself is not running. I thought it would be like panel.cfg and those, where you can modify them, switch aircraft to another, then switch back and see the changes. But no, apparently, Weapons only sources the XML files on startup, and switching aircraft isn't enough to re-source the file.

If you make any changes to the XML files, you have to shut down the sim and restart it all again.

Probably not a problem for most of you, but for me, launching FSX is about a 5 minute affair. So to modify the XML files has taken me most of the evening. Shut down the sim, edit the file, launch the sim again. Oops, made a mistake, shut down the sim, edit the file, launch the sim again. Makes for a long evening, but I guess you have to do what you can. At least I know how it works now.

Title: Re: No rounds for aircraft?
Post by Markoz on Aug 1st, 2011 at 4:15am
Although I can make the changes to the CSWeapon.xml, provided that the aircraft is not loaded in FSX, I strongly recommend that FSX is NOT running just to be absolutely sure that the changes apply.

Mark

NOTE. This is a repeat of my reply in another Topic here: http://www.captainsim.org/yabb2/YaBB.pl?num=1311881816/4#4

Title: Re: No rounds for aircraft?
Post by Flounder on Aug 18th, 2012 at 8:34pm

Copaman wrote on Aug 1st, 2011 at 4:03am:
I found the answer to my problem.

You have to make the corrections while the FSX sim itself is not running. I thought it would be like panel.cfg and those, where you can modify them, switch aircraft to another, then switch back and see the changes. But no, apparently, Weapons only sources the XML files on startup, and switching aircraft isn't enough to re-source the file.

If you make any changes to the XML files, you have to shut down the sim and restart it all again.

Probably not a problem for most of you, but for me, launching FSX is about a 5 minute affair. So to modify the XML files has taken me most of the evening. Shut down the sim, edit the file, launch the sim again. Oops, made a mistake, shut down the sim, edit the file, launch the sim again. Makes for a long evening, but I guess you have to do what you can. At least I know how it works now.

What did you modify in the file things? Like what did you add? I'm new to this, and having the same problem. I'm freaking out! Please reply

Title: Re: No rounds for aircraft?
Post by ptds on Aug 18th, 2012 at 11:08pm
I have found that by selecting another aircraft and then Pause FSX, you can then modify the .xml file. Then un pause FSX and re load the aircraft you have changed.
It works for me.

pete

Title: Re: No rounds for aircraft?
Post by Markoz on Aug 19th, 2012 at 3:10am

ptds wrote on Aug 18th, 2012 at 11:08pm:
I have found that by selecting another aircraft and then Pause FSX, you can then modify the .xml file. Then un pause FSX and re load the aircraft you have changed.
It works for me.

pete

It can also be done with FSX running by changing aircraft (I switch to the default C172), without pausing, make the changes, the change back to the aircraft you are working. Only problem with changing aircraft all the time is that eventually FSX can suffer a fatal error (CTD).

CAPTAIN SIM FORUM » Powered by YaBB 2.6.0!
YaBB Forum Software © 2000-2024. All Rights Reserved.