Jump to content
The Dark Mod Forums

FrobActions Script


snatcher

Recommended Posts

It occurred to me, that the blinking highlight feature you want to implement could make situations worse in which things are hard to frob. Like the container issue Obsttorte is right now working on. You certainly experienced it: you can't loot a tiny object because the bottom of the container itself is highlighted. So you move the mouse by millimeters until the loot highlights and then frob it. I can imagine this would be hard with both bottom and loot highlights blinking all the time!

Edited by wesp5
Link to comment
Share on other sites

On 7/6/2022 at 10:59 AM, Obsttorte said:

I don't understand what exactly you are trying to achieve. The code you posted doesn't make much sense to me, as a non-frobable entity cannot be frobhilighted.

Right 😕

I can't figure out anything. I am unable to modify any aspect (size, alpha, shader...) of the object currently highlighted.

TDM Modpack 4.0

Link to comment
Share on other sites

2 hours ago, snatcher said:

Right 😕

I can't figure out anything. I am unable to modify any aspect (size, alpha, shader...) of the object currently highlighted.

You could try changing shaderParm11,that's what frob highlight stages use

Link to comment
Share on other sites

7 hours ago, wesp5 said:

Like the container issue Obsttorte is right now working on

Uhm ... nope.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

8 hours ago, wesp5 said:

It occurred to me, that the blinking highlight feature you want to implement could make situations worse in which things are hard to frob. Like the container issue Obsttorte is right now working on. You certainly experienced it: you can't loot a tiny object because the bottom of the container itself is highlighted. So you move the mouse by millimeters until the loot highlights and then frob it. I can imagine this would be hard with both bottom and loot highlights blinking all the time!

Probably. We have to see it in action to understand if 1) it is a good idea after all, and 2) what kind of blink/flash/pulse/glow (or a mix of a few in a loop) works best.

2 hours ago, Dragofer said:

You could try changing shaderParm11,that's what frob highlight stages use

Thanks Dragofer.

So far I can only make a frobable object non-froable. When attempting setShaderParm(11, 0.0f) the game registers it (println) but the object gets back to normal at some point shortly (milliseconds) after.

I found one custom script that makes a particular object vanish but I don't know how to extend something similar to all frobable objects.

In addition, I also noticed in Darkmod.cfg we can alter the "brightness" of frobable objects simply by adjusting the values of the below commands, in example 0.0 -> 0.1 -> 0.2 -> 0.3 ...

seta r_frobHighlightColorMulB "0.3"
seta r_frobHighlightColorMulG "0.3"
seta r_frobHighlightColorMulR "0.3"

But I am not sure if these commands are available via script.

I understand the FrobOutlineStage effort is kind of new so perhaps, knowledge is fresh and the "animated pulse" is better addressed right at the heart of the game.

TDM Modpack 4.0

Link to comment
Share on other sites

8 hours ago, wesp5 said:

I meant already worked on, but it seems with little success ;).

There was success, but it was only a proof of concept. As explained in the respective thread, it is hard if not impossible to reversivly implement this for existing missions. Therefore, it is something mappers can implement in their own mission, and if it is liked, it may establish as new standard (maybe causing people to successivly updating older fms with this).

@snatchershaderParm11, as used by the standard frob hilight method, is set by the engine. But there is the possibility to create time-depending effects in material shaders. http://old.mrhide.fr/doom3/materials.html

Using shader programs for frob-hilighting or outlining is a new approach. There are some tests been made and if I am not mistaken the fundaments are there, but I haven't fiddled with it by now.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

10 hours ago, snatcher said:

So far I can only make a frobable object non-froable.

How and in which script do you do that? Because this might be the key to making container bases non frobable once the lid has been opened! Or do you mean you can only set a certain kind of entity non frobable for the whole mission?

Link to comment
Share on other sites

1 hour ago, wesp5 said:

Because this might be the key to making container bases non frobable once the lid has been opened

Making an entity unfrobable that has a frob peer to other entities will make the latter unfrobable, too. Hence there was no way to implement the container stuff and that's why I've added the new script functions. So first off you have to remove the frob peer when opening and then make the base unfrobable. So the steps after frobbing are

  1. remove the frob peer via removeFrobPeer
  2. find out which entity is the base (the lid is usually a door, whereas the base is a froblock)
  3. make the base non frobable

If you want to apply this to all containers it probably makes sense to alter the frobaction script used by froblock entities.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

1 hour ago, Obsttorte said:

Making an entity unfrobable that has a frob peer to other entities will make the latter unfrobable, too.

Hm, I can't say I've run into that problem when I simply disabled frobability for the chest body in my original script. Wesp5 seems to have played with it for a while until he ran into a special kind of container where the body had to be frobbed in order to cause the door to open. Maybe such cases can be identified by checking for which entity has lockpicking spawnargs.

Link to comment
Share on other sites

You can find in the opening post version 2 of the script.

For consistency sake in v2 I limited loot animations to items that have some monetary value (except Paintings). I want to keep these downloads as little intrusive as possible and if you want more animations just wait until @wesp5 is done with his next version of the Unofficial Patch.

I also made a mistake while assessing missions impacted. Here is the right list (I think):

TDM Modpack 4.0

Link to comment
Share on other sites

More good news! Dragofer managed to write a script that disables the bottom of containers when the top is opened so getting loot out should be much easier now. I will include it in the next update of my patch, but I also attached it here for people to try it out and report any missions that might break. As with other custom scripts, you need to enable it like shown in the attached tdm_user_addons.script. Have fun!

tdm_froblock_frobability.script tdm_user_addons.script

Edited by wesp5
Link to comment
Share on other sites

You can find in the opening post version 3 of the script.

I detected the Fast Doors functionality breaks some missions and the culprit was found in the inclusion of "tdm_mover_doors.def".

Root cause: If a mission creator includes a custom script but avoids a corresponding def (or the other way around) his/her script or def will take preference but the game will default to the (now broken) file from this download. This shouldn't happen anymore in v3.

@wesp5, you should update the Unofficial Patch:

  • Add the updated bits from tdm_frobactions.script
  • Remove tdm_mover_doors.def from the patch

Cheers!

Edited by snatcher

TDM Modpack 4.0

Link to comment
Share on other sites

Cool. The Unofficial Patch should have its own thread (if it hasn't got one already).

 

On 7/12/2022 at 10:56 PM, wesp5 said:

More good news! Dragofer managed to write a script that disables the bottom of containers when the top is opened so getting loot out should be much easier now. I will include it in the next update of my patch, but I also attached it here for people to try it out and report any missions that might break. As with other custom scripts, you need to enable it like shown in the attached tdm_user_addons.script. Have fun!

I noticed this above a few minutes ago. Very well done @Dragofer! And thanks @wesp5 for sharing.

Good Team work.

  • Like 1

TDM Modpack 4.0

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • 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
×
×
  • Create New...