Author Topic: Background changing SEXPs  (Read 4691 times)

0 Members and 1 Guest are viewing this topic.

Offline Ransom

  • M. Night Russel
  • 210
  • It will not wait.
    • Rate of Injury
Background changing SEXPs
How doable would a set of SEXPs that do these things be?
  • Add/remove background bitmaps and suns
  • Switch the mission to a nebula mission (or back to a normal one)
  • In a nebula mission, change the Lightning Storm setting
  • Change the selected Poofs

...also, would it be possible to make the Ambient Light setting functional (or otherwise make it possible to define ambient lighting on a per mission basis)?

 

Offline Fenrir

  • 28
  • ?
Background changing SEXPs
Working on new tricks for the follow-up to Transcend, I see. ;)

 

Offline Singh

  • Hasn't Accomplished Anything Special Or Notable
  • 211
  • Degrees of guilt.
Background changing SEXPs
this would be very, very interesting to say the least. It is already available in a limited extent in the form of switching background Pofs. But the ability to swithc to an entirely different background set from a different mission would be sw33t, to say the least.
"Blessed be the FREDder that knows his sexps."
"Cursed be the FREDder that trusts FRED2_Open."
Dreamed of much, accomplished little. :(

 

Offline Flaser

  • 210
  • man/fish warsie
Background changing SEXPs
With careful departure/removal of ships this would effectivly achieve what Starlancer did.

If we could implement the showing of the jump animation without actually ending the mission, and switching to subspace render the moment the ship goes through, we would have even surpassed SL.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Background changing SEXPs
Code freeze, mantis.
-C

 

Offline AqueousShadow

  • Devil
  • 28
  • Imperial Highway
Background changing SEXPs
You're just trying to find new ways to scare people! You're one of those damned mean kids that dip popsicles in the dirt and give them to the other kids! :shaking:

Really it's just switching to subspace render right? All you have to do is set the warp pof going, "push" the player ship through the warp and render the subspace.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Re: Background changing SEXPs
Quote
Originally posted by Ransom Arceihn
How doable would a set of SEXPs that do these things be?
  • Add/remove background bitmaps and suns
  • Switch the mission to a nebula mission (or back to a normal one)
  • In a nebula mission, change the Lightning Storm setting
  • Change the selected Poofs

Already has been requested.  Im not going to say who has requested it though :drevil:

...also, would it be possible to make the Ambient Light setting functional (or otherwise make it possible to define ambient lighting on a per mission basis)?
Tried it, but theres issues between d3d and ogl on how the ambient light levels are calculated, so making it look right with the current calcuations may take some work on the part of the mission designer.
 [/B]
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Ransom

  • M. Night Russel
  • 210
  • It will not wait.
    • Rate of Injury
Background changing SEXPs
Quote
Originally posted by AqueousShadow
You're just trying to find new ways to scare people! You're one of those damned mean kids that dip popsicles in the dirt and give them to the other kids! :shaking:

You don't like dirt popsicles?


Quote
Originally posted by PhReAk
Already has been requested. Im not going to say who has requested it though

Okay then, so they're doable? Is there any kind of timeframe when they could be realistically implemented (after the codefreeze is lifted, I mean)?

Quote
Originally posted by PhReAk
Tried it, but theres issues between d3d and ogl on how the ambient light levels are calculated, so making it look right with the current calcuations may take some work on the part of the mission designer.

Wait, is the ambient light setting in FRED functional or not? When I checked it didn't appear to affect anything at all.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Background changing SEXPs
bump for RA since 3.6.7 is out.

1, 3, and 4 don't look too hard to do.  2 may be a pain.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Background changing SEXPs
Re #2: I haven't tested it but the SEXP is in there.

Conceptually, it's easy; load the nebula defaults if the SEXP is present and toggle the mission flag to do the actual effects.

I think I am going to test that now.
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
OK, SEXP was working, except that it would always read the argument as 'false'.

Fixxered in CVS.
-C

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
i'll be working on 1,3,4 tonight.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
ok i have stubs in fred, so you can see them, but they wont do jack ****.  Here is how they work when completed.

add-background-bitmap will take 9 arguments.  1 string for the bitmap name; 3 for the pitch, bank, heading; 2 for scale; 2 for divisons; and 1 more as an index variable.  the index variable is where its stored internally, you need not worry about its value.  The index variable is more of an "output" parameter, the only reason it would need to be used would be if you were going to remove that bitmap at a later time using remove-background-bitmap, otherwise you can just make a junk variable and keep using that.   What is in CVS now doesn't cover the scale and divisions since i just remembered about that (im a dumbass).

remove-background-bitmap will take 1 argument.  The sole argument is the zero-based bitmap index of the bitmap.  You can find this by selecting the first bitmap in the background editor dialog and start counting until you reach the one you want to find and remove.  Its a pain, so I'll probably add indices in the box so you know for sure which one you're deleting.  If you want to delete a bitmap you created using add-background-bitmap, just pass in the value of the variable you used for argument 9.

add-sun-bitmap and remove-sun-bitmap work similarly.

nebula-change-storm will take a single argument.  This one shouldn't be too hard to figure out.

nebula-toggle-poof will take two arguments.  The first is which poof should be toggled and the second is a boolean expression.  If the expression evaulates to true, the poof is turned on.  otherwise its turned off.  The way i have it setup is that you can have a complex boolean expression determine wheter a poof is turned on or off.

edit: hay who censored $h!t?
« Last Edit: October 23, 2005, 01:08:11 am by 31 »
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Ransom

  • M. Night Russel
  • 210
  • It will not wait.
    • Rate of Injury
Sounds good, thanks a ton.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
toggle-poof and change-storm will be finished off when i return home.  They dont seem to hard compared to the other ones.  I see a fred build got relased last night that should have all the relavent stubs for everything.  If you want to take a look at how the sexps will look like go to the CVS thread: http://www.hard-light.net/forums/index.php/topic,34852.0.html

You should be able to work on your missions that require them at this point, but realize that nothing will happen at the moment.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
ok they look done.  I've included two really simple missions and the executable that has the code.  Be sure to try and break the sexps to see if anything unexpected occurs.

http://fs2source.warpcore.org/exes/phreak/neb_sexp_demo.zip
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Ransom

  • M. Night Russel
  • 210
  • It will not wait.
    • Rate of Injury
Awesome, they seem to work great. The current CVS FRED build throws up an error when I save/load a mission with any of these in it and then makes the cursor vanish, but I'm guessing that's cause it's from yesterday. Once the next build's posted I'll see what I can do to break them :p

And mission-set-nebula works great also WMC.

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
Thanks Phreak. I needed these too and will join the testing party ASAP.
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
i'll be working on the other 4 later this week as well as "nebula-set-radar-range", which is self-explanatory.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
I assume that its similar to the range option under full nebula options in the background editor.  Oddly enough, when I set this to 5000 once on a TBP mission, it still would only detect hostile ships within 3000.  Is there something that always restricts distances with hostile targets?
The Trivial Psychic Strikes Again!