Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: WMCoolmon on September 03, 2008, 05:48:05 am

Title: C09032008
Post by: WMCoolmon on September 03, 2008, 05:48:05 am
Changes:

Comments:
I spent a long time tracking down the bug I did fix, which was a problem involving a capital ship warping out before it had finished slowing down. The Colossus still disappears too soon in my test mission, but I'm at a loss to explain it at this point, given that the warp effect uses the same lifetime and takes a while to disappear afterwards.

There was also a bunch of convoluted code and bad calculations that caused the Colossus to appear out of thin air. Hopefully, this is not a bug that people have designed missions around, because it was pretty damn obvious that something was just not right. :p

FTL Effect:
I made the following changes to the BTRL FTL effect:
- Ships now warp out instantaneously, regardless of speed
- Ships now warp in with their initial velocity, and the AI takes control as soon as the ship appears.
- Added code to support the shockwave and to make the ship disappear at $Warpout time (or appear at $Warpin time)
- Added code to switch off collision detection when the ship disappears.
- Animations for warpout are now paged in with all ships in the mission
- The shockwave effect is automatically loaded from a file using the "-shockwave" suffix. EG, if you specify "$Warpin animation: myeffect", your shockwave file should be "myeffect-shockwave"
- Insane amount of tweaking to how the effect is shaped - it now uses the autocenter code for the ship and expands the polygon out using bounding box maxs and mins. This works well for Freespace 2 ships, not as well for BTRL ships, but I was unable to find a configuration which worked for BTRL ships. Effect radius is based on the longest X or Z bounding box dimensions, unless you manually override it with "$Warp* Radius:"

Supported fields:
$Warp* type: Should be "BTRL"
$Warp* Start Sound: Crap, I knew I forgot something
$Warp* End Sound: Ditto.
$Warpout speed: If specified, ship will try to reach this speed before FTLing
$Warp* time: No direct effect
$Warp* radius: Radius of flash effect (Does not affect length or shockwave radius)
$Warp* animation: Controls animation filename for flash across the ship (Shockwave: <animation>-shockwave)

Recommended settings:
The following settings will synchronize the shockwave with the middle of the flash in ftl_test
Code: [Select]
$Name: GTF Apollo
+nocreate
$Warpin type: BTRL
$Warpin time: 0.3667
$Warpin animation: ftl
$Warpout type: BTRL
$Warpout time: 0.3667
$Warpout animation: ftl

Trial package:
http://fs2source.warpcore.org/temp/wmc/ftl_test.zip

This is basically the media from BTRL, but with the graphics resized so there isn't a huge empty space off to the right of "ftl.eff". They will need to be redone/stretched to a power-of-2 texture and converted to DDS for final release.

The VP also includes a table that converts all FS2 fighters to the effect, as well as all BTRL demo ships.

Build:
http://fs2source.warpcore.org/exes/latest/C09032008.zip

You'll probably want this. ;)
Title: Re: C09032008
Post by: Zacam on September 03, 2008, 08:49:21 am
Initial Pre-work test: Issue 1759 - Resolved by this build.
Title: Re: C09032008
Post by: WMCoolmon on September 03, 2008, 03:14:16 pm
Excellent. :D
Title: Re: C09032008
Post by: Ace on September 03, 2008, 06:12:31 pm
There's still some incompatibility between the Btrl warp effect and the warp-effect SEXP.

With that SEXP set to a warp time of 1 second, the flash animation plays three or four times when using the SEXP. Effectively a blinking light following the ship.

Could changing that SEXP's options for timing from seconds to milliseconds fix this issue?
Title: Re: C09032008
Post by: chief1983 on September 03, 2008, 06:17:04 pm
Great news   :yes:

Makes me want to play FS2 with the BtRL warp effect, I think it would be interesting, save for a few missions that hinge on a long effect time.
Title: Re: C09032008
Post by: WMCoolmon on September 03, 2008, 07:15:01 pm
There's still some incompatibility between the Btrl warp effect and the warp-effect SEXP.

With that SEXP set to a warp time of 1 second, the flash animation plays three or four times when using the SEXP. Effectively a blinking light following the ship.

Could changing that SEXP's options for timing from seconds to milliseconds fix this issue?

The warp-effect SEXP generates a Freespace-style warp effect - I'm not sure why it should be even using the BSG effect, unless someone has gone to some trouble to replace the animation/model files for the original warp effect.
Title: Re: C09032008
Post by: Ace on September 03, 2008, 07:39:52 pm
I'm using the BtrL demo .vps which don't have the FS2 warp. It'd be mind-blowingly wonderful if the warp-effect SEXP could be altered so that it would support the custom FTL effects (Homeworld, BtrL) though.
Title: Re: C09032008
Post by: pecenipicek on September 04, 2008, 06:13:22 am
TAP warp effect isnt affected by this build, right? i cant test at the moment.
Title: Re: C09032008
Post by: Colonol Dekker on September 04, 2008, 10:09:13 am
TAP warp is so Suh-WeeeeeeeeeeeeeT.

WMCoolman, this si the build with the rearview cam right? Before i DL i just wanna doublecheck as the amount of builds i have is slowly growing out of control :)
Title: Re: C09032008
Post by: chief1983 on September 04, 2008, 10:23:51 am
It's the build that supports his rearview cam script.  The rearview is not an inherent feature of this build I believe, it still needs the script from the other thread.
Title: Re: C09032008
Post by: Colonol Dekker on September 04, 2008, 10:32:27 am
Cheers Chief :yes:

*breaks down crying*

I have no idea when scripts became a feature of FS2, i thought it was all TBLS and fred.... my head hurts.
Title: Re: C09032008
Post by: SypheDMar on September 04, 2008, 04:41:27 pm
The Colossus still disappears too soon in my test mission, but I'm at a loss to explain it at this point, given that the warp effect uses the same lifetime and takes a while to disappear afterwards.

There was also a bunch of convoluted code and bad calculations that caused the Colossus to appear out of thin air. Hopefully, this is not a bug that people have designed missions around, because it was pretty damn obvious that something was just not right. :p
I think this also happens to the Lucifer.
Title: Re: C09032008
Post by: WMCoolmon on September 04, 2008, 06:28:25 pm
I'm using the BtrL demo .vps which don't have the FS2 warp. It'd be mind-blowingly wonderful if the warp-effect SEXP could be altered so that it would support the custom FTL effects (Homeworld, BtrL) though.

I've given this a couple of days and I still can't think of anything really useful that these effects would do. That is, I can't think of a canon reason for BSG or Homeworld that you'd see an empty warp effect going by itself. Maybe a hyperspace window hanging out in midspace - you could do that with the warp-effect SEXP and a textured flat polygon though.

Now the hyperspace effect without a ship, you can actually do that already. You don't even need a SEXP for that. :p

TAP warp effect isnt affected by this build, right? i cant test at the moment.

No, I didn't make any changes to the TAP effect. It should still be the same as before.

TAP warp is so Suh-WeeeeeeeeeeeeeT.

WMCoolman, this si the build with the rearview cam right? Before i DL i just wanna doublecheck as the amount of builds i have is slowly growing out of control :)

Yeah, like chief says though, you do need the script for the rearview camera. The build itself doesn't have any inherent rearview code.
Title: Re: C09032008
Post by: pecenipicek on September 04, 2008, 06:30:45 pm
I'm using the BtrL demo .vps which don't have the FS2 warp. It'd be mind-blowingly wonderful if the warp-effect SEXP could be altered so that it would support the custom FTL effects (Homeworld, BtrL) though.

I've given this a couple of days and I still can't think of anything really useful that these effects would do. That is, I can't think of a canon reason for BSG or Homeworld that you'd see an empty warp effect going by itself. Maybe a hyperspace window hanging out in midspace - you could do that with the warp-effect SEXP and a textured flat polygon though.

Now the hyperspace effect without a ship, you can actually do that already. You don't even need a SEXP for that. :p
Do you remember that mission in homeworld 1 with the "junkyard dog"? eheheee :p

Quote
TAP warp effect isnt affected by this build, right? i cant test at the moment.

No, I didn't make any changes to the TAP effect. It should still be the same as before.
kk :)

Title: Re: C09032008
Post by: Colonol Dekker on September 04, 2008, 06:39:22 pm
How do i "use" scriptys?

Actually i'll check the wiki, ignore this post :nod:
Title: Re: C09032008
Post by: WMCoolmon on September 04, 2008, 06:57:54 pm
Do you remember that mission in homeworld 1 with the "junkyard dog"? eheheee :p

A little bit. I remember something about it being unusual, but not anything about the hyperspace effect specifically that you're referring to. If it's just something sitting there for the whole mission, you could probably get away with using drawPolygon. :drevil: Make sure you change "Mission" to the mission you're using.

junkyard-sct.tbm
Code: [Select]
#Conditional Hooks
$Application: Freespace 2
$Mission: junkyard
$On Mission Start: [
--Load the effect texture
if not g_HyperspaceTexture then
g_HyperspaceTexture = gr.loadTexture("nbackpurp2", true)
if not g_HyperspaceTexture:isValid() then
g_HyperspaceTexture = nil
end
end
]

$On Object Render: [
if not g_HyperspaceRendered and g_HyperspaceTexture then
--This will draw it at 0,0,0
--You'll need extra arguments to draw it somewhere else
gr.drawPolygon(g_HyperspaceTexture)

--Set a render marker this frame so the effect
--doesn't get rerendered with every single object
g_HyperspaceRendered = true
end
]

$On Frame: [
--Reset the render marker for this frame
g_HyperspaceRendered = nil
]

$On Mission End: [
if g_HyperspaceTexture then
--Unload the effect texture
g_HyperspaceTexture:unload()
g_HyperspaceTexture = nil

--Clean up
g_HyperspaceRendered = nil
end
]
#End

How do i "use" scriptys?

Actually i'll check the wiki, ignore this post :nod:

Copy the code to a file named "<something>-sct.tbm" and save it in data/tables, or <mod>/data/tables, where <something> is a meaningful name (Like "rearview-sct.tbm") and <mod> is a mod directory of your choice. I usually give name recommendations with modular scripting tables, the most important thing is to get the "-sct.tbm" suffix and save them in a "data/tables" directory.
Title: Re: C09032008
Post by: Colonol Dekker on September 04, 2008, 07:11:47 pm
Ohhhhhhhhhh, So it's a script tbm like a shp or wep, sct. That's another one to remember now.

Cheers. Excellent ;) :yes:
Title: Re: C09032008
Post by: pecenipicek on September 04, 2008, 08:45:12 pm
Do you remember that mission in homeworld 1 with the "junkyard dog"? eheheee :p

A little bit. I remember something about it being unusual, but not anything about the hyperspace effect specifically that you're referring to. If it's just something sitting there for the whole mission, you could probably get away with using drawPolygon. :drevil: Make sure you change "Mission" to the mission you're using.

junkyard-sct.tbm
Code: [Select]
#Conditional Hooks
$Application: Freespace 2
$Mission: junkyard
$On Mission Start: [
--Load the effect texture
if not g_HyperspaceTexture then
g_HyperspaceTexture = gr.loadTexture("nbackpurp2", true)
if not g_HyperspaceTexture:isValid() then
g_HyperspaceTexture = nil
end
end
]

$On Object Render: [
if not g_HyperspaceRendered and g_HyperspaceTexture then
--This will draw it at 0,0,0
--You'll need extra arguments to draw it somewhere else
gr.drawPolygon(g_HyperspaceTexture)

--Set a render marker this frame so the effect
--doesn't get rerendered with every single object
g_HyperspaceRendered = true
end
]

$On Frame: [
--Reset the render marker for this frame
g_HyperspaceRendered = nil
]

$On Mission End: [
if g_HyperspaceTexture then
--Unload the effect texture
g_HyperspaceTexture:unload()
g_HyperspaceTexture = nil

--Clean up
g_HyperspaceRendered = nil
end
]
#End
probably, a drawn poly and a looping hyperspace sound being played at the center of the drawn poly, with an everytime sexp that basically does the following

everytime - when
-> docked with <Junkyard Dog>
      -> distance from ship to <insert coordinates of the hs poly>
      -> set ship coordinates <central place for gathering junk>

that would be a rough sexp equivalent of how the ships behaved in that mission. the sexp could use a bit of polish just to make sure that something doesnt bork it, but i think it'd work :p
(it'd probably be doable in script too, but i dont even know how to write the lua code :p , i can edit it no prob but i have no idea where to start with it)
Title: Re: C09032008
Post by: chief1983 on September 04, 2008, 10:40:05 pm
Ohhhhhhhhhh, So it's a script tbm like a shp or wep, sct. That's another one to remember now.

Cheers. Excellent ;) :yes:

That's definitely one you don't need to remember (http://www.hard-light.net/wiki/index.php/Modular_Tables) :)
Title: Re: C09032008
Post by: Colonol Dekker on September 05, 2008, 04:32:00 am
Thanks, i'll get my head round this at some point.
Title: Re: C09032008
Post by: Narmon on September 21, 2008, 07:45:15 pm
After I've upgraded to this build (and the 3.6.10 beta vps. I'm not sure whether them or this build is responsible) I now have a strange computer voice reading the mission briefings and the techroom stuff  :nervous:
I've got the German version and it actually tries to speek german, though you don't understand much  :D   
Title: Re: C09032008
Post by: Mongoose on September 21, 2008, 08:58:03 pm
You'll want to flip off the simulated speech options on the Speech tab in the Launcher.  It surprised the heck out of me the other day when I was doing some testing with a build that flipped them on by default. :p
Title: Re: C09032008
Post by: Aardwolf on September 22, 2008, 02:06:12 am
Although the claim has been buried by other stuff since it was said, I would like to point out something.

Although a warp effect without a ship might not be that useful in BtRL or TAP, using it with the render model code could be used very nicely if you have background stuff going on or something.
Title: Re: C09032008
Post by: Narmon on September 22, 2008, 08:35:41 am
You'll want to flip off the simulated speech options on the Speech tab in the Launcher.  It surprised the heck out of me the other day when I was doing some testing with a build that flipped them on by default. :p

Thanks :)

 
Title: Re: C09032008
Post by: chief1983 on September 22, 2008, 10:01:34 am
It's not that the build flips them on in your launcher, it's that most testing builds have them completely disabled, so that even checking the boxes doesn't actually enable it.  They were probably just left checked from a prior run when they were used.
Title: Re: C09032008
Post by: Ace on September 22, 2008, 10:36:54 am
Although the claim has been buried by other stuff since it was said, I would like to point out something.

Although a warp effect without a ship might not be that useful in BtRL or TAP, using it with the render model code could be used very nicely if you have background stuff going on or something.

I can actually think of plenty of uses for it in BtRL, so it'd be very nice to have :)
Title: Re: C09032008
Post by: Stilljoe7 on September 23, 2008, 06:59:14 pm
Not sure if this belongs here or in Mantis - feel free to correct me.

With this build, I have invisible Asmodeus and Mephisto. Also wonky collisions - guns pass right through, while Harpoons do damage.

I went back to the previous build I was using (20080723_chief_4712) and everythiing works.

I'm using 3.6.10 beta Media VPs including Adv Effects, SDR1119, 8X A/F and AA, Resolution 1680X1050

Athlon 64 X2 4200, 2GB RAM, Geforce 7900 GS

[attachment deleted by ninja]
Title: Re: C09032008
Post by: WMCoolmon on September 25, 2008, 04:12:41 am
It actually doesn't belong on mantis, unless the same bug still occurs in C08302008 or any of the more recent nightly builds.
Title: Re: C09032008
Post by: KappaWing on October 14, 2008, 10:37:40 am
Sorry if this is a dumb question but I'm a bit lost.

What (Windows XP) launcher should I use with this?
Title: Re: C09032008
Post by: pecenipicek on October 14, 2008, 10:44:34 am
5.5 c or d.
Title: Re: C09032008
Post by: FreeSpaceFreak on November 04, 2008, 09:23:05 am
The nebula around me is shaking as if I have engaged my afterburner all the time. Is that a feature or a bug? It's driving me crazy :)
Title: Re: C09032008
Post by: KappaWing on November 04, 2008, 09:48:44 am
The nebula around me is shaking as if I have engaged my afterburner all the time. Is that a feature or a bug? It's driving me crazy :)

I had this problem, then I upgraded to the latest nightly build and it was fixed.
Title: Re: C09032008
Post by: chief1983 on November 04, 2008, 10:16:09 am
Well not all of this code may be in SVN yet.  You can try out a trunk build from before this build was made to make sure that it was a problem in the main code base, and not this particular set of modifications.  If it's in this code, it's not fixed in this code yet more than likely and needs to be before it's committed (if this hasn't been already).
Title: Re: C09032008
Post by: FreeSpaceFreak on November 04, 2008, 03:38:02 pm
Well, upgrading to the latest Nightly build did the trick. Lesson learned. Thanks!