PDA

View Full Version : [Question] A Few Problems with Trading and Surfing


Nickalooose
March 23rd, 2012, 07:36 AM
This is something I've never done before so, I'm assuming I make a new thread for this... If not, explain where and I'll do that next time haha.

I'm using the "new years" Essentials.

So far, I've come across some dodgy things with adding Pokémon and trading, if you set no nickname, the Pokémon has no name at all...


pbStartTrade(pbGet(1),
PBSpecies::PIKACHU,
"","Bob"
)Leaves PIKACHU's name as blank, Nevertheless, I fixed this myself, now, adding a foreign Pokémon on the other hand, I'm having more trouble with, reading the wiki (http://pokemonessentials.wikia.com/wiki/Editing_a_Pok%C3%A9mon) (which explains nothing in all fairness), using;

$Trainer.party[$Trainer.party.length-1](
poke.makeShiny,
poke.status=1,
poke.statusCount=3
)Gives an error...

Exception: SyntaxError
Message: (eval):1:in `pbExecuteScript'compile error
(eval):1: syntax error
***Full script:
$Trainer.party[$Trainer.party.length-1](
poke.makeShiny,
poke.status=1,
poke.statusCount=3
)
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'

$Trainer.party[$Trainer.party.length-1](
poke.makeShiny,
poke.status=1
)Also gives an error...

Exception: SyntaxError
Message: (eval):1:in `pbExecuteScript'compile error
(eval):1: syntax error
***Full script:
$Trainer.party[$Trainer.party.length-1](
poke.makeShiny,
poke.status=1
)
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'


$Trainer.party[$Trainer.party.length-1](
poke.makeShiny
)Gives the same error...

Exception: SyntaxError
Message: (eval):1:in `pbExecuteScript'compile error
(eval):1: syntax error
***Full script:
$Trainer.party[$Trainer.party.length-1](
poke.makeShiny
)
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'


$Trainer.party[$Trainer.party.length-1]Does nothing (obviously)...

But upon checking the newly added Pokémon VIA Pokémon menu, the name is blank, IF, no nickname is given... I'm having trouble fixing this one!
pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"),_I(""),1)There are a couple problems with this, as you see in GREEN, PIKACHU should have no nickname and as you see in RED, PIKACHU should be female...

http://i327.photobucket.com/albums/k446/Nickalooose/ErrorPicture.png
Here you can see, PIKACHU has no name at all and his gender seems to be male...

Adding new lines within the adding foreign Pokémon script section, causes errors like, undefined method shiny or item and so on...

Is there any fixes for this yet? Or even any ideas, I'll try anything once.

This is such a stupid problem, but it is a problem and I cannot solve this myself...

Another problem I found...

Surfing, you cannot walk on water, true, you cannot swim on land, true...

But if you choose to surf, as long as and autotile is surfable, despite it being underneath a non surfable tile, you can surf on it...

http://i327.photobucket.com/albums/k446/Nickalooose/ErrorPicture2.png
Pic1; Facing Water
Pic2; Facing Land
Pic3; Surfing Water
Pic4; Surfing Land
Pic5; Exiting Water VIA Land

I figure this is the, player facing tile, script, is not checking if the tile is a land tile and/or is skipping the land tile because it found a surfable tile... the reason I have come across this error is because the illusion of under water paths, needs the autotile to seem as though it continues under ground, but if I stop the water at land, it will have the grass edges as you can see in the pictures...

Any solutions?

These problems are bugging me to where I've stopp progress on my game to attempt to fix, but after everything I tried, I give up, maybe someone here has a fix. Thanks for reading.

Ho-oh 112
March 23rd, 2012, 07:59 AM
here's the script error fix:
the red is where you went wrong

poke=$Trainer.party[$Trainer.party.length-1](
poke.makeShiny,
poke.status=1,
poke.statusCount=3
)


for the trade:


x=PBSpecies::PIKACHU
pbStartTrade(pbGet(1),
x,
"",PBSpecies.getName(x)
)

Maruno
March 23rd, 2012, 10:42 AM
Trading
It is assumed that all traded Pokémon will have nicknames. However, if you don't want the received Pokémon to have a nickname, you can use the following

poke=PBSpecies::PIKACHU
pbStartTrade(pbGet(1),poke,PBSpecies.getName(poke),_I("Dave"))Technically that sets the nickname to be the same as the species name, which isn't the whole solution (it just makes the trade scene look right). Immediately after the trade is done, use the following line to remove the nickname completely:
$Trainer.party[pbGet(1)].name=nilAdding a foreign Pokémon
pbAddForeignPokemon only sets a couple of details about the Pokémon (species, level and nickname), and you need to edit the rest of them (gender, ribbons, etc.) afterwards.

pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"),nil,1)
pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"))The red nil means no nickname. The green number is not the gender of the Pokémon, but the gender of the Original Trainer (Bob) - is 0 (male) if not defined. If it's a male Original Trainer, you can just use the second version instead.

Since the new Pokémon will (should) go at the end of the player's party, it's easy to find and therefore edit. Use something like the following:

poke=$Trainer.party[$Trainer.party.length-1]
poke.setGender(true)
poke.makeShiny
poke.status=1Note the lack of commas. The red line is how you make the Pokémon female.


Surfing on land
If the problem is because there is a surfable autotile beneath the path, I suggest you remove it. If you hold down Shift while erasing the under-path water tiles, it won't affect the "bending". Alternatively, you can double-click an autotile and choose which tile to place (top left tile is the regular placing again), so you can pick the corners and just pop them down without needing to tile past them just to get the corners.

Nickalooose
March 24th, 2012, 02:32 AM
here's the script error fix:
the red is where you went wrong

poke=$Trainer.party[$Trainer.party.length-1](
poke.makeShiny,
poke.status=1,
poke.statusCount=3
)
for the trade:


x=PBSpecies::PIKACHU
pbStartTrade(pbGet(1),
x,
"",PBSpecies.getName(x)
)


Thanks for your reply, it was a simple mistake, but I thought I never put poke=blahblahblah before, but thanks for your reply.

Trading
It is assumed that all traded Pokémon will have nicknames. However, if you don't want the received Pokémon to have a nickname, you can use the following

poke=PBSpecies::PIKACHU
pbStartTrade(pbGet(1),poke,PBSpecies.getName(poke),_I("Dave"))Technically that sets the nickname to be the same as the species name, which isn't the whole solution (it just makes the trade scene look right). Immediately after the trade is done, use the following line to remove the nickname completely:
$Trainer.party[pbGet(1)].name=nilAdding a foreign Pokémon
pbAddForeignPokemon only sets a couple of details about the Pokémon (species, level and nickname), and you need to edit the rest of them (gender, ribbons, etc.) afterwards.

pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"),nil,1)
pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"))The red nil means no nickname. The green number is not the gender of the Pokémon, but the gender of the Original Trainer (Bob) - is 0 (male) if not defined. If it's a male Original Trainer, you can just use the second version instead.

Since the new Pokémon will (should) go at the end of the player's party, it's easy to find and therefore edit. Use something like the following:

poke=$Trainer.party[$Trainer.party.length-1]
poke.setGender(true)
poke.makeShiny
poke.status=1Note the lack of commas. The red line is how you make the Pokémon female.


Surfing on land
If the problem is because there is a surfable autotile beneath the path, I suggest you remove it. If you hold down Shift while erasing the under-path water tiles, it won't affect the "bending". Alternatively, you can double-click an autotile and choose which tile to place (top left tile is the regular placing again), so you can pick the corners and just pop them down without needing to tile past them just to get the corners.

Problem,
poke.setGender seems a little broken somehow, (not really)
poke.setGender(true) returns the Pokémon to become male...
poke.setGender(false) returns the Pokémon female...
Not sure if this is from and update or it is my Essentials, this isn't really a problem, will just have to reverse the true/false thing, that is all, just thought I'd let you know.

EDIT: I lied, poke.setGender actually does nothing... So this comment was irrelavent! It was just ironic, that all the times I tried, PIKACHU was male, but when I switched to false, PIKACHU was female.

EDIT... AGAIN: I read up about shininess, and read that making a Pokémon shiny, re-calculates stats... Turns out, it re-does the gender too! So, setGender, and anything else should be changed after makeShiny.

Everything else on the other hand is perfect, quick question on the nicknames thing, so if I use:
$Trainer.party[pbGet(1)].name=nilIf PIKACHU evolves, the name will then be RAICHU, right? I used debug to find this, but I'm assuming that debug mode will automactically change PIKACHU to RAICHU nickname or not, because I can only change species!

The surfing problem, I never even knew I could double click an autotile, learn something new everyday, so thanks for the information on that, still have a lot to learn clearly.

Maruno
March 24th, 2012, 03:19 PM
Actually, changing gender/nature will undo the effect of makeShiny, because all three things depend on the same number (the personal ID) which is changed when you change any of those factors. Technically there is a chance that a shiny Pokémon will remain shiny after changing its gender, but that's as rare as getting a shiny Pokémon in the first place. I'll be coming up with an easier way around this mess soon.

Setting a value (such as the Pokémon's name) to nil removes it. Since Pikachu no longer has a name, it simply uses the name of whatever species it happens to be (i.e. Pikachu, or Raichu after you use a Thunderstone). The debug options will not affect nicknames, so if you turn a Geodude called Bob into a Mew, it will still be called Bob - the only thing that the debug option "Change species" does is change the species.

I only found out about the double-clicking an autotile thing recently, so I'm still learning things too!

Nickalooose
March 25th, 2012, 11:48 PM
Oh okay, I never checked to see if Shiny remained after I switched the order of makeShiny and setGender, but, changing the Pokémon to female deffinitly didn't work when it was before makeShiny, but, it worked when in order #2... If you do come up with an easier way, I would be ever so greatful :classic:. X

IceGod64
March 26th, 2012, 03:55 AM
Surfing on land
If the problem is because there is a surfable autotile beneath the path, I suggest you remove it. If you hold down Shift while erasing the under-path water tiles, it won't affect the "bending". Alternatively, you can double-click an autotile and choose which tile to place (top left tile is the regular placing again), so you can pick the corners and just pop them down without needing to tile past them just to get the corners.

I never, NEVER knew that.. Wow, that's useful!

Also, about the surfing... Try using the nuetral terrain tag (13) on all your grass/path tiles. Tiles with a Terrain Tag are ignored by essentials due to the fact that any water tile on a layer below 3 will always have another tile of it... Essentials sees 0 as "Ignore me". Using 13 will fix your problem entirely.