Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

TrollandToad.com
Reply
 
Thread Tools
  #26    
Old January 2nd, 2010 (7:49 PM).
Darthatron's Avatar
Darthatron Darthatron is offline
巨大なトロール。
  • Silver Tier
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 25
Gender: Male
Nature: Modest
Posts: 1,152
Quote:
Originally Posted by colcolstyles View Post
Man, all that time spent coordinating the "call"s and "goto"s and now I don't even need them. :'(

I don't know if I should even bother fixing it as it seems like interdpth has some snazzy ASM plan which makes my method look pretty rudimentary. With mine, you have to add a level script for every single map that you want random weather on. Though the fact that you don't have to edit indoor maps (unless you want it to rain inside) makes things easier, it's still a hassle.

Still, I'm interested in seeing what you guys come up with. I could try to help out but my ASM knowledge is pretty pathetic.

Best of luck.
The only thing he is planning on doing is making it so your or my script is called every time a map is loaded. I'll keep you updated. I think I have you added on MSN? :\
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote

Relevant Advertising!

  #27    
Old January 2nd, 2010 (7:58 PM).
interdpth interdpth is offline
I've seen things, man.
     
    Join Date: Jul 2004
    Posts: 275
    SOmeone make a script that everyone agree's on, and i'll hack the level loading routines and make it execute.

    DEAL?
    __________________
    yes, this is doge.

    potato is not here.

    bye
    Reply With Quote
      #28    
    Old January 2nd, 2010 (8:33 PM).
    colcolstyles's Avatar
    colcolstyles colcolstyles is offline
    Yours truly
    • Crystal Tier
     
    Join Date: May 2008
    Location: The Bay Area
    Gender: Male
    Nature: Lonely
    Posts: 1,584
    Code:
    '----------------------------------------------------------------
    ' Natural Weather Script
    ' By colcolstyles
    ' 10/17/2009
    ' As the player moves from one map to the next, the weather has
    ' the possibility of changing. Both the type of weather that
    ' might begin and the odds of a change occurring depend on
    ' the current weather (actual odds given in script). This script
    ' also contains an available option for manual override; the
    ' hacker can (by setting the OVERRIDE flag) specify a particular
    ' weather to be used, thus deactivating the random weather.
    '----------------------------------------------------------------
    
    #erase 0x800000 0x100
    #dynamic 0x800000
    
    #define V_WEATHER 0x7000
    #define V_RANDVAR 0x7001
    #define F_OVERRIDE 0x500
    #define W_SUNNY 0x2
    #define W_CLOUDY 0xB
    #define W_RAIN 0x3
    #define W_THUNDER 0xD
    
    '----------------------------------------------------------------
    
    #org @main
    compare F_OVERRIDE B_TRUE
    if B_== goto @manual
    random 0x13
    copyvar V_RANDVAR LASTRESULT
    compare V_WEATHER W_SUNNY
    if B_== goto @sunnyscript
    compare V_WEATHER W_CLOUDY
    if B_== goto @cloudyscript
    compare V_WEATHER W_RAIN
    if B_== goto @rainscript
    compare V_WEATHER W_THUNDER
    if B_== goto @thunderscript
    end
    
    '----------------------------------------------------------------
    
    #org @sunnyscript
    compare V_RANDVAR 0x1 ' 2/20 chance of becoming cloudy
    if B_<= goto @becomecloudy
    compare V_RANDVAR 0x2 ' 1/20 chance of spontaneous rain
    if B_<= goto @becomerainy
    setweather W_SUNNY ' 17/20 chance of remaining the same
    goto @end
    
    #org @cloudyscript
    compare V_RANDVAR 0x4 ' 5/20 chance of becoming sunny
    if B_<= goto @becomesunny
    compare V_RANDVAR 0xE ' 10/20 chance of becoming rainy
    if B_<= goto @becomerainy
    compare V_RANDVAR 0x11 ' 3/20 chance of thunderstorm
    if B_<= goto @becomethunder
    setweather W_CLOUDY ' 2/20 chance of remaining the same
    goto @end
    
    #org @rainscript
    compare V_RANDVAR 0x2 ' 3/20 chance of thunderstorm
    if B_<= goto @becomethunder
    compare V_RANDVAR 0xA ' 8/20 chance of rain stopping but remaining cloudy
    if B_<= goto @becomecloudy
    compare V_RANDVAR 0xC ' 2/20 of rain cutting out completely
    if B_<= goto @becomesunny
    setweather W_RAIN ' 7/20 chance of remaining the same
    goto @end
    
    #org @thunderscript
    compare V_RANDVAR 0xC ' 13/20 chance of reducing to rain
    if B_<= goto @becomerainy
    compare V_RANDVAR 0xF ' 3/20 chance of suddenly reducing cloudy
    if B_<= goto @becomecloudy
    setweather W_RAIN ' 4/20 chance of remaining the same
    goto @end
    
    '----------------------------------------------------------------
    
    #org @becomesunny
    setvar v_WEATHER W_SUNNY
    setweather W_SUNNY
    goto @end
    
    #org @becomecloudy
    setvar V_WEATHER W_CLOUDY
    setweather W_CLOUDY
    goto @end
    
    #org @becomerainy
    setvar V_WEATHER W_RAIN
    setweather W_RAIN
    goto @end
    
    #org @becomethunder
    setvar V_WEATHER W_THUNDER
    setweather W_THUNDER
    goto @end
    
    '----------------------------------------------------------------
    
    #org @manual
    setweather V_WEATHER
    doweather
    end
    
    '----------------------------------------------------------------
    
    #org @end
    doweather
    end
    
    '----------------------------------------------------------------
    I looked through the script and I realized that a "goto @end" is also necessary at the end of @sunnyscript and its corresponding scripts.

    This hasn't been fully tested yet but it's nearing the final stages. Does anyone have any other ideas that they want added? I've already added manual override and the ability to disable the random weather at any time but if there are any other features that you think would be nice to have, just speak up and I'm sure we can figure out how to implement them.
    __________________

    Brother of Vrai
    Reply With Quote
      #29    
    Old January 2nd, 2010 (9:19 PM).
    Hiroshi Sotomura's Avatar
    Hiroshi Sotomura Hiroshi Sotomura is online now
    That's Deneb, Altair, and Vega.
    • Developer
    • Crystal Tier
    • GTGet-Together Event Management
    • PokéCommunity Daily
    • Discord Moderoid
     
    Join Date: Nov 2002
    Location: Melbourne, Australia
    Gender: Male
    Nature: Lax
    Posts: 16,940
    Quote:
    Originally Posted by colcolstyles View Post
    I looked through the script and I realized that a "goto @end" is also necessary at the end of @sunnyscript and its corresponding scripts.

    This hasn't been fully tested yet but it's nearing the final stages. Does anyone have any other ideas that they want added? I've already added manual override and the ability to disable the random weather at any time but if there are any other features that you think would be nice to have, just speak up and I'm sure we can figure out how to implement them.
    I guess we'll need to try and fully test it if you're satisfied. I know I am.
    __________________
    On a day just like any other,
    you suddenly stood up and said,
    “Let's go stargazing tonight!”
    Reply With Quote
      #30    
    Old January 2nd, 2010 (9:21 PM). Edited January 3rd, 2010 by colcolstyles.
    colcolstyles's Avatar
    colcolstyles colcolstyles is offline
    Yours truly
    • Crystal Tier
     
    Join Date: May 2008
    Location: The Bay Area
    Gender: Male
    Nature: Lonely
    Posts: 1,584
    Quote:
    Originally Posted by Anthony La View Post
    I guess we'll need to try and fully test it if you're satisfied. I know I am.
    Well, Darthatron and I have been talking and we're working on a better version. If you have MSN you can join us, actually.

    edit: We think we're nearing in on a final version but we're still testing it. We'll keep you updated.

    edit2: Well we think we have finally agreed on a script. We've tested it too and as far as we can tell, it works like we want it to. Now all we need is for interdpth to work his magic.

    Here's the script:
    Code:
    //----------------------------------------------------------------
    // Natural Weather Script
    // Script by Darthatron and colcolstyles, original concept and odds by Anthony La
    // 1/2/10
    // This script will create a system which aims to simulate the
    // "real world" weather by randomly switching between weather
    // effects (sunny, cloudy, raining, and thunderstorm). The odds of
    // a change occurring depend on the current weather (i.e. it is
    // more likely to start raining when it is already cloudy than
    // when it is sunny). However, random weather will only occur if
    // the weather type on the player's current map is set to 0x0F.
    // Because of this, the hacker can make a map use a preset weather
    // condition and be exempt from random weather. The script will
    // also only activate on maps of type Village, City, and Route to
    // ensure that it does not rain inside or in a cave.
    //----------------------------------------------------------------
    
    #erase 0x800000 0xFFF
    #dynamic 0x800000
    
    #define V_DEFAULT 0x8000
    #define V_WEATHER 0x7000  //This must be set to a value between 1 and 4 to work.
    #define V_RANDVAL 0x7001
    
    #define A_WEATHER 0x02036E12
    #define A_MAPTYPE 0x02036E13
    #define A_DEFAULT 0x020370B8
    
    #define W_SUNNY 0x02
    #define W_CLOUDY 0x0B
    #define W_RAIN 0x03
    #define W_THUNDER 0x0D
    
    #org @Setup
    setvar V_WEATHER 0x01
    setweather W_SUNNY
    doweather
    end
    
    #org @Main
    setvar V_DEFAULT 0x0000
    copybyte A_DEFAULT A_WEATHER //Grabs the default map weather and stores it in V_DEFAULT
    compare V_DEFAULT 0x0F
    if B_<< goto @Quit
    copybyte A_DEFAULT A_MAPTYPE //Grabs the map type and stores it in V_DEFAULT
    compare V_DEFAULT 0x03
    if B_>> goto @Quit
    random 0x13 //Create a random value between 0 and 19.
    copyvar V_RANDVAL LASTRESULT
    compare V_WEATHER 0x01
    if B_TRUE goto @CurrentlySunny
    compare V_WEATHER 0x02
    if B_TRUE goto @CurrentlyCloudy
    compare V_WEATHER 0x03
    if B_TRUE goto @CurrentlyRaining
    compare V_WEATHER 0x04
    if B_TRUE goto @CurrentlyStorming
    end
    
    #org @Quit
    end
    
    #org @BecomeSunny
    setweather W_SUNNY
    setvar V_WEATHER 0x01
    doweather
    end
    
    #org @BecomeCloudy
    setweather W_CLOUDY
    setvar V_WEATHER 0x02
    doweather
    end
    
    
    #org @BecomeRaining
    setweather W_RAIN
    setvar V_WEATHER 0x03
    doweather
    end
    
    #org @BecomeStorming
    setweather W_THUNDER
    setvar V_WEATHER 0x04
    doweather
    end
    
    #org @CurrentlySunny
    compare V_RANDVAL 0x01 //10% chance of becoming cloudly.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x02 //5% chance of it raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x13 //85% chance of the weather staying the same.
    if B_<= goto @BecomeSunny
    end
    
    #org @CurrentlyCloudy
    compare V_RANDVAL 0x04 //25% chance of becoming sunny.
    if B_<= goto @BecomeSunny
    compare V_RANDVAL 0x06 //10% chance of it staying cloudy.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x10 //50% chance that it will start raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x13 //15% chance that a thunder storm will start.
    if B_<= goto @BecomeStorming
    end
    
    #org @CurrentlyRaining
    compare V_RANDVAL 0x06 //35% chance that it will keep raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x08 //10% chance of it becoming sunny.
    if B_<= goto @BecomeSunny
    compare V_RANDVAL 0x10 //40% chance that it will become cloudy.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x13 //15% chance that a thunder storm will start.
    if B_<= goto @BecomeStorming
    end
    
    #org @CurrentlyStorming
    compare V_RANDVAL 0x0C //65% chance that it will start raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x0F //15% chance of it becoming cloudy
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x13 //20% chance that the thunder storm will continue.
    if B_<= goto @BecomeStorming
    end
    __________________

    Brother of Vrai
    Reply With Quote
      #31    
    Old January 3rd, 2010 (1:10 AM).
    Hiroshi Sotomura's Avatar
    Hiroshi Sotomura Hiroshi Sotomura is online now
    That's Deneb, Altair, and Vega.
    • Developer
    • Crystal Tier
    • GTGet-Together Event Management
    • PokéCommunity Daily
    • Discord Moderoid
     
    Join Date: Nov 2002
    Location: Melbourne, Australia
    Gender: Male
    Nature: Lax
    Posts: 16,940
    Of note, is it fully necessary to define the ONE weather byte that the script activates on AND ensure it doesn't activate in certain areas? Sounds like an unnecessary measure when it's up to the hacker to set which weather byte activates it.
    __________________
    On a day just like any other,
    you suddenly stood up and said,
    “Let's go stargazing tonight!”
    Reply With Quote
      #32    
    Old January 3rd, 2010 (1:10 AM).
    0m3GA ARS3NAL's Avatar
    0m3GA ARS3NAL 0m3GA ARS3NAL is offline
    Im comin' home...
    • Silver Tier
     
    Join Date: Jan 2008
    Location: Superjail Penitentiary
    Age: 24
    Gender: Male
    Nature: Gentle
    Posts: 1,812
    Well well well, stuff happened pretty fast!
    I wasn't even here for the initial idea pitch, oh well.
    I've tried out this script a bit on my PSP, and all goes well, well indeed.
    Though I had an idea...
    What about snow?
    I know for a fact that people nowadays have the strangest fascination with snowy maps in a ROM hack, and if someone makes a snowy mountain, how would this random weather be incorporated...
    I guess as of yet one could simply change the "Storm" and "Rain" to things like "3 Snowflakes" and the Ash snow used in R/S/E...
    But that would require compiling a completely different script, and if someone were to cross maps while things are stormy, to a map intended to have the chance of snow, things may get a little buggy.
    __________________
    >Boot Jailbot
    >Pass *****
    .
    .
    Jailbot OS Ver 1.1.2
    Greetings Warden
    of Superjail Penitentiary
    Awaiting user input...

    >Display User_Info
    ╠══User Info══╣
    Username:
    0m3GA ARS3NAL
    Age: 18
    Sex: Male ♂
    Race: Caucasian
    Quote:
    "What is this
    I don't even..."

    M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
    ╠══End of File══╣
    Awaiting user input...

    >
    Reply With Quote
      #33    
    Old January 3rd, 2010 (1:23 AM). Edited January 3rd, 2010 by Darthatron.
    Darthatron's Avatar
    Darthatron Darthatron is offline
    巨大なトロール。
    • Silver Tier
     
    Join Date: Jan 2006
    Location: Melbourne, Australia
    Age: 25
    Gender: Male
    Nature: Modest
    Posts: 1,152
    Quote:
    Originally Posted by Anthony La View Post
    Of note, is it fully necessary to define the ONE weather byte that the script activates on AND ensure it doesn't activate in certain areas? Sounds like an unnecessary measure when it's up to the hacker to set which weather byte activates it.
    You make a valid point. It's not difficult to simply get rid of that check, as it's only 3 lines. Here is an updated version for you:
    Code:
    //----------------------------------------------------------------
    // Natural Weather Script!
    //----------------------------------------------------------------
    // By colcolstyles and Darthatron (3/1/2010)
    //----------------------------------------------------------------
    // This script will create a system which aims to simulate the
    // "real world" weather by randomly switching between weather
    // effects (sunny, cloudy, raining, and thunderstorm). The odds of
    // a change occurring depend on the current weather (i.e. it is
    // more likely to start raining when it is already cloudy than
    // when it is sunny). However, random weather will only occur if
    // the weather type on the player's current map is set to 0x0F.
    // Because of this, the hacker can make a map use a preset weather
    // condition and be exempt from random weather.
    //----------------------------------------------------------------
    
    #erase 0x800000 0xFFF
    #dynamic 0x800000
    
    #define V_DEFAULT 0x8000
    #define V_WEATHER 0x7000  //This must be set to a value between 1 and 4 to work.
    #define V_RANDVAL 0x7001
    
    #define A_WEATHER 0x02036E12
    #define A_MAPTYPE 0x02036E13
    #define A_DEFAULT 0x020370B8
    
    #define W_SUNNY 0x02
    #define W_CLOUDY 0x0B
    #define W_RAIN 0x03
    #define W_THUNDER 0x0D
    
    #org @Setup
    setvar V_WEATHER 0x01
    setweather W_SUNNY
    doweather
    end
    
    #org @Main
    setvar V_DEFAULT 0x0000
    copybyte A_DEFAULT A_WEATHER //Grabs the default map weather and stores it in V_DEFAULT
    compare V_DEFAULT 0x0F
    if B_<< goto @Quit
    random 0x13 //Create a random value between 0 and 19.
    copyvar V_RANDVAL LASTRESULT
    compare V_WEATHER 0x01
    if B_TRUE goto @CurrentlySunny
    compare V_WEATHER 0x02
    if B_TRUE goto @CurrentlyCloudy
    compare V_WEATHER 0x03
    if B_TRUE goto @CurrentlyRaining
    compare V_WEATHER 0x04
    if B_TRUE goto @CurrentlyStorming
    end
    
    #org @Quit
    end
    
    #org @BecomeSunny
    setweather W_SUNNY
    setvar V_WEATHER 0x01
    doweather
    end
    
    #org @BecomeCloudy
    setweather W_CLOUDY
    setvar V_WEATHER 0x02
    doweather
    end
    
    
    #org @BecomeRaining
    setweather W_RAIN
    setvar V_WEATHER 0x03
    doweather
    end
    
    #org @BecomeStorming
    setweather W_THUNDER
    setvar V_WEATHER 0x04
    doweather
    end
    
    #org @CurrentlySunny
    compare V_RANDVAL 0x01 //10% chance of becoming cloudly.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x02 //5% chance of it raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x13 //85% chance of the weather staying the same.
    if B_<= goto @BecomeSunny
    end
    
    #org @CurrentlyCloudy
    compare V_RANDVAL 0x04 //25% chance of becoming sunny.
    if B_<= goto @BecomeSunny
    compare V_RANDVAL 0x06 //10% chance of it staying cloudy.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x10 //50% chance that it will start raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x13 //15% chance that a thunder storm will start.
    if B_<= goto @BecomeStorming
    end
    
    #org @CurrentlyRaining
    compare V_RANDVAL 0x06 //35% chance that it will keep raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x08 //10% chance of it becoming sunny.
    if B_<= goto @BecomeSunny
    compare V_RANDVAL 0x10 //40% chance that it will become cloudy.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x13 //15% chance that a thunder storm will start.
    if B_<= goto @BecomeStorming
    end
    
    #org @CurrentlyStorming
    compare V_RANDVAL 0x0C //65% chance that it will start raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x0F //15% chance of it becoming cloudy
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x13 //20% chance that the thunder storm will continue.
    if B_<= goto @BecomeStorming
    end
    Quote:
    Originally Posted by 0m3GA ARS3NAL View Post
    Well well well, stuff happened pretty fast!
    I wasn't even here for the initial idea pitch, oh well.
    I've tried out this script a bit on my PSP, and all goes well, well indeed.
    Though I had an idea...
    What about snow?
    I know for a fact that people nowadays have the strangest fascination with snowy maps in a ROM hack, and if someone makes a snowy mountain, how would this random weather be incorporated...
    I guess as of yet one could simply change the "Storm" and "Rain" to things like "3 Snowflakes" and the Ash snow used in R/S/E...
    But that would require compiling a completely different script, and if someone were to cross maps while things are stormy, to a map intended to have the chance of snow, things may get a little buggy.
    If you can come up with the chances of the snow weathers happening then I would have no problem adding it in. I, however, am far too lazy to think of those values up.
    __________________
    あなた は しきしゃ です
    わたし は ばか です
    Reply With Quote
      #34    
    Old January 3rd, 2010 (2:02 AM). Edited January 3rd, 2010 by 0m3GA ARS3NAL.
    0m3GA ARS3NAL's Avatar
    0m3GA ARS3NAL 0m3GA ARS3NAL is offline
    Im comin' home...
    • Silver Tier
     
    Join Date: Jan 2008
    Location: Superjail Penitentiary
    Age: 24
    Gender: Male
    Nature: Gentle
    Posts: 1,812
    Well, the sown weather would be the one thing that would need to change depending on the map itself, what it looks like, I mean, even I could add that in myself, I know my way around a script, what I mean, is the off chance someone decides to want to use this for snow too.
    Adding in a probability wouldn't help one bit, since even then snow could happen in a place such as a beach, or a rain forest, not exactly natural.
    The best thing I can come up with is a variable the user would have to set themselves.... (Aside from @setup, where V_SNOW is set to 0, which can be removed fairly easily)


    Here is a changed script for you to look at, changes in BOLD RED

    Code:
    //----------------------------------------------------------------
    // Natural Weather Script!
    //----------------------------------------------------------------
    // By colcolstyles and Darthatron (3/1/2010)
    // Revised for snow by 0m3GA ARS3NAL (2:15 AM  -8 PST)
    //----------------------------------------------------------------
    // This script will create a system which aims to simulate the
    // "real world" weather by randomly switching between weather
    // effects (sunny, cloudy, raining, and thunderstorm). The odds of
    // a change occurring depend on the current weather (i.e. it is
    // more likely to start raining when it is already cloudy than
    // when it is sunny). However, random weather will only occur if
    // the weather type on the player's current map is set to 0x0F.
    // Because of this, the hacker can make a map use a preset weather
    // condition and be exempt from random weather.  The hacker may
    // now also set Variable 0x7002 to either 0 or 1 do define if the map
    // the player is on will be a normal map, or a snowy one respectively.
    //----------------------------------------------------------------
    
    #erase 0x800000 0xFFF
    #dynamic 0x800000
    
    #define V_DEFAULT 0x8000
    #define V_WEATHER 0x7000  //This must be set to a value between 1 and 5 to work.
    #define V_RANDVAL 0x7001
    #define V_SNOW 0x7002 //Set this to either 0 or 1, 0 to define normal weather, 1 for snow changes
    
    #define A_WEATHER 0x02036E12
    #define A_MAPTYPE 0x02036E13
    #define A_DEFAULT 0x020370B8
    
    #define W_SUNNY 0x02
    #define W_CLOUDY 0x0B
    #define W_RAIN 0x03
    #define W_THUNDER 0x0D
    #define W_SNOW 0x7
    
    #org @Setup
    setvar V_WEATHER 0x01
    setvar V_SNOW 0x0
    setweather W_SUNNY
    doweather
    end
    
    #org @Main
    setvar V_DEFAULT 0x0000
    copybyte A_DEFAULT A_WEATHER //Grabs the default map weather and stores it in V_DEFAULT
    compare V_DEFAULT 0x0F
    if B_<< goto @Quit
    random 0x13 //Create a random value between 0 and 19.
    copyvar V_RANDVAL LASTRESULT
    compare V_WEATHER 0x01
    if B_TRUE goto @CurrentlySunny
    compare V_WEATHER 0x02
    if B_TRUE goto @CurrentlyCloudy
    compare V_WEATHER 0x03
    if B_TRUE goto @CurrentlyRaining
    compare V_WEATHER 0x04
    if B_TRUE goto @CurrentlyStorming
    compare V_WEATHER 0x5
    if B_TRUE goto @CurrentlySnowing
    end
    
    #org @Quit
    end
    
    #org @BecomeSunny
    setweather W_SUNNY
    setvar V_WEATHER 0x01
    doweather
    end
    
    #org @BecomeCloudy
    setweather W_CLOUDY
    setvar V_WEATHER 0x02
    doweather
    end
    
    
    #org @BecomeRaining
    compare V_SNOW 0x1
    if B_TRUE goto @BecomeSnowing
    setweather W_RAIN
    setvar V_WEATHER 0x03
    doweather
    end
    
    #org @BecomeStorming
    compare V_SNOW
    if B_TRUE goto @BecomeSnowing
    setweather W_THUNDER
    setvar V_WEATHER 0x04
    doweather
    end
    
    #org @BecomeSnowing
    setweather W_SNOW
    setvar V_WEATHER 0x5
    doweather
    end
    
    #org @CurrentlySunny
    compare V_RANDVAL 0x01 //10% chance of becoming cloudly.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x02 //5% chance of it raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x13 //85% chance of the weather staying the same.
    if B_<= goto @BecomeSunny
    end
    
    #org @CurrentlyCloudy
    compare V_RANDVAL 0x04 //25% chance of becoming sunny.
    if B_<= goto @BecomeSunny
    compare V_RANDVAL 0x06 //10% chance of it staying cloudy.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x10 //50% chance that it will start raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x13 //15% chance that a thunder storm will start.
    if B_<= goto @BecomeStorming
    end
    
    #org @CurrentlyRaining
    compare V_RANDVAL 0x06 //35% chance that it will keep raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x08 //10% chance of it becoming sunny.
    if B_<= goto @BecomeSunny
    compare V_RANDVAL 0x10 //40% chance that it will become cloudy.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x13 //15% chance that a thunder storm will start.
    if B_<= goto @BecomeStorming
    end
    
    #org @CurrentlyStorming
    compare V_RANDVAL 0x0C //65% chance that it will start raining.
    if B_<= goto @BecomeRaining
    compare V_RANDVAL 0x0F //15% chance of it becoming cloudy
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x13 //20% chance that the thunder storm will continue.
    if B_<= goto @BecomeStorming
    end
    
    #org @CurrentlySnowing
    compare V_RANDVAL 0x2  //15% chance of it becoming cloudy.
    if B_<= goto @BecomeCloudy
    compare V_RANDVAL 0x13 //85% Chance that the snow will continue.
    if b_<== goto @BecomeSnowing
    end
    __________________
    >Boot Jailbot
    >Pass *****
    .
    .
    Jailbot OS Ver 1.1.2
    Greetings Warden
    of Superjail Penitentiary
    Awaiting user input...

    >Display User_Info
    ╠══User Info══╣
    Username:
    0m3GA ARS3NAL
    Age: 18
    Sex: Male ♂
    Race: Caucasian
    Quote:
    "What is this
    I don't even..."

    M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
    ╠══End of File══╣
    Awaiting user input...

    >
    Reply With Quote
      #35    
    Old January 3rd, 2010 (4:01 AM).
    Hiroshi Sotomura's Avatar
    Hiroshi Sotomura Hiroshi Sotomura is online now
    That's Deneb, Altair, and Vega.
    • Developer
    • Crystal Tier
    • GTGet-Together Event Management
    • PokéCommunity Daily
    • Discord Moderoid
     
    Join Date: Nov 2002
    Location: Melbourne, Australia
    Gender: Male
    Nature: Lax
    Posts: 16,940
    I somehow don't find this to be "natural" weather anymore.

    Of note, Matt, will you be calling this script from the header while leaving it modifiable?
    __________________
    On a day just like any other,
    you suddenly stood up and said,
    “Let's go stargazing tonight!”
    Reply With Quote
      #36    
    Old January 3rd, 2010 (6:36 PM).
    colcolstyles's Avatar
    colcolstyles colcolstyles is offline
    Yours truly
    • Crystal Tier
     
    Join Date: May 2008
    Location: The Bay Area
    Gender: Male
    Nature: Lonely
    Posts: 1,584
    Quote:
    Originally Posted by Anthony La View Post
    Of note, Matt, will you be calling this script from the header while leaving it modifiable?
    It was my understanding that the script would be accessed by the ASM routine, making the script modifiable at any time.

    Quote:
    Originally Posted by Anthony La View Post
    Of note, is it fully necessary to define the ONE weather byte that the script activates on AND ensure it doesn't activate in certain areas? Sounds like an unnecessary measure when it's up to the hacker to set which weather byte activates it.
    Actually, interdpth also wanted to get rid of the "check 0xF" part so if you don't want that part in the script either, then can just remove it without harming anything. However, I would argue that the "check 0xF" function is beneficial because it allows a hacker to make a map use a fixed weather condition for a map if they want without having to change the map type to indoors or something like that. It may not be the most realistic if a town always has rain but I could imagine that hackers might enjoy that option.

    Eh, it's really up to you and if you don't want it, then just use the modified script that Darthatron posted.

    Quote:
    Originally Posted by 0m3GA ARS3NAL View Post
    Code:
    //----------------------------------------------------------------
    // condition and be exempt from random weather.  The hacker may
    // now also set Variable 0x7002 to either 0 or 1 do define if the map
    // the player is on will be a normal map, or a snowy one respectively.
    //----------------------------------------------------------------
    
    ...
    Gah! You went over the character limit! My beautiful header text!

    In my opinion, I think snow is just unnecessary. If the only conditions that the script can alter between are "3 snowflakes" and "snowing", it just doesn't seem worth it to me. I think the hacker would be better off setting a fixed condition seeing how they know how the map is going to look and can decide whether light or heavy snow is more realistic.
    __________________

    Brother of Vrai
    Reply With Quote
      #37    
    Old January 3rd, 2010 (7:02 PM).
    altariaking's Avatar
    altariaking altariaking is offline
    Needs NO VMs...
       
      Join Date: Dec 2009
      Location: Scotland, Lesmahagow
      Age: 43
      Gender: Male
      Nature: Naive
      Posts: 1,098
      where do you put the script after compiling it?
      __________________
      http://www.pokecommunity.com/member.php?u=253113
      Reply With Quote
        #38    
      Old January 3rd, 2010 (7:05 PM). Edited January 3rd, 2010 by Darthatron.
      Darthatron's Avatar
      Darthatron Darthatron is offline
      巨大なトロール。
      • Silver Tier
       
      Join Date: Jan 2006
      Location: Melbourne, Australia
      Age: 25
      Gender: Male
      Nature: Modest
      Posts: 1,152
      Quote:
      Originally Posted by colcolstyles View Post
      It was my understanding that the script would be accessed by the ASM routine, making the script modifiable at any time.
      That's what he told me he was going to do.
      Quote:
      Originally Posted by colcolstyles View Post
      In my opinion, I think snow is just unnecessary. If the only conditions that the script can alter between are "3 snowflakes" and "snowing", it just doesn't seem worth it to me. I think the hacker would be better off setting a fixed condition seeing how they know how the map is going to look and can decide whether light or heavy snow is more realistic.
      This.

      Quote:
      Originally Posted by altariaking View Post
      where do you put the script after compiling it?
      Right now, in a level script on every map.
      __________________
      あなた は しきしゃ です
      わたし は ばか です
      Reply With Quote
        #39    
      Old January 3rd, 2010 (7:11 PM).
      0m3GA ARS3NAL's Avatar
      0m3GA ARS3NAL 0m3GA ARS3NAL is offline
      Im comin' home...
      • Silver Tier
       
      Join Date: Jan 2008
      Location: Superjail Penitentiary
      Age: 24
      Gender: Male
      Nature: Gentle
      Posts: 1,812
      Quote:
      Originally Posted by colcolstyles View Post
      In my opinion, I think snow is just unnecessary. If the only conditions that the script can alter between are "3 snowflakes" and "snowing", it just doesn't seem worth it to me. I think the hacker would be better off setting a fixed condition seeing how they know how the map is going to look and can decide whether light or heavy snow is more realistic.
      Meh, just a suggestion you know, if someone wanted snow to happen, it could.
      (Besides, I decided not to include 3 Snowflakes, since it isn't exactly... ideal, so to speak.)
      The 3 Snowflakes weather is odd, and only seems to work half the time.

      I do agree though, snow is a bit unnecessary, just thought I would include it for anyone who wants it. (And I know, someone out there wants a more natural snow, lol)
      If only we could make MORE weather types...
      __________________
      >Boot Jailbot
      >Pass *****
      .
      .
      Jailbot OS Ver 1.1.2
      Greetings Warden
      of Superjail Penitentiary
      Awaiting user input...

      >Display User_Info
      ╠══User Info══╣
      Username:
      0m3GA ARS3NAL
      Age: 18
      Sex: Male ♂
      Race: Caucasian
      Quote:
      "What is this
      I don't even..."

      M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
      ╠══End of File══╣
      Awaiting user input...

      >
      Reply With Quote
        #40    
      Old January 3rd, 2010 (8:59 PM).
      altariaking's Avatar
      altariaking altariaking is offline
      Needs NO VMs...
         
        Join Date: Dec 2009
        Location: Scotland, Lesmahagow
        Age: 43
        Gender: Male
        Nature: Naive
        Posts: 1,098
        whenever I try to compile it says missing define
        __________________
        http://www.pokecommunity.com/member.php?u=253113
        Reply With Quote
          #41    
        Old January 5th, 2010 (3:59 PM).
        Megiddo-san's Avatar
        Megiddo-san Megiddo-san is offline
        Barium - Summer '12 Return?
           
          Join Date: Dec 2007
          Location: Where you least expect it
          Age: 25
          Gender: Male
          Nature: Relaxed
          Posts: 1,329
          Are these the correct settings for implementation? 1. Use offset of @main 2. Use an 01 setmaptile script 3. Set map weather to 0F I haven't gotten it to do anything yet. Probably some key detail I missed.
          __________________

          Hashire! Asu e tsudzuku shinka no micha wa
          Reply With Quote
            #42    
          Old January 12th, 2010 (9:23 PM).
          colcolstyles's Avatar
          colcolstyles colcolstyles is offline
          Yours truly
          • Crystal Tier
           
          Join Date: May 2008
          Location: The Bay Area
          Gender: Male
          Nature: Lonely
          Posts: 1,584
          Quote:
          Originally Posted by megiddo View Post
          Are these the correct settings for implementation? 1. Use offset of @main 2. Use an 01 setmaptile script 3. Set map weather to 0F I haven't gotten it to do anything yet. Probably some key detail I missed.
          Remember to initialize the weather variable (0x7000) to either 0x2, 0xB, 0x3, or 0xD (sunny, cloudy, raining, and thunderstorm respectively).

          So how's the ASM part of this idea coming along? Last time I checked, interdpth said that he was going to add a "hook" to the routine that runs every time a map loads. Is that still the plan? And if so, how is progress on that so far?
          __________________

          Brother of Vrai
          Reply With Quote
            #43    
          Old January 12th, 2010 (10:10 PM).
          Darthatron's Avatar
          Darthatron Darthatron is offline
          巨大なトロール。
          • Silver Tier
           
          Join Date: Jan 2006
          Location: Melbourne, Australia
          Age: 25
          Gender: Male
          Nature: Modest
          Posts: 1,152
          Quote:
          Originally Posted by colcolstyles View Post
          Remember to initialize the weather variable (0x7000) to either 0x2, 0xB, 0x3, or 0xD (sunny, cloudy, raining, and thunderstorm respectively).
          It should actually be between 1 and 4, as stated in the comments on the line that defines the variable.
          __________________
          あなた は しきしゃ です
          わたし は ばか です
          Reply With Quote
            #44    
          Old January 12th, 2010 (10:15 PM).
          0m3GA ARS3NAL's Avatar
          0m3GA ARS3NAL 0m3GA ARS3NAL is offline
          Im comin' home...
          • Silver Tier
           
          Join Date: Jan 2008
          Location: Superjail Penitentiary
          Age: 24
          Gender: Male
          Nature: Gentle
          Posts: 1,812
          Quote:
          Originally Posted by Darthatron View Post
          It should actually be between 1 and 4, as stated in the comments on the line that defines the variable.
          OR 5 if the person is using the snow modded one! lol...
          __________________
          >Boot Jailbot
          >Pass *****
          .
          .
          Jailbot OS Ver 1.1.2
          Greetings Warden
          of Superjail Penitentiary
          Awaiting user input...

          >Display User_Info
          ╠══User Info══╣
          Username:
          0m3GA ARS3NAL
          Age: 18
          Sex: Male ♂
          Race: Caucasian
          Quote:
          "What is this
          I don't even..."

          M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
          ╠══End of File══╣
          Awaiting user input...

          >
          Reply With Quote
            #45    
          Old January 13th, 2010 (8:29 PM).
          Megiddo-san's Avatar
          Megiddo-san Megiddo-san is offline
          Barium - Summer '12 Return?
             
            Join Date: Dec 2007
            Location: Where you least expect it
            Age: 25
            Gender: Male
            Nature: Relaxed
            Posts: 1,329
            Ah, gotcha. I'll try that.
            __________________

            Hashire! Asu e tsudzuku shinka no micha wa
            Reply With Quote
              #46    
            Old January 14th, 2010 (12:48 PM). Edited January 14th, 2010 by Powerflare.
            Powerflare's Avatar
            Powerflare Powerflare is offline
            • Silver Tier
             
            Join Date: May 2008
            Age: 20
            Gender: Male
            Nature: Rash
            Posts: 112
            Think you could make a video tutorial on this? I think it'd help me a bit more as I am having a bit of trouble understanding exactly how to do this.

            ----------------------------------------------------
            Also....

            Quote:
            Originally Posted by Darthatron View Post
            You make a valid point. It's not difficult to simply get rid of that check, as it's only 3 lines. Here is an updated version for you:
            Code:
            //----------------------------------------------------------------
            // Natural Weather Script!
            //----------------------------------------------------------------
            // By colcolstyles and Darthatron (3/1/2010)
            //----------------------------------------------------------------
            // This script will create a system which aims to simulate the
            // "real world" weather by randomly switching between weather
            // effects (sunny, cloudy, raining, and thunderstorm). The odds of
            // a change occurring depend on the current weather (i.e. it is
            // more likely to start raining when it is already cloudy than
            // when it is sunny). However, random weather will only occur if
            // the weather type on the player's current map is set to 0x0F.
            // Because of this, the hacker can make a map use a preset weather
            // condition and be exempt from random weather.
            //----------------------------------------------------------------
            
            #erase 0x800000 0xFFF
            #dynamic 0x800000
            
            #define V_DEFAULT 0x8000
            #define V_WEATHER 0x7000  //This must be set to a value between 1 and 4 to work.
            #define V_RANDVAL 0x7001
            
            #define A_WEATHER 0x02036E12
            #define A_MAPTYPE 0x02036E13
            #define A_DEFAULT 0x020370B8
            
            #define W_SUNNY 0x02
            #define W_CLOUDY 0x0B
            #define W_RAIN 0x03
            #define W_THUNDER 0x0D
            
            #org @Setup
            setvar V_WEATHER 0x01
            setweather W_SUNNY
            doweather
            end
            
            #org @Main
            setvar V_DEFAULT 0x0000
            copybyte A_DEFAULT A_WEATHER //Grabs the default map weather and stores it in V_DEFAULT
            compare V_DEFAULT 0x0F
            if B_<< goto @Quit
            random 0x13 //Create a random value between 0 and 19.
            copyvar V_RANDVAL LASTRESULT
            compare V_WEATHER 0x01
            if B_TRUE goto @CurrentlySunny
            compare V_WEATHER 0x02
            if B_TRUE goto @CurrentlyCloudy
            compare V_WEATHER 0x03
            if B_TRUE goto @CurrentlyRaining
            compare V_WEATHER 0x04
            if B_TRUE goto @CurrentlyStorming
            end
            
            #org @Quit
            end
            
            #org @BecomeSunny
            setweather W_SUNNY
            setvar V_WEATHER 0x01
            doweather
            end
            
            #org @BecomeCloudy
            setweather W_CLOUDY
            setvar V_WEATHER 0x02
            doweather
            end
            
            
            #org @BecomeRaining
            setweather W_RAIN
            setvar V_WEATHER 0x03
            doweather
            end
            
            #org @BecomeStorming
            setweather W_THUNDER
            setvar V_WEATHER 0x04
            doweather
            end
            
            #org @CurrentlySunny
            compare V_RANDVAL 0x01 //10% chance of becoming cloudly.
            if B_<= goto @BecomeCloudy
            compare V_RANDVAL 0x02 //5% chance of it raining.
            if B_<= goto @BecomeRaining
            compare V_RANDVAL 0x13 //85% chance of the weather staying the same.
            if B_<= goto @BecomeSunny
            end
            
            #org @CurrentlyCloudy
            compare V_RANDVAL 0x04 //25% chance of becoming sunny.
            if B_<= goto @BecomeSunny
            compare V_RANDVAL 0x06 //10% chance of it staying cloudy.
            if B_<= goto @BecomeCloudy
            compare V_RANDVAL 0x10 //50% chance that it will start raining.
            if B_<= goto @BecomeRaining
            compare V_RANDVAL 0x13 //15% chance that a thunder storm will start.
            if B_<= goto @BecomeStorming
            end
            
            #org @CurrentlyRaining
            compare V_RANDVAL 0x06 //35% chance that it will keep raining.
            if B_<= goto @BecomeRaining
            compare V_RANDVAL 0x08 //10% chance of it becoming sunny.
            if B_<= goto @BecomeSunny
            compare V_RANDVAL 0x10 //40% chance that it will become cloudy.
            if B_<= goto @BecomeCloudy
            compare V_RANDVAL 0x13 //15% chance that a thunder storm will start.
            if B_<= goto @BecomeStorming
            end
            
            #org @CurrentlyStorming
            compare V_RANDVAL 0x0C //65% chance that it will start raining.
            if B_<= goto @BecomeRaining
            compare V_RANDVAL 0x0F //15% chance of it becoming cloudy
            if B_<= goto @BecomeCloudy
            compare V_RANDVAL 0x13 //20% chance that the thunder storm will continue.
            if B_<= goto @BecomeStorming
            end
            If you can come up with the chances of the snow weathers happening then I would have no problem adding it in. I, however, am far too lazy to think of those values up.
            That script you have there, where exactly do you put that in the game? Or do you just compile it... I'm such a n00b.
            Reply With Quote
              #47    
            Old January 14th, 2010 (8:20 PM).
            Darthatron's Avatar
            Darthatron Darthatron is offline
            巨大なトロール。
            • Silver Tier
             
            Join Date: Jan 2006
            Location: Melbourne, Australia
            Age: 25
            Gender: Male
            Nature: Modest
            Posts: 1,152
            Quote:
            Originally Posted by Powerflare View Post
            Think you could make a video tutorial on this? I think it'd help me a bit more as I am having a bit of trouble understanding exactly how to do this.

            ----------------------------------------------------
            Also....



            That script you have there, where exactly do you put that in the game? Or do you just compile it... I'm such a n00b.
            Compile it anywhere, then put it in a level script.
            __________________
            あなた は しきしゃ です
            わたし は ばか です
            Reply With Quote
              #48    
            Old January 14th, 2010 (8:46 PM).
            rockeymon's Avatar
            rockeymon rockeymon is offline
            Real life Silver Shirubaa
               
              Join Date: Nov 2007
              Location: Mahora Academy.
              Nature: Serious
              Posts: 229
              Um so question.
              1.) Is this open to the public
              2.) What is a level script
              3.) Where do you put it on a map
              4.) Can you use xse and Am1.92 to insert it into the game?
              __________________
              PalPad Info:
Name: Soul
FC: 5242 9096 3237
              Reply With Quote
                #49    
              Old January 14th, 2010 (10:25 PM).
              colcolstyles's Avatar
              colcolstyles colcolstyles is offline
              Yours truly
              • Crystal Tier
               
              Join Date: May 2008
              Location: The Bay Area
              Gender: Male
              Nature: Lonely
              Posts: 1,584
              Quote:
              Originally Posted by rockeymon View Post
              Um so question.
              1.) Is this open to the public
              2.) What is a level script
              3.) Where do you put it on a map
              4.) Can you use xse and Am1.92 to insert it into the game?
              1) Not technically
              2) This isn't the place to be asking that
              3) I don't really feel like explaining
              4) Yes but, as I said, it's not finished yet. If you wait a little longer, there will be a patch that won't require using XSE or AdvanceMap to use :)
              __________________

              Brother of Vrai
              Reply With Quote
                #50    
              Old January 15th, 2010 (2:22 PM).
              Powerflare's Avatar
              Powerflare Powerflare is offline
              • Silver Tier
               
              Join Date: May 2008
              Age: 20
              Gender: Male
              Nature: Rash
              Posts: 112
              Quote:
              Originally Posted by Darthatron View Post
              Compile it anywhere, then put it in a level script.
              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?
              Reply With Quote
              Reply

              Quick Reply

              Join the conversation!

              Create an account to post a reply in this thread, participate in other discussions, and more!

              Create a PokéCommunity Account

              Sponsored Links
              Thread Tools

              Posting Rules
              You may not post new threads
              You may not post replies
              You may not post attachments
              You may not edit your posts

              BB code is On
              Smilies are On
              [IMG] code is On
              HTML code is Off

              Forum Jump


              All times are GMT -8. The time now is 4:10 AM.