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** - Changing MP Start Details, Adding New Pilots

Here you find the different tutorials on editing and MODing Freelancer

Post Thu Jul 07, 2005 1:04 pm

**Tutorial** - Changing MP Start Details, Adding New Pilots

First off,a primer:
newcharacter.ini is a database file for unique pilots, and clientside startup data.
mpnewcharacter.fl is a configurable template file for new characters. It calls for the entries in newcharacter.ini by use of %%VARIABLES%% (example)
most are serverside variables i.e the server does not ask your player's game for them. two are actually clientside and these are of the greatest interest.

now lets take a look at the pilot
I've marked what's serverside and what is clientside, and what variable names contain their data in mpnewcharacter.fl

**newcharacter.ini** legend:
the words following each / are matching variables found in mpnewcharacter.fl (they "hold" open places for the values found here in the 'database') - all square brackets have been replaced with {'s
SVS = Server's side is used
CLS = Client's side is used
NA = Not applicable, both are checked/used

**newcharacter.ini**
{Pilot} <-everything in {Pilot} is serverside.
nickname = trent
body = trent / %%BASE_COSTUME%% <-the server checks costumes.ini for this.
comm = trent / %%COMM_COSTUME%% <-unused
voice = trent_voice / %%VOICE%% <-unnecessary
body.anim = Sc_MLBODY_STND_000LV_A_31
thumb = interface\intro\objects\MULTI_blackdragonmale.3db
comm.anim = Sc_comm_body_unfold_female, Sc_headCOM

{Package} *there can be only one package. Don't ask me if it's possible for players to select ships here its not.*
nickname = ge_fighter <-NA
strid_name = 11051
strid_desc = 11551
ship = ge_fighter / %%PACKAGE%% <-SVS specifies ship. writes "ship_archetype = ship" to player file
loadout = MP_ge_fighter / %%PACKAGE%% <-SVS the starting loadout - Both this and the ship are included in the %%PACKAGE%% variable
money = 2000 / %%MONEY%

{Faction}
nickname = new_player *don't change or add more {faction} entries*
rep_group = co_ic_grp / %%FACTION%% <-CLS - when "initial_rep = %%FACTION%%" in mpnewchar.fl is decommented(enabled) this will be your faction. * note1
base = Li01_01_Base / %%HOME_BASE%% <-SVS - determines the spawning base
Package = ge_fighter / %%PACKAGE%% <-NA - selects the package. this is NOT alterable for the server or player - both need the same nickname here!
Pilot = trent <-CLS - selects a {pilot}

* note1: "house =" lines in mpnewcharacter.fl will cause crashes when you enable initial_rep, so remove them.

Edited by - Cold_Void on 11/22/2006 10:37:12 PM

Post Thu Jul 07, 2005 1:05 pm

now lets take a look at mpnewcharacter.fl - remember that it is a configurable template to create new characters. None of the values in it are static - they all depend on the newcharacter.ini database.

{Player}
name = %%NAME%% *do not edit, for obvious reasons*
initial_rep = %%FACTION%% <- this variable points to the clientside entry for rep_group in the database, allowing players to choose a faction rep.
rank = 0 <-this sets your beginning rank (because starting with credit doesnt affect it until you launch?)

money = %%MONEY%% <-money. this can be replaced with plain numbers, and the variable exploited.(more later)

*{pilot} owned values. the "pilot =" line on the player's newcharacter.ini tells the server which set of these to use for each player *
voice = %%VOICE%% <-points to voice. this is also redundant, and exploitable.

costume = %%BASE_COSTUME%% <-points to base_costume, the player's appearance on bases.
com_costume = %%COMM_COSTUME%% <-points to comm_costume, this is unused and exploitable.

system = %%HOME_SYSTEM%% <-this does not appear to be necessary, since newcharacter.ini doesn't specify. this variable *may* be exploitable.
base = %%HOME_BASE%% <-points to the starting base.

;//////////////visit = lines omitted for brevity

%%PACKAGE%%

Edited by - Cold_Void on 11/22/2006 10:18:15 PM

Post Thu Jul 07, 2005 1:05 pm

so how do we get these two files to do something useful, like assign optional costumes to players or start them somewhere else?
typically the answer is to edit the appropriate lines in newcharacter.ini, but direct substitutions for variables in mpnewcharacter.fl will work just as well. for example we can replace the variable %%BASE_COSTUME%% with trent,orillion,lonnigan,etc,any costume from costumes.ini and it will work. the variable %%HOME_BASE%% with Li01_01_Base etc.

that's just an example, but what this new exploit is about is variable substitutes. obviously, these have to be clientside or they're not very variable. what clientside values are actually used in stock freelancer - well none really, because you can't change them from inside the game and the extra pilots are not there.

But by adding pilots and rewriting the mpnewcharacter.fl template to exploit unused/redundant pilot properties we can give new players unique costumes(and locked or optional faction choice), starting locations, and possibly money. ships are not possible, afaik.

{Player}
name = %%NAME%%
;initial_rep = %%FACTION%%
rank = 0
group = %%COMM_COSTUME%% <- this tells the game to use the unused COMM_COSTUME variable to specify the faction, making it a pilot property. group/initial rep work the same, i just wanted to show the alternative way of doing this.
money = 2000
voice = trent_voice <-now we can use the voice variable somewhere else too.

costume = %%BASE_COSTUME%%
com_costume = trent <-where I borrowed %%COMM_COSTUME%% from.

system = %%HOME_SYSTEM%% <- again, this line doesn't do anything.
base = %%VOICE%% <- your {pilot} voice entries are now starting locations.

%%PACKAGE%% <-this can be replaced with "ship_archetype =" and regular loadout code if desired.

Edited by - Cold_Void on 11/22/2006 10:23:40 PM

Post Thu Jul 07, 2005 1:07 pm

final notes:
costumes are cached on starting flserver, you need to restart for changes to take effect. i don't recommend editing the costumes once accounts have been started.
new {pilot} entries(or removed ones) won't be recognized unless you A. delete accounts.cfg from games/freelancer/accts/multiplayer/ B. also restart flserver C. or delete all accounts,and restart.(thanks theJkWhoSaysNi,who first suggested fix A when C was all i had working). there may be a bug that changing the newcharacter.ini file causes account corruption/lock out from making new chars, again i don't suggest editing it once accounts have been created.

mpnewcharacter.fl can be changed in pretty much any way while the server is running without problems and will take effect on new characters immediately.

lastly a clean example of the new pilot database and .fl file

>NewCharacter.ini<
{Pilot}
nickname = trent_1
body = trent
comm = li_n_grp (liberty navy)
voice = Li01_01_Base
body.anim = Sc_MLBODY_STND_000LV_A_31
thumb = interface\intro\objects\MULTI_blackdragonmale.3db
comm.anim = Sc_comm_body_unfold_female, Sc_headCOM

{Pilot}
nickname = trent_2
body = orillion
comm = rh_n_grp (rheinland navy)
voice = Rh01_01_Base
body.anim = Sc_MLBODY_STND_000LV_A_31
thumb = interface\intro\objects\MULTI_blackdragonmale.3db
comm.anim = Sc_comm_body_unfold_female, Sc_headCOM

{Pilot}
nickname = trent_3
body = lonnigan
comm = ku_n_grp (kusari navy)
voice = Ku01_01_Base
body.anim = Sc_MLBODY_STND_DANC_000LV_A_28
thumb = interface\intro\objects\MULTI_blackdragonmale.3db
comm.anim = Sc_comm_body_unfold_female, Sc_headCOM

{Package}
nickname = ge_fighter
strid_name = 11051
strid_desc = 11551
ship = ge_fighter
loadout = MP_ge_fighter
money = 2000

{Faction}
nickname = new_player
rep_group = co_ic_grp
base = Li01_01_Base
Package = ge_fighter
Pilot = trent

>mpnewcharacter.fl<
{Player}
name = %%NAME%%
;initial_rep = %%FACTION%%
rank = 0
group = %%COMM_COSTUME%%
money = 2000
voice = trent_voice

costume = %%BASE_COSTUME%%
com_costume = trent

system = %%HOME_SYSTEM%%
base = %%VOICE%%

%%PACKAGE%%
Don't forget that your players will need a way to change their pilot = line in newcharacter.ini to access these new properties, flmm script is certainly the most accessible way right now, but a program to do so(with pilot preview pictures) would be more convenient (wink)
here's a simple mod-manager XML script for doing so:


<script>
<header name="Configurator" savesafe="true" exclusive="false">
<scriptversion>
1.3
</scriptversion>
<author>
You
</author>
<description>
Configurator
</description>
<options default="1:1">
<option name="Pilot" savesafe="true">
<item id="1" name="Trent 1">
</item>
<item id="2" name="Trent 2">
</item>
<item id="3" name="Trent 3">
</item>
</option>
</options>

<data file="data\characters\newcharacter.ini" method="filereplace" numtimes="1" options="1:1">
<dest>
Pilot = trent
</dest>
<source>
Pilot = trent_1
</source>
</data>

<data file="data\characters\newcharacter.ini" method="filereplace" numtimes="1" options="1:2">
<dest>
Pilot = trent
</dest>
<source>
Pilot = trent_2
</source>
</data>

<data file="data\characters\newcharacter.ini" method="filereplace" numtimes="1" options="1:3">
<dest>
Pilot = trent
</dest>
<source>
Pilot = trent_3
</source>
</data>
</script>


CVFC Server Configuration MOD and Faction and Character Selector MOD
(includes previews)

Edited by - Cold_Void on 11/22/2006 10:33:49 PM

Post Wed Jul 20, 2005 7:52 am

I can't find the games/freelancer/accts/multiplayer/ directory. Where is it or is it hidden?

Post Thu Jul 21, 2005 9:46 pm

in my documents

Post Tue May 30, 2006 9:39 am

I'm having a little trouble understanding all this, its not the content I just think its the use of language and its layout...

It looks like I have a tutorial to re-write if you don't mind...

I'm looking for a way to have multiple loadouts, multiple starting points and reps from a simple flmm choice...

Figuring out how to do that from this is going to be a pain hehe.

Edited by - oPwnagEo on 5/30/2006 10:40:24 AM

Post Sat Nov 18, 2006 4:21 pm

updated to make it a little less rambling, include an example script, and link to the full roleplay enhancement mod

Return to Freelancer Editing Tutorial Forum