Visit Captain Sim web site  
  Welcome, Guest. Please Login or Register

 

Page Index Toggle Pages: 1 Send TopicPrint
 10 CSWeapons.xml (Read 4318 times)
usb
Full Member
*
Offline



Posts: 17
Location: Reno
Joined: May 24th, 2014
Gender: Male
CSWeapons.xml
May 27th, 2014 at 12:12am
Print Post  
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.
  
Back to top
 
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12263
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: CSWeapons.xml
Reply #1 - May 27th, 2014 at 1:36am
Print Post  
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).
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 8GB RTX 2070 | 32" LCD Monitor | 1TB SSD & 2x2TB SSD | Win 11 Pro - FSX/FSX-SE/P3D3/P3D4/P3D5/MSFS2020
15.6" Gaming Laptop: i7 7700HQ | 32GB DDR4 | 6GB GTX 1060 | 256GB SSD & 1TB HDD | Win 10 Pro 64bit - FSX-SE/P3D4
Back to top
 
IP Logged
 
gusher52002
Full Member
*
Offline


http://www.captainsi
m.com/user/dl/w001/w
eapon.jpg

Posts: 8
Joined: Feb 22nd, 2016
Re: CSWeapons.xml
Reply #2 - Feb 22nd, 2016 at 2:53am
Print Post  
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. Undecided
  
Back to top
 
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12263
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: CSWeapons.xml
Reply #3 - Feb 23rd, 2016 at 12:39am
Print Post  
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>
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 8GB RTX 2070 | 32" LCD Monitor | 1TB SSD & 2x2TB SSD | Win 11 Pro - FSX/FSX-SE/P3D3/P3D4/P3D5/MSFS2020
15.6" Gaming Laptop: i7 7700HQ | 32GB DDR4 | 6GB GTX 1060 | 256GB SSD & 1TB HDD | Win 10 Pro 64bit - FSX-SE/P3D4
Back to top
 
IP Logged
 
gusher52002
Full Member
*
Offline


http://www.captainsi
m.com/user/dl/w001/w
eapon.jpg

Posts: 8
Joined: Feb 22nd, 2016
Re: CSWeapons.xml
Reply #4 - Jan 7th, 2023 at 4:36pm
Print Post  
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.  Huh
  

Cpt_txt.txt ( 32 KB | 5 Downloads )
Back to top
 
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12263
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: CSWeapons.xml
Reply #5 - Jan 8th, 2023 at 1:55am
Print Post  
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 | 5 Downloads )
SavingAsXML.jpg

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 8GB RTX 2070 | 32" LCD Monitor | 1TB SSD & 2x2TB SSD | Win 11 Pro - FSX/FSX-SE/P3D3/P3D4/P3D5/MSFS2020
15.6" Gaming Laptop: i7 7700HQ | 32GB DDR4 | 6GB GTX 1060 | 256GB SSD & 1TB HDD | Win 10 Pro 64bit - FSX-SE/P3D4
Back to top
 
IP Logged
 
gusher52002
Full Member
*
Offline


http://www.captainsi
m.com/user/dl/w001/w
eapon.jpg

Posts: 8
Joined: Feb 22nd, 2016
Re: CSWeapons.xml
Reply #6 - Jan 8th, 2023 at 11:49pm
Print Post  
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
  
Back to top
 
IP Logged
 
gusher52002
Full Member
*
Offline


http://www.captainsi
m.com/user/dl/w001/w
eapon.jpg

Posts: 8
Joined: Feb 22nd, 2016
Re: CSWeapons.xml
Reply #7 - Jan 8th, 2023 at 11:52pm
Print Post  
Also there's a box at the bottom of the window that states, Encoding and its listed as ANSI
  
Back to top
 
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12263
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: CSWeapons.xml
Reply #8 - Jan 9th, 2023 at 2:13am
Print Post  
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.
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 8GB RTX 2070 | 32" LCD Monitor | 1TB SSD & 2x2TB SSD | Win 11 Pro - FSX/FSX-SE/P3D3/P3D4/P3D5/MSFS2020
15.6" Gaming Laptop: i7 7700HQ | 32GB DDR4 | 6GB GTX 1060 | 256GB SSD & 1TB HDD | Win 10 Pro 64bit - FSX-SE/P3D4
Back to top
 
IP Logged
 
gusher52002
Full Member
*
Offline


http://www.captainsi
m.com/user/dl/w001/w
eapon.jpg

Posts: 8
Joined: Feb 22nd, 2016
Re: CSWeapons.xml
Reply #9 - Jan 9th, 2023 at 7:10pm
Print Post  
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.  Smiley
  
Back to top
 
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12263
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: CSWeapons.xml
Reply #10 - Jan 10th, 2023 at 1:48am
Print Post  
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. Wink
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 8GB RTX 2070 | 32" LCD Monitor | 1TB SSD & 2x2TB SSD | Win 11 Pro - FSX/FSX-SE/P3D3/P3D4/P3D5/MSFS2020
15.6" Gaming Laptop: i7 7700HQ | 32GB DDR4 | 6GB GTX 1060 | 256GB SSD & 1TB HDD | Win 10 Pro 64bit - FSX-SE/P3D4
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
 
  « Board Index ‹ Board  ^Top