Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: WMCoolmon on October 10, 2006, 03:30:56 am

Title: Lining up the requests
Post by: WMCoolmon on October 10, 2006, 03:30:56 am
This build features a few things that've been requested multiple times but never really addressed. Now they've been addressed in the excessively-expanded WMCoolmon style.

Debris speed cap
Debris can now be capped on a per-shipclass basis. I've included minimum and maximum values, so all debris will not be created equal (If both are defined, a random value in between the two will be chosen). Also added are similar fields for rotation, and lifetime. Note that debris with a min lifetime will not go away until that lifetime is met (unless it's shot down), so if you want a dead ship hulk, there you go.

(http://fs2source.warpcore.org/temp/wmc/C10102006/deadfloatie_thumb.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/deadfloatie.jpg)


Animated nebula poofs
'nuff said. Just replace the static image with an animation or change the filename in nebula.tbl

(http://fs2source.warpcore.org/temp/wmc/C10102006/asteroidnebula_thumb.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/asteroidnebula.jpg)

Impact/Damage Spew particle info can be specified in ships.tbl
Pretty obvious. Impact is when you run into something, damage is when you shoot it.

(http://fs2source.warpcore.org/temp/wmc/C10102006/bademissions_thumb.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/bademissions.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/shockwaveengine_thumb.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/shockwaveengine.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/shockwaveleak_thumb.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/shockwaveleak.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/shockwaveoutburst_thumb.jpg) (http://fs2source.warpcore.org/temp/wmc/C10102006/shockwaveoutburst.jpg)

Ships.tbl data example
Code: [Select]
$Show Damage: YES  ;;No, this still does nothing.
$Impact Spew:
+Texture: none ;;Defaults to fire
+Relative Position: (0.0 0.0 0.0)   ;;These are all the default values
+Relative Velocity: (0.0 0.0 0.0)
+Relative Normal: (0.0 0.0 0.0)
+Normal Variance: 0.3
+Min Radius: 0.2
+Max Radius: 0.5
+Min Velocity: 2.0
+Max Velocity: 12.0
+Min Lifetime: 0.05
+Max Lifetime: 0.55
+Min Particles: 25
+Max ParticleS: 30
$Damage Spew:
+Texture: none ;;Defaults to smoke
;;etc etc
$Debris:
+Min Lifetime: 999.0  ;;These are values that give you slowly rotating,
+Max Lifetime: 999.0 ;;long-lasting debris
+Min Speed: 0.0
+Max Speed: 1.0
+Min Rotation Speed: 0.0
+Max Rotation Speed: 1.0

Build (includes FRED):
http://fs2source.warpcore.org/exes/latest/C10102006.zip

Hopefully the release build works for everybody this time.

Easter Egg I Found By Accident :p:
(http://fs2source.warpcore.org/temp/wmc/C10102006/toomuchfun.gif)
Title: Re: Lining up the requests
Post by: PotzUK on October 10, 2006, 09:17:03 am
Interesting :)

Will these features be included into the main releases?
Title: Re: Lining up the requests
Post by: taylor on October 10, 2006, 09:34:42 am
Will these features be included into the main releases?
Not 3.6.9, it is only getting 2 more new features/fixes and then we're shipping it.
Title: Re: Lining up the requests
Post by: DaBrain on October 10, 2006, 09:42:34 am
WMC... I don't know how to put it... this really rocks! I'm going to use every single feature!

Edit: Except for the easter egg.  ::)
Title: Re: Lining up the requests
Post by: Taristin on October 10, 2006, 10:36:32 am
That easter egg is ooooooooooold!
Title: Re: Lining up the requests
Post by: phreak on October 10, 2006, 01:02:33 pm
I'm surprised he didn't know about it ;)
Title: Re: Lining up the requests
Post by: karajorma on October 10, 2006, 01:53:16 pm
Not 3.6.9, it is only getting 2 more new features/fixes and then we're shipping it.

Gimme a shout before you do. I've got a new fix which allows the set ammo SEXPs to work in multi that I rather desperately need for BtRL. I don't want to miss the boat cause I'm being careful and getting it tested before committing it :D
Title: Re: Lining up the requests
Post by: Black Wolf on October 10, 2006, 02:38:37 pm
Impact/Damage Spew particle info can be specified in ships.tbl
Pretty obvious. Impact is when you run into something, damage is when you shoot it.[/b]

You rock. Now we can have splashdowns in TI. :D
Title: Re: Lining up the requests
Post by: taylor on October 10, 2006, 03:03:33 pm
Not 3.6.9, it is only getting 2 more new features/fixes and then we're shipping it.

Gimme a shout before you do. I've got a new fix which allows the set ammo SEXPs to work in multi that I rather desperately need for BtRL. I don't want to miss the boat cause I'm being careful and getting it tested before committing it :D
Well it's just the 2 big things, which you already know about.  The testing and final coding on those is going to take another two weeks or so though.  So, there is plenty of time to get your fix tested. :)

And I still want to revisit animated subobjects in multi before 3.6.9 goes out too.  A couple of them can be made to work (like afterburner triggered effects, and maybe weapon triggered effects) without any changes to the networking code itself.
Title: Re: Lining up the requests
Post by: CP5670 on October 10, 2006, 04:30:12 pm
I don't suppose this (http://scp.indiegames.us/mantis/bug_view_page.php?bug_id=0001039&nbn=3#bugnotes) is one of the two things? :p This is the one remaining bug that I need fixed for my campaign. I've tried all kinds of crap to get around it, but my attempts are actually leading to problems in different aspects of the game.

Quote
Easter Egg I Found By Accident : :p

If you're referring to the URA Moron thing, that has been known for ages. :p
Title: Re: Lining up the requests
Post by: DaBrain on October 10, 2006, 05:37:54 pm
And I still want to revisit animated subobjects in multi before 3.6.9 goes out too.  A couple of them can be made to work (like afterburner triggered effects, and maybe weapon triggered effects) without any changes to the networking code itself.

And some more great news! This is one of these great threads. I should keep watching it. ;)
Title: Re: Lining up the requests
Post by: neoterran on October 10, 2006, 08:54:55 pm
whn are the shaders coming  :confused: :shaking:
Title: Re: Lining up the requests
Post by: WMCoolmon on October 10, 2006, 10:14:08 pm
I don't suppose this (http://scp.indiegames.us/mantis/bug_view_page.php?bug_id=0001039&nbn=3#bugnotes) is one of the two things? :p This is the one remaining bug that I need fixed for my campaign. I've tried all kinds of crap to get around it, but my attempts are actually leading to problems in different aspects of the game.

Quote
Easter Egg I Found By Accident : :p

If you're referring to the URA Moron thing, that has been known for ages. :p

Well I just committed the fix I mentioned in Mantis to the 3.6.9 RC?? branch.
Title: Re: Lining up the requests
Post by: Col. Fishguts on October 11, 2006, 03:16:28 am
Debris speed cap

I will sacrifice a chicken in you honor, thank you.
Title: Re: Lining up the requests
Post by: CaptJosh on October 11, 2006, 03:55:42 am
I suppose this means that finally we won't see debris spinning away at speeds faster than even one of Inferno's Claymore Mk. IIIs anymore?
Title: Re: Lining up the requests
Post by: CP5670 on October 11, 2006, 08:07:15 am
I don't suppose this (http://scp.indiegames.us/mantis/bug_view_page.php?bug_id=0001039&nbn=3#bugnotes) is one of the two things? :p This is the one remaining bug that I need fixed for my campaign. I've tried all kinds of crap to get around it, but my attempts are actually leading to problems in different aspects of the game.

Quote
Easter Egg I Found By Accident : :p

If you're referring to the URA Moron thing, that has been known for ages. :p

Well I just committed the fix I mentioned in Mantis to the 3.6.9 RC?? branch.

Awesome, thanks. :yes: I'll try it out in the next available build.

Did you find out what was up with the directive list not disappearing? I think that may be a separate bug, but I wasn't sure at the time. I can provide a test mission if you want.

If there is a way to remove a HUD section through the scripting system, I may be able to manually get rid of the directive list that way, but it would be more convenient if hud-disable-except-messages got rid of it properly.
Title: Re: Lining up the requests
Post by: IPAndrews on October 11, 2006, 08:22:29 am
TBP can use the ship defined particle spew and cap ship debris speed limitation. So thank you on our behalf for both of those.
Title: Re: Lining up the requests
Post by: wolf on October 11, 2006, 12:03:52 pm
whn are the shaders coming  :confused: :shaking:
Only after 3.6.9 is released.
Title: Re: Lining up the requests
Post by: WMCoolmon on October 12, 2006, 01:18:13 am
TBP can use the ship defined particle spew and cap ship debris speed limitation. So thank you on our behalf for both of those.

'Welcome. :)

Awesome, thanks. :yes: I'll try it out in the next available build.

Did you find out what was up with the directive list not disappearing? I think that may be a separate bug, but I wasn't sure at the time. I can provide a test mission if you want.

If there is a way to remove a HUD section through the scripting system, I may be able to manually get rid of the directive list that way, but it would be more convenient if hud-disable-except-messages got rid of it properly.

I don't know. If it is a bug, it's not something I'm going to look into in the near future; I have enough on my coding plate as-is.

As for disabling HUD sections...hmm. It's not something that's too interesting to me, I would rather see people experimenting with creating their own HUDs and adding functions to expand the system capabilities + better allow people to do that. Again, I don't want to spread myself too thin. Once I _finalize_ the scripting system, ask me about it again.
Title: Re: Lining up the requests
Post by: CP5670 on October 12, 2006, 02:56:01 am
I guess I'll just have to think of something to get rid of that window.

Maybe I can just move it off the screen, or I could fill it with blank entries, add blank frames to it and change its text. There has to be some way to do this...
Title: Re: Lining up the requests
Post by: Nuke on October 18, 2006, 06:41:58 am
i want to create huds from scratch, but there are a few problems with overriding the hud. for example not being able to target anything or aquire aspect lock. meaning if we want a new hud we must also script in new targeting from scratch.
Title: Re: Lining up the requests
Post by: WMCoolmon on October 24, 2006, 02:28:44 am
You should be able to target stuff with the normal keys, and use the .Target variable for the ship to set the targetting computer variables. Now that won't work for subsystems, I forget what evil plans I had in mind for that variable. I think the problem was that it would require checking that when the variable (TargetSubsystem) was changed, you'd have to change the Target variable as well, and I was skeptical of doing that.

As far as aspect lock, that is an icky problem. I hate how FS has it hacked in for the player ship, it's all messy and is completely incompatible with the way the AI does it. (Which is basically a time variable that changes depending on difficulty and show on. If the AI stares at your ass within a certain cone of vision for that long, it has a lock.) The easiest way to do that would be to extrude those variables into scripting (sigh) though I may come up with alternate solutions.

Really I need to finish the core scripting system. Right now I have a suspicious memory of variables (any of them) not being settable, and me not being sure quite why. Also, I was having a nice null CTD that I suspect is due to some stupid Lua thing. The internal Lua API/SDK has about as good debugging skillz as the original scripting system implementation, except all the variables are a whole lot vaguer. Generally, all I'll be getting is that some two-letter variable doesn't work with a three-letter variable, when using a function named _getN() or something similar.

The go-between interface for FS2 that I wrote, of course, never crashes and always has completely clear error messages. (Actually, some parts of it are downright paranoid.)
Title: Re: Lining up the requests
Post by: Nuke on October 25, 2006, 05:40:05 pm
ive had some problems with the new setup. get alot of errorless ctds every time i do something lua doesnt like. i usually run the game after every line of code to make sure i didnt screw something up majorly. really i think im gonna need to see some examples in order to move on. enough has changed where i dont really know what im doing anymore.
Title: Re: Lining up the requests
Post by: WMCoolmon on October 31, 2006, 03:29:34 am
Lua should never, ever do an errorless CTD. Can you post some example code?
Title: Re: Lining up the requests
Post by: Nuke on November 01, 2006, 06:10:40 am
i know what i did, i used a ' instead of a , when using ba.createVector(). its just one of those wierd things. should at least give a syntax error.

btw what is the proper way to ger a component ov a vector, i tried 20 different ways and got 20 different errors.
Title: Re: Lining up the requests
Post by: WMCoolmon on November 03, 2006, 08:02:09 pm
This works for me:
Code: [Select]
#Conditional Hooks
$State: GS_STATE_INITIAL_PLAYER_SELECT
$On Frame: [
gr.setColor(255, 255, 255, 255)
gr.drawString(ba.createVector(1.0, 23.0, 3.0).y, 10, 60)
]
#End

Some of that will be different depending on the build, but the basic code there would be
Code: [Select]
ba.createVector(1.0, 23.0, 3.0).y
I know there was a problem with variables not getting set in newer builds, that has been fixed in the newest builds (see the other build in this recent builds forum).

I've also setup FS2_Open to pass along the Lua parsing error, as it wasn't before and that was causing the syntax error thing.
Title: Re: Lining up the requests
Post by: Nuke on November 04, 2006, 03:04:43 pm
im also having trouble getting physics handles from alpha one. i came to the conclusion that trying to get a handle from a handle doesnt work, the other scripters clued me in that i need to get a handle from an object and that they have no idea how to do this. all the scripters are scratching their heads with this one, so any assistance you can render would be apricieated :D were not sure if this is a bug or just something were not doing right.
Title: Re: Lining up the requests
Post by: WMCoolmon on November 04, 2006, 06:06:11 pm
Are you using the newer build (http://www.hard-light.net/forums/index.php/topic,43088.0.html), are vectors working, and can you post some sample scripting?
Title: Re: Lining up the requests
Post by: WMCoolmon on November 04, 2006, 06:38:05 pm
This:
Code: [Select]
#Global Hooks
$HUD: [
gr.setColor(0, 255, 0, 255)
gr.drawString("Player target's afterburner speed: " .. sv.Player.Target.Physics.AfterburnerVelocityMax.z, 10, 10)
]

should work in the Pre-Halloween build. I just tested it in my local codebase, and AFAIK none of the relevant code has been updated between builds.

In addition, I've updated the scripting.html to include signs of derivation. For example, the "ship" section is now listed as "ship:object" as it is derived from the object handle and should include all variables/functions of object.

There is a problem with the physics.MaxVelocity variable, as it looks like I moved it over from the object handle but forgot to update it accordingly. So you'll get errors complaining about 'type object expected'. Fixed that in my local codebase too.
Title: Re: Lining up the requests
Post by: Nuke on November 05, 2006, 06:34:54 pm
that helps alot, il see if i cant make something that works for a change :D

and vectors seem to work, just a matter od me not knowing how to use them right :D
Title: Re: Lining up the requests
Post by: Scooby_Doo on November 06, 2006, 12:45:20 am
Sweet!!!!

Set speed to zero, lifetime to something like 99999

Now all I need is to have the debris give off explosion effects and explosion sounds and it will be possible to do WC Prophecy style cap ship deaths.  :) :)