FurryFox Wrote:I Followed Your Instructions In The Help section to Replace The Main Char, It Replaces Ash's sprite, But Not Him In The Pokemon Party
Could you Help Me?
I've added some special commands into the game that make this possible, but their existence is not obvious.
To completely replace Ash, you will need to use 4 of these commands.
This is what you do:
Create an RpgSprite and edit its script.
Create a "variable" command.
Select the new command and delete the 1st box of its settings so that it's blank.
And paste this into the 2nd box, including the [brackets]
[RAM_F.pokemon.removePokemon(ash)]This will remove Ash from the battle party.
(Also, everything is case-sensitive. Capitals and lower-case need to be exact. The name of the character/pokemon you're removing must always be lower-case)Create a 2nd "variable" command, erase its top box, and paste this into its bottom box:
[RAM_F.pokedex.removePokemon(ash)]This will remove Ash's pokedex entry.
Create a 3rd "variable" command, erase its top box, and paste this into the bottom box:
[RAM_F.pokemon.addPokemon(misty,1)]This will add Misty to the battle party, and she will be at level 1
Create a 4th "variable" command, erase its top box, and paste this into the bottom box:
[RAM_F.pokedex.addPokemon(misty)]This will add a pokedex entry about Misty.
If you're curious about how these weird-looking commands work, here's a technical explanation:
Spoiler (click to show/hide):
When you use a "variable" command or a textbox, any word you place within [brackets] will be treated as a variable name.
When the game sees this, it will look up the variable with that name and display or store the value of that variable instead of whatever you wrote in the box.
For example, typing [ash] will look up a variable called "ash", which happens to contain whatever nickname you gave him at the beginning of the game.
These variables can also be located inside of objects. An object is a container that can hold multiple variables. In the same way that a folder on the computer can hold multiple files. It's simply a way to organize things.
So you can type [myObject.someVariable] to read the value of a variable named "someVariable" that is inside of a container called "myObject".
The [brackets] are also able to perform another fancy trick.
They can run pieces of code.
The (parenthesis) tell the game to treat the variable as a piece of code and try to run it instead of reading its value.
For example, if you type [Math.random()], you will get a random decimal number between Zero and One.
Furthermore, you can also type something inside of the parenthesis and that text will be sent to the code that you're running.
So if we look at the 1st command...
[RAM_F.pokemon.removePokemon(ash)]
What it does is look inside of a container named "RAM_F"
Inside of RAM_F is another container named "pokemon".
And inside of "pokemon" is a piece of code named "removePokemon"
It calls "removePokemon" and sends it the word "ash"
removePokemon is a piece of code I programmed into the game that takes the name of a pokemon or a character and removes them from the player's battle party.
If you want to add a character or pokemon that doesn't already exist in this game, you need to add them to the game first.
To do this, look for a row of buttons on the top-left part of the editor and click on the 4th button to edit the game's overall settings.
Then click on the word "pokemon" in the list.
Click the + button, type the name of the new pokemon (all lower-case), and press the enter key.
Then click on the new pokemon's name in the list, and adjust their settings.
Once you've added a pokemon to the list, the game will know about them and be able to add them to your party.