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

    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 2 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
×
×
  • Create New...