Jump to content
The Dark Mod Forums

Project: Extinguish small lights with a blow


snatcher

Recommended Posts

So I just tested version 0.4 of the blow mod and I really like it! This would indeed be an easy way to make any small flame extinguishable without too much effort. The main problem is indeed blowing out flames through walls or through lamps themselves if they e.g. hang down and you blow from below. Also you can blow quite a large margin to the side of a flame and it still goes out! The sounds are fine, but the icon does not fit with the graphical style of TDM and of course if I would use that for the patch, I would remove ignite, as this is what the flint is for and it might be important in some missions to not have it from the start.

Link to comment
Share on other sites

1 hour ago, wesp5 said:

But I would really like to fix the issue that candles you just extinguished by frobing get taken automatically, because the main idea behind the direct frobing was to remove possible sounds when picking them up. Obsttorte, can you please help me out here?

That's because they are still grabable. The pickup is done by the engine code. You have to make the light holders non-grabable.

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

55 minutes ago, wesp5 said:

The main problem is indeed blowing out flames through walls or through lamps themselves if they e.g. hang down and you blow from below. Also you can blow quite a large margin to the side of a flame and it still goes out!

Yep. Few more battles ahead before victory is ours.

TDM Modpack 4.0

Link to comment
Share on other sites

1 hour ago, Obsttorte said:

You have to make the light holders non-grabable.

This would be a huge change basically removing all moveable light sources. Or is there a command like e. g. setGrabable(0) (this one isn't recognized) to do this only after you extinguished them, when they became pretty much useless anyway?

Edited by wesp5
Link to comment
Share on other sites

49 minutes ago, snatcher said:

Yep. Few more battles ahead before victory is ours.

I would guess the easiest solution to that would be to lower the distance below even the thinnest wall in the game. As for the icon, a small picture of the player's mouth in the same style as the main game would be cool, because the player's arm is already shown on the inventory screen! And maybe get rid of or hide the "aquired blow" message if that is possible...

Edited by wesp5
Link to comment
Share on other sites

Okay, so I lowered the distance to 30 which needs you to get very close and even blowing through a dressing screen isn't possible anymore in "The Bakery Job". I also merged the two playertools scripts into one and removed ignite because we already have flint. Now all that is left is a suitable icon, then I would like to add this to the patch with your permission as a contingency plan for all flames that can not be extinguished by normal means!

Edited by wesp5
Link to comment
Share on other sites

8 minutes ago, wesp5 said:

I would guess the easiest solution to that would be to lower the distance below even the thinnest wall in the game.

The current distance between the flame and the player's eyes is the minimum distance (plus a buffer) required to extinguish a standing chandelier without the need of a jump.

We'll have to determine if something else is between the player and the flame but we aren't at that stage yet.

1 hour ago, wesp5 said:

[...] you can blow quite a large margin to the side of a flame and it still goes out!

We must determine if the player is looking in the direction of the object. We need help from Obsttorte, Dragofer or any other guru.

8 minutes ago, wesp5 said:

As for the icon, a small picture of the player's mouth in the same style as the main game would be cool, because the player's arm is already shown on the inventory screen!

You need to review my posts in this topic 😉

In any case, the idea is to do without any icon.

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

And before you come and say: the blow doesn't work in this mission! - know that I am well aware of. Some mappers employ their own custom flames.

TDM Modpack 4.0

Link to comment
Share on other sites

4 minutes ago, wesp5 said:

Okay, so I lowered the distance to 30 which needs you to get very close and even blowing through a dressing screen isn't possible anymore in "The Bakery Job". I also merged the two playertools scripts into one and removed ignite because we already have flint. Now all that is left is a suitable icon, then I would like to add this to the patch with your permission as a contingency plan for all flames that can not be extinguished by normal means!

Geez man, relax and enjoy the ride 🙂

We aren't there yet.

TDM Modpack 4.0

Link to comment
Share on other sites

8 minutes ago, snatcher said:

Geez man, relax and enjoy the ride 🙂

We aren't there yet.

But I like playing around myself a bit :)! Do you have an example mission with that chandelier you were talking about? Already I often have to jump to extinguish hanging oil lamps for example. As for the blowing working from the side, this doesn't really matter, especially if the distance is low. About the icon, I disagree! With a new feature like that it must be visible to the player and clearing the inventory would mean using another key. Also I merged the def into playertools!

Edited by wesp5
Link to comment
Share on other sites

5 minutes ago, wesp5 said:

But I like playing around myself a bit :)

And I encourage you to do so. The more feedback, the better.

5 minutes ago, wesp5 said:

Do you have an example mission with that chandelier you were talking about?

Briarwood Cathedral.

5 minutes ago, wesp5 said:

About the icon, I disagree! With a new feature like that it must be visible to the player and clearing the inventory would mean using another key. Also I merged the def into playertools!

You can do what you please, Sir. Just make sure to have fun.

TDM Modpack 4.0

Link to comment
Share on other sites

52 minutes ago, wesp5 said:

This would be a huge change basically removing all moveable light sources. Or is there a command like e. g. setGrabable(0) (this one isn't recognized) to do this only after you extinguished them, when they became pretty much useless anyway?

Alter the base entity definition!!! And no, the light sources are still moveable, even grabable. But the latter would be handled by your script instead of the engine, which is, as I understood it, what you are aiming for.

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

16 minutes ago, Obsttorte said:

Alter the base entity definition!!!

Thanks, that did it! I still don't understand half of what I am doing, but the end result is fine ;). Also I found a great (probably unused) icon for blow called fog_swirl.dds...

Link to comment
Share on other sites

Most walls in TDM are 8-16 units, so reducing distance won't be adequate. You can let the script do a trace to detect whether there is something solid inbetween you and the candle. My camgoyle turret's scriptobject, as found in my scripting thread (see signature), makes use of traces.

  • Like 1
Link to comment
Share on other sites

16 minutes ago, snatcher said:

Which base objects do the below flames get attached to?

  • light_candleflame_moving
  • light_oilflame_moving

I don't know what these are for 😐

You'll find them in "def_attach" spawnargs of candle holder entities. I doubt any holders use the moving versions, though.

Can unpack all your TDM .pk4's and use Notepad++ to search in .def files for such spawnargs.

Link to comment
Share on other sites

I found a way to silently adding Blow to the inventory, copying from Dragofer's statistic scroll:

1. Remove everything except entity blow = sys.spawn("atdm:playertools_blow"); from void playertools_blow_init

2. Add "inv_map_start" "1" to entityDef atdm:playertools_blow

Speaking of details though, to not get any silly connotations, shouldn't we rename it to Snuff?

Edited by wesp5
Link to comment
Share on other sites

14 minutes ago, Dragofer said:

You'll find them in "def_attach" spawnargs of candle holder entities. I doubt any holders use the moving versions, though.

Can unpack all your TDM .pk4's and use Notepad++ to search in .def files for such spawnargs.

Thanks, Dragofer. I will have them included the same, just in case.

11 minutes ago, wesp5 said:

I found a way to silently adding Blow to the inventory, copying from Dragofer's statistic scroll:

1. Remove everything except entity blow = sys.spawn("atdm:playertools_blow"); from void playertools_blow_init

2. Add "inv_map_start" "1" to entityDef atdm:playertools_blow

Very nice!

11 minutes ago, wesp5 said:

Speaking of details though, to not get any silly connotations, shouldn't we rename it to Snuff?

English isn't my native language so I cannot tell what works best. Let me say though, the more recognizable a name is for an international audience, the better.

TDM Modpack 4.0

Link to comment
Share on other sites

The moveables get indeed used rarely afaik as they are very performance hungry. A compareable effect can be achieved via the light shader at a way lower cost.

  • 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

@Dragofer the trace works, thank you very much 🙂

vector player_pos = $player1.getEyePos();
vector flame_pos = small_flame.getWorldOrigin();
if(sys.trace(player_pos, flame_pos, '-0 -0 -0', '0 0 0', CONTENTS_SOLID, self) == 1)
{
// go!
}

A question for everybody: what are '-0 -0 -0' and '0 0 0' for? A tolerance? Not sure I should use them.

TDM Modpack 4.0

Link to comment
Share on other sites

1 hour ago, snatcher said:

@Dragofer the trace works, thank you very much 🙂

vector player_pos = $player1.getEyePos();
vector flame_pos = small_flame.getWorldOrigin();
if(sys.trace(player_pos, flame_pos, '-0 -0 -0', '0 0 0', CONTENTS_SOLID, self) == 1)
{
// go!
}

A question for everybody: what are '-0 -0 -0' and '0 0 0' for? A tolerance? Not sure I should use them.

It's the positions of the top left and bottom right corner of the box that the trace moves from the player's eyes to the flame. If the box hits anything else on the way the trace returns less than 1.

If you don't want to use a box you may as well use tracePoint instead and delete those two vectors.

Link to comment
Share on other sites

You can find in this post version 0.5.

  • Added detection of light_candleflame_moving & light_oilflame_moving
  • Both Blow & Ignite abilities get silently loaded on mission start - thanks @wesp5 !
  • Is player looking in the direction of the flame? Check! (from the Flash-bomb script)
  • Is there anything in-between the player and the flame?  Check! - thanks @Dragofer !

I appreciate if the code gets reviewed for potential errors or improvements.

I have been looking to see if I could detect if a flame is on or off. getKey("extinguished") apparently doesn't get updated "live". Any ideas on this matter?

Blow_Ignite_v0.5.zip

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

    • 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...