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

Whats wrong with my xml file

The general place to discuss MOD''ing Freelancer!

Post Mon Apr 28, 2003 2:54 am

Whats wrong with my xml file

ok im trying to learn xml so i can make mods because this sia lot easier then switching all my files aoround but i cant get it to work cause i get an error report when i try to open flmm with my mod int he mods folder this is what i have written in my script
i am trying to do sumthing simple so i can see if i can actual get it to work
in this case making the anubis buyable at manhatten


<header name="Total Annihilation">
<scriptversion>
1.0
</scriptversion>
<author>
SuBZeRo
</author>
<modurl>
www.lancersreactor.com
</modurl>
<description>
TOTAL WEAPONS CHANGE
Converted by SuBZeRo
</description>
</header>

<data file="data\equipment\market_ships.ini" method="sectionreplace">
<section>

[BaseGood
base = Li01_01_base

</section>
<dest>
marketgood = oe_package, 16, -1, 1, 1, 0, 1, 1
marketgood = gf2_package, 4, -1, 0, 0, 1, 1, 1
</dest>
</data>
</script>



Mess With the Best Die lIke the Rest

Post Mon Apr 28, 2003 10:33 am

</section>
<source>
marketgood = oe_package, 16, -1, 1, 1, 0, 1, 1
</source>
<dest>
marketgood = gf2_package, 4, -1, 0, 0, 1, 1, 1
</dest>
</data>

..should work

Post Mon Apr 28, 2003 7:25 pm

thats the only thing wrong do i need to do that for everything i change like give it a seoeratr line like that?

Mess With the Best Die lIke the Rest

Post Mon Apr 28, 2003 8:09 pm

i still egt an errror

Mess With the Best Die lIke the Rest

Post Mon Apr 28, 2003 8:12 pm

ahha i found it tout i didnt have <script> at the beginning DUH lol

Mess With the Best Die lIke the Rest

Post Mon Apr 28, 2003 8:56 pm

ok now its not working again i cant get it to work
this is what i have now

<script>
<header name="Total Annihilation">
<scriptversion>
1.0
</scriptversion>
<author>
SuBZeRo
</author>
<modurl>
www.lancersreactor.com
</modurl>
<description>
TOTAL WEAPONS CHANGE
Converted by SuBZeRo
</description>
</header>
<data file="data\equipment\market_ships.ini" method="sectionreplace">
<section>
[BaseGood
base = Li01_01_base
</section>
<dest>
marketgood = oe_package, 16, -1, 0, 0, 1, 1, 1
</dest>
<source>
marketgood = oe_package, 16, -1, 1, 1, 0, 1, 1
</source>
<dest>
marketgood = gf2_package, 4, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = gf2_package, 4, -1, 0, 0, 1, 1, 1
</source>

</data>
</script>

i dunno what wrong with it it just wont work it loads in the flmm bnut when i load fl it doesnt chnage the file

Mess With the Best Die lIke the Rest

Post Mon Apr 28, 2003 10:14 pm

hey dude,
could be wrong but i think its because your trying to make the anubis on sale before deleting the other ship - each planet can only have 3 on sale at one time.
i switched em round and it seems to work fine.

code below;

<data file="data\equipment\market_ships.ini" method="sectionreplace">
<section>
[BaseGood
base = Li01_01_base
</section>
<dest>
marketgood = gf2_package, 4, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = gf2_package, 4, -1, 0, 0, 1, 1, 1
</source>
<dest>
marketgood = oe_package, 16, -1, 0, 0, 1, 1, 1
</dest>
<source>
marketgood = oe_package, 16, -1, 1, 1, 0, 1, 1
</source>
</data>


im kind of new at this scripting thing myself but i think that was the prob.


was that what you were looking for with the titan by the way?


dr del


looking at the world today it sometimes seems a pity noah and his family hadent missed the boat

Post Mon Apr 28, 2003 10:17 pm

what exacly says the error message?
which version of FLMM do you have (0.8, 0.9, 1.1??)

maybe you have "spaces" at the end of the lines?
I remember that older versions of FLMM have problems with trailing spaces..
I don't know if it was fixed...

so, delete all trailing spaces and comments

Edited by - skyshooter on 28-04-2003 23:31:52

Post Mon Apr 28, 2003 10:49 pm

I HAVE THE NEWEST MOD AND FIGGED OUT THE PROB STUPID ONE LINE ONLY COMMANDS

Mess With the Best Die lIke the Rest

Post Tue Apr 29, 2003 12:02 am

ermm still need help see i know basics liek whatthat u can only have 3 ships for sale
but now im trying to change all 3 ships for sale on manhatten and it no work ermm if u wanna fig it out iwht me IM on aim SuBZeRo69069

Mess With the Best Die lIke the Rest

Post Tue Apr 29, 2003 2:13 am

well rapid was adding new ships which is why he changed the names of the ship packages - your trying to use existing ones which are already listed under that base so you only need to change the values next to them not the names (if you see what i mean) this is what i mean about looking for the reason the script is written the way it is.
the script idea is a great way to make the mods smaller and easier to use but it does mean learning the syntax (which im still doing) and understanding the structure of the changes you want to make so you can decide on the best way to achieve it.
i found using the forum search button and looking at other peoples scripts helped me the most in the beginning. that way i could go look at the ini they were working on and see what the changes would actually do.

lets keep this in this topic - save me having to skip around pages to see whats happening ;-)


dr del


looking nervously for his chib

Post Tue Apr 29, 2003 2:29 am

hmmm see i looked at other files right? and in them i ooked specificly for replacement commands, and what im doing with my ships is what they are doing replacing sumthing pre existing, like the beam mod, that comes with flmm 1.1 it has it and im guessin it works cause it came with it and it uses the same priciples as i am doing, changing me buyable ships is like chnaging the weps and stuff in the beam mod, but what i can understand is why one ship never loads but th other 2 that i chnaged do
this is what i have:

<script>
<header name="Total Annihilation">
<scriptversion>
1.0
</scriptversion>
<author>
SuBZeRo
</author>
<modurl>
www.lancersreactor.com
</modurl>
<description>
TOTAL WEAPONS CHANGE
Converted by SuBZeRo
</description>
</header>

<data file="data\equipment\market_ships.ini" method="sectionreplace">
<section>
base = Li01_01_base
</section>
<dest>
marketgood = gf2_package, 4, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = bhf_package, 4, -1, 1, 1, 0, 1, 1
</source>
<dest>
marketgood = lf_package, 1, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = cof_package, 8, -1, 1, 1, 0, 1, 1
</source>
<dest>
marketgood = lfr_package, 1, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = bwf_package, 4, -1, 1, 1, 0, 1, 1
</source>
</data>
</script>

i mean i thinkt hat the way its written it should work because 2 out of the 3 ships owrked but not the 3rd, im also still new at this so if u xplain laymans terms please well as simple i aint that dumb lol, but i dun know what else to try if u can take a crack at it, to see if u can get it to work cause i am at aloss of what to do for it.

thanx again


Mess With the Best Die lIke the Rest

Post Tue Apr 29, 2003 3:03 am

<script>
<header name="Total Annihilation">
<scriptversion>
1.0
</scriptversion>
<author>
SuBZeRo
</author>
<modurl>
www.lancersreactor.com
</modurl>
<description>
TOTAL WEAPONS CHANGE
Converted by SuBZeRo
</description>
</header>

<data file="data\equipment\market_ships.ini" method="sectionreplace">
<section>
base = Li01_01_base
</section>
<dest>
marketgood = gf2_package, 4, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = gf2_package, 4, -1, 0, 0, 1, 1, 1
</source>
<dest>
marketgood = bhf_package, 4, -1, 0, 0, 1, 1, 1
</dest>
<source>
marketgood = bhf_package, 4, -1, 1, 1, 0, 1, 1
</source>
<dest>
marketgood = lf_package, 1, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = cof_package, 9, -1, 1, 1, 0, 1, 1
</source>
<dest>
marketgood = lfr_package, 1, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = bwf_package, 5, -1, 1, 1, 0, 1, 1
</source>
</data>
</script>

This works, but it switches it around? If I remove the top two dest/source groups, then the bottom two ships just show, but if I leave the top two in there, then only the top one shows?

Post Tue Apr 29, 2003 3:59 am

hi dude,

its because the changes have to be made in order of the lines placement in the ini file. (just spent ages finding that out ;-)

sub,
the only reason 2 of them showed up is they were after it had read the original (unaltered in your version) line telling it they werent on sale then it found a line that said it was.

the working version of the script is pasted below
remember to replace the other end of the square bracket this forum seems to delight in removing.

<script>
<header name="Total Annihilation">
<scriptversion>
1.0
</scriptversion>
<author>
SuBZeRo
</author>
<description>
TOTAL WEAPONS CHANGE
Converted by SuBZeRo
</description>
</header>
<data file="data\equipment\market_ships.ini" method="sectionreplace">
<section>
[BaseGood
base = Li01_01_base
</section>
<dest>
marketgood = gf2_package, 4, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = gf2_package, 4, -1, 0, 0, 1, 1, 1
</source>
<dest>
marketgood = bwf_package, 4, -1, 0, 0, 1, 1, 1
</dest>
<source>
marketgood = bwf_package, 4, -1, 1, 1, 0, 1, 1
</source>
<dest>
marketgood = cof_package, 8, -1, 0, 0, 1, 1, 1
</dest>
<source>
marketgood = cof_package, 8, -1, 1, 1, 0, 1, 1
</source>
<dest>
marketgood = lf_package, 1, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = lf_package, 1, -1, 0, 0, 1, 1, 1
</source>
<dest>
marketgood = lfr_package, 1, -1, 1, 1, 0, 1, 1
</dest>
<source>
marketgood = lfr_package, 1, -1, 0, 0, 1, 1, 1
</source>
<dest>
marketgood = bhf_package, 4, -1, 0, 0, 1, 1, 1
</dest>
<source>
marketgood = bhf_package, 4, -1, 1, 1, 0, 1, 1
</source>
</data>
</script>

ive tested this and it works fine ;-)

your old way could be made to work after a fashion but it would be well sloppy coding dude - you wouldnt have a hope of faultfinding it later if things started going wrong.

i also got an error where flmm wouldnt start because i had stuffed up the saving format - scared the hell out of me till i worked it out.it just said the exe had encountered an error and quit after installing the mod .

its 4 am for me so i probably wont get your answer for another 12 hours but i will check back in the thread when i get in from work ok.


dr del

beaten to a pulp with the ugly stick at an early age

Post Tue Apr 29, 2003 6:30 am

The reason for the effect u had is very simple:
The INI files are read step by step.
See it as a kind of deactivate 1 ship - then activate another - every line replacing itself.
If u only replace an existing buyable ship (i.e. lf_package) with a non buyable one (i.e. bwe_package) you get as a result 2 lines referring to the bwe_package.
The 1st line (your added one) will activate the ship for buying - BUT the other existing on (some lines later in the INI) will deactivate it!!!

The reason is, that the programmers EVER put ALL ships in a base (equal if buyabvle or not)!
Btw, only adding lines for the buyable ships would have done the same.
Means, if u make a new Base, just makle those 3 lines of the buyable ships in that section.

Return to Freelancer General Editing Forum