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

****NEWBIE QUESTIONS?? - look no further2!!****

The general place to discuss MOD''ing Freelancer!

Post Thu Nov 27, 2003 7:16 am

Chips, not succesful in the patrol scheme i'm making, i revert back to populating the space instead.

All I do for LOVE

Post Thu Nov 27, 2003 12:07 pm

@ SoundSpawn - are you testing this on a LAN or in SP? Cos if its SP, and specially if its OpenSP or story, the factions are 'set' to how much they like you. Need to include the faction in that methinks

Post Fri Nov 28, 2003 9:56 am

I've tested this on lan as well as internet (with a personal server I have). Both ways I haven't been able to make a new faction start hostile or friendly to me, always neutral.

Post Fri Nov 28, 2003 11:16 am

mpnewcharacter.fl file might hold the 'key' to your looking i would have thought. There must (i don't do much modding specifically for MP) be a file that controls the rep you have when u start the game instead, much like changing the starting location, or the starting money. I am guessing its this one for now. Think save game editors open this type of file. Anyways, tutorials forum - at the top is a thread for changing MP starting characters

Post Sat Nov 29, 2003 3:33 am

Thanks, that's exactly what I was looking for. I have another small problem now though. In the shiparch.ini there's a path to the cmp, and a path to the mat files. What I did was made a copy of the Sabre, changed the stats and everything, then assigned a new mat file. The new mat file of course had different textures. My plan was to have two ships that looked the same, but had different paint jobs. The problem is that Now all the Sabre's (the original, and my copy) look the same. I figured that since the mat file has a reference to a tga file, I could change the reference and the tga's filename, so I added "_c1" to all the entries, but that didn't help. The only thing I can figure now is that when the ship is rendered on screen, it pulls the texture name out of the cmp file, then looks to a database of all mat files to get the right texture. Since my copy and the original are both looking for the same texture name (Like "l_elite_256" or whatever), it has sorta a random chance of grabbing the one that links to the _c1.tga file as it does the original .tga file. I know that can sound confusing (I just confused myself), so I'll break it down a little too.

Shiparch.ini has:
Original sabre
archtype = sabre.cmp
material_library = bw_ships.mat

New sabre
archtype = sabre.cmp
material_library = customsabre.mat

bw_ships.mat has:
material library - a bunch of nodes containing filenames to textures
texture library - a bunch of nodes containing .dds files

sabre.cmp has:
references to the material library nodes. It calls upon the material, the material looks in the texture library and grabs the right texture.

since my sabre and the original sabre use the same cmp file (with the same references to material library nodes), both of them look for the same entry. Now even though they have two different mat files, it seems they will grab the same texture, since they lookup the same material library node (both are named the same because I can't find where in the cmp the material reference is, and I can't import the cmp without loosing the hardpoints). Is there any way to make the right mat file connect to the right ship, or do I have to import the ship, remake the hardpoints, change the material names (in the cmp), re export the model, and then use my modified mat file. Hope one of these two ways of explaining my problem worked... Thanks in advance, and thanks again for the help with the factions.

Post Sat Nov 29, 2003 4:32 am

Okay - the mat files seem to be stipulated in other ways inside the CMP files (I personally haven't looked, but i did try changing mats a long time ago).

The mat files must be referenced in more than just names, as i have tried renaming mat files. Also - there is a prob with just renaming the CMP file and then changing stuff as well. It seems that if you then put new HP's on the CMP file, that if you (say) put an extra 5 turrets on something, and then your new CMP and old CMP are in the same system (ie, NPC's flying original Rhino, you flying your new Rhino) that it will in fact be one of the other, NOT both. Either the NPC's will be using your CMP, or you using theres (and hence not haviing those new mounts etc).

From that, it stands to reason that you therefore might not even see the nwe mat even if you got it working - so test away from NY instead. Just try changing the skin on the normal ship first, then try doing it to a 'clone'. Wonder if you cannot just reference more than one type though, and if not, why not?! LOL

Post Sat Nov 29, 2003 5:35 am

That's exactly what I'm thinking too. I did get an alternate skin to work on all four ships I've tried. The big thing I noticed is that I have a custom leigonaire, and in the same system there are original titans. The titans have my custom skin as well. For some reason it seems to draw from the same mat file, even though they are using seperate ones. I think that when freelancer starts up, it grabs all the mat files referenced in shiparch.ini, and loads all the materials and textures into one data structure. That would mean that as long as two ships are using the same reference to a material (bw_elite_256 or whathaveyou), they will pull up the same texture, even if one mat file says bw_elite_256 goes to texture1.tga and the another mat file says bw_elite_256 goes to texture2.tga. You'd think that wouldn't be the case however, because if it was, there would be no need for mat files, the textures and materials would just be stored in the cmp file and no references would be needed. Either a case of Microsoft going overboard with a concept that's not needed, or perhaps they were going to implement it, and gave up before completion. It wouldn't be the first thing to appear that way either, like with the regen rates on npcs... It seems they had an intention to make it used, then decided not to, otherwise it wouldn't be so easy to mod, they wouldn't have had the hardcode support it unless they thought at one point they would need it.

Post Sat Nov 29, 2003 7:07 am

I now have no clue what's actually happening behind the scenes. I made a copy of the pi_fighter directory, made a copy of the ku_playerships.mat, and changed the names of everything in the new .mat file. I added _c1 to all the nodes, and the strings in the name fields of the material nodes. I also changed the names of all the textures to include _c1.tga... I made a base that sell my custom legionaire and the original, and when I go to the ship dealer, both ships show invisible (I know they go invisible when freelancer can't find the skins...). The weird part is that IF there is some data structure that holds all the info for the mat files, it would have k_fighter.tga for the original, and k_fighter_c1.tga for the new one, so even though I know the new ship would be invisible, the old one should still draw from the k_fighter.tga file in the ku_playerships.mat, and should therefor still show up. I also messed around with the other material library entry in the shiparch (it seems all ships show "envmapbasic.mat", and all it has is a grey square inside the file...), it appears to not do anything.

In short, it seems that no matter what you change in the new mat file, both the old and the new ships draw from the new mat file. Almost like there's something linking the cmp and mat files other than just shiparch.ini. Any clues/sugguestions?

Post Sat Nov 29, 2003 9:47 am

i think it is the model itself that is pointing out where or what mat file it should use. In your case, the player ship uses the mat file and it is the one that your model is pointing out. Now all other ships, that has the same model and same mat file structure uses it too. It happened to me two in my customized ship. I used one type of material called Glass for my canopy, but each have individual color, now when i use one of my ships, the other ships uses that same glass canopy color.

Now the conclusion is, it uses the current mat file structure or configuration that the player ship or the one you use as the default configuration for that other ships with the same mat configuration or structure.

It is easy to modify the mat structure for all customized ships, the one you modelled. It is just making sure that the materials don't look the same as the other modeled ships.

Now for the fl default ships, I think you need to recompile it in MS3d to implement your changes. This is very tedious work, and has no assurance whatsoever.

All I do for LOVE

Post Sat Nov 29, 2003 10:35 am

That would only explain part of what I've discovered though. You see, if I make a copy of the legionaire and get it working in the game, they both look exactly the same. Then I make a copy of ku_playerships.mat (has the textures for the legionaire, as well as kusari and other pirate ships), and change the textures to what I want. I then change the "material_library" entry in the shiparch.ini file for my new legionaire. Now all pirate ships and kusari ships look like my new one. So I figured the same thing, and decided to test it. I went in to my new mat file (symbiatelf.mat), and changed the names of the materials (changed k_fighter_256 to k_fighter_256_c1). Now when I go into the game, both the original and new legionaire are invisible. I know that they go invisible if freelancer can't locate the textures, but what I don't understand is why changing the names of the materials in my new mat file would effect the old ship. The old ship is still set up to use ku_playerships.mat, only my new one uses symbiatelf.mat, so in theory my new ship would have been invisible, but the original one would have been it's orignal texture.

If the cmp file holds the path to the mat file, it probably wouldn't be something you set in shiparch.ini, but for the sake of sanity we'll say it is. So the untouched legionaire cmp would call up ku_playerships.mat to get the textures, and it would load up the original ones. My custom ship (which I've tried using the same file, as well as copying the file to another location and referencing) would load the same ku_playerships.mat file and load the same original textures. That'd be one thing, but what I'm seeing is that when you have two cmps referencing two different mat files, it seems to just load one of the two mat files... and it seems to be the last listed in shiparch.ini, not a random thing.

Edited by - soundspawn on 29-11-2003 11:37:10

Post Sat Nov 29, 2003 7:33 pm

How do i make the detroit debris drop CERBERUS in stead of scrap metal ? and what file i need to work in ?

Post Sat Nov 29, 2003 8:26 pm

The only reason why poeple ask that is because they want to cheat in MP.

So, this means you cannot play the game, are lazy, don't want to really play, are lazy, don't care that this ruins the game, don't care that it causes lag, don't care that it will ultimately kill the game for you and get you BANNED from most servers.

I have said from day 1, i will NOT help people to cheat in MP.
Sorry,
Been asked to many times, if i reply like that, others asking for same thing will see what i have said. It aint all aimed at you, but then again, it kinda is

Sorry,
NO CHEATS THAT HARM MP FROM ME.

keep servers stable and clean, and play the bloody game instead.

Post Mon Dec 01, 2003 3:03 am

soundspawn,

when you look inside the cmp model file, you see a 3d mesh inside. that 3dmesh file references the material library now if a mat file has the same references as the other mat file, and that mat file is used by your current ship then the npc ships of the same cmp model will use the mat file your ship uses.

All I do for LOVE

Post Mon Dec 01, 2003 8:59 am

Alright, but then why does this happen:

If I take my new mat file (symbiatelf.mat) and change all the names of the nodes, also change the text part of the material library nodes, then in theory the original legionaire would call up the old materials (such as "k_fighter_256", and it would load the old textures. My new ship would either load the same material (because the cmp file holds a reference to a specific mat file), or it would know to look inside my symbiatelf.mat file. If it looks into my new file, it would look for "k_fighter_256", but that entry would not exist (I renamed it to "k_fighter_256_c1", so it would make my ship invisible (that's what happens when it can't find the texture it's looking for).

Sounds about right, but when I did this, both the old and new legionaire were invisible. Somehow changing the names of the materials inside symbiatelf.mat effected the materials the original legionaire uses (in ku_playership.mat). That's the part I don't understand. I triple checked to make absolutely sure that ku_playerships.mat wasn't altered in any way, and that the original legionaire really does reference ku_playerships.mat in the shiparch.ini file. No clue how the engine would relate the old legionaire to my new mat file though. I also tried making a copy of the cmp file, and renaming it as well, thinking that maybe the engine uses shiparch.ini to find the cmp and mat files, but then merges them for use. This didn't change my results at all. The only thing I can think of now is that when you make a model in milkshape, I remember reading that you have to make the first group a unique name because the exporter uses it for something... Perhaps on startup the engine opens shiparch.ini, loads all the models, then links the models to mat files (using that group name you set up back in milkshape). Since both cmp's would have that same nickname, it would link both the old cmp file, and my copy to the same mat file, regardless of what is in the shiparch.ini file. Can someone who has made a ship verify that whole group thing for me, because if that's not what's happening, I'm just about clueless.

Also, when you open up the cmp file, it has those "VMesh" things. I assume those are the actual 3-D data, but is there a way to extract that and view it? Do I just need to export and save it as a .3ds file or something?

Post Mon Dec 01, 2003 3:41 pm

and how on earth would making the CEREBUS apper from rox make a LAG i ask you??
In fact i dont belive any mods make a LAG at all
The game goes pretty fast for a 33.3k modem!!

Return to Freelancer General Editing Forum