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

A fascinating discovery about Cruise.

The general place to discuss MOD''ing Freelancer!

Post Tue Apr 12, 2005 10:21 pm

A fascinating discovery about Cruise.

OK... what I have found is so bizarre and so completely not-documented anywhere (that I know of) that I have to share. Hopefully this isn't a well-known phenomenon to most of you, because I was totally caught off-guard, while playing with my newest creation over here.

It's a very simple thing built into FL's code, apparantly: if you make Cruise eat more Energy than a Powerplant produces... when a ship hits 0 Energy, Cruise drops to by a predictable fraction- in short, it drops by a ratio of the amount of Energy "missing" every second- raise the amount of Energy that the Cruise "eats", and the Cruise speed after running out've Energy is lower. Lower it, and it's faster. And if it eats less than 100% of the recharge rate, then Cruise is at full speed.

If Cruise eats 200% of the Energy that the Powerplant provides, then Cruise falls to 50% of the top. It's a direct ratio. Wow... so cool!

But wait... there's MORE. Energy used by ANYTHING, once you've hit the zero mark... *also* effects Cruise, just like cruise_power_usage does. So, for example... you could build Shields that ate enough Energy that if you used Cruise while recharging your Shields... you'd run out've juice, but not if you just needed to power Cruise alone. Really cool stuff here...

The game-balancing opportunities presented by this are very, very interesting- we could nerf Cruise in mods, or build mods where Cruise works super-well for a minute... and then slows down to a reasonable speed- no more having serious issues with Cruise speed upgrades... because we could balance things out, so that you can Cruise at, say, 3000 for a few seconds, and THEN slow down to 300... just one example there. You still wouldn't want to power up Cruise in the middle of an asteroid field... but, if you're a clever game designer (or just plain mean, like I am)... you could make that a "feature", instead of a "bug"

And people could <gasp> actually CATCH one another in CRUISE, and we could balance ship designs around their "Cruise duration". Interceptors could really become interesting designs, among other things, because you could make one that had a long "Cruise duration" and it could catch up with other ships, exit Cruise, fire a Disruptor... and there ya go... a very interesting gameplay concept.

So... here's all I did, so that y'all can verify this- I ran into this through another setup, but I've just re-verified that this works. I'll whip up a mini-mod, if needbe, but this is such a simple adjustment that anybody can do it.

Basically, all you need to do is to edit the Starflier's Engine, so that it eats more Energy than the Powerplant produces. Open up engine_equip.ini, and edit like I have here- the bold print indicates the line to edit, and how much. Then fire up OpenSP and test for yourselves...

[Engine
nickname = ge_gf1_engine_01
ids_name = 263671
ids_info = 264671
volume = 0.000000
mass = 10
max_force = 48000
linear_drag = 599
power_usage = 0
reverse_fraction = 0.200000
flame_effect = gf_li_smallengine01_fire
trail_effect = gf_li_smallengine01_trail
trail_effect_player = gf_li_smallengine01_playtrail
cruise_charge_time = 5
cruise_power_usage = 190
character_start_sound = engine_ci_fighter_start
character_loop_sound = engine_ci_fighter_loop
character_pitch_range = 10, 65
rumble_sound = rumble_ci_fighter
rumble_atten_range = -5, 0
rumble_pitch_range = -25, 25
engine_kill_sound = engine_ci_fighter_kill
cruise_start_sound = engine_ci_cruise_start
cruise_loop_sound = engine_ci_cruise_loop
cruise_stop_sound = engine_ci_cruise_stop
cruise_disrupt_sound = cruise_disrupt
cruise_backfire_sound = cruise_backfire
indestructible = false
outside_cone_attenuation = -3
inside_sound_cone = 60
outside_sound_cone = 180

Post Tue Apr 12, 2005 10:37 pm

Yeah we found out about this a year ago with the Excelcia mod, but we never really came up with a good way to actually use it. But some of your ideas on how to make use of it sounds pretty cool!

Dev

Post Tue Apr 12, 2005 11:41 pm

And that's what I get for believing what everyone else said. I could have checked it out for myself, but nooooo... well, in any event, now I know the truth of the matter. I guess I'll have to keep it in mind when building mods in the future.

Post Tue Apr 12, 2005 11:53 pm

Well, I've completed a battery of experiments. It definately works as indicated. I built a quickie mod where a ship with the right ratios could fly at 3000 for 4 seconds... and then decelerate to 300.

The ship shakes some- the poor thing's getting huge bursts of thrust every tick- but quite honestly, that's a minor annoyance, and 3000's silly speed anyhow- the effect is much less noticable at reasonable velocities, where the ship isn't trying to accelerate so fast.

So... basically, this concept's proven- if anybody wants to make a mod where ships just "warp" from one location to another... all you'd need to do is make a mod where the ships accelerate to Cruise in 0, get a gigantic amount of speed (say... 50,000), and then run out've Energy in X number of seconds- probably 1 or less.

The higher the Cruise speed is set at, the shorter you can make the duration of the drain to 0... and the lower the resulting post-Cruise speed, but the more the ships will appear to "shake" upon exit- and there is probably an upper limit where the "shaking" behavior causes the game engine to die, so be aware of that.

I dunno where this tops out, but I suspect that it's perfectly possible to build a ship with a very reasonable Energy supply and refresh rate... that can jump across 50,000 FL units... and then basically just sits there, with a speed of almost zero... until you've charged up the power again. Taking Cruise off for a few seconds would allow for a short jump after that, and so on.

But do keep in mind... these aren't instantaneous jumps... they are real acceleration/deceleration curves, so ships with a poor mass vs. linear_drag ratio are going to take quite a distance to slow to zero...

And while top velocity will not vary, acceleration will, depending on the mass vs. linear_drag vs. time accelerated... all ships do NOT accelerate to top Cruise speed at the same rate. Standardizing the "jump distance" is a matter of using the ratio of mass vs. linear_drag as a guide towards how quickly Cruise should drain the Energy available.

Sweet. Now "all" I'd have to do, to make this an important part of a FL mod, is just include the calculations of all of this and include it in the rest of the design parameters of a ship. Not really a big deal, considering the rest of the factors, and pretty interesting stuff to play with. Imagine... a world where we don't need Trade Lanes... finally... and since we now know that we can play with thrusters and do some very interesting things with top speeds, thrusters with long duration but no recharge (like the ones I put into WOS) could serve the same role as Cruise

Post Wed Apr 13, 2005 12:15 am

Yeah Dev... it's been interesting, finding some of these things lying around. Mainly, they're bass-ackwards ways of achieving things, really- this was a total surprise to me, though, because I was just wanting to make my new uber-freighter drain its Energy banks in Cruise (as a kitchy balancing toy)... and ended up with a freighter that Cruises slower than other ships and runs out've Energy I am more than tempted to make my next major mod have freighters that are all disadvantaged by the fact that they simply cannot outrun fighters in a long-term pursuit...

Now, if somebody will just make my day and finally figure out which hex where determines the speed of Trade Lanes, I will be quite happy- because I've been messing around with another weird idea here, but I'd like to be able to fix that little issue. I've been looking through the EXE and various DLLs, and thus far, while I've found many references to 2500 (the true speed of Trade Lanes)... I just have this feeling that that number isn't what's important. I've tried find-and-replace on the hex for 2500 in a number of places, but thus far, no dice... so I'm starting to think it's some kind've multiplier or divisor instead.

Daggum it... you'd have thought that DA would've left something that important as a variable that we could tweak with Constants.ini... maybe when that original list of Constants was made... that one got missed. After all, about half of the ones in the old lists don't even seem to do anything ... which suggests that the persons digging them up were more interested in finding out whatever they could than creating test cases and checking the results. I certainly don't blame them- that list was made shortly after the EXE was unwrapped and the INI structure was decoded, but I don't think anybody's really hacked at it again since.

Dev

Post Wed Apr 13, 2005 1:08 am

The power of the ghetto fix is not to be underestimated. I think a major allure of modifying Freelancer is the prospect of figuring out ways around the numerous limitations of the game or finding ways to use those limitations to your advantage. Because there are so darn many potential roadblocks hiding around every corner, there's a lot of opportunity for being clever (not to mention even more opportunity for getting utterly frustrated, as I'm sure we've all experienced far too many times).

Post Wed Apr 13, 2005 6:10 am

Also, did you know you can do the same thing with the regular engine thrust? Or at least very similar. Just edit this line into your engine entry (or add it if it's not there already)

power_usage = 100

Well of course you change the number to whatever you would like. However, if I remember correctly (It's been a year since I discovered this) it uses thruster power and not weapon power. But it's still something to fool around with if you want. Just like the cruise power usage, it scales depending on how fast you go. So for a ship with max speed of 80, it will use very little power at 10kph, but it will use up all the power when you boost your throttle to max speed of 80kph.

Post Wed Apr 13, 2005 12:36 pm

This is nice stuff... I've only seen a 'broken' version of cruise power depletion that caused a stutter effect. I'd not considered trying to tweak it either... PVP would be a far greater challenge if thrusters were not available after long burts of full speed and cruise may run out due to gun usage. Good work

Post Wed Apr 13, 2005 1:59 pm

Heh - we tried this ages ago as well, but it was hella annoying. 2nd hand ships had bad engines, so you could cruise - but run out of power. However, it led to a damned annoying stuttering sound, which is why it was dumped. The whole idea was for second hand ships to be really crap! Was well aware about continual drain of power for things, never really got a balanced method to make it work nicely though..............always seemed to cause more trouble than it seemed worth. Your ideas sound interesting, as always

Post Wed Apr 13, 2005 5:07 pm

sorry to threaten your balloon with this large,sharp and scary tack but what about f1?

Post Wed Apr 13, 2005 9:31 pm

There's nothing we can do about people recharging through that method, but what else is new? I've always thought that somebody smart should come up with a server-side modification that keeps players from switching characters more than once every 5 minutes, but what do I know

BTW... you can get rid of that annoying sound very easily... just make Cruise silent. It's kind've spooky to zip around silently, and there ya go... no more noise Can't really do much about the "stutter", but at least thus far, it doesn't seem to be really irritating so long as the amount the ship's under Cruise max is low enough... it's when it gets right to the edge that it tends to be its most irritating, like many other things having to do with acceleration in this game engine...

Return to Freelancer General Editing Forum