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

Little Niceties

The general place to discuss MOD''ing Freelancer!

Post Tue Apr 20, 2004 11:18 am

Little Niceties

A lot of questions are asked on this forum, and most of them get answered.

But, maybe it would also be nice, to post it if you've found out how something can be done, even when it's not asked. Of course, not just anything, but something that you think might be nice to other modders, and by itself is not enough to be called "tutorial".

Maybe this is not a good idea at all. But, speaking for myself, I've often had a moment when I was glad that I'd found out something. Nevertheless I've never contributed such things to this forum, because they were never worth the name "tutorial" (and also because I'm too lazy to write one), and they never occured when someone asked for it.

Anyway, in case this "little niceties" thread is a good idea, i'd like to begin with a way to have the Bretonian Armed Forces actually use gunboats, destroyers and battleships in random encounters.

Post Tue Apr 20, 2004 11:23 am

Encounters with gunboats, destroyers, and battleships

Disclaimer

It is NOT, in any way, my intention to suggest I've found this by myself, as I've read many, many things on these forums that were the result of other people's hard labour. But as I recently found this out, I am still in a mood to write it down (in time, it will become more common to me and not worthwile to document it, and that's probably often the case with many people.) I wouldn't know who to credit in particular, so I won't even bother

Anyway, the following steps will have the Bretonian Armed Forces actually flying around in gunboats, destroyers, and battleships, each escorted by 2 fighters.




1. Create A New Encounter File

Create in DATA\MISSIONS\ENCOUNTERS a new file called area_gunboats_escort.ini

NB the closing bracket (the mirrored version of [ ) does NOT show on this forum, but it should be there! Mind that if you copy-and-paste.



[EncounterFormation
ship_by_class = 1, 1, sc_gunboats
pilot_job = armored_job
ship_by_class = 0, 1, sc_fighters
pilot_job = escort_leader_job
ship_by_class = 0, 2, sc_fighters, -1
pilot_job = escort_job
formation_by_class = gunboats
behavior = wander
arrival = all, -object_all
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite

[Creation
permutation = 0, 5



NB When you study the encounter files, you see that you rather easily design your own, by combining things from the various files. Make sure you initialize them in the starsystem where you want them (Step 4)


2. Rename the references to the ships the faction uses in faction_prop.ini

Go to the section:

[FactionProps
affiliation = br_n_grp


Change in DATA\MISSIONS\faction_prop.ini , the following lines



npc_ship = br_n_br_gunboat_d1-7
npc_ship = br_n_br_gunboat_d8-19
npc_ship = br_n_destroyer_d22
npc_ship = br_n_battleship_d25




into these ones:



npc_ship = br_n_br_gunboat_d1-7
npc_ship = br_n_br_gunboat_d8-17
npc_ship = br_n_destroyer_d18
npc_ship = br_n_battleship_d19





3. Modify the ships the faction uses in npcships.ini

Change in DATA\MISSIONS\npcships.ini , the following lines:



[NPCShipArch
nickname = br_n_br_gunboat_d1-7
loadout = br_n_br_gunboat_loadout01
level = d6
ship_archetype = br_gunboat
pilot = gunboat_default
state_graph = GUNBOAT
npc_class = lawful, class_gunboat, d1, d2, d3, d4, d5, d6, d7

[NPCShipArch
nickname = br_n_br_gunboat_d8-19
loadout = br_n_br_gunboat_loadout02
level = d10
ship_archetype = br_gunboat
pilot = gunboat_default
state_graph = GUNBOAT
npc_class = lawful, class_gunboat, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19

[NPCShipArch
nickname = br_n_destroyer_d22
loadout = br_n_br_destroyer
level = d22
ship_archetype = br_destroyer
pilot = destroyer_default
state_graph = CRUISER
npc_class = lawful, CRUISER, d22

[NPCShipArch
nickname = br_n_battleship_d25
loadout = br_n_br_battleship
level = d25
ship_archetype = br_battleship
pilot = destroyer_default
state_graph = CRUISER
npc_class = lawful, battleship, d25




into these ones:



[NPCShipArch
nickname = br_n_br_gunboat_d1-7
loadout = br_n_br_gunboat_loadout01
level = d6
ship_archetype = br_gunboat
pilot = gunboat_default
state_graph = GUNBOAT
npc_class = lawful, class_gunboat, d1, d2, d3, d4, d5, d6, d7

[NPCShipArch
nickname = br_n_br_gunboat_d8-17
loadout = br_n_br_gunboat_loadout02
level = d10
ship_archetype = br_gunboat
pilot = gunboat_default
state_graph = GUNBOAT
npc_class = lawful, class_gunboat, d8, d9, d10, d11, d12, d13, d14, d15, d16, d17

[NPCShipArch
nickname = br_n_destroyer_d18
loadout = br_n_br_destroyer
level = d22
ship_archetype = br_destroyer
pilot = destroyer_default
state_graph = CRUISER
npc_class = lawful, class_gunboat, d18

[NPCShipArch
nickname = br_n_battleship_d19
loadout = br_n_br_battleship
level = d25
ship_archetype = br_battleship
pilot = destroyer_default
state_graph = CRUISER
npc_class = lawful, class_gunboat, d19





4. Add the encounter-file reference to the starsystem-of-your-choice.ini file

Let's say you want them in Leeds (Br04.ini). Add to Br04.ini the section:



[EncounterParameters
nickname = area_gunboats_escort
filename = missions\encounters\area_gunboats_escort.ini




5. Add the actual encounter to the starsystem-of-your-choice.ini file

Let's stich with Leeds (Br04.ini) as an exapmle, and let's say you want them around Battleship York.

Go to the section:

[zone
nickname = zone_pop_br04_bs_york



in this section, you see the lines:

[quote
pop_type = br_n_grp, single_base_law
relief_time = 20
faction_weight = br_n_grp, 30
density_restriction = 4, unlawfuls
encounter = area_defend, 5, 0.400000
faction = br_n_grp, 1.000000


Add the following lines:



encounter = area_gunboats_escort, 17, 0.50000
faction = br_n_grp, 1.000000
encounter = area_gunboats_escort, 18, 0.50000
faction = br_n_grp, 1.000000
encounter = area_gunboats_escort, 19, 0.50000
faction = br_n_grp, 1.000000




Well, that's about it. You will now have gunboats, destroyers and battleships flying around the base, each of them accompanied by a couple of fighters. There might even be way too much for youur taste (In fact, when I just tried it, there apparently were so much that one spawned so close to Battleship York, that it was stuck in it, or so it seemed, and by trying to break free, it got burning and blew up, which was bery weird to watch.). In that case you sbould lower the 0.xxxxxx-number at the end of each encounter line. If you want more, make the numbber higher :p . Btw, it cannot be more than 1.000000 (actually I don't know that for sure, but it doesn't seem logical to do so and it's never in the original ini's that way.)

The integer directly after the encounter (area_gunboats_escort) is the ship class. 1 to 17 are gunboats, 18 is the destroyer and 19 the battleship.

It Is not necessary to have them all there; if you just want a destroyer flying around, and a chance of 37 percent meeting it, than just add:



encounter = area_gunboats_escort, 18, 0.37000
faction = br_n_grp, 1.000000




Well, I hope I haven't forgotten anything, because that would render you a desktop crash...




Edited by - moonhead on 4/20/2004 12:30:30 PM

Edited by - moonhead on 4/20/2004 1:22:30 PM

Post Tue Apr 20, 2004 11:34 am

I was wondering whether to post something on story missions here, because plenty of people seem to want to change them, and I've figured out how to do it, but it's a big undertaking as once you change one you have to follow it up in all the rest. Would anyone be interested in making/editing story missions?

"There are 10 kinds of people in this world: those who understand binary and those who don't"

Post Tue Apr 20, 2004 11:45 am

Certainly I would! I'm not a big fan of MP in any game, and I've been left on Manhatten feeling lonely at the end of the story missions more times than I'd care to admit. Some changes to freshen it up would be really nice.

Post Tue Apr 20, 2004 12:16 pm

Darkstone, I'm sure many people will absolutely love that! I even think that would probably qualify as a real tutorial!(Personally, I'm the opposite of Rsdnt-Evle and never even played SP.)


Anyway, here is another little nicty:


Adding simple info-bribes to your bases

You enter a bar and a fat guy with a green fancy suit tells you: "I'll upload all of the info on the Freeport 6 into your Neural Net"...

Here's how do you make a NPC say that:


1. Add in DATA\MISSIONS\mBases.ini :

to the lines making up the character of your choice (I wont explain that, if you don't understand then fist start to figure out how mBases.ini works.) :



know = 251703, 252715, 10000, 1
knowdb = bw09_03




explanation:

# the 1st number is an ids_name (not in the ids_info / xml-format, what I'd expected, but plain text). You can put your own ids_name here

# the 2nd number is the bribe-identification; a number that will be used in the KnowledgeMap.ini file (we will bother with that in step 2)

# the 3rd number is the price the player has to pay for the info

# the 4th number decides when the NPC will offer the player the info-bribe. If 1, it will be the 1st time the player meets him; if 3, it's on the 3rd time. If I'm correct, 3 is the highest number used in the original mBases.ini; I don;t knwo if it's possible to go higher than 3.

# the object mentioned after knowdb = is the object which location will be uploaded into your Neural Net, in this case Freeport 6




2. Add in DATA\DATA\INTERFACE\KnowledgeMap.ini :



Map = 252715, bw09_03, 31
Map = 252715, bw09, 1




explanation:

# Note that these two lines form a pair; there are also types of bribes that use 3 or 4 lines; I have not (yet) a clue how these work (that's why the word simple is in the title )


First line:

# the first number is the bribe-identification

Now, this is the important part: the number 252715 is how the game seems to identify this particular bribe. The game never uses the same number for another bribe, not even when it's the same info that's offered. This number has to be unique.

The first number you can use is the one I use here: 252715. If you want to create another infor-bribe, you have to use 252716, etc. I have no idea there is a limit here.

# bw09_03 is the object which location will be uploaded into your Neural Net (Freeport 6 in this example)

# "31" seems to indicate what must happen (I changed this to "1" and the only thing what happened then was that my money went to the guy selling the info, and the Tau-29 map popped up, but Freeport 6 was not shown and also not uploaded to my NeuroNet.)


Second line

# the first number is the bribe-identification; this should be the same number as in the first line.

# well, that's simple: the system the object is in.

# "1" actually haven't experimented with that, as I already got the desired result without changing it.



That's it. A last remark: the chance of this bribe actually being offered to you, depends first on the chance if he indeed appears (if there are a lot of NPC's at the base, but a low density in the bar, or on the deck if you want him there, there is only a small chance of him appearing) and secondly on what the NPC has to offer in total; he will only offer 1 thing at a time, so if he already heas 5 rumors and 4 bribes to share, the chance of the info-bribe being offered, is only 10% IF the NPC actually shows up.



Edited by - moonhead on 4/20/2004 1:18:08 PM

Post Tue Apr 20, 2004 1:11 pm

can help you out with the last numbers moonhead - the bw09, 1 : the system, 1 = visited (tau 29 comes up on your map). bw09_03, 31 : the base, 31 = landed there and got the info on it.

These numbers equate to visit = <n> in the system .inis...

If you wanted say pittsburgh to show on map when you start a new game you could put visit = 1 into its definition in universe\systems\li01\li01.ini and if it is to show info then visit = 31

+++ out of cheese error - redo from start +++

Edited by - Anton on 4/20/2004 2:11:32 PM

Post Tue Apr 20, 2004 1:53 pm

Anton,

I much appreciate that info!! I wouldn;t have guessed that, becasue I only knew the values 0, 1 and 128 for the visit = parameter (the last meaning "never show up on map, remain unknown", even after being visited)

Post Wed Apr 21, 2004 10:52 am

Got around to posting the tutorial, everyone who's interested. Check the Tutorial forum

"There are 10 kinds of people in this world: those who understand binary and those who don't"

Return to Freelancer General Editing Forum