View Single Post
Old 11-26-10, 04:23 AM   #626
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

@H.sie,

Yes, solution 2 is OK for me, but it can be implemented in two ways:

a) apply the probability of a wind speed change only when the wind is > (say) 12 m/s. Then you need perhaps 10% or 15% probability of change.

b) apply the probability of a wind speed change every time the wind speed code is called. In that case 5% probability will be unnecessary most of the time, but too little when the wind does reach 15 m/s.

I think option (a) of the above is better (if it is not too complicated to code - I presume you are thinking of making an inline code change, rather than a jump to a new code section?).

I'm not clear about the write-access difficulty for the weather-'counter' that you mentioned.
1. Would there be a problem if everyone runs SH3 with administrator rights, or if they install SH3 outside 'program files'? My own copy of SH3 is installed in C:\Ubisoft\SilentHunteriii, and gives me no trouble.
2. It is certain that the 'counter' will not need to exceed 255, so you can use a byte for data storage. Even if the byte cannot be set when the game is loaded, just start from whatever random value is found in byte 'counter'. If you plan to use a lower maximum in counter than 255, reset it with inline code to zero whenever the value of counter is found to exceed your maximum. You could even re-use one of the existing data variables, since it is evident that some are used effectively as constants. The constants can be made constant in the code, freeing up the variable for reuse.

Good luck, anyway.

I shall not be able to do any more work on this wind problem until Tuesday.

Stiebler.
Stiebler is offline   Reply With Quote