• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Pokemon Contests Script 1.5

94
Posts
11
Years
  • Seen May 4, 2018
This is awesome!

Is there a way to edit the opponent Pokémon's moves?

EDIT: I'm getting this error (in an unedited version) in Round 2 in Porygon's turn (Smart contest)

HbQiMLR.png


Only when it's Porygon's turn
 
Last edited:
1,224
Posts
10
Years
This is awesome!

Is there a way to edit the opponent Pokémon's moves?

EDIT: I'm getting this error (in an unedited version) in Round 2 in Porygon's turn (Smart contest)

Only when it's Porygon's turn

Thought I fixed that. It's just a typo though.

Code:
if pbDoubleNext==true  #check for double hearts
        [COLOR="Red"]@currenthears*=2[/COLOR]
        pbReverseDoubleNext

red is 415. should be @currenthearts*=2
Only occurs for Porygon because he's the only one that knows a move that activates pbDoubleNext and goes fourth.

I haven't yet put in a way, but it shouldn't be too hard I don't believe. I'd like to make the player able to set anything they want in a .txt document, but I really don't want to mess with the compiler more. That was not much fun. I could just incorporate it into the main script call, though that's getting really long lol. I guess that's not really much of an issue though. I'll try and have it in the next update. Got a guy helping me with the graphical components for making a berry mixer-type deal (it's more of a crafting table, instead of what the original is), so that and the end scene and some stuff by Super Dedenne for the summary pages should be what's in the next update. Can't think of much to do after that.
 
94
Posts
11
Years
  • Seen May 4, 2018
Oh ok, thanks.

By the way, what does the 50 and the 20 mean in the lines:

(50,PBSpecies::MILOTIC,20,PBSpecies::MAGMAR,20,PBSpecies::VILEPLUME,20)

Is that their level?
 
1,224
Posts
10
Years
The 20's are the level, the first number is the difficulty for the AI. Only the 25, 50, and 75 ranges actually change anything. Difficulty above 25 removes the lowest scoring move for the round and chooses, above 75 removes the lowest two. The difficulty also determines how many chances it has to choose from the modified set (with the lower moves set to nil. This choice will fail if it chooses a nil move.) before choosing from the full move set instead.
 
15
Posts
10
Years
  • Age 23
  • Seen Jan 10, 2017
Im getting this error when I'm trying to call up the script:

Code:
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 5, map 2 (Ingori Town):

Exception: TypeError

Message: Section160:62:in `[]'cannot convert PokeBattle_Pokemon into Integer

***Full script:

pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,20,PBSpecies::HITMONTOP,20)


Interpreter:243:in `pbExecuteScript'

Contests:62:in `pbStartContest'

Contests:2180:in `pbStartContest'

Contests:2190:in `pbContest'

(eval):1:in `pbExecuteScript'

Interpreter:1600:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1600:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'



Interpreter:276:in `pbExecuteScript'

Interpreter:1600:in `command_355'

Interpreter:494: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\Wong\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------

Have tested it on the clean version and it works fine. Can't seem to figure what's causing this error.
 
1,224
Posts
10
Years
Im getting this error when I'm trying to call up the script:

Code:
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 5, map 2 (Ingori Town):

Exception: TypeError

Message: Section160:62:in `[]'cannot convert PokeBattle_Pokemon into Integer

***Full script:

pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,20,PBSpecies::HITMONTOP,20)


Interpreter:243:in `pbExecuteScript'

Contests:62:in `pbStartContest'

Contests:2180:in `pbStartContest'

Contests:2190:in `pbContest'

(eval):1:in `pbExecuteScript'

Interpreter:1600:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1600:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'



Interpreter:276:in `pbExecuteScript'

Interpreter:1600:in `command_355'

Interpreter:494: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\Wong\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------

Have tested it on the clean version and it works fine. Can't seem to figure what's causing this error.

It uses game variables 35 and 36 for this script. You have something else stored in 36. Either change that or just change all instances of $game_variables[36] in this script to whatever number. There's 12 instances. If you're using variable 35 for anything, do the same for it.
 
1,224
Posts
10
Years
Can someone please upload a picture or a video showing this script working?

Are you having problems with it?
Screenshot 1,Screenshot 2, Screenshot 3.

And still working on it, next release should be out soon.
Berry Mixer: Done
Implementing all the pokeblock's effects: 1/2 done
Preliminary judging: done. I can only find vague information about the exact scoring of this round, but I did the best I could. Also give extra points to shiny pokemon. Not sure if it does it in the real games, but it should have IMO.
Fixing the order changer so that it adjust the order between rounds based on total hearts: done
Results scene: Done. It's not super impressive, but it gets it's point across. PM me if you have or want to help make graphics for it and any other features in this tutorial.
Add debug feature to skip contest and win: Done. You can also do one round and skip the rest
Bug Fixing: Bug where it messes up the order (sometimes with duplicate pokemon) when there's a speed tie in the first round.
Couple minor (graphical)things. Fixed Berry Mixer graphics. Fixed Berry Mixer letting you mix two of a berry when you only have one. Added Page Up/Down support for the berry mixer, since you can have a lot of berries and it's a pain one by one. Added Super Dendenne's fix/feature for the ribbon page of the summary.


If there's any other things people might want, let me know soon.


So, last things to do now are finishing inserting the Pokeblocks, possibly finding the graphics for pokeblocks, and sprucing up the actual events in the contest hall.
 
Last edited:

Nickalooose

--------------------
1,309
Posts
16
Years
  • Seen Dec 28, 2023
I must admit, this is looking good and if that was your last update, let's hope it does what it's supposed to do... On a side note, the reason the final hearts linger sometimes, is because you have many pictures on screen and the game will remove the sprites as quickly as it can, but in some cases, will be too slow before the next scene will start... My advice is, blend some pictures together if you can and/or remove them yourself at the end of the script, one by one. (give them some nice looking screen slides or something). This is what I think anyway.
 
1,224
Posts
10
Years
I must admit, this is looking good and if that was your last update, let's hope it does what it's supposed to do... On a side note, the reason the final hearts linger sometimes, is because you have many pictures on screen and the game will remove the sprites as quickly as it can, but in some cases, will be too slow before the next scene will start... My advice is, blend some pictures together if you can and/or remove them yourself at the end of the script, one by one. (give them some nice looking screen slides or something). This is what I think anyway.

I might do a small update or two, fixing any bugs that may arise and such. At the very least I changed the berry mixer so you don't have to put it in a conditional branch.

As for the hearts, I actually am removing them manually, which is why I'm confused as to why it lingers. A second or two later it disappears. I might make it do the fade out and hide thing, so it can take as long as it needs to to actually remove them.
 

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
From what I read in the intro post, the way you define the Pokemon that appear is within the individual event. That seems very.. static, in comparison with how it's handled in Pokemon. If I could code, I'd probably have made an array somewhere in the scripts (or a text file for external editing) that defines certain species and what rank they would appear in Like, for example:
Code:
[NORMAL]
CHARIZARD,ribbon item,ai,move 1,move 2,move 3,move 4,contest type,nickname
Unless I'm misinterpreting the intro post wrong and this is how stuff works. If not, I'm not saying that you should recode the entire system to make this work (since that'd be unfair to you since you've spent all this time making it work splendidly as it is), just providing a potential idea for future inspiration or additional insight.
I'll probably not be adding this to my game just yet, since contests won't be a thing for a while, but when I do add it I'll be sure to leave a proper review on my thoughts on it.
 
1,224
Posts
10
Years
From what I read in the intro post, the way you define the Pokemon that appear is within the individual event. That seems very.. static, in comparison with how it's handled in Pokemon. If I could code, I'd probably have made an array somewhere in the scripts (or a text file for external editing) that defines certain species and what rank they would appear in Like, for example:
Code:
[NORMAL]
CHARIZARD,ribbon item,ai,move 1,move 2,move 3,move 4,contest type,nickname
Unless I'm misinterpreting the intro post wrong and this is how stuff works. If not, I'm not saying that you should recode the entire system to make this work (since that'd be unfair to you since you've spent all this time making it work splendidly as it is), just providing a potential idea for future inspiration or additional insight.
I'll probably not be adding this to my game just yet, since contests won't be a thing for a while, but when I do add it I'll be sure to leave a proper review on my thoughts on it.

It is quite different than how other things in essentials are handled, but I like it this way better, much less complex on my end. As I said in the post, all of these things can be specified by the user, by using a couple small scripts instead of a text file. Even it did, it would follow the same process but be less efficient because it has to read the data file. With as easy as the scripts are to call, I think it's just as user friendly as editing a text file.

The only advantage I see is that the compiler will find if you made any typos in the text file, whereas for this you'd have to do a quick test of each contest call. If I eventually feel like doing stuff in the compiler again (which I was only able to do the first time successfully with Maruno's help), I might reprogram it to work like that.
 

Zeak6464

Zeak #3205 - Discord
1,101
Posts
11
Years
  • Age 31
  • USA
  • Seen Oct 9, 2023
Pokemon Contest 1.5

Here is a video for you


got Error after round 4 xD

Exception: RuntimeError
Message: Script error within event 21, map 343 (Contest Hall):
Exception: TypeError
Message: Section046:33:in `pos='cannot convert String into Integer
***Full script:
Kernel.pbMessage(_INTL("First up is Gary's Butterscortch!"))
showSpeciesIntro(PBSpecies::CHARIZARD,"","Butterscortch")
pbAddContestMove(2,1,2,3,7)
pbChangeContestName(2,"Butterscortch")
pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,20,PBSpecies::HITMONTOP,20,1)

Interpreter:243:in `pbExecuteScript'
PBContestMove:33:in `initialize'
Contest:1773:in `new'
Contest:1773:in `pbMoveButtons'
Contest:1750:in `loop'
Contest:1840:in `pbMoveButtons'
Contest:185:in `pbTurn'
Contest:124:in `pbStartContest'
Contest:2460:in `pbStartContest'
Contest:2470:in `pbContest'

Interpreter:276:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494: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'
 
Last edited:
1,224
Posts
10
Years

You seem to have an older version that what was posted, so I'm not exactly sure where your error occurred. However, I think I fixed what might have been causing it. due to my ignorance, I didn't realize I was allowing you to select moves you don't have, which I believe is what would cause this error. This error could also be caused by inserting in new moves to the moves.txt file, but not adding them to contestmoves.txt

Fixed in the main post. I also fixed something else that would cause a crash at the very end sometimes.
 
1,224
Posts
10
Years
Fixed a problem with the Berry Mixer script in the main post. Probably not noticeable, but it would sometimes not give the correct block rewards
 
Last edited:

Zeak6464

Zeak #3205 - Discord
1,101
Posts
11
Years
  • Age 31
  • USA
  • Seen Oct 9, 2023
Would this work with the RMX-OS platform?

Yes & No , Single Player Contest work but Multiplayer Contest would need to be writen into the coding , and don't ask others to just give it to you. Try coding it 1st , then ask if your still getting errors to see what you should changed or to see what you messed up.
Lots of Luck ! If you do get this working for Multiplayer please feel free to message me , becouse I my self have issues trying to get this work for Multiplayer.
 
Back
Top