ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Resetting the rain sound thru a script? (NatVac, bro, help!)

« Previous 10 events | 1 2 3 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  18:09:38  16 October 2012
profilee-mailreply Message URLTo the Top
Kocayine
Senior Resident
 

 
On forum: 07/15/2010
Messages: 918
Ah! neat, man! Thanks a lot
  16:49:33  29 December 2012
profilee-mailreply Message URLTo the Top
lowenz
Augmented Technician
(Resident)

 

 
On forum: 04/15/2007
 

Message edited by:
lowenz
12/29/2012 16:49:43
Messages: 332
Problem is in CS too.
Maybe in CoP (never noticed).

A way to fix it there?
  04:33:15  5 January 2013
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4302
The same problem could use the same manual workaround. This could be put into the corresponding ui_main_menu.script file in CS (and CoP if needed), lowenz.

The active (programmed) workaround involving a delay timer would require knowledge of the other two games, neither of which I have, so you might want to post this in the CS and/or CoP sections.

Ideally, you'd want the engine programmer to fix the silly bug, not use a workaround. At least the later games give scripters more control and debugging abilities.
  01:24:01  16 July 2013
profilee-mailreply Message URLTo the Top
KreoShoc
(Novice)
 
On forum: 07/15/2013
Messages: 2
Here I have a solution of the problem. You need to add a few functions in level_weathers.script like this:


function WeatherManager:update()

...

   self:rain_sound_fix()
end

--  rain sound fix
local wthr = nil

function WeatherManager:rain_sound_fix()
	if wthr == nil then
		wthr = level.get_weather()
		level.set_weather("test", true)
		game.start_tutorial("rain_sound_fix")
    	end
end

function rain_sound_fix()
    	    level.set_weather(wthr, true)
end
-- rain sound fix



Also need to add a tutorial in game_tutorials.xml:


<rain_sound_fix>
<global_wnd/>
  <item type="video">
   <length_sec>1</length_sec>
   <pause_state>on</pause_state>
   <function_on_stop>level_weathers.rain_sound_fix</function_on_stop>
   <video_wnd x="0" y="0" width="1024" height="768" stretch="1">
    <texture x="0" y="0" width="1024" height="768">intro\intro_back</texture>
   </video_wnd>
  </item>
</rain_sound_fix>



This method works correctly with SWO v3.
  02:13:27  18 July 2013
profilee-mailreply Message URLTo the Top
Kocayine
Senior Resident
 

 
On forum: 07/15/2010
Messages: 918
Great job, man.
  22:19:09  18 July 2013
profilee-mailreply Message URLTo the Top
bamah
Senior Resident
 

 
On forum: 02/10/2008
 

Message edited by:
bamah
07/18/2013 23:13:24
Messages: 911
something similar works with any mod

In main_menu.script (zrp)

elseif dik == DIK_keys.DIK_W then
--if level.present() and (db.actor ~= nil) and db.actor:alive() then
get_console():execute("main_menu off"
if cur_weather then
level.set_weather(cur_weather, true)
cur_weather = nil
else -- cur_weather was nil; start of level or save loaded
cur_weather = level.get_weather()
level.set_weather("pripyat",true)--or rain section from a weather mod
--level.set_weather("storm",true)
end

in z_weather_temp_reset.script
function main()
--level.set_weather("test", true)
level.set_weather("rain_fix", true)
_z.show_small_msg("Weather preset 'Cloudy Dark Rain section' applied."
end

Tomatoes tomaatoes...same thing.
I like yours better
  21:06:08  24 July 2013
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4302
That's a clever use of the tutorial functionality, KreoShoc!

I've not tried it, but why did you use the "test" weather setting? That's sunny daylight even at night in vanilla. Does that mean that the tutorial locks the screen on the main menu for an extra second until the weather is properly fixed?

If not, I'd suggest using the "pripyat" weather setting for something closer to the default to avoid the possible flashing.

Thanks for going through the trouble to register just to post this!

¯¯¯¯¯¯¯¯¯¯
bamah, "rain_fix" is a custom weather setting of yours, right? It might be better than "pripyat". The z_weather_temp_reset.script function wouldn't be needed for your main menu function, though. Are you using it to fix the flashing-triangles problem?
  15:52:51  26 July 2013
profilee-mailreply Message URLTo the Top
KreoShoc
(Novice)
 
On forum: 07/15/2013
Messages: 2
NatVac, usage of this tutorial returns the correct weather before you see it, so you can use any weather setting, that you prefer...
  21:06:50  26 July 2013
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
Messages: 567

---QUOTATION---
Here I have a solution of the problem. You need to add a few functions in level_weathers.script like this:


function WeatherManager:update()

...

   self:rain_sound_fix()
end

--  rain sound fix
local wthr = nil

function WeatherManager:rain_sound_fix()
	if wthr == nil then
		wthr = level.get_weather()
		level.set_weather("test", true)
		game.start_tutorial("rain_sound_fix")
    	end
end

function rain_sound_fix()
    	    level.set_weather(wthr, true)
end
-- rain sound fix



Also need to add a tutorial in game_tutorials.xml:


<rain_sound_fix>
<global_wnd/>
  <item type="video">
   <length_sec>1</length_sec>
   <pause_state>on</pause_state>
   <function_on_stop>level_weathers.rain_sound_fix</function_on_stop>
   <video_wnd x="0" y="0" width="1024" height="768" stretch="1">
    <texture x="0" y="0" width="1024" height="768">intro\intro_back</texture>
   </video_wnd>
  </item>
</rain_sound_fix>



This method works correctly with SWO v3.
---END QUOTATION---


This gives me so many ideas with the tutorial function. Great work, and many thanks
  23:11:28  26 July 2013
profilee-mailreply Message URLTo the Top
ERForman
Senior Resident
 

 
On forum: 04/12/2007
Messages: 224
fyi

I've been using the Weather Overhaul mod with ZRP for years. It works
perfectly. Excellent sounds, dark nights, sun, moon, stars, storms, wind, lightning, etc., etc.
 
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-2021 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.