Jump to content


Photo

yet another dumb, probably worn out idea: breakable lights.


  • Please log in to reply
7 replies to this topic

#1 Thrashaero

Thrashaero

    Newbie

  • Member
  • Pip
  • 8 posts

Posted 08 March 2019 - 11:21 PM

Of course I'm not talking about the flames, but the electric/gas lights or whatever they are that always remain lit. It can have balance like attract a guard from the break sound or require a special tool. I just find the fact that they're impermeable yet the fire lighting is so easy to take out a bit of an odd thing.


Edited by Thrashaero, 08 March 2019 - 11:27 PM.


#2 Goldwell

Goldwell

    Team Member

  • Active Developer
  • PipPipPipPip
  • 2500 posts

Posted 09 March 2019 - 03:11 AM

The engine does support that. You can set health on each entity and then what model it has when it breaks. So you could have an indoor electric light that when struck with an arrow makes a glass breaking noise and then switches to a broken glass model.

The stopping factor here is that most authors dont turn this on or use this feature much.

The Accountant
Part 1: Thieves and Heirs | Part 2: New In town

 

Shadows of Northdale Campaign

ACT I | ACT II
 
Stand Alone Missions
Lord Edgar's Bathhouse | Spring Cleaning


#3 wesp5

wesp5

    Advanced Member

  • Member
  • PipPipPip
  • 690 posts

Posted 09 March 2019 - 03:16 AM

The stopping factor here is that most authors dont turn this on or use this feature much.

So would there be an easy way to override this for all electrical lights? If so I might consider to include this in my Unofficial Patch, which already has extinguishable oil lamps...



#4 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5500 posts

Posted 09 March 2019 - 04:06 AM

If you use the same name of an object in a pk4, then the pk4 version will override the mod version in FMs. Well there are hierarchy rules it follows; you have to do it the right way, but I think it's possible. So that's how you could override the normal electric lights with breakable versions.

 

Note it would probably break the game logic of some or even a lot of maps. There's a reason mappers use electric lights, e.g.,  they want to reward the player for making it to the switch to turn them off or they want some forced stealth so it's not too easy, etc. But gameplay patches are usually for after you finish an FM the normal way and want some variety anyway.


Posted Image

#5 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1003 posts

Posted 09 March 2019 - 11:51 AM

The engine does support that. You can set health on each entity and then what model it has when it breaks. So you could have an indoor electric light that when struck with an arrow makes a glass breaking noise and then switches to a broken glass model.

The stopping factor here is that most authors dont turn this on or use this feature much.

According to my notes on shaderparms, there should be support for recognising a 'broken' state within light shaders as well (via a parm7 condition), though I haven't tested it. So instead of making breakage equivalent to switching off you could make the light flicker or dim or something.
 
Trouble is, for anyone not planning a comprehensive overhaul of the light entities, I'm not sure how breakable lights would be identifiable to players.
 
Also, if you want shattering glass (other than by trying a particle effect), that's a more complex set-up involving a separate func_fracture entity. Existing models aren't set up for that.
 
Edit: speaking of func_fractures reminds me, do AI visually notice broken items yet? Mentioned in http://forums.thedar...e-3#entry375028 but not explicit in http://bugs.thedarkm...iew.php?id=4177 -- and that's just regarding fractures, not other kinds of breakable entity.
 
Edit2: according to http://forums.thedar...e-3#entry374528 support for AI reactions exists, but I'm not sure what classes, if any yet, create the marker. Probably none, since the only markers I can find defined are for missing items and blood stains.


Edited by VanishedOne, 09 March 2019 - 12:30 PM.

Some things I'm repeatedly thinking about...

- louder scream when you're dying


#6 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5500 posts

Posted 09 March 2019 - 10:52 PM

Ironically a "lights going out" marker wouldn't work because the AI couldn't see it, because it's in the dark (IIRC). But I think the torch & light "should be on" flag works by ... well I don't remember exactly. Better to go straight to the source code than try to speculate.

 

Edit: I don't think they cue an alert change anyway. For a torch, they cue the AI to mumble and relight it.

 

Edit2: I should have looked at the link you posted first. I was talking about the "light should be on" flag, which might work for this too if there's an electric light version. That link is for a "it's broken" flag, which as the link describes it is in the stim/response system. In that system, a broken item is going to give off "vis" stims, and if an AI "receives" the stim (by seeing it), then its alert rises. That is, it's not a marker-creating class at all; it's in the stim/response system, which objects carry in their properties (IIRC).

 

You'd want to do testing to see if / how it works in practice if you really want to use it.


Posted Image

#7 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1003 posts

Posted 10 March 2019 - 12:32 PM

Ah, I see: I was looking at http://forums.thedar...e-3#entry374528 and of course it talks about marker entities in the context of func_fractures, where the glass may end up just gone. But yes, if you have a broken model then it can carry the visual stim.

 

I was wondering about what happens if you 'kill' a func_securitycamera since I remembered it was apparently supposed to become a physics object on breakage, but from a comparison of https://github.com/T...Camera.cpp#L516 with TDM's source code it looks as though that behaviour has been removed.


Some things I'm repeatedly thinking about...

- louder scream when you're dying


#8 esme

esme

    Member

  • Member
  • PipPip
  • 362 posts

Posted 11 March 2019 - 10:03 AM

Complete aside here but changes to the usual way things operate need communicating to the player so they can use them

 

The TDM universe works with a given set of rules, if those rules change in some subtle way it's not really fair on the player to expect them to guess this has happened unless there's some clue

 

For example climbable banners aren't in many FM's so I don't even try climbing them, breakable lights would be another thing I wouldn't try unless I'd been informed prior to playing the FM that this was a feature

 

So if this is going to be FM specific can the author please let the player know beforehand as I for one am not going to waste ammunition trying to shoot lights out unless I know there's a chance it'll work

 

And if it's going to be a game wide feature can they be additions to the existing lights with some way of telling breakable lights from non breakable ones so existing FM's with electric lights aren't affected






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users