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

Additional Movesets Depending on Region

SereneAmbience

Founder of Pokémon Ambient
81
Posts
12
Years
SO....

In pokemon.txt each Pokemon has their on set of "moves=" as listed. However, in my creation, I have multiple regions and each Pokemon's move sets depends on the region in which it came from. How would I go about this? is it as simple as marking the moves as "moves[1]", "moves[r2]" as it attaches to a specific region.

Ex] A NPC has a Bulbasaur from Kanto region [1] with movesets from RBY, but I would like to have a Bulbasaur [different form from new Region [3]] with a moveset from my custom region.

Any help would be greatly appreciated!
 
Last edited:

PiaCRT

[i]Orange Dev[/i]
936
Posts
13
Years
I think you answered your question yourself. Creating a script that interacts with pokemon.txt and the current region number would be doable. However...If you were to make it region-specific for the pokemon itself, I would imagine it would have to do with the location it was caught (Like..."Caught in Ilex Forest at level 7") or you would have to add a separate Pokémon completely.

Perhaps reading some guides on scripting will help you out here, along with studying how some scripts in PE work.
 

Arma

The Hyena
1,688
Posts
14
Years
I'm not quite sure what you mean, but, I think the easiest way to solve this is to give each Pokemon a different list of moves per region.
For example:
Spoiler:
this comes from the Pokemon file in PBS, parts in bold shows what's been edited.

after doing this, you need to edit the scripts so that the right list will be checked upon level-up and region (I wouldn't know which scripts that would be, I'll do my best to find out)

To be honest with you, I don't think this is a good idea. It can be quite troublesome to implement if you don't have the experience.

And even if you do have the experience, I still think it's not a good idea... unless you have a solid design-plan. If you plan on adding multiple regions, don't make the mistake of adding all existing regions... It's a huuuge amount of work, plus you would get into trouble balancing the game.
 

PiaCRT

[i]Orange Dev[/i]
936
Posts
13
Years
To be honest with you, I don't think this is a good idea. It can be quite troublesome to implement if you don't have the experience.

And even if you do have the experience, I still think it's not a good idea... unless you have a solid design-plan. If you plan on adding multiple regions, don't make the mistake of adding all existing regions... It's a huuuge amount of work, plus you would get into trouble balancing the game.

I'm gonna agree with you on this one. It's not really worth the trouble in the end. Maybe make someone teach moves to certain Pokémon in different regions?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
While typing this post, I've flip-flopped over which would be the better option: create alternate forms for each species, or add more moveset lines into pokemon.txt.

In the end, I think the second option narrowly wins out. The script changes required aren't too complicated, and there are no major form-related problems to run into (off the top of my head). I presume that if you create a second form of Bulbasaur with purple leaves (or whatever), that you'd want both forms to be available in the Pokédex - there would be problems if you didn't.

If you're still interested, I can go into more details tomorrow.
 

SereneAmbience

Founder of Pokémon Ambient
81
Posts
12
Years
While typing this post, I've flip-flopped over which would be the better option: create alternate forms for each species, or add more moveset lines into pokemon.txt.

In the end, I think the second option narrowly wins out. The script changes required aren't too complicated, and there are no major form-related problems to run into (off the top of my head). I presume that if you create a second form of Bulbasaur with purple leaves (or whatever), that you'd want both forms to be available in the Pokédex - there would be problems if you didn't.

If you're still interested, I can go into more details tomorrow.

Maruno, this is exactly the idea I had in mind while looking this over. I have only just started working with the scripting portion of Essentials and RPG Maker XP, so the idea is there but i don't have the motion. If you have some knowledge I greatly appreciate and I'm sure others as well looking into this.

THIS option was definitely the better option that seemed attempt-able or else I wouldn't have threaded it. I've had advise to create an entirely new species and to add additional forms, but it doesn't seem most beneficial to go through every species like that.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
First you'll need to know what the Compiler does. It's a fiddly beast, but today you're only going to learn how it records movesets.

Look at def pbCompilePokemonData. All the code you need to pay attention to is as follows:

Code:
"Moves"=>[0,"*uE",nil,PBMoves],
.
.
moves=[]
.
.
thesemoves=[]
.
.
elsif key=="Moves"
  thesemoves.push(value)
.
.
movelist=[]
for i in 0...thesemoves.length/2
  movelist.push([thesemoves[i*2],thesemoves[i*2+1]])
end
movelist.sort!{|a,b| a[0]<=>b[0]}
moves[currentmap]=movelist
.
.
File.open("Data/attacksRS.dat","wb"){|f|
   mx=[maxValue,eggmoves.length-1].max
   offset=mx*8
   for i in 1..mx
     f.fputdw(offset)
     f.fputdw(moves[i] ? moves[i].length*2 : 0)
     offset+=moves[i] ? moves[i].length*4 : 0
   end
   for i in 1..mx
     next if !moves[i]
     for j in moves[i]
       f.fputw(j[0])
       f.fputw(j[1])
     end
   end
}
All this reads the movesets, sorts them into a usable format, and saves them to the data file attacksRS.dat. What you're going to do is duplicate this code, once for each region (excluding the first region, which will use the regular moves, of course). Each extra region's movesets will be saved in separate data files (attacksKanto.dat, attacksJohto.dat or whatever you want to call them).

When you duplicate this code, be sure to rename everything that needs renaming. "Moves" (this is Moves=blah in pokemon.txt) becomes "MovesKanto", moves becomes moveskanto, thesemoves becomes thesemoveskanto, and movelist becomes movelistkanto. And change the data file's name as already mentioned. Everything else remains the same, including the relative positions of each bit of code.

Well done! You've added more movesets. They don't do anything yet, but they're there. Keep reading.

Conveniently, because of my work on multiple forms, there's exactly one script you need to edit in order to change a Pokémon's moveset. It's def getMoveList in the script section PokeBattle_Pokemon. All you need to change here is the following line:

Code:
atkdata=pbRgssOpen("Data/attacksRS.dat","rb")
This will turn into something like:
Code:
atkdata=nil
if region==0
  atkdata=pbRgssOpen("Data/attacksRS.dat","rb")
elsif region==1
  atkdata=pbRgssOpen("Data/attacksKanto.dat","rb")
elsif region==2
  atkdata=pbRgssOpen("Data/attacksJohto.dat","rb")
end
The final step will be to decide which region you want. For that, you'll find out which region the Pokémon was caught in. At the very beginning of this method, add the following:

Code:
region=0
pos=pbGetMetadata(@obtainMap,MetadataMapPosition)
region=pos[0] if pos && pos[0]>0
That's it!

One restriction of this is that a species must have a moveset for every region it can be obtained in, even if it's the same as another region's moveset. Also, if you breed a Pokémon, you'll need to do something extra in order for it to inherit its parent's region (perhaps save the mother's obtainMap as egg.parentMap and get the position metadata for that map if it exists rather than @obtainMap). Pokémon with multiple forms which have alternate movesets themselves (Deoxys, Wormadam, Shaymin, Kyurem) may also need some work if you want their non-regular forms to have region-specific movesets.
 

SereneAmbience

Founder of Pokémon Ambient
81
Posts
12
Years
It works! :D

WAYYYY more useful now, but a lot to input or locate for movesets. Got a leads to previous used moveset.txt for HGSS or DPP or before?

Also thanks a lot, Maruno! I will post if errors occur.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Hey, you asked for a way to give yourself a huge amount of work.

I don't think you'll find anything useful in older versions of Essentials. As far as I can work out, pokemon.txt had fiddled versions of the Gen 3/4 movesets (replacing any Gen 4 moves with "similar" older moves) and was upgraded straight to Gen 5 movesets in v6. You'd need to go through the older movesets and check them all anyway if you tried using them.
 
Back
Top