Important MessageYou are browsing the archived Lancers Reactor forums. You cannot register or login. |
COMPLETELY removing class tags
The general place to discuss MOD''ing Freelancer!
16 posts
• Page 1 of 2 • 1, 2
I'm working on completely redoing weapon hardpoints for my mod, and I've looked in Resources.dll and others, but can't find where it generates the class of a gun. I can remove the " (Class " and " )" but not the class itself. I've checked every % entry in the dlls but can't find the one that generates it. Does anyone know where I could find this so I can completely remove the class tags? Any help would be appreciated.
I do hate it when people know the answer but wont give a tip to someone because he hasn't looked for hours on the forum.
Guns are classed by their entry in DATA\EQUIPMENT\weapon_equip.ini...
<pre><font size=1 face=Courier>hp_gun_type = hp_gun_special_8</font></pre>
So this one is a Class 8 gun and will mount on any Class 8 hardpoint.
In turn, the class capability of a ship's hardpoints is specified in the ship's entry in DATA\SHIPS\shiparch.ini...
<pre><font size=1 face=Courier>
hp_type = hp_gun_special_8, HpWeapon01, HpWeapon02
hp_type = hp_gun_special_7, HpWeapon01, HpWeapon02
hp_type = hp_gun_special_6, HpWeapon01, HpWeapon02
</font></pre>
This example means HpWeapon01 and HpWeapon02 on this particular ship can mount Class 6, Class 7 and Class 8 weapons ONLY.
Now with care, you can set aside certain guns to mount only on certain ships, by making those ships' hardpoints only mount one weapon class, and setting your selected guns for that ship to the same class.
Hope this helps gets you started.
Roleplay: - the art of self-deceipt!
Edited by - StarTrader on 9/5/2007 1:11:19 PM
Guns are classed by their entry in DATA\EQUIPMENT\weapon_equip.ini...
<pre><font size=1 face=Courier>hp_gun_type = hp_gun_special_8</font></pre>
So this one is a Class 8 gun and will mount on any Class 8 hardpoint.
In turn, the class capability of a ship's hardpoints is specified in the ship's entry in DATA\SHIPS\shiparch.ini...
<pre><font size=1 face=Courier>
hp_type = hp_gun_special_8, HpWeapon01, HpWeapon02
hp_type = hp_gun_special_7, HpWeapon01, HpWeapon02
hp_type = hp_gun_special_6, HpWeapon01, HpWeapon02
</font></pre>
This example means HpWeapon01 and HpWeapon02 on this particular ship can mount Class 6, Class 7 and Class 8 weapons ONLY.
Now with care, you can set aside certain guns to mount only on certain ships, by making those ships' hardpoints only mount one weapon class, and setting your selected guns for that ship to the same class.
Hope this helps gets you started.
Roleplay: - the art of self-deceipt!
Edited by - StarTrader on 9/5/2007 1:11:19 PM
@ Startrader
I'm not convinced that's what Oblivion is on about. I think he means removing the class 1,2,3 etc line in the loadout screen when you mount a weapon so it just gives the weapon name and not the class. The info is in the resources.dll i think, not 100% sure
Member of the HAVEN ADMINS community
http://talonstrike.co.uk/HavenAdmin/index.php
Gizmo Studios - Home to the Galactica mod series
http://gizmostudios.proboards38.com/index.cgi
Edited by - Gibbon on 9/5/2007 3:46:44 PM
I'm not convinced that's what Oblivion is on about. I think he means removing the class 1,2,3 etc line in the loadout screen when you mount a weapon so it just gives the weapon name and not the class. The info is in the resources.dll i think, not 100% sure
Member of the HAVEN ADMINS community
http://talonstrike.co.uk/HavenAdmin/index.php
Gizmo Studios - Home to the Galactica mod series
http://gizmostudios.proboards38.com/index.cgi
Edited by - Gibbon on 9/5/2007 3:46:44 PM
Gibbon got it straight on, StarTrader. I know full well how to mess with hardpoints in the .ini files and what happens when I do, I've even made a tutorial on things related to hardpoints. Apparently I wasn't clear on what I already knew when I first posted, but oh well. And yes, I have looked for a couple hours on the forums, looking for the information. If it's on the forums somewhere, either I'm blind or I didn't look hard enough.
@Gibbon
Thanks for making what I'm looking for easier to understand, I find explaining things in plain words rather difficult, I'm a very visual person . Anyways I looked through resources.dll a couple times, checking every single % entry (if you don't know what one of those is, it's code that produces variable text) to see if it's the one I was looking for, and I also found a list of strings that were 0-9, but I found nothing that removed the class number from the weapon name. I also looked in every other dll under the exe and dlls folders, but couldn't find anything. Unfortunately I'm thinking it's hardcoded, because I can't think of anywhere else it would be.
Edited by - 0blivion on 9/18/2007 4:15:24 PM
@Gibbon
Thanks for making what I'm looking for easier to understand, I find explaining things in plain words rather difficult, I'm a very visual person . Anyways I looked through resources.dll a couple times, checking every single % entry (if you don't know what one of those is, it's code that produces variable text) to see if it's the one I was looking for, and I also found a list of strings that were 0-9, but I found nothing that removed the class number from the weapon name. I also looked in every other dll under the exe and dlls folders, but couldn't find anything. Unfortunately I'm thinking it's hardcoded, because I can't think of anywhere else it would be.
Edited by - 0blivion on 9/18/2007 4:15:24 PM
I actually have the same problem as you Oblivion, i completely recoded the weapon classes to be ship type specific, LF, MF, HF, Fr and so on. I have the same issue as well that it will always stick a weapon class number after the weapon and i'm keen to remove this as well. I've renamed the weapon classes using the IDS numbers starting from 1525 to 1534 in Resources.dll but still get the same problem as you.
Member of the HAVEN ADMINS community
http://talonstrike.co.uk/HavenAdmin/index.php
Gizmo Studios - Home to the Galactica mod series
http://gizmostudios.proboards38.com/index.cgi
Member of the HAVEN ADMINS community
http://talonstrike.co.uk/HavenAdmin/index.php
Gizmo Studios - Home to the Galactica mod series
http://gizmostudios.proboards38.com/index.cgi
I've actually seen it in game, but did not think to note how it was done at the time :/ I believe it was an oversight in the coding of a certain weapon (a couple nomad ones).
At the risk of looking like the hind quarters of a burro, have you tried just entirely omitting the class entry line entirely? Cause I know I've had dyson turrets mounted on a cheasy little ship before.
At the risk of looking like the hind quarters of a burro, have you tried just entirely omitting the class entry line entirely? Cause I know I've had dyson turrets mounted on a cheasy little ship before.
I've done this in a mod a good while ago... It is in a resource dll, and as far as i remember the entries are single numbers. I lost the mod in question somewhere on a backup disk sadly. I remember losing the 'class' text but just getting <name> and a number after. If i get any other waves of memory I'll post it but best for now would be to search the resources for single char number entries.
This????
946, "Gun-Class 1"
947, "Gun-Class 2"
948, "Gun-Class 3"
949, "Gun-Class 4"
950, "Gun-Class 5"
951, "Gun-Class 6"
952, "Gun-Class 7"
953, "Gun-Class 8"
954, "Gun-Class 9"
955, "Gun-Class 10"
956, "Missile-Class 1"
957, "Missile-Class 2"
958, "Missile-Class 3"
959, "Missile-Class 4"
960, "Missile-Class 5"
961, "Missile-Class 6"
962, "Missile-Class 7"
963, "Missile-Class 8"
964, "Missile-Class 9"
965, "Missile-Class 10"
Or this?????????
1300, "0"
1301, "1"
1302, "2"
1303, "3"
1304, "4"
1305, "5"
1306, "6"
1307, "7"
1308, "8"
1309, "9"
1525, "Gun/Missile-Class 1"
1526, "Gun/Missile-Class 2"
1527, "Gun/Missile-Class 3"
1528, "Gun/Missile-Class 4"
1529, "Gun/Missile-Class 5"
1530, "Gun/Missile-Class 6"
1531, "Gun/Missile-Class 7"
1532, "Gun/Missile-Class 8"
1533, "Gun/Missile-Class 9"
1534, "Gun/Missile-Class 10"
1731, "Turret-Class 1"
1732, "Turret-Class 2"
1733, "Turret-Class 3"
1734, "Turret-Class 4"
1735, "Turret-Class 5"
1736, "Turret-Class 6"
1737, "Turret-Class 7"
1738, "Turret-Class 8"
1739, "Turret-Class 9"
1740, "Turret-Class 10"
This is all I could find.
946, "Gun-Class 1"
947, "Gun-Class 2"
948, "Gun-Class 3"
949, "Gun-Class 4"
950, "Gun-Class 5"
951, "Gun-Class 6"
952, "Gun-Class 7"
953, "Gun-Class 8"
954, "Gun-Class 9"
955, "Gun-Class 10"
956, "Missile-Class 1"
957, "Missile-Class 2"
958, "Missile-Class 3"
959, "Missile-Class 4"
960, "Missile-Class 5"
961, "Missile-Class 6"
962, "Missile-Class 7"
963, "Missile-Class 8"
964, "Missile-Class 9"
965, "Missile-Class 10"
Or this?????????
1300, "0"
1301, "1"
1302, "2"
1303, "3"
1304, "4"
1305, "5"
1306, "6"
1307, "7"
1308, "8"
1309, "9"
1525, "Gun/Missile-Class 1"
1526, "Gun/Missile-Class 2"
1527, "Gun/Missile-Class 3"
1528, "Gun/Missile-Class 4"
1529, "Gun/Missile-Class 5"
1530, "Gun/Missile-Class 6"
1531, "Gun/Missile-Class 7"
1532, "Gun/Missile-Class 8"
1533, "Gun/Missile-Class 9"
1534, "Gun/Missile-Class 10"
1731, "Turret-Class 1"
1732, "Turret-Class 2"
1733, "Turret-Class 3"
1734, "Turret-Class 4"
1735, "Turret-Class 5"
1736, "Turret-Class 6"
1737, "Turret-Class 7"
1738, "Turret-Class 8"
1739, "Turret-Class 9"
1740, "Turret-Class 10"
This is all I could find.
@ FlyByU, the numbers at 1300 are to do with the NAVMAP bud, thier the numbers you see down the left hand side of it.
@ Oblivion, I'm afraid that the actual class number is hardcoded, in the Common.DLL there are entries for every hardpoint type (hp_gun_special_X etc), they are stored in a descending order (10,9,8 etc), the number is generated by in game code from this order. I swapped the hp_gun_special_6 with the hp_gun_special_7 and instantly upgraded every gun hardpoint on my anubis, it also upgraded every class 6 weapon into a class 7, if no one can find the code that creates the number then you stuck with them I'm sorry to say.
**shuffles off with a new headache**
@ Oblivion, I'm afraid that the actual class number is hardcoded, in the Common.DLL there are entries for every hardpoint type (hp_gun_special_X etc), they are stored in a descending order (10,9,8 etc), the number is generated by in game code from this order. I swapped the hp_gun_special_6 with the hp_gun_special_7 and instantly upgraded every gun hardpoint on my anubis, it also upgraded every class 6 weapon into a class 7, if no one can find the code that creates the number then you stuck with them I'm sorry to say.
**shuffles off with a new headache**
Wow...when this thread started off, it really got going didn't it? Lol I never expected this...anyways,
@bejaymac
That is valuable information. That is very valuable information...potentially. Once I get home from school (which should be within an hour of writing this) I am going to see if I can find where common.dll has that list and do some experimenting, see if I can create my own hardpoint types. That would be awesome, because then I could have as many types as I wanted, and of course I would share that information with the TLR community, probably in another tutorial . But, of course, this is only if I can find out how to do that...curse school. It's too long
@bejaymac
That is valuable information. That is very valuable information...potentially. Once I get home from school (which should be within an hour of writing this) I am going to see if I can find where common.dll has that list and do some experimenting, see if I can create my own hardpoint types. That would be awesome, because then I could have as many types as I wanted, and of course I would share that information with the TLR community, probably in another tutorial . But, of course, this is only if I can find out how to do that...curse school. It's too long
Glad you got the info you really wanted bud.
Now - school is VERY important, just see if you can squeeze in a bit of assembler / disassembler tuition, then have a go at decyphering the dlls and the exe - or maybe even rewriting a new exe to add the good stuff everyone wants. I am constantly amazed at the kids here who have produced some excellent utilities - with a bit of mature guidance from the older 'uns it's very probable you can turn out some wondrous goodies.
@StarTrader
I would love to learn how to create and edit dll's and exe's, unfortunately I have no clue how to begin to learn other than online tutorial type things, and I can't really learn well from those...
Just a question for general programmers out there, how would an exe or dll reference something in another dll? Because I found if you delete one of the hardpoints Freelancer won't run because it can't find "stricmp.dll," so I know it has a lot if not everything to do with location in the dll. If I know how it's referenced then I could possibly find where the code is that generates the class tag, mess around with that and possibly get the results I'm looking for. In the meantime, I've found a way around removing the programming for the class tags and still getting the same result, unfortunately it sacrifices shield hardpoint types.
Edited by - 0blivion on 9/16/2007 8:26:31 PM
I would love to learn how to create and edit dll's and exe's, unfortunately I have no clue how to begin to learn other than online tutorial type things, and I can't really learn well from those...
Just a question for general programmers out there, how would an exe or dll reference something in another dll? Because I found if you delete one of the hardpoints Freelancer won't run because it can't find "stricmp.dll," so I know it has a lot if not everything to do with location in the dll. If I know how it's referenced then I could possibly find where the code is that generates the class tag, mess around with that and possibly get the results I'm looking for. In the meantime, I've found a way around removing the programming for the class tags and still getting the same result, unfortunately it sacrifices shield hardpoint types.
If anyone is following this thread hoping to see if I manage to create completely custom hardpoints, the answer is no. You can change the name of the hardpoints, but as far as creating them, I can't figure it out. And, unfortunately, my computer fried this week (quite literally, there isn't much left of the insulation on some of my power cords anymore) and it'll probably be a while before I can get it working again. Luckily my hard drive survived the fry so I still have all my information, but no dice on actually working. Meh. I needed to get away from my computer anyway.
Edit:
Edited by - 0blivion on 9/16/2007 8:26:31 PM
Guess you have a partial answer - nobody knows?
From what I know myself, deleting an entry in a Freelancer dll with ResHacker will not affect other entries, they don't "shuffle up" like a sequential program file or list. The location and address and name of each is preserved because of the structure of the dll resource file.
I haven't come across the error you got so it's possibly a red herring, I found many of those let me tell you
Hope you've recovered from the fry-up?
All the best pal.
From what I know myself, deleting an entry in a Freelancer dll with ResHacker will not affect other entries, they don't "shuffle up" like a sequential program file or list. The location and address and name of each is preserved because of the structure of the dll resource file.
I haven't come across the error you got so it's possibly a red herring, I found many of those let me tell you
Hope you've recovered from the fry-up?
All the best pal.
Just finished putting the last replacement part in, and all's well now . $50 in parts because of a simple 12V power surge...grr.
Looking back at experiences I've had with editing dll's with ResHacker, I'd definitely agree that deleting entries in ResHacker doesn't mess up the game. I was manually deleting the entries in a hex editor, which was the problem. However, when common.dll is opened with ResHacker, it doesn't have any resources of note, no strings or anything. Unfortunately, hardpoints seem to be fully and completely hardcoded. The only thing you can do is change the name of the hardpoint, and that's not very useful, although it can certainly help.
Looking back at experiences I've had with editing dll's with ResHacker, I'd definitely agree that deleting entries in ResHacker doesn't mess up the game. I was manually deleting the entries in a hex editor, which was the problem. However, when common.dll is opened with ResHacker, it doesn't have any resources of note, no strings or anything. Unfortunately, hardpoints seem to be fully and completely hardcoded. The only thing you can do is change the name of the hardpoint, and that's not very useful, although it can certainly help.
Eh?? I'm still new to hex editing and dll hacking so I have no idea what a "red herring" error is. However, if things go as I would prefer, I won't be modding FL much longer, so I guess it doesn't really matter.
I haven't come across the error you got so it's possibly a red herring
16 posts
• Page 1 of 2 • 1, 2
Return to Freelancer General Editing Forum