• 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.

Scripts & Tutorials Requests

Status
Not open for further replies.

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Anyone have an idea on getting swarms to work? Some examples of this include people calling you in GSC about a rare pokemon in an area or in D/P where Lucas/Dawn's sister will tell you that a swarm of Pokemon have appeared on a route. It changes daily.

I imagine this could be worked out in events but there may be a cleaner way to pull this off.
First you need a list of possible swarms. Species, level range, maps to be found on, encounter types to be found via. It's up to you if you want to make it more complicated (e.g. multiple maps/species/encounter types in a single swarm event). You can (should) put all this information in an array in some script section.

Next you want a way to decide which swarm to use on a particular day. It should be random yet always the same for a given day. The Lottery mini-game's winning number works like this, so copy it and use it to choose the swarm.

Then you want to change the appropriate wild encounters depending on the swarm's details. I understand there's a flat 40% rate of an encounter being a swarm's encounter (if possible), and 60% chance of a regular encounter, so that's a nice and simple number to work with. Go to the script which decides which species to encounter, get the day's swarm's details, and if the map/encounter method matches and rand(100)<40, set the species and level according to the swarm's details; otherwise pick the encountered species normally.

That's it.

You can enhance this feature by only making it work if a particular switch is on (e.g. the "Got National Dex" one).

Getting someone to tell you about the swarm is a bit of extra work. It's easiest to make an event tell you, because phone calls are a bit trickier to modify (although it is possible). Here, just get the day's swarm's details again, shove the name of the species and the name of the map it's on into variables, and insert those variables into the event's speech. You can get all fancy with this, of course.
 
67
Posts
12
Years
G'Day, I was wondering if it is possible to (silently) control the storage system by using a script of some sort. For instance, in my game, the player got separated from a few of his Pokemon at some point in the game, and at that time you can't use the computer. The only script I know of is to completely delete the Pokemon in question, which of course, is not meant to happen. So is it possible to, let say, use a script to silently store a pokemon in one of the storage boxes by event, and later withdraw it again?
 

FL

Pokémon Island Creator
2,442
Posts
13
Years
  • Seen Apr 13, 2024
G'Day, I was wondering if it is possible to (silently) control the storage system by using a script of some sort. For instance, in my game, the player got separated from a few of his Pokemon at some point in the game, and at that time you can't use the computer. The only script I know of is to completely delete the Pokemon in question, which of course, is not meant to happen. So is it possible to, let say, use a script to silently store a pokemon in one of the storage boxes by event, and later withdraw it again?
Force pokemon to PC Box (silently)
 

Nickalooose

--------------------
1,309
Posts
16
Years
  • Seen Dec 28, 2023
G'Day, I was wondering if it is possible to (silently) control the storage system by using a script of some sort. For instance, in my game, the player got separated from a few of his Pokemon at some point in the game, and at that time you can't use the computer. The only script I know of is to completely delete the Pokemon in question, which of course, is not meant to happen. So is it possible to, let say, use a script to silently store a pokemon in one of the storage boxes by event, and later withdraw it again?

The easiest way I know how to do this (and is the way I would do this), is not worry about the storage at all... Variables are your friend here.

So for arguments sake, I'm going to say I want all 6 of my Pokémon in my team completely removed from the game, BUT, returned back to me later on (you must remember to add them back).

First thing I would do is set 6 Variables (since I can control every Pokémon then)... So I've chosen Variables 1-6 (choose your own)... Next, let's add our Pokémon to them... Using 6 script events:
$game_variables[1]=$Trainer.party[0]
$game_variables[2]=$Trainer.party[1]
$game_variables[3]=$Trainer.party[2]
$game_variables[4]=$Trainer.party[3]
$game_variables[5]=$Trainer.party[4]
$game_variables[6]=$Trainer.party[5]


Then, remove them from the game, using another 6 script events:
pbRemovePokemonAt(0)
pbRemovePokemonAt(0)
pbRemovePokemonAt(0)
pbRemovePokemonAt(0)
pbRemovePokemonAt(0)
pbRemovePokemonAt(0)


It's that simple.

To re-add them later, just use, in another 6 script events:
pbAddPokemonSilent(pbGet(1))
pbAddPokemonSilent(pbGet(2))
pbAddPokemonSilent(pbGet(3))
pbAddPokemonSilent(pbGet(4))
pbAddPokemonSilent(pbGet(5))
pbAddPokemonSilent(pbGet(6))


There you go, the illusion of a runaway Pokémon and the uses of variables, plus, no scripting involved.
Use it, love it, learn it.

REMEMBER:
Do not have any other Pokémon in your team if you use this method... I'm not sure if it will overwrite any Pokémon or just not add the ones you've deleted.
 
67
Posts
12
Years
Thanks heaps Nickalooose, it worked exact the way I wanted! I was too focused on using the storage system as I was afraid using a variable would completely reset or delete the individual Pokemon's data or moves and like. But it worked perfect!

Maybe you (or someone else) would be able to help me with another matter as well. Probably another simple event script, but is it possible to have a wild Pokemon battle against one wild Pokemon whereas the player uses two battlers himself. Like a two against one battle! I want to use this for Legendary/strong wild opponents.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Thanks heaps Nickalooose, it worked exact the way I wanted! I was too focused on using the storage system as I was afraid using a variable would completely reset or delete the individual Pokemon's data or moves and like. But it worked perfect!
One addendum I'd like to make is that you should use $game_variables which aren't used for anything else. The first 25 are either used for things or reserved, so don't use them.
 
67
Posts
12
Years
I used the variables after number 45 to be on the sure. I make a game with a similar gameplay as Pokemon Colosseum, so where catching numerous Pokemon is not really part of the main story. All battles are Double Battles, and indeed with Espeon and Umbreon as the two starters. For some Legendary encounters I would like to use this double battle style only then against one (wild) opponent. It's probably quite easy to do so, but I am not a real expert on the blind scripting. Would someone be able to help me out a little?
 
16
Posts
14
Years
  • Seen Sep 1, 2013
After searching the wiki, Google, and looking through the script editor in RMXP, I have been able to add a custom font, but this font is little too big. I remember seeing a way to make it smaller, but it has to be done each time the font is used.

Is there any way to permanently make the font smaller?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Font and font size-related methods can be found in SpriteWindow, beginning with def pbSetSystemFont (line 1705). That and the few methods below it should help.
 
16
Posts
14
Years
  • Seen Sep 1, 2013
Alright, that worked! However, now I can't seem to figure out how to make my new font the default font. For some reason, no matter what I do the game defaults to the Firered/Leafgreen font. How could I set my new font as the default font?

Also, if possible would I be able to make it so said font appear in the places where switching fonts doesn't change anything? (Like the new game/continue screen's summary and in Attack names)
 
Last edited:

FL

Pokémon Island Creator
2,442
Posts
13
Years
  • Seen Apr 13, 2024
Alright, that worked! However, now I can't seem to figure out how to make my new font the default font. For some reason, no matter what I do the game defaults to the Firered/Leafgreen font. How could I set my new font as the default font?

Also, if possible would I be able to make it so said font appear in the places where switching fonts doesn't change anything? (Like the new game/continue screen's summary and in Attack names)
To change the default font, change the 'FontName' at SpriteWindow (but remember to add the font to $VersionStyles array if you wants FrLg font in your game)

To change the default font in some screens, look at def drawMarkings in PokemonSummary script section. This method change the font to Arial to draw the markings.
 

Unknown#

'Cause why not?
457
Posts
13
Years
I also have been having a small font problem: I need to change the font that attack names appear in. I have managed to get my new font everywhere, except for the attack names (in battle, anyways).
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
I also have been having a small font problem: I need to change the font that attack names appear in. I have managed to get my new font everywhere, except for the attack names (in battle, anyways).
Move names and PP in the battle's "choose a move" part use whatever the narrow font is. Check class FightMenuButtons for the reference to narrow fonts.
 

Harvey_Create

Pokemon Apex Team Member
187
Posts
11
Years
  • Age 27
  • Iowa
  • Seen Jul 12, 2015
I was curious if anyone had a Better Perspective type Map mode. One that looks a bit less flat. Or a way to make Trees and building look more like HGSS 3D. It really isnt a big deal for the HGSS 3D, but Perspective is basically stretching the bottom and squezing the top of the screen. I want trees and building to maintain a more "Normal" flow. Its kind of hard to explain. THhe only Thing I can think of as to how to do this, Is make another Terrain Tag, and have it scripted out to ignore the perspective tilemapping. I dont know. Probably not correct, but yea. I really need to Study RGSS

I am not asking for "FREE SCRIPTZ" rather, a bit of pushing me to learn how to do these things. I have a list of things I would like to implement, but don't know RGSS, so this will attempt to teach me a bit.

Here is my list of things.
  1. HUD telling you what Route or Town you are on, and showing you your pokemons Status.
  2. "Reuse" Items. Repel just wore off, Would you like to use another? And Unlimited potion using for out of battle.
  3. A newer Pause Menu. With a drop down window, and Iconized Options.
  4. Help with repositioning for a New Resolution. We are switching to 640x400
  5. A "Better" Perspective map mode. Something that make the map less flat, And make certain objects/tiles ignore the map mode.
  6. How to do a Gym Leader event that makes you have to challange him twice, the first losing, but not Fainting, rather, making you go to the PokeCenter, and then trigger a Special Event for a Guy to talk to you. THEN go back to fight the Leader.
  7. More to come, I just can;t think right now.

Yes, I know my list is Huge. I basically want a Mentor to help me learn to script. And point me in the right Direction with my issues.​
 
Last edited by a moderator:

SinfulGuroRose

Ignore me, I'm socially inept.
77
Posts
10
Years
Okay, so I'd like to start off with the fact that I know jack diddly about RGSS. U wU; So far, when editing scripts, I've really just gone off of my intuition and the script examples around me and I've miraculously not completely ruined everything. But that's besides the point.

I'd like to implement Light Pokémon into my game, which are have the same elements as Shadow Pokémon, just a different story to them. Can someone point me in the direction to do this, and also on how to get the 'light' sprites to be added correctly?

And while I'm at it, would anyone know how to make it so a Shadow(/Light) Pokémon could gain EXP and level up, while growing marginally more disobedient to the trainer (like a traded Pokémon)?
 

Nickalooose

--------------------
1,309
Posts
16
Years
  • Seen Dec 28, 2023
I was curious if anyone had a Better Perspective type Map mode. One that looks a bit less flat. Or a way to make Trees and building look more like HGSS 3D. It really isnt a big deal for the HGSS 3D, but Perspective is basically stretching the bottom and squezing the top of the screen. I want trees and building to maintain a more "Normal" flow. Its kind of hard to explain. THhe only Thing I can think of as to how to do this, Is make another Terrain Tag, and have it scripted out to ignore the perspective tilemapping. I dont know. Probably not correct, but yea. I really need to Study RGSS

No idea.

I am not asking for "FREE SCRIPTZ" rather, a bit of pushing me to learn how to do these things. I have a list of things I would like to implement, but don't know RGSS, so this will attempt to teach me a bit.​



Look at scripts in Essentials already... You've said "you're not asking for frees scripts", before...


Here is my list of things.
  1. HUD telling you what Route or Town you are on, and showing you your pokemons Status.
  2. "Reuse" Items. Repel just wore off, Would you like to use another? And Unlimited potion using for out of battle.
  3. A newer Pause Menu. With a drop down window, and Iconized Options.
  4. Help with repositioning for a New Resolution. We are switching to 640x400
  5. A "Better" Perspective map mode. Something that make the map less flat, And make certain objects/tiles ignore the map mode.
  6. How to do a Gym Leader event that makes you have to challange him twice, the first losing, but not Fainting, rather, making you go to the PokeCenter, and then trigger a Special Event for a Guy to talk to you. THEN go back to fight the Leader.
  7. More to come, I just can;t think right now.

1. Isn't this already in... Or do you want it to always be visible? What does the status thing mean.
2. The Repel thing is already in Essentials... The Potion thing however, make this part, in PokemonItems:
Code:
           if !pbCheckUseOnPokemon(item,pokemon,screen)
             pbPlayBuzzerSE()
           else
             ret=ItemHandlers.triggerUseOnPokemon(item,pokemon,screen)
             if ret && $ItemData[item][ITEMUSE]==1 # Usable on Pokémon, consumed
             end
             if bag.pbQuantity(item)<=0
               Kernel.pbMessage(_INTL("You used your last {1}.",
                  PBItems.getName(item))) if bag.pbQuantity(item)<=0
               break
             end
           end
Look like this:
Code:
           if !pbCheckUseOnPokemon(item,pokemon,screen)
             pbPlayBuzzerSE()
           else
             ret=ItemHandlers.triggerUseOnPokemon(item,pokemon,screen)
             if ret && $ItemData[item][ITEMUSE]==1 # Usable on Pokémon, consumed
               if isConst?(item,PBItems,:POTION) # Edit this for other items.
                 # This means it does nothing.
               else # Otherwise...?
                 bag.pbDeleteItem(item) # This was originally there.
               end # Ends the new if statement
             end
             if bag.pbQuantity(item)<=0
               Kernel.pbMessage(_INTL("You used your last {1}.",
                  PBItems.getName(item))) if bag.pbQuantity(item)<=0
               break
             end
           end
3. Good luck... I've given you a new pause menu, you can merely edit that to do what you want.
4. Repositioning...? Not my area, but I figure you could just change the settings, on the settings script section...
5. Already said, this is not something I know.
6. This is merely eventing... Maybe you should use the Last Pokemon Message, tutorial as a base script.
7. Oh no lol.


Yes, I know my list is Huge. I basically want a Mentor to help me learn to script. And point me in the right Direction with my issues.

So I've helped you a little, run wild young padwan!

Okay, so I'd like to start off with the fact that I know jack diddly about RGSS. U wU; So far, when editing scripts, I've really just gone off of my intuition and the script examples around me and I've miraculously not completely ruined everything. But that's besides the point.

I'd like to implement Light Pokémon into my game, which are have the same elements as Shadow Pokémon, just a different story to them. Can someone point me in the direction to do this, and also on how to get the 'light' sprites to be added correctly?

And while I'm at it, would anyone know how to make it so a Shadow(/Light) Pokémon could gain EXP and level up, while growing marginally more disobedient to the trainer (like a traded Pokémon)?

Adding New Types
 

JokerBen

Director of Pokémon Nobelium
241
Posts
11
Years
  • Age 23
  • Seen Aug 29, 2023
I have a script request list/questions (This is not Pokemon related).

1. I am creating an "overworld shooter" game if you will (The OW is shooting, no "battles") and I was wondering if there is a script for that (The player presses a button and the projectile goes the way the player is facing. It also makes any event disappear upon projectile touch)

2.Along with OW Shooter, I also am requesting OW melee combat script, such as sword combat.

3.Which script section deals with the controls?

Thanks
 
378
Posts
10
Years
  • Seen Oct 18, 2017
I have a script request list/questions (This is not Pokemon related).

1. I am creating an "overworld shooter" game if you will (The OW is shooting, no "battles") and I was wondering if there is a script for that (The player presses a button and the projectile goes the way the player is facing. It also makes any event disappear upon projectile touch)

2.Along with OW Shooter, I also am requesting OW melee combat script, such as sword combat.

3.Which script section deals with the controls?

Thanks

I believe what you are looking for is an Action Battle System. There are tons of those out there. Just google it. I personally don't know of any off-hand for XP, but for VX Ace there's Sapphire Action System and Falcao Pearl ABS. Just search around and you'll find tons.
 

JokerBen

Director of Pokémon Nobelium
241
Posts
11
Years
  • Age 23
  • Seen Aug 29, 2023
I seached for a battle system and I found a good one :D . But I have a question. Can you call common events from the script data base?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
I seached for a battle system and I found a good one :D . But I have a question. Can you call common events from the script data base?
Yep. That's how phone calls with important NPCs (e.g. Professor Oak) work, for one.
 
Status
Not open for further replies.
Back
Top