Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

** Tutorial ** - FLMM XML Scripts

Here you find the different tutorials on editing and MODing Freelancer

Post Sat Jan 15, 2005 12:15 pm

** Tutorial ** - FLMM XML Scripts

FLMM XML Tutorial by Loso

This tutorial will not cover all the XML coding possible.
Do not ask me for help but post in the forums and someone else might help.
If anyone finds something wrong in my tutorial post and ill change it.

-----------------------------------------------------------------------
Making FLMM read .XML files
-----------------------------------------------------------------------

Create a new .txt file and type or copy in:

<script>
<header name="Name that you will see in the FLMM">
<scriptversion>
1.0
</scriptversion>
<author>
Name of who made the mod
</author>
<description>
Description that you will see in the FLMM
</description>
</header>
</script>

Save as Script.XML (you need a script.XML file for the XML's to be read)

-----------------------------------------------------------------------
Parts of an XML mod script
-----------------------------------------------------------------------

(Note1)all data files need the folders from Data forward. eg. Data/Audio/Sounds.ini

In anothing .txt file named anything you want, add

<script>
<scriptversion>
1.0
</scriptversion>

-----
append (add to a file)
-----

<data file="(Note1)file to moddify.ini" method="append">
<source>

Add what you would in the .ini file here

and follow it by
</source>
</data>

-----
sectionappend (add to a section of a file)
-----

<data file="(Note1)file to moddify.ini" method="sectionappend">
<section>
Part you want to add to, eg.

[BaseGood
base = Li01_01_base

then
</section>
<source>

and also what you want to add in here, eg.

MarketGood = gun01, 0, -1, 10, 10, 0, 1

then

</source>
</data>

-----
Ending a script
-----

all you have to add here is

</script>

-----------------------------------------------------------------------
Example Script
-----------------------------------------------------------------------

<script>
<scriptversion>
1.0
</scriptversion>

<data file="DATA\Equipment\goods.ini" method="append">
<source>
[Good
nickname = ge_gf1_engine_01
equipment = ge_gf1_engine_01
category = equipment
price = 200
item_icon = equipment\models\commodities\nn_icons\equipicon_engine.3db
combinable = false
ids_name = 0 ;GENERATESTRRES("Starflier Engine"
ids_info = 1
shop_archetype = equipment\models\commodities\crates\crate_grey.3db
</source>
</data>

<data file="data\equipment\market_misc.ini" method="sectionappend">
<section>
[BaseGood
base = Li01_01_base
</section>
<source>
MarketGood = ge_gf1_engine_01, 0, -1, 10, 10, 0, 1
</source>
</data>

</script>

Post Mon Feb 21, 2005 6:49 pm

Creating a script with options.

-----------------------------------------------------------------------
Note
-----------------------------------------------------------------------
Optional codes need all the code to have options (I think)
And the example script should give you an option of 500 or 1000 thrust speed
on the regular thruster.

-----------------------------------------------------------------------
Start the script with:
-----------------------------------------------------------------------

<script>
<header name="Mod Name">
<scriptversion>
1.0
</scriptversion>
<author>
Autor(s) Name(s)
</author>
<description>
Put your description in here.
</description>

-----------------------------------------------------------------------
Options:
-----------------------------------------------------------------------

<options default="1:1"> (leave it set at 1:1)

First Option:

<option name="Main Msg of option" savesafe="true">
<item id="1" name="One of the options"> (Change id="#" for the list of options)
</item>
<item id="2" name="One of the options">
</item>
</option>

Second Option

<option name="Main Msg of option" savesafe="true">
<item id="1" name="One of the options"> (Change id="#" for the list of options)
</item>
<item id="2" name="One of the options">
</item>
</option>
</options>
</header>

-----------------------------------------------------------------------
Constants: When you want some code to be on but not an option.
-----------------------------------------------------------------------

<option name="Constant" savesafe="true">
<item id="1" name="Constant">
</item>
</option>

Put that code as a option.

-----------------------------------------------------------------------
Code:
-----------------------------------------------------------------------

<data file="Location of the ini" method="method you wish to use" options="1:1">

Only part you need to add to the xml code is (options="1:1"("#:#"
first # is the Main Msg, second # is the option.

-----------------------------------------------------------------------
Example Script:
-----------------------------------------------------------------------
<script>
<header name="Example Script">
<scriptversion>
1.0
</scriptversion>
<author>
Example
</author>
<description>
Example Script for XML tutorial.
</description>

<options default="1:1">
<option name="How fast do you want your Thrusters" savesafe="true">
<item id="1" name="500">
</item>
<item id="2" name="1000">
</item>
</option>
<option name="Constant" savesafe="true">
<item id="1" name="Constant">
</item>
</option>
</options>
</header>

<data file="data\constants.ini" method="sectionappend" options="1:1">
<section>
[PhySysConsts
</section>
<source>
ANOM_LIMITS_MAX_VELOCITY = 500
</source>
</data>

<data file="data\constants.ini" method="sectionappend" options="1:2">
<section>
[PhySysConsts
</section>
<source>
ANOM_LIMITS_MAX_VELOCITY = 1000
</source>
</data>

<data file="data\equipment\st_equip.ini" method="sectionreplace" options="2:1">
<section>
[Thruster
nickname = ge_s_thruster_01
</section>
<dest>
max_force = 72000
</dest>
<source>
max_force = 9999999
</source>
</data>

</script>
-----------------------------------------------------------------------

Return to Freelancer Editing Tutorial Forum