Jump to content
The Dark Mod Forums

FrobActions Script


snatcher

Recommended Posts

EDIT: These mods are now part of the TDM Modpack.

---------------------------------------------------------------------

Hi,

In this topic I merge two topics that have been recently discussed:

Since the two mechanics share common libraries I merged them into a single download so that we can use them both at the same time.

The set of files provided should work in any mission except:

Missions above will play fine though, since the scripts they contain will override any stock or custom content.

The only downside of all this is that previous saves will not work when you add the new files. You must start new missions from scratch. Consider yourself warned 😉

---------------------------------------------------------------------

FAST DOORS

  • Credits: Idea and programming by Obsttorte. Treatment by snatcher.
  • Description: Doors (and other items in the category) open and close faster when running.

LOOT ANIMATIONS

  • Credits: Originally found in the Noble Affairs mission by Goldwell. Programming by Obsttorte. Treatment by snatcher.
  • Description: (From Obsttorte) "It basically moves the loot and other items towards the player a bit before putting it in the inventory upon frob, thus underlining the impression of actually taking it the way it was done in the Dishonored games. And yes, it is a script I've created at request by Goldwell."

I further adjusted the script a little:

  • Instead of moving the items towards the center of the screen, items are moved towards the body for best effect.
  • The animation is a tad slower for best effect.

Please note the download also includes the "frob_loot" sound found in the Noble Affairs mission. I find this sound fits extremely well the new animation.

---------------------------------------------------------------------

DOWNLOADS AND INSTALLATION

Download, unzip and move contents to your TDM folder. I recommend using a Mod Activator.

---------------------------------------------------------------------

I hope someone shares a video showcasing these new additions. I am not into video editing, sorry.

Thanks everyone mentioned in this post for their ideas, content and support. Much appreciated.

Cheers!

---------------------------------------------------------------------

Changelog:

  • v3: Fast Doors: Removed the dependency with "tdm_mover_doors.def" to prevent breaking some missions.
  • v2: Loot animations limited to loot that has some monetary value. Loot animations removed from paintings to avoid some errors.
  • v1: Initial release

 

FrobActions_Script_v3.zip

Edited by snatcher
  • Like 1

TDM Modpack 4.0

Link to comment
Share on other sites

2 hours ago, snatcher said:

Treatment by snatcher.

What is this treatment you did?

 

2 hours ago, snatcher said:

Download, unzip and move contents to your TDM folder. I recommend using a Mod Activator.

What is a mod activator?

Edited by datiswous
Link to comment
Share on other sites

For "Fast Doors" check this whole topic: Slam doors open while running

For "Loot Animations" check the comments in the main post.

52 minutes ago, datiswous said:

What is a mod activator?

The better term is Mod Manager or Mod Enabler, sorry. A Mod Manager allows you to enable/disable mods easily on demand. There is the good old JSGME (search for it online) for casual and lightweight modifications and more modern and advanced Mod Managers for more serious modding.

TDM Modpack 4.0

Link to comment
Share on other sites

If you and Obsttorte agree to it, I would like to include both features into my Unofficial Patch. I will not use the sound though, because it doesn't fit when looting e.g. a painting or a golden cup! Also I noticed that while the frob animation is played not only for loot, but also for keys and arrows, it isn't played for tools and readables. Can you please fix this?

Edited by wesp5
Link to comment
Share on other sites

You (and everyone else) can do with what I share in these boards whatever you like. Past, present and future. No need to ask me nor credit me. Permission to have fun granted for life 😉

Unfortunately I am not yet able to create my own content and keep toying with other's creations so, for your own peace of mind, ask the others if you want.

23 minutes ago, wesp5 said:

I will not use the sound though, because it doesn't fit when looting e.g. a painting or a golden cup!

Paintings... from the little I know, paintings are simply loot and not their own entity. I checked because I noticed paintings revert to a default canvas when you frob them. It is barely noticeable now, but you can notice it if you pay attention. I wanted paintings to do without the animation and maintain the stock sound but I didn't find a way.

22 minutes ago, wesp5 said:

Also I noticed that while the frob animation is played not only for loot, but also for keys and arrows, it isn't played for tools and readables. Can you please fix this?

I wouldn't call it a bug that requires a fix but you are right: it doesn't work with all items. And I don't know if the animation can be (and should be) extended to more items or not. We shall see.

TDM Modpack 4.0

Link to comment
Share on other sites

8 hours ago, snatcher said:

Please note the download also includes the "frob_loot" sound found in the Noble Affairs mission. I find this sound fits extremely well the new animation.

I hope you asked Goldwell for permission. Don't go and pick up stuff from other fms without asking the authors.

3 hours ago, wesp5 said:

Also I noticed that while the frob animation is played not only for loot, but also for keys and arrows, it isn't played for tools and readables.

That's odd. It could be that it is either and old version, a modification made by Goldwell or my mind is playing tricks on me and it was always like that (although I don't see why). Paintings are a different story. The canvas is no seperate entity. So when frobbing a loot painting its skin gets changed. This doesn't work well with the modified frob.

3 hours ago, wesp5 said:

If you and Obsttorte agree to it, I would like to include both features into my Unofficial Patch.

All my work is free for adaption. If I wouldn't want that I wouldn't freely distribute it. But you could consider stop calling it your unofficial patch. ;)

  • Like 1

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:

But you could consider stop calling it your unofficial patch. ;)

How should I call it then? "Collection of features that haven't made it into the core game and probably never will" ;)?

About the tools and readables, can you please take a look? I tested it in "The adventures of Thomas 1: Lucy's Quest".

Edited by wesp5
Link to comment
Share on other sites

45 minutes ago, Obsttorte said:

I hope you asked Goldwell for permission. Don't go and pick up stuff from other fms without asking the authors.

Credit where credit is due but no, I didn't personally ask Goldwell for permission to redistribute the the "frob_loot" sound and I didn't personally ask Goldwell for permission to edit and reuse parts of the source code from the Noble Affairs mission.

TDM Modpack 4.0

Link to comment
Share on other sites

8 hours ago, wesp5 said:
  1. How should I call it then? "Collection of features that haven't made it into the core game and probably never will" ;)?
  2. About the tools and readables, can you please take a look? I tested it in "The adventures of Thomas 1: Lucy's Quest".
  1. I don't care how you call it. But on one hand the personal pronoun is a bit off and on the other hand the term patch implies that it fixes something that is broken, which is not the case.
  2. Now that I reread it, it is a modified version of frob_loot, which obviously only get used by loot items. All other stuff uses frob_item. You would have to create a script function that works for both and alter the def files respectively.

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. I call it a patch because it fixes stuff that in my opinion is broken. Or at least inconsistent like the non exstinguishable oillamps, the illogical ko-immunity and headshot damages which were discussed once again just recently. But because this is all very subjective, I call it "my" patch, because otherwise people could assume it was a general accepted project, which I think it isn't ;). Think of it like the plus version of my Bloodlines patch, because it also restores and adds new stuff!

2. The script never refers to loot, at least I didn't find it, and it works fine for keys and arrows, Maybe some variable can be set for tools and readables so it works for them too? What is the internal difference between loot, keys and arrows and tools, readables and maybe others? Is this only working on items that can be stacked? Why is it working on keys? Or would we need another version starting from frob_item for the rest? Obsttorte or Snatcher, can you take a look at this?

Edited by wesp5
Link to comment
Share on other sites

@wesp5Just looked at the code and the frob_action_script that got changed is frob_item. So entities using frob_item will behave like in Dishonored upon frob, while others don't. You have to check the definition files of the other entities and exchange the frob_action_script in the base classes.

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

If we cannot find a simple and elegant way of encompassing all items, I would restrict limit it so that we only get the animation for items that have some monetary value. Something like:

...
	float monetaryValue = inv_item.getFloatKey("inv_loot_value");
	if (monetaryValue > 0)
	{
//		animate
	}
...

It won't be perfect, but it will be consistent.

TDM Modpack 4.0

Link to comment
Share on other sites

I would like to give this a try (if only as a working demo) but I need a little push in the right direction:

TDM_frob.gif

What would be a practical way of intercepting the moment and item gets highlighted?

$player1.getFrobbed().getKey("classname") should point to the current item highlighted, and I noticed setShaderParm() could be of use but at this stage getting something like this to work would be a good start:

while ($player1.getFrobbed())
{
	$player1.getFrobbed().setFrobable(1);
	sys.wait(1);
	$player1.getFrobbed().setFrobable(0);
	sys.wait(1);
}

Any help is appreciated.

TDM Modpack 4.0

Link to comment
Share on other sites

10 hours ago, Obsttorte said:

You have to check the definition files of the other entities and exchange the frob_action_script in the base classes.

Thanks for the tip, I have added the animation to tools and readables now, who had frob_action_script missing :)!

Edited by wesp5
Link to comment
Share on other sites

6 hours ago, snatcher said:

I would like to give this a try (if only as a working demo) but I need a little push in the right direction:

TDM_frob.gif

What would be a practical way of intercepting the moment and item gets highlighted?

$player1.getFrobbed().getKey("classname") should point to the current item highlighted, and I noticed setShaderParm() could be of use but at this stage getting something like this to work would be a good start:

while ($player1.getFrobbed())
{
	$player1.getFrobbed().setFrobable(1);
	sys.wait(1);
	$player1.getFrobbed().setFrobable(0);
	sys.wait(1);
}

Any help is appreciated.

Sorry, I have not idea, but hopefully Obsttorte has ;). Speaking of which, I remember the script that would make the base of a container unfrobable once the lid has opened. Obsttorte, didn't you make a prototype of that or was this Dragofer?

Edited by wesp5
Link to comment
Share on other sites

18 hours ago, snatcher said:

I would like to give this a try (if only as a working demo) but I need a little push in the right direction:

TDM_frob.gif

What would be a practical way of intercepting the moment and item gets highlighted?

$player1.getFrobbed().getKey("classname") should point to the current item highlighted, and I noticed setShaderParm() could be of use but at this stage getting something like this to work would be a good start:

while ($player1.getFrobbed())
{
	$player1.getFrobbed().setFrobable(1);
	sys.wait(1);
	$player1.getFrobbed().setFrobable(0);
	sys.wait(1);
}

Any help is appreciated.

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.

12 hours ago, wesp5 said:

Sorry, I have not idea, but hopefully Obsttorte has ;). Speaking of which, I remember the script that would make the base of a container unfrobable once the lid has opened. Obsttorte, didn't you make a prototype of that or was this Dragofer?

That was me. It relies on changes I've made to the source code though, iirc, so it won't work before 2.11.

 

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

13 hours ago, wesp5 said:

Thanks for the tip, I have added the animation to tools and readables now, who had frob_action_script missing :)!

Well done, @wesp5. Looking forward to the results. I, in the meantime, limited the animation to loot with monetary value in my WIP.

 

58 minutes ago, 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.

Thanks for the response, @Obsttorte

As a start, I would like the current item highlighted by the player (within frob distance) to blink: highlighted, not highlighted, highlighted, not highlighted... Nothing fancy, just a working example.

What would be a practical way of intercepting the moment an item gets highlighted by the player? tdm_frobactions.script doesn't seem like the appropriate place.

By thew way, is there any way we can get all non-custom tdm_XXX.script there can be?

TDM Modpack 4.0

Link to comment
Share on other sites

That's not planned afaik. I just added the script functions required.

10 hours ago, snatcher said:

As a start, I would like the current item highlighted by the player (within frob distance) to blink: highlighted, not highlighted, highlighted, not highlighted... Nothing fancy, just a working example.

You could change the frobhilight shader.

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

37 minutes ago, wesp5 said:

But this would mean I could include it in the UP once 2.11 is out if you would send me the needed scripts, yes?

I haven't setup anything useable. I tested the implemented script function to make sure they work, and used a chest as testing ground.

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

12 hours ago, Obsttorte said:

You could change the frobhilight shader.

Thanks but I fail to understand which set of files I should be tinkering with.

In any case I am more interested in knowing how the global tdm_frobactions.script came to be in the first place.

Can global scripts be dumped from the game, extracted from some source or downloaded from somewhere?

TDM Modpack 4.0

Link to comment
Share on other sites

2 hours ago, snatcher said:

In any case I am more interested in knowing how the global tdm_frobactions.script came to be in the first place.

Speaking of which, I noticed that the new frob animation loots whole paintings instead of cutting them out. Fixed!

Edited by wesp5
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 )
      · 1 reply
    • 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
       
      · 3 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...