Author Topic: Poor man's cloaking  (Read 6273 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Poor man's cloaking
I posted about this ages ago, back when the change-ship-model and change-ship-class sexps were first added, but as usual very few people paid attention, despite repeated encouragement.  So I finally decided to post an example of how they might work.

http://fs2source.warpcore.org/temp/cloaktest.zip

Unzip the file to a regular FS2 install running no mods (mediavps are okay).  Run the "Cloaking Test" mission.  Press 1 to cloak the Pegasus, and 2 to decloak it. :)

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Re: Poor man's cloaking
 :eek2: :eek:

You Sir, are a true god, and my hero for today :)

http://wcsaga.com/~team/Starman/downloads/cloak.avi

You are right, I completly must have missed your first post :) , but this is (mostly) what I always wanted. I don't care that it needs a bunch of SEXP to work (our first autopilot version or deathscream were birth exactly the same way )

Adding a sound to the cloak/decloak action will be no problem, only thing that remains is the engine glow. Since we aren't using the thruster-anis anymore they are one problem less, but is it possible to turn the glows and thruster off without making the ship getting "disabled" ?
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Poor man's cloaking
I'm no god, but I'm pleased to be a hero. :D

There's already an electric spark sound effect in the example (unless you're using an old build with broken sound).  I don't think you can turn off the thrusters via sexp, but what you could do is rename the thruster texture in the model to "invisible" instead of "thruster01".

I should mention that the animation is supposed to gradually fade out instead of flickering.  The animation appears to run much faster when it's a texture than when it's a cbani.  I don't know if this is a bug or something I missed.

 
Re: Poor man's cloaking
If you want my input, I'd say leave it. The flickering looks just as good as a transition as a fade-out/-in would.
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

"You can fight like a krogan, run like a leopard, but you'll never be better than Commander Shepard!"

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Re: Poor man's cloaking
I second that, the flickering is actually a nice effect. I was always used that the cloaking isn't immediately, but that it takes a few seconds. So it's just a matter of how the ani-file will be created

It will require some tryouts of how many conditionals I can pack into one event before it breaks. What additionally will be needed, is that the cloacked ship is not allowed to fire, but at least for enemy ships that shouldn't be hard.

Removing/renaming the thruster is also a solution, since they are all different models.

Pls tell me, does the deactivation of the glowpoints and removing of the thruster texture resulting into a disabled ship, or is this just a question of the destroyed engine-subsystem (of course the cloacked ship must be able to move).

BTW, your post has another nice sideeffect.  I wasn't aware that you can use anis to texture a model. Now I know how the TBP guys made those cool glowing debris :)
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Poor man's cloaking
The catch is getting the AI for non player ships to not react to the presence of the player if/while the player is cloaked.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Re: Poor man's cloaking
This can be done with scripting, i.e. "Ignore Alpha 1" etc. However,  I see this function more suitable for AI-Ships
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Poor man's cloaking
Pls tell me, does the deactivation of the glowpoints and removing of the thruster texture resulting into a disabled ship

No.  A ship is disabled if and only if its engine subsystem is destroyed.

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Re: Poor man's cloaking
Most excellent, than I will further work on this stuff and create the necessary content. Thanks again very much for showing us how to do that :)
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Cobra

  • 212
  • Snake on a Cain
    • Skype
    • Steam
    • Twitter
Re: Poor man's cloaking
*bows before Goober5000* All hail the SCP god! :D

Getter Robo G will be happy to see this, if he ever does. :D
To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow. - Metrodorus of Chios
I wept. Mysterious forces beyond my ken had reached into my beautiful mission and energized its pilots with inhuman bomb-firing abilities. I could only imagine the GTVA warriors giving a mighty KIAAIIIIIII shout as they worked their triggers, their biceps bulging with sinew after years of Ivan Drago-esque steroid therapy and weight training. - General Battuta

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Yays, prepare yourselves for phasing in battlecrabs :yes:
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

 

Offline Prophet

  • 210
  • The know-it-all
Yays, prepare yourselves for phasing in battlecrabs :yes:
Hooray! Happy-happy-joy-joy thinking that makes me feel all tingly :D
I'm not saying anything. I did not say anything then and I'm not saying anything now. -Dukath
I am not breaking radio silence just cos' you lot got spooked by a dead flying ****ing cow. -Sergeant Harry Wells/Dog Soldiers


Prophet is walking in the deep dark places of the earth...

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
I am astonished.  How many other SCP features are going unused because people aren't experimenting with them?

And don't say it's lack of documentation.  I'm pretty sure all the features in this thread have been documented for at least a year. :p

 

Offline Flipside

  • əp!sd!l£
  • 212
It's because, for example, whilst everyone was struggling to come to terms with the Animation code, about 3 features appeared in the SCP that I totally missed. Personally, I think new stuff gets added to the CVS very rapidly, and particuarly for campaigns, this can cause a lot of consternation for people to use all the features. I'm fine with going back and HT&Ling my stuff for TI, but then, I'm not going to go back again and start adding bits for animation on a lot of the models, not because I don't appreciate the feature, but because if I keep going back and tweaking everything for each new feature, I'm never going to finish anything ;)

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
It's also a question of not seeing the whole picture, that's something you coders have an advantage against us :)

While I know this change-ship class quite some time (I use it for having the battlegroup vanish out when you move away with autopilot to increase the illusion of great distances), I simply didn't get the idea of using that for the cloaking because I was missing a vital piece, the animation.

And I didn't knew that it is possible to use an animation as a texture (though thruster is using it too). Sometimes you need a person that bangs your head against the obvious :D
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Col. Fishguts

  • voodoo doll
  • 211
If I'm seeing this right, poor man's cloaking requires 3 POFs with 3 table entries, right ?
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
4 pofs and 4 table-entries, if you count the standard model with them.

Normal textured model
cloaking model (animated)
cloaked model (invisible)
decloaking model (animated).
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
any chance you could to the same thing with texture replacement or render to texture? with scripting you  take an existing ship texture, and then adds an alpha chanel (or modifies an existting alpha chanel). the script would slowly fade the alpha chanel to the desired opacity. with texture replacement you could have a series of textures, each with less opaque alpha chanels, and slowly go from one to another to another.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Okay, I spent the past few days confirming that the incorrect animation speed is in fact a bug, and fixing it accordingly.  The next CVS or release candidate build will have proper animation support, which means that the Pegasus cloak effect supplied in my example will take the full 1 second, as designed. :)

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
You mean as intended. :) I still rather like the exisitng effect. And idea might be, why not allow both? Let the AI ships have the "instant on" cloak and (should a mission or campaign evolve around the usage of cloaking) the players ship after "aquiring" the technology (imperfectly, of course) have it do the effect in the video. Or would the effect in the video even still be possible?
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys