CAPTAIN SIM FORUM
Weapon for FSX >> Weapon for FSX >> CSWeapons.xml
https://www.captainsim.org/forum/csf.pl?num=1401149545

Message started by usb on May 27th, 2014 at 12:12am

Title: CSWeapons.xml
Post by usb on May 27th, 2014 at 12:12am
I understand how to use the xml but where might I get an example breakdown of what I can change and what that chang ewill do like changing unlimited from 0 to 1 and such.

Title: Re: CSWeapons.xml
Post by Markoz on May 27th, 2014 at 1:36am
I simply made changes to the CSWeapon.xml to see what did what.
You can even add your own weapons, if you like, but you will need to make your own 3D model (using Gmax or Flight Sim Design Studio).

Title: Re: CSWeapons.xml
Post by gusher52002 on Feb 22nd, 2016 at 2:53am
Hello im new to Weapons for FSX ,and i like to know how to get the unlimited weapons. and where to find the Xml files for CS weapons Thank you. :-/

Title: Re: CSWeapons.xml
Post by Markoz on Feb 23rd, 2016 at 12:39am
I opened the CSWeapon.xml with Notepad, and changed the <Unlimited>0</Unlimited>: to <Unlimited>1</Unlimited>, in each of the Weapons listed in the <WeaponInfo> section. Like this:

<WeaponInfo>
        <Weapon>
            <Gun>SPPU-30</Gun>
            <Shell>GS-30-1 Bullet</Shell>
            <Unlimited>1</Unlimited>
            <Station name="LeftWingOuter" params="-2.55, 0, -0.2, 0, 0.095, 0, 1000" />
            <Station name="LeftWingInner" params="-2.35, 0, -0.2, 0, 0.095, 0, 1000" />
            <Station name="RightWingInner" params="2.55, 0, -0.2, 0, 0.095, 0, 1000" />
            <Station name="RightWingOuter" params="2.35, 0, -0.2, 0, 0.095, 0, 1000" />
            <Mode name="AUTO" shotrate="15" setshots="0" sequence="1+2+3+4" />
            <Mode name="X8" shotrate="30" setshots="30" sequence="1+2+3+4" />
            <DefaultMode>AUTO</DefaultMode>
        </Weapon>
    

Title: Re: CSWeapons.xml
Post by gusher52002 on Jan 7th, 2023 at 4:36pm
Hello, its been a while sense i been here , wanted to know how to convert the Note pad text back to XML format. I forgot how to do it, its been so long thank you.  :-?
https://www.captainsim.org/forum/csf.pl?action=downloadfile;file=Cpt_txt.txt ( 32 KB | 34 Downloads )

Title: Re: CSWeapons.xml
Post by Markoz on Jan 8th, 2023 at 1:55am
When you use the Save As (NOT Save) method of saving the Notepad document, make sure you change the Save as type field to All files. Then type in the name the file NameOfFile followed by .xml (i.e. NameOfFile.xml). Then click on Save (pressing the keyboard ENTER key should achieve the same result as clicking on the Save button).
See attached image
SavingAsXML.jpg ( 80 KB | 42 Downloads )

Title: Re: CSWeapons.xml
Post by gusher52002 on Jan 8th, 2023 at 11:49pm
Thank you for responding, fallow the step and when i go to view the saved file ,nothing show up but a blank white page in Explorer. Using windows 7 64bit

Title: Re: CSWeapons.xml
Post by gusher52002 on Jan 8th, 2023 at 11:52pm
Also there's a box at the bottom of the window that states, Encoding and its listed as ANSI

Title: Re: CSWeapons.xml
Post by Markoz on Jan 9th, 2023 at 2:13am

gusher52002 wrote on Jan 8th, 2023 at 11:49pm:
Thank you for responding, fallow the step and when i go to view the saved file ,nothing show up but a blank white page in Explorer. Using windows 7 64bit

You should at least get something other than a blank white page.


gusher52002 wrote on Jan 8th, 2023 at 11:52pm:
Also there's a box at the bottom of the window that states, Encoding and its listed as ANSI

In Windows 7/8/10, it should save from Windows Notepad without any problems. I never had a problem with it (I haven't done it Win 11 yet).

I see an encoding list consisting of ANSI, UTF-16 LE, UTF-16BE, UTF-8, & UTF-8 with BOM, with UTF-8 always being the one I see when I first select Save As, and when I opened it after saving as a .XML, it looked fine. If ANSI was the default in Win 7, then that's probably what I saved it as.

My suggestion would be to create a new .TXT file (using the name of the file that you want to save you XML as), then change the file extension* from .TXT to .XML. After that, copy everything from the .TXT file that you've done all the XML coding in, and paste it in the newly created .XML file, then after that, simply select Save (not Save As), and you have your XML file.
The reason I suggest this is that with the change of the file type, once you change it to an XML file, it will automatically save with the correct encoding.


* To make the file extentions visible, you need to go to  Options (this should be somewhere on the top menu of the Folder) > View Tab > Un-Check (remove the tick from) the Hide extensions of known file types.

Title: Re: CSWeapons.xml
Post by gusher52002 on Jan 9th, 2023 at 7:10pm
Thank you for you help. Not exactly sure what i did, but a had a bunch of copies of the modified xml and each one had a number behind the file name. Ex. CSWeapon(##). When i removed the (##) from the end of CSWeapon and placed in into the aircraft folder it worked properly.  :)

Title: Re: CSWeapons.xml
Post by Markoz on Jan 10th, 2023 at 1:48am
Yeah. The file must me named CSWeapon (even though you can't see the .xml extension), but if you named them CSWeapon01 etc., then the XML's wouldn't be recognised/used by the weapon gauge.
I used to name mine sequencially like you did, so I probabably had the same problem as you when I forgot to rename it correctly. It's easy mistake to make. ;)

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