PDA

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


Pages : 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

[email protected]
February 28th, 2008, 03:37 AM
Thanks Krobe, I was hoping I wouldn't have to do that xD but I guess I can't avoid it >.<

phoenixprime88b5
February 28th, 2008, 07:32 AM
Okay, I made the events for the starte pokemon when you choose one, the others are unavailable to be picked but for some reason I have a hard time trying to make an event page to say something like "this pokeball belongs to the professor, i shouldn't be greedy." this message should appear on the pokeballs that weren't choosen but I'm a little confused on how to set that up. Oh and by the way, how do you set up the pictures of the pokemon to pop up when you select a pokemon, but don't choose them at that moment, like at Professor Elm's lab in Pokemon G/S/C.

Like this:
http://i189.photobucket.com/albums/z300/exodia882/choose_totodile.gif

sprugles555
February 28th, 2008, 08:56 AM
Okay, I made the events for the starte pokemon when you choose one, the others are unavailable to be picked but for some reason I have a hard time trying to make an event page to say something like "this pokeball belongs to the professor, i shouldn't be greedy." this message should appear on the pokeballs that weren't choosen but I'm a little confused on how to set that up.

Create three events, then make three switches POKeMON 1, POKeMON 2 and POKeMON 3.
Then make a new event page and at the bar at the side which says Switch:[BOX], Set the switch to either POKeMON 1, POKeMON 2 or POKeMON 3. Make some text saying: "this pokeball belongs to the professor, i shouldn't be greedy." and make a new event page with a self switch of A. On your main event page (page 1) Make the first pokeball turn on switches POKeMON 2 and POKeMON 3. And then turn its self switch on. It will make POKeBall 2 and 3 show text saying: "this pokeball belongs to the professor, i shouldn't be greedy." and the chosen Pokeball disappear.
--------------------------------------------

If you didn't understand that quick tutorial send me an email and i'll get back to you with detailed instructions!

And for the pictures that pop up, in your event when you have selected the pokeball and it says want this Pokemon: yes, no?
there should be in your event a show picture command. so it shows the pic of the pokemon when you have selected the ball!
---------------------------------------------

If that was unclear again email me :)
Hope that helped someone...

Sprugles555

Wichu
February 28th, 2008, 09:09 AM
Actually, you only need one switch - Event Page 1 should have no conditions, Page 2 should have the switch, and Page 3 should have Self Switch A.

.houndoomed
February 28th, 2008, 09:27 AM
What filetype are you using? If it's MIDI I could help - I know how to set the loop points for MIDIs.

It is MIDIs indeed. Is it possible to do this just by setting a certain time for it to loop?

phoenixprime88b5
February 28th, 2008, 09:28 AM
I tried Wichu's way, and it was quick to set up and worked. Thanks Wichu and Sprugles555 for your help.

Glitchfinder
February 28th, 2008, 10:07 AM
It is MIDIs indeed. Is it possible to do this just by setting a certain time for it to loop?

No. Unfortunately, you need to set a specific event in a midi editor. It's fairly easy, if you know what you're looking for. It's in one of the tutorials here, I believe.

Wichu
February 28th, 2008, 10:13 AM
Yeah, I have a MIDI editor, so if you need help with looping, I can do it for you :).

.houndoomed
February 28th, 2008, 10:15 AM
No. Unfortunately, you need to set a specific event in a midi editor. It's fairly easy, if you know what you're looking for. It's in one of the tutorials here, I believe.

You mean THIS (http://pkmncommunity.com/showthread.php?t=80134) one here?

Yeah, I have a MIDI editor, so if you need help with looping, I can do it for you

If I can't do it myself, I'd really appreciate help with it, thanks :)

Wichu
February 28th, 2008, 10:25 AM
I never noticed that tutorial - I learnt to do it myself... But upon reading it through, it should help you.

RMXPUser462
February 28th, 2008, 01:35 PM
@RMXPUser462 - It ceases to amaze me how people think half of us are telekinetic, and can read your mind. Why don't you explain in detail why it doesn't work? It's obvious that your doing something wrong, so post your event, and explain your situation better.

oh you aren't? I'm sorry, guess i'll explain and give you the event then :P

ok, so ya, pretty much trying to get it to where you can have a partner trainer, and I'm using the event following, and using the script command poccil said to use...


@>Text: Would you like a partner to fight with you?
@>Choices: Yes, No
: When [Yes]
@>Script: pbRegisterPartner (PBTrainers::CAMPER,"Gregory",0)
@>Control Self Switch: A=ON
@>
: When [No]
@>Text: Oh, ok then...
@>
: Branch End
@>


and why did you tell me to explain why it doesn't work, when that's what I'm trying to figure out in the first place... xP but ya I should have explained the situation better, an error on my part there

.houndoomed
February 28th, 2008, 02:46 PM
I never noticed that tutorial - I learnt to do it myself... But upon reading it through, it should help you.

I just tried it, and didn't understand a word of it o.o
I'm no good at all with music.

Do you mind giving it a try? The MIDI file is HERE (http://www.vgmusic.com/music/console/nintendo/gba/gba-pkmnfrlg-wildpkmnbattle.mid) if you think you can do it. Thanks.

Mrchewy
February 29th, 2008, 05:07 PM
Hmm... even after I updated to the latest version I'm *still* having audio problems. Sometimes, when moving between connected maps, the MIDI tracks either stop completely or only play some instruments. It's really beginning to get on my nerves.

RMXPUser462
February 29th, 2008, 07:43 PM
@>Text: Would you like a partner to fight with you?
@>Choices: Yes, No
: When [Yes]
@>Script: pbRegisterPartner (PBTrainers::CAMPER,"Gregory",0)
@>Control Self Switch: A=ON
@>
: When [No]
@>Text: Oh, ok then...
@>
: Branch End
@>

thought I should explain a little better really quickly...

i used the script command, put the trainer into the trainers.txt file, and created the back for the character in the graphics/pictures folder, if anyone can tell me what I'm doing wrong or what it is that I haven't done would be much appreciated :)

Wichu
March 1st, 2008, 12:06 AM
TrypbRegisterPartner(
PBTrainers::CAMPER,"Gregory",0)Notice the lie break after the "(".

RMXPUser462
March 1st, 2008, 11:27 AM
it worked, thanks loads Wichu :)

phoenixprime88b5
March 1st, 2008, 12:56 PM
As an example I used the Camper gregory to see if i could just get the partner trainer option to work at all and i keep getting this error.

Exception: RuntimeError
Message: Script error within event 25, map 25 (Test Map 2):
Section077:318:in `pbRegisterPartner'undefined method `[]' for nil:NilClass
Section017:238:in `pbExecuteScript'
(eval):2:in `pbExecuteScript'
Section017:1615:in `eval'
Section017:238:in `pbExecuteScript'
Section017:1615:in `command_355'
Section017:467:in `execute_command'
Section017:190:in `update'
Section017:104:in `loop'
Section017:195:in `update'
Section019:98:in `update'

maggi90w1
March 1st, 2008, 12:56 PM
I can't make my script work. Can someone show me how a script to add 5 pokeballs has to look like?

TIA

phoenixprime88b5
March 1st, 2008, 01:07 PM
I can't make my script work. Can someone show me how a script to add 5 pokeballs has to look like?

TIA

$PokemonBag.pbStoreItem(
PBItems::POKeBALL, 5
)

Lorem Ipsum
March 1st, 2008, 01:17 PM
notes.html helps a lot, you know.

maggi90w1
March 1st, 2008, 01:59 PM
Yes I know, but the script in the notes looked very diffrent then phoenixprimes and didn't worked out. Otherwise I wouldn't have asked.

Flameguru
March 1st, 2008, 05:02 PM
I have just one question that has been bugging me for ages.

Is there a way to make it so that moving events (Like NPCs) can walk through Player Touch events?

Mrchewy
March 1st, 2008, 05:42 PM
I have just one question that has been bugging me for ages.

Is there a way to make it so that moving events (Like NPCs) can walk through Player Touch events?

In the move route, make sure THROUGH is ON ;) .

poccil
March 1st, 2008, 07:58 PM
I've made a new release today. This time, I've added an editor for more convenient access to game settings, as well as implementing the trainer throwing animation.

Mrchewy
March 1st, 2008, 08:05 PM
I've made a new release today. This time, I've added an editor for more convenient access to game settings, as well as implementing the trainer throwing animation.

My goodness, you're bloody fantastic. You should hang around here more often; you quite elusive. Again, great work.

Flameguru
March 1st, 2008, 08:08 PM
lol, I finally get everything working with the last release and then poccil releases a new version.

Anyway, Thanks!

EDIT: Poccil, I would like to recommend that you change the screenshot output from BMP to PNG. PNG is superior, smaller size files and same quality.

Wichu
March 1st, 2008, 11:47 PM
Flameguru, just change the script (in PokemonSystem), replacing .bmp with .png.

imtheomega
March 2nd, 2008, 11:26 AM
Edit : sorry, i just saw that poccil made a new update and that the throwi,g thing is on it ^^.

[email protected]
March 2nd, 2008, 09:44 PM
New Vr. Bug report! :D
This is what I've found so far:
1. When you run away from a battle (As soon as you get into it) if you're quick you can still see the pokeball from the trainer back animation.
2. (This may just be my project) But when you try to use the Old Rod on water, you get an error x]

Thanks, Dusty

imtheomega
March 3rd, 2008, 07:02 AM
Hi,

I have a little problem with the translation. I extracted the text and i modified some second lines in the new file intl.txt.
Then i compiled and it created the file intl.dat and as it was said, i have created a script with pbLoadMessages(intl.dat). But when i try to run the script in the game, there is an error :

Exception: RuntimeError
Message: Script error within event 12, map 29 (ROUTE1):
(eval):1:in `pbExecuteScript'undefined local variable or method `intl' for #<Interpreter:0x88d4478>
Section019:238:in `pbExecuteScript'
Section019:1614:in `eval'
Section019:238:in `pbExecuteScript'
Section019:1614:in `command_355'
Section019:466:in `execute_command'
Section019:190:in `update'
Section019:104:in `loop'
Section019:195:in `update'
Section021:98:in `update'
Section021:96:in `loop'

Interpreter:249:in `pbExecuteScript'
Interpreter:1614:in `command_355'
Interpreter:466:in `execute_command'
Interpreter:190:in `update'
Interpreter:104:in `loop'
Interpreter:195:in `update'
Scene_Map:98:in `update'
Scene_Map:96:in `loop'
Scene_Map:109:in `update'
Scene_Map:65:in `main'

Someone can help me?

poccil
March 3rd, 2008, 08:07 AM
The filename (intl.dat) should be in quotation marks, so that it becomes recognized as a string. For example:
pbLoadMessages("intl.dat")

imtheomega
March 3rd, 2008, 08:38 AM
Well, unfortunately it was the first thing i tried (the quotation marks). I had no error but it changed nothing to the text in the game.

For example i modified

A Map<<n>>Shows visited Places.
Une carte<<r>><<n>>Montre les lieux visites.
A Radio<<n>>Used to listen to Music.
Une radio<<r>><<n>>Pour ecouter de la musique.
A Phone<<n>>Used to call People.
Un téléphone<<r>><<n>>Pour appeler des gens.

I think that it has to be done like that, no? And well, it modified nothing :/

Also, i dont know if it is linked, but when i tried to put the name of a file i hadn't, like pbLoadMessages("inl.dat") (without the "t"), it did nothing at all too, not even saying me that the file doesnt exist ^^'.

Wichu
March 3rd, 2008, 09:39 AM
Is it in the right folder (the main folder with the game.rxproj file)?

.houndoomed
March 3rd, 2008, 09:48 AM
Does anyone know if the gender icons/pictures have been updated in the newest version? I tried downloading the new version and replacing the Fonts folder, but they remained the same..

imtheomega
March 3rd, 2008, 09:48 AM
@ Wichu : Yes it is. It is there that it is compiled, so i let it in that folder. I also tried to put a copy in the data folder in the case that it had to be there but it changed nothing.

Lorem Ipsum
March 3rd, 2008, 10:37 AM
In a battle, you have two fonts. One is the one where you make your selections on the menu, one is where you can see HP and EXP and the likes. How do you change the font on the latter boxes?

Wannabe Gamemaker
March 3rd, 2008, 07:44 PM
ur my hero. im very busy and dont have time to learn another scripting language. thx so much

Mrchewy
March 3rd, 2008, 10:18 PM
Does anyone know if the gender icons/pictures have been updated in the newest version? I tried downloading the new version and replacing the Fonts folder, but they remained the same..

They were updated a while ago; perhaps your not fully updating your game correctly?

.houndoomed
March 4th, 2008, 09:12 AM
They were updated a while ago; perhaps your not fully updating your game correctly?

No, I can't be bothered to do that :P

But really, the demo for my game is supposed to be out in a weak, so I don't have the time to update. Does anyone know which files to update just to get the icons working?

imtheomega
March 4th, 2008, 09:40 AM
Ok, i have found the problem for the translation... In fact, when I walk on the place where there is the script, it translate the game. But the real problem is that if i close the game and i restart it, it will not be translated... I will have to walk again on the spot of the script :/.

Is it normal poccil? The translation cannot be definitive?

poccil
March 4th, 2008, 04:31 PM
The script "pbLoadMessages" is not meant to be placed in an event in the game, but rather in a script in the script editor (such as "Main" or "PokemonSystem"), preferably before the game starts. The approach with "pbLoadMessages" is designed for situations where the game designer wants to support more than one language for a single Pokemon game. For other situations, it is generally enough to use the generated "intl.dat" file to replace the "messages.dat" file in the Data folder (being sure to back up that file before doing so). Translations of the Pokemon Essentials user interface, however, will be very welcome.

imtheomega
March 12th, 2008, 04:19 AM
Hi,

I had no asnwers on a problem and because it was deleted (because of the forum problem), i post it again.

I want to make a script such that a pokemon is forced to evolute. In my game, i want caterpie to evolute in metapod.

I tried
def pbForcedEvolution(pokemonid)
for i in 0...$Trainer.party.length
pokemon=$Trainer.party[i]
if pokemon==pokemonid
newspecies=Kernel.pbForcedEvolution(pokemon)
if newspecies>0
# Start evolution scene
evo=PokemonEvolutionScene.new
evo.pbStartScreen(pokemon,newspecies)
evo.pbEvolution
evo.pbEndScreen
end
end
end
end

in PokemonField. But it does nothing when i try to use it. Can someone explain me what is wrong or what I must do?

Lorem Ipsum
March 12th, 2008, 09:08 AM
Well, first of all, you would need this call script:
PokemonField.pbForcedEvolution(::PBSpecies::CATERPIE)

I think so at least...

imtheomega
March 12th, 2008, 09:41 AM
I tried what u said but is said me :

Exception: SyntaxError
Message: (eval):2:in `pbExecuteScript'compile error
(eval):2: syntax error
Interpreter:238:in `pbExecuteScript'
Interpreter:1614:in `eval'
Interpreter:238:in `pbExecuteScript'
Interpreter:1614:in `command_355'
Interpreter:466:in `execute_command'
Interpreter:190:in `update'
Interpreter:104:in `loop'
Interpreter:195:in `update'
Scene_Map:98:in `update'
Scene_Map:96:in `loop'

And I also tried PokemonField.pbForcedEvolution(10), where 10 is caterpie ID, just in case and it gave me :

Exception: RuntimeError
Message: Script error within event 16, map 35 (Forêt de Jade):
(eval):1:in `pbExecuteScript'uninitialized constant Interpreter::PokemonField
Section019:238:in `pbExecuteScript'
Section019:1614:in `eval'
Section019:238:in `pbExecuteScript'
Section019:1614:in `command_355'
Section019:466:in `execute_command'
Section019:190:in `update'
Section019:104:in `loop'
Section019:195:in `update'
Section021:98:in `update'
Section021:96:in `loop'

Interpreter:249:in `pbExecuteScript'
Interpreter:1614:in `command_355'
Interpreter:466:in `execute_command'
Interpreter:190:in `update'
Interpreter:104:in `loop'
Interpreter:195:in `update'
Scene_Map:98:in `update'
Scene_Map:96:in `loop'
Scene_Map:109:in `update'
Scene_Map:65:in `main'

Flameguru
March 13th, 2008, 12:29 PM
Hey Poccil.

I got a random error after leaving Violet City. I think it has to do with redrawing the map for the connections or something:

Exception: TypeError
Message: no implicit conversion from nil to integer
WindowAndTilemap:1139:in `blt'
WindowAndTilemap:1139:in `refreshLayer0'
WindowAndTilemap:1131:in `each'
WindowAndTilemap:1131:in `refreshLayer0'
WindowAndTilemap:1116:in `each'
WindowAndTilemap:1116:in `refreshLayer0'
WindowAndTilemap:1115:in `each'
WindowAndTilemap:1115:in `refreshLayer0'
WindowAndTilemap:1268:in `refresh'
WindowAndTilemap:702:in `update'

maggi90w1
March 19th, 2008, 09:21 AM
Does anyone ever finished a game made with rpg maker and the starterkit? I would like to play one, but I can't find any...

Krobelus
March 19th, 2008, 09:50 AM
@maggi90w1 - Your obviously not looking hard enough. Try looking in the Games Showcase section of these forums, theres bound to be a few demos there. As for complete ones, I don't think there are any yet.

-Krobe

Backmaster
March 21st, 2008, 03:42 AM
anything new poccil?
it´s really quite here currently^^

Atomic Reactor
March 21st, 2008, 01:11 PM
maybe nobody is having problems anymore..
poccil seems to have a somwhat perfect SK =)
im confused on the trainer back though.
it says in debug that it isnt used?

Hall Of Famer
March 21st, 2008, 08:03 PM
I'm making a POKEMON game with RPG maker ad POKEMON essential and I've encountered some problem. I'd appreciate it very much if you could help...

1. How to set items based events? For instance, in POKEMON firered/leafgreen version, the Shop owner will give the protagonist a parcel to urge him to send it to PROF.OAK, and when he hands the parcel to PROF.OAK and receives POKEDEX, he's enabled to purchase goods. If he fails, the shop owner will just keep requesting him to send the parcel to PROF.OAK. In this way, this event is decided by the item "parcel" and "POKEDEX"... I tried to use the internal event commands, but there's even no any items listed. What should I do with this incident?

2. How to associate an event with another event? For instance, in POKEMON Firered/Leafgreen version, PROF.OAK will run into the protagonist when he walks out of the town without POKEMON. The case is that PROF.OAK is in a position far away from the protagonist and being hidden before the event of Protagonist going out of the town happens. When the event of Protagonist going out of the town happens, the event for PROF.OAK to run into the protagonist and lead him to the institute happens as a sequel. How can I do to make this effect?

3. I don't know whether it's a stupid question, but what can you do to add a rival for the protagonist (like Gary-Ash, Silver-Gold). I mean, the rival will battle the protagonist in the lab first and then somewhere else when they meet. After the battle, the rival will walk away and appear in another place. Besides, how can I make the rival or the game NPC to walk to the POKEBALLS or itemballs to pick up a POKEMON or item just as the protagonist do? I really don't know how to deal with this, please give me a hand at this...

Still, I'd appreciate it very much if you could answer those three questions to me, thanks!

Mrchewy
March 21st, 2008, 09:50 PM
Hall of Famer, I'd suggest becoming familiar with RGXP first before using the starter kit, as most of those things are done using standard events. For the item one, I'd suggest looking in notes.html on how to use them.

Hall Of Famer
March 21st, 2008, 10:14 PM
Hall of Famer, I'd suggest becoming familiar with RGXP first before using the starter kit, as most of those things are done using standard events. For the item one, I'd suggest looking in notes.html on how to use them.

Well, what you don't know is that with the POKEMON essential, some of the features of the original RGXP have been unable to used them. For instance, when I make other RPG games, I could set up item based events by enabling the Conditional Branch's page 4, option 2(when some items are in the inventory) to set up an event. But the all the items in POKEMON essential are unlikely to find in this column. This is the reason why I think I need help, since some my old knowledge of RPG makers may not work with this issue.

pokemon programer
March 21st, 2008, 11:36 PM
Hall Of Famer:
You have to use a the script option of the conditional Branch. The items can be viewed in items.txt.

Hall Of Famer
March 22nd, 2008, 11:07 AM
Hi guys:

I've successfully figured out how to use item based events command and move events to the protagonist, thanks a lot.
Still, I have some questions unsolved.

1. How can I create a rival for the Protagonist such as Gary --- Ash? I mean, the rival will appear and select a POKEMON with the Protagonist from the beginning and then he will battle with the protagonist in certain places when some specific conditions are fulfilled. I don't know how to deal with this and I'd appreciate it very much if someone can help.

2. I obtained the music tracks for POKEMON red/blue version and set the background and battle musics, however, it goes wrong sometimes since after the battle, the battle victory music doesn't always start and sometimes even the background music won't display. what's wrong with this?

Besides, the POKE Center setting of POKEMON Essential must have mistakes since every time when I went into the POKE Center to heal POKEMON, there's an error stating "Failed to load bitmap: Graphics/Characters/pokeball on the left(or on the right). Don't know whether this is a bug and hope it to be solved as soon as possible.

Have a nice day, good luck everyone!

Firemaker
March 23rd, 2008, 05:28 AM
1. Use switches. Example. When you choose bulbasaur, switch bulbasaur is on. So when you battle your rival, you use Rival XXX,1 or 2 etc. If Bulbasaur is on battle Rival XXX,1 who has Charmander. If Squirtle is on.
You should get it.

2. Go to trainersnames.txt (something like that) Set the battle and victory music for each person type

victorspvl
March 23rd, 2008, 09:13 AM
Was playing my game. (Made with Pokémon Essentials)
And when my typlosion went to lv 42 for the lv 43.
His skills rise much more than normal.

Here is the picture for you better understand.

http://www.4shared.com/file/41651314/c9f2c732/capture000.html

What do I fix this?

Krobelus
March 23rd, 2008, 09:31 AM
@victorspvl - Holy hell, why did it go up so much?! Well, in any case, I'm sure theres bound to be some error with a Pokemon here or there, so just let Poccil know, and I'm sure he'll fix it in the next beta.

@Hall Of Famer - If the music is fluctuating, then replace it with another piece of music, and if it continues, then it's most likely a bug, but if it's just your music that fluctuates, then the problem lies there.

-Krobe

AtlantianTokRa
March 23rd, 2008, 12:20 PM
Is there any way to prevent the player from being able to catch wild pokemon, for a whole map or just one battle?

Wichu
March 23rd, 2008, 12:47 PM
Is there any way to prevent the player from being able to catch wild pokemon, for a whole map or just one battle?

Take away their Poké Balls?

If you found the script section dealing with catching, you could add some lines to it to turn it off.

BlueEew
March 23rd, 2008, 05:51 PM
Questions:

1) The 493 Pokemon are already programmed in correct?

2) Are there stats (everything Base stats, Moves, etc) all styled to fit DP?

3) Dose damage, weakness, types, everything all work like DS/GBA games.

^ I am wanting to know information in that area if anyone knows?

Krobelus
March 23rd, 2008, 06:12 PM
@BlueEew -
1. Yes
2. Fit DP? There aren't any DP moves as far as I know.
3. Yes, everything is similar to the GBA games, perhaps some DS, but not sure.

-Krobe

Wichu
March 23rd, 2008, 11:08 PM
The 493 Pokémon are programmed in. However, there are no DP moves, items and abilities. All DP moves in the Pokémon's level-up and egg movesets are replaced with a similar Advance move.

The moves are grouped into physical/special as in DP, but can be changed back to Advance.

venom12
March 24th, 2008, 01:52 AM
Hey. I have problem. If i use DP Peoples overworlds the game is freezing. Why??

Hall Of Famer
March 24th, 2008, 02:45 AM
1. Use switches. Example. When you choose bulbasaur, switch bulbasaur is on. So when you battle your rival, you use Rival XXX,1 or 2 etc. If Bulbasaur is on battle Rival XXX,1 who has Charmander. If Squirtle is on.
You should get it.

2. Go to trainersnames.txt (something like that) Set the battle and victory music for each person type

Thank you for your answer to my question. However, the biggest issue I'm having is not how to set the rival's POKEMON and their level. The trouble is that I don't know how to make this effect: When the rival lost, he/she will automatically say some words and then disappear or run into another map. How can I make this effect? Please help...

Wichu
March 24th, 2008, 03:06 AM
Use a Conditional Branch:
Conditional Branch: Script: pbTrainerBattle(PBTrainers::RIVAL,"Gary",_I("Humph."))
replacing the variables with what you need.
Then, put what you want to happen when you win inside the branch.

AlexPriest
March 24th, 2008, 04:40 PM
I'm having some trouble with the Pokecenter...

Exception: RuntimeError
Message: Failed to load bitmap: Graphics/Characters/pokeballs on left
BitmapCache:91:in `load_bitmap'
BitmapCache:130:in `character'
Sprite_Character:62:in `update_or'
PerspectiveTilemap:406:in `shadow_update'
Shadow:169:in `update'
Spriteset_Map:218:in `_animationSprite_update'
Spriteset_Map:213:in `each'
Spriteset_Map:213:in `_animationSprite_update'
AnimationSprite:91:in `update'
Scene_Map:49:in `updateSpritesets'
Exception: RuntimeError
Message: Failed to load bitmap: Graphics/Characters/pokeballs on left
BitmapCache:91:in `load_bitmap'
BitmapCache:130:in `character'
Sprite_Character:62:in `update_or'
PerspectiveTilemap:406:in `shadow_update'
Shadow:169:in `update'
Spriteset_Map:218:in `_animationSprite_update'
Spriteset_Map:213:in `each'
Spriteset_Map:213:in `_animationSprite_update'
AnimationSprite:91:in `update'
Scene_Map:49:in `updateSpritesets'

Know how I can fix that?

venom12
March 24th, 2008, 04:43 PM
You don't have in Graphics/Characters/pokeballs on left.png that file.

AlexPriest
March 24th, 2008, 04:48 PM
Oh...I can't find that image anywhere in my graphics...time to do some hunting...thanks

mad.array
March 24th, 2008, 05:34 PM
I don't think that file was included in essentials as I don't have it either. I've got my own Pokemon Centre script though so I don't have to worry. If anyone is interested then I'll upload it with the graphics I use.

BlueEew
March 24th, 2008, 06:46 PM
@BlueEew -
1. Yes
2. Fit DP? There aren't any DP moves as far as I know.
3. Yes, everything is similar to the GBA games, perhaps some DS, but not sure.

-Krobe

The 493 Pokémon are programmed in. However, there are no DP moves, items and abilities. All DP moves in the Pokémon's level-up and egg movesets are replaced with a similar Advance move.

The moves are grouped into physical/special as in DP, but can be changed back to Advance.

Are IVs and EVs added? Do they work as normal if they are?

Krobelus
March 24th, 2008, 07:34 PM
@BlueEew - Yes they are, and I think you can define in trainers.txt which of a trainers Pokemon give whatever amount of EVs that they give you (Optional).

-Krobe

AtlantianTokRa
March 24th, 2008, 08:14 PM
OK two more pressing questions.
1. How can i make a pokemon have a hold item before the player gets it (e.g the starter coming equipped with oran berry)
2. How can a make a battle that lets you continue with the story even if you lose, like in FR/LG when you battle your rival in Oaks lab after getting your pokemon

@BlueEew -
2. Fit DP? There aren't any DP moves as far as I know.

-Krobe

If by that you meant that there aren't any new moves for DP then who else apart from dialga and palkia have 'roar of time' and 'spacial rend'
If you meant that there are no new moves added to the GBA movesets then there are a few such as 'earth power'

Wichu
March 25th, 2008, 12:57 AM
He meant there are no DP moves in Pokémon Essentials. For example, Dialga, which learns Roar of Time at lv40, learns Blast Burn in Essentials. This is because poccil deemed Blast Burn as the closest approximation to Roar of Time. If you want, I could give you the link to the unmodified Pokemon.txt file (with the Pokémon's correct movesets), but keep in mind that it won't work without the DP moves.

As for the other two questions, I'll get back to you on them.

And just to clarify, EVs given are defined in Pokemon.txt.

Hall Of Famer
March 25th, 2008, 03:08 AM
Hi guys:

I've found the POKEMON essential to be such perfect after getting used to it. However, I encountered a serious issue with the POKE CENTER. I thought it was my mistake to set up the event but the fact is that even the test map has this error as well. When I entered the POKE CENTER and attempted to heal my injured POKEMON, the error log appears:

Exception: Runtime Error
Message: Failed to load bitmap: Graphics/Characters/pokeball on the right(or pokeball on the left)
Bitmapcach:91:in `load_bitmap'
Bitmapchah:130:in `character'
Sprite_character:62:in `update_or'
perspectiveTilemap:406:in`shadow_update'
Shadow:169:in `update'
Sprite_map:218:in `animationsprite_update'
Sprite_map:213:in `each'
Sprite_map:213:in `animationsprite_update'
Animationsprite:91:in `update'
Scene_Map:49:in `updatespritesets'

This exception was logged in errorlog.txtI really couldn't figure out where the problem is and I'd appreciate very much if anyone of you could help, thanks a lot...

Wichu
March 25th, 2008, 04:10 AM
Just delete the two events to the left of the Pokémon Centre nurse.

.houndoomed
March 25th, 2008, 08:38 AM
I can't believe I'm asking such a basic question, but it must have changed when an updated version was released, because I cannot find it. Anyway, I'm adding new Pokemon to the game and I've changed all of their data including names in the pokemon.txt file in PBS. However, the new Pokemon keep showing the old Pokemon's names. For example, the water starter of my game is Tadgill. I replaced Squirtle with Tadgill, but Squirtle's name keeps coming up. Is there a specific file I need to edit to change the Pokemon's names? Because I remember it was easier to do it in an older version. Thanks.

Wichu
March 25th, 2008, 09:26 AM
The game doesn't replace the nicknames - try doing the event to obtain the starters again.
You are changing both Name and InternalName, right?

phoenixprime88b5
March 25th, 2008, 10:05 AM
I'm having this problem when I start to playtest my game, I get this error message:

Exception: NoMethodError
Message: undefined method `addRef' for nil:NilClass
BitmapCache:112:in `load_bitmap'
BitmapCache:130:in `character'
Sprite_Character:62:in `update_or'
PerspectiveTilemap:406:in `shadow_update'
Shadow:169:in `update'
PerspectiveTilemap:402:in `shadow_initialize'
Shadow:145:in `initialize'
Spriteset_Map:27:in `new'
Spriteset_Map:27:in `_animationSprite_initialize'
Spriteset_Map:26:in `each'

*And note that I deleted that Pokeball graphic in the pokecenter already.

.houndoomed
March 25th, 2008, 10:19 AM
So THAT'S what I did wrong! The events for the Pokemon were old, so they kept their names.. Thanks for that :P

Lorem Ipsum
March 25th, 2008, 10:24 AM
How would you show the icons of items on the screen? I imagine that it would be something like
pbShowItemIcon(PBItems::POTION)
but I'm not sure.

Wichu
March 25th, 2008, 11:39 AM
I don't think there is a default script for that - I sent you a PM.

NastyA
March 25th, 2008, 01:51 PM
Hi.. i have a question. im gonna begin to use that kit to make a pokemon game , but in that kit is possible set the three start pokemon like in D/P where u select the pokemon into the bag ?! there are all the pokemons of D/P !? and is possible change the intro of the prof or i have to use the predefinite ? tnx

phoenixprime88b5
March 25th, 2008, 02:02 PM
I fixed the other problem I had, it was a conflicting event on the map I had. Is there a way to add more screenshots to the intro before the main screen?

Wichu
March 25th, 2008, 02:12 PM
NastyA: To make the bag, you have to do some very creative event commands, or learn to script.
All DP Pokémon are included, but there no DP moves, abilities or items - you have to make those yourself.
To edit the intro, there is an invisible event in the top-left corner of MAP000 you can edit.

Phoenixprime: There's a line in the Main section of the scripts which has something like this in it (Pic_1,[Pic_2]). I can't remember it exactly. Basically, in the square brackets, add a comma followed by the filename of a picture in the Titles folder. That should work.

NastyA
March 25th, 2008, 02:19 PM
NastyA: To make the bag, you have to do some very creative event commands, or learn to script.
All DP Pokémon are included, but there no DP moves, abilities or items - you have to make those yourself.
To edit the intro, there is an invisible event in the top-left corner of MAP000 you can edit.

Phoenixprime: There's a line in the Main section of the scripts which has something like this in it (Pic_1,[Pic_2]). I can't remember it exactly. Basically, in the square brackets, add a comma followed by the filename of a picture in the Titles folder. That should work.
get it . im a very good graphic designer but i know nothing about scripting and things like that... i have to find someone that could script for my project... wichu for your game ( i saw it and it's great ;D ) you have made the abilities of the new pokemon !?

phoenixprime88b5
March 25th, 2008, 02:38 PM
Phoenixprime: There's a line in the Main section of the scripts which has something like this in it (Pic_1,[Pic_2]). I can't remember it exactly. Basically, in the square brackets, add a comma followed by the filename of a picture in the Titles folder. That should work.

Well could you show me a pic of the script or something so I know what to change and where it is cause I was looking for what you told me and it's all over the place and I don't want to mess with the script that much if I don't know what I'm doing.

Wichu
March 25th, 2008, 02:44 PM
NastyA: I have some of the abilities, but if you want them, forget it. MINE!!! >_> <_< *evil laugh*

Errm... Sorry about that. But you must know how I feel - it's one of the things which makes my game stand out above others.

Phoenixprime: I can't, as I don't have access to RMXP at this time. But Main is the bottommost script in the script editor.

NastyA
March 25th, 2008, 02:54 PM
NastyA: I have some of the abilities, but if you want them, forget it. MINE!!! >_> <_< *evil laugh*

Errm... Sorry about that. But you must know how I feel - it's one of the things which makes my game stand out above others.

Phoenixprime: I can't, as I don't have access to RMXP at this time. But Main is the bottommost script in the script editor.
ahahah no problem man i can undestand , and how i said ,your game is cool cuz it's full of things news for that king of game made in rpgxp ! but don't worry , i have a lot of new ideas to my game hehe one day maybe we can make something together ;) !

OblivionMew
March 25th, 2008, 04:00 PM
When I run my game in RGSS2, after a certain amount of time the game crashes and the "Send Error Report" thingy pops up. Why is this happening?!
The reason I like playing the game in RGSS2 is the male female signs. They look HORRIBLE in RGSS1! SO please help me sort out the error!

phoenixprime88b5
March 25th, 2008, 04:22 PM
Lol, I found it now. Thanks Wichu.

Wichu
March 26th, 2008, 01:09 AM
OblivionMew: Try downloading and reinstalling the Pokémon fonts.

Hall Of Famer
March 26th, 2008, 03:18 AM
Well, I still wanna know how to set the protagonist's money. For instance, when the protagonist goes into the Museum or a Park, the money needs to be automatically reduced. Please help...

Wichu
March 26th, 2008, 04:09 AM
Use a conditional branch and a script.

Conditional Branch: Script: $Trainer.money>=500
Script: $Trainer.money-=500
Else
Text: You don't have enough money...
End

Basically, it checks whether the trainer's money is greater than or equal to 500, and if it is, takes 500 away.

NastyA
March 26th, 2008, 04:31 AM
i have tried yesterday and now my rpgxp works and essentials works also if i change the oak's speech..but i have a question..i wanna change the map but if i change the streets and citys its gonna coincide with the journey that i do in the game !?!?!?

OblivionMew
March 26th, 2008, 05:54 AM
OblivionMew: Try downloading and reinstalling the Pokémon fonts.

Got rid of those horrible signs now! Thanks Wichu :)

phoenixprime88b5
March 26th, 2008, 06:13 AM
I've been having a problem with my region map of johto. The game starts off in my custom region and when you go to a map in the pokecenter there or check the pokegear, the map shows that new region but the map of johto, once your in johto only shows up when your outside one of the towns or cities. If your in a house, building, or route it will show the other region instead of Johto even though you techincally still in Johto.

Hall Of Famer
March 26th, 2008, 06:15 AM
Use a conditional branch and a script.

Conditional Branch: Script: $Trainer.money>=500
Script: $Trainer.money-=500
Else
Text: You don't have enough money...
End

Basically, it checks whether the trainer's money is greater than or equal to 500, and if it is, takes 500 away.

Thank you for your kind answer.

I recently encountered another issue with POKEMON GYM Leader. After I defeated the GYM Leader, there appears an error:

Exception: RuntimeError
Message: Script error within event 2, map 53 (PEWTER CITY GYM):
(eval:1:in `pbExecuteScript`uninitialized constant interpreter:Badges
Section019:238:in `pbExecuteScript
Section019:1614:in `eval
Section019:238:in `pbExecuteScript
Section019:1614:in `command_355
Section019:466:in `execute_command
Section019:190:in `update
Section019:104:in `loop
Section019:195:in `update
Section021:98:in `update
Section021:96:in `loop

Interpreter:249:in `pbExecuteScript
Interpreter:1614:in `command_355
Interpreter:466:in `execute_command
Interpreter:190:in `update
Interpreter:104:in `loop
Interpreter:195:in `update
Scene_Map:98:in `update
Scene_Map:96:in `loop
Scene_Map:109:in `update
Scene_Map:65:in `main


I don't what's going on and hope you could tell me how to solve it. Besides, can you tell me whether it's possible to have more than 8 badges defined in the game. Thanks.

Wichu
March 26th, 2008, 06:28 AM
You need to use $Trainer.badges[0]=true, with the exact capitalization.

EDIT: Phoenixprime: Have you set the map location in the Metadata for every single Johto map?

phoenixprime88b5
March 26th, 2008, 06:41 AM
EDIT: Phoenixprime: Have you set the map location in the Metadata for every single Johto map?

So I have to enter that for every building, route, etc... Okay, I do that.

OblivionMew
March 26th, 2008, 06:46 AM
Is this possible yet? With the phone can you make non-trainer phone numbers like "MOM" and "PROF. ELM" in GSC? If it is not possible maybe this is the next thing to update in the kit ;P

phoenixprime88b5
March 26th, 2008, 10:56 AM
I revamped the map and info, know it'll show the routes as well as the city or town your in. Thanks again Wichu.

NastyA
March 26th, 2008, 10:57 AM
but is possible change the weight of the windows !? cuz it's too big than the real pokemon games screen.. i like to have the screen like in the pkmn games..

Fangking Omega
March 26th, 2008, 11:37 AM
I have a question about this; what would you change in the resolution script to give a precise window size of say, 548x368? I know all the menus and such would have to be resized, but I can't work out how to adjust the window size. Thanks :)

phoenixprime88b5
March 26th, 2008, 05:18 PM
I'm trying to test out my game and I get this error everytime the player walks into a certain area:

Exception: NoMethodError
Message: undefined method `<' for nil:NilClass
WindowAndTilemap:1120:in `refreshLayer0'
WindowAndTilemap:1118:in `each'
WindowAndTilemap:1118:in `refreshLayer0'
WindowAndTilemap:1116:in `each'
WindowAndTilemap:1116:in `refreshLayer0'
WindowAndTilemap:1115:in `each'
WindowAndTilemap:1115:in `refreshLayer0'
WindowAndTilemap:1274:in `refresh'
WindowAndTilemap:702:in `update'
WindowAndTilemap:1507:in `update'

Zephyr Gale
March 26th, 2008, 06:23 PM
Okay, so im sorta the newest noobie in town.

Well Ive got quite a few things together, bUt I want to know what each of these things refer to(needing to be fixed)

If someone can tell me as much as they know, thanks.

http://i162.photobucket.com/albums/t260/renzokuken385/ughfdhndmnjnm.jpg

Im fairly certain I know what half mean, But I still would LOVE and APPRECIATE the help.

Wichu
March 26th, 2008, 11:46 PM
Fangking Omega: In the script SpriteResizer, you have to modify lines 11 and 12. The Resolution* script only handles centering the player on screen, as far as I can make out.

Phoenixprime (and the tons of others who get the same error): Try adding this line directly above the line causing the problem (line 1120):
id=0 if !id
I'm sure there's a better way, but at least it prevents the error.

Zephyr Gale: The line you're getting the error on refers to the Audio.dll file. Check if you have this file first; if you do, then specify more about when the error happens.

And usually, the problem lies with the first line on the list - the others are the lines that line refers to, which may contain an error instead. It's usually best to fix the first line before attempting anything with the rest. Hope I helped!

EDIT: This is what happens when you change the resolution without changing your graphics.
http://img205.imageshack.us/img205/6715/screenshot048fw7.png

Fangking Omega
March 27th, 2008, 03:50 AM
Thanks a lot :) We're looking into reworking the starter kit into Acanthite you see, because it's so well thought out and detailed, and would save us a lot of time - pointless not to use what's on offer when it's such good quality!

.houndoomed
March 27th, 2008, 06:43 AM
Is there a way to change the animation of the player throwing the Pokeball (in other words the back sprite) to 5 frames instead of 4? When I put in 5 frames, it turns out messed up. Thanks.

phoenixprime88b5
March 27th, 2008, 08:09 AM
If it's one thing it's another. Thanks for the fixing the other problem Wichu, it's funny how a small piece of code can fix a big problem. I reached the new region in my game and after getting out of a battle and walking across the grass, I got this error:

Exception: NoMethodError
Message: undefined method `addRef' for nil:NilClass
BitmapCache:112:in `load_bitmap'
BitmapCache:130:in `character'
Sprite_Character:62:in `update_or'
PerspectiveTilemap:406:in `shadow_update'
Shadow:169:in `update'
PerspectiveTilemap:402:in `shadow_initialize'
Shadow:145:in `initialize'
Spriteset_Map:27:in `new'
Spriteset_Map:27:in `_animationSprite_initialize'
Spriteset_Map:26:in `each'

Hall Of Famer
March 27th, 2008, 09:09 AM
Excuse me, I just encountered another error stating that:

Exception: NoMethodError
Messege: Undefined method `<` for nil:Nilclass
WindowAndTilemap:1120:in `refreshlayer0`
WindowAndTilemap:1118:in `each`
WindowAndTilemap:1118:in `refreshlayer0`
WindowAndTilemap:1116:in `each`
WindowAndTilemap:1116:in `refreshlayer0`
WindowAndTilemap:1115:in `each`
WindowAndTilemap:1115:in `refreshlayer0`
WindowAndTilemap:1274:in `refresh`
WindowAndTilemap:702:in `update`
WindowAndTilemap:1507:in `update`

This exception was logged in errorlog.txt



I don't know what's going on with it and I'd appreciate it very much if anyone could help.

Wichu
March 27th, 2008, 09:16 AM
Houndoomed - I'll work on it tomorrow, as I haven't got access to RMXP right now. Same for Phoenixprime.

Hall of Famer - see this post (http://www.pokecommunity.com/showthread.php?p=3437847#post3437847), a few posts above yours.

Hall Of Famer
March 27th, 2008, 09:35 AM
Houndoomed - I'll work on it tomorrow, as I haven't got access to RMXP right now. Same for Phoenixprime.

Hall of Famer - see this post (http://www.pokecommunity.com/showthread.php?p=3437847#post3437847), a few posts above yours.

Thank you very much for this. I added this line to line 1120, 1132 and 1135 to have all problems resolved. Still, I don't know why I never encountered this problem before and it just happens on certain areas... Besides, can you explain the reason for my game to go wrong like this? Thanks.

Fangking Omega
March 27th, 2008, 01:55 PM
I come with another question! This one might benefit a lot of people.

Is it possible to replace ALL instances of a certain character in any body of text text with a small picture?

For instance...
http://i185.photobucket.com/albums/x191/FangkingOmega/gender-female.png

http://i185.photobucket.com/albums/x191/FangkingOmega/gender-male.png

I think you'll see what I'm getting at here :)

Cheers!

Wichu
March 27th, 2008, 02:35 PM
Hall of Famer: To be honest, I have no idea why it occurs... Poccil might be able to answer, but he's been inactive for a while. It happened to me between two connected maps, where one was bigger than the other.

Fangking: I'll have a shot tomorrow, as with Houndoomed and Phoenixprime's problems; I have an idea of how I could make it work.

Man, having two brothers who also want to use the computer and a bossy mum who won't allow us to use it after 6pm (I'm secretly using my DS Internet Browser to write this) has never felt so restrictive. And don't even get me started about school - I'm lucky we've currently got our Easter break.
:S :S :S
[/rant]

Demonic Budha
March 27th, 2008, 06:57 PM
lol, without causeing to much stress to the guru we currently are draining.
I too have a small question (One that will probably get me called a noob)
But in the ESK, how do you change the Hero Overworld sprites.
I cant find which folder they are contained with-in.
Thanks

phoenixprime88b5
March 27th, 2008, 07:06 PM
It's cool I was just wondering how this Switch to the town maps works, this is what it says in the notes:

*Number of a switch (in RPG Maker XP). If this is set, the point will not be shown until the switch is on.*

I put the number "1" where I was supposed to put it at and the area didn't show on the map but when I walk to the area with the character expecting it to show on the map it doesn't, the notes says that a switch needs to be turned on, but how exactly do I turn that switch on, so that it shows back on the map.

Wichu
March 28th, 2008, 05:51 AM
Houndoomed: At around line 974 of PokeBattle_Scene, add another line like this:
@sprites["player"].src_rect.x=pawidth*4 if @frame>16
changing the frame values to suit your sprite. Each frame must be 128x128.

Phoenixprime: After looking at the script, I have no idea how you could get that problem. Does the area around the part mentioned look like this?
if !obj
@cache[key] = objPath.clone
@cache[key].hue_change(hue)
@cache[key].resetRef
objKey=@cache[key]
else
objKey.addRef
end
As for the switches, it means the Set Switch command in the events.

Fangking Omega: I can't seem to get it to work - I tried using text replacement with the <icon=###> command, but it turns out the icon command doesn't seem to work. I could script it to show the male/female characters from the font, if you want.

Demonic Buddha: It should be in the Graphics/Characters folder. Use PBS/Metadata.txt to specify which graphic is used.

EDIT: I fixed the glitches that were happening with my new script! Go me!

.houndoomed
March 28th, 2008, 07:21 AM
Thanks for that Wichu. But I've just come across the weirdest error I ever got.

When I try to open the game project, a popup comes up saying 'Failed to Load Animation Data'. Any idea what this means? It's impossible to open the project. I never edited anything before this, including the line you just gave me. Would it be best to upgrade again and see if it works?

Wichu
March 28th, 2008, 08:11 AM
Have you got the Animations.rxdata file in your Data folder? If it's corrupt, you can just copy and paste it from a new project.

.houndoomed
March 28th, 2008, 08:17 AM
Darn, I think they're all corrupt, because when I replaced the Animations, another popup came up saying something else was wrong.. Guess I'll have to replace them all.

phoenixprime88b5
March 28th, 2008, 10:11 AM
I'm not sure what script tht the code goes to, you'll have to tell me so I can check it out, as for the switch, that works, so thanks for that part.

Demonic Budha
March 28th, 2008, 11:47 PM
Demonic Buddha: It should be in the Graphics/Characters folder. Use PBS/Metadata.txt to specify which graphic is used.

Ah thanks greatly for this Mr Guru. :D

Fangking Omega
March 29th, 2008, 04:11 AM
No worries about the displaying an image instead of text - I've managed to sort out my problem :)

New question, and my apologies for having so many XD - is there a way to set up a regional Pokédex as opposed to a national dex? And on top of that, is there a way to adjust the Pokédex so that if you press left or right instead of up or down it will scroll up or down ten slots?

Firemaker
March 29th, 2008, 05:27 AM
Check the notes on pokemon.txt for how to set up regional numbers, but I think for each pokemon you'd have to do something like this:

386(Nat. num.),12
Though I'm not sure of the exact placements of the numbers and such

Fangking Omega
March 29th, 2008, 06:00 AM
Aaaah, I think I must have missed that ;) thanks!

Lorem Ipsum
March 29th, 2008, 07:24 AM
How would you retrieve the IVs of a Pokémon in your party?

Zephyr Gale
March 29th, 2008, 08:41 AM
Fangking Omega: In the script SpriteResizer, you have to modify lines 11 and 12. The Resolution* script only handles centering the player on screen, as far as I can make out.

Phoenixprime (and the tons of others who get the same error): Try adding this line directly above the line causing the problem (line 1120):
id=0 if !id
I'm sure there's a better way, but at least it prevents the error.

Zephyr Gale: The line you're getting the error on refers to the Audio.dll file. Check if you have this file first; if you do, then specify more about when the error happens.

And usually, the problem lies with the first line on the list - the others are the lines that line refers to, which may contain an error instead. It's usually best to fix the first line before attempting anything with the rest. Hope I helped!

EDIT: This is what happens when you change the resolution without changing your graphics.
http://img205.imageshack.us/img205/6715/screenshot048fw7.png

Yeah I have that file.

I tried opening it and it said opening it could damage the program or whatever, so I did, then it told me it(the system) didnt know who the publisher was, So I just selected to use the internet to open the file.

and thats as far as I got.

EDIT: oh yeah, I get this message when I try to do a playing test....

Fangking Omega
March 29th, 2008, 09:20 AM
Been studying the notes but I can't quite get a handle on how to set up a regional dex. I don't quite know how the numbers should be organised in the .txt file - how should they be laid out exactly (and should all Pokémon have a Regional number, including 0 for all the ones that aren't in that particular region?), and how do you actually get the Dex to display them in regional order rather than national order until unlocking the National Dex?

Wichu
March 29th, 2008, 10:05 AM
Lorem: Use $Trainer.party[0].iv[0], where the first number is the position in the party (0 to 5), and the second is the stat you want (0 to 5, in the order HP - Attack - Defense - Speed - Special Attack - Special Defense)

Zephyr Gale: You don't open the file. You put it into the folder with Game.exe in it. I don't know why it's not working; maybe your Audio.dll is corrupt?

Fangking: I just looked at the Pokédex script, and as far as I can tell, poccil hasn't implemented Regional Dex into the Pokédex yet. I could have a go at implementing it tomorrow, as I have to get off the computer very soon. Oh, and there's something I want to PM you about.

Lorem Ipsum
March 29th, 2008, 10:10 AM
Which script section would I need to edit to edit the screen which allows you to continue, new game or options?

Demonic Budha
March 29th, 2008, 11:49 AM
Hello again resident guru.
Ive return for some aid. I am curently trying to add into the start sequence (when it says "Are you a boy or a girl") 2 .Gif images, of the Heros walking.
Ive used the command stated in the Notes file (but i belive it is incorrectly implamented)
As i get this error:
http://i80.photobucket.com/albums/j168/demonic_budha/Error.jpg

The Event gose:
Wait: 19 frame(s)
Script: GifSprite.new(swalking), Center, (240,120), (100%,100%), 255, Normal
Text: Firstly, Are you a Boy or a Girl?

Thanks again for any help your able to provide Wichu :D It is greatly appriciated by all.

victorspvl
March 29th, 2008, 02:22 PM
In the map 175 of my game this error ocurres

Exception: NoMethodError
Message: undefined method `<' for nil:NilClass
WindowAndTilemap:1120:in `refreshLayer0'
WindowAndTilemap:1118:in `each'
WindowAndTilemap:1118:in `refreshLayer0'
WindowAndTilemap:1116:in `each'
WindowAndTilemap:1116:in `refreshLayer0'
WindowAndTilemap:1115:in `each'
WindowAndTilemap:1115:in `refreshLayer0'
WindowAndTilemap:1274:in `refresh'
WindowAndTilemap:702:in `update'
WindowAndTilemap:1507:in `update'

why?

AtlantianTokRa
March 29th, 2008, 02:48 PM
ok has anyone got answers for these questions yet?
1. How can i make a pokemon have a hold item before the player gets it (e.g the starter coming equipped with oran berry)
2. How can a make a battle that lets you continue with the story even if you lose, like in FR/LG when you battle your rival in Oaks lab after getting your pokemon
3. Prevent the player from catching certain pokemon (like the ghost in lavender town)

and also
4. How to allow the player to catch certain trainer pokemon (e.g shadow pokemon)

Minorthreat0987
March 29th, 2008, 05:27 PM
I was wondering if anyone could help me with a few things.

1: When I try to do a map connection to a map that is more than a 100 tiles wide I get this error.

Exception: NoMethodError
Message: undefined method `<' for nil:NilClass
WindowAndTilemap:1120:in `refreshLayer0'
WindowAndTilemap:1118:in `each'
WindowAndTilemap:1118:in `refreshLayer0'
WindowAndTilemap:1116:in `each'
WindowAndTilemap:1116:in `refreshLayer0'
WindowAndTilemap:1115:in `each'
WindowAndTilemap:1115:in `refreshLayer0'
WindowAndTilemap:1274:in `refresh'
WindowAndTilemap:702:in `update'
WindowAndTilemap:1507:in `update'


2: Does anyone know how to change the color of the text in the Control explanation screen that is accessed during the beginning introduction. I really want to make it white because the dark colored txt is hard to read on the blue background.

Please and thank you to anyone who may help

Sincerely
Minorthreat

Demonic Budha
March 29th, 2008, 07:34 PM
From my observations, Minorthreat0987 and vicotrspvl, you guys have the same error?
I dont know why, just thought it was interesting :D

poccil
March 29th, 2008, 11:50 PM
I have made an update to Pokemon Essentials today. It includes a fix to the audio library which, I hope, eliminates the problem with background music, as well as small fixes and changes.

I will be maintaining Pokemon Essentials less and less frequently. Please report problems to me as private messages, since I will be busy with other interests I have.

Lorem Ipsum
March 30th, 2008, 01:19 AM
What does the command pbFadeOutIn() do in the scripts?

Firemaker
March 30th, 2008, 05:48 AM
3. Prevent the player from catching certain pokemon (like the ghost in lavender town)
Answer: Create a trainer type, you can't catch trainer pokemon. You would maybe need to do some other scripting though, the same with shadow pokemon, they aren't fully implemented in the game but its possible with enough scripts.

Wichu
March 30th, 2008, 06:14 AM
I'm pretty sure it could be relatively easily scripted (not being able to catch a Pokémon). Maybe turning a switch on and off before and after the battle, and either not letting the player use Balls or making the Pokémon break free every time while the switch is on. Or you could set the Pokémon's catch rate to 0 (may cause a problem if the player gets a Master Ball before).

victorspvl
March 30th, 2008, 08:16 AM
1. How can a make a battle that lets you continue with the story even if you lose, like in FR/LG when you battle your rival in Oaks lab after getting your pokemon

2.In the map 175 of my game this error ocurres

Exception: NoMethodError
Message: undefined method `<' for nil:NilClass
WindowAndTilemap:1120:in `refreshLayer0'
WindowAndTilemap:1118:in `each'
WindowAndTilemap:1118:in `refreshLayer0'
WindowAndTilemap:1116:in `each'
WindowAndTilemap:1116:in `refreshLayer0'
WindowAndTilemap:1115:in `each'
WindowAndTilemap:1115:in `refreshLayer0'
WindowAndTilemap:1274:in `refresh'
WindowAndTilemap:702:in `update'
WindowAndTilemap:1507:in `update'

why?

3.I like to do one event this?
When the switch 100 is on, the pokémon number 01 untill 250 go to the box.
And the Torchic(if i have) go to the party.
and, if possible, when the switch 100 is on the pokémons 01 untill 250 don't be withdraw from the box.

Please answer!!!

Zephyr Gale
March 30th, 2008, 08:34 AM
Lorem: Use $Trainer.party[0].iv[0], where the first number is the position in the party (0 to 5), and the second is the stat you want (0 to 5, in the order HP - Attack - Defense - Speed - Special Attack - Special Defense)

Zephyr Gale: You don't open the file. You put it into the folder with Game.exe in it. I don't know why it's not working; maybe your Audio.dll is corrupt?

Fangking: I just looked at the Pokédex script, and as far as I can tell, poccil hasn't implemented Regional Dex into the Pokédex yet. I could have a go at implementing it tomorrow, as I have to get off the computer very soon. Oh, and there's something I want to PM you about.

Alright then, I'll try that.

But as a quick question, how would I know if its Corrupt? (signs.)

Lorem Ipsum
March 30th, 2008, 09:23 AM
I have a load of questions.

1. How would you change the "New Game", "Continue" and "Options" screen at the beginning of the game?
2. How would you specify a tile on a map and change its terrain tag in a script section? And then how would you change that tile into a different tile altogether?
3. Is it possible to implement new key items that have effects, like the VS Seeker etc.?

Lorem Ipsum
March 30th, 2008, 09:28 AM
I have a load of questions.

1. How would you change the "New Game", "Continue" and "Options" screen at the beginning of the game?
2. How would you specify a tile on a map and change its terrain tag in a script section? And then how would you change that tile into a different tile altogether?
3. Is it possible to implement new key items that have effects, like the VS Seeker etc.?

imtheomega
March 30th, 2008, 10:21 AM
Lorem Ipsum , for your first question, go in the script editor, then in pokemonload and take a look at the lines 222-227 ;).

For your second question, i dont really see what u want to do or what u really ask... It is possible to change the properties of a tile in the database but i dont know if it is what u are looking for...

phoenixprime88b5
March 30th, 2008, 10:22 AM
I have a problem with the Partner Battles, the notes for it must be wrong for setting it up cause it;s not working and I'm still haveing that Windows&Tileset Error issue on the one map that it occurs on.

mad.array
March 30th, 2008, 10:58 AM
pheonixprime88b5: I had a problem with the trainer partner as well. If the game is crashing when you register the parnter trainer then put the script in a conditional branch. If you don't have the partner following you then that's standard. You have to set up an event dependancy as defined in notes.html. You have got all of the correct info intrainernames and trainers.txt, as well as all of the graphics you need right?

Fblaster
March 30th, 2008, 11:23 AM
I have a question.

Is it possible to insert/edit a caterpillar script so that one character follows you around?
Or other than that, is there any way to make dependent events continue to follow the character after a map change?

Thanks to anyone who might answer.

phoenixprime88b5
March 30th, 2008, 11:54 AM
pheonixprime88b5: I had a problem with the trainer partner as well. If the game is crashing when you register the parnter trainer then put the script in a conditional branch. If you don't have the partner following you then that's standard. You have to set up an event dependancy as defined in notes.html. You have got all of the correct info intrainernames and trainers.txt, as well as all of the graphics you need right?

I got it to work now, the character doesn't follow me though even though added the dependecy event.

imtheomega
March 30th, 2008, 12:02 PM
I have a question.

Is it possible to insert/edit a caterpillar script so that one character follows you around?
Or other than that, is there any way to make dependent events continue to follow the character after a map change?

Thanks to anyone who might answer.


Yes, it is possible. I found some tutorials and i simplified it. The thing is that for now, the followers cannot jump and the followers are juste images, they arent really in the party. For the jump thing, i will try to solve it.
Another problem is that i speak french, so the script is in french too :p.

By the way, if u type "caterpillar rmpx" in google, u will find caterpillar scripts ;). And if u really want mine, even if it is in french, u can ask it in pm ;).

Lorem Ipsum
March 30th, 2008, 12:14 PM
imtheomega, PM the script to me; I'll translate it into English for you if you like.

phoenixprime88b5
March 30th, 2008, 12:58 PM
I got the partner trainer to work perfectly now, thanks LokiFerne.

Wichu
March 31st, 2008, 06:38 AM
I've set the Netplay server up exactly according to Flameguru's instructions, but I get this error when I run it:
http://img528.imageshack.us/img528/113/errorkw2.png
Anyone know what's wrong? And how to fix it?

.houndoomed
March 31st, 2008, 08:38 AM
@Wichu, I'm the exact same... I did everything the tutorial said correctly, but it just won't work.

imtheomega
March 31st, 2008, 11:25 AM
I have a problem with the region map name. I changed it in townmap.txt but it doesn't change anything in the game (I replaced "sample region" by "kanto").

Isn't it the right way to do it? :s

Flameguru
March 31st, 2008, 12:01 PM
@Wichu, I'm the exact same... I did everything the tutorial said correctly, but it just won't work.

Poccil may have made some changes or something on your machines might be conflicting. All I know is that the server booted up and I was able to create an account, but that's all the further I could achieve without Poccil making more changes to make everything stable.

I'll take a look and see if I can get anything working with a new Essentials version.

mad.array
March 31st, 2008, 12:40 PM
I got the partner trainer to work perfectly now, thanks LokiFerne.

no problem. Glad to help.

Does anyone know a list of things that are missing from the kit? I know that these things are missing but I'm curious as to what else needs adding:

Captured icon on battle screen
D/P Moves
Dynamic shops that have TMs only if you've picked them up
Battle animations
Pokemon animations
3D buildings (dream on)
Music on main menu (Have added myself)
'Caught' music (also added)

Can anyone think of anything else? I know I've missed some things out.

imtheomega
March 31st, 2008, 01:33 PM
In the battle animations, Lokiferne, i dont know if u speak also about moving the pokemon...

Another thing wich is missing is the sounds of the attacks.



By the way, does someone has an answer to my region map's name problem?

Atomic Reactor
March 31st, 2008, 01:39 PM
the TM store can be done easily through events and switches.

just make multiple pages for the shop script.

and when u find a certain TM, put a "control switch: on"
so when you find it u can but it at the store..
but you would have to different variations and stuff.
or you can do a switch depending how far you get i nthe game..
idk. its not to hard.

have the slot games been added?
id like to see blackjack put in (i just saw the movie "21" lol)

how about some of the Apps. from D/P?
like the step counter. the douser thing. the drawing board.
those would be cool =)

phoenixprime88b5
March 31st, 2008, 02:59 PM
I'm still getting this:

Exception: NoMethodError
Message: undefined method `<' for nil:NilClass
WindowAndTilemap:1134:in `refreshLayer0'
WindowAndTilemap:1132:in `each'
WindowAndTilemap:1132:in `refreshLayer0'
WindowAndTilemap:1116:in `each'
WindowAndTilemap:1116:in `refreshLayer0'
WindowAndTilemap:1115:in `each'
WindowAndTilemap:1115:in `refreshLayer0'
WindowAndTilemap:1275:in `refresh'
WindowAndTilemap:702:in `update'
WindowAndTilemap:1508:in `update'

This error is keeping me and my beta testers from testing the game thoroughly, does anyone know what this is and how to fix it permentally? Please, any help is greatly appreciated.

Zephyr Gale
March 31st, 2008, 04:31 PM
Alright then, I'll try that.

But as a quick question, how would I know if its Corrupt? (signs.)

Answer anyone?.........^_^

Minorthreat0987
March 31st, 2008, 04:46 PM
I'm still getting this:

Exception: NoMethodError
Message: undefined method `<' for nil:NilClass
WindowAndTilemap:1134:in `refreshLayer0'
WindowAndTilemap:1132:in `each'
WindowAndTilemap:1132:in `refreshLayer0'
WindowAndTilemap:1116:in `each'
WindowAndTilemap:1116:in `refreshLayer0'
WindowAndTilemap:1115:in `each'
WindowAndTilemap:1115:in `refreshLayer0'
WindowAndTilemap:1275:in `refresh'
WindowAndTilemap:702:in `update'
WindowAndTilemap:1508:in `update'

This error is keeping me and my beta testers from testing the game thoroughly, does anyone know what this is and how to fix it permentally? Please, any help is greatly appreciated.

Yes, that one. Replace that script with the one given below. After I made the change and tested it, I didn't notice any further problems.
class WindowCursorRect < Rect
def initialize(window)
@window=window
@x=0
@y=0
@width=0
@height=0
end
attr_reader :x,:y,:width,:height
def empty
needupdate=@x!=0 || @y!=0 || @width!=0 || @height!=0
if needupdate
@x=0
@y=0
@width=0
@height=0
@window.width=@window.width
end
end
def set(x,y,width,height)
needupdate=@x!=x || @y!=y || @width!=width || @height!=height
if needupdate
@x=x
@y=y
@width=width
@height=height
@window.width=@window.width
end
end
def height=(value)
@height=value; @window.width=@window.width
end
def width=(value)
@width=value; @window.width=@window.width
end
def x=(value)
@x=value; @window.width=@window.width
end
def y=(value)
@y=value; @window.width=@window.width
end
end
class Window
attr_reader :tone
attr_reader :color
attr_reader :blend_type
attr_reader :viewport
attr_reader :contents
attr_reader :ox
attr_reader :oy
attr_reader :x
attr_reader :y
attr_reader :z
attr_reader :width
attr_reader :active
attr_reader :pause
attr_reader :height
attr_reader :opacity
attr_reader :back_opacity
attr_reader :contents_opacity
attr_reader :visible
attr_reader :cursor_rect
attr_reader :openness
def windowskin
@_windowskin
end
def initialize(viewport=nil)
@sprites={}
@spritekeys=[
"back",
"corner0","side0","scroll0",
"corner1","side1","scroll1",
"corner2","side2","scroll2",
"corner3","side3","scroll3",
"cursor","contents","pause"
]
@sidebitmaps=[nil,nil,nil,nil]
@cursorbitmap=nil
@bgbitmap=nil
@viewport=viewport
for i in @spritekeys
@sprites[i]=Sprite.new(@viewport)
end
@disposed=false
@tone=Tone.new(0,0,0)
@color=Color.new(0,0,0,0)
@contents=nil
@_windowskin=nil
@rpgvx=false
@x=0
@y=0
@width=0
@openness=255
@height=0
@ox=0
@oy=0
@z=0
@stretch=true
@visible=true
@active=true
@blend_type=0
@opacity=255
@back_opacity=255
@contents_opacity=255
@cursor_rect=WindowCursorRect.new(self)
@cursorblink=0
@cursoropacity=255
@pause=false
@pauseopacity=255
@pauseframe=0
privRefresh(true)
end
def dispose
if !self.disposed?
for i in @sprites
i[1].dispose if i[1]
@sprites[i[0]]=nil
end
for i in 0...@sidebitmaps.length
@sidebitmaps[i].dispose if @sidebitmaps[i]
@sidebitmaps[i]=nil
end
@cursorbitmap.dispose if @cursorbitmap
@backbitmap.dispose if @backbitmap
@sprites.clear
@sidebitmaps.clear
@_windowskin=nil
@_contents=nil
@disposed=true
end
end
def openness=(value)
@openness=value
@openness=0 if @openness<0
@openness=255 if @openness>255
privRefresh
end
def stretch=(value)
@stretch=value
privRefresh(true)
end
def visible=(value)
@visible=value
privRefresh
end
def viewport=(value)
@viewport=value
for i in @spritekeys
@sprites[i].dispose
if @sprites[i].is_a?(Sprite)
@sprites[i]=Sprite.new(@viewport)
elsif @sprites[i].is_a?(Plane)
@sprites[i]=Plane.new(@viewport)
else
@sprites[i]=nil
end
end
privRefresh(true)
end
def z=(value)
@z=value
privRefresh
end
def disposed?
return @disposed
end
def contents=(value)
@contents=value
privRefresh
end
def windowskin=(value)
@_windowskin=value
if value && value.is_a?(Bitmap) && !value.disposed? && value.width==128
@rpgvx=true
else
@rpgvx=false
end
privRefresh(true)
end
def ox=(value)
@ox=value
privRefresh
end
def active=(value)
@active=value
privRefresh(true)
end
def cursor_rect=(value)
if !value
@cursor_rect.empty
else
@cursor_rect.set(value.x,value.y,value.width,value.height)
end
end
def oy=(value)
@oy=value
privRefresh
end
def width=(value)
@width=value
privRefresh(true)
end
def height=(value)
@height=value
privRefresh(true)
end
def pause=(value)
@pause=value
@pauseopacity=0 if !value
privRefresh
end
def x=(value)
@x=value
privRefresh
end
def y=(value)
@y=value
privRefresh
end
def opacity=(value)
@opacity=value
@opacity=0 if @opacity<0
@opacity=255 if @opacity>255
privRefresh
end
def back_opacity=(value)
@back_opacity=value
@back_opacity=0 if @back_opacity<0
@back_opacity=255 if @back_opacity>255
privRefresh
end
def contents_opacity=(value)
@contents_opacity=value
@contents_opacity=0 if @contents_opacity<0
@contents_opacity=255 if @contents_opacity>255
privRefresh
end
def tone=(value)
@tone=value
privRefresh
end
def color=(value)
@color=value
privRefresh
end
def blend_type=(value)
@blend_type=value
privRefresh
end
def flash(color,duration)
return if disposed?
for i in @sprites
i[1].flash(color,duration)
end
end
def update
return if disposed?
mustchange=false
if @active
if @cursorblink==0
@cursoropacity-=8
@cursorblink=1 if @cursoropacity<=128
else
@cursoropacity+=8
@cursorblink=0 if @cursoropacity>=255
end
mustchange=true
else
mustchange=true if @cursoropacity!=128
@cursoropacity=128
end
if @pause
@pauseframe=(Graphics.frame_count / 8) % 4
@pauseopacity=[@pauseopacity+64,255].min
mustchange=true
end
privRefresh if mustchange
for i in @sprites
i[1].update
end
end
private
def ensureBitmap(bitmap,dwidth,dheight)
if !bitmap||bitmap.disposed?||bitmap.width<dwidth||bitmap.height<dheight
bitmap.dispose if bitmap
bitmap=Bitmap.new([1,dwidth].max,[1,dheight].max)
end
return bitmap
end
def tileBitmap(dstbitmap,dstrect,srcbitmap,srcrect)
return if !srcbitmap || srcbitmap.disposed?
left=dstrect.x
top=dstrect.y
y=0;loop do break unless y<dstrect.height
x=0;loop do break unless x<dstrect.width
dstbitmap.blt(x+left,y+top,srcbitmap,srcrect)
x+=srcrect.width
end
y+=srcrect.height
end
end
def privRefresh(changeBitmap=false)
return if self.disposed?
backopac=self.back_opacity*self.opacity/255
contopac=self.contents_opacity
cursoropac=@cursoropacity*contopac/255
for i in 0...4
@sprites["corner#{i}"].bitmap=@_windowskin
@sprites["scroll#{i}"].bitmap=@_windowskin
end
@sprites["pause"].bitmap=@_windowskin
@sprites["contents"].bitmap=@contents
if @_windowskin && !@_windowskin.disposed?
for i in 0...4
@sprites["corner#{i}"].opacity=@opacity
@sprites["corner#{i}"].tone=@tone
@sprites["corner#{i}"].color=@color
@sprites["corner#{i}"].blend_type=@blend_type
@sprites["corner#{i}"].visible=@visible
@sprites["side#{i}"].opacity=@opacity
@sprites["side#{i}"].tone=@tone
@sprites["side#{i}"].color=@color
@sprites["side#{i}"].blend_type=@blend_type
@sprites["side#{i}"].visible=@visible
@sprites["scroll#{i}"].opacity=@opacity
@sprites["scroll#{i}"].tone=@tone
@sprites["scroll#{i}"].blend_type=@blend_type
@sprites["scroll#{i}"].color=@color
@sprites["scroll#{i}"].visible=@visible
end
for i in ["back","cursor","pause","contents"]
@sprites[i].color=@color
@sprites[i].tone=@tone
@sprites[i].blend_type=@blend_type
end
@sprites["contents"].blend_type=0
@sprites["back"].opacity=backopac
@sprites["contents"].opacity=contopac
@sprites["cursor"].opacity=cursoropac
@sprites["pause"].opacity=@pauseopacity
@sprites["back"].visible=@visible
@sprites["contents"].visible=@visible && @openness==255
@sprites["pause"].visible=@visible && @pause
@sprites["cursor"].visible=@visible
hascontents=(@contents && !@contents.disposed?)
@sprites["scroll0"].visible = @visible && hascontents && @oy > 0
@sprites["scroll1"].visible = @visible && hascontents && @ox > 0
@sprites["scroll2"].visible = @visible && hascontents && (@contents.width - @ox) > @width-32
@sprites["scroll3"].visible = @visible && hascontents && (@contents.height - @oy) > @height-32
else
for i in 0...4
@sprites["corner#{i}"].visible=false
@sprites["side#{i}"].visible=false
@sprites["scroll#{i}"].visible=false
end
@sprites["contents"].visible=@visible && @openness==255
@sprites["contents"].color=@color
@sprites["contents"].tone=@tone
# @sprites["contents"].blend_type=@blend_type
@sprites["contents"].opacity=contopac
@sprites["back"].visible=false
@sprites["pause"].visible=false
@sprites["cursor"].visible=false
end
for i in @sprites
i[1].z=@z
end
@sprites["cursor"].z=@z+1 # For Compatibility
@sprites["contents"].z=@z+2 # For Compatibility
@sprites["pause"].z=@z+2 # For Compatibility
if @rpgvx
trimX=64
trimY=0
backRect=Rect.new(0,0,64,64)
blindsRect=Rect.new(0,64,64,64)
else
trimX=128
trimY=0
backRect=Rect.new(0,0,128,128)
blindsRect=nil
end
@sprites["corner0"].src_rect.set(trimX,trimY+0,16,16);
@sprites["corner1"].src_rect.set(trimX+48,trimY+0,16,16);
@sprites["corner2"].src_rect.set(trimX,trimY+48,16,16);
@sprites["corner3"].src_rect.set(trimX+48,trimY+48,16,16);
@sprites["scroll0"].src_rect.set(trimX+24, trimY+16, 16, 8) # up
@sprites["scroll3"].src_rect.set(trimX+24, trimY+40, 16, 8) # down
@sprites["scroll1"].src_rect.set(trimX+16, trimY+24, 8, 16) # left
@sprites["scroll2"].src_rect.set(trimX+40, trimY+24, 8, 16) # right
cursorX=trimX
cursorY=trimY+64
sideRects=[
Rect.new(trimX+16,trimY+0,32,16),
Rect.new(trimX,trimY+16,16,32),
Rect.new(trimX+48,trimY+16,16,32),
Rect.new(trimX+16,trimY+48,32,16)
]
if @width>32 && @height>32
@sprites["contents"].src_rect.set(@ox,@oy,@width-32,@height-32)
else
@sprites["contents"].src_rect.set(0,0,0,0)
end
pauseRects=[
trimX+32,trimY+64,
trimX+48,trimY+64,
trimX+32,trimY+80,
trimX+48,trimY+80,
]
pauseWidth=16
pauseHeight=16
@sprites["pause"].src_rect.set(
pauseRects[@pauseframe*2],
pauseRects[@pauseframe*2+1],
pauseWidth,pauseHeight
)
@sprites["pause"].x=@x+(@width/2)-(pauseWidth/2)
@sprites["pause"].y=@y+@height-16 # 16 refers to skin margin
@sprites["contents"].x=@x+16
@sprites["contents"].y=@y+16
@sprites["corner0"].x=@x
@sprites["corner0"].y=@y
@sprites["corner1"].x=@x+@width-16
@sprites["corner1"].y=@y
@sprites["corner2"].x=@x
@sprites["corner2"].y=@y+@height-16
@sprites["corner3"].x=@x+@width-16
@sprites["corner3"].y=@y+@height-16
@sprites["side0"].x=@x+16
@sprites["side0"].y=@y
@sprites["side1"].x=@x
@sprites["side1"].y=@y+16
@sprites["side2"].x=@x+@width-16
@sprites["side2"].y=@y+16
@sprites["side3"].x=@x+16
@sprites["side3"].y=@y+@height-16
@sprites["scroll0"].x = @x+@width / 2 - 8
@sprites["scroll0"].y = @y+8
@sprites["scroll1"].x = @x+8
@sprites["scroll1"].y = @y+@height / 2 - 8
@sprites["scroll2"].x = @x+@width - 16
@sprites["scroll2"].y = @y+@height / 2 - 8
@sprites["scroll3"].x = @x+@width / 2 - 8
@sprites["scroll3"].y = @y+@height - 16
@sprites["back"].x=@x+2
@sprites["back"].y=@y+2
@sprites["cursor"].x=@x+16+@cursor_rect.x
@sprites["cursor"].y=@y+16+@cursor_rect.y
if changeBitmap && @_windowskin && !@_windowskin.disposed?
width=@cursor_rect.width
height=@cursor_rect.height
if width > 0 && height > 0
cursorrects=[
# sides
Rect.new(cursorX+2, cursorY+0, 28, 2),
Rect.new(cursorX+0, cursorY+2, 2, 28),
Rect.new(cursorX+30, cursorY+2, 2, 28),
Rect.new(cursorX+2, cursorY+30, 28, 2),
# corners
Rect.new(cursorX+0, cursorY+0, 2, 2),
Rect.new(cursorX+30, cursorY+0, 2, 2),
Rect.new(cursorX+0, cursorY+30, 2, 2),
Rect.new(cursorX+30, cursorY+30, 2, 2),
# back
Rect.new(cursorX+2, cursorY+2, 28, 28)
]
margin=2
fullmargin=4
@cursorbitmap = ensureBitmap(@cursorbitmap, width, height)
@cursorbitmap.clear
@sprites["cursor"].bitmap=@cursorbitmap
@sprites["cursor"].src_rect.set(0,0,width,height)
rect = Rect.new(margin,margin,
width - fullmargin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8])
@cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4])# top left
@cursorbitmap.blt(width-margin, 0, @_windowskin, cursorrects[5]) # top right
@cursorbitmap.blt(0, height-margin, @_windowskin, cursorrects[6]) # bottom right
@cursorbitmap.blt(width-margin, height-margin, @_windowskin, cursorrects[7]) # bottom left
rect = Rect.new(margin, 0,
width - fullmargin, margin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0])
rect = Rect.new(0, margin,
margin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1])
rect = Rect.new(width - margin, margin,
margin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2])
rect = Rect.new(margin, height-margin,
width - fullmargin, margin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3])
else
@sprites["cursor"].visible=false
@sprites["cursor"].src_rect.set(0,0,0,0)
end
for i in 0..3
dwidth=(i==0||i==3) ? @width-32 : 16
dheight=(i==0||i==3) ? 16 : @height-32
@sidebitmaps[i]=ensureBitmap(@sidebitmaps[i],dwidth,dheight)
@sprites["side#{i}"].bitmap=@sidebitmaps[i]
@sprites["side#{i}"].src_rect.set(0,0,dwidth,dheight)
@sidebitmaps[i].clear
if sideRects[i].width>0 && sideRects[i].height>0
@sidebitmaps[i].stretch_blt(@sprites["side#{i}"].src_rect,
@_windowskin,sideRects[i])
end
end
backwidth=@width-4
backheight=@height-4
if backwidth>0 && backheight>0
@backbitmap=ensureBitmap(@backbitmap,backwidth,backheight)
@sprites["back"].bitmap=@backbitmap
@sprites["back"].src_rect.set(0,0,backwidth,backheight)
@backbitmap.clear
if @stretch
@backbitmap.stretch_blt(@sprites["back"].src_rect,@_windowskin,backRect)
else
tileBitmap(@backbitmap,@sprites["back"].src_rect,@_windowskin,backRect)
end
if blindsRect
tileBitmap(@backbitmap,@sprites["back"].src_rect,@_windowskin,blindsRect)
end
else
@sprites["back"].visible=false
@sprites["back"].src_rect.set(0,0,0,0)
end
end
if @openness!=255
opn=@openness/255.0
for k in @spritekeys
sprite=@sprites[k]
ratio=(@height<=0) ? 0 : (sprite.y-@y)*1.0/@height
sprite.zoom_y=opn
sprite.oy=0
sprite.y=(@y+(@height/2.0)+(@height*ratio*opn)-(@height/2*opn)).floor
oldbitmap=sprite.bitmap
oldsrcrect=sprite.src_rect.clone
end
else
for k in @spritekeys
sprite=@sprites[k]
sprite.zoom_y=1.0
end
end
i=0
# Ensure Z order
for k in @spritekeys
sprite=@sprites[k]
y=sprite.y
sprite.y=i
sprite.oy=(sprite.zoom_y<=0) ? 0 : (i-y)/sprite.zoom_y
end
end
end


class CustomTilemapAutotiles
attr_accessor :changed
def initialize
@changed=true
@tiles=[nil,nil,nil,nil,nil,nil,nil]
end
def []=(i,value)
@tiles[i]=value
@changed=true
end
def [](i)
return @tiles[i]
end
end

class CustomTilemap
Animated_Autotiles_Frames = 15
Autotiles = [
[ [27, 28, 33, 34], [ 5, 28, 33, 34], [27, 6, 33, 34], [ 5, 6, 33, 34],
[27, 28, 33, 12], [ 5, 28, 33, 12], [27, 6, 33, 12], [ 5, 6, 33, 12] ],
[ [27, 28, 11, 34], [ 5, 28, 11, 34], [27, 6, 11, 34], [ 5, 6, 11, 34],
[27, 28, 11, 12], [ 5, 28, 11, 12], [27, 6, 11, 12], [ 5, 6, 11, 12] ],
[ [25, 26, 31, 32], [25, 6, 31, 32], [25, 26, 31, 12], [25, 6, 31, 12],
[15, 16, 21, 22], [15, 16, 21, 12], [15, 16, 11, 22], [15, 16, 11, 12] ],
[ [29, 30, 35, 36], [29, 30, 11, 36], [ 5, 30, 35, 36], [ 5, 30, 11, 36],
[39, 40, 45, 46], [ 5, 40, 45, 46], [39, 6, 45, 46], [ 5, 6, 45, 46] ],
[ [25, 30, 31, 36], [15, 16, 45, 46], [13, 14, 19, 20], [13, 14, 19, 12],
[17, 18, 23, 24], [17, 18, 11, 24], [41, 42, 47, 48], [ 5, 42, 47, 48] ],
[ [37, 38, 43, 44], [37, 6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44],
[37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [ 1, 2, 7, 8] ]
]
FlashOpacity=[100,90,80,70,80,90]
attr_reader :tileset
attr_reader :autotiles
attr_reader :map_data
attr_accessor :flash_data
attr_accessor :priorities
attr_reader :visible
attr_accessor :ox
attr_accessor :oy
attr_reader :viewport
attr_accessor :tone
attr_accessor :color
def graphicsHeight
return 480
end
def graphicsWidth
return 640
end
def initialize(viewport)
@tileset = nil # Refers to Map Tileset Name
@autotiles = CustomTilemapAutotiles.new
@map_data = nil # Refers to 3D Array Of Tile Settings
@flash_data = nil # Refers to 3D Array of Tile Flashdata
@priorities = nil # Refers to Tileset Priorities
@visible = true # Refers to Tileset Visibleness
@ox = 0 # Bitmap Offsets
@oy = 0 # bitmap Offsets
@plane = false
@tone=Tone.new(0,0,0,0)
@color=Color.new(0,0,0,0)
@oldtone=Tone.new(0,0,0,0)
@oldcolor=Color.new(0,0,0,0)
@selfviewport=Viewport.new(0,0,graphicsWidth,graphicsHeight)
@viewport=viewport ? viewport : @selfviewport
@tiles=[]
@autotileInfo=[]
@regularTileInfo=[]
@oldOx=0
@oldOy=0
@layer0=Sprite.new(viewport)
@layer0.visible=true
@nowshown=false
@layer0.bitmap=Bitmap.new([graphicsWidth*2,1].max,[graphicsHeight*2,1].max)
@flash=nil
@layer0.ox=0
@layer0.oy=0
@oxLayer0=0
@oyLayer0=0
@oxFlash=0
@oyFlash=0
@layer0.z=0
@priotiles=[]
@prioautotiles=[]
@autosprites=[]
@framecount=[]
@tilesetChanged=true
@flashChanged=false
@firsttime=true
@disposed=false
@usedsprites=false
@layer0clip=true
@firsttimeflash=true
@fullyrefreshed=false
@fullyrefreshedautos=false
end
def disposed?
return @disposed
end
def flash_data=(value)
@flash_data=value
@flashChanged=true
end
def update
if @oldtone!=@tone
@layer0.tone=@tone
@flash.tone=@tone if @flash
for sprite in @autosprites
sprite.tone=@tone
end
for sprite in @tiles
sprite.tone=@tone if sprite.is_a?(Sprite)
end
@oldtone=@tone.clone
end
if @oldcolor!=@color
@layer0.color=@color
@flash.color=@color if @flash
for sprite in @autosprites
sprite.color=@color
end
for sprite in @tiles
sprite.color=@color if sprite.is_a?(Sprite)
end
@oldcolor=@color.clone
end
if @autotiles.changed
refresh_autotiles
repaintAutotiles
end
if @flashChanged
refresh_flash
end
if @tilesetChanged
refresh_tileset
end
if @flash
@flash.opacity=FlashOpacity[(Graphics.frame_count/2) % 6]
end
if !(@oldOx==@ox && @oldOy==@oy &&
!@tilesetChanged &&
!@autotiles.changed)
refresh
end
if (Graphics.frame_count % Animated_Autotiles_Frames == 0) || @nowshown
repaintAutotiles
refresh(true)
end
@nowshown=false
@autotiles.changed=false
@tilesetChanged=false
end
def priorities=(value)
@priorities=value
@tilesetChanged=true
end
def tileset=(value)
@tileset=value
@tilesetChanged=true
end
def shown?
return false if !@visible
ysize=@map_data.ysize
xsize=@map_data.xsize
xStart=(@ox/32)-1
xEnd=((@[email protected])/32)+1
yStart=(@oy/32)-1
yEnd=((@[email protected])/32)+1
xStart=0 if xStart<0
xStart=xsize-1 if xStart>=xsize
xEnd=0 if xEnd<0
xEnd=xsize-1 if xEnd>=xsize
yStart=0 if yStart<0
yStart=ysize-1 if yStart>=ysize
yEnd=0 if yEnd<0
yEnd=ysize-1 if yEnd>=ysize
return (xStart<xEnd && yStart<yEnd)
end
def dispose
return if disposed?
@help.dispose if @help
@help=nil
i=0;len=@autotileInfo.length;while i<len
if @autotileInfo[i]
@autotileInfo[i].dispose
@autotileInfo[i]=nil
end
i+=1
end
i=0;len=@regularTileInfo.length;while i<len
if @regularTileInfo[i]
@regularTileInfo[i].dispose
@regularTileInfo[i]=nil
end
i+=1
end
i=0;len=@tiles.length;while i<len
@tiles[i].dispose
@tiles[i]=nil
i+=2
end
i=0;len=@autosprites.length;while i<len
@autosprites[i].dispose
@autosprites[i]=nil
i+=2
end
if @layer0
@layer0.bitmap.dispose if !@layer0.disposed?
@layer0.bitmap=nil if !@layer0.disposed?
@layer0.dispose
@layer0=nil
end
if @flash
@flash.bitmap.dispose if !@flash.disposed?
@flash.bitmap=nil if !@flash.disposed?
@flash.dispose
@flash=nil
end
for i in 0...7
self.autotiles[i]=nil
end
@tiles.clear
@autosprites.clear
@autotileInfo.clear
@regularTileInfo.clear
@tilemap=nil
@tileset=nil
@priorities=nil
@selfviewport.dispose
@selfviewport=nil
@disposed=true
end

def bltAutotile(bitmap,x,y,id,frame)
return if frame<0
autotile=@autotiles[id/48-1]
return if !autotile
if autotile.height==32
anim=frame<<5
src_rect=Rect.new(anim,0,32,32)
bitmap.blt(x,y,autotile,src_rect)
else
anim=frame*96
id%=48
tiles = Autotiles[id>>3][id&7]
src=Rect.new(0,0,0,0)
for i in 0...4
tile_position = tiles[i] - 1
src.set(
(tile_position % 6)*16 + anim,
(tile_position / 6)*16, 16, 16)
bitmap.blt(i%2*16+x,i/2*16+y, autotile, src)
end
end
end

def autotileNumFrames(id)
autotile=@autotiles[id/48-1]
return 0 if !autotile || autotile.disposed?
frames=1
if autotile.height==32
frames=autotile.width>>5
else
frames=autotile.width/96
end
return frames
end

def autotileFrame(id)
autotile=@autotiles[id/48-1]
return -1 if !autotile || autotile.disposed?
frames=1
if autotile.height==32
frames=autotile.width>>5
else
frames=autotile.width/96
end
return (Graphics.frame_count/Animated_Autotiles_Frames)%frames
end

def repaintAutotiles
for i in 0...@autotileInfo.length
next if !@autotileInfo[i]
frame=autotileFrame(i)
bltAutotile(@autotileInfo[i],0,0,i,frame)
end
end

def getAutotile(sprite,id)
anim=autotileFrame(id)
return if anim<0
bitmap=@autotileInfo[id]
if !bitmap
bitmap=Bitmap.new(32,32)
bltAutotile(bitmap,0,0,id,anim)
@autotileInfo[id]=bitmap
end
sprite.bitmap=bitmap if !sprite.equal?(bitmap) || sprite.bitmap!=bitmap
end

def getRegularTile(sprite,id)
if false
sprite.bitmap=@tileset if !sprite.equal?(@tileset) || sprite.bitmap!=@tileset
sprite.src_rect.set(((id - 384)&7)<<5,((id - 384)>>3)<<5,32,32)
else
bitmap=@regularTileInfo[id]
if !bitmap
bitmap=Bitmap.new(32,32)
rect=Rect.new(((id - 384)&7)<<5,((id - 384)>>3)<<5,32,32)
bitmap.blt(0,0,@tileset,rect)
@regularTileInfo[id]=bitmap
end
sprite.bitmap=bitmap if !sprite.equal?(bitmap) || sprite.bitmap!=bitmap
end
end

def addTile(tiles,count,xpos,ypos,id)
if id>=384
if count>=tiles.length
sprite=Sprite.new(@viewport)
tiles.push(sprite,0)
else
sprite=tiles[count]
tiles[count+1]=0
end
sprite.visible=@visible
sprite.x=xpos
sprite.y=ypos
sprite.tone=@tone
sprite.color=@color
getRegularTile(sprite,id)
spriteZ=(@priorities[id]==0||!@priorities[id]) ? 0 : ypos+@priorities[id]*32+32
sprite.z=spriteZ
count+=2
else
if count>=tiles.length
sprite=Sprite.new(@viewport)
tiles.push(sprite,1)
else
sprite=tiles[count]
tiles[count+1]=1
end
sprite.visible=@visible
sprite.x=xpos
sprite.y=ypos
sprite.tone=@tone
sprite.color=@color
getAutotile(sprite,id)
spriteZ=(@priorities[id]==0||!@priorities[id]) ? 0 : ypos+@priorities[id]*32+32
sprite.z=spriteZ
count+=2
end
return count
end

def refresh_tileset
i=0;len=@regularTileInfo.length;while i<len
if @regularTileInfo[i]
@regularTileInfo[i].dispose
@regularTileInfo[i]=nil
end
i+=1
end
@regularTileInfo.clear
@priotiles.clear
ysize=@map_data.ysize
xsize=@map_data.xsize
zsize=@map_data.zsize
if xsize>100 || ysize>100
@fullyrefreshed=false
else
for z in 0...zsize
for y in 0...ysize
for x in 0...xsize
id = @map_data[x, y, z]
next if id==0 || !@priorities[id]
next if @priorities[id]==0
@priotiles.push([x,y,z,id])
end
end
end
@fullyrefreshed=true
end
end

def refresh_flash
if @flash_data && !@flash
@flash=Sprite.new(viewport)
@flash.visible=true
@flash.z=1
@flash.blend_type=1
@flash.bitmap=Bitmap.new([graphicsWidth*2,1].max,[graphicsHeight*2,1].max)
@firsttimeflash=true
elsif !@flash_data && @flash
@flash.bitmap.dispose if @flash.bitmap
@flash.dispose
@flash=nil
@firsttimeflash=false
end
end

def refresh_autotiles
i=0;len=@autotileInfo.length;while i<len
if @autotileInfo[i]
@autotileInfo[i].dispose
@autotileInfo[i]=nil
end
i+=1
end
i=0;len=@autosprites.length;while i<len
if @autosprites[i]
@autosprites[i].dispose
@autosprites[i]=nil
end
i+=2
end
@autosprites.clear
@autotileInfo.clear
@prioautotiles.clear
hasanimated=false
for i in 0...7
numframes=autotileNumFrames(48*(i+1))
hasanimated=true if numframes>=2
@framecount[i]=numframes
end
if hasanimated
ysize=@map_data.ysize
xsize=@map_data.xsize
zsize=@map_data.zsize
if xsize>100 || ysize>100
@fullyrefreshedautos=false
else
for y in 0...ysize
for x in 0...xsize
haveautotile=false
for z in 0...zsize
id = @map_data[x, y, z]
next if id==0 || id>=384 || @priorities[id]!=0 || !@priorities[id]
next if @framecount[id/48-1]<2
haveautotile=true
break
end
@prioautotiles.push([x,y]) if haveautotile
end
end
@fullyrefreshedautos=true
end
else
@fullyrefreshedautos=true
end
end

def map_data=(value)
@map_data=value
@tilesetChanged=true
end

def refreshFlashSprite
return if !@flash || @flash_data.nil?
ptX=@ox-@oxFlash
ptY=@oy-@oyFlash
if !@firsttimeflash && !@usedsprites &&
ptX>=0 && [email protected]<=@flash.bitmap.width &&
ptY>=0 && [email protected]<=@flash.bitmap.height
@flash.ox=0
@flash.oy=0
@flash.src_rect.set(ptX.round,ptY.round,
@viewport.rect.width,@viewport.rect.height)
return
end
width=@flash.bitmap.width
height=@flash.bitmap.height
bitmap=@flash.bitmap
ysize=@map_data.ysize
xsize=@map_data.xsize
zsize=@map_data.zsize
@firsttimeflash=false
@oxFlash=@ox-(width>>2)
@oyFlash=@oy-(height>>2)
@flash.ox=0
@flash.oy=0
@flash.src_rect.set(width>>2,height>>2,
@viewport.rect.width,@viewport.rect.height)
@flash.bitmap.clear
@oxFlash=@oxFlash.floor
@oyFlash=@oyFlash.floor
xStart=(@oxFlash>>5)
xStart=0 if xStart<0
yStart=(@oyFlash>>5)
yStart=0 if yStart<0
xEnd=xStart+(width>>5)+1
yEnd=yStart+(height>>5)+1
xEnd=xsize if xEnd>=xsize
yEnd=ysize if yEnd>=ysize
if xStart<xEnd && yStart<yEnd
yrange=yStart...yEnd
xrange=xStart...xEnd
tmpcolor=Color.new(0,0,0,0)
for y in yrange
ypos=(y<<5)-@oyFlash
for x in xrange
xpos=(x<<5)-@oxFlash
id = @flash_data[x, y, 0]
r=(id>>8)&15
g=(id>>4)&15
b=(id)&15
tmpcolor.set(r<<4,g<<4,b<<4)
bitmap.fill_rect(xpos,ypos,32,32,tmpcolor)
end
end
end
end


def refreshLayer0(autotiles=false)
if autotiles
return true if !shown?
end
ptX=@ox-@oxLayer0
ptY=@oy-@oyLayer0
if !autotiles && !@firsttime && !@usedsprites &&
ptX>=0 && [email protected]<=@layer0.bitmap.width &&
ptY>=0 && [email protected]<=@layer0.bitmap.height
if @layer0clip
@layer0.ox=0
@layer0.oy=0
@layer0.src_rect.set(ptX.round,ptY.round,
@viewport.rect.width,@viewport.rect.height)
else
@layer0.ox=ptX.round
@layer0.oy=ptY.round
@layer0.src_rect.set(0,0,@layer0.bitmap.width,@layer0.bitmap.height)
end
return true
end
width=@layer0.bitmap.width
height=@layer0.bitmap.height
bitmap=@layer0.bitmap
ysize=@map_data.ysize
xsize=@map_data.xsize
zsize=@map_data.zsize
if autotiles
return true if @fullyrefreshedautos && @prioautotiles.length==0
xStart=(@oxLayer0>>5)
xStart=0 if xStart<0
yStart=(@oyLayer0>>5)
yStart=0 if yStart<0
xEnd=xStart+(width>>5)+1
yEnd=yStart+(height>>5)+1
xEnd=xsize if xEnd>xsize
yEnd=ysize if yEnd>ysize
return true if xStart>=xEnd || yStart>=yEnd
trans=Color.new(0,0,0,0)
temprect=Rect.new(0,0,0,0)
tilerect=Rect.new(0,0,32,32)
range=0...zsize
overallcount=0
count=0
if !@fullyrefreshedautos
for y in yStart..yEnd
for x in xStart..xEnd
haveautotile=false
for z in range
id = @map_data[x, y, z]
next if !id || id<48 || id>=384 || @priorities[id]!=0 || !@priorities[id]
fcount=@framecount[id/48-1]
next if !fcount || fcount<2
if !haveautotile
haveautotile=true
overallcount+=1
xpos=(x<<5)-@oxLayer0
ypos=(y<<5)-@oyLayer0
bitmap.fill_rect(xpos,ypos,0,0,trans) if overallcount<=2000
break
end
end
for z in range
id = @map_data[x,y,z]
next if !id || id<48 || @priorities[id]!=0 || !@priorities[id]
if overallcount>2000
xpos=(x<<5)-@oxLayer0
ypos=(y<<5)-@oyLayer0
count=addTile(@autosprites,count,xpos,ypos,id)
next
elsif id>=384
temprect.set(((id - 384)&7)<<5,((id - 384)>>3)<<5,32,32)
xpos=(x<<5)-@oxLayer0
ypos=(y<<5)-@oyLayer0
bitmap.blt(xpos,ypos,@tileset,temprect)
else
tilebitmap=@autotileInfo[id]
if !tilebitmap
anim=autotileFrame(id)
next if anim<0
tilebitmap=Bitmap.new(32,32)
bltAutotile(tilebitmap,0,0,id,anim)
@autotileInfo[id]=tilebitmap
end
xpos=(x<<5)-@oxLayer0
ypos=(y<<5)-@oyLayer0
bitmap.blt(xpos,ypos,tilebitmap,tilerect)
end
end
end
end
Graphics.frame_reset
else
for tile in @prioautotiles
x=tile[0]
y=tile[1]
next if x<xStart||x>xEnd
next if y<yStart||y>yEnd
overallcount+=1
xpos=(x<<5)-@oxLayer0
ypos=(y<<5)-@oyLayer0
bitmap.fill_rect(xpos,ypos,0,0,trans) if overallcount<=2000
for z in range
id = @map_data[x,y,z]
next if !id || id<48 || @priorities[id]!=0 || !@priorities[id]
if overallcount>2000
count=addTile(@autosprites,count,xpos,ypos,id)
next
elsif id>=384
temprect.set(((id - 384)&7)<<5,((id - 384)>>3)<<5,32,32)
bitmap.blt(xpos,ypos,@tileset,temprect)
else
tilebitmap=@autotileInfo[id]
if !tilebitmap
anim=autotileFrame(id)
next if anim<0
tilebitmap=Bitmap.new(32,32)
bltAutotile(tilebitmap,0,0,id,anim)
@autotileInfo[id]=tilebitmap
end
bitmap.blt(xpos,ypos,tilebitmap,tilerect)
end
end
end
Graphics.frame_reset if overallcount>2000
end
@usedsprites=false
return true
end
return false if @usedsprites
@firsttime=false
@oxLayer0=@ox-(width>>2)
@oyLayer0=@oy-(height>>2)
if @layer0clip
@layer0.ox=0
@layer0.oy=0
@layer0.src_rect.set(width>>2,height>>2,
@viewport.rect.width,@viewport.rect.height)
else
@layer0.ox=(width>>2)
@layer0.oy=(height>>2)
end
@layer0.bitmap.clear
@oxLayer0=@oxLayer0.floor
@oyLayer0=@oyLayer0.floor
xStart=(@oxLayer0>>5)
xStart=0 if xStart<0
yStart=(@oyLayer0>>5)
yStart=0 if yStart<0
xEnd=xStart+(width>>5)+1
yEnd=yStart+(height>>5)+1
xEnd=xsize if xEnd>=xsize
yEnd=ysize if yEnd>=ysize
if xStart<xEnd && yStart<yEnd
tmprect=Rect.new(0,0,0,0)
yrange=yStart...yEnd
xrange=xStart...xEnd
for z in 0...zsize
for y in yrange
ypos=(y<<5)-@oyLayer0
for x in xrange
xpos=(x<<5)-@oxLayer0
id = @map_data[x, y, z]
next if id==0 || @priorities[id]!=0 || !@priorities[id]
if id>=384
tmprect.set((id - 384) % 8 * 32, (id - 384) / 8 * 32,32,32)
bitmap.blt(xpos,ypos,@tileset,tmprect)
else
frame=autotileFrame(id)
bltAutotile(bitmap,xpos,ypos,id,frame)
end
end
end
end
Graphics.frame_reset
end
return true
end
def getResizeFactor
return $ResizeFactor ? $ResizeFactor : 1.0
end
def ox=(val)
val=(val*getResizeFactor).to_i
val=(val/getResizeFactor).to_i
wasshown=self.shown?
@ox=val.floor
@nowshown=(!wasshown && self.shown?)
end
def oy=(val)
val=(val*getResizeFactor).to_i
val=(val/getResizeFactor).to_i
wasshown=self.shown?
@oy=val.floor
@nowshown=(!wasshown && self.shown?)
end
def visible=(val)
wasshown=@visible
@visible=val
@nowshown=(!wasshown && val)
end
def refresh(autotiles=false)
@oldOx=@ox
@oldOy=@oy
usesprites=false
if @layer0
@layer0.visible=@visible
usesprites=!refreshLayer0(autotiles)
if autotiles && !usesprites
return
end
else
usesprites=true
end
refreshFlashSprite
vpx=@viewport.rect.x
vpy=@viewport.rect.y
vpr=@viewport.rect.width+vpx
vpb=@viewport.rect.height+vpy
xsize=@map_data.xsize
ysize=@map_data.ysize
minX=(@ox/32)-1
maxX=((@[email protected])/32)+1
minY=(@oy/32)-1
maxY=((@[email protected])/32)+1
minX=0 if minX<0
minX=xsize-1 if minX>=xsize
maxX=0 if maxX<0
maxX=xsize-1 if maxX>=xsize
minY=0 if minY<0
minY=ysize-1 if minY>=ysize
maxY=0 if maxY<0
maxY=ysize-1 if maxY>=ysize
count=0
if minX<maxX && minY<maxY
@usedsprites=usesprites || @usedsprites
if @layer0
@layer0.visible=false if usesprites
end
if @fullyrefreshed
for prio in @priotiles
x=prio[0]
y=prio[1]
next if x<minX||x>maxX
next if y<minY||y>maxY
id=prio[3]
xpos=(x<<5)-@ox
ypos=(y<<5)-@oy
count=addTile(@tiles,count,xpos,ypos,id)
end
else
for z in 0...@map_data.zsize
for y in minY..maxY
for x in minX..maxX
id = @map_data[x, y, z]
next if id==0 || !@priorities[id]
next if @priorities[id]==0
xpos=(x<<5)-@ox
ypos=(y<<5)-@oy
count=addTile(@tiles,count,xpos,ypos,id)
end
end
end
end
end
if count<@tiles.length
bigchange=(count<=(@tiles.length*2/3)) && (@tiles.length*2/3)>25
j=count;len=@tiles.length;while j<len
sprite=@tiles[j]
@tiles[j+1]=-1
if bigchange
sprite.dispose
@tiles[j]=nil
@tiles[j+1]=nil
elsif !@tiles[j].disposed?
sprite.visible=false if sprite.visible
end
j+=2
end
@tiles.compact! if bigchange
end
end

end

class SynchronizedTilemapAutotilesInternal
def initialize(oldat)
@atdisposables=[[],[],[],[],[],[],[]]
@atframes=[[],[],[],[],[],[],[]]
@autotiles=[]
@oldat=oldat
end
def dispose
for i in 0...7
for bitmap in @atdisposables[i]
bitmap.dispose
end
@atdisposables[i].clear
@atframes[i].clear
end
end
def [](i)
return @autotiles[i]
end
def []=(i,value)
for frame in @atdisposables[i]
frame.dispose
end
@atframes[i].clear
@atdisposables[i].clear
if value && !value.disposed?
if value.height==32
frames=value.width/32
for j in 0...frames
@atdisposables[i][j]=Bitmap.new(32,32)
@atdisposables[i][j].blt(0,0,value,Rect.new(j*32,0,32,32))
@atframes[i][j]=@atdisposables[i][j]
end
elsif value.height==128
frames=value.width/96
for j in 0...frames
@atdisposables[i][j]=Bitmap.new(96,128)
@atdisposables[i][j].blt(0,0,value,Rect.new(j*96,0,96,128))
@atframes[i][j]=@atdisposables[i][j]
end
else
@atframes[i][0]=value
end
else
@atframes[i][0]=value
end
@autotiles[i]=value
sync
end
def sync
frameused=[]
for i in 0...7
frames=[1,@atframes[i].length].max
frame=(Graphics.frame_count/15)%frames
@oldat[i]=@atframes[i][frame]
end
end
end

class SynchronizedTilemapAutotiles
def initialize(autotiles)
@autotiles=autotiles
end
def [](i)
@autotiles[i]
end
def []=(i,value)
@autotiles[i]=value
end
end

class SynchronizedTilemap < Tilemap
# This class derives from Tilemap just to synchronize
# the tilemap animation.
attr_accessor :numupdates
def initialize(viewport=nil)
super(viewport)
@updating=true
@autotiles=SynchronizedTilemapAutotilesInternal.new(self.autotiles)
@autos=SynchronizedTilemapAutotiles.new(@autotiles)
@updating=false
end
def dispose
@autotiles.dispose
super
end
def autotiles
if @updating
super
else
return @autos
end
end
def update
return if disposed?
@autotiles.sync
super
end
end

class TilemapLoader
def initialize(viewport)
@viewport=viewport
@tilemap=nil
@color=Color.new(0,0,0,0)
@tone=Tone.new(0,0,0,0)
updateClass
end
def updateClass
case $PokemonSystem.tilemap
when 1
setClass(CustomTilemap)
when 2
setClass(Draw_Tilemap)
else
if Tilemap.method_defined?(:passages)
setClass(CustomTilemap)
else
setClass($ResizeFactor==1.0 ? SynchronizedTilemap : CustomTilemap)
end
end
end
def setClass(cls)
newtilemap=cls.new(@viewport)
if @tilemap
newtilemap.tileset=@tilemap.tileset
newtilemap.map_data=@tilemap.map_data
newtilemap.flash_data=@tilemap.flash_data
newtilemap.priorities=@tilemap.priorities
newtilemap.visible=@tilemap.visible
newtilemap.ox=@tilemap.ox
newtilemap.oy=@tilemap.oy
for i in 0...7
newtilemap.autotiles[i]=@tilemap.autotiles[i]
end
@tilemap.dispose
@tilemap=newtilemap
newtilemap.update if cls!=SynchronizedTilemap
else
@tilemap=newtilemap
end
end
def tone
@tilemap.tone rescue @tone
end
def tone=(value)
@tilemap.tone=value rescue nil
end
def disposed?
@tilemap.disposed?
end
def dispose
@tilemap.dispose
end
def update
@tilemap.update
end
def viewport
@tilemap.viewport
end
def autotiles
@tilemap.autotiles
end
def tileset
@tilemap.tileset
end
def tileset=(v)
@tilemap.tileset=v
end
def map_data
@tilemap.map_data
end
def map_data=(v)
@tilemap.map_data=v
end
def flash_data
@tilemap.flash_data
end
def flash_data=(v)
@tilemap.flash_data=v
end
def priorities
@tilemap.priorities
end
def priorities=(v)
@tilemap.priorities=v
end
def visible
@tilemap.visible
end
def visible=(v)
@tilemap.visible=v
end
def ox
@tilemap.ox
end
def ox=(v)
@tilemap.ox=v
end
def oy
@tilemap.oy
end
def oy=(v)
@tilemap.oy=v
end
end


Poccil told me to replace my "WindowAndTilemap" script with the one contained in the spoilers and if fixed that problem, I was having the same problem with my game aswell.

I hope this helps.

Sincerely
MT

phoenixprime88b5
March 31st, 2008, 04:48 PM
Yeah, I sent a PM to Poccil and got it in a reply, I was about to post it on here, but you did it. I know other people will be thankful for that.

Demonic Budha
March 31st, 2008, 08:56 PM
Answer anyone?.........^_^

Ahh there is usally no signs that you have a currpt .DLL file, it just wont work/causes an error. Easy way, just replace it, then you dont need to worry if it was or wasnt currpt ^.^

phoenixprime88b5
April 1st, 2008, 07:59 AM
Nothing as serious as the Window&Tileset error, but this error pops up every now and then when I enter or exit buildings:

Exception: NoMethodError
Message: undefined method `addRef' for nil:NilClass
BitmapCache:112:in `load_bitmap'
BitmapCache:130:in `character'
Sprite_Character:62:in `update_or'
PerspectiveTilemap:406:in `shadow_update'
Shadow:169:in `update'
PerspectiveTilemap:402:in `shadow_initialize'
Shadow:145:in `initialize'
Spriteset_Map:27:in `new'
Spriteset_Map:27:in `_animationSprite_initialize'
Spriteset_Map:26:in `each'

Graphical Question:
I edited the message box, command box and fight box in the Graphics/Pictures folder but the only thing that appears changed is the message box, and nothing else. What did I do wrong?

Zephyr Gale
April 1st, 2008, 12:12 PM
Ahh there is usally no signs that you have a currpt .DLL file, it just wont work/causes an error. Easy way, just replace it, then you dont need to worry if it was or wasnt currpt ^.^

This may seem really noobish..but just for safety. how do I replace it...should it end up being corrupted?

Demonic Budha
April 1st, 2008, 12:38 PM
This may seem really noobish..but just for safety. how do I replace it...should it end up being corrupted?

Not Noobish at all, Well i use a site called http://www.dll-files.com/
It USALLY has what im looking for, otherwise i just to a google for the .DLL im looking for
(ie windows.dll download) Can usally find it this way.

Hello again resident guru.
Ive return for some aid. I am curently trying to add into the start sequence (when it says "Are you a boy or a girl") 2 .Gif images, of the Heros walking.
Ive used the command stated in the Notes file (but i belive it is incorrectly implamented)
As i get this error:
http://i80.photobucket.com/albums/j168/demonic_budha/Error.jpg

The Event gose:


Thanks again for any help your able to provide Wichu :D It is greatly appriciated by all.



Also just woundering if any figured out my problem in the Spoiler ^
Thanks

Gamekrazy
April 1st, 2008, 08:02 PM
Um, I was wondering, how do you forcefully delete a pokemon from a trainers party? I was going to have my main character start out with several strong pokemon in the beginning of the game, only to lose them after the first couple of battles and then have him choose a starter pokemon. How would I do something like this (if its possible.)

yaoimutt
April 2nd, 2008, 04:52 AM
it's possible (or atleast it was the last time i checked, but that was a LONG time ago,) anyways, i think it's mentioned in the demo

Wichu
April 2nd, 2008, 09:40 AM
It might help if you learnt some simple RGSS. Try this in a Script event command:
party=$Trainer.party
for i in 0...party.length
party[i]=nil
end
It should work.

phoenixprime88b5
April 2nd, 2008, 12:39 PM
Could anyone tell me how to make the text that's shown on both pokemon Bars including the lv. and number(Your's and the enemy's) durng battle to match the text color shown on the Message box?

Here's an example:

http://i189.photobucket.com/albums/z300/exodia882/Explanation1.jpg

imtheomega
April 2nd, 2008, 01:24 PM
@phoenixprime88b5 : Go in PokeBattle_ActualScene and look at the line 1007.
There is something like :
MESSAGEBASECOLOR=Color.new(248,248,248)
MESSAGESHADOWCOLOR=Color.new(104,88,112)
MENUBASECOLOR=Color.new(72,72,72)
MENUSHADOWCOLOR=Color.new(208,208,208)
BOXTEXTBASECOLOR=Color.new(64,64,64)
BOXTEXTSHADOWCOLOR=Color.new(216,208,176)

MESSAGEBASECOLOR and MESSAGESHADOWCOLOR is your messagebox on the image
BOXTEXTBASECOLOR and BOXTEXTSHADOWCOLOR is what you are looking for, u just have to replace the values ;).

phoenixprime88b5
April 2nd, 2008, 03:10 PM
Thanks, iamtheomega, it came out just the way I wanted it to.

imtheomega
April 2nd, 2008, 03:34 PM
Well, I have some problem with the pokemoncenter. I saw that there was a new version of pokemon essentials and I downloaded it. I saw that there was a new event to heal the pokemon, the pokeballs are put on the left and theere is the process just like in the pokemon games.

I tried to copy this event on my version (images, sound, and the 3 events : balls and healer) but the thing is when the healer turn to the left, the game freeze :/. I tried to understand how it worked and the only thing important I found was that it is using a variable, the variable 43. I took a look in my variables and the variable 43 is free so it can be used...

Can someone tell me what I must do? :/

Krobelus
April 2nd, 2008, 04:40 PM
@imtheomega - Probably because you need the graphics that create the PokeBalls effect. I think a page or two back someone mentioned something about it. Look a few pages back for reference.

-Krobe

Gamekrazy
April 2nd, 2008, 09:45 PM
It might help if you learnt some simple RGSS. Try this in a Script event command:
party=$Trainer.party
for i in 0...party.length
party[i]=nil
end
It should work.

Could you clarify that a bit? I don't fully understand.

imtheomega
April 2nd, 2008, 10:45 PM
@imtheomega - Probably because you need the graphics that create the PokeBalls effect. I think a page or two back someone mentioned something about it. Look a few pages back for reference.

-Krobe

I have the images. It's in graphics/characters/pokeballs on left and pokeballs on right :s .
By the way, I think I have found the problem. The scene_map had been modified. Now it works ^^.

@Gamekrazy :
Originally Posted by Wichu
It might help if you learnt some simple RGSS. Try this in a Script event command:
party=$Trainer.party
for i in 0...party.length
party[i]=nil
end
It should work.

Well, like u must know, $Trainer.party is a vector wich can have 6 components for each of your pokemons. So, he defines that party is equal to $Trainer.party.
When u use =, u say that the variable as the value u want.
When u use ==, the variable has its own value and it's not changed by the ==. == is something u can use, for example, to check if the value a variable is equal to the value of another variable. So u can do something like
if x==y
do something
end

That was to make it clearer if u don't understand the meaning of the = and the ==(wich is not used here).

So, when he says party=$Trainer.party, party is a vector wich can have 6 components and there is something in these components since u have pokemons...

Then he does a loop (a for), from 0 to party.length ; party.length is a number wich gives the number of pokemons u have. The maximum size is 6.
Since u want the player to lose all his pokemons, he just put the components of party equal to nil (party=nil).

I hope I have been clear. If not, just say it. I'm foreign so it is not always easy to make myself understood :p.

Hall Of Famer
April 3rd, 2008, 12:37 AM
I'm seeking for the item VS SEEKER but it seems to be unable to find in the item.txt. Can anyone of you create this item and give it the same feature as it does in POKEMON Firered/Leafgreen? That would be a lot of helps, thanks.

Gamekrazy
April 3rd, 2008, 05:30 AM
I have the images. It's in graphics/characters/pokeballs on left and pokeballs on right :s .
By the way, I think I have found the problem. The scene_map had been modified. Now it works ^^.

@Gamekrazy :


Well, like u must know, $Trainer.party is a vector wich can have 6 components for each of your pokemons. So, he defines that party is equal to $Trainer.party.
When u use =, u say that the variable as the value u want.
When u use ==, the variable has its own value and it's not changed by the ==. == is something u can use, for example, to check if the value a variable is equal to the value of another variable. So u can do something like


That was to make it clearer if u don't understand the meaning of the = and the ==(wich is not used here).

So, when he says party=$Trainer.party, party is a vector wich can have 6 components and there is something in these components since u have pokemons...

Then he does a loop (a for), from 0 to party.length ; party.length is a number wich gives the number of pokemons u have. The maximum size is 6.
Since u want the player to lose all his pokemons, he just put the components of party equal to nil (party=nil).

I hope I have been clear. If not, just say it. I'm foreign so it is not always easy to make myself understood :p.

Um, and exactly how would I do that? Do I use the call script command in an event? Or is it something I edit in the scripts itself?

imtheomega
April 3rd, 2008, 07:30 AM
U must use it in the call script command in an event Gamekrazy ;).

Gamekrazy
April 3rd, 2008, 06:25 PM
Alright, I put the script into the event and ran it, but the second I take a setp after deleting my trainers party, it gives me this error:

Exception: NoMethodError
Message: undefined method `egg?' for nil:NilClass
PokemonField:550:in `pbOnStepTaken'
PokemonField:549:in `each'
PokemonField:549:in `pbOnStepTaken'
Game_Player*:620:in `update_old'
Walk/Run:57:in `update'
Scene_Map:99:in `update'
Scene_Map:96:in `loop'
Scene_Map:109:in `update'
Scene_Map:65:in `main'
Scene_Map:62:in `loop'

I thought it might be related to my trainers party not having any pokemon in it, so I put an add pokemon event right after the delete party event, but when i took a step afterwords it still popped the error up. Finally, I re-tried, but instead of taking a step, I looked at my pokemon menu. The test pokemon I added after the party delete was in the slot for the 5th pokemon in the party (i had four pokemon in the party before I deleted them) the first four were empty. Can somebody help me with this?

Wichu
April 4th, 2008, 03:12 AM
Oh, after the script to delete the trainer's party, put $Trainer.party.compact! (with the exclamation mark). That should solve it.

imtheomega
April 4th, 2008, 04:12 AM
Hi,

I have a problem to put gif images on my game.
The problem is that the gif is not animated in the game :/ . I only see the first image of the gif...
Could someone check the gifsprite class to see if there is a problem in it?

Here it is :class GifSprite
def initialize(file,viewport=nil)
@gifbitmaps=[]
@gifdelays=[]
@totalframes=0
@framecount=0
@sprite=Sprite.new(viewport)
filestring=pbGetFileString(file)
if !filestring
filestring=pbGetFileString(file+".gif")
end
if filestring && GifLibrary::PngDll
result=GifLibrary::GifToPngFilesInMemory.call(filestring,filestring.length,File.basename(file))
else
result=0
end
if result>0
@gifdelays=GifLibrary.getDataFromResult(result)
@totalframes=@gifdelays.pop
for i in 0...@gifdelays.length
@gifdelays[i]=[@gifdelays[i],1].max
bmfile=sprintf("%s%d.png",File.basename(file),i);
if FileTest.exist?(bmfile)
@gifbitmaps.push(Bitmap.new(bmfile))
File.delete(bmfile)
else
@gifbitmaps.push(Bitmap.new(1,1))
end
@sprite.bitmap=@gifbitmaps[0]
end
end
end
def totalframes
@totalframes
end
def currentframe
@totalframes<=0 ? 0 : @framecount%@totalframes
end
def disposed?
@sprite.disposed?
end
def viewport
@sprite.viewport
end
def width
@gifbitmaps.length==0 ? 0 : @gifbitmaps[0].width
end
def height
@gifbitmaps.length==0 ? 0 : @gifbitmaps[0].height
end
def update
@sprite.update
if @gifbitmaps.length>0
@framecount+=2
frame=@totalframes<=0 ? 0 : @framecount%@totalframes
frametoshow=0
for i in 0...@gifdelays.length
frametoshow=i if @gifdelays[i]<=frame
end
@sprite.bitmap=@gifbitmaps[frametoshow]
end
end
def dispose
@sprite.dispose
for i in @gifbitmaps
i.dispose
end
end
def flash(*arg); sprite.flash(*arg); end
%w[
x y z ox oy visible zoom_x zoom_y
angle mirror bush_depth opacity blend_type
color tone
].each do |s|
eval <<-__END__
def #{s}; @sprite.#{s}; end
def #{s}=(value); @sprite.#{s}=value; end
__END__
end
end

It begins at line 1079 in PokemonUtilities.

Wichu
April 4th, 2008, 05:36 AM
Are you calling the update method every frame?

imtheomega
April 4th, 2008, 07:11 AM
Every frame?
I'm just using

sprite=GifSprite.new("Graphics/Pictures/myimage.gif")
sprite.x=200
sprite.y=100

in an event.

It doesn't do the update by itself?

Demonic Budha
April 4th, 2008, 11:40 AM
atleast you get the first frame, when i tryed to use a Gif, it just kept crashing the ESK.

yaoimutt
April 4th, 2008, 02:33 PM
o.o what??????? what happen to the pokemon sprites???? it's been a really long time sence i even looked at the starter kit, and i deleted the old one (my project was usless anyways) but this one doesn't have the pokemon sprites, T-T does anyone still have them?

Gamekrazy
April 4th, 2008, 07:12 PM
Um, I run into an error when I attempt to use the pokemon center.

Message: Failed to load bitmap: Graphics/Characters/pokeballs on left
BitmapCache:91:in `load_bitmap'
BitmapCache:130:in `character'
Sprite_Character:62:in `update_or'
PerspectiveTilemap:406:in `shadow_update'
Shadow:169:in `update'
Spriteset_Map:218:in `_animationSprite_update'
Spriteset_Map:213:in `each'
Spriteset_Map:213:in `_animationSprite_update'
AnimationSprite:91:in `update'
Scene_Map:49:in `updateSpritesets'

I looked in the character folder, and the file 'pokeballs on the left' is not in the character folder (niether is 'pokeballs on the right' which I am sure would go along with it) Does anybody have these?

imtheomega
April 5th, 2008, 01:58 AM
@Gamekrazy :

Like I said to phoenixprime in private :

Download this : http://www.megaupload.com/?d=O67MEM7R

The images must go in characters, the audio file in ME. And since the only problem seems to be the images, u dont have to replace the scene_map in your script.

Demonic Budha
April 5th, 2008, 02:05 AM
hey imtheomega, the Scene_Map.txt, do i just replace the entire scene_map script, or just add this to it??

imtheomega
April 5th, 2008, 02:40 AM
U have to replace it.

Fblaster gave me a way to give the caterpillar event. I put it into a new project. If someone want it, here it is : http://www.4shared.com/file/43097601/71580fe/Projet_1.html

Just a few words about it. For now, it works for 4 players : the hero and three others and the only moves are the normal ones : go to left, right, up or down. The 3 other players are images, not real players. When u want some of them to go in a battle 2vs 2 with u, u have to use the registerpartnertrainer thing.
The 4 events must be put on every map u do. And the switch caterpillar must be desactivated every time u go from a map to another.
I also put switches on the player : when u want to had a player to the caterpillar, u just have to activate his switch.

If someone want to improve it for other moves (run, jump,...) for example, feel free to do it
and please, give the way u do it here :p.

O.G. Duke
April 5th, 2008, 03:56 AM
Well, I need some help about the starter kit.
How to show a pokeball sprite in Pokedex if you already caught the pokemon?

Fblaster
April 5th, 2008, 06:54 AM
U have to replace it.

Fblaster gave me a way to give the caterpillar event. I put it into a new project. If someone want it, here it is : http://www.4shared.com/file/43097601/71580fe/Projet_1.html

Just a few words about it. For now, it works for 4 players : the hero and three others and the only moves are the normal ones : go to left, right, up or down. The 3 other players are images, not real players. When u want some of them to go in a battle 2vs 2 with u, u have to use the registerpartnertrainer thing.
The 4 events must be put on every map u do. And the switch caterpillar must be desactivated every time u go from a map to another.
I also put switches on the player : when u want to had a player to the caterpillar, u just have to activate his switch.

If someone want to improve it for other moves (run, jump,...) for example, feel free to do it
and please, give the way u do it here :p.

Oh, that's not the kind of caterpillar i need, then. Because I need one that really adds one hero, since I can't possibly add 386 extra events in every map, you see? =P
Thanks anyway.

imtheomega
April 5th, 2008, 08:10 AM
I see what u mean. But I really dont know how to do it :p.

The simplest way I found to make a caterpillar was this one. I just have to copy the events everytime I begin a new map.

U would have to do it in the general script but how, that's the question :p.



Comming back to my gif problem, Wichu, do u know what's the problem, why only the first frame appears when I just use

sprite=GifSprite.new("Graphics/Pictures/myimage.gif")
sprite.x=200
sprite.y=100

in an event?

Wichu
April 5th, 2008, 08:57 AM
As I said, the frame is only changed when the update method is called. It might be a good idea to make the event in the script editor instead, or at least, just that section.

imtheomega
April 5th, 2008, 09:27 AM
Yes but how do u use it?
I tried
sprite=GifSprite.new("Graphics/Pictures/myimage.gif")
sprite.x=200
sprite.y=100
sprite.update

and sprite=GifSprite.new("Graphics/Pictures/myimage.gif")
sprite.x=200
sprite.y=100
sprite=sprite.update

but it does nothing :/ .

lightou
April 5th, 2008, 09:33 AM
Hello everybody.

When I'm healing my Pokémon in a Pokémon Center, I get this error :

Exception: RuntimeError
Message: Failed to load bitmap: Graphics/Characters/pokeballs on left
BitmapCache:91:in `load_bitmap'
BitmapCache:130:in `character'
Sprite_Character:62:in `update_or'
PerspectiveTilemap:406:in `shadow_update'
Shadow:169:in `update'
Spriteset_Map:218:in `_animationSprite_update'
Spriteset_Map:213:in `each'
Spriteset_Map:213:in `_animationSprite_update'
AnimationSprite:91:in `update'
Scene_Map:49:in `updateSpritesets'

I think that the Pokeballs Picture is missed.

Do you know I can fix it ?

imtheomega
April 5th, 2008, 09:38 AM
Hello everybody.

When I'm healing my Pokémon in a Pokémon Center, I get this error :



I think that the Pokeballs Picture is missed.

Do you know I can fix it ?

The solution to your solution was given at the previous page.

Download this : http://www.megaupload.com/?d=O67MEM7R

The images must go in characters, the audio file in ME. And since the only problem seems to be the images, u dont have to replace the scene_map in your script.

lightou
April 5th, 2008, 09:48 AM
Shame on me...

However, thank you ! :)

EDIT : Hey, I would like to know if it's possible to show the HPbar in the second page of the summary (like in FR & LF) ?

Thank you.

O.G. Duke
April 5th, 2008, 03:45 PM
Well, I need some help about the starter kit.
How to show a pokeball sprite in Pokedex if you already caught the pokemon?

Sorry, anyone could help ?
And here's another question.
How to change the trainercard picture when switch 20 is on ?
That means when switch 20 is on, the trainercard will change its look.

imtheomega
April 6th, 2008, 12:49 AM
To answer to your first question OmegaGroudon, if u are satisfied with a pokeball in the upperleft of the screen when u point to a pokemon u own, u can replace the class Window_Pokedex in PokemonPokedex by

class Window_Pokedex < SpriteWindow_Selectable
attr_reader :baseColor
attr_reader :shadowColor
def initialize(x,y,width,height)
@starting=true
super(x,y,width,height)
@selarrow=BitmapCache.load_bitmap("Graphics/Pictures/selarrow.png")
@pokeball=BitmapCache.load_bitmap("Graphics/Pictures/pokeball.png")
@baseColor=Color.new(9<<3,9<<3,9<<3)
@shadowColor=Color.new(26<<3,26<<3,26<<3)
self.index=0
@commands=[]
@item_max=0
@starting=false
refresh
end
def commands=(value)
@commands=value
refresh
end
def dispose
@selarrow.dispose
@pokeball.dispose
super
end
def species
return @commands.length==0 ? 0 : @commands[self.index][0]
end
def refresh
return if @starting
@item_max=@commands.length
dheight=self.height-32
dwidth=self.width-32
if !self.contents || self.contents.disposed? ||
self.contents.height<dheight || self.contents.width<dwidth
self.contents.dispose if self.contents
self.contents=Bitmap.new([1,dwidth].max,[1,dheight].max)
pbSetSystemFont(self.contents)
end
self.contents.clear
contentsWidth=self.contents.width
ypos=0
for i in 0...@item_max
if i<self.top_row || i>self.top_row+self.page_row_max
next
end
pbCopyBitmap(self.contents,@selarrow,0,ypos) if self.index==i
species=@commands[i][0]
if $Trainer.owned[species]
pbCopyBitmap(self.contents,@pokeball,250,0) if self.index==i
end
if $Trainer.seen[species]
text=_ISPRINTF("No.{1:03d} {2:s}",@commands[i][0],@commands[i][1])
else
text=_ISPRINTF("No.{1:03d} ----------",@commands[i][0])
end
self.contents.font.color=@shadowColor
pbDrawShadow(self.contents,16,ypos,self.contents.width-16,32,text)
self.contents.font.color=@baseColor
self.contents.draw_text(16,ypos,self.contents.width-16,32,text)
ypos+=32
end
end
def update
dorefresh=false
oldindex=self.index
super
dorefresh=(self.index!=oldindex)
refresh if dorefresh
end
end

For the pokeball wich appears for each pokemon owned, I haven't found an answer yet. I only succeed to do it for the first "screen" of the pokedex with

class Window_Pokedex < SpriteWindow_Selectable
attr_reader :baseColor
attr_reader :shadowColor
def initialize(x,y,width,height)
@starting=true
super(x,y,width,height)
@selarrow=BitmapCache.load_bitmap("Graphics/Pictures/selarrow.png")
@pokeball=BitmapCache.load_bitmap("Graphics/Pictures/pokeball.png")
@baseColor=Color.new(9<<3,9<<3,9<<3)
@shadowColor=Color.new(26<<3,26<<3,26<<3)
self.index=0
@commands=[]
@item_max=0
@starting=false
refresh
end
def commands=(value)
@commands=value
refresh
end
def dispose
@selarrow.dispose
@pokeball.dispose
super
end
def species
return @commands.length==0 ? 0 : @commands[self.index][0]
end
def refresh
return if @starting
@item_max=@commands.length
dheight=self.height-32
dwidth=self.width-32
if !self.contents || self.contents.disposed? ||
self.contents.height<dheight || self.contents.width<dwidth
self.contents.dispose if self.contents
self.contents=Bitmap.new([1,dwidth].max,[1,dheight].max)
pbSetSystemFont(self.contents)
end
self.contents.clear
contentsWidth=self.contents.width
ypos=0
for i in 0...@item_max
if i<self.top_row || i>self.top_row+self.page_row_max
next
end
pbCopyBitmap(self.contents,@selarrow,0,ypos) if self.index==i
species=@commands[i][0]
if $Trainer.seen[species]
if $Trainer.owned[species]
pbCopyBitmap(self.contents,@pokeball,210,i*32)
end
text=_ISPRINTF("No.{1:03d} {2:s}",@commands[i][0],@commands[i][1])
else
text=_ISPRINTF("No.{1:03d} ----------",@commands[i][0])
end
self.contents.font.color=@shadowColor
pbDrawShadow(self.contents,16,ypos,self.contents.width-16,32,text)
self.contents.font.color=@baseColor
self.contents.draw_text(16,ypos,self.contents.width-16,32,text)
ypos+=32
end
end
def update
dorefresh=false
oldindex=self.index
super
dorefresh=(self.index!=oldindex)
refresh if dorefresh
end
end


But it doesn't work for pokemon wich have a number greater than 10 because I use a i*32 for the y of the bitmap (pbCopyBitmap(self.contents,@pokeball,210,i*32)) and then the pokeball image is out of the screen...


Edit : I have found it ^^.
Here is the script that u must replace :

class Window_Pokedex < SpriteWindow_Selectable
attr_reader :baseColor
attr_reader :shadowColor
def initialize(x,y,width,height)
@starting=true
super(x,y,width,height)
@selarrow=BitmapCache.load_bitmap("Graphics/Pictures/selarrow.png")
@pokeball=BitmapCache.load_bitmap("Graphics/Pictures/pokeball.png")
@baseColor=Color.new(9<<3,9<<3,9<<3)
@shadowColor=Color.new(26<<3,26<<3,26<<3)
self.index=0
@commands=[]
@item_max=0
@starting=false
refresh
end
def commands=(value)
@commands=value
refresh
end
def dispose
@selarrow.dispose
@pokeball.dispose
super
end
def species
return @commands.length==0 ? 0 : @commands[self.index][0]
end
def refresh
return if @starting
@item_max=@commands.length
dheight=self.height-32
dwidth=self.width-32
if !self.contents || self.contents.disposed? ||
self.contents.height<dheight || self.contents.width<dwidth
self.contents.dispose if self.contents
self.contents=Bitmap.new([1,dwidth].max,[1,dheight].max)
pbSetSystemFont(self.contents)
end
self.contents.clear
contentsWidth=self.contents.width
ypos=0
for i in 0...@item_max
if i<self.top_row || i>self.top_row+self.page_row_max
next
end
pbCopyBitmap(self.contents,@selarrow,0,ypos) if self.index==i
species=@commands[i][0]
if $Trainer.seen[species]
j=self.top_row
if $Trainer.owned[species]
pbCopyBitmap(self.contents,@pokeball,210,(i-j)*32)
end
text=_ISPRINTF("No.{1:03d} {2:s}",@commands[i][0],@commands[i][1])
else
text=_ISPRINTF("No.{1:03d} ----------",@commands[i][0])
end
self.contents.font.color=@shadowColor
pbDrawShadow(self.contents,16,ypos,self.contents.width-16,32,text)
self.contents.font.color=@baseColor
self.contents.draw_text(16,ypos,self.contents.width-16,32,text)
ypos+=32
end
end
def update
dorefresh=false
oldindex=self.index
super
dorefresh=(self.index!=oldindex)
refresh if dorefresh
end
end

It seems to work fine. If u find a problem, say it ;).


To answer to your second question. Replace the pbStartScene in PokemonTrainerCard by :

def pbStartScene
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@sprites["background"]=Plane.new(@viewport)
@sprites["background"].bitmap=BitmapCache.load_bitmap("Graphics/Pictures/trcardbg.png")
@sprites["card"]=Sprite.new(@viewport)
if $game_switches[20]==false
@sprites["card"].bitmap=BitmapCache.load_bitmap("Graphics/Pictures/TrainerCard.png")
else
@sprites["card"].bitmap=BitmapCache.load_bitmap("Graphics/Pictures/trcard.PNG")
end
@sprites["overlay"]=Sprite.new(@viewport)
@sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height)
pbSetSystemFont(@sprites["overlay"].bitmap)
pbDrawTrainerCardFront
pbFadeInAndShow(@sprites)
end

TrainerCard.png is the first trainer card u have in the game and trcard.png is the second, when the switch 20 is activated

O.G. Duke
April 6th, 2008, 03:50 AM
Thanks!!
Yeah! It works!!^^
I've replied your PM!

Jayzah
April 7th, 2008, 11:07 AM
Hi, sorry for being a total noob and all, but, my intro isn't showing up. All i get is it booting the game straight up, then in the game my character is invisible and after a few steps it comes up with:

Exception: NoMethodError
Message: undefined method `party' for nil:NilClass
PokemonField:562:in `pbOnStepTaken'
Game_Player*:620:in `update_old'
Walk/Run:57:in `update'
Scene_Map:100:in `update'
Scene_Map:97:in `loop'
Scene_Map:110:in `update'
Scene_Map:66:in `main'
Scene_Map:63:in `loop'
Scene_Map:70:in `main'
Main:33:in `mainFunction'

I have set the character's graphic, so im not sure why its invisible.
Thanks

poccil
April 7th, 2008, 01:03 PM
That's likely because the character isn't set up yet. The first screen in the game should be an intro screen. See the section "Intro Screen" in the notes for details. There you will find a simple example of such a screen.

AtlantianTokRa
April 7th, 2008, 01:05 PM
Hi, sorry for being a total noob and all, but, my intro isn't showing up. All i get is it booting the game straight up, then in the game my character is invisible and after a few steps it comes up with:

Exception: NoMethodError
Message: undefined method `party' for nil:NilClass
PokemonField:562:in `pbOnStepTaken'
Game_Player*:620:in `update_old'
Walk/Run:57:in `update'
Scene_Map:100:in `update'
Scene_Map:97:in `loop'
Scene_Map:110:in `update'
Scene_Map:66:in `main'
Scene_Map:63:in `loop'
Scene_Map:70:in `main'
Main:33:in `mainFunction'

I have set the character's graphic, so im not sure why its invisible.
Thanks

there's a blank map in the kit, did you delete it (or even put it in?) cos the intro is an event on that map, so check its there and that the players start position is on that blank map (or it won't run)

StrawyBlood
April 7th, 2008, 07:10 PM
I get an error when my game's proffesor gives to the main character five pokeballs...
a window pops out and says the error...
I put this:
conditional branch: script: $PokemonBag.pbStoreItem(PBItemsPOKeBALL, 5)
else
branch end
-_-'

here are some images
http://i164.photobucket.com/albums/u7/HpPapilion/1-2.png
http://i164.photobucket.com/albums/u7/HpPapilion/2-2.png
please help me
(yeah, im stupid :P)

sorry if anyone already asked this, im just to lazy for read all the comments xD

poccil
April 7th, 2008, 07:33 PM
It should read:

PBItems::POKeBALL


Thanks.

yaoimutt
April 7th, 2008, 07:37 PM
Hey poccil, why did you get rid of all the pokemon sprites that were in the starter kit?

Aqua Mudkip
April 7th, 2008, 08:25 PM
Aqua Mudkip: Um... how do you replace the old Mode 07 script with the new Mode 07 script in Poccil's SK so that the Perspective option wouldn't have too much problems? Are you supposed top put it in the PerspectiveMap script? Here's the new Mode 07 script. *it can now support priorities and more!*

EDIT: Err... the reply box says the scripts too long... (80260 words) If anyone could help, that would be great!

StrawyBlood
April 7th, 2008, 09:44 PM
Sorry for my question, was stupid :P
but i want to ask something more:
How can i make to keep the main character in the map even if he was defeated? just like gary in R/B/Y or in FR/LG
----
Yaoimutt: Poccil didnt get rid of any of the pokemons sprite, cause i have all the pokemons, maybe you downloaded a wrong file or something like that...
download again the pokemon essentials, maybe that solve your problem...

imtheomega
April 8th, 2008, 12:06 AM
Well, u could set the place where the battle take place as a "pokemon center", by using a script with Kernel.pbSetPokemonCenter.
The player will be teleported to that point after the battle if he looses and u have just to launch the event...

I dont know if it's the best solution, but it should work.

Jayzah
April 8th, 2008, 08:11 AM
there's a blank map in the kit, did you delete it (or even put it in?) cos the intro is an event on that map, so check its there and that the players start position is on that blank map (or it won't run)

Thanks :D, i did that, but now -me being stupid and all- i can't get the player to appear in the actual map after. I tried transfer player on a doubt and it failed, so im not sure now.

Zephyr Gale
April 8th, 2008, 08:50 AM
Here's all my worldly questions now..

How do you get new BGM's( to use in maps and all)

When I actually play the game, how do I stop the character being able to walk over stuff like benches?(making the objects solid?)

So of my maps run together in a wierd way. Somehow I will be on one of my maps, but then I can walk west and another city that shouldnt be connected to it..is. (I hope someone understoood that..)

imtheomega
April 8th, 2008, 09:02 AM
Here's all my worldly questions now..

1)How do you get new BGM's( to use in maps and all)

2)When I actually play the game, how do I stop the character being able to walk over stuff like benches?(making the objects solid?)

3)So of my maps run together in a wierd way. Somehow I will be on one of my maps, but then I can walk west and another city that shouldnt be connected to it..is. (I hope someone understoood that..)

1) U have to look on internet for mid files or u have to make your owns.

2) Push the F9 key on rpg maker. Then go to chipsets. There, u can see the tilesets u use and differents options related to the tilesets.

3) What do u use to go from a map to another? Teleport? connections.txt?

Atomic Reactor
April 8th, 2008, 12:31 PM
and by chipsets he meant tilesets...
incase that confused you lol

u can also access the database and material base through the tool bar at the top

Zephyr Gale
April 8th, 2008, 02:10 PM
1) U have to look on internet for mid files or u have to make your owns.

2) Push the F9 key on rpg maker. Then go to chipsets. There, u can see the tilesets u use and differents options related to the tilesets.

3) What do u use to go from a map to another? Teleport? connections.txt?
3. Its sorta hard to describe(maybe Cause im not good at mapping)

But Its sorta like this.


*you start in a room in the begining town.
*the town is connected to route 1, then route 2 iws connected to that, and then another town.
*if you walk west of the room in the first town it runs off into the second town.

AtlantianTokRa
April 8th, 2008, 03:01 PM
3. Its sorta hard to describe(maybe Cause im not good at mapping)

But Its sorta like this.


*you start in a room in the begining town.
*the town is connected to route 1, then route 2 iws connected to that, and then another town.
*if you walk west of the room in the first town it runs off into the second town.
try deleting the lines in the file 'connections.txt' with the problem maps in

yaoimutt
April 8th, 2008, 05:10 PM
Sorry for my question, was stupid :P
but i want to ask something more:
How can i make to keep the main character in the map even if he was defeated? just like gary in R/B/Y or in FR/LG
----
Yaoimutt: Poccil didnt get rid of any of the pokemons sprite, cause i have all the pokemons, maybe you downloaded a wrong file or something like that...
download again the pokemon essentials, maybe that solve your problem...

i just downloaded it again, and they arn't there, the ones i am saying are gone are the "sprites" the pokemon sprites, not the pokemon battle pictures.

she use to have actual pokemon srpites (ones that you could make run around your map) but they arn't there anymore.

if anyone still has them, please put them in a file and upload it >.<

StrawyBlood
April 8th, 2008, 05:48 PM
i just downloaded it again, and they arn't there, the ones i am saying are gone are the "sprites" the pokemon sprites, not the pokemon battle pictures.

she use to have actual pokemon srpites (ones that you could make run around your map) but they arn't there anymore.

if anyone still has them, please put them in a file and upload it >.<

oh... i though you were talking about the battle sprites... >.>
well, maybe poccil take them out from the starter kit for some reason...
i neither have them... but i get some in a pokemon resource page:

Overworld sprites (R/S)
http://i164.photobucket.com/albums/u7/HpPapilion/overworldpkmn.gif

Articuno (... maybe is from mystery dungeon)
http://i164.photobucket.com/albums/u7/HpPapilion/dung_articunoexplosionmakesboom.png

Lugia and mew

http://i164.photobucket.com/albums/u7/HpPapilion/MewyLugia.gif

Deoxis
http://i164.photobucket.com/albums/u7/HpPapilion/pkmndung-deoxys.png

Ditto
http://i164.photobucket.com/albums/u7/HpPapilion/pkmndung-ditto.png

Overworld FR/LG

http://i164.photobucket.com/albums/u7/HpPapilion/pkmnfrlgoverworld.gif

Mystery dungeon sprites (the second part of the game... i dont remember its name...)

http://i164.photobucket.com/albums/u7/HpPapilion/ripsmmon3.png

3 Regis

http://i164.photobucket.com/albums/u7/HpPapilion/pkmndung-regitrio.png
i dont remember where i get them -_-'
and yeah... i give credit to the persons that ripped or made those sprites :3

yaoimutt
April 8th, 2008, 10:58 PM
oh... i though you were talking about the battle sprites... >.>
well, maybe poccil take them out from the starter kit for some reason...
i neither have them... but i get some in a pokemon resource page:

Overworld sprites (R/S)
http://i164.photobucket.com/albums/u7/HpPapilion/overworldpkmn.gif

Articuno (... maybe is from mystery dungeon)
http://i164.photobucket.com/albums/u7/HpPapilion/dung_articunoexplosionmakesboom.png

Lugia and mew

http://i164.photobucket.com/albums/u7/HpPapilion/MewyLugia.gif

Deoxis
http://i164.photobucket.com/albums/u7/HpPapilion/pkmndung-deoxys.png

Ditto
http://i164.photobucket.com/albums/u7/HpPapilion/pkmndung-ditto.png

Overworld FR/LG

http://i164.photobucket.com/albums/u7/HpPapilion/pkmnfrlgoverworld.gif

Mystery dungeon sprites (the second part of the game... i dont remember its name...)

http://i164.photobucket.com/albums/u7/HpPapilion/ripsmmon3.png

3 Regis

http://i164.photobucket.com/albums/u7/HpPapilion/pkmndung-regitrio.png
i dont remember where i get them -_-'
and yeah... i give credit to the persons that ripped or made those sprites :3


thanks, but most of those are "rare" or really small, i guess that just means i have to make them, unless someone here has them from the older starter kit

anyway, it's times like this that i hate that i stupidly deleted my old project (i did it a while back when i got annouyed with my pc, i completly wiped the pc and never backed anything up XD)

so i guess i'll just make some sprites on my own, as i make then i guess i can always upload them or something for people. thanks though for trying.

Demonic Budha
April 9th, 2008, 12:30 AM
thanks, but most of those are "rare" or really small, i guess that just means i have to make them, unless someone here has them from the older starter kit

anyway, it's times like this that i hate that i stupidly deleted my old project (i did it a while back when i got annouyed with my pc, i completly wiped the pc and never backed anything up XD)

so i guess i'll just make some sprites on my own, as i make then i guess i can always upload them or something for people. thanks though for trying.

Are you looking for something like this???
http://www.spriters-resource.com/nintendo/pokemon/pkmndung/

Zephyr Gale
April 9th, 2008, 10:07 AM
1) U have to look on internet for mid files or u have to make your owns.

2) Push the F9 key on rpg maker. Then go to chipsets. There, u can see the tilesets u use and differents options related to the tilesets.

3) What do u use to go from a map to another? Teleport? connections.txt?

1) anyone have any music I could use? (or recommend anywhere?)

2) so... like an "X" means solid and "O" means not, and thats all there is to it?

Gamekrazy
April 9th, 2008, 04:44 PM
Ok, now I set up a mart, and im having problems.

Message: (eval):1:in `pbExecuteScript'compile error
(eval):1: syntax error
Script:pbPokemonMart([
^
Interpreter:238:in `pbExecuteScript'
Interpreter:1614:in `eval'
Interpreter:238:in `pbExecuteScript'
Interpreter:1614:in `command_355'
Interpreter:466:in `execute_command'
Interpreter:190:in `update'
Interpreter:104:in `loop'
Interpreter:195:in `update'
Scene_Map:98:in `update'
Scene_Map:96:in `loop'

Can anybody help me with this? I think their may be something wrong with how im inputing the script, but im not sure. Also, does anyone know how to make a battle where the player can continue even after they lose? Like the first rival battles in the first few games?

poccil
April 9th, 2008, 05:16 PM
You don't type the word "Script:".

I did not consider Trainer battles where the player can continue even after a loss. Thanks for the suggestion.

imtheomega
April 9th, 2008, 09:53 PM
Also, does anyone know how to make a battle where the player can continue even after they lose? Like the first rival battles in the first few games?

There is the same question at the previous page and I answered it :
"Well, u could set the place where the battle take place as a "pokemon center", by using a script with Kernel.pbSetPokemonCenter.
The player will be teleported to that point after the battle if he looses and u have just to launch the event...

I dont know if it's the best solution, but it should work."

Obviously, if Poccil makes a script to do it, it would be better :p.

AtlantianTokRa
April 10th, 2008, 07:38 AM
There is the same question at the previous page and I answered it :
"Well, u could set the place where the battle take place as a "pokemon center", by using a script with Kernel.pbSetPokemonCenter.
The player will be teleported to that point after the battle if he looses and u have just to launch the event...

I dont know if it's the best solution, but it should work."

Obviously, if Poccil makes a script to do it, it would be better :p.

except that would bring up the message saying that you returned to the pokemon center instead of continuing, and if you want a battle like that in the middle of a route with all trainers if you lost to any of the trainers you would be returned to that spot

imtheomega
April 10th, 2008, 08:10 AM
Yes, you are right.

But if it's for the first battle against the rival, it could do (there isn't a lot of battles usually at the beggining and if he says that the hero must go to his mom to say her goodbye, he can move the "healing" point).

But it would be better to have a function for it. Perhaps a new variable in pbTrainerBattle and pbWildBattle. If this variable is true, the hero goes to the last pokemon center he visited and if it is false, the player stays there.

Starky-08
April 10th, 2008, 11:18 AM
Hey could someone help me I have RPG Maker XP Postality Knights edition, I have the Pokémon essentials also but.... it wont open for me so I cant use it, I really really need help as I am dying to use it! So if someone can help me I would be greatful!

Lorem Ipsum
April 10th, 2008, 11:58 AM
First of all, the edition you are using of RMXP is illegal.

Read the notes as well... (http://www.upokecenter.com/projects/pokestarter/notes.html#header5)

sHiZ-NaX
April 10th, 2008, 12:00 PM
starky no discussing illegal software, and it wont work because its not a real version of rpg maker so go buy it than come back....:\

Starky-08
April 10th, 2008, 12:21 PM
Well is there any legal free versions? Cuz I dont have a credit card and I badly wanna use pokemon essentials

yaoimutt
April 10th, 2008, 01:14 PM
Are you looking for something like this???

thanks, some of those are actually great ^.^ thanks (i'll still post the ones i've made/edited to be bigger)

1) anyone have any music I could use? (or recommend anywhere?)

2) so... like an "X" means solid and "O" means not, and thats all there is to it?

1) what kind of music are you looking for?

2) yes, you can also edit what directions are movable on each tileset

with the way that the map conections are nnow set up, does that mean that i can have 2 maps conected on the same side of one, as long as they don't over lap?

Fittsboy
April 10th, 2008, 05:37 PM
Whenever I use fly, I get this error message:

Exception: ArgumentError
Message: wrong number of arguments(0 for 1)
PokemonRegionMap:271:in `pbStartScene'
PokemonRegionMap:271:in `pbStartFlyScreen'
PokemonScreen:1260:in `pbPokemonScreen'
PokemonScreen:1230:in `each'
PokemonScreen:1230:in `pbPokemonScreen'
PokemonScreen:1182:in `loop'
PokemonScreen:1416:in `pbPokemonScreen'
PokemonMenu:150:in `pbStartPokemonMenu'
PokemonMenu:149:in `pbFadeOutIn'
PokemonMenu:149:in `pbStartPokemonMenu'

After I get thia error, the screen fades black for a couple of seconds, and then the game continues without freezing.

It has been working fine for weeks, and this message came out of nowhere. Does anyone have any idea as to what is wrong? Thanks in advance.

lightou
April 10th, 2008, 11:07 PM
Hello,

I would like to know how to show the hpbar in the summary screen, in the second page (like in FR/LG).

Thanks :p

yaoimutt
April 11th, 2008, 12:59 AM
um? how do i temporarily erase the main characters sprite and then bring it back? (i need to hide the character from veiw on a map, but can't seem to do it >.<)

O.G. Duke
April 11th, 2008, 04:08 AM
@yaoimutt : Try and use this : Set Move Route > Player > Change opacity > 0
I think this should work because it work for me. So when u want your player appear back, just change the opacity to 255.

Hall Of Famer
April 11th, 2008, 07:17 AM
I just encountered an issue with my game. I want to generate a wild pokemon battle, using script pbWildBattle(X,Y,V,C). I would like it to be a battle in which the player can't run away, so set the "C" to false. However, I'm still able to "stay away safely" in the game. What's wrong with my script? Besides, how to make that POKEMON un-catchable? I'd appreciate it very much if anyone of you could tell me how to deal with this issue, thanks.

yaoimutt
April 11th, 2008, 11:24 PM
i just encontered an error.

Whenever my player is at a point where they can see 4 maps (the one they are on, plus 3, example: north side, west side, and the one that also conects them) the map that isn't directly conected to the on that you are on slides, or sometimes doesn't show up at all.

help.

imtheomega
April 12th, 2008, 01:55 AM
Hello,

I would like to know how to show the hpbar in the summary screen, in the second page (like in FR/LG).

Thanks :p

Here is a script for PokemonSummary wich puts an HPBar at the first page of the summary, just below the pokemon's pic, when u have selected one of your pokemon. I suppose u where speaking about this page when u said "the second page" :



class MoveSelectionSprite < SpriteWrapper
attr_reader :preselected
attr_reader :index
def initialize(viewport=nil)
super(viewport)
@movesel=BitmapCache.load_bitmap("Graphics/Pictures/movesel.png")
@frame=0
@index=0
@preselected=false
@updating=false
@spriteVisible=true
refresh
end
def dispose
@movesel.dispose
super
end
def index=(value)
@index=value
refresh
end
def preselected=(value)
@preselected=value
refresh
end
def visible=(value)
super
@spriteVisible=value if !@updating
end
def refresh
w=@movesel.width
h=@movesel.height/2
self.x=162
self.y=64+(self.index*h)
self.bitmap=@movesel
if self.preselected
self.src_rect.set(0,h,w,h)
else
self.src_rect.set(0,0,w,h)
end
end
def update
@updating=true
super
@frame+=1
if !self.preselected && @spriteVisible
self.visible=(@frame%20)<15
end
@frame=0 if @frame>=20
@updating=false
end
end

class PokemonSummaryScene

def pbStartScene(party,partyindex)
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@party=party
@partyindex=partyindex
@pokemon=@party[@partyindex]
@sprites={}
@typebitmap=BitmapCache.load_bitmap("Graphics/Pictures/types.png")
@sprites["overlay"]=SpriteWrapper.new(@viewport)
@sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height)
@sprites["pokemon"]=SpriteWrapper.new(@viewport)
@sprites["pokemon"].bitmap=pbLoadPokemonBitmap(@pokemon)
@sprites["pokemon"].mirror=true
@sprites["pokemon"].x=16
@sprites["pokemon"].y=64
@sprites["movepresel"]=MoveSelectionSprite.new(@viewport)
@sprites["movesel"]=MoveSelectionSprite.new(@viewport)
@sprites["movepresel"].visible=false
@sprites["movepresel"].preselected=true
@sprites["movesel"].visible=false
@page=0
drawPageOne(@pokemon)
pbFadeInAndShow(@sprites)
end


def pbStartForgetScene(party,partyindex,moveToLearn)
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@party=party
@partyindex=partyindex
@pokemon=@party[@partyindex]
@sprites={}
@page=2
@typebitmap=BitmapCache.load_bitmap("Graphics/Pictures/types.png")
@sprites["overlay"]=SpriteWrapper.new(@viewport)
@sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height)
@sprites["pokemon"]=SpriteWrapper.new(@viewport)
@sprites["pokemon"].bitmap=pbLoadPokemonBitmap(@pokemon)
@sprites["pokemon"].mirror=true
pbPositionPokemonSprite(@sprites["pokemon"],16,64)
@sprites["movepresel"]=MoveSelectionSprite.new(@viewport)
@sprites["movesel"]=MoveSelectionSprite.new(@viewport)
@sprites["movepresel"].visible=false
@sprites["movepresel"].preselected=true
@sprites["movesel"].visible=false
@sprites["movesel"].visible=true
@sprites["movesel"].index=0
drawSelectedMove(@pokemon,moveToLearn,@pokemon.moves[0].id)
pbFadeInAndShow(@sprites)
end

def pbEndScene
pbFadeOutAndHide(@sprites)
pbDisposeSpriteHash(@sprites)
@typebitmap.dispose
@viewport.dispose
end


def drawPageOne(pokemon)
if pokemon.egg?
drawPageOneEgg(pokemon)
return
end
overlay=@sprites["overlay"].bitmap
overlay.clear
imagepos=[
["Graphics/Pictures/summary1.png",0,0,0,0,-1,-1]
]
if pokemon.pokerus==1 || pokemon.hp==0 || @pokemon.status>0
status=@pokemon.status-1
status=6 if pokemon.pokerus==1
status=5 if pokemon.hp==0
imagepos.push(["Graphics/Pictures/statuspane.png",0,288,0,0,-1,-1])
imagepos.push(["Graphics/Pictures/statuses.png",106,296,0,16*status,44,16])
end
ballused=@pokemon.ballused ? @pokemon.ballused : 0
ballimage=sprintf("Graphics/Pictures/ball%02d_0.png",@pokemon.ballused)
imagepos.push([ballimage,16,254,0,0,-1,-1])
@gaugeX=46
@gaugeY=194
imagepos.push(["Graphics/Pictures/advHPBar.png",@gaugeX-30,@gaugeY-4,0,0,-1,-1])
pbDrawImagePositions(overlay,imagepos)
def hp
return @pokemon.hp
end
if !@pokemon.egg?
hpgauge=@pokemon.totalhp==0 ? 0 : (self.hp*96/@pokemon.totalhp)
hpgauge=1 if hpgauge==0 && self.hp>0
hpzone=0
hpzone=1 if self.hp<=(@pokemon.totalhp/2).floor
hpzone=2 if self.hp<=(@pokemon.totalhp/4).floor
hpcolors=[
Color.new(11*8,26*8,16*8), # Green
Color.new(14*8,31*8,21*8),
Color.new(25*8,21*8,1*8), # Orange
Color.new(31*8,28*8,7*8),
Color.new(21*8,8*8,9*8), # Red
Color.new(31*8,11*8,7*8)
]
# fill with HP color
overlay.fill_rect(@gaugeX,@gaugeY,hpgauge,2,hpcolors[hpzone*2])
overlay.fill_rect(@gaugeX,@gaugeY+2,hpgauge,4,hpcolors[hpzone*2+1])
# fill with black
overlay.fill_rect(@gaugeX+hpgauge,@gaugeY,96-hpgauge,2,Color.new(0,0,0))
overlay.fill_rect(@gaugeX+hpgauge,@gaugeY+2,96-hpgauge,4,Color.new(0,0,0))
end

if pokemon.pokerus==2
overlay.fill_rect(52,278,4,4,Color.new(0,0,0))
end
speciesname=PBSpecies.getName(pokemon.species)
base=Color.new(248,248,248)
shadow=Color.new(96,96,96)
publicID=pokemon.trainerID&0xFFFF
pbSetSystemFont(overlay)
naturename=PBNatures.getName(pokemon.nature)
abilityname=PBAbilities.getName(pokemon.ability)
abilitydesc=pbGetMessage(MessageTypes::AbilityDescs,pokemon.ability)
numberbase=(pokemon.isShiny?) ? Color.new(29*8,29*8,21*8) : base
numbershadow=(pokemon.isShiny?) ? Color.new(20*8,20*8,12*8) : shadow
textpos=[
[_INTL("POKeMON INFO"),4,0,0,base,shadow],
[_ISPRINTF("No. {1:03d}",pokemon.species),16,36,0,numberbase,numbershadow],
[pokemon.name,16,200,0,base,shadow],
[_INTL("/{1}",speciesname),16,228,0,base,shadow],
[_INTL("Lv{1}",pokemon.level),64,254,0,base,shadow],
[_INTL("TYPE/"),176,96,0,Color.new(0,0,0),Color.new(208,208,200)],
[_INTL("C: CANCEL"),475,2,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("ID No. {1:05d}",publicID),463,64,1,base,shadow],
[abilityname,176,144,0,base,shadow],
[abilitydesc,176,176,0,Color.new(0,0,0),Color.new(208,208,200)]
]
if pokemon.gender==0
textpos.push([_INTL("♂"),132,254,false,Color.new(120,184,248),Color.new(0,120,248)])
elsif pokemon.gender==1
textpos.push([_INTL("♀"),132,254,false,Color.new(248,128,128),Color.new(168,24,24)])
end
if pokemon.pokerus==1 || pokemon.hp==0 || pokemon.status>0
textpos.push([_INTL("STATUS"),4,288,false,base,shadow])
end
pbDrawTextPositions(overlay,textpos)
# Pink OT Color: 4A7F2977
drawColoredTextEx(overlay,176,64,300,_INTL("\\[7FFF318C]OT/\\[7F285E20]{1}",pokemon.ot))
drawColoredTextEx(overlay,176,228,300,_INTL("\\[043C3AFF]{1}\\[0000675A] nature",naturename))
pbSetSmallFont(overlay)
textpos=[
[_INTL("PROFILE"),196,42,0,base,shadow],
[_INTL("ABILITY"),196,122,0,base,shadow],
[_INTL("TRAINER MEMO"),196,202,0,base,shadow]
]
pbDrawTextPositions(overlay,textpos)
type1rect=Rect.new(0,pokemon.type1*28,64,28)
type2rect=Rect.new(0,pokemon.type2*28,64,28)
overlay.blt(240,98,@typebitmap,type1rect)
overlay.blt(320,98,@typebitmap,type2rect) if pokemon.type1!=pokemon.type2
end


def drawPageOneEgg(pokemon)
overlay=@sprites["overlay"].bitmap
overlay.clear
imagepos=[
["Graphics/Pictures/summaryEgg.png",0,0,0,0,-1,-1]
]
pbDrawImagePositions(overlay,imagepos)
base=Color.new(248,248,248)
shadow=Color.new(96,96,96)
pbSetSystemFont(overlay)
textpos=[
[_INTL("POKeMON INFO"),4,0,0,base,shadow],
[pokemon.name,16,196,0,base,shadow],
[_INTL("TYPE/"),176,96,0,Color.new(0,0,0),Color.new(208,208,200)],
[_INTL("C: CANCEL"),475,2,1,Color.new(0,0,0),Color.new(208,208,200)],
[sprintf(_INTL("ID No. ?????")),463,64,1,base,shadow]
]
eggstate=_INTL("It looks like this egg will take a long time to hatch.")
eggstate=_INTL("What will hatch from this? It will take some time.") if pokemon.eggsteps<0x2900
eggstate=_INTL("It moves occasionally. It should hatch soon.") if pokemon.eggsteps<0xb00
eggstate=_INTL("It's making sounds. It's about to hatch!") if pokemon.eggsteps<0x600
pbDrawTextPositions(overlay,textpos)
drawColoredTextEx(overlay,176,64,300,_INTL("\\[7FFF318C]OT/?????"))
drawColoredTextEx(overlay,176,144,300,_INTL("\\[0000675A]{1}",eggstate))
drawColoredTextEx(overlay,176,228,300,_INTL("\\[0000675A]Pokemon Egg"))
pbSetSmallFont(overlay)
textpos=[
[_INTL("PROFILE"),196,42,0,base,shadow],
[_INTL("STATE"),196,122,0,base,shadow],
[_INTL("TRAINER MEMO"),196,202,0,base,shadow]
]
pbDrawTextPositions(overlay,textpos)
type1rect=Rect.new(0,9*28,64,28)
overlay.blt(240,98,@typebitmap,type1rect)
end


def drawPageTwo(pokemon)
overlay=@sprites["overlay"].bitmap
speciesname=PBSpecies.getName(pokemon.species)
base=Color.new(248,248,248)
shadow=Color.new(96,96,96)
publicID=pokemon.trainerID&0xFFFF
imagepos=[
["Graphics/Pictures/summary2.png",0,0,0,0,-1,-1]
]
if pokemon.pokerus==1 || pokemon.hp==0 || @pokemon.status>0
status=@pokemon.status-1
status=6 if pokemon.pokerus==1
status=5 if pokemon.hp==0
imagepos.push(["Graphics/Pictures/statuspane.png",0,288,0,0,-1,-1])
imagepos.push(["Graphics/Pictures/statuses.png",106,296,0,16*status,44,16])
end
ballused=@pokemon.ballused ? @pokemon.ballused : 0
ballimage=sprintf("Graphics/Pictures/ball%02d_0.png",@pokemon.ballused)
imagepos.push([ballimage,16,254,0,0,-1,-1])
pbDrawImagePositions(overlay,imagepos)
if pokemon.pokerus==2
overlay.fill_rect(52,278,4,4,Color.new(0,0,0))
end
pbSetSystemFont(overlay)
naturename=PBNatures.getName(pokemon.nature)
abilityname=PBAbilities.getName(pokemon.ability)
itemname=pokemon.item==0 ? _INTL("NONE") : PBItems.getName(pokemon.item)
growthrate=pokemon.growthrate
startexp=PBExperience.pbGetStartExperience(pokemon.level,growthrate)
endexp=PBExperience.pbGetStartExperience(pokemon.level+1,growthrate)
numberbase=(pokemon.isShiny?) ? Color.new(29*8,29*8,21*8) : base
numbershadow=(pokemon.isShiny?) ? Color.new(20*8,20*8,12*8) : shadow
textpos=[
[_INTL("POKeMON SKILLS"),4,0,0,base,shadow],
[_ISPRINTF("No. {1:03d}",pokemon.species),16,36,0,numberbase,numbershadow],
[pokemon.name,16,196,0,base,shadow],
[_INTL("/{1}",speciesname),16,228,0,base,shadow],
[_INTL("Lv{1}",pokemon.level),64,254,0,base,shadow],
[_INTL("HP"),212,114,2,base,shadow],
[_INTL("ATTACK"),212,146,2,base,shadow],
[_INTL("DEFENSE"),212,178,2,base,shadow],
[_INTL("SP. ATK"),390,114,2,base,shadow],
[_INTL("SP. DEF"),390,146,2,base,shadow],
[_INTL("SPEED"),390,178,2,base,shadow],
[_INTL("EXP. POINTS"),172,224,0,base,shadow],
[_INTL("NEXT LV."),172,256,0,base,shadow],
[itemname,242,64,2,Color.new(0,0,0),Color.new(208,208,200)],
[_INTL("NONE"),400,64,2,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.hp,pokemon.totalhp),346,114,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.attack),346,146,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.defense),346,178,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.spatk),472,114,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.spdef),472,146,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.speed),472,178,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.exp),472,224,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",endexp-pokemon.exp),472,256,1,Color.new(0,0,0),Color.new(208,208,200)]
]
if pokemon.gender==0
textpos.push([_INTL("♂"),132,254,false,Color.new(120,184,248),Color.new(0,120,248)])
elsif pokemon.gender==1
textpos.push([_INTL("♀"),132,254,false,Color.new(248,128,128),Color.new(168,24,24)])
end
if pokemon.pokerus==1 || pokemon.hp==0 || pokemon.status>0
textpos.push([_INTL("STATUS"),4,288,false,base,shadow])
end
pbDrawTextPositions(overlay,textpos)
pbSetSmallFont(overlay)
textpos=[
[_INTL("ITEM"),196,42,0,base,shadow],
[_INTL("STATS"),196,90,0,base,shadow],
[_INTL("EXPERIENCE"),196,202,0,base,shadow],
[_INTL("RIBBONS"),356,42,0,base,shadow],
]
pbDrawTextPositions(overlay,textpos)
end

def drawPageThree(pokemon)
overlay=@sprites["overlay"].bitmap
speciesname=PBSpecies.getName(pokemon.species)
base=Color.new(248,248,248)
shadow=Color.new(96,96,96)
publicID=pokemon.trainerID&0xFFFF
imagepos=[
["Graphics/Pictures/summary3.png",0,0,0,0,-1,-1]
]
if pokemon.pokerus==1 || pokemon.hp==0 || @pokemon.status>0
status=@pokemon.status-1
status=6 if pokemon.pokerus==1
status=5 if pokemon.hp==0
imagepos.push(["Graphics/Pictures/statuspane.png",0,288,0,0,-1,-1])
imagepos.push(["Graphics/Pictures/statuses.png",106,296,0,16*status,44,16])
end
ballused=@pokemon.ballused ? @pokemon.ballused : 0
ballimage=sprintf("Graphics/Pictures/ball%02d_0.png",@pokemon.ballused)
imagepos.push([ballimage,16,254,0,0,-1,-1])
pbDrawImagePositions(overlay,imagepos)
if pokemon.pokerus==2
overlay.fill_rect(52,278,4,4,Color.new(0,0,0))
end
pbSetSystemFont(overlay)
numberbase=(pokemon.isShiny?) ? Color.new(29*8,29*8,21*8) : base
numbershadow=(pokemon.isShiny?) ? Color.new(20*8,20*8,12*8) : shadow
textpos=[
[_INTL("BATTLE MOVES"),4,0,0,base,shadow],
[_ISPRINTF("No. {1:03d}",pokemon.species),16,36,0,numberbase,numbershadow],
[pokemon.name,16,196,0,base,shadow],
[_INTL("/{1}",speciesname),16,228,0,base,shadow],
[_INTL("Lv{1}",pokemon.level),64,254,0,base,shadow],
[_INTL("C: INFO"),475,2,1,Color.new(0,0,0),Color.new(208,208,200)]
]
if pokemon.gender==0
textpos.push([_INTL("♂"),132,254,false,Color.new(120,184,248),Color.new(0,120,248)])
elsif pokemon.gender==1
textpos.push([_INTL("♀"),132,254,false,Color.new(248,128,128),Color.new(168,24,24)])
end
imagepos=[]
yPos=64
for i in 0...pokemon.moves.length
if pokemon.moves[i].id>0
imagepos.push(["Graphics/Pictures/types.png",170,yPos+2,0,
pokemon.moves[i].type*28,64,28])
textpos.push([PBMoves.getName(pokemon.moves[i].id),240,yPos,0,base,shadow])
textpos.push([
_ISPRINTF("PP{1:02d}/{2:02d}",pokemon.moves[i].pp,pokemon.moves[i].totalpp),
388,yPos,0,Color.new(72,72,72),Color.new(216,216,216)])
else
textpos.push(["-",240,yPos,0,base,shadow])
textpos.push([_INTL("--"),416,yPos,0,Color.new(72,72,72),Color.new(216,216,216)])
end
yPos+=32
end
if pokemon.pokerus==1 || pokemon.hp==0 || pokemon.status>0
textpos.push([_INTL("STATUS"),4,288,false,base,shadow])
end
pbDrawTextPositions(overlay,textpos)
pbDrawImagePositions(overlay,imagepos)
pbSetSmallFont(overlay)
textpos=[
[_INTL("MOVES"),196,42,0,base,shadow],
[_INTL("DESCRIPTION"),196,218,0,base,shadow],
]
pbDrawTextPositions(overlay,textpos)
end

def drawSelectedMove(pokemon,moveToLearn,moveid)
overlay=@sprites["overlay"].bitmap
movedata=PBMoveData.new(moveid)
basedamage=movedata.basedamage
type=movedata.type
accuracy=movedata.accuracy
drawMoveSelection(pokemon,moveToLearn)
pbSetSystemFont(overlay)
move=moveid
textpos=[
[basedamage==0 ? _INTL("---") : _ISPRINTF("{1:d}",basedamage),
158,240,1,Color.new(0,0,0),Color.new(208,208,200)],
[accuracy==0 ? _INTL("---") : _ISPRINTF("{1:d}",accuracy),
158,272,1,Color.new(0,0,0),Color.new(208,208,200)]
]
pbDrawTextPositions(overlay,textpos)
drawTextEx(overlay,172,240,308,0,
pbGetMessage(MessageTypes::MoveDescriptions,moveid),
Color.new(0,0,0),Color.new(208,208,200))
end

def drawMoveSelection(pokemon,moveToLearn)
overlay=@sprites["overlay"].bitmap
speciesname=PBSpecies.getName(pokemon.species)
base=Color.new(248,248,248)
shadow=Color.new(96,96,96)
publicID=pokemon.trainerID&0xFFFF
pbDrawImagePositions(overlay,[
["Graphics/Pictures/summary4.png",0,0,0,0,-1,-1]
])
pbSetSystemFont(overlay)
textpos=[
[_INTL("BATTLE MOVES"),4,0,0,base,shadow],
[_ISPRINTF("No. {1:03d}",pokemon.species),16,36,0,base,shadow],
[pokemon.name,16,196,0,base,shadow],
[_INTL("C: SWITCH"),475,2,1,Color.new(0,0,0),Color.new(208,208,200)],
[_INTL("POWER"),16,240,0,base,shadow],
[_INTL("ACCURACY"),16,272,0,base,shadow]
]
imagepos=[]
yPos=64
for i in 0..4
moveobject=nil
moveBase=nil
moveShadow=nil
if i==4
if moveToLearn==0
textpos.push([_INTL("CANCEL"),240,yPos,0,base,shadow])
else
moveobject=PBMove.new(moveToLearn)
moveBase=Color.new(248,184,176)
moveShadow=Color.new(208,112,104)
end
else
moveobject=pokemon.moves[i]
moveBase=base
moveShadow=shadow
end
if moveobject
if moveobject.id!=0
imagepos.push(["Graphics/Pictures/types.png",170,yPos+2,0,
moveobject.type*28,64,28])
textpos.push([PBMoves.getName(moveobject.id),240,yPos,0,moveBase,moveShadow])
textpos.push([
_ISPRINTF("PP{1:02d}/{2:02d}",moveobject.pp,moveobject.totalpp),
388,yPos,0,Color.new(72,72,72),Color.new(216,216,216)])
else
textpos.push(["-",240,yPos,0,base,shadow])
textpos.push([_INTL("--"),416,yPos,0,Color.new(72,72,72),Color.new(216,216,216)])
end
end
yPos+=32
end
pbDrawTextPositions(overlay,textpos)
pbDrawImagePositions(overlay,imagepos)
pbSetSmallFont(overlay)
textpos=[
[_INTL("MOVES"),196,42,0,base,shadow],
[_INTL("DESCRIPTION"),196,218,0,base,shadow],
[_INTL("EFFECT"),36,218,0,base,shadow],
]
pbDrawTextPositions(overlay,textpos)
end

def pbIsHiddenMove?(move)
for i in 0...$ItemData.length
next if !pbIsHiddenMachine?(i)
atk=$ItemData[i][ITEMMACHINE]
return true if move==atk
end
return false
end

def pbForgetMove(moveToLearn)
selmove=0
ret=0
loop do
Graphics.update
Input.update
@sprites["movesel"].update
if Input.trigger?(Input::B)
ret=4
break
end
if Input.trigger?(Input::C)
if ret<4 && moveToLearn!=0 && pbIsHiddenMove?(@pokemon.moves[selmove].id)
Kernel.pbMessage(_INTL("HM moves can't be forgotten now."))
else
break
end
end
if Input.trigger?(Input::DOWN)
selmove+=1
if selmove<4 && selmove>=pbNumMoves(@pokemon)
selmove=4
end
selmove=0 if selmove>4
selmove=4 if selmove<0
@sprites["movesel"].index=selmove
newmove=(selmove==4) ? moveToLearn : @pokemon.moves[selmove].id
drawSelectedMove(@pokemon,moveToLearn,newmove)
ret=selmove
end
if Input.trigger?(Input::UP)
selmove-=1
if selmove<4 && selmove>=pbNumMoves(@pokemon)
selmove=pbNumMoves(@pokemon)-1
end
selmove=0 if selmove>4
selmove=4 if selmove<0
@sprites["movesel"].index=selmove
newmove=(selmove==4) ? moveToLearn : @pokemon.moves[selmove].id
drawSelectedMove(@pokemon,moveToLearn,newmove)
ret=selmove
end
end
return (ret==4) ? -1 : ret
end

def pbMoveSelection
@sprites["movesel"].visible=true
@sprites["movesel"].index=0
selmove=0
oldselmove=0
switching=false
drawSelectedMove(@pokemon,0,@pokemon.moves[selmove].id)
loop do
Graphics.update
Input.update
@sprites["movepresel"].update
@sprites["movesel"].update
if Input.trigger?(Input::B)
break if !switching
@sprites["movepresel"].visible=false
switching=false
end
if Input.trigger?(Input::C)
if selmove==4
break if !switching
@sprites["movepresel"].visible=false
switching=false
else
if !switching
@sprites["movepresel"].index=selmove
oldselmove=selmove
@sprites["movepresel"].visible=true
switching=true
else
tmpmove=@pokemon.moves[oldselmove]
@pokemon.moves[oldselmove]=@pokemon.moves[selmove]
@pokemon.moves[selmove]=tmpmove
@sprites["movepresel"].visible=false
switching=false
drawSelectedMove(@pokemon,0,@pokemon.moves[selmove].id)
end
end
end
if Input.trigger?(Input::DOWN)
selmove+=1
if selmove<4 && selmove>=pbNumMoves(@pokemon)
selmove=4
end
selmove=0 if selmove>4
selmove=4 if selmove<0
@sprites["movesel"].index=selmove
newmove=(selmove==4) ? 0 : @pokemon.moves[selmove].id
Audio.se_play("Audio/SE/Choose.wav")
drawSelectedMove(@pokemon,0,newmove)
end
if Input.trigger?(Input::UP)
selmove-=1
if selmove<4 && selmove>=pbNumMoves(@pokemon)
selmove=pbNumMoves(@pokemon)-1
end
selmove=0 if selmove>4
selmove=4 if selmove<0
@sprites["movesel"].index=selmove
newmove=(selmove==4) ? 0 : @pokemon.moves[selmove].id
Audio.se_play("Audio/SE/Choose.wav")
drawSelectedMove(@pokemon,0,newmove)
end
end
@sprites["movesel"].visible=false
end

def pbGoToPrevious
if @page!=0
newindex=@partyindex
while newindex>0
newindex-=1
if @party[newindex] && !@party[newindex].egg?
@partyindex=newindex
break
end
end
else
newindex=@partyindex
while newindex>0
newindex-=1
if @party[newindex]
@partyindex=newindex
break
end
end
end
end

def pbGoToNext
if @page!=0
newindex=@partyindex
while newindex<@party.length-1
newindex+=1
if @party[newindex] && !@party[newindex].egg?
@partyindex=newindex
break
end
end
else
newindex=@partyindex
while newindex<@party.length-1
newindex+=1
if @party[newindex]
@partyindex=newindex
break
end
end
end
end


def pbScene
if @pokemon && !@pokemon.egg?
pkmnwav=sprintf("Audio/SE/%03dCry.wav",@pokemon.species)
Audio.se_play(pkmnwav,100,(@pokemon.hp*25/@pokemon.totalhp)+75) rescue nil
end
loop do
Graphics.update
Input.update
if Input.trigger?(Input::B)
break
end
dorefresh=false
if Input.trigger?(Input::C)
if @page==0
break
elsif @page==2
pbMoveSelection
dorefresh=true
drawPageThree(@pokemon)
end
end
if Input.trigger?(Input::UP)
pbGoToPrevious
@pokemon=@party[@partyindex]
@sprites["pokemon"].bitmap.dispose
@sprites["pokemon"].bitmap=pbLoadPokemonBitmap(@pokemon)
pbPositionPokemonSprite(@sprites["pokemon"],16,64)
dorefresh=true
if @pokemon && !@pokemon.egg?
pkmnwav=sprintf("Audio/SE/%03dCry.wav",@pokemon.species)
Audio.se_play(pkmnwav,100,(@pokemon.hp*25/@pokemon.totalhp)+75) rescue nil
end
end
if Input.trigger?(Input::DOWN)
pbGoToNext
@pokemon=@party[@partyindex]
@sprites["pokemon"].bitmap.dispose
@sprites["pokemon"].bitmap=pbLoadPokemonBitmap(@pokemon)
pbPositionPokemonSprite(@sprites["pokemon"],16,64)
dorefresh=true
if @pokemon && !@pokemon.egg?
pkmnwav=sprintf("Audio/SE/%03dCry.wav",@pokemon.species)
Audio.se_play(pkmnwav,100,(@pokemon.hp*25/@pokemon.totalhp)+75) rescue nil
end
end
if Input.trigger?(Input::LEFT) && !@pokemon.egg?
oldpage=@page
@page-=1
@page=0 if @page<0
@page=2 if @page>2
dorefresh=true
if @page!=oldpage
Audio.se_play("Audio/SE/Choose.wav")
dorefresh=true
end
end
if Input.trigger?(Input::RIGHT) && !@pokemon.egg?
oldpage=@page
@page+=1
@page=0 if @page<0
@page=2 if @page>2
if @page!=oldpage
Audio.se_play("Audio/SE/Choose.wav")
dorefresh=true
end
end
case @page
when 0
drawPageOne(@pokemon)
when 1
drawPageTwo(@pokemon)
when 2
drawPageThree(@pokemon)
end
end
end


end



class PokemonSummary

def initialize(scene)
@scene=scene
end

def pbStartScreen(party,partyindex)
@scene.pbStartScene(party,partyindex)
@scene.pbScene
@scene.pbEndScene
end

def pbStartForgetScreen(party,partyindex,moveToLearn)
ret=-1
@scene.pbStartForgetScene(party,partyindex,moveToLearn)
ret=@scene.pbForgetMove(moveToLearn)
@scene.pbEndScene
return ret
end

end

If u want to place the bar at a different place on the image, just look at the lines 138 and 139 of the script. There is @gaugeX=46 and @gaugeY=194. Modify it as u like ;).

lightou
April 12th, 2008, 02:35 AM
Thank you, it works perfectly !

But there is some "spaces" in you code, like this :

drawSelectedMove(@pokemon,moveToLearn,@pokemon.mov es[0].id)

I had to delete them, but now it's good :)

imtheomega
April 12th, 2008, 02:41 AM
Thank you, it works perfectly !

But there is some "spaces" in you code, like this :

drawSelectedMove(@pokemon,moveToLearn,@pokemon.mov es[0].id)

I had to delete them, but now it's good :)

I dont have it in my script. Certainly an error when I copied it here.

By the way, I modified the "def drawPageTwo(pokemon)" in PokemonSummary : now it draws the experience in the xpbar.

def drawPageTwo(pokemon)
overlay=@sprites["overlay"].bitmap
speciesname=PBSpecies.getName(pokemon.species)
base=Color.new(248,248,248)
shadow=Color.new(96,96,96)
publicID=pokemon.trainerID&0xFFFF
imagepos=[
["Graphics/Pictures/summary2.png",0,0,0,0,-1,-1]
]
if pokemon.pokerus==1 || pokemon.hp==0 || @pokemon.status>0
status=@pokemon.status-1
status=6 if pokemon.pokerus==1
status=5 if pokemon.hp==0
imagepos.push(["Graphics/Pictures/statuspane.png",0,288,0,0,-1,-1])
imagepos.push(["Graphics/Pictures/statuses.png",106,296,0,16*status,44,16])
end
ballused=@pokemon.ballused ? @pokemon.ballused : 0
ballimage=sprintf("Graphics/Pictures/ball%02d_0.png",@pokemon.ballused)
imagepos.push([ballimage,16,254,0,0,-1,-1])
pbDrawImagePositions(overlay,imagepos)
growthrate=@pokemon.growthrate
startexp=PBExperience.pbGetStartExperience(@pokemon.level,growthrate)
endexp=PBExperience.pbGetStartExperience(@pokemon.level+1,growthrate)
if startexp==endexp
@explevel=0
else
@explevel=(@pokemon.exp-startexp)*128/(endexp-startexp)
end
def exp
return @explevel
end
overlay.fill_rect(336,292,self.exp,6,Color.new(64,200,248))
if pokemon.pokerus==2
overlay.fill_rect(52,278,4,4,Color.new(0,0,0))
end
pbSetSystemFont(overlay)
naturename=PBNatures.getName(pokemon.nature)
abilityname=PBAbilities.getName(pokemon.ability)
itemname=pokemon.item==0 ? _INTL("NONE") : PBItems.getName(pokemon.item)
growthrate=pokemon.growthrate
startexp=PBExperience.pbGetStartExperience(pokemon.level,growthrate)
endexp=PBExperience.pbGetStartExperience(pokemon.level+1,growthrate)
numberbase=(pokemon.isShiny?) ? Color.new(29*8,29*8,21*8) : base
numbershadow=(pokemon.isShiny?) ? Color.new(20*8,20*8,12*8) : shadow
textpos=[
[_INTL("POKeMON SKILLS"),4,0,0,base,shadow],
[_ISPRINTF("No. {1:03d}",pokemon.species),16,36,0,numberbase,numbershadow],
[pokemon.name,16,196,0,base,shadow],
[_INTL("/{1}",speciesname),16,228,0,base,shadow],
[_INTL("Lv{1}",pokemon.level),64,254,0,base,shadow],
[_INTL("HP"),212,114,2,base,shadow],
[_INTL("ATTACK"),212,146,2,base,shadow],
[_INTL("DEFENSE"),212,178,2,base,shadow],
[_INTL("SP. ATK"),390,114,2,base,shadow],
[_INTL("SP. DEF"),390,146,2,base,shadow],
[_INTL("SPEED"),390,178,2,base,shadow],
[_INTL("EXP. POINTS"),172,224,0,base,shadow],
[_INTL("NEXT LV."),172,256,0,base,shadow],
[itemname,242,64,2,Color.new(0,0,0),Color.new(208,208,200)],
[_INTL("NONE"),400,64,2,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.hp,pokemon.totalhp),346,114,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.attack),346,146,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.defense),346,178,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.spatk),472,114,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.spdef),472,146,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.speed),472,178,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",pokemon.exp),472,224,1,Color.new(0,0,0),Color.new(208,208,200)],
[_ISPRINTF("{1:d}",endexp-pokemon.exp),472,256,1,Color.new(0,0,0),Color.new(208,208,200)]
]
if pokemon.gender==0
textpos.push([_INTL("♂"),132,254,false,Color.new(120,184,248),Color.new(0,120,248)])
elsif pokemon.gender==1
textpos.push([_INTL("♀"),132,254,false,Color.new(248,128,128),Color.new(168,24,24)])
end
if pokemon.pokerus==1 || pokemon.hp==0 || pokemon.status>0
textpos.push([_INTL("STATUS"),4,288,false,base,shadow])
end
pbDrawTextPositions(overlay,textpos)
pbSetSmallFont(overlay)
textpos=[
[_INTL("ITEM"),196,42,0,base,shadow],
[_INTL("STATS"),196,90,0,base,shadow],
[_INTL("EXPERIENCE"),196,202,0,base,shadow],
[_INTL("RIBBONS"),356,42,0,base,shadow],
]
pbDrawTextPositions(overlay,textpos)
end

Zephyr Gale
April 12th, 2008, 11:41 AM
thanks, some of those are actually great ^.^ thanks (i'll still post the ones i've made/edited to be bigger)



1) what kind of music are you looking for?

2) yes, you can also edit what directions are movable on each tileset

with the way that the map conections are nnow set up, does that mean that i can have 2 maps conected on the same side of one, as long as they don't over lap?

1.Basic over wrld music and such.

2.great, problem solved.


And geez I still cant get a solid way to stop these 2 maps from touching,

I think they somehow run into eachother. (maybe they need to be in different folders or something?)

imtheomega
April 12th, 2008, 01:20 PM
Hi,

I have a problem with the map connections. I'm trying to make my caterpillar work with it but when I go from a map to another, the images of the caterpillar members are not deleted on the previous map.
Someone knows how I could erase these moved events?

yaoimutt
April 12th, 2008, 02:54 PM
1.Basic over wrld music and such.

2.great, problem solved.


And geez I still cant get a solid way to stop these 2 maps from touching,

I think they somehow run into eachother. (maybe they need to be in different folders or something?)


what do you mean "i still can't get a solid way to stop these 2 maps from tuching"


and i have this problem-
Whenever my player is at a point where they can see 4 maps (the one they are on, plus 3, example: north side, west side, and the one that also conects them) the map that isn't directly conected to the on that you are on slides, or sometimes doesn't show up at all.

blueguy
April 13th, 2008, 12:49 AM
I'm wondering where I can find a chart of some kind for these 4 digit color codes that the message system uses. I've searched quite a bit, but I can't find them.

Wichu
April 13th, 2008, 01:35 AM
This is what I do:
Take your colour in hexadecimal format: for example, FFCC00, or the decimal equivalent, 255/204/0
Open the calculator app.
Switch to Scientific mode (View -> Scientific).
Making sure the appropriate base (hex or dec) is selected, type the first part of the number, i.e. 255 or FF, to the nearest multiple of 8 below 256, which is 248.
Divide by 8, and then check the Bin checkbox. You should see a string of 5 1s or 0s. Write this down somewhere.
Repeat for the green and blue values.
Then, still in binary, type the values as one number in order:
111111101000000
Then click the Hex checkbox.
This is your code (7F40 in this example).
This is what I used, but there's probably an easier way. At least it works.

AtlantianTokRa
April 13th, 2008, 07:19 AM
And geez I still cant get a solid way to stop these 2 maps from touching,

I think they somehow run into eachother. (maybe they need to be in different folders or something?)

go into the folder PBS, then open the file connections.txt then find the lines that are connecting those two maps e.g
# Town (1) - Route (2)
2,South,0,7,North,2
and delete those lines
or failing that delete the entire contents of that file an remake all your connections

victorspvl
April 13th, 2008, 09:40 AM
How do i make one battle, if the hero lose the continue playing normally...
(like the rivals battle)
Please answer!

Hall Of Famer
April 13th, 2008, 09:41 AM
I just encountered an issue with my game. I want to generate a wild pokemon battle, using script pbWildBattle(X,Y,V,C). I would like it to be a battle in which the player can't run away, so set the "C" to false. However, I'm still able to "stay away safely" in the game. What's wrong with my script? Besides, how to make that POKEMON un-catchable? I'd appreciate it very much if anyone of you could tell me how to deal with this issue, thanks.

No one knows how to set a wild battle?

imtheomega
April 13th, 2008, 10:21 AM
No one knows how to set a wild battle?


In PokemonField, at the line 268, there should be "battle.cantescape=false" (it's in pbPrepareBattle). Delete it and it will work.

Fittsboy
April 13th, 2008, 11:17 AM
Is there a way to add a Pokeball symbol next to a wild Pokemon's name if you have already caught that Pokemon? Thanks in advance.