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

Can class 10 be breached?

The general place to discuss MOD''ing Freelancer!

Post Tue Feb 01, 2005 6:18 pm

Can class 10 be breached?

ok this question has probably got a huge sense of humour so laugh away!

Q: Is it possible to mod in a class 11 shield or weapon? or does this just not happen?

I've looked all over the forums, tutorials but no one seems to have asked this question! (probably been deleted for being too silly!)

any reply is welcome!

P.S. If it is possible, can someone point me at the ini/dll/whateverfile??
THANKS!

Max_X_Fire

Post Tue Feb 01, 2005 10:43 pm

I believe it's possible if you edit the shiparch file and the weapon_equip file.

Post Tue Feb 01, 2005 11:37 pm

No, fraid its not possible afaik

Post Wed Feb 02, 2005 12:54 am

I've tried it with the inis and the system just doesn't recognise them.

Post Wed Feb 02, 2005 2:03 am

damn it! I was afraid that would be the case! I take it the "Max_class" or something is hardcoded then... booo! How long till the source code is released? lol

Oh well, back to the drawing board!

Thanks guys

Max_X_fire

Post Wed Feb 02, 2005 2:45 am

While my brain is ticking, got another question!

What about the oposite direction, class 0 weapons. Could they be equipped to a player ship? class 0 is used by npc's so I'm guessing it would be ok.

We are trying to create new ships some of which have unique weapons and sheilds but we dont want people putting them on other ships so would making a class 0 weapon mean it couldnt be mounted on ANY ship or can ANY ship mount class 0?

again, thanks for any replies

Max_X_Fire

Post Wed Feb 02, 2005 5:25 am

One way is to give the ship the guns through goods.ini. The ship will be equipped with the guns when you buy it, then if you go into shiparch and delete the lines hp_gun_special_6, HpWeapon 01.....etc (all of them) the mounts will be invisible and you wont be able to take the guns off

Post Wed Feb 02, 2005 6:52 am

Parabolix! Your a genious! tried everything but that, nice one!

Have u tested this or is it just an idea? sounds like exactly what we want though, so we'll give it a shot!


EDIT- On second thoughts not too great! This is needed for a server side mod so that players can buy this ship with unique weapons and not be able to transfer them to say the eagle...

Cheers for the post anyway!

Max_X_fire

Edited by - Max_X_Fire on 2/2/2005 7:51:09 AM

Post Wed Feb 02, 2005 7:20 am

I looked in the common.dll Hex, and I saw the list of each class, from 1 to 10.
I am sure there's a way to add some, but I am not real good at Hex editing.

Post Wed Feb 02, 2005 8:06 am

Had a look in the common.dll, I think you might be on to something! however I'm pretty useless at hex editing too, so I'll need to get the others to have a look at it! could do with a tool to unhex it into a language i understand!!

if we find anything useful, I'll post it up! this could change freelancer modding quite a bit if we can pull it off!

Thanks everyone

Max_X_Fire

Post Wed Feb 02, 2005 9:58 am

You could just do away with all of the class 1 weapon entries and rename them as class 2. Just keep all the stats the same, there aren`t any ships that can only mount class 1`s anyway.
Then in shiparch, delete every reference to the class 1`s, like,
hp_type = hp_gun_special_1, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04
Now the ships can only mount class 2 and above weapons. The class 1`s are only for your specialist weaps..
The only problem with this is how many of these ships will u be using? If a player buys specialship1 then buys specialship2, they will be able to transfer between the two. Not the end of the world but there u go.
I think u can edit the actual text for gun/missile class 1. There is an entry in resources.dll at 946 saying ,"gun-class 1". If u edit it it should work ok.

Post Thu Feb 03, 2005 10:39 am

Just had another thought about this, if u didn`t add the class 1 weapons onto even the special ships they wouldn`t be able to transfer ther different special weapons between the two. Shiparch allows u to mount weapons onto the ship of an allowed class, but goods.ini can force ships to mount a weapon onto a hardpoint without even looking in shiparch. You just need to delete any reference to the hpmounts that u are going to use. So if the special guns are mounted onto HpWeapon01 and HpWeapon02, just remove them from the shiparch.

Post Thu Feb 03, 2005 12:32 pm

You won't be able to add more gun etc types by hex editing i'm afraid because you'll foul up the way fubctions in the dll reference their data (by offset).

There is one way i know of adding another gun type (it comes up with no class <n> bit) which is to use hp_gun, hp_turret. If you than code a gun to mount on these you can have an extra type of guns for capships or whatever. I'm using them for fighters, with the leveled guns for transports, gunboats etc to prevent cheat gun mounting...

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

Post Thu Feb 03, 2005 11:11 pm

I believe there are two ways of referencing data in dll's though, one is by reference, and one is by command function names if the offset way(the fast way) fails... thats why a lot of programs can be optimized by relinking the dll's properly so the offset referencing actually works, because often times companies will update them and break the offset stuff, so dll loading becomes slower... correct me if I am wrong

Post Fri Feb 04, 2005 1:30 am

In terms of a program calling a function you are quite right. However the string data concerned is accessed by offset in compiled code. The strings hp_gun_special1 etc are string constants so you can change it to be the same length, or shorter (terminating with a 0 byte), because the program will still be able to find it in the right place. Making the name longer or adding new ones will break the dll and therefore freelancer as we cannot recompile anything. This is the basis of my common.dll hack that allows The Order, Nomads and other hidden factions to be displayed on the rep board (can be found in the download section) by zeroing out the faction name filters.

Anton's brief code class dismissed

Return to Freelancer General Editing Forum