Is there a way to add new ships to the game (using the same model as existing ships)?
-
traversal wrote:
Got Covid at the moment so haven’t been able to do much.Hope you get better soon.
-
Sorry! I took a break from this game for a little while. I admit, I kind of forgot about this thread in that time. I tried out what you said just now, copy-and-pasting that text into the appropriate filed, and it worked! I can now buy a red Dragon. Is there a way to change its stats instead of having it be identical to the regular Dragon? I’d like it to have higher stats/able to equip better weapons than the standard Dragon. I don’t mind just copying the same stats as another ship.
Would it also be possible, without too much difficulty, to scale the model up, just make the ship be bigger? Could I change the name and menu description as well? If that’s a bit more complicated than just editing text files in Microsoft Word though, I’d be fine with just changing the stats.
Also, I hope that you’re doing well and that you’ve made a full recovery since you made that post. Be safe and be well, everyone.
-
To change stats, you are looking for the [Ship] section with nickname = ku_dragon in Freelancer\DATA\SHIPS\shiparch.ini
To adjust weapons, you modify hp_type = hp_gun_special_# with the # representing the class of weapon 1-10. The second part to that is HpWeapon## with the ## representing 01-06 which is the ID of the weapon mount, in this case, the Dragon has 6 gun mounts. Example:
hp_type = hp_gun_special_9, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04
This translates to Class 9 guns can be mounted on gun mounts 01-04.
Other stats are found in [Ship] section that you can adjust to meet whatever your goals are. As for adjusting the size of the model, Someone else will need to chime in since I’ve never messed with that stuff. Hope this helps.
-
That doesn’t seem to have worked. The red Dragon’s stats are still identical to the regular Dragon.
-
Unlike equipment, ship stats are not generated by rt reading of the arch file. Stats are written by hand and read from infocards.dll. In other words, in game displayed ship stats will not change if you alter the actual stats in shiparch - that has to be edited manually with a .dll editor
-
So what he’s saying is that the info sheet will still show the old stats but if you attempt to mount the higher-rated weapons/equipment on the ship it will work.
-
So I need some sort of program to edit infocards.dll? What should I use? I would like for the ship’s actual stats to be displayed ingame.
Also, someone mentioned earlier in the thread something about making Juni’s Defender and the CSV playable. Could I get something to copy-and-paste to make that possible, please? I’m mostly concerned about the red Dragon, but once I have this whole process figured out, more ships couldn’t hurt. I think those two are the only other ones that aren’t player usable, and are the appropriate size for a playable ship (i.e., not a transport or a gunboat or something. Actually, what would happen if you modded something huge to be playable and then tried to land somewhere with a docking port too small for your ship to fit inside? On rare occasions while playing, I’ve had my ship experience slight problems with pathing and collision detection while attempting to dock. Can’t imagine what a gunboat trying to dock with a tiny space station would be like. Part of me would kind of like a playable gunboat, but I can’t imagine it would actually work out that well.)
-
Here are some scripts for the Blood Dragon Samurai and CSV. I’ve added a cockpit file for the CSV which i’ve also included.
To make these for sale, add these lines to the base of your choice in market_ships.ini. Remember you can only have three ships for sale maximum at any one base.
marketgood = junkercsv_package, 1, -1, 1, 1, 0, 1, 1
marketgood = samurai_package, 1, -1, 1, 1, 0, 1, 1
-
Where do I place these files? What are they, even? Do I need to do anything else?
-
The Samurai and CSV_Junker are mods. You need to use FLMM to run those. You make a folder in FLMM’s mods folder for each and drop the XML file into them. Then, in FLMM, enable that mod.
The csv.ini file is the cockpit file used by the CSV_Junker mod. You can see that line in the XML file for it where the cockpit is defined. But, I’m not sure why the mod for the CSV is pointing to SHIPS\UTILITY\CSV\ as where you need to put the csv.ini. I’d think it better to make a new directory (e.g. DATA\COCKPITS\UTILITY\CSV), put the csv.ini in there and then change that line in the .xml file to point to it.
Why was the non-cockpit folder used, @Dromedary?
As for DLL editing, you can use something like FLDev (this is what I use). Inside InfoCards.dll you can then search for your ship name. The infocard entry after each ship has the stats.
For example, I looked up Hawk which shows as ID 066534. That’s the ship info and flavour text. On the next line I can see 066535 showing 4/0 3300 45 26/26 4 6 M, CM, CD which are all the equipment it supports. 066536 is the file with the labels for those, so it has Stats, Gun/Turrets Mounts, etc as text values.
If you’re adding them as copies to then have as ‘new’ ships, you’d need to make three infocard entries per the above - one for the flavour text, one for the stats, and one for the text next to each stat. In the files where you added the red Dragon earlier, note those IDS entries in the ini file. Those need to point to your new infocards.
-
Okay, I’m guessing the CSV doesn’t have a cockpit normally and thus can’t be made playable without a full-on mod? What’s the Samurai? Just a red Dragon with a different name?
For example, I looked up Hawk which shows as ID 066534. That’s the ship info and flavour text. On the next line I can see 066535 showing 4/0 3300 45 26/26 4 6 M, CM, CD which are all the equipment it supports. 066536 is the file with the labels for those, so it has Stats, Gun/Turrets Mounts, etc as text values.
Hmm, if that’s how it works, then could I simply make my red Dragon have identical stats to an existing ship (say, the Stiletto for example), could I then change the red Dragon’s ID numbers to be the same as the ship whose stats I copied, in order to have the red Dragon’s stats be displayed accurately in-game without having to edit .dll files? Would that work?
-
Technically, yes, you could just reuse those IDS to have the same stats. But that’ll mean the ship will also have the same name and description. If that’s not a problem though, go for it!
DLL editing is easy using something like FLDev, though.
1 - Load it up.
2 - In the Home tab, select the Freelancer.ini and resources.dll file using their Browse buttons.
3 - Click the DLL Editor tab. Select a DLL file in the DLLs List (in top-left) and click the Active checkbox just beneath it to see what’s in the selected DLL file.
4 - Search for whatever you need in the middle search bar and hit Enter or the Search button to perform the search.
5 - Click on the entry you want to change, change it in the text field, then click Update. They’re not yet applied, though.
6 - In the lower-middle you can see your changes and untick any you change your mind on before you Apply.
7 - Click Apply Changes when ready. You will get a warning that this is not reversible.Not that this is for editing of existing datacards, not making new ones. You can download the FLDev starter DLL files, which are blank DLLs for you to write new infocards to.
-
Alright, I think I was able to get it. I went into shiparch, found “ku_dragon” and changed the value next to “ids_info3” to “66520” (which is the “ids_info3” value for “bw_elite”). In-game, this seems to have changed the red Dragon’s stats to display the Stiletto’s stats, while keeping the standard Dragon’s name and flavor text description. Did I do it right?
Another thing I’d like to do is make Juni’s Defender playable, if that’s possible without mods that require more than just editing plain text files. Is there something I can just copy and paste like I did to make the red Dragon playable?
-
Nice! Yeah, if the stats display there, then you’ve done it properly. You can test it out against enemies, too. Jump into a normal Dragon and note the damage, then go up against the same enemies in the Red Dragon and see. Since the Stiletto has more shields, the damage should appear as less taken off the shield bar.
Correct! Juni’s Defender is actually even easier, because it is already set up in shiparch.ini and uses the normal Defender cockpit.
Look up “nickname = li_elite2” and you’ll see her Defender. All you need to do is make a hull and ship package separately for it in goods.ini, then in market_ships.ini, sell that package at the base you want.
For example, add these to your goods.ini:
[Good]
nickname = le2_hull
category = shiphull
ship = li_elite2
price = 10
ids_name = 237033
item_icon = Equipment\models\commodities\nn_icons\li_elite.3db[Good]
nickname = le2_package
category = ship
hull = le2_hull
addon = ge_le_engine_01, internal, 1
addon = li_elite_power01, internal, 1
addon = ge_s_scanner_01, internal, 1
addon = ge_s_tractor_01, internal, 1
addon = shield01_mark02_hf, HpShield01, 1
addon = LargeWhiteSpecial, HpHeadlight, 1
addon = SlowSmallBlue, HpRunningLight01, 1
addon = SlowSmallBlue, HpRunningLight02, 1
addon = SlowSmallBlue, HpRunningLight03, 1
addon = SlowSmallBlue, HpRunningLight04, 1
addon = contrail01, HpContrail01, 1
addon = contrail01, HpContrail02, 1
addon = DockingLightRedSmall, HpDockLight01, 1
addon = DockingLightRedSmall, HpDockLight02, 1Then, add this to the base you want to sell it at in market_goods.ini:
marketgood = le2_package, 0, -1, 1, 1, 0, 1, 1
-
Got it! Thanks.
One more thing I’d like to know. Is it possible to make a duplicate of an existing ship and just change the stats? Like, take a weak early-game ship, and make a new ship with stats suitable for mid-late game that has the same model, name, descrpition, etc of that early ship? I want to keep the existing ship as-is, but just make a second, better version of it that’s available later in the game.
-
No worries. Yep, same process. Just duplicate the sections of the files you’ve been editing, and then change the relevant ID for the copied ship to refer to the stats of another.
If you want your own custom stats, you’ll need to use FLDev to create a custom entry in an infocard, and if you do that, you might as well make a custom ship name and description, too, since those require custom infocards, too. Then you’d refer to the ID of the new infocard.
Good to see someone else getting into FL modding again! I’m going to make some tutorial videos on what I know. I’m trying to learn how to model custom ships and get them appearing in the game, but currently still having issues with that. Once I learn how to do that successfully, I think I can cover all the basics in videos. Hopefully we’ll get even more people having fun with FL modding again.
-
Regarding the files i uploaded earlier.
You DO NOT need FLMM to use those files if playing by yourself. Just put the first two into the main game folder and off you go. As to why i put the cockpit file into the CSV folder, I put all the files relevant to the CSV in one place so easier to find than putting them into different folders.
As to those two ships being mods, depends how you look at it. Both those models are unused in FL but sit there in the code. The Samurai for instance has all the breakable parts included, which is why i coded them into the xml file
I also coded the ‘Starblazer’ the same way, the missing civilian fighter which also has all it’s files included with breakable parts in the original game but was never used.
I’d also be careful about just copying ships with all the same IDs numbers etc, as that will cause errors in game. This is why scripting is easier, as when the game loads, it will create a new ids number for the new ship and infocards, making things much better for the game as a whole. I mean you can hard code it all in, but it’s more complicated doing it that way.
I’d start learning which files are needed to do certain things. You’re probably new at this and i get that, but i’d do some research on the subject if i were you.
Also in my script files, if you open them with notepad, all the stuff i’ve added has the file location at the top of each section, so you can see which files are needed to add a new ship.
-
All good points! Yeah, I was just presenting the easiest approach to get them started. I know that when I first started, getting hung up on specifics was a big barrier to entry compared to just getting something I made working, and learning more/refining later.
Thanks for the ship explanations, too. I didn’t know there were missing ships in the code! I’ve only just recently started looking at what was left in and not implemented, like the Pygar landing zone, so first thing I want to do is make it dock-able again. I thought maybe they were just never intended to be player-operated.
Looking forward to more exploration.
-
I managed to get Pygar working perfectly, plus i did a dockable Sprague as well.
With Pygar you have to move the follow camera otherwise it will clip one of the walls as the view rotates round during landing. Easy to do once you look through one of the files.
Sprague needed serious surgery to work in mp, but got there in the end. In fact it was my gf at the time who was used to working with lua scripts who sorted it out for me lol.
There’s so much that’s included with FL that isn’t in the final game, but works if you code it in. There’s various missing weapons fx, thruster fx, code for changing the price randomly every time you dock, blah blah blah. So much in there if you spend the time.