Author Topic: More new stuff (and what you can do with it)  (Read 10110 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
More new stuff (and what you can do with it)
Oh crap.  Sorry.  I added that to prevent collisions between ship names but I did it completely backwards.  Fixed.

I seem to be doing a lot of bum commits lately. :nervous:

 
More new stuff (and what you can do with it)
Every time i try to run the warp build you just posted, it gives errors about weapons.tbl then causes an application error in itself and crashes.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
More new stuff (and what you can do with it)
Just use any CVS build after the 14th and it should be in there anyway.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
More new stuff (and what you can do with it)
ZOMG NEW FEATURE WTF
"$Player warpout speed:" after "$Warpout speed:", will set the warpout speed of the player when he needs to warp out.

Note that there is code in Freespace 2 that won't let the player warp out if the speed is faster than the ship's speed witha ll power to engines.

If this causes problems for anybody let me know and I will take it out, barring rejections and a good reason to keep it in.
-C

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
More new stuff (and what you can do with it)
COOL!  Gotta test this out with my Whitestar as soon as a new build comes up!
The Trivial Psychic Strikes Again!

 
More new stuff (and what you can do with it)
Now all we need is a FLASH (from the warp drives going "POOF" just before warp) and a BANG (the bright white warp point) for the Star Trek ships...

 

Offline Turnsky

  • FOXFIRE Artisté
  • 211
  • huh?.. Who?.. hey you kids, git off me lawn!
More new stuff (and what you can do with it)
Quote
Originally posted by Gregster2k
Now all we need is a FLASH (from the warp drives going "POOF" just before warp) and a BANG (the bright white warp point) for the Star Trek ships...


and a /really/ rapid decelleration when dropping out of warp, could also be useful when coming out of hyperspace for the B5 effects.
   //Warning\\
---------------------------------------------------------------------------------
do not torment the sleep deprived artist, he may be vicious when cornered,
in case of emergency, administer caffeine to the artist,
he will become docile after that,
and less likely to stab you in the eye with a mechanical pencil
-----------------------------------------------------------------------------------

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
More new stuff (and what you can do with it)
Well, there is a way to simulate this.  WMC's recent addition of the set-object-speed-x/y/z, you can give the player's ship a high speed to drop down from.

when-
-true
-set-object-speed-z (that's forward right)
--Alpha 1
--300

It'll decelerate from there.
The Trivial Psychic Strikes Again!

 

Offline redmenace

  • 211
More new stuff (and what you can do with it)
Quote
Originally posted by Trivial Psychic
COOL!  Gotta test this out with my Whitestar as soon as a new build comes up!
Speaking of which...
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
More new stuff (and what you can do with it)
Quote
Originally posted by WMCoolmon
ZOMG NEW FEATURE WTF
"$Player warpout speed:" after "$Warpout speed:", will set the warpout speed of the player when he needs to warp out.

Note that there is code in Freespace 2 that won't let the player warp out if the speed is faster than the ship's speed witha ll power to engines.

If this causes problems for anybody let me know and I will take it out, barring rejections and a good reason to keep it in.

I can confirm the restriction.  I set the player warpout speed and warpout/in speeds to 300 on my whitestar, but the top speed is somewhere in the 150 range, so I got the message when I tried to warpout, that listed speed exceeds the maximum speed of the craft, and that warpout would be aborted.  I request that this limitation be removed.
The Trivial Psychic Strikes Again!

 
More new stuff (and what you can do with it)
Why the hell does that limitation exist anyway? Is there a reason?

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
More new stuff (and what you can do with it)
Limitation removed in CVS
-C

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
More new stuff (and what you can do with it)
Quote
Originally posted by WMCoolmon
Limitation removed in CVS

It may be a good idea to still allow the limitation unless the player_warpout_speed option is set, just in case there is something which assumes the check exists.  I can't really think of a reason why that would be but it's an easy enough check to add and then we won't have to worry about unbreaking something later.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
More new stuff (and what you can do with it)
That would be acceptable for my purposes.
The Trivial Psychic Strikes Again!

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
More new stuff (and what you can do with it)
More trouble than it's worth, IMHO, and it's more likely to fix problems with someone accidentally breaking the warp by setting ship speed too low.

Up til SCP, there would be no way to end the mission if the player couldn't jump out. So any mission after SCP is suspect, but even then I can't see much of a reason to restrict the player's warpout that way instead of using the disallow-warp (or whatever) SEXPs.

I did comment the code out with the date, rather than remove it entirely, since I can't just test it...but I think it'd be better to get rid of it completely, since it's such a little-known restriction that could totally confuse someone FREDding or modding as to why the player couldn't warp out.


basically if you're disabling warp it's probably due to some plot thing, rather than the ship class, and even in that case you can do it with SEXPs in the future.
-C

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: More new stuff (and what you can do with it)
set-object-speed-(x, y or z)
Overrides the current object's velocity (Should I rename to set-object-vel-*? hmm...) Note that it instantly changes the ship's speed; so the speed will likely continually decrease if you set it higher than how fast the ship wants to go.

EDIT: This should also theoretically work with waypoints, too... :drevil: And if a wing is specified, then all ships in that wing will have the effect applied to them.

Possible uses: Hyperspace effect? :D
OK, either I'm miss-interpreting how this is to take place, or its not working properly... or perhaps a bit of both.

First, is the x,y,z figure used relative to the craft, or to the game space?  I'm using set-object-speed-z, similar to the method I mentioned a few posts up, but it ends up sending the crafts sideways.  Maybe the XYZ directions are miss-aligned, like they are for rotational directions in PCS1.

Second, is the speed supposed to bleed-off after use?  Even several minutes after use, ships are still dancing around a several hundred M/s.

What am I doing wrong?
The Trivial Psychic Strikes Again!

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: More new stuff (and what you can do with it)
Does the rotation of the ship in the world have any affect as to which way the ship goes?
-C

 

Offline Axem

  • 211
Re: More new stuff (and what you can do with it)
I think its relative to the world. I used set-object-speed to simulate gravity for the BSG mod's combat landings. Even when I came in upside down I still landed on the deck.

Though I've only used the set-object-speed-y, so x and z might be mixed up or something.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: More new stuff (and what you can do with it)
Alrighty then.  It seems that the "dancing around" effect I was getting, was because I was using an "every-time-argument" conditional for the activating sexp.  I wish there was a "once-per-argument" conditional.  Anyway, the result was that each ship was continuously getting a lateral speed boost.  Next, it seems that these are world-relative xyz directions, which make it awkward if you want an object to move down a non-standard vector.  Also, the speed bleeds off quite quickly, even for a 300 m/s boost.  Finally, in the sexp's current state, it will refuse to move a ship down its own z-axis.  What that means is that if I have a ship facing precicely 90 degrees to the right relative to the environment, and I use a set-object-speed-x, since that corresponds to the Z-axis of the ship, it will refuse to move it.  I would definitely consider this a bug.

What I'd like to see is another set of sexps, to manipulate a ship's speed, but based of its own relative axis, rather than relative to the world.  Also, a couple of figures included to manipulate both the time it takes for the object to decelerate from said speed down to a stop or to whatever its max speed is, or the amount of time it takes to acellerate to the speed.

The the current set-object-speed-x/y/z would become set-object-speed-world-x/y/z, while the new one would be set-object-speed-relative-x/y/z.  The sexps arguments would look like this:

set-object-speed-relative-z
-Alpha 1
-300 (the speed to set it to)
-0 (the time it takes to accel to this speed, seconds)
-0 (the time it takes to decel from this speed, seconds)

For a ship warping-in, set accel time to "0", and decel time to "3", and it'll take 3 seconds after this sexp is fired, for the ship to reach its table-defined speed, or "0" depending.  For a ship warping-out, the reverse is used.  Setting them both to "0" will result in the default behaviour.  Now, lets say you want a ship to employ a "ramming-speed" ability that exceeds its top speed.  You'd make the speed, as whatever you'd like this ramming-speed to be, set the accel speed to however long you'd like it to take to reach ramming-speed, but since a ship should remain at its ramming-speed, you wouldn't want it to decelerate, so you'd set the decel speed to "-1".  To disengage ramming-speed, have another instance of this sexp, but set to "0" accel and then a positive figure for the decel.  I can't see any instances where having a "-1" accel would get you anything.
The Trivial Psychic Strikes Again!

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: More new stuff (and what you can do with it)
I wish there was a "once-per-argument" conditional.

Try invalidate-argument when you're done with each one.