Need Help with First Time Editing: Ships and Weapons
-
Hi all!
I would like to make some very simple changes to my single player game.
Sadly getting into the ini-file editing is prohibitively complicated, since - even after extensive searching - I couldn’t find a comprehensive guide on editing.Here is what I know: I need a decrypter to unpack the inis. I got a program called FLUC. It worked fine.
Here are the 2 things I want to edit:
1. I want to change a few things about the Humpback freighter: Increase max energy and energy regen, increase the hull points (armor), increase the max allowed class for shields and guns/turrets and (if possible without adding a new hardpoint) add a CD/Torpedo slot.
2. I want to make the Nomad turret lootable (that is make them drop from defeated Nomads) and equipable in a turret slot.I think for 1. I need to edit the “shiparch” ini and for 2. the “weapon_equip” ini.
Now comes the hard part. I found the sections in the ini files for the specific ship and weapons. Now I just need to know what lines I need to change and what values I need to input.
This is especially tricky for the Nomad Turret since unlike the lootable nomad weapons it was not intended to be equipped. Which means that it’s section is missing entries that the equippable nomad weapons have. Especially problematic is the question if the special texture for the Nomad turret will fit onto a turret hardpoint, since all equippable turrets use the same texture (“li_smlturret.cmp”). The Nomad turret uses the “no_gunship_turret.cmp” texture which is in the TURRET folder and not in the WEAPONS folder.
For the Humpback changes: Is it even possible to add a CD/Torpedo slot with out adding a new hardpoint or replacing an old one? That is to say, how can I find out if the Humpback model has a “HpTorpedo01” hardpoint?
Finally, what do I do with the ini files once I made the changes? Do I have to re-encrypt them? And if so how do I do it? Since FLUC does not seem to support something like that.
I would be grateful for some help. Thanks!
EDIT (some additional questions):
How do I change the player level requirements for ship purchase?
Will existing savegames still work after I changed the inis?EDIT2:
What are the “xxx_good” ini files for?
Will the in-game descriptions of ship and weapon stats reflect the changes? Will the Nomad Turret have a description/stat page? -
Hi cronty, and welcome to the starport!
To question 1:
You are right, ships are defined in shiparch.ini
The Humpback’s internal name is rh_freighter
Changing hitpoints is pretty easy, just change “hit_pts = 5800” to whatever number you like. Parts of your ship that can be shot off (e.g. wings) have their own hitpoints though, which are defined in the [CollisionGroup] entries directly below the [ship] code in shiparch.ini. Damage done to these parts is rerouted to the main hull though, so if I only shoot your wing and it blows off at some time, your ship still takes the damage.
Which type of equipment can be mounted onto which hardpoint is defined by the code below, example taken from the Humpback too:... hp_type = hp_gun_special_7, HpWeapon01, HpWeapon02 hp_type = hp_gun_special_6, HpWeapon01, HpWeapon02 hp_type = hp_gun_special_5, HpWeapon01, HpWeapon02 hp_type = hp_gun_special_4, HpWeapon01, HpWeapon02 hp_type = hp_gun_special_3, HpWeapon01, HpWeapon02 hp_type = hp_gun_special_2, HpWeapon01, HpWeapon02 hp_type = hp_gun_special_1, HpWeapon01, HpWeapon02 hp_type = hp_freighter_shield_special_7, HpShield01 hp_type = hp_freighter_shield_special_6, HpShield01 hp_type = hp_freighter_shield_special_5, HpShield01 hp_type = hp_freighter_shield_special_4, HpShield01 hp_type = hp_freighter_shield_special_3, HpShield01 hp_type = hp_freighter_shield_special_2, HpShield01 hp_type = hp_freighter_shield_special_1, HpShield01 hp_type = hp_thruster, HpThruster01 hp_type = hp_mine_dropper, HpMine01 hp_type = hp_countermeasure_dropper, HpCM01 hp_type = hp_turret_special_7, HpTurret02, HpTurret03, HpTurret04 hp_type = hp_turret_special_6, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06 hp_type = hp_turret_special_5, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06 hp_type = hp_turret_special_4, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06 hp_type = hp_turret_special_3, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06 hp_type = hp_turret_special_2, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06 hp_type = hp_turret_special_1, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06 ...
As you see the format is hp_type = <thing you=“” want=“” to=“” mount=“”>, <name of=“” hp=“”>, <name of=“” another=“” hp=“”>, …
Notice that the same hardpoint name appears in multiple lines, which allows not only to mount level 7 weapons on HpWeapon01, but also the lower classes.
Let’s say you add the following:hp_type = hp_torpedo_special_1, HpWeapon01, HpWeapon02 hp_type = hp_torpedo_special_2, HpWeapon01 ```This would allow you to mount disruptors on both weapon hardpoints, and even torpedoes on the second one. If you don't delete the other lines of code regarding HpWeapon01 and 02, it would still be possible to mount the weapons on these hardpoints. If you delete the hp_gun_special_1 line, you could still mount weapons of levels 2-7, but not of level 1. Same applies for the shields, turrets etc. Note that there is no restriction on the the hardpoint names, you could even allow mounting mines on the weapon hardpoints and the like. On the other hand, whether or how much a hardpoint can rotate is part of the hardpoint's definition in the model file. Another note: Changes done here will not be reflected in the ship descriptions in the game. These texts have to be edited manually, but thats a topic for some other time. Hint: code like ids_name = 237051, ids_info = 66598, these reference to texts stored in dll files. Power source related values are not part of the ship, but of a special equipment. To understand this, we have to go a bit deeper into the "goods", and that is what all these …_goods.ini files are for. For every part of equipment, ship, trade good that can be seen in your inventory or at a trader there is an entry in one of the goods files. For our needs, have a look into Goods.ini. There you should be able to find something like:
[Good]
nickname = rfr_hull
category = shiphull
ship = rh_freighter
price = 152000
ids_name = 12011
item_icon = Equipment\models\commodities\nn_icons\rh_freighter.3db[Good]
nickname = rfr_package
category = ship
hull = rfr_hull
addon = ge_rfr_engine_01, internal, 1
addon = rh_freighter_power01, internal, 1
addon = ge_s_scanner_01, internal, 1
addon = ge_s_tractor_01, internal, 1
addon = shield01_mark05_fr, HpShield01, 1
addon = LargeWhiteSpecial, HpHeadlight, 1
addon = SlowSmallYellow, HpRunningLight01, 1
addon = SlowSmallYellow, HpRunningLight02, 1
addon = SlowSmallYellow, HpRunningLight03, 1
addon = SlowSmallYellow, HpRunningLight04, 1
addon = SlowSmallYellow, HpRunningLight05, 1
addon = SlowSmallYellow, HpRunningLight06, 1
addon = SlowSmallYellow, HpRunningLight07, 1
addon = contrail01, HpContrail01, 1
addon = contrail01, HpContrail02, 1
addon = DockingLightRedSmall, HpDockLight01, 1
addon = DockingLightRedSmall, HpDockLight02, 1But we can see we have a power source mounted which is called rh_freighter_power01\. Let's see if we can find a piece of equipment with this name. Have a look into misc_equip.ini. You should be able to find the right values. The level needed to buy a ship is part of the defenition what you can buy on which station. In market_ships.ini there is one code block for every station that has a ship dealer. Look for all the lines which include your ship package name, and change the value directly behind the package. Be careful though, every station has every ship listed, but the 0's and 1's at the end define whether the ship is available or not. Also not that every single station can only sell a maximum of three ships. About using your modified files: You don't have to encrypt the files again, Freelancer can read both. The simplest way would be to directly replace the files in your freelancer directory, but I don't recommend this as it might be difficult to keep track of your changes and, with more complex changes, give you problems with different savegames. Much better would be to get the Freelancer Mod Manager, create a new subfolder in it's mods folder with any name you like and put in all the files you changed, keeping the original folder structure of the game. Using the mod manager, you can easily activate and deactivade different mods, and it even keeps the savegames separated. If you want to use your old save with the mod, simply copy it after activation. About savegame compability: As long as you only edit or add things like equipment, using old save games should be fine. Deleting things might be a problem (e.g. you have a weapon mounted, but it's code doesn't exist anymore). Changing faction relations requires a new game, as these relations are saved in the save file. The save file "restart.fl" also has to be deleted in this case for the changes to take effect. About Question 2: This should be as simple as adding the turret to an trader via market_misc.ini. You have to find out the nickname of this turret though - a search through weapon_equip.ini for nomad should give you several turrets. All weapons in the game, so even station turrets and the like, should already have an [good] entry somewhere, and they should mount onto any weapon or turret slot. Might look a bit silly though, with turrets bigger than your fighter… All equipments info texts about its stats are auto-generated, but they probably have no descriptional text. Edit: About viewing models and their hardpoints: Try out HardCMP! It allows you to add new ones as well.</name></name></thing>
-
Wow Quarks, thank you very much for such a detailed answer!
While I was waiting for an answer yesterday, I went ahead and did some research of my own. I learned about the UTFEditor and read a guide about how to add hard points. I think I understood everything about the orientation vector (if I run into a problem I’ll be sure to ask it here ).
I also did some extensive combing through the different ini files, in order to see what I can do about a Nomad turret.So, for the 2 things I wanted to do, I decided to proceed the following way:
1. For the freighter I decided to make a completely new one, albeit heavily based on the Humpback. This will impact the vanilla game balance the least and achieve my goal in a smoother fashion. That is, to have a freighter type ship that is viable late game (ie on the same level as the Very Heavy Fighter ships).
I will base it on the Humpback but buff it’s stats (armor, energy, shield and weapon classes) as well as add a new CD/Torpedo hardpoint. It will be available at Freeport 9 for lvl 30+ players. I’ll probably call it “Civilian CTE-5000 Bastion Freighter”.2. The second thing I wanted to do is make high level turrets available, so my freighter has appropriate weapons to use. Originally I wanted to make the Nomad turret available, but after looking at it’s model with the UTFEditor and looking at how the other Nomad weapons are made available to the player, I decided against it (The 2 weapons are not mounted on any of the ships, they are a separate category (special nomad gun) and have completely different models. The reason players get them is because they are in the cargo of the Nomad ships, which then can be looted - found that in the loadouts.ini.).
So what I am going to do is just convert one of the 2 droppable Nomad guns into a turret (makes a lot more sense too - I mean the deal almost the same DPS). And while I am at it i want to convert a few of the artifact weapons found in wrecks into turrets too.So, now that I know what I want to do, I have a few more questions.
1. For the new ship I managed everything so far, my only problem is the market_ships.ini. Why is the line of numbers that determines if the ship package is available so complicated? The first number is the required level, but then we have “-1, 1, 1, 0, 1, 1” for available ships and “-1, 0, 0, 1, 1, 1” for not available ships. Why isn’t it just 1 for available and 0 for not available?
Also, since I made a new package for my new ship (in the goods.ini) should I add it to every station’s block, even though I only plan on making it available at Freeport 9?2. For the new turrets my question is: what changes to the ini sections of the weapons are necessary to transform a normal weapon into a turret. I now that I need to change the cmp and map files to “li_smlturret.cmp” and “li_equip.map”, since all equippable turrets in the game use these. I also need to change the “hp_gun_type” to the turret of the appropriate level. Anything else? What are these LODranges?
3. Finally, I would very much like to update the descriptions for the transformed weapons and make a new description for the new ship. Could you tell me how to change the dlls?
Thanks a lot in advance!
-
The difference between ‘gun’ and ‘turret’ is largely semantic in nature. What matters is the hardpoint. You’ll notice that certain ships have turret hardpoints vs gun hardpoints. These are defined as having a larger turn arc in the hardpoint. This is not because they’re called turret or gun, this is because the arc is defined as larger. There is no other real difference between guns and turrets in vanilla FL, aside from the cosmetic difference of what model they use, and what stats they have.
To make a nomad gun a turret, you’d have to give the ships you want the turret mounted on turret hardpoints with proper coverage.
-
Regarding question 1:
I have no idea why it is that complicated, but feel free to experiment with other combinations ;). You du not have to add your new package to all the stations. Adding it to these you want it buyable on is enought.Question 2:
To make a gun a turret, the only really important thing is on what kind of hardpoint it mounts. You can change the model, as all vanilla turrets strangely use the same one, but this is definatly not necessary!
A different name usually comes with it, too ;).
Another difference between vanilla turrents and their weapon aquivalent usually is the higher projectile speed, probably to make it easier to shoot at targets behind you.
LOD means Level Of Detail, the numbers in there define the distances between camera and model between which differently detailed 2d models are used.
I guess in your case the easiest way would be to give your freighter the ability to mount class 10 weapons on its turret hardpoints?Question 3:
In Freelancer\EXE you can find several resource dll files which contain the names and descriptions. There are different programs to edit them, which work in different ways or offer different features - have a look for fled-ids, or flDev for example.
So if you just want to add a few things, you should be able to find free spaces inside the existing files, but you can also start a new file - there’s an empty one available somewhere here, I think. The texts themselves are adressed by these numbers you have already seen - I think the best way would be to have a look at existing ones to see how formatting works. Sorry that I can’t give you more in-depth help regarding this topic, but it’s been a longer while since I last activly had to do with this game, and I don’t have the files on this computer to test myself.
Have a look into the different tutorials around, there may not be one exactly for this topic, but it may be covered in system or ship creation. It has to be somewhere, as I learned it via tutorials myself