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

    • taaaki

      All services hosted on the server were sluggish. I've rebooted and it appears to be better. Let me know if there are still issues.
      · 4 replies
    • datiswous

      Forum is kind of slow lately..
      · 4 replies
    • taffernicus

      How fun is it to play as an undead in thief trilogy / dark mod ? The haunting(T2) and To the end with nothing(T2). Those FMs are exemplary according to me
       
      *tangential, Garrett vs countless apparitions
      https://ibb.co/hM0JrSh
       
      · 7 replies
    • JackFarmer

      Who is actually working on new missions right now? That I, the greatest mapper of all times (and I say this in all modesty, it is innate in me) am working on something epochal is clear to everyone by now. But who else is working on new missions? Please let me, your God, know, because it's so depressingly quiet here and I don't like to post pictures all the time, because even for me it gets a bit too boastful (although justified) with time.
      · 18 replies
×
×
  • Create New...