Ryba15 Posted January 1, 2018 Share Posted January 1, 2018 (edited) Hi, I mean how to disable LS, SF, LV, and Bone Couty weather regions, to use only Countryside weather region for whole game world. I found LV,SF,BC regions boundaries(0072A686, 0072A6F5, 0072A6B5)(without boundary on map edge(3000/-3000)) in exe, but I don't know what exacly I can do with it.. : - ) For now I only overwrite memory by cleo script in 008D5EB0 to set own weathers for countryside region. Edited January 1, 2018 by Ryba15 Link to comment Share on other sites More sharing options...
DK22Pac Posted January 1, 2018 Share Posted January 1, 2018 (edited) You found the CWeather::UpdateWeatherRegion function, which updates current weather region (CWeather::WeatherRegion) according to camera position: I think the best solution here is to hook all CWeather::UpdateWeatherRegion calls and assign your value to CWeather::WeatherRegion: #include "plugin.h"#include "CWeather.h"using namespace plugin;class MyWeatherRegion {public: MyWeatherRegion() { static CdeclEvent<AddressList<0x72A7A4, H_CALL, // this list contains 0x72B85E, H_CALL, // all exe addresses where 0x72B8B4, H_CALL>, // CWeather::UpdateWeatherRegion is called PRIORITY_AFTER, ArgPickNone, void(CVector*)> myOnUpdateWeatherRegion; myOnUpdateWeatherRegion += [] { // this code will be executed directly after CWeather::UpdateWeatherRegion call CWeather::WeatherRegion = WEATHER_REGION_DESERT; }; }} myWeatherRegion;Yet another way is to completely replace CWeather::UpdateWeatherRegion with your own function: #include "plugin.h"#include "CWeather.h"using namespace plugin;class MyWeatherRegion {public: static void MyUpdateWeatherRegion(CVector*) { CWeather::WeatherRegion = WEATHER_REGION_DESERT; } MyWeatherRegion() { patch::RedirectJump(0x72A640, MyUpdateWeatherRegion); // replace original function with your function }} myWeatherRegion; Edited January 1, 2018 by DK22Pac Ryba15 1 Link to comment Share on other sites More sharing options...
Ryba15 Posted January 1, 2018 Author Share Posted January 1, 2018 It's look very clearly, but it's will work without any additional plugins? (for example I can't find CWeather in exe) Link to comment Share on other sites More sharing options...
DK22Pac Posted January 1, 2018 Share Posted January 1, 2018 How are you going to patch exe without 'additional plugins'? Link to comment Share on other sites More sharing options...
Ryba15 Posted January 1, 2018 Author Share Posted January 1, 2018 I compared UpdateWeatherRegion function from your screenshot with what I see in my screen, read about plugins on your github site, and now I know that I tried to do it the wrong way. Link to comment Share on other sites More sharing options...