Author Topic: Custom warp effects not working  (Read 3913 times)

0 Members and 1 Guest are viewing this topic.

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Custom warp effects not working
I've been recently trying to add a custom warp effects, using customized warpin and warpout entries in ships.tbl.
Unfortunately, it simply doesn't work, the ship is still using default jump effect (I'm using 3D warp and Warp Flash).
http://www.mediafire.com/?mekhp158160p2lh
I've made a mod that adds the custom warp effect and sounds to Aeolus, (pressing "1" calls it in).
Debug doesn't comaplain in any way.

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Custom warp effects not working
It seems that $warpout animation: and $warpin animation: are ignored by default warptype.  Only Galactica and Homeworld warptypes use $warpout animation: and $warpin animation:.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Custom warp effects not working
I see, I'm going to try "Homeworld" warp style.
I think that there is a potential for improvement there, I can see many potential uses for customizing "default" style warp effect.
It would be great if SCP could add something like $warpin model: , which would allow customization of 3D warp effects.
Of course, I'd also like to see similar functionality for warpouts, especially that in this case, there's no way to add a custom effect to warpout without setting it to "Galactica" style.

Also, the wiki entry states something like this:
Code: [Select]
$Warpout Speed:
FS2 Open 3.6.10:
Sets the speed at which the ship warps out for default warpout effect
Sets the time that the ships warp out (not the animation itself) takes for BTRL type warpout effects
Syntax: Float, meters per second or milliseconds
It doesn't work as described, ships with "Galactica" (former BTRL) style warp still used this like "default" style.
(especially visible on warpouts, where they would accelerate to ridiculus speeds if the value was set to 3000 (which would give 3s warpout time if it worked like described).

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Custom warp effects not working
I see, I'm going to try "Homeworld" warp style.
I think that there is a potential for improvement there, I can see many potential uses for customizing "default" style warp effect.
It would be great if SCP could add something like $warpin model: , which would allow customization of 3D warp effects.
Of course, I'd also like to see similar functionality for warpouts, especially that in this case, there's no way to add a custom effect to warpout without setting it to "Galactica" style.
It looks like it would be straight forward to enable the "default" warp style to use a custom animation rather than the blue or green swirl.  This would not change the warpin/out mechanics.

But the question is, what would the the use case?  That is, would it be something that is not already supported.

Also, the wiki entry states something like this:
Code: [Select]
$Warpout Speed:
FS2 Open 3.6.10:
Sets the speed at which the ship warps out for default warpout effect
Sets the time that the ships warp out (not the animation itself) takes for BTRL type warpout effects
Syntax: Float, meters per second or milliseconds
It doesn't work as described, ships with "Galactica" (former BTRL) style warp still used this like "default" style.
(especially visible on warpouts, where they would accelerate to ridiculus speeds if the value was set to 3000 (which would give 3s warpout time if it worked like described).
Well, I don't know what to say to that1.  The code for the "Galactica" warp style uses $Warpin Time: and $Warpout Time:.  The reason that you would still accelerate would be a result of the AI doing its normal thing when a warpout is ordered..


1) After more sleuthing there are even comments that say it uses $Warpin Speed: and $Warpout Speed: but the code immediately contradicts it, but this code is commented out anyway  :wtf:
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Custom warp effects not working
It doesn't work as described, ships with "Galactica" (former BTRL) style warp still used this like "default" style.
(especially visible on warpouts, where they would accelerate to ridiculus speeds if the value was set to 3000 (which would give 3s warpout time if it worked like described).

I seem to remember noticing that once but deciding not to Mantis it cause having the ship accelerate to a ridiculous speed and then disappear with a flash basically gave us Star Trek warpouts as a side effect. :p
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
Re: Custom warp effects not working
1) After more sleuthing there are even comments that say it uses $Warpin Speed: and $Warpout Speed: but the code immediately contradicts it, but this code is commented out anyway  :wtf:
You may want to look at the revision history then.  Some people (not naming names here) had, or have, a tendency to rewrite code but not rewrite the comments that describe that code.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Custom warp effects not working
OK, I tried Homeworld warp style and it indeed does work, but it doesn't look like I'd like it to.
Also, there's no Homeworld style warpout effect, which seems weird to me.
It looks like it would be straight forward to enable the "default" warp style to use a custom animation rather than the blue or green swirl.  This would not change the warpin/out mechanics.
It would be great if that could be done, I see no reason why custom animations shouldn't function for "default" warp style.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Custom warp effects not working
That probably wouldn't be hard to get working.

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Custom warp effects not working
That probably wouldn't be hard to get working.
Does that mean you are volunteering?
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Custom warp effects not working
I didn't say that. :p

But I was thinking about how to go about doing it.  If I have some time this weekend I'll check it out.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Custom warp effects not working
Bleh, I take back my prediction about the difficulty level.  It turns out that the "Default" warp effect uses the fireball code to play the warp animation, whereas the other warp effects use the standard animation code.  You can't mix those easily because one has distance LODs and the other doesn't, and they go through different code paths.  So you'd have to create a new warp effect if you wanted to specify an arbitrary animation.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Custom warp effects not working
Would that be possible to add a new "custom" type then?
It'll work just like default, but using a different code.

  

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Custom warp effects not working
Yes, it's certainly possible, but someone would have to figure out how to do it.  They'd have to make a new code strategy (standard animation code) work exactly like the old code strategy (fireball code) and that could get tricky.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Custom warp effects not working
OK, I tried Homeworld warp style and it indeed does work, but it doesn't look like I'd like it to.
Also, there's no Homeworld style warpout effect, which seems weird to me.


There's no HW style warpout effect because, well, there's no HW style warpout effect specified.


to be more specific, in ships.tbl

Code: [Select]
<stuff before>
...
$Warpin type: Homeworld
$Warpin start sound: 192
$Warpin speed: 0
$Warpin time: 9.5
$Warpin animation: HGN_WARP
$Warpout type: Homeworld
$Warpout start sound: 193
$Warpout speed: 0
$Warpout time: 9.5
$Warpout animation: HGN_WARP
...
<stuff after>


the $Warpin/out animation: field is where you enter the name of your bitmap/eff/whatever that you want to be displayed. it needs to be in the good old Effects folder.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Custom warp effects not working
No, I meant that Wiki states that $Warpout type: can't be set to "homeworld" and I remember that debug once complained when I tried (long time ago though).
It's good to know Homeworld style works for warpouts.
Somebody who knows exactly what can be done and what not should take a look at the Wiki and update such stuff.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Custom warp effects not working
the effect has been in trunk for almost 2 years. whoever was editing that part wasnt exactly thorough.

as a side note, its possible the string is case sensitive, since homeworld warpin/out has worked in the exact form its in the code snippet up there since WMC first gave it to me to test it, on 9th Feb. 2008.

[edit] fixed the wiki page.




and upon further review, it looks like both the Homeworld style Hyperspace and Star Wars style Hyperspace were coded in at the same time most likely, so whoever edited the wiki at first was probably not paying any attention.
« Last Edit: September 29, 2010, 01:18:17 pm by pecenipicek »
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.