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

XML script help?

Here you can find news, get help and comment about the ?Freelancer Mod Manager (FLMM)? for activating/deactivating Mods for Freelancer

Post Thu Apr 22, 2004 4:28 pm

XML script help?

I just recently made my first script.xml mod and ran into a little problem, and was hoping someone could help.

The mod opens up the mbases.ini file, and changes the value for:
[MVendor
num_offers = 8, 12

Now, there are lots of bases in the mbases file that have that exact same text. Fortunately, for this mod it only alters Manhattan, which is the first [MVendor entry listed there. So I used this in my script:

<data file="data\missions\mbases.ini" method="sectionreplace" options="1:1">
<section>
[MVendor
num_offers = 8, 12
</section>
<dest>
num_offers = 8, 12
</dest>
<source>
num_offers = 12, 18
</source>
</data>

Now, this works fine because it's the first MVendor entry in the file. However, what if I wanted to change the entry for only Li02_01_Base? It's [MVendor section also has "num_offers = 8, 12". So how can I create a script that will replace the num_offers for Li02_01_Base only, without also replacing the entry for Manhattan (Li01_01_Base)?

Any help would be much appreciated!

Post Thu Apr 22, 2004 4:31 pm

Sorry, I guess this should go into the "using mods help forum". . .

Post Tue Apr 27, 2004 5:47 pm

Changing

<section>
[MVendor
num_offers = 8, 12
</section>

to

<section>
[MBase
nickname = Li02_01_Base
</section>
<section>
[MVendor
num_offers = 8, 12
</section>

should do the trick.
(sorry about the delayed response; I've been very busy lately)

------------------------------------
Freelancer Mod Manager: newbies' dreams come true
Belief in Jesus: the only way to Heaven

Post Tue Apr 27, 2004 10:37 pm

Thanks for responding!

Ahh, so if I have multiple sections, it finds the first one, then looks for the second entry underneath it? Seems to make sense, cool

Thanks again!

Return to Freelancer Mod Manager