Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Ransom on August 25, 2005, 08:14:49 pm

Title: Background changing SEXPs
Post by: Ransom on August 25, 2005, 08:14:49 pm
How doable would a set of SEXPs that do these things be?

...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)?
Title: Background changing SEXPs
Post by: Fenrir on August 25, 2005, 08:48:55 pm
Working on new tricks for the follow-up to Transcend, I see. ;)
Title: Background changing SEXPs
Post by: Singh on August 25, 2005, 10:09:39 pm
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.
Title: Background changing SEXPs
Post by: Flaser on August 25, 2005, 10:56:36 pm
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.
Title: Background changing SEXPs
Post by: WMCoolmon on August 26, 2005, 01:23:00 am
Code freeze, mantis.
Title: Background changing SEXPs
Post by: AqueousShadow on August 27, 2005, 03:50:53 pm
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.
Title: Re: Background changing SEXPs
Post by: phreak on August 27, 2005, 04:53:43 pm
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]
Title: Background changing SEXPs
Post by: Ransom on August 27, 2005, 06:44:00 pm
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.
Title: Background changing SEXPs
Post by: phreak on October 22, 2005, 12:36:49 pm
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.
Title: Background changing SEXPs
Post by: WMCoolmon on October 22, 2005, 02:05:25 pm
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.
Title: Background changing SEXPs
Post by: WMCoolmon on October 22, 2005, 03:02:08 pm
OK, SEXP was working, except that it would always read the argument as 'false'.

Fixxered in CVS.
Title: Background changing SEXPs
Post by: phreak on October 22, 2005, 08:59:43 pm
i'll be working on 1,3,4 tonight.
Title: Background changing SEXPs
Post by: phreak on October 22, 2005, 11:15:02 pm
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?
Title: Background changing SEXPs
Post by: Ransom on October 23, 2005, 01:08:46 am
Sounds good, thanks a ton.
Title: Background changing SEXPs
Post by: phreak on October 24, 2005, 01:34:42 pm
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.
Title: Background changing SEXPs
Post by: phreak on October 24, 2005, 06:17:08 pm
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
Title: Background changing SEXPs
Post by: Ransom on October 24, 2005, 08:55:26 pm
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.
Title: Background changing SEXPs
Post by: IPAndrews on October 25, 2005, 02:40:59 am
Thanks Phreak. I needed these too and will join the testing party ASAP.
Title: Background changing SEXPs
Post by: phreak on October 25, 2005, 10:18:09 am
i'll be working on the other 4 later this week as well as "nebula-set-radar-range", which is self-explanatory.
Title: Background changing SEXPs
Post by: Trivial Psychic on October 25, 2005, 08:38:20 pm
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?
Title: Background changing SEXPs
Post by: phreak on October 26, 2005, 10:59:41 am
I think that targets show up as untargetable blips at 5000 and at 2500 you can target them.  not sure about that, but i'll take a look at it.
Title: Background changing SEXPs
Post by: phreak on October 27, 2005, 07:31:51 pm
Hmm i have an implementation question for RA/Goob

Currently I don't think FRED likes decimals, so IMO the "scale" entries in "add-background/sun-bitmap" should multiplied by 10 so you can enter scales as 4.2 as 42 for finer precision for placing stuff
Title: Background changing SEXPs
Post by: WMCoolmon on October 27, 2005, 08:20:09 pm
Read them as percents, it's more intuitive that way.
Title: Background changing SEXPs
Post by: phreak on October 27, 2005, 08:32:38 pm
yea that would work too

1% up to 1800%
Title: Re: Background changing SEXPs
Post by: MiniSiets on October 27, 2005, 08:48:45 pm
Quote
Originally posted by Ransom Arceihn
  • Switch the mission to a nebula mission (or back to a normal one)
Are you trying to say here that you want to know if someone could design a mission where you can fly into and out of a nebula in the same mission? Actually I thought of this idea once too and thought it would be a really nice feature in the game.
Title: Background changing SEXPs
Post by: phreak on October 27, 2005, 08:57:53 pm
theoretically yes, dunno how good it would look.
Title: Background changing SEXPs
Post by: MiniSiets on October 27, 2005, 08:59:41 pm
Another idea I had was to have missions that would take place in the upper atmosphere of planets, battling above their surface. I'm not sure if this has been done already, but it's just another cool thought of mine that came to mind.
Title: Background changing SEXPs
Post by: phreak on October 28, 2005, 12:17:26 am
http://www.hard-light.net/forums/index.php/topic,33767.0.html
http://www.sectorgame.com/twistedinfinities/screenshots.php

On another note i have the add-background-bitmap and remove-background-bitmap sexps working.  they should be in the next CVS build.
Title: Background changing SEXPs
Post by: redmenace on October 28, 2005, 12:24:44 am
Actually tomorrow night.
Title: Re: Background changing SEXPs
Post by: phreak on November 11, 2005, 11:00:19 am
add-sun-bitmap and remove-sun-bitmap got into CVS during downtime.  So all of them should be working.
Title: Re: Background changing SEXPs
Post by: Ransom on November 11, 2005, 11:26:15 am
Would they be in the 07/11 build of FRED? Because they're still greyed out.
Title: Re: Background changing SEXPs
Post by: phreak on November 12, 2005, 10:04:18 pm
you need to add a variable in order to get them to appear, they should be in though since i commited on 11/5
Title: Re: Background changing SEXPs
Post by: WMCoolmon on November 12, 2005, 11:23:23 pm
Why do they need a variable? I've had similar problem with some SEXPs I've implemented, they remain greyed out for no good reason, even though they should be valid in the instance.
Title: Re: Background changing SEXPs
Post by: phreak on November 13, 2005, 12:44:14 am
one of the arguments is a variable for add-sun-bitmap and add-background-bitmap.  it'll be greyed out if there isn't one already defined.
Title: Re: Background changing SEXPs
Post by: Ransom on November 13, 2005, 02:55:13 am
Ah, okay.

Just tried it out, they're working perfectly as far as I tested them. Excellent.

*gets FREDing gloves on*
Title: Re: Background changing SEXPs
Post by: IPAndrews on January 26, 2006, 07:36:51 am
This feature was seemingly added ages ago and yet I cannot add the sexps in FRED? Do I have to edit the mission file in notepad? How do I know what the parameters are? I'm using: "fred2_open_G-20050715.exe ". I kind of expected that to be new enough? There's probably a very simple explanation for what I'm doing wrong here but I'm at a loss.
Title: Re: Background changing SEXPs
Post by: Ransom on January 26, 2006, 07:54:07 am
I'm pretty sure they were added in November 2005...