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

« Previous 10 events | 1 2 3 4 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  23:51:11  5 February 2012
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519

---QUOTATION---
I just used an expanded set of ppe's.

It's triggered by checking conditions and can attach to a limited set of weapons as determined by ltx entry. It also makes use of a battery.

I haven't released it as I have it buried in the SMP2.5 along with a bunch of other new mods. I'm expecting the beta for that will be out soon. I've played with it for quite some time now and it seems to work fine.
---END QUOTATION---



I had started with ppe's as well, and first I was satisfied. Then I noticed that a shader-based approach gives more options on what's possible to implement, first of all, only processing the screen center while leaving the peripheral screen area untouched
  00:10:19  7 February 2012
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
Messages: 133

---QUOTATION---
Wait, did you just mention that you're working on adding nightvision scopes?

Actually I've already done it

Will be part of version 1.1 of my Dynamic Shaders mod. I'm just trying to fix some issues and do some optimizations before I can upload...
---END QUOTATION---



I can see that. I wonder if I could get someone to port the 1PN58 and 1PN51 models from this mod to SoC. Although I don't suppose that's in your area of expertise.

http://www.gamebanana.com/cscz/skins/103880
  01:04:40  7 February 2012
profilee-mailreply Message URLTo the Top
Nuor
Senior Resident
 

 
On forum: 03/10/2009
Messages: 735

---QUOTATION---
http://www.gamebanana.com/cscz/skins/103880
---END QUOTATION---



I think we have that in Smp 2.5 at least something close. Models with actual night scopes additions are fairly rare.
  20:37:38  8 February 2012
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
Messages: 133

---QUOTATION---
http://www.gamebanana.com/cscz/skins/103880

I think we have that in Smp 2.5 at least something close. Models with actual night scopes additions are fairly rare.
---END QUOTATION---



This might be a little much for me to ask, but, can I have them?

I'm working on drawing the proper reticles for these types of scopes as well.
  22:44:16  8 February 2012
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519

---QUOTATION---
Wait, did you just mention that you're working on adding nightvision scopes?
---END QUOTATION---



I made some video demonstrating the effect:

http://www.moddb.com/mods/dynamic-shaders/videos
  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.
  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
  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!
  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
  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.
 
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.