Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: dynamic (flash-)lighting
Re: New feature: dynamic (flash-)lighting[message #323181] Wed, 24 July 2013 23:57 Go to previous messageGo to next message
Flugente

 
Messages:3309
Registered:April 2009
Location: Germany
Aye. It deletes it, and the tag is needed.


Re: New feature: dynamic (flash-)lighting[message #323182] Thu, 25 July 2013 00:03 Go to previous messageGo to next message
nhja2fan

 
Messages:27
Registered:March 2012
Thanks. Is anyone working of getting the XML editor fixed? Seems like it ought to by default hold onto and reinsert tags it doesn't understand. Then hand edits would at least be maintained. (It seems like it used to work this way, at least with the NPCInventory xml files). Thanks, again.
Re: New feature: dynamic (flash-)lighting[message #323191] Thu, 25 July 2013 00:33 Go to previous messageGo to next message
nhja2fan

 
Messages:27
Registered:March 2012
Ok, so I'm having some success. I hand edited items.xml to put back the missing FlashLightRange tags.

One merc who has a commando with batteries installed works as it should. Nice.

A second merc, who's commando doesn't have batteries causes an Assertion Failure, line 2258 in Button System.cpp.

Removing the batteries from the original merc's commando, doesn't cause the assertion failure. Works absolutely. Batteries in/out, Light on/off in any combination works.

Re: New feature: dynamic (flash-)lighting[message #323194] Thu, 25 July 2013 00:47 Go to previous messageGo to next message
Flugente

 
Messages:3309
Registered:April 2009
Location: Germany
Can that be reproduced? The error is caused by some button having a negative ID, which isn't directly related to flashlights...


Re: New feature: dynamic (flash-)lighting[message #323198] Thu, 25 July 2013 01:11 Go to previous messageGo to next message
nhja2fan

 
Messages:27
Registered:March 2012
I have a save that will produce it on command, don't know how to make it happen specifically. I can send you the save. PM me.
Re: New feature: dynamic (flash-)lighting[message #323248] Fri, 26 July 2013 01:09 Go to previous messageGo to next message
Flugente

 
Messages:3309
Registered:April 2009
Location: Germany
Fixed in r6244. The error wasn't directly related to flashlights. Basically, this error could always happen when transforming attached items on guns with attachments that altered magsize. The game tried to update the bullet number on the ammo button - but that button wasn't there, as we were currently looking at the attachment, which doesn't have ammo. If you remove the mag adapter, the error also does not happen.

As a fix, I simply don't update that number if the button isn't there. It would be reasonable to do that before, but attachment code is one giant mess.


Re: New feature: dynamic (flash-)lighting[message #323558] Fri, 02 August 2013 12:08 Go to previous messageGo to next message
sevenfm

 
Messages:1532
Registered:December 2012
Location: Under the Mountain
Flashlights can be used when fighting against NVG enemies, if brightlight penalties are set.
They are so stupid that they will not wear off useless night googles.


Re: New feature: dynamic (flash-)lighting[message #329254] Wed, 25 December 2013 05:37 Go to previous messageGo to next message
AvianSavara

 
Messages:34
Registered:December 2013
Location: Montr
Amazing feature, Flugente, as with every single one of your contributions to the mod.

Hadn't played since 4870 last year and I'm discovering/loving every new shiny thing that's been made for 1.13 so far.

[Updated on: Wed, 08 January 2014 03:42] by Moderator

Re: New feature: dynamic (flash-)lighting[message #332770] Sun, 18 May 2014 10:04 Go to previous messageGo to next message
No-Nothing

 
Messages:35
Registered:March 2013
Totally like your flashlights!!
Still there
Re: New feature: dynamic (flash-)lighting[message #332771] Sun, 18 May 2014 10:10 Go to previous messageGo to next message
No-Nothing

 
Messages:35
Registered:March 2013
Looking at your flashlights I totally naturally got ideas about lasers. Might be interesting for you!
If weapon has a laser could you add: ?
AT NIGHT - 1 square thin line of min brightness light. Just the same way like you did for flashlights!
AT DAY - LAW rocket animation tined by red.
http://www.mediafire.com/convkey/3b1b/7q3n1jqdada78c2fg.jpg
Would be COOL!
I understand that needs waiting till AI is not afraid of light in front.
Re: New feature: dynamic (flash-)lighting[message #332772] Sun, 18 May 2014 10:12 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3807
Registered:July 2009
NoNothing
Looking at your flashlights I totally naturally got ideas about lasers. Might be interesting for you!
If weapon has a laser could you add: ?
AT NIGHT - 1 square thin line of min brightness light. Just the same way like you did for flashlights!
AT DAY - LAW rocket animation tined by red.
http://www.mediafire.com/convkey/3b1b/7q3n1jqdada78c2fg.jpg
Would be COOL!
I understand that needs waiting till AI is not afraid of light in front.
Please read an introduction about optics and lasers.

Alternatively, play around with a laser pointer and a cat. The cat is optional.

[Updated on: Sun, 18 May 2014 10:54] by Moderator



Re: New feature: dynamic (flash-)lighting[message #350235 is a reply to message #332772] Mon, 03 July 2017 01:55 Go to previous messageGo to next message
goc_man

 
Messages:111
Registered:November 2007
Location: Croatia
Hi Flugente. I'm a long time JA2 fan, and just got back to JA2 and really enjoying it again (thanx to all your new stuff, among other features)
First of all, thanks for all your work, which is amazing btw.

Second, I'd like discuss the effect of the flashlight (using r8408_on_GameDir_2364). It's related to sight range calculation when using both a flashlight and NVGs.
Here's some screenshots:

Normal Sight Range with NVG:
http://www.mediafire.com/convkey/8f7b/q4i82y4thiahudq6g.jpg

Flashlight ON Sight Range without NVG:
http://www.mediafire.com/convkey/aab8/mt8c9pyvydtl6tz6g.jpg

Flashlight ON Sight Range with NVG:
http://www.mediafire.com/convkey/e67d/5ovz27k54glg43s6g.jpg

At first I was a bit confused as to why is there a "hole" in Bob's sight range. I thought it was a bug. But it's just the way NVGs reduce BrightVisionRange but the DayVisionRange penalty is small enough so we get vision on tiles where the flashlight starts losing it's brightness. If I increase the NVG penalties then this "hole" effect would be greater but it would break the balance in a way. I could then use 2 mercs. One would throw a beam of light on another and that second guy would be invisible to enemies using NVGs... We get a cheap way to hassle the AI (mid and late game, almost all of them have NVG).

So i'm thinking...
In reality, the area lit by the flashlights should have reduced visibility, but the light source should blind the NVG user.
Gamewise, this is a bit tricky. First we have the problem mentioned above.
Second, I'm thinking of a solution where only the tile with the light source could have reduced sight range if using NVG. But that's not good, since the AI doesn't know how to detect this, and don't know how to take their NVG off. It would also be OP, since the enemy would have to be really close to see the light source, and by the time they get close, they're already shot to bits.

Is there a way the NVG Sight Range penalty could by applied only if the light source is very close? That would create a realistic flashlights effect of blinding a NVG user but wouldn't make flashlights OP. It would be great for guarding building entries, corners etc. since you could blind the unsuspecting enemy if he's wearing NVG. On the other hand, if out in the open, the flashlight user wouldn't be invisible to the enemy with NVG, but exposed and vulnerable.

Any thoughts?


P.S.
The vision modifiers (<DayVisionRangeBonus>, <BrightLightVisionRangeBonus>...) are reported in-game like percentages. But info from a forum user (can't remember who) suggests that the value is actually tiles (divided by 10).
So If I have DayVisionRangeBonus=20, is that 20% or 2 tiles?

[Updated on: Mon, 03 July 2017 03:38]

Re: New feature: dynamic (flash-)lighting[message #350273 is a reply to message #350235] Thu, 06 July 2017 17:58 Go to previous message
silversurfer

 
Messages:2295
Registered:May 2009
Currently the game only checks for the light level at a certain tile. It doesn't care if that light level was caused by a flashlight, a street lamp or some spot lights. I doubt that this can be changed easily and I don't think that it needs to be changed. Areas with bright lights should provide a penalty to NVG users. Still, with the current system it is a bad idea to light up your mercs just because it may provide a penalty to enemy NVG users. The next enemy without NVG will be thankful for such target illumination and kick your merc's ass.

Btw. the vision range bonus is a percentage.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Previous Topic: New feature: anti-materiel ammo
Next Topic: New feature: Improved trade menu
Goto Forum:
  


Current Time: Wed May 23 11:53:39 EEST 2018

Total time taken to generate the page: 0.01586 seconds