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

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
More new stuff (and what you can do with it)
In CVS now are some new SEXPs. None of these are tested, of course. :D There's no FRED under Linux.

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

ship-create

This is a SEXP that basically does some error checking on the variables and then calls the internal ship_create function. It lets you create a ship or ships without specifying it in FRED. But I am not sure if you'll actually be able to use other SEXPs on these ships since they won't exist at mission start.

Possible uses: Escape pods. With the any-ship and string arguments, you could autogenerate them for whatever ship classes without having to create each and every one in FRED.

Of course this is a somewhat dangerous SEXP since you may not know exactly how many ships will be made with it in every case in a mission. Use with care. :nod:

mission-set-nebula
Takes a true/false argument to determine whether the nebula is enabled or not.
Right now, I think FRED2 will only let you set the poofs if you turn on the nebula initially. However I've overriden that in the parsing code so that the variables will be loaded anywho if they exist.

If you start out in a nebula you will not be able to use the background nebula; and it looks like skyboxes will be replaced in non-HTL mode.

It will take a little more memory since both nebula and normal stuff has to be loaded, but it shouldn't be anything significant.

I haven't tested this beyond making sure that non-nebula and nebula missions seem to still work properly.
« Last Edit: October 09, 2005, 03:00:32 am by 374 »
-C

 

Offline Singh

  • Hasn't Accomplished Anything Special Or Notable
  • 211
  • Degrees of guilt.
More new stuff (and what you can do with it)
w00tage!
Some questions:
For the nebula sexp - does that mean that I can turn on a nebula in-mission after certain mission events or does it simply mean that I can determine at the start of a mission whether it has a nebula or not, depending on the outcome of the previous mission?

As for the set-ship-speed sexp: will it allow us control of ships as they exit subspace? That's really hte effect i'm looking for, IIRC. Something that will allow us to set the exit speed/vel for subspace. However, its use in cutscenes would definately be good :yes: :drevil:
"Blessed be the FREDder that knows his sexps."
"Cursed be the FREDder that trusts FRED2_Open."
Dreamed of much, accomplished little. :(

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
More new stuff (and what you can do with it)
Always happy to see new SEXPs :yes:

What happens if you create a new ship with the same name as an existing ship? I'll have to see if you can refer to these ships using a string variable rather than by selecting the ship from the list in FRED. Since variables are only checked during runtime it might let you. :)
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)
Well, it means you can turn it on and off just like you might turn glowmaps on and off. So you might be able to use a campaign-persistent variable to toggle the nebula by switching it on/off depending on the status of that variable.

I don't think set-ship-speed will work when a ship is warping in, since those functions manually set physics values as well.

However it wasn't too hard to add in a manual override to ships.tbl :D Testing that now.
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
More new stuff (and what you can do with it)
Done and in CVS. Values "$Warpin speed:" and "$Warpout speed:" are located just after "$Slide decel" and before the shockwave/explosion stuff.

I've added the values into the lab as well so you can fool around with them on the fly.

Or you can use a modular table: :thepimp:
Code: [Select]
#Ship classes
$Name: GTD Orion
+nocreate
$Warpin speed: 10
#End


If somebody wants this on a per-ship basis, it'll be pretty straightfoward to implement. The critical function is shipfx_calculate_warp_time()

Quote
Originally posted by karajorma
Always happy to see new SEXPs :yes:

What happens if you create a new ship with the same name as an existing ship? I'll have to see if you can refer to these ships using a string variable rather than by selecting the ship from the list in FRED. Since variables are only checked during runtime it might let you. :)


The SEXP returns NAN if the ship couldn't be created (Most likely a bad ship class was given), 1 if the named ship already exists regardless of class (In which case it'll do nothing), or 2 if a new ship was created.
« Last Edit: October 09, 2005, 04:10:33 am by 374 »
-C

 

Offline Spicious

  • Master Chief John-158
  • 210
More new stuff (and what you can do with it)
These are some rather useful new sexps. :yes:  
One question though, can ship-create create ships in wings?

 

Offline Ransom

  • M. Night Russel
  • 210
  • It will not wait.
    • Rate of Injury
Re: More new stuff (and what you can do with it)
Quote
Originally posted by WMCoolmon
mission-set-nebula
Takes a true/false argument to determine whether the nebula is enabled or not.

Hooray!

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
More new stuff (and what you can do with it)
Quote
Originally posted by WMCoolmon
Done and in CVS. Values "$Warpin speed:" and "$Warpout speed:" are located just after "$Slide decel" and before the shockwave/explosion stuff.

I've added the values into the lab as well so you can fool around with them on the fly.

Or you can use a modular table: :thepimp:
Code: [Select]
#Ship classes
$Name: GTD Orion
+nocreate
$Warpin speed: 10
#End


If somebody wants this on a per-ship basis, it'll be pretty straightfoward to implement. The critical function is shipfx_calculate_warp_time()
[/B]

:wakka:
HORRAY!!
You've got a date with TBP!
The Trivial Psychic Strikes Again!

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
More new stuff (and what you can do with it)
Wow... WMCoolmon is on a roll. :eek2:

Don't stop announcing cool features!


BTW, this would work for Star Trek 'warps' too, right?

We got a warp-'flash' too. Just use an invisible map for the model...

:)
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: More new stuff (and what you can do with it)
Quote
Originally posted by WMCoolmon
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.


Now that I think of it any chance of having the corresponding accessor SEXPs too? I can think of a lot more uses for this if I have the corresponding Get-Speed SEXPs :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Fractux

  • 28
Re: More new stuff (and what you can do with it)
Quote
Originally posted by WMCoolmon There's no FRED under Linux.


Actually, you can use taylor's 2005-06-30 Fred2Open build almost perfectly under wine.

More recent builds do not display ship coordinates on mouse over in my tests, and require OpenAl to be installed, and some dll's that my wine install does not have by default.

But it does work, and it's what i've been using. :)
-What exactly gets separated in "mechanically separated chicken" ?

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Re: More new stuff (and what you can do with it)
Quote
Originally posted by karajorma


Now that I think of it any chance of having the corresponding accessor SEXPs too? I can think of a lot more uses for this if I have the corresponding Get-Speed SEXPs :D


Yeah, should be mostly copy-paste work.
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
More new stuff (and what you can do with it)
Quote
Originally posted by DaBrain
Wow... WMCoolmon is on a roll. :eek2:

Don't stop announcing cool features!


BTW, this would work for Star Trek 'warps' too, right?

We got a warp-'flash' too. Just use an invisible map for the model...

:)


Well, you couldn't do the whole flash thing, but you could make it go really fast warping in. Imagine an Orion warping out...that's the sort of  thing you'd have, except a lot faster.
-C

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
More new stuff (and what you can do with it)
?

We got the flash thing already.




The only thing missing is the geometry deforming.

(which isn't really important imho)
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
More new stuff (and what you can do with it)
OK.  I finally tried the warpin/warpout speed thing, and it's not doing what I expect it to.

I would expect that setting them to someting like 300 for a fighter, would mean that a fighter would depart at and arrive at a speed of 300, rather than the 50 you'd have by default, and then decelerate from there.  What IS happening is the figure seems to control how long the warp effect is remaining.  The lower the figure, the longer the warp lasts.

Now, either A), I miss-interpreted what this feature is for, or B), the change to the actual warping speed hasn't been done in the code.  The second possibility might explain the effect I described.  If I set it at 300, the warp last for the duration it calculates that a ship at 300 m/s would require to warp out.   A ship at 3 m/s would require that the warp effect last for quite some time for the ship to war out at, so it stays there.
The Trivial Psychic Strikes Again!

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
More new stuff (and what you can do with it)
I tried it for the Orion...fighters may use a different codepath to calculate the exact speed. Makes sense since it's pretty much always 50 m/s for fighters, but varies for capships depending on length. The code I changed was for the latter.

I see you've got it mantised :yes:
-C

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
More new stuff (and what you can do with it)
Could it be made to apply for fighters and bombers as well?
The Trivial Psychic Strikes Again!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
More new stuff (and what you can do with it)
Has anyone tried the ship-create SEXP out yet? I wanted to make one new Hercules. Here's my code

$Formula: ( when
   ( and
      ( has-time-elapsed 3 )
      ( = 2 ( ship-create
   "Ship 2"
   "GTF Hercules"
   0
   0
   0 )  )
   )
   ( do-nothing )
)
+Name: Create Ship
+Repeat Count: 1
+Interval: 1
+Team: 0

Here's the result :eek: :confused:
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
More new stuff (and what you can do with it)
:lol: They're breeding! :lol:

This would be a good effect for a Halo mod. :)

 

Offline Singh

  • Hasn't Accomplished Anything Special Or Notable
  • 211
  • Degrees of guilt.
More new stuff (and what you can do with it)
my god! The flood has infected them!!

[Donut]
Run for your lives!!!!1111
[/Donut]
"Blessed be the FREDder that knows his sexps."
"Cursed be the FREDder that trusts FRED2_Open."
Dreamed of much, accomplished little. :(