Page 1 of 1

Finding Resources in National Territory

Posted: Sat Apr 20, 2019 5:11 pm
by ajnatalo
All,

I was looking to mod some of the smaller aspects of the game. One of those was the rate at which resource sites are randomly discovered in national territory. Example is when you see the message "Japanese Prospection Team found some Silk near Edo." There has to be a script or code string somewhere that is governing these random events. I've almost lost my mind trying to find it. If anyone knows where to look it would be greatly appreciated. Thank you.

Re: Finding Resources in National Territory

Posted: Sat Apr 20, 2019 5:55 pm
by Bohémond
To find the structures in a region, you should, assuming that you are playing the 1850 Campaign ;

-Look at 1850GRC_Cities,inc in VGN/includes folder
-Look for EDO (CTRL+F) region.
-You will find ;

ChgResSites = $merCereals|1
DiscoverResSites = $merCereals|1
ChgResSites = $merRice|6
DiscoverResSites = $merRice|3
ChgResSites = $merFish|3
DiscoverResSites = $merFish|3
ChgResSites = $merSilk|1
DiscoverResSites = $merSilk|1

So the region ressources at start are 1 cereal, 3 rice, 3 fish and 1 silk and you should get random event messages for 3 rice ressources.

If you get a message regarding Silk in Edo although you already have one discovered, I will investigate more.

Regards

Re: Finding Resources in National Territory

Posted: Tue Apr 23, 2019 4:52 am
by ajnatalo
The silk in Edo was just a hypothetical example. I already know where to find stuff in the includes folder. I'm looking for the code that tells the game to randomly discover the resource site, whether its a rice in Edo or Coal in the Rheinland or whatever. There has to be some code somewhere rolling the RNG to determine if now is the time.