- 1
- Posts
- 13
- Years
- Seen Oct 15, 2011
would it be possible to create an online battle option on this?
how do i make an event appear on certain day? the wiki doesn't help...
pbIsWeekday(-1,2,4,6) is used for the Bug Catching Contest, and is TRUE if the day is Tuesday (2), Thursday (4) or Saturday (6). It is already a switch and is used as part of the Bug Catching Contest, so look at how it works. The def itself is in the script section PokemonTime.Thanx ZingZags, but i can't actually find anything on specific days of the week, alot of time events and such. x
Use a decimal point, not a comma.Simple question I guess:
I want to set the default screensize to 240x160 pixels, but when I set the values DEFAULTSCREENWIDTH, DEFAULTSCREENHEIGHT and DEFAULTSCREENZOOM to 240, 160 and 0,5 respectively, only the screensize is changed but it isn't zoomed out.
My bad, I did use a decimal point, I'm used to type commas in those situations xDUse a decimal point, not a comma.
I suspect that this is because the first image is loaded and its opacity is halved (say), and then for the second instance that first image is copied and its opacity halved again, resulting in a quarter opacity for the second instance of the image.Is there a specific reason why the opacity of images vary depending on location on the map, regardless of whether or not the opacity number is the same?
For instance I'll have a single image event that has the opacity of 150. It looks the way I want. I make a copy of this event somewhere else on the map, with the same opacity. Except when I activate that event, the opacity is blatantly different - it's either much lighter or much darker. These inconsistencies mostly appear on connected maps it seems. I've been working around, but I was wondering if anyone has a solution?
Speed, not at all easily. If I knew at all how to do it, I'd be putting it into Essentials.There is some way of doing that the battles have more speed?
And there is some way of changing the Wild Battle Music depending on the region?
Then don't use the Editor. It's easy to just edit the text file, you know.Wanted to point out that changing the Global Metadata with the editor messes up the metadata.txt file. It's pretty frustrating to constantly having to change the metadata.
If you want to use larger sprites, you just have to resize them to the size you want (which will likely distort them). If you didn't already know, you need a paint program to do that (like MS Paint). There is no script to automatically make sprites smaller or larger (though it could be done with zoom commands, but that requires scripting), and likewise there's no script that requires a specific sprite size (it could be a 500x500 sprite for all it matters, it just wouldn't completely fit on screen is all).I figured it would be something like that.
But I do have another question - er, where exactly in the script do you set the maximum size for sprites in battle? For instance I want to expand it from 128x128 to 160x160. Also where do you control the placement of the battle sprites and backsprites and whatnot? This is all probably very obvious but for the life of me I can't seem to find the scripts.
The demo uses the function pbCreatePokemon, found in the script section --PB2-- (now called PBUtilities.)
It is defined like this:
Code:def pbCreatePokemon party=[3,6,9,12,15,18] # Species IDs of the Pokemon to be created for i in 0...party.length species=party[i] # Generate Pokemon with species and level 20 $Trainer.party[i]=PokeBattle_Pokemon.new(species,20,$Trainer) $Trainer.seen[species]=true # Set this species to seen and owned $Trainer.owned[species]=true end end
This function, not defined in the latest release, can make it easier to add Pokemon to a party:
Code:def pbAddPokemon(species,level) if $Trainer.party.length==6 && $PokemonStorage.full? Kernel.pbDisplayMessage("There's no more room for Pokemon!\1") Kernel.pbDisplayMessage("The Pokemon Boxes are full and can't accept any more!") return false end speciesname=PBSpecies.getName(species) Kernel.pbDisplayMessage("#{$Trainer.name} obtained #{speciesname}!\1") pokemon=PokeBattle_Pokemon.new(species,level,$Trainer) $Trainer.seen[species]=true $Trainer.owned[species]=true if Kernel.pbConfirmMessage("Would you like to give a nickname to #{speciesname}?") helptext="#{speciesname}'s nickname?" newname=pbEnterText(helptext,0,10) pokemon.name=newname if newname!="" end if $Trainer.party.length<6 $Trainer.party[$Trainer.party.length]=pokemon else oldcurbox=$PokemonStorage.currentBox storedbox=$PokemonStorage.pbStoreCaught(pokemon) curboxname=$PokemonStorage[oldcurbox].name boxname=$PokemonStorage[storedbox].name if storedbox!=oldcurbox Kernel.pbDisplayMessage("Box \"#{curboxname}\" on someone's PC was full.\1") Kernel.pbDisplayMessage("#{pokemon.name} was transferred to box \"#{boxname}.\"") else Kernel.pbDisplayMessage("#{pokemon.name} was transferred to someone's PC.\1") Kernel.pbDisplayMessage("It was stored in box \"#{boxname}.\"") end end return true end
I used the original and this error occurred-
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError
Message: Script error within event 1, map 32 (Professor's Lab):
Exception: SyntaxError
Message: (eval):12:in `pbExecuteScript'compile error
(eval):2: syntax error
(eval):4: dynamic constant assignment
Cyndaquil=party[1]
^
(eval):5: syntax error
155 level 5
^
(eval):7: syntax error
=PokeBattle_Pokemon.new(Cyndaquil,5,
^
(eval):9: syntax error
$Trainer.seen[Cyndaquil]=true 155
^
(eval):12: syntax error
***Full script:
def pcCreatePokemon
party=[3,6,9,12,15,18] 155
for i in 0...party.length
Cyndaquil=party[1]
155 level 5
$Trainer.party[1]
=PokeBattle_Pokemon.new(Cyndaquil,5,
$Trainer)
$Trainer.seen[Cyndaquil]=true 155
Set this species to be seen and owned
$Trainer.owned[Cyndaquil]=true
end
Interpreter:275:in `pbExecuteScript'
Interpreter:1592:in `command_355'
Interpreter:493:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
This exception was logged in
C:\Users\Roberts\Saved Games/Pokemon Essentials/errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
What happened here?
Poccil, PM me because I have no idea how to script it. Just PM the scripts to receive a Cyndaquil from the Professor. I am in seriously.
pbCreatePokemon
KoolKat, Poccil no longer supports Pokemon Essentials. It is now managed by the Pokemon Essentials Wiki, which is mostly taken care of by Maruno. Also, this script is not what you're looking for (and you made some syntax errors in the code). pbCreatePokemon by default adds six Pokemon to your party, and is for demo purposes only. To add a Cyndaquil to your party, use pbAddPokemon(155,5). The 155 is Cyndquil's species number, and 5 is the level it will be when you receive it. For future reference, the post you found was very old (poccil hasn't been active here for a very long time. The kit changed hands about a year ago). Please search (broken link removed) first, rather than this thread, from now on. This thread has been here since 2007, and subsequently contains some outdated information. The wiki remains current.Exception: RuntimeError
Message: Script error within event 1, map 32 (Professor's Lab):
Exception: SyntaxError
Message: (eval):12:in `pbExecuteScript'compile error
(eval):2: syntax error
(eval):4: dynamic constant assignment
Cyndaquil=party[1]
^
(eval):5: syntax error
155 level 5
^
(eval):7: syntax error
=PokeBattle_Pokemon.new(Cyndaquil,5,
^
(eval):9: syntax error
$Trainer.seen[Cyndaquil]=true 155
^
(eval):12: syntax error
***Full script:
def pcCreatePokemon
party=[3,6,9,12,15,18] 155
for i in 0...party.length
Cyndaquil=party[1]
155 level 5
$Trainer.party[1]
=PokeBattle_Pokemon.new(Cyndaquil,5,
$Trainer)
$Trainer.seen[Cyndaquil]=true 155
Set this species to be seen and owned
$Trainer.owned[Cyndaquil]=true
end
Interpreter:275:in `pbExecuteScript'
Interpreter:1592:in `command_355'
Interpreter:493:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
What happened here?
Poccil, PM me because I have no idea how to script it. Just PM the scripts to receive a Cyndaquil from the Professor. I am in seriously.
I disagree. The wiki picked up the kit in July (the wiki says so). Poccil just hadn't done anything with it since September 2010.The kit changed hands about a year ago).
Fair enough. My memory isn't long enough to remember that far back too well. People had still been suggesting fixes or pointing out bugs (especially FL. Where'd he go?) and such in that time between Poccil ceasing to update and him passing it on, so the transition was smooth.I disagree. The wiki picked up the kit in July (the wiki says so). Poccil just hadn't done anything with it since September 2010.
This is actually an issue I ran into as well, and only found the solution to after looking just now after you asked. In standard RMXP, it does this automatically (and Poccil renamed some stuff, so I couldn't just cut/paste what I figured out in a standard project). I actually first tried opening menus, since I figured that should update the screen, but the Pokegear is the only one I noticed that actually updated the map. It was just a $scene=Scene_Map.new call. However, this has a fade effect (oddly, existing sprites don't fade at all. Only the changes fade in). I tried every update method in Scene_Map (there's 4 or 5 different ones I think, with the last being the solution), and found what works (without the fade effect at that). Use $scene.disposeSpritesets, followed by $scene.createSpritesets. That's the only thing that seems to do it.EDIT: Does anyone know how to force the map to redraw itself? I want to update the map immediately after changing a tile during the game (due to stepping on it), but I can't figure out how to make it happen immediately. It happens randomly when walking around, but it could take between a few and a lot of steps and then all the changes are refreshed at once. Alternatively, where in the scripts does it refresh the map? I'm not talking about autotiles here, I mean regular tiles.
This is an expert-level question, I know, but there may yet be someone who could answer, or at least make a suggestion.
Shiny!This is actually an issue I ran into as well, and only found the solution to after looking just now after you asked. In standard RMXP, it does this automatically (and Poccil renamed some stuff, so I couldn't just cut/paste what I figured out in a standard project). I actually first tried opening menus, since I figured that should update the screen, but the Pokegear is the only one I noticed that actually updated the map. It was just a $scene=Scene_Map.new call. However, this has a fade effect (oddly, existing sprites don't fade at all. Only the changes fade in). I tried every update method in Scene_Map (there's 4 or 5 different ones I think, with the last being the solution), and found what works (without the fade effect at that). Use $scene.disposeSpritesets, followed by $scene.createSpritesets. That's the only thing that seems to do it.
That's an interesting idea. Some of the useless event commands could be reinstated. On further inspection, though, it'd probably just be a waste of time unless things were radically changed (which they won't be).At times I've found myself tempted to go back and rename stuff or modify things that Poccil did to be compatible with standard RMXP commands. Some of the changes or renaming don't seem to be necessary, and broken features (like Button Input Processing) don't seem to cause any issues when fixed. Of course, I wouldn't dream of trying that on the battle system.