Jump to content
The Dark Mod Forums

Project: Extinguish small lights with a blow


snatcher

Recommended Posts

I have the patch, I appreciate the effort but I don't use it. My sandbox needs to remain as faithful as possible to the base code. Regardless, I am slowly inspecting every bit of your patch. Thanks, once again, for your work.

20 minutes ago, wesp5 said:

if you highlight the candle and not the holder you can extinguish it with one frob

I noticed this behavior in some missions. Back then I didn't understand what was going on but now I do. Glad to hear your patch makes this consistent - for better or worse - among all missions.

TDM Modpack 4.0

Link to comment
Share on other sites

2 hours ago, snatcher said:

See it in action (note the download).

Blow_Ignite_v0.3.zip 48.42 kB · 0 downloads

That doesn't really answer my question! ;)  I especially don't understand why you want to add additional clutter to the player inventory just to be able to put out some candles, which can be simple done by frobbing them?! As stated above, if you don't like picking up the candles first, change the base class definitions. You invest tons of work for a neglectable effect, honestly.

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

You are right, I didn't answer your questions. Sorry but I didn't detect any added value in that direction.

On question:

4 hours ago, Obsttorte said:

I don't understand why you are going for an inventory item to blow out candles.

and question:

55 minutes ago, Obsttorte said:

I especially don't understand why you want to add additional clutter to the player inventory just to be able to put out some candles [...]

If we refer to the original "vision" in the OP, the blow would activate when nothing is selected in the inventory, whether this can be done or not remains to be seen. We currently have additional clutter in the inventory, as an interim solution, while the idea unfolds.

55 minutes ago, Obsttorte said:

[...] As stated above, if you don't like picking up the candles first, change the base class definitions. You invest tons of work for a neglectable effect, honestly.

Call me crazy but the less base files we touch the more versatile a solution is and the less maintenance it requires. Besides, there's nothing wrong with experimenting.

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

The next milestone of this little project is to detect upon a key press if the player is looking at a particular entity. As is now, we have the ability to extinguish lights by using the hole in the face and the other hole in our back.

Any help pointing to the right direction is appreciated.

TDM Modpack 4.0

Link to comment
Share on other sites

4 hours ago, snatcher said:

Call me crazy but the less base files we touch the more versatile a solution is and the less maintenance it requires.

Base defs rarely ever change, so altering them is a pretty safe approach. But I see where you are coming from.

4 hours ago, snatcher said:

If we refer to the original "vision" in the OP, the blow would activate when nothing is selected in the inventory

 

4 hours ago, snatcher said:

Any help pointing to the right direction is appreciated.

Then I'd suggest that pushing the frob button with nothing frobhilighted might be an approach. There is already a script function to test on whether the player is pushing the frob button iirc. This could be accompanied by a check on whether the player picked up an extinguishable light source by doing so and then dropping the candle.

Obviously the cleanest solution would be to have a dedicated key for blowing (that sounds odd 😕 )

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

Google will soon index your last sentence and it will bring a good number of fanatics of the stealth genre.

1 hour ago, Obsttorte said:

Then I'd suggest that pushing the frob button with nothing frobhilighted might be an approach. There is already a script function to test on whether the player is pushing the frob button iirc. This could be accompanied by a check on whether the player picked up an extinguishable light source by doing so and then dropping the candle.

What if I actually want to pick the candle up? I think wesp5 has us already covered in this area. We can take his implementation for a spin but then we aren't putting anything new on the table.

TDM Modpack 4.0

Link to comment
Share on other sites

7 hours ago, snatcher said:

What if I actually want to pick the candle up?

For what purpose?

7 hours ago, snatcher said:

then we aren't putting anything new on the table

Then I may ask whether something new is needed. As far as I get it, having to pick up a candle, then use it and put it down again is annoying to say the least. But as stated, there are actual missions that handle this differently. It's just that mission authors don't really care a lot or they or the players find it better that way (because they like they can pick the candles up?).

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

9 hours ago, snatcher said:

What if I actually want to pick the candle up? I think wesp5 has us already covered in this area. We can take his implementation for a spin but then we aren't putting anything new on the table.

Speaking about this, it has always annoyed me that in my imprementation even if you directly frob-extinguish a candle, it will be taken afterwards. Looking at the script below, this is the default action for unlit candles, but Obsttorte, could we delay this a bit so it does not happen if we just have extinguished it?

void frob_candle( entity candle )
{
    string skin     = candle.getKey( "skin" );
    string skin_lit = candle.getKey( "skin_lit" );

    //sys.println("DEBUG: candle was frobbed\n");
    if (skin == skin_lit)
    {
        // turn off
        // sys.println("DEBUG: turning light off on " + candle.getKey("name") + "\n");
        lholder_toggle_bound_flames( candle, 0 );
    }
    // else let the player grab the candle
    else
    {
        // if this entity is bound to something, grab the bind master
        entity bind_master = candle.getBindMaster();
        if (bind_master) { candle = bind_master; }
        $player1.holdEntity( candle );
    }
}

Edited by wesp5
Link to comment
Share on other sites

2 hours ago, Obsttorte said:

For what purpose?

Any purpose. Lit: to explore a dark corner. Unlit: to make noise and lure AI to a point.

That's not the point, though. We can grab candles and I don't see why this should change. This project started as a workaround to extinguish oil lamps. It then extended to any small light.

My idea doesn't follow any standard such as frobbing precisely to avoid tweaks and adjustments to existing objects and functions. The more we tweak, the more side-issues arise.

TDM Modpack 4.0

Link to comment
Share on other sites

3 hours ago, snatcher said:

My idea doesn't follow any standard such as frobbing precisely to avoid tweaks and adjustments to existing objects and functions. The more we tweak, the more side-issues arise.

But the more keys I need to define (blow key) or moves to make (clear inventory) the more side-issues arise for me while playing. TDM already has more keys than the common shooters that I play :). On the other hand I can confirm that you can indeed not frob anything for example if you carry a body, so being able to snuff out small lights might make sense. Still if your idea does not work out, wouldn't it not be a possible to just selectively frob/blow out small lights in that situation?

Edited by wesp5
Link to comment
Share on other sites

20 minutes ago, wesp5 said:

But the more keys I need to define (blow key) or moves to make (clear inventory) the more side-issues arise for me while playing. TDM already has more keys than the common shooters that I play :)

Agreed. But these are the tools we have to work with.

The idea works pretty well already in Version 0.3. Give it a try. Does it feel good? I think it does.

We aren't using standards and we are cheating big time here. The demo isn't perfect and it will never be unless it gets properly integrated into the core source via dedicated key (to have the blow available even when carrying / holding objects).

It's, once again, a proof of concept:

  • We can detect if the player is looking in the direction of a particular light. We just haven't figure out how yet.
  • Whether the blow can be made available when the inventory is clear or not is something that remains to be seen.
  • Whether a dedicated key can be made available via script or not is something yet to be explored.
  • We may even come up with new approaches and ideas while this develops. Who knows.

There are some issues that probably don't have (easy) solutions, but that's secondary:

  • As of now, we can extinguish lights from the other side of a wall (no visual collision modeled)
  • As of now, we can extinguish more than one light in a row, if different objects are very close to each other.
  • We cannot use the blow when carrying / holding objects.

I don't intend this to be perfect though, just "good enough" to prove the concept.

TDM Modpack 4.0

Link to comment
Share on other sites

On a side note, you and I detected some oil lamps that cannot be extinguished by normal means. From what I can tell, it is because some mappers make use of extinguished oil lamps and then place a standalone flame on top, to control the lighting or something. We have to "attack" those flames in these cases, but I haven't gotten into it yet.

TDM Modpack 4.0

Link to comment
Share on other sites

1 hour ago, snatcher said:

We cannot use the blow when carrying / holding objects.

If this is valid for carried bodies the one reason why I would want to have something like this is gone :(! Also how about blowing torches and fireplaces out, has that been fixed? As for the oil lamps that can't be extinuished, I looked at the ones in "The Bakery Shop". The lamps itself are func_statics which means we can't do anything about them. The flames can be put out by water, but if we want to do that by frob, how would we even know a flame is highlighted being bright itself? It's easier to replace the whole lamp with a normal one that can be extinguished and I already did this for this mission. So if you point me to missions with the same problem I can fix them in the same way!

Edited by wesp5
Link to comment
Share on other sites

29 minutes ago, wesp5 said:

If this is valid for carried bodies the one reason why I would want to have something like this is gone :(!

Extinguishing small flames while carrying bodies is a legit claim. I think your current implementation has better chances of success.

29 minutes ago, wesp5 said:

Also how about blowing torches and fireplaces out, has that been fixed?

Yes, in version 0.3. It was the number one show stopper.

29 minutes ago, wesp5 said:

As for the oil lamps that can't be extinuished, I looked at the ones in "The Bakery Shop". The lamps itself are func_statics which means we can't do anything about them.

I would first like to understand why mappers proceed that way.

29 minutes ago, wesp5 said:

The flames can be put out by water [...]

Then there's hope! The question is, is it really worth the effort?

29 minutes ago, wesp5 said:

It's easier to replace the whole lamp with a normal one that can be extinguished and I already did this for this mission. So if you point me to missions with the same problem I can fix them in the same way!

Again, I would like to first understand why mappers use (or used) this technique. The theories I have are:

  • No other objects available at that time
  • To control lighting for some reason

Regarding the second, when you exchange a lamp, does the scene retain the same ambience light?

TDM Modpack 4.0

Link to comment
Share on other sites

1 hour ago, snatcher said:

Regarding the second, when you exchange a lamp, does the scene retain the same ambience light?

It did in "The Bakery Shop", at least I didn't notice a difference, but I know the birghtness is the reason why there is one non-extinguishable oil lamp in "In plain sight" because the default oil lamp is too bright at a certain location.

Edited by wesp5
Link to comment
Share on other sites

8 hours ago, wesp5 said:

Speaking about this, it has always annoyed me that in my imprementation even if you directly frob-extinguish a candle, it will be taken afterwards. Looking at the script below, this is the default action for unlit candles, but Obsttorte, could we delay this a bit so it does not happen if we just have extinguished it?

void frob_candle( entity candle )
{
    string skin     = candle.getKey( "skin" );
    string skin_lit = candle.getKey( "skin_lit" );

    //sys.println("DEBUG: candle was frobbed\n");
    if (skin == skin_lit)
    {
        // turn off
        // sys.println("DEBUG: turning light off on " + candle.getKey("name") + "\n");
        lholder_toggle_bound_flames( candle, 0 );
    }
    // else let the player grab the candle
    else
    {
        // if this entity is bound to something, grab the bind master
        entity bind_master = candle.getBindMaster();
        if (bind_master) { candle = bind_master; }
        $player1.holdEntity( candle );
    }
}

It may interfere with something else. But I am not a houndred percent sure what you are aiming for.

8 hours ago, snatcher said:

Any purpose.

  1. Lit: to explore a dark corner.
  2. Unlit: to make noise and lure AI to a point.
  1. player lantern
  2. noisemaker arrows

If you want to have both the possibility to take out extinguishable light sources directly AND beeing able to pick them up in both lit and unlit state I would suggest that you make the flame frobable. If the player frobs the candle, it will be picked up. If the player frobs the flame, it gets extinguished.

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

I would suggest that you make the flame frobable. If the player frobs the candle, it will be picked up. If the player frobs the flame, it gets extinguished.

We already discussed this here, would this be possible? How do we highlight a bright flame? Because this could also fix all the oil lamps that are not extinguishable by the patch right now, although it probably would mean to rewrite everything!

Edited by wesp5
Link to comment
Share on other sites

14 minutes ago, wesp5 said:

We already discussed this here, would this be possible? How do we highlight a bright flame? Because this could also fix all the oil lamps that are not extinguishable by the patch right now, although it probably would mean to rewrite everything!

Highlighting is solved by enabling the black frob outline. I play with it since months and it works fine even in darker areas.

Link to comment
Share on other sites

2 hours ago, Obsttorte said:
  1. player lantern
  2. noisemaker arrows

Assuming you have these items in the first place!

22 minutes ago, wesp5 said:

We already discussed this here, would this be possible? How do we highlight a bright flame? Because this could also fix all the oil lamps that are not extinguishable by the patch right now, although it probably would mean to rewrite everything!

Stand by. I am making progress. You will have your chance to decide.

TDM Modpack 4.0

Link to comment
Share on other sites

31 minutes ago, Oktokolo said:

Highlighting is solved by enabling the black frob outline. I play with it since months and it works fine even in darker areas.

I thought of that myself and the patch even has it in its options, but still a lot of people disliked the outlines at the time, and they would be completely lost without it if we change the frob-light-behaviour from the light sources to the flames themselves! I also imagine it will mess the whole lamp system up, as e. g. you need to re-light a lamp and not a flame.

Edited by wesp5
Link to comment
Share on other sites

3 hours ago, Obsttorte said:

If the player frobs the flame, it gets extinguished.

I don't think particles can be frobable since frobbing seems to rely on clip contents. Also, I donxt think the flame materials have frob highlight stages yet.

Well, maybe you can at least use SetContents after map start to make the particle solid to frobbing throughout its entire bounds (warning: rabbit hole).

Probably more realistic to frob the candle vs. the holder.

Link to comment
Share on other sites

3 minutes ago, Dragofer said:

Probably more realistic to frob the candle vs. the holder.

There is the issue that we have frobable candles without holders, too.

And yes, the flames as are are probably not frobable. But you can have an invisible frobable object on top of the candle that alters the look of the flame.

1 hour ago, snatcher said:

Assuming you have these items in the first place!

I valid assumption considering that in most fms it is the other way round - you have items you don't need. I for one can at least not remember any fm where I thought: "oh, if I would only have item xy".

I mean, to each its own. I just wonder whether the amount of work you put in stands in a proper relation to the benefit it may hold.

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

28 minutes ago, Obsttorte said:

I mean, to each its own. I just wonder whether the amount of work you put in stands in a proper relation to the benefit it may hold.

I am investing more time requesting help and following the discussion than in anything else. The current code is as simple as it gets. I count on you for the next steps. I need you. We need you.

TDM Modpack 4.0

Link to comment
Share on other sites

I just tested around a bit and it is indeed not possible to frob the particles directly as stated by @Dragofer.

An approach that works quit nicely is a setup in which the player can decide whether he wants to pickup or extinguish the light upon frobbing by moving his mouse up or down during the frob. Upwards let the player pick up the candle, downwards extinguishes it (could be changed to toggle). If the player doesn't move his mouse, then nothing happens.

 

It would again incorporate to alter the defs of the respective light base classes so they are non-frobable and the equip_action_script is used as frob_action_script, too, as well as a minor modification of the respective script called there, but would preserve the already existing mechanic of extinguishing light sources that are currently in the grabber by using them.

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

I don't think we need all this complicated stuff, like extra keys or extra movement with the mouse while frobing. I have the feeling that most of the candles are in some kind of holder so the chance that the only light source around is a candle without one and you don't have a lantern is slim! 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?

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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...