Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Reload this Page [Question] Additional Movesets Depending on Region

Notices
For all updates, view the main page.

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.



Reply
 
Thread Tools
  #1    
Old December 20th, 2012 (01:12 PM). Edited December 20th, 2012 by SereneAmbience.
SereneAmbience's Avatar
SereneAmbience SereneAmbience is offline
Founder of Pokémon Ambient
 
Join Date: Jul 2011
Location: In a box!
Gender: Male
Nature: Careful
Posts: 81
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!
Reply With Quote
  #2    
Old December 20th, 2012 (01:38 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 19
Gender: Male
Nature: Adamant
Posts: 559
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.
__________________




Coming soon to a forum near you...
Reply With Quote
  #3    
Old December 20th, 2012 (02:07 PM).
Arma's Avatar
Arma Arma is offline
Actually not mad at all
Silver Tier
 
Join Date: Dec 2009
Location: The Hague
Age: 22
Gender: Male
Nature: Jolly
Posts: 999
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:
Code:
[1]
Name=Bulbasaur
InternalName=BULBASAUR
Type1=GRASS
Type2=POISON
BaseStats=45,49,49,45,65,65
GenderRate=FemaleOneEighth
GrowthRate=Parabolic
BaseEXP=64
EffortPoints=0,0,0,0,1,0
Rareness=45
Happiness=70
Abilities=OVERGROW
HiddenAbility=CHLOROPHYLL
Moves,reg1=1,TACKLE,3,GROWL,7,LEECHSEED,9,VINEWHIP,13,POISONPOWDER,13,SLEEPPOWDER,15,TAKEDOWN,19,RAZORLEAF,21,SWEETSCENT,25,GROWTH,27,DOUBLEEDGE,31,WORRYSEED,33,SYNTHESIS,37,SEEDBOMB
Moves,reg2=1,FLAMETHROWER,3,SURF ...ETC ETC
EggMoves=AMNESIA,CHARM,CURSE,ENDURE,GIGADRAIN,GRASSWHISTLE,INGRAIN,LEAFSTORM,MAGICALLEAF,NATUREPOWER,PETALDANCE,POWERWHIP,SKULLBASH,SLUDGE
Compatibility=1,7
StepsToHatch=5355
Height=0.7
Weight=6.9
Color=Green
Habitat=Grassland
RegionalNumbers=1,231
Kind=Seed
Pokedex=Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.
BattlerPlayerY=0
BattlerEnemyY=25
BattlerAltitude=0
Evolutions=IVYSAUR,Level,16

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.
__________________
Reply With Quote
  #4    
Old December 20th, 2012 (02:09 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 19
Gender: Male
Nature: Adamant
Posts: 559
Quote originally posted by elarmasecreta:
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?
__________________




Coming soon to a forum near you...
Reply With Quote
  #5    
Old December 20th, 2012 (06:20 PM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Moderator
 
Join Date: Jan 2008
Location: England
Posts: 4,012
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.
__________________
Reply With Quote
  #6    
Old December 20th, 2012 (10:59 PM).
SereneAmbience's Avatar
SereneAmbience SereneAmbience is offline
Founder of Pokémon Ambient
 
Join Date: Jul 2011
Location: In a box!
Gender: Male
Nature: Careful
Posts: 81
Quote originally posted by Maruno:
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.
Reply With Quote
  #7    
Old December 21st, 2012 (03:58 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Moderator
 
Join Date: Jan 2008
Location: England
Posts: 4,012
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.
__________________
Reply With Quote
  #8    
Old January 1st, 2013 (01:16 PM).
SereneAmbience's Avatar
SereneAmbience SereneAmbience is offline
Founder of Pokémon Ambient
 
Join Date: Jul 2011
Location: In a box!
Gender: Male
Nature: Careful
Posts: 81
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.
Reply With Quote
  #9    
Old January 1st, 2013 (01:43 PM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Moderator
 
Join Date: Jan 2008
Location: England
Posts: 4,012
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.
__________________
Reply With Quote
Reply
Quick Reply

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 UTC -8. The time now is 02:26 PM.