I just thought of a neat idea for a possible quest item. (I don't know what the quest itself should be yet though.)
The idea is this: A macical dark lantern It makes darkness around the player when applied instead of light (like a powerful nightfall, only over the area directly around the player, and moving with the player, instead of over the entire map), and runs out of fuel like a normal one, except it gradually recharges over long periods of time.
I think it would be a very useful, but not overpowered item, I just don't know what sort of quest it should be for. I think I might try map making some time and make a quest for such an item, and hopefully submit it to the devs for possible addition to cvs. Any ideas/comments about this item idea and a possible quest for it?
Well.... I don't currently know much about crossfire's code (though I've looked over the inscription and some of the alch code a little), but I don't think it would be too much different from a normal lantern, same sort of timeouts that it uses to make it run out of fuel could also be used to make it revert from out of fuel to recharged after a specified amount of time, etc.
I'm going to look at the code for lanterns and lightning now.... (hops over to the sourceforge cvs browser)
Would some sort of light with glow radius -1, -2, -3 thing work? Put that into code (assuming it's not already there as it may) and then just make some sort of arch for new lanterns. Just make it so subtracting from a square's light with a lantern makes its effect become closer to zero, not necessarily less, or we get lanterns with effects of -1, -2, -3 and so forth. Refilling gradually might be done with something like the timeouts you see on some items (rods), so if the time is met, application of the lantern charges it in addition to the usual turning on?
Well... after much looking through the code, it appears that most pretty much everywhere that checks to see if glowradius matters checks: (glow_radius>0) so that code would have to be changed to allow negetive glow radiuses. However I was hoping that this lantern could make it so some monsters could'nt see you (like nightfall), however everything I've found about monsters detecting players does'nt care if the local light is low, it pretty much checks (enemy->map->darkness>0&&!stand_in_light(enemy)) Which means that it does'nt matter if the player is on a dark square if the 'global' map is still light.
Any ideas?
Last edited by Rednaxela on Sat Feb 26, 2005 2:18 pm, edited 1 time in total.
bort wrote:Make the helmet constantly cast nightfall?
Except that that would encompas the entire map, which is not what I want....
And helmet?!? it's a lantern, not a helmet :S
Anyways, another problem with using a negetive glowradius value, and patching the code so that it works, is that some archtypes for existing objects (a notable example is unlit lanterns) use negetive values for glowradius for no reason and to no effect, however such a patch would cause them to go crazy. Though those item archtypes could be patched too, existing items on servers would cause a little bit of a problem; A DM/Admin would likely have to run a script to fix all existing objects with a negetive glow radius before the patch. Which would be a major pain for admins unless they wanted to leave some such existing items such as unlit lantern creating a field of darkness.
Any ideas on how to get around or fix these code limitations? Any server admins with thoughts on how much of a pain running such a fixing script would be?
maybe a new field -darkness radius -could be used instead?
That would be very ugly though, the proper way is to remove all negative light radius lanterns (maybe pretend they are solar powered....)
What would be nicer would be to have a proper light sourcing implemented, where there would be lightsources with a certain power, that would increase light by power/n^2 n squares away, over the entire map, with items having varying opacity and reflectiveness....
This is however very very complex, even moreso once you start trying to block off light sources, and what is the reflectiveness of a skeleton anyway?
cavesomething wrote:What would be nicer would be to have a proper light sourcing implemented, where there would be lightsources with a certain power, that would increase light by power/n^2 n squares away, over the entire map, with items having varying opacity and reflectiveness....
This is however very very complex, even moreso once you start trying to block off light sources, and what is the reflectiveness of a skeleton anyway?
I think such changes are alot of work for how worthwhile they would be. (the power/n^2 would'nt be too bad, but the opacity and reflectiveness would be a bit of too much work to be worth the effort)
cavesomething wrote:maybe a new field -darkness radius -could be used instead?
That would be very ugly though, the proper way is to remove all negative light radius lanterns (maybe pretend they are solar powered....)
Either of these should work, it's just a question of how much server Admins would be annoyed by having to patch existing lanterns that players use. Any comments on that?
I think I'll set up a private server on my own computer some time, and begin attempting to make a patch for negetive glow_radiuses. I'll post my progress here, but I likely won't be able to start for a while due to homework, etc.