ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
How to check whether weapon has built-in scope

1 2 3 4 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Oldest Up Sort by Ascending
  22:08:28  22 March 2013
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
 

Message edited by:
Meltac
03/22/2013 22:09:52
Messages: 1519

---QUOTATION---
Do you still happen to have the AI merge you mentioned in this thread?

https://gsc-game.com/index.php?t=community&s=forums&s_game_type=xr&thm_page=56&thm_id=18136&page=2&sec_id=16
---END QUOTATION---



Wow, that's quite some time back! Didn't even remember I wrote that much posts here those days That was definitively in my scripting era - long time ago...

But nope, don't think I have the original source (I'd have to dig, though). Maybe ask in that thread?
  19:13:36  22 March 2013
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
Messages: 133

---QUOTATION---
Good luck with your mod!
---END QUOTATION---



I'll need it, I'm almost done with the update but I have a few more things to finish. Do you still happen to have the AI merge you mentioned in this thread?

https://gsc-game.com/index.php?t=community&s=forums&s_game_type=xr&thm_page=56&thm_id=18136&page=2&sec_id=16
  10:32:18  13 March 2013
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
 

Message edited by:
Meltac
03/13/2013 10:33:40
Messages: 1519
No problem, just go with a .ppe based approach then, I had done that as well before moving to shaders and it worked quite fine with the advantages you describe. Either way it's better than the vanilla "NV" system.

I'm not sure what kind of solarizing effect you mean, but it might just be the effect of the adaptive residual light amplification system I implemented.

Btw, my next shader version won't have any changes regarding NV scopes as it's pretty intended as a feature release, bringing new stuff such as sun shafts, dynamic wet surfaces, visor reflections, dynamic rainbows, and lighting improvements (sorry for advertising )

Good luck with your mod!
  04:11:04  13 March 2013
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
Messages: 133

---QUOTATION---
However, the reason I decided to add shader-based nightvision to scopes rather than just applying .ppe's is that I have much more control that way. First of all, you won't be able to have a .ppe effect applied only to certain regions of the screen (such as the center) while leaving the rest untouched - it's all or nothing. So it's not a good option when using Gnomus' scopes and the like.

Second, you won't be able to make your .ppe adaptive, the way I do it with my shaders, i.e. react on environmental illumination and other things and tune the effect up or down respectively - again, .ppe is just all or nothing. Also I can add some distortion or magnification regionally.

So if you're not interested in having such amount of control, a .ppe based approach surely can do what you're looking for.
---END QUOTATION---



Yeah, I'm more than willing to make those sorts of compromises, my original scope textures had blacked out the periphery of vision. Your shader-based system works decently but it has this weird solarizing effect with light sources, doesn't work on static lighting (for obvious reasons,) and is a little too "clean" looking for my tastes.

My main reason for looking for a .ppe system is so that it can get washed out by light/explosions, has a grain effect, and vision can be of varying quality for the sake of game progression.

I dislike the way night vision is treated in SoC, I'm aware of the fact that in the original concepts, there were supposed to be goggles and separate NVDs for weapons, but in the final game night vision does not have any sort of weight or movement penalty by itself, and offers quite a decent FoV, that and the fact that it is almost ubiquitous for most of the suits, and even with the original night weathers it might not even be necessary.

I still await your next update.
  22:29:30  12 March 2013
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519

---QUOTATION---
You see where I'm going with this right? I'm looking to add .ppe-based nightvision for weapons equipped with certain scopes, no offense against Meltac, but I would rather use .ppe effectors for nightvision.
---END QUOTATION---



No offense taken. What you wanna do is possible - as you already said it has even be done before by someone else

However, the reason I decided to add shader-based nightvision to scopes rather than just applying .ppe's is that I have much more control that way. First of all, you won't be able to have a .ppe effect applied only to certain regions of the screen (such as the center) while leaving the rest untouched - it's all or nothing. So it's not a good option when using Gnomus' scopes and the like.

Second, you won't be able to make your .ppe adaptive, the way I do it with my shaders, i.e. react on environmental illumination and other things and tune the effect up or down respectively - again, .ppe is just all or nothing. Also I can add some distortion or magnification regionally.

So if you're not interested in having such amount of control, a .ppe based approach surely can do what you're looking for.
  23:19:04  11 March 2013
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
Messages: 133

---QUOTATION---
There's no need to do that, fluffy. Weapons configs are part of system config, so it's simpler to read required values from system_ini()...

pretty much


function is_scope_attached()
local sys_ini = system_ini()
local active_weap = db.actor:active_item()
local active_section = active_weap and active_weap:section() or "none"
if sys_ini:section_exist(active_section) and
	sys_ini:line_exist(active_section, "scope_status") and
	sys_ini:r_string(active_section,"scope_status") == 1 then
		return true
end
return false
end



I think that should be close

edit: oops forgot something
---END QUOTATION---




Wait, could this be adapted to .ppe files?

More specifically, is it possible for the script to tell not just that a scope is attached, but which scope is attached to the weapon?

So the root of my question is whether or not a script can tell the name of what attachment is equipped, and if not then is it possible to create an ini section specifying which weapons attach the type of scope in question? The latter idea might be something similar to Bak's dynamic_hud script.


You see where I'm going with this right? I'm looking to add .ppe-based nightvision for weapons equipped with certain scopes, no offense against Meltac, but I would rather use .ppe effectors for nightvision.

I know of a mod that already does this, so I'll just paste its respective script files.

nightvision.script
http://pastebin.com/pwykB8aj

item_effects.script
http://pastebin.com/SbQ96AFY

weap_data.script
http://pastebin.com/dQbsN402

and its bind_stalker.script
http://pastebin.com/qxdMUYr5

The author of the scripts above used in a mod is Kirag, I found it to be an alright mod, but a little too complicated for my tastes, this is why I'm wondering if something simpler could be created based on the same principle.
  17:37:17  9 February 2012
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349

---QUOTATION---
gj!

---END QUOTATION---


hey gb, good to see you around
  16:41:22  9 February 2012
profilee-mailreply Message URLTo the Top
gannebamm
has abondened XRay and uses Unity3D now
(Resident)

 

 
On forum: 05/02/2007
Messages: 1077
gj!
  10:32:11  9 February 2012
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519

---QUOTATION---
I hate limited viewable area being a small circle, that is a result of the scope textures, (We have them also and I hate them when we use them).
I don't know who got the idea that you look through a scope from that far back.
---END QUOTATION---



I know very well what you mean and I agree. It's fairly unrealistic that you actually see the outside of the scope when you look through it. Instead, you would press your eye onto the rubber that surrounds the scope lens (anybody who ever looked through a real gun scope knows what I mean).

However, I consider these textures not as an aim for realism. Instead, they should just look, let's call it, cool. And with the blurred periphery around the lens and the NV, that intention is fitted quite well if you ask me.

Besides, you could also just use my NV scopes with the classic scope textures if you like
  23:00:45  8 February 2012
profilee-mailreply Message URLTo the Top
Nuor
Senior Resident
 

 
On forum: 03/10/2009
Messages: 735
Overall I like it. It is a more realistic effect than the ppe's I am using.

I hate limited viewable area being a small circle, that is a result of the scope textures, (We have them also and I hate them when we use them).
I don't know who got the idea that you look through a scope from that far back.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2020 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.