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

Help and Requests

Status
Not open for further replies.
50
Posts
15
Years
  • Seen Apr 17, 2024
i was talking about the non 3d tiles we have on pokecommunity, can anyone make them, and i mean a script that is like the menu in the demo of pokemon ryen
 

~Frozen Darkness~

It's watching you...
503
Posts
16
Years
def pbGetPokedexRegion
return pbGetCurrentRegion(0)
$game_variables[99] = $1
if $game_variables[99] = $2
return pbGetCurrentRegion(1)
end

This is most likely wrong, because I got an error when I accessed the Pokedex. :(

I'm a n00b to RGSS, but what went wrong in the script? Did I possibly define the global variable wrong?
 
50
Posts
15
Years
  • Seen Apr 17, 2024
i need the menu for hgss, one in 2d,and the tiles are not made, but some good spriters are out there
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
def pbGetPokedexRegion
return pbGetCurrentRegion(0)
$game_variables[99] = $1
if $game_variables[99] = $2
return pbGetCurrentRegion(1)
end

This is most likely wrong, because I got an error when I accessed the Pokedex. :(

I'm a n00b to RGSS, but what went wrong in the script? Did I possibly define the global variable wrong?
For a start, those dollar signs in front of the numbers (red) shouldn't be there. All that needs to be there is a number. And the script is ending on the green line, and never even looks at what you've added (it's because the line is "return"ing something; that's like an "end" to a def).

I'm not sure how you've set up your Dexes there (is the regional one 1 or 2? What Dexes do you have, in fact?), but the following should be enough:

Code:
def pbGetPoke[COLOR=Black]dexRegion
[/COLOR]    [COLOR=Lime][COLOR=Black]return [/COLOR][/COLOR]$game_variables[99]
[COLOR=Lime][COLOR=Black]end
[/COLOR][/COLOR]

That's right, just one line. You should change the variable somewhere else, like in the event where Professor Oak says, "Here you go, the National Dex". Set it to something stupid like 7725 when you do (if you only have 1 Regional Dex, any number apart from zero will do).

At the beginning of the game, the variable will be 0 (zero), and the Regional Dex will be displayed. Later on in the game, when you get the National Dex and set the variable to 7725, the game will see that there is no Regional Dex associated with that number (see below), and will therefore display the National Dex instead.



In pokemon.txt, you can add in something like the following line for each pokémon:

Code:
RegionalNumbers=42,17,0,3
This particular line defines four separate Regional Dexes for the pokémon:

  • Regional Dex 0 has this pokémon in it, as number 42.
  • Regional Dex 1 has this pokémon in it, as number 17.
  • Regional Dex 2 does not have this pokémon in it, because its number in this column is 0.
  • Regional Dex 3 has this pokémon in it, as number 3.
The Regional Dexes are zero-based, meaning 0 is the first one, 1 is the second one, and so forth. If the line was just "RegionalNumbers=42", then there would only be one Regional Dex, and the game would see it as Dex Number Zero. That's why, in the script above, when you return 0 (zero) at the start of the game, you'll get the Regional Dex.
 

|Maximus|

I'm back~
836
Posts
16
Years
  • Age 28
  • Seen Sep 10, 2010
How would I switch between pokedexes if I have beaten the game?

This is what I had in my options script.

Code:
  EnumOption.new(_INTL("BATTLE STYLE"),[_INTL("SHIFT"),_INTL("SET")],
  proc { $PokemonSystem.battlestyle },
  proc {|value|  $PokemonSystem.battlestyle=value }
  ),
  if $game_variables[99] >= 0
  EnumOption.new(_INTL("POKeDEX TYPE"),[_INTL("Regional"),_INTL("National")],
  proc { $game_variables[99] },
  proc {|value|  $game_variables[99]=value } 
  end
  ),

EDIT: Oh, and why does my game compile the data EVERY time it starts up?
 

Poeman

Banned
755
Posts
15
Years
  • Age 29
  • Seen Nov 1, 2012
Anyone?, anyone have an awnser
The tiles are made, and your post was two posts up no need to re-post it >_>

You may be new to game development but speaking and politeness, and common sense have been with you forever, please try to use them.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
How would I switch between pokedexes if I have beaten the game?

This is what I had in my options script.

Code:
  EnumOption.new(_INTL("BATTLE STYLE"),[_INTL("SHIFT"),_INTL("SET")],
  proc { $PokemonSystem.battlestyle },
  proc {|value|  $PokemonSystem.battlestyle=value }
  ),
  if $game_variables[99] >= 0
  EnumOption.new(_INTL("POKeDEX TYPE"),[_INTL("Regional"),_INTL("National")],
  proc { $game_variables[99] },
  proc {|value|  $game_variables[99]=value } 
  end
  ),
EDIT: Oh, and why does my game compile the data EVERY time it starts up?
That code will mean the "switch Dex" option is always visible. There's probably simpler ways to do this, but use a global switch to turn this option on/off.

Also, the "end" is in the wrong place. It should be after the "),", because if you look closely, the EnumOption line is actually spread across several lines (for clarity), and that ")," ends that line.

Code:
  if $game_switches[42] 
    EnumOption.new(_INTL("POKeDEX TYPE"),[_INTL("Regional"),_INTL("National")],
    proc { $game_variables[99] },
    proc {|value|  $game_variables[99]=value } 
    ),
  end
Something like that, maybe. Turn global switch 42 ON only when you've "beaten the game" (and then leave it like that forever).


The game will recompile itself whenever you've changed anything in the scripts or in the PBS files. Running it twice in a row means that at least the second run won't recompile (because there would be no changes since the first time).
 

|Maximus|

I'm back~
836
Posts
16
Years
  • Age 28
  • Seen Sep 10, 2010
That code will mean the "switch Dex" option is always visible. There's probably simpler ways to do this, but use a global switch to turn this option on/off.

Also, the "end" is in the wrong place. It should be after the "),", because if you look closely, the EnumOption line is actually spread across several lines (for clarity), and that ")," ends that line.

Code:
  if $game_switches[42] 
    EnumOption.new(_INTL("POKeDEX TYPE"),[_INTL("Regional"),_INTL("National")],
    proc { $game_variables[99] },
    proc {|value|  $game_variables[99]=value } 
    ),
  end
Something like that, maybe. Turn global switch 42 ON only when you've "beaten the game" (and then leave it like that forever).


The game will recompile itself whenever you've changed anything in the scripts or in the PBS files. Running it twice in a row means that at least the second run won't recompile (because there would be no changes since the first time).

I did that, but I got a syntax error in line '288'

This is a chunk of the script:

Code:
  NumberOption.new(_INTL("FRAME"),_INTL("TYPE%d"),1,$TextFrames.length,
  proc { $PokemonSystem.frame },
  proc {|value|  $PokemonSystem.frame=value }
  ),
  if $game_switches[50] 
    EnumOption.new(_INTL("POKeDEX TYPE"),[_INTL("Regional"),_INTL("National")],
    proc { $game_variables[99] },
    proc {|value|  $game_variables[99]=value } 
  ),  
  end

Here is the error:

Code:
Script 'PokemonOption' line '288': SyntaxError Occurred.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
I did that, but I got a syntax error in line '288'

This is a chunk of the script:

Code:
  NumberOption.new(_INTL("FRAME"),_INTL("TYPE%d"),1,$TextFrames.length,
  proc { $PokemonSystem.frame },
  proc {|value|  $PokemonSystem.frame=value }
  ),
  if $game_switches[50] 
    EnumOption.new(_INTL("POKeDEX TYPE"),[_INTL("Regional"),_INTL("National")],
    proc { $game_variables[99] },
    proc {|value|  $game_variables[99]=value } 
  ),  
  end
Here is the error:

Code:
Script 'PokemonOption' line '288': SyntaxError Occurred.
Which one is line 288?


ayone have a hgss pokedex script and tiles
A few people do have them, yes. No one will simply give you the Poké Dex scripts, though, because they worked hard on them (plus it implies you want the dual screen scripts as well, which people here don't want to hand out either). If you want to have a different-looking Poké Dex (or menu, or battle system), you'll either have to learn how to script and do it yourself, or find someone else who can and who would be willing to do all the work for you (hint: you won't). If you have an eye for programming, it's not actually that difficult.

For the tiles, look in the Resource Center. I know it's a crazy and ambiguous name for a place that holds game-making resources (what with it being in the game-making section and all), but I promise you there are a few things in there. Naturally, you'll give credit to anyone whose tiles you use.
 

|Maximus|

I'm back~
836
Posts
16
Years
  • Age 28
  • Seen Sep 10, 2010
Which one is line 288?



A few people do have them, yes. No one will simply give you the Poké Dex scripts, though, because they worked hard on them (plus it implies you want the dual screen scripts as well, which people here don't want to hand out either). If you want to have a different-looking Poké Dex (or menu, or battle system), you'll either have to learn how to script and do it yourself, or find someone else who can and who would be willing to do all the work for you (hint: you won't). If you have an eye for programming, it's not actually that difficult.

For the tiles, look in the Resource Center. I know it's a crazy and ambiguous name for a place that holds game-making resources (what with it being in the game-making section and all), but I promise you there are a few things in there. Naturally, you'll give credit to anyone whose tiles you use.

Oh haha. Sorry, line '288' is "),"
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Oh haha. Sorry, line '288' is "),"
Ah, I see the problem. All those options are in one big array, and I'm almost certain you can't simply use "if" clauses in the middle of those.

You have three solutions:

  • Immediately after the array is finished (after the one that puts in Speech Frame and after the "]" that closes the array), put the following. This will make the "Change Poké Dex" option the last/bottom-most option in the menu.
Code:
  if $game_switches[50] 
   @PokemonOptions.push[EnumOption.new(_INTL("POKeDEX TYPE"),[_INTL("Regional"),_INTL("National")],
     proc { $game_variables[99] },
     proc {|value|  $game_variables[99]=value } 
     )
   ]
  end
  • Lump all the code you've added into one big line, and put the "if $game_switches[50]" bit at the end of it. Remember to remove the "end", and remember that the "one big line" includes the "),". This keeps the option where it is.
  • A mixture of the two. All the options above the Poké Dex one go into the array, then "push" the Poké Dex option like above, then push all the options below it.
These options are listed in the order I'd recommend them. Option 3 is by far the most extensive edit.
 

|Maximus|

I'm back~
836
Posts
16
Years
  • Age 28
  • Seen Sep 10, 2010
Ah, I see the problem. All those options are in one big array, and I'm almost certain you can't simply use "if" clauses in the middle of those.

You have three solutions:

  • Immediately after the array is finished (after the one that puts in Speech Frame and after the "]" that closes the array), put the following. This will make the "Change Poké Dex" option the last/bottom-most option in the menu.
Code:
  if $game_switches[50] 
   @PokemonOptions.push[EnumOption.new(_INTL("POKeDEX TYPE"),[_INTL("Regional"),_INTL("National")],
     proc { $game_variables[99] },
     proc {|value|  $game_variables[99]=value } 
     )
   ]
  end
  • Lump all the code you've added into one big line, and put the "if $game_switches[50]" bit at the end of it. Remember to remove the "end", and remember that the "one big line" includes the "),". This keeps the option where it is.
  • A mixture of the two. All the options above the Poké Dex one go into the array, then "push" the Poké Dex option like above, then push all the options below it.
These options are listed in the order I'd recommend them. Option 3 is by far the most extensive edit.

It worked but I got this error when I go to options:
Code:
---------------------------
Pokemon Sparkling Yellow Version - Demo
---------------------------
Exception: NoMethodError

Message: undefined method `[]' for nil:NilClass

PokemonOption:312:in `pbStartScene'

PokemonOption:372:in `pbStartScreen'

PokemonLoad:435:in `pbStartLoadScreen'

PokemonLoad:435:in `pbFadeOutIn'

PokemonLoad:435:in `pbStartLoadScreen'

PokemonLoad:335:in `loop'

PokemonLoad:437:in `pbStartLoadScreen'

DebugIntro:6:in `main'

Main:37:in `mainFunctionDebug'

Main:16:in `mainFunction'



This exception was logged in errorlog.txt.

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

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
It worked but I got this error when I go to options:
Code:
---------------------------
Pokemon Sparkling Yellow Version - Demo
---------------------------
Exception: NoMethodError

Message: undefined method `[]' for nil:NilClass

PokemonOption:312:in `pbStartScene'
And what does line 312 look like?
 

|Maximus|

I'm back~
836
Posts
16
Years
  • Age 28
  • Seen Sep 10, 2010
And what does line 312 look like?

310 )
311 ]
312 if $game_switches[50]
313 @PokemonOptions.push[EnumOption.new(_INTL("POKeDEXTYPE"),[_INTL("Regional"),_INTL("National")],
314 proc { $game_variables[99] },
315 proc {|value| $game_variables[99]=value }
316 )
317 ]
318 end
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Interesting. Try retyping that line (you probably copy-pasted it originally) and see if that works. I don't know why it would, though.
 

|Maximus|

I'm back~
836
Posts
16
Years
  • Age 28
  • Seen Sep 10, 2010
Interesting. Try retyping that line (you probably copy-pasted it originally) and see if that works. I don't know why it would, though.

It worked, they were too far off to the left. But, when I turned switch 50 ON, the same error happened. At least I think the same error.

Code:
---------------------------
Pokemon Sparkling Yellow Version - Demo
---------------------------
Exception: TypeError

Message: cannot convert EnumOption into Integer

PokemonOption:317:in `[]'

PokemonOption:317:in `pbStartScene'

PokemonOption:372:in `pbStartScreen'

PokemonMenu:231:in `pbStartPokemonMenu'

PokemonMenu:230:in `pbFadeOutIn'

PokemonMenu:230:in `pbStartPokemonMenu'

PokemonMenu:139:in `loop'

PokemonMenu:238:in `pbStartPokemonMenu'

Scene_Map:180:in `call_menu'

Scene_Map:153:in `update'



This exception was logged in errorlog.txt.

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

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Put the second half of the top line, from "EnumOption" onwards, on a separate line, leaving only the "@PokemonOptions.push[" on the top line. This may well not work, though, in which case you'll just have to use option 4 - copy-paste the entire @PokemonOptions array, put your code into one of them, and stick them both in an "if" statement where one is used if switch 50 is ON, and the other if it's OFF.

I'm sure this should have gone into PMs a while ago.
 
Status
Not open for further replies.
Back
Top