EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Allow NPC to Emit Light? (https://www.eqemulator.org/forums/showthread.php?t=39254)

Hateborne 01-20-2015 09:56 PM

Allow NPC to Emit Light?
 
Evening ladies/gents/trolls,

I understand that this is a stupid question and has probably been asked before, but I could not find it on a brief search 'n' skim. Is there any way to make an NPC emit light similar to a player? I'm looking to equip sentry NPCs with a torch that emits light (similar to what a torch actually does :shock:), yet the torch equipped NPCs are still pretty much walking shadows.

Any advice/suggestions?

-Hate

Kingly_Krab 01-20-2015 11:43 PM

There is a 'light' column in the npc_types table, I'm not sure if it's implemented or not. From what I see in the source, it doesn't do anything yet. So in the future you may be able to do this (if you can't already).

Uleat 01-21-2015 12:45 AM

spawn packet: https://github.com/EQEmu/Server/blob...e/mob.cpp#L901

load npc type(?): https://github.com/EQEmu/Server/blob...nedb.cpp#L1735


Not sure if that's the function we use to load npc types..but, it doesn't appear to load the `light` field data.


EDIT: I changed the code to load the field data and it's still not showing. I'll look at this a little more when I get home tonight.

Hateborne 01-21-2015 02:21 PM

Thank you both for the input!

-Hate

Bohbo 01-21-2015 07:41 PM

If you set torch in mainhand and edit the torch's item light features wouldn't that work?

Uleat 01-21-2015 09:10 PM

I just pushed an activation of the light field in the npc_types loading code.

This will give any npc type an innate light source..so, use it carefully and sparingly.


I am working on enabling 'by instance' light sources based on equipment and/or other criteria - try not to get carried away with using the
innate light level.


All six clients tested positive for functionality and there is a 'primer' sql script that adds light levels to wisps and fire beetles in the optional
sql files folder (not sure where to get the live data from for all mobs...)


EDIT: Apparently, the server should update all equipment-based light changes..except for non-loading client light source change events.

Uleat 01-23-2015 11:21 PM

I was able to add equipment light functionality to npcs and bots. As soon as I finish out the rest of the mob derived classes that need
special handlers, I'll push the change.


If anyone knows of a source of, or has access to, mob data that contains any innate light values..it would be greatly appreciated!
(I don't even know if mobs can have a non-equipment/-spell based light source..but, our system is setup to allow it.)


All times are GMT -4. The time now is 07:35 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.