Jump to content
The Dark Mod Forums

FX System


Dragofer

Recommended Posts

@graymanNo, I'm not aware of anything dedicated specifically to the fx system on the wiki. I've just written this not long after seeing that the security camera code looks for "fx_damage" and "fx_destroyed" spawnargs (which don't exist in the current entityDef).

Several search functions later it turned out that several other entity types also have code to trigger fx in specific situations (like the "fx_collide" spawnarg on moveables), and that only very few fx exist so far across core assets and all FMs. The main one is thunder.

The iddevnet article will pass as documentation until we have the fx system wikified.

Link to comment
Share on other sites

Wellingtoncrab wrote about his experiences with fx on Discord, reposting it here so it doesn't get buried:

Quote

The fx system does seem like it has a lot of potential. Couple of hurdles I ran into messing around with writing one is I couldn't find any success with setting  the "restart" keyword to 1 actually making the fx action loop in game - the would only ever play once. There is a "repeat" spawn arg you can put on the func_fx entity which does make it loop at a fixed interval, but once the fx was triggered I couldn't get it to then turn off when targeted from a switch like separate speakers/emitters/lights would. I think I might still be too lizard brained for this one.

Looks like there are some flaws in the system. Would be good to know what they are, maybe they can be fixed. Making the func_fx repeat at random intervals and stop repeating when triggered is probably something I can do.

Link to comment
Share on other sites

Looking at the c++ code the restart only seems to set a new delay and set the time to the current time then continue is called to go to the top of the for loop.

if ( fxaction.restart ) 
{
    if ( fxaction.random1 || fxaction.random2 ) {
    	totalDelay = fxaction.random1 + gameLocal.random.RandomFloat() * (fxaction.random2 - fxaction.random1);
    } else {
    	totalDelay = fxaction.delay;
    }

    laction.delay = totalDelay;
    laction.start = time;
}

continue;

perhaps this continue triggers when restart is used? Is called before the code above in the for loop

//
// see if it's delayed
//
if ( laction.delay ) 
{
	if ( laction.start + (time - laction.start) < laction.start + (laction.delay * 1000) ) 
	{
		continue;
	}
}

The logic that I read in that is, if the amount of time that passed, is less than, total of delay, don't do the FX effect.

So if you want to restart the effect, you set delay to zero?

Also looking at the Doom 3 fx files, I have yet to see one, where restart is set to 1, could be a unfinished feature, why, because all Doom 3 fx effects that I saw, seem to be a do once forget effects, mostly used for the monster teleport/spawn effect.

Also searching through all the Doom 3 scripts the only place where startFx() is used is in the ai_character.script and ai_monster_base.script, again only for the teleport effect. 

Edited by HMart
  • Like 1
Link to comment
Share on other sites

I've used FX before: the priest in ITB has a melee attack involving a hammer of holy fire, which briefly spawns a dynamic light. I agree the system is surprisingly little used.

One of my ideas (inspired by the footprints in Down By the Riverside) was for an invisible monster that would leave decal footprints via frame commands for FX bound to the foot joints. I ran into a minor drawback when I discovered the decal command applies a random rotation, so it would have to be a generic blob instead of a footprint shape. But with a big blob, and some sparks, and maybe a screen shake, I think it could still be effective.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

iddevnet.com has gone down at long last, so anyone wanting to learn about the FX system has the following options until we have our own documentation:

Use the Wayback Machine:
https://web.archive.org/web/20200613234848/https://www.iddevnet.com/doom3/

Download the website as a .zip from moddb:
https://www.moddb.com/downloads/iddevnet-archive

Download the website as a .zip from the TDM server:
http://ftp.thedarkmod.com/backup/iddevnet.zip

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • datiswous

      Beta test(er) tip:
      Test your mission at least once with all lights on. This can be done using notarget in console. Maybe just quickly fly around with noclip.
      Also test all lights which are off by default (enable all lights via script?). Mission testers will miss a lot of light bugs, because they take out lights with water arrows etc. and don't turn on lights so they don't spot light leaks etc. I've seen this now in some recent new missions after they're released.
      · 0 replies
    • Bergante

      welcome back Sotha 🫠
      👻
      · 6 replies
    • JackFarmer

      This site is getting more popular by the day - ca. 870 bots online this morning CET!
      · 2 replies
    • Xolvix

      Personal reminder for me to actually get back to TDM and all the missions I missed.
      · 1 reply
    • JackFarmer

      What is actually grammatically correct when it happens in the future? “Paul Atreides is an idiot” or ‘Paul Atreides was an idiot’? or ‘Paul Atreides will be an idiot’? The latter would at least fit in with the whole psychic and providence stuff!
      · 2 replies
×
×
  • Create New...