Post by dudeofthed on Sept 15, 2007 5:21:05 GMT
Beginners F.A.Q. List to XML Scripting
CONTENTS:
0.01 - How do i start a basic script?
0.02 - What does savesafe mean?
0.03 - What does exclusive mean?
0.04 - How do i view mod properties or statistics?
0.05 - How do i add another piece of entry to Freelancer INI's without having to use the method's "sectionreplace" or "replace" or "sectionmodify" all the time?
0.06 - What is the difference between "sectionmodify" and "sectionreplace" or "replace"?
0.07 - My mod does not show in FLMM, why?
How do i start a basic script?
Create a new Text format file from the Windows context menu and name it to 'script.xml', make sure you have "Hide extensions for known file types" un-checked, which is located in the Folder Options Menu.
Open up the 'script.xml' file with Notepad, you must use Notepad as other editors will leave unwanted symbols and making the script un-readable by FLMM. Add <script> and a line below add:
<scriptversion>
1.0
</scriptversion>
Underneath that, create two lines and add </script>. That is a basic start of script for you.
What does savesafe mean?
Savesafe means that if it is safe to save a game in Freelancer using that modification. Adding True between the quotes (" and ") means that it is save safe or adding a False between the quotes means that is isn't. If you find a mod that has savesafe set to False, then it is not recommended you save a game in Freelancer with that mod activated.
What does exclusive mean?
Exclusive means that once your mod is activated, FLMM will disable all other mods so that only one mod is running.
How do i view mod properties or statistics?
Open FLMM and right click on the mod you wish to view the properties, and select "View Mod Statistics" in the menu that appears next to your mouse.
How do i add another piece of entry to Freelancer INI's without having to use the method's "sectionreplace" or "replace" or "sectionmodify" all the time?
Instead of using this:
<data file="DATA\SHIPS\shiparch.ini" method="sectionreplace/sectionmodify/replace">
<dest>
Blah Blah Blah
</dest>
<section>
nickname = super_heavy_fighter
</section>
<source>
nickname = super_heavy_fighter
LODranges = 0, 100, 200, 300
</source>
</data>
You could just use the "append" method, which adds the text into the INI file at the top, so it will not cause much fuss. e.g:
<data file="DATA\SHIPS\shiparch.ini" method="append">
<source>
ids_name = 0;
ids_info = 0;
nickname = super_mega_ultra_rare_fighter
LODranges = 0, 100, 200, 300, 400, 500 etc, etc
</source>
</data>
What is the difference between "sectionmodify" and "sectionreplace" or "replace"?
The "sectionmodify" command method will replace everything it can find throughout the entire file. Kind of like the replace function Notepad has in the Edit menu. Edit> Replace (CTRL+H), and then type in something then type in the replace and select replace all.
My mod does not show in FLMM, why?
The reason is because of an error in your script. You might've mis-spelt something such as </ta> instead of </data>. So, here is a possible solution: Open up the script.xml file and scan through it (With your eyes) about 3 times, if you an error still remain you can either post it on TLR with a link to your mod (Uploaded) or Here.
This is it, just the basic FLMM Script.xml Questions are answered... Any further questions, please ask in this thread. And i will include them in the above F.A.Q. I have only added a few because i think this thread will grow in time.