• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: RNG and Weather

A level script, okay. So I have to put it on a level script for each map I want this random weather to be on?

So, uh, have you read the thread at all? And have you read the rules for this sub-forum?
 
I'm a n00b at this kinda stuff. xD I didn't fully understand it. :|

Makes no difference to me.

Anyways, all you need to know is that this isn't finished yet. It's nearing completion but it's not ready for public release yet. Try to be patient, please.
 
Makes no difference to me.

Anyways, all you need to know is that this isn't finished yet. It's nearing completion but it's not ready for public release yet. Try to be patient, please.

Sorry if I was impatient, I have a tendency to to that. :| Anyways, I can wait. For me, the more complicated stuff can wait till later; since I'm starting a new hack, I want to get some of the essentials out of the way.
 
Okay, so I take it we now have a set script to use? :)
*didn't read most of the thread*
 
For those interested, I'll briefly explain how I made it in my hack. First of all, the weather-based seasons are enabled only on maps where the weather byte is set to 0xF. This is useful to provide a manual override for particular maps and, at the same point, to avoid weather changes inside buildings, caves etc. So, let's suppose the player has just entered a 0xF map. If the old weather value (stored elsewhere from the actual map weather) is set to 0x0, and the weather timer is 0x0 as well, a new weather type would be randomly selected from the weather-season tables, one for each season and 32 byte each. This gives a 3.125% chance for each item in the table. Then the weather would be applied and stored in the extra memory area I talked about earlier. Finally, the timer would be randomly set to a certain amount of seconds, representing a few hours. Whenever the timer elapses, a new weather is randomly chosen and the timer is reinitialized. Saving the weather byte is important, as when going to another 0xF map (as long as the timer is not 0x0) the same weather would be applied.
 
Interesting, a timer system is a good idea, but it seems a little impractical.
So far as I can tell all that is needed now is an ASM routine to get the weather to run whenever you enter the maps you want. (This script also used 0xF as the weather byte for this to work.)
 
Interesting, a timer system is a good idea, but it seems a little impractical.
So far as I can tell all that is needed now is an ASM routine to get the weather to run whenever you enter the maps you want. (This script also used 0xF as the weather byte for this to work.)

Why a timer would be impractical? I don't get it.
 
If anything it would be more practical. You could stand in one spot and the weather could change randomly. That makes much more sense then just when changing maps.
 
I was thinking it had a timer to the point where it would only change when changing maps, and if the timer went off. A Real-time timer would be even better.
Sorry for the confusion.
 
I was thinking it had a timer to the point where it would only change when changing maps, and if the timer went off. A Real-time timer would be even better.
Sorry for the confusion.

In fact, it would be "only change when changing maps, and/or if the timer went off."
BTW, what do you mean by "real-time timer" ?
 
I mean it happens as soon as the timer goes off, no need to change maps.

I've set up a timer in a hack before, wasn't very helpful as the player could sit in the map forever and never have the event planned happen until they change map.
Not exactly Real Time if you ask me...
 
HackMew said:
Maybe I didn't express myself correctly, but that's exactly what would happen. There's no need to change map. But if you do, the same weather is applied (assuming the weather byte is set to 0xF).
The timer updates a lot so theres no need to change maps ^^ As it refreshes and then there's script execution as well when the timer hits max/min.
 
The timer updates a lot so theres no need to change maps ^^ As it refreshes and then there's script execution as well when the timer hits max/min.

Well, the timer updates, but only once some hours. So it's perfectly understandable the player might change map in the meanwhile. Anyway, I never said you need to change map. I only said then when you enter/exit a map, if the map weather is 0xF, then the same weather as the old map is going to be applied. The weather actually changes, from 0xF to whatever, but the result in-game is not noticeable.
 
Why don't you make an automatic ASM function?
 
Back
Top