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

Designating purchasable engines / powerplants to specific sh

The general place to discuss MOD''ing Freelancer!

Post Fri May 25, 2007 3:54 am

Designating purchasable engines / powerplants to specific sh

Greetings all, I've been a lurker for near three years now under the name leonidus. I am posting now under this new name due to the fact that I had forgotten my password for that name, and the pw recovery system is currently disabled, doh!

I have some little experience modding fl, as I ran a private server for a gaming clan I am a member of, but am now looking to do a complete rebuild (not a TC, mind you) based off of the things I have learned here.

The problem I'm facing is that I would like to make different engines and powerplants available for purchase in my current project, but I want to limit what vessel types can equip the parts, is this possible?

The only solution I've come up with is to make each vessel types' engine and powerplant take up more cargo space than what is available to the smaller class ships, as an example -

LF: have 100 cargo space but their engine and powerplant take up 30 each

HF: have 300 cargo space but their engine and powerplant take up 110 each

VHF: have 750 cargo space but their engine and powerplant take up 305 each

etc.

The problem with this is that a HF can still equip LF engines / powerplants, and VHF can equip both of the other ship types equipment, which I want to avoid.

I realize I can get around this if I make the engines and powerplants unchangeable for every ship but I'm trying to go for as much vessel customization I can.

is it perhaps possible to designate new hardpoints for all of the existing ships so that engines & powerplants have ranks such as weapons? Or will FL not support this at all? (which is my bet)

My primary desire is to be able to design and implement accurate infocards for the equipment when it comes to speed and the like, so that if a person exchanges their LF for a VHF and decide to keep their old engine & powerplant, they won't suddenly end up with an infocard that says 'max speed 200' when in reality their VHF is only capable of 100 due to the ships' mass.

I realize I can circumvent this as well by making every ship have the same mass but that's not exactly feasible, as it's been noted time and time again the collision can do funny things.

I could also set every vessel class to have a particular mass and then add a line in the infocard for each ship type so that it would read:

LF max speed: 200
HF max speed: 150
VHF max speed: 100

but it seems to me that this would cause undue clutter in the infocard, and while it may work, this isn't what I'm striving to accomplish...

Anyways, I've rambled enough, if anyone knows of a way to make it so certain engines & powerplants are only available to certain ship types, please let me know.

Post Fri May 25, 2007 9:44 am

I did something similar with a mod that i have made (Frontierspace). In that one engines are buyable, but you only sell engines of the same ship class at the base. You can only sell a single type of ship at any given base to avoid VHF's mounting LF engine (assuming you're planning on modifying their performance). They need to buy an engine in order for them to leave the base (a scanner and a powerplant too).

It was an effort, but i ended up having most ships having very similar cargo abilities and had extra engine volume for the lighter ships, so LF's actually had the bigger of the fighter engines.
There is still no way of stopping VHF ships from mounting a LF engine, but you can set it so that if they choose to have a better performance engine, they will end up with the combined volume of both engines used up their cargo space. Most hardcore combat based players really don't mind so much losing most of their cargo and would trade off for the better abilities.
You also need to make the engine unlootable so that they cannot jetisson the old engine in space.

Hopefully something of this was usefull.

Post Sat May 26, 2007 2:25 am

Thank you for your reply, it doesn't exactly counter the problem I'm trying to eliminate but it does help to a degree.

Post Sat May 26, 2007 2:55 am

There is no way to counter it I'm afraid, the engines, powerplant, scanners & tractorbeams are coded to always use the 'internal' hardpoint. This hardpoint is part of the game engine rather than being part of a ship, any hardpoint you use to add these items to a ship will be used but an infinite number can also be added to the 'internal' hardpoint (now you know why you can't buy them in vanilla FL).

To get around this will require someone to locate this feature in the game code and break the connection, something for some of our code monkeys to do rather than some of the mundain hacks they've been doing.

**shuffles off with a new headache**

Post Sat May 26, 2007 8:25 am

The problem with that, Bejaymac, is that messing with numbers is far easier than messing with bits of code.I got away with changing an AI function in DLLs for my wingmen, but that was nothing more than dumb luck on my part and we may not be so lucky changing hardpoints.
I'm certainly no expert on this, but if you were to look in content.dll and common.dll for "hpmount" and "HpMount" (it's case sensitive), you'll only find one reference of it in either DLLs - so while I think we could techincally rename HpMount to another hardpoint name, I'm not sure if that would accomplish much (if we had these things mount on, say, HpWeapon01 instead, I'll bet you could still squash all engines on HpWeapon01).

I wouldn't be surprised at all if there was something I was missing - like I said, I am no expert on this, and things that I thought not possible like putting cruise_speed and cruise_drag on individual engines rather than in contstants.ini (Freelimits enhancement project) are very much so.

*shuffles off with a new headache as well*

Post Sun May 27, 2007 5:04 am

Well, my idea was to have engines buyable in an optional mod but I'm running into a snag.

Unmodded players are getting kicked for possible cheating when trying to buy a ship. For example, the new player wants to buy the patriot at manhattan. Upon launch however, they get booted for possible cheating.

I'm thinking it's because the cost of the engine added to the cost of the ship is making FLServer hiccup on the difference. The unmodded player sees the Patriot as costing 7,600 credits but the server values it at 37,600 because the value of the engine is 30,000 credits. When the unmodded player tries to buy a 37,600 credit ship for 7,600 credits FLServer thinks they're cheating.

Is there a way around that other than making engines free or requiring all players to run the mod?

I wonder what would happen if I changed the price of the ship to 30,000 less server side...

I'll have to check that one out. ie. make the price of the patriot -22,400 which would bring it back down server side to 7,600.

Edited by - robocop on 5/27/2007 6:20:23 AM

Post Sun May 27, 2007 7:47 am

fox for christs sake don't use Alcander's Freelimits, it might work for you but there are a lot of us that can't use it. Alcander's coding is as unstable as F***, it makes the flserver.exe & freelancer.exe freeze on a lot of machines (mine included).

robocop you'll have to make them use the mod I'm sorry to say, engines are the same as any other piece of equipment in a package.

**shuffles off with a new headache**

Post Sun May 27, 2007 8:50 am

Bejaymac, I never said I used the Freelimits project - I'm not even sure if the project is available for download anymore. I simply made a reference to one of the hacks that it did as an example of something that I'd previously thought was impossible. Besides, the only DLL and EXE hacks I use that aren't mine are Dev's Limit Breaking 101 techniques.

And yes, Robocop, with stuff like that clients joining your server will need the mod.

Post Sun May 27, 2007 9:29 am

Thank F for that, I though for a minute that I was going to have to add your mod to my 'I can't use' list.

Alcander's hacks weren't hacks, I did a HEX dump a while back to do a comparison and found large chunks of new code that he'd shoe horned into the game code to get his ideas to work.

**shuffles off with a new headache**

Post Sun May 27, 2007 9:23 pm

Yeah, inserting stuff into a compiled project _usually_ doesn't work out so well. I've seen exceptions, but yeah. Oh well, the aim of Freelimits was still a step in the right direction, I think - and I'm certainly pleased to see more advanced modding happening, like some of the stuff Dev and w0dk4 are doing with FLHook (to name a few off the top of my head).

But yeah. Download Flak. Yees. You vant too, yes. *is shot at*

Post Tue May 29, 2007 9:08 pm

The way I approached the problem was to vary the engines thrust ratings and set drag on the engines to 1 or 0 and then play with the ships drag settings.

Any ship can still mount any engine (within cargo size limits) but putting a light fighters engine in to a VHF will give you a top speed of about 20 where as putting that same engine into a LF will give you a top speed of about 90.

Return to Freelancer General Editing Forum