• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Status
Not open for further replies.
25
Posts
16
Years
  • Yeah, swarming shouldn't be too difficult to implement (although as with Burmy's alternate forms, it will vary from game to game which species swarm and where they do so).

    Define a variable (e.g. 42 - "Swarmers"), where a value of 0 for that variable means "nothing swarming", a "1" means Rattata are swarming on Route 17, a "2" means Nidoran male are swarming on Route 3, etc. Plan all that out first.

    Then go into PokemonEncounters and edit the def pbEncounteredPokemon to add a line like:

    Code:
    return [PBSpecies::RATTATA,15] if rnd[9]<3 && $game_variables[42]==1 && $game_map.map_id==17 && enctype==0
    Put that near the top, just after the "return nil if etc." line, and put similar lines like it there as well for each of the other swarming species/locations. (You can expand on this to give the swarmer a range of levels to choose from.)

    The example line there gives a 30% chance of encountering a Level 15 Rattata, and a 70% chance of "choose a random Pokémon native to the current map as usual" otherwise. It will only do this if game variable 42 equals 1, the player is currently on map number 17 and it's looking for a tall grass encounter.

    All that's left after that is to change game variable 42 to a different number depending on whatever (whether it's random each day, triggered by an event, etc.). I'll leave that to you to figure out.

    After that, you can use the game variable value to decide what's swarming, and to generate a relevant TV broadcast.

    Is it possible to do this as an array such as:
    swarms=[[17,PBSpecies::RATTATA,10,15],[18,PBSpecies::NIDORANmA,10,15],...]
    (ie [map id, species, min level, max level])

    And then pick a random map that will reset each day (unsure how to do this):
    swarmData=swarms[rand(swarms.size)]

    And then do something along the lines of:
    if rnd[9]<3 && $game_variables[42]==1 && $game_map.map_id==swarmData[0] && enctype==0
    return [PBSpecies::swarmData[1],rand(swarmData[3]-swarmData[2])+swarmData[2]]
    else

    I have no idea how to piece it all together though...any assistance? Also sorry if my syntax is bad, it was meant to be more of pseudocode as my ruby is sketchy at best and I've been busy with beginning java lately so I had a hard time not thinking in java.
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Is it possible to do this as an array such as:
    swarms=[[17,PBSpecies::RATTATA,10,15],[18,PBSpecies::NIDORANmA,10,15],...]
    (ie [map id, species, min level, max level])

    And then pick a random map that will reset each day (unsure how to do this):
    swarmData=swarms[rand(swarms.size)]

    And then do something along the lines of:
    if rnd[9]<3 && $game_variables[42]==1 && $game_map.map_id==swarmData[0] && enctype==0
    return [PBSpecies::swarmData[1],rand(swarmData[3]-swarmData[2])+swarmData[2]]
    else

    I have no idea how to piece it all together though...any assistance? Also sorry if my syntax is bad, it was meant to be more of pseudocode as my ruby is sketchy at best and I've been busy with beginning java lately so I had a hard time not thinking in java.
    Anything's possible. Although I think what you suggested is rather more fiddly and doesn't really offer anything new (level ranges can be easily added to what I said, like "15+rnd(3)" means a range of 15-17).

    Also, your suggestion seems to ignore which game variable you're using. The variable is useful for deciding (randomly) which map has swarming going on. And you only have swarming going on in grass. I don't know whether you'd want Goldeen swarms or whatever.

    Code:
    swarmers=[
           [17,0,PBSpecies::SENTRET,14,18],
           [23,2,PBSpecies::FEEBAS,12,15]
    ]
    swarmtoday=swarmers[$game_variables[42]-1]
    if swarmtoday
     if rnd[9]<3 && $game_map.map_id==swarmtoday[0] && enctype==swarmtoday[1]
       return [swarmtoday[2],swarmtoday[3]+rand(swarmtoday[4]-swarmtoday[3])]
     end
    end
    The array is set up as [map ID, encounter type, species, min level, max level]. That should take care of everything.

    This will, however, only allow one species to swarm in one map at a time. You cannot, say, make Feebas appear on all the fishing rods at the same time (at least, not simply). And at the moment, this code means a fixed probability of 30% of encountering the swarm Pokémon; you may want to change that for some species (e.g. really rare swarming Pokémon have a 5% chance of encounter instead).

    As I said, you then have to figure out how to change game variable 42 once per day (presumably at midnight, and presumably to a random number).


    Thanks a heap guys, anyone have any idea about a variable which holds the current time?
    Time.now.hour and Time.now.min are your friends. Shove a colon between the two, put it in a message, and you have your time.
     
    25
    Posts
    16
    Years
  • @Maruno
    Actually what you just wrote is exactly what I was looking for. I wanted it so that only one map per day has a swarm and I was also planning on making it so that you used surf instead of fishing (because it'd make more sense on the maps that are 90% water). Like I said what I wrote was more of a pseudocode. Just one question, why is the $game_variables[42]-1 needed? Couldn't you just do swarms[rand(swarms.size)]? Wait, nm, you'd need a way to change it each day and using a variable would work. The variable would be the size of the array though correct?

    EDIT:
    Is "if swarmtoday" a typo? Because I don't see how it does anything.
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    @Maruno
    Actually what you just wrote is exactly what I was looking for. I wanted it so that only one map per day has a swarm and I was also planning on making it so that you used surf instead of fishing (because it'd make more sense on the maps that are 90% water). Like I said what I wrote was more of a pseudocode. Just one question, why is the $game_variables[42]-1 needed? Couldn't you just do swarms[rand(swarms.size)]? Wait, nm, you'd need a way to change it each day and using a variable would work. The variable would be the size of the array though correct?

    EDIT:
    Is "if swarmtoday" a typo? Because I don't see how it does anything.
    $game_variables[42]-1 determines which line of the swarmers array is used. If variable 42 equals 1, then the first line (line 0 - Sentret) will be used, and so on. There are no swarmers if variable 42 equals 0, which allows you to turn it off if necessary/until a certain point in the game.

    When you change variable 42 (once per day, presumably at midnight), you'll need to use something like "rnd(16)+1" (between 1 and 16, where 16 is the total number of different swarmers you have) - you won't be able to use "swarmers.length"because you'll be changing variable 42 in a different part of the scripts/in an event/whatever.

    "if swarmtoday" checks whether there's anything in swarmtoday or not (it'd be nil if variable 42 equalled 0 (swarming disabled), because there's no "-1" line in the swarmers array to put into it).
     

    Delusions of Originality

    good night, sleep tight
    108
    Posts
    14
    Years
    • Age 35
    • Seen Apr 17, 2024
    Still haven't had much luck trying to fix the frontier scripts (and now it looks like there's something new broken in the latest release :/), but I guess I'll just have to keep plugging away at them. In the meantime, though, I have a quick question about extendtext.exe. I mentioned in a previous post that it didn't seem to work on my Ubuntu partition and that I'd try it again when I switched back into the Windows one. I just tried running it now, but it doesn't seem to be doing anything this time, either. The extendtext.exe process is still running, so I'm curious--is it supposed to do that? Does it take a while for there to be any appreciable effect? Or is mine broken/am I doing something wrong? I suppose I don't need it what with the workaround Maruno showed me earlier, but this seems odd.
     

    Delusions of Originality

    good night, sleep tight
    108
    Posts
    14
    Years
    • Age 35
    • Seen Apr 17, 2024
    I have an unedited backup copy of the January 9th and September 5th versions from last year, and I could send one to you if you like, but as I haven't explored them in depth or in a long time I don't know that they aren't just buggy in other ways. Is there anything specific you find buggy in the recent versions that you think worked in an older one? Are there any relatively new features you know you need/don't need? That might help us figure out how far back you'd need to go.
     

    KitsuneKouta

    狐 康太
    442
    Posts
    14
    Years
    • Seen Nov 20, 2017
    In Sprite_Character, how can I get the string stored in @character_name for comparisons? I'm working with string comparisons to alter a graphic depending on event names, however the comparison only returns true when I use an empty string "" (which is only used to return true or false depending on whether or not it is a string, instead of checking the specific characters in the string). I've tried a few things, like .eql?, and .include?, but so far it never returns true when comparing @character_name to a defined string (such as "item1" or "funiture1").
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    In Sprite_Character, how can I get the string stored in @character_name for comparisons? I'm working with string comparisons to alter a graphic depending on event names, however the comparison only returns true when I use an empty string "" (which is only used to return true or false depending on whether or not it is a string, instead of checking the specific characters in the string). I've tried a few things, like .eql?, and .include?, but so far it never returns true when comparing @character_name to a defined string (such as "item1" or "funiture1").
    Have you tried something like "@character_name=="Dave""?
     

    MistTribe

    Member of the Mist Tribe.
    33
    Posts
    18
    Years
  • I have an unedited backup copy of the January 9th and September 5th versions from last year, and I could send one to you if you like, but as I haven't explored them in depth or in a long time I don't know that they aren't just buggy in other ways. Is there anything specific you find buggy in the recent versions that you think worked in an older one? Are there any relatively new features you know you need/don't need? That might help us figure out how far back you'd need to go.

    Well if you could, can you PM me both versions? :) I'll try them both.


    And I have an April 12th, March 15th, and November 24th version(s) if you're interested. o.o

    Can you send me your three versions too?
     

    KitsuneKouta

    狐 康太
    442
    Posts
    14
    Years
    • Seen Nov 20, 2017
    Have you tried something like "@character_name=="Dave""?
    Yeah, that was the first thing I tried. If I use @character_name="Dave" instead, it always returns true, since it's an assignment. Maybe I need to clarify more. In Sprite_Character, line 91, the character image of an event is specified. Normally, it's just the image directory [email protected]_name, but I want to assign the image by a variable depending on the name of the event. I'm fairly sure that @character_name is the name of the event, since that's what it uses to display the appropriate image.
     

    np7261

    Exceeding Excpectations
    57
    Posts
    15
    Years
  • Time.now.hour and Time.now.min are your friends. Shove a colon between the two, put it in a message, and you have your time.

    Thanks Maruno. Unfortunately it isn't working.
    I put Time.now.hour into a message and it shows just that. I have tried putting a slash before it, putting it in brackets, leaving spaces on either side and still it only comes up with Time.now.hour
     

    Luka S.J.

    Jealous Croatian
    1,270
    Posts
    15
    Years
  • Thanks Maruno. Unfortunately it isn't working.
    I put Time.now.hour into a message and it shows just that. I have tried putting a slash before it, putting it in brackets, leaving spaces on either side and still it only comes up with Time.now.hour

    This is the way you should use the text functions. The _INTL function is your friend. You really should take on some scripting tutorials or at least read the notes if trying to edit or make a script. The notes explain most of the frequently asked questions, and there is a whole nice section about Essential's text system.

    Code:
    _INTL("{1}",Time.now.hour),x-coordinates,y-coordinates,[B]true/false[/B],baseColor,shadowColor

    The method in bold, defines the way the font is drawn. False = drawn from left to right starting at the x-coordinate. True = drawn from right to left starting at the x-coordinate.
     

    Kaylee Krysteenah Fynch

    is rarely here
    302
    Posts
    16
    Years
  • So, I don't know if anyone here would know a way to get a dependent event to speed up when you're running? The point of having your Pokémon follow you is sort of lost if you're always outrunning them... *imagines a trainer outrunning their completely apathetic Rapidash* DX

    I tried a couple things, but even when I got no error, it simply did nothing at all.
     

    zingzags

    PokemonGDX creator
    536
    Posts
    15
    Years
  • So, I don't know if anyone here would know a way to get a dependent event to speed up when you're running? The point of having your Pokémon follow you is sort of lost if you're always outrunning them... *imagines a trainer outrunning their completely apathetic Rapidash* DX

    I tried a couple things, but even when I got no error, it simply did nothing at all.

    Mines work just fine, they run at the same speed as i do o.o, but I have 2 problems with the script, I want the pokemon to come out after a few frames, like pokemon one comes out, wait like 10 frames and then two does
     

    Kaylee Krysteenah Fynch

    is rarely here
    302
    Posts
    16
    Years
  • Um? I'm making my own script, not using the one(s?) that's already out there. I have my reasons for this - one of them being I want only one following poké, though that's not the only reason.

    Also, I'm using a somewhat older version of essentials, so perhaps the running/dependent events thing has been fixed in a newer release?
     

    Delusions of Originality

    good night, sleep tight
    108
    Posts
    14
    Years
    • Age 35
    • Seen Apr 17, 2024
    I have a quick question about extendtext.exe. I mentioned in a previous post that it didn't seem to work on my Ubuntu partition and that I'd try it again when I switched back into the Windows one. I just tried running it now, but it doesn't seem to be doing anything this time, either. The extendtext.exe process is still running, so I'm curious--is it supposed to do that? Does it take a while for there to be any appreciable effect? Or is mine broken/am I doing something wrong? I suppose I don't need it what with the workaround Maruno showed me earlier, but this seems odd.

    Does anyone have any insight on this?
     
    Status
    Not open for further replies.
    Back
    Top