Author Topic: Putting the brakes on a ship  (Read 5543 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Putting the brakes on a ship
I needed a ship to slow down rapidly after emerging from subspace.  After trying a number of sexps without success, I ended up making a duplicate ship class with the "supercap" flag.  This slows the ship down satisfactorily, but is obviously not an ideal solution.

Then I ran across this interesting quote in Battuta's mission checkpoint tutorial...

Immediately kill the ship's entry momentum with a SEXP (this is glitchy and requires some work)

Anyone know which sexp he is describing?  I would PM him myself but he's currently on leave from HLP.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Putting the brakes on a ship
would either of these table entries help?

http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Warpin_Speed:
$Warpin Speed:
FS2 Open 3.6.10:
Sets the speed at which the ship warps in for default warpin effect
Sets the time that the ships warp in (not the animation itself) takes for BTRL type warpin effects
Syntax: Float, meters per second or miiliseconds

$Warpin Time:
FS2 Open 3.6.10:
Defines the effect duration
Syntax: Float, seconds


edit

alternatively you could use the supercap warpin and then sexp to switch the ship class to the regular version
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Putting the brakes on a ship
would either of these table entries help?

http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Warpin_Speed:
$Warpin Speed:
FS2 Open 3.6.10:
Sets the speed at which the ship warps in for default warpin effect
Sets the time that the ships warp in (not the animation itself) takes for BTRL type warpin effects
Syntax: Float, meters per second or miiliseconds

$Warpin Time:
FS2 Open 3.6.10:
Defines the effect duration
Syntax: Float, seconds

No, unfortunately.  That was the first thing I tried, but those only work for BTRL and Hyperspace warp effects, not the FS2 warp effect.


Quote
alternatively you could use the supercap warpin and then sexp to switch the ship class to the regular version

That's what I did.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Putting the brakes on a ship
drat.  ok, no idea then
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Putting the brakes on a ship
Funnily enough I was discussing this issue yesterday. The WCS release has a SEXP called set-forward-deceleration which apparently they used for exactly this reason. I thought the SEXP was rather useless outside the WCS universe cause these features really should be part of the warpin code rather than requiring a SEXP.

That said, couldn't you simply set the speed of the ship with SEXPs? Or does it retain the original deceleration values?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Putting the brakes on a ship
I forget what I used exactly, but I'm pretty sure I tried a repeating set-speed approach and didn't like it.  You're right in that the best solution would be an enhancement of the warpin code, but I was wearing my FREDding hat and didn't care to code it.

 

Offline Mito [PL]

  • 210
  • Proud Member of Slavicus Mechanicus
Re: Putting the brakes on a ship
Or maybe make a loop triggered by the ships arrival, decreasing its speed by 1 each 5 milisecs? That would give you decceleration of about 200 m/s each second...
How do you kill a hydra?

You starve it to death.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Putting the brakes on a ship
Shouldn't there be made a way to customize warp arrival anyways?  Different FTL methods will be different.  I mean so that current FS1/2 (are they different? then we could make FSPort more original if they were) is emulated by default, but different distance traveled and time to travel can be specified?  IDK, just thoughts.

 

Offline Fury

  • The Curmudgeon
  • 213
Re: Putting the brakes on a ship
Did you try to use 0 as initial velocity in the ship editor? (You probably did, but checking anyway...)

  

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Putting the brakes on a ship
Am I writing my posts in code?  Did I forget to turn off my time machine?  Seriously, what is the explanation for these three responses from three different people?


I ended up making a duplicate ship class with the "supercap" flag

alternatively you could use the supercap warpin


I tried a repeating set-speed approach and didn't like it

Or maybe make a loop triggered by the ships arrival, decreasing its speed by 1 each 5 milisecs?


the best solution would be an enhancement of the warpin code

Shouldn't there be made a way to customize warp arrival anyways?


Maybe I'm just that good at inception. :p



Did you try to use 0 as initial velocity in the ship editor? (You probably did, but checking anyway...)

That isn't applicable for ships that warp in, only for ships that are present at mission start.

 

Offline Fury

  • The Curmudgeon
  • 213
Re: Putting the brakes on a ship
That isn't applicable for ships that warp in, only for ships that are present at mission start.
A ship with lower initial velocity (like 0) will make full stop sooner than a ship with higher initial velocity (like default 33) upon exiting from warp. In case of a bigger ship, the difference in distance traveled should be quite remarkable.

At least that is my experience from the few missions I fredded back in the old days.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Putting the brakes on a ship
Interesting.  I'll have to take another look.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Putting the brakes on a ship
I was trying to say that if you end up tweaking warpin settings make sure they can be adjusted to all the different universes we support and future ones we might, i.e., make it as flexible as possible.  Yes, I mangled that horribly in my previous post.  :P

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Putting the brakes on a ship
would either of these table entries help?

http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Warpin_Speed:
$Warpin Speed:
FS2 Open 3.6.10:
Sets the speed at which the ship warps in for default warpin effect
Sets the time that the ships warp in (not the animation itself) takes for BTRL type warpin effects
Syntax: Float, meters per second or miiliseconds

$Warpin Time:
FS2 Open 3.6.10:
Defines the effect duration
Syntax: Float, seconds

No, unfortunately.  That was the first thing I tried, but those only work for BTRL and Hyperspace warp effects, not the FS2 warp effect.

I'm pretty sure at least one of those two works for FS2 warp effect. It's how Spoon got his Hertak Armageddons to have a super slow warpin to make it seem like a much larger and more imposing ship, IIRC.
Because those things take quite a long time to warp in and move slowly while doing so.

As for the checkpoint thing, it might just be a set-speed SEXP. I'm not sure what you mean by "you didn't like it" - but for the checkpoint purposes, it didn't need to look like a smooth/visually-acceptable transition warping in, it just needed the ship not to keep hurling forwards and messing up mission-timing.
(´・ω・`)
=============================================================

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Putting the brakes on a ship
Where did Spoon do this?  Is that Wings of Dawn?

And I need a slower warpin for visual purposes, not for checkpoint purposes.  The set-speed approach didn't look visually smooth enough.

 

Offline Lorric

  • 212
Re: Putting the brakes on a ship
Where did Spoon do this?  Is that Wings of Dawn?

And I need a slower warpin for visual purposes, not for checkpoint purposes.  The set-speed approach didn't look visually smooth enough.
It is indeed.

You'll probably like the Armageddon warp in then. You can see it here about 1:30 in:

http://www.youtube.com/watch?v=uk_eql49h7c&feature=c4-overview&list=UUxW-7zwlLDcTmdpn2sOKEWg

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Putting the brakes on a ship
As headdie said, for the slow Hertak warping speed I used $Warpin Speed:   100
If you want a different deceleration speed after the warpin itself has completed change the $Forward decel:

That's all I know
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Putting the brakes on a ship
And you used the standard subspace warp effect, not your own custom effect?

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Re: Putting the brakes on a ship
Dude, maybe you could, like, look at the goddamn mod instead of doubting what everyone's telling you.
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Putting the brakes on a ship
There's a difference between doubting and asking for more information.