Jump to content
The Dark Mod Forums
Sign in to follow this  
Thrashaero

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

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.


What do you see when you turn out the light? I can't tell you but I know that it's mine.

Share this post


Link to post
Share on other sites

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.thedarkmod.com/topic/17258-breakable-glass/page-3?do=findComment&comment=375028 but not explicit in http://bugs.thedarkmod.com/view.php?id=4177 -- and that's just regarding fractures, not other kinds of breakable entity.

 

Edit2: according to http://forums.thedarkmod.com/topic/17258-breakable-glass/page-3?do=findComment&comment=374528 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

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

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.


What do you see when you turn out the light? I can't tell you but I know that it's mine.

Share this post


Link to post
Share on other sites

Ah, I see: I was looking at http://forums.thedarkmod.com/topic/17258-breakable-glass/page-3?do=findComment&comment=374528 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/TTimo/doom3.gpl/blob/master/neo/game/SecurityCamera.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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...