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

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • 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
×
×
  • Create New...