Advertiser Content

Other Question Make NPC battle eachother Page 2

Started by CodeBreaker June 17th, 2019 1:24 PM
  • 2902 views
  • 34 replies
Seen June 29th, 2019
Posted June 29th, 2019
18 posts
128 Days
Thank you :D I put the switches off to make sure it was that, i'm gonna put them back on then later.
Another question, hope the moderators here don't get annoyed by off topic or you for that matter XD

I was wondering about the evolution system mechanics. I was wondering if the spiky eared pichu can evolve if I'd add a sprite with a similar name to it.

the image for the spiky eared pichu has the name 172b_1, so I was thinking if I add an image in the pikachu section 025b_1, that it would the evolution of it. I'm not sure if i'm in the correct line of thought tho XD


Been busy with a single problem and haven't been able to find solution, through google or whatsoever. A command to check for a specifically named pokémon and one to remove that same pokémon.
So if you got an Espeon called Jeff, you give jeff away.

Ego13

hollow_ego

Male
Larua Region
Seen 19 Hours Ago
Posted 4 Weeks Ago
303 posts
2.2 Years
You don't need to turn on/off the switch manually, as the script is taking care of that

The form of the evolution is not determined by the pictures at all. In fact you can have two different forms with the same sprite. And if you have the Spikey Eared Pichu it will evolve into form 1 of Pikachu.
All details can be found here: https://essentialsdocs.fandom.com/wiki/Forms
Looking for spriters to help with

Pokemon Hollow on pokecommunity.com
Seen June 29th, 2019
Posted June 29th, 2019
18 posts
128 Days
Concerning the switch. I had to turn it manually off to test the issue before the correction is what I mean, not sure if it auto turns back on next time when its used or not, but will see.

Oh ok, thanks :) Thought spikey eared pichu couldn't evolve originally, cause in the games it couldn't.

I've been rummaging around in essentials docs in search of the a code that would allow me to delete a certain pokémon from the party, though the slot is undefined.
To explain the situation, imagine if a trainer asks you to capture a growlithe and to name them "Arch", you'd "give it to them", without trading and maybe they'd pay you or give you a reward.
But I can't seem to find the script needed for such a thing.

Ego13

hollow_ego

Male
Larua Region
Seen 19 Hours Ago
Posted 4 Weeks Ago
303 posts
2.2 Years
Ah right there was someting about that. Uhm then you need to remove that Pichu check from the evolution method. Just search for "Pichu" in the scripts and you will find it quickly.

Well to do that you would need to check the players party for a Growlithe that is named "Arch". Also you would need to make sure that you are not deleting the Players own Growlithe if it happens to have the same name. For all this there is no finished script. You might want to handle it similar to when you are trying to trade a Pokemon. That means having the player choose the Pokemon and when he has choosen it, check if it is valid.
For details on possible methods refer to https://essentialsdocs.fandom.com/wiki/Manipulating_Pok%C3%A9mon
Especially the part "Choosing a Pokemon"
Looking for spriters to help with

Pokemon Hollow on pokecommunity.com
Seen June 29th, 2019
Posted June 29th, 2019
18 posts
128 Days
Yeah that's one of the links i've been using and haven't gotten any further whatsoever. I don't get how to check for the selected one to be a specific pokémon or its name for that fact.
If there was a way for the nickname to be identified from the variable. Like [0003: Temp Pokemon Name] = Archy or so... but I can't find anything for it.
Edit:Hrmm, maybe V something, gonna try that one soon, just wanna finish something else in the project first. Will let you know my progress ^^
Edit2: Yeah, it didn't work out... :/
pbChooseTradablePokemon in comparison has option to select specific pokémon type. being pbChooseTradablePokemon(1,2,:RATTATA), which isn't the case for pbChoosePokemon or atleast I didn't get it to work...

Ego13

hollow_ego

Male
Larua Region
Seen 19 Hours Ago
Posted 4 Weeks Ago
303 posts
2.2 Years
Well if you want to reuse the code I suggest making it a standalone script that you can call in the event.
I made a simple script for that. It will automatically remove the Pokemon if it is valid

 
# give species in this format -> :GROWLITHE
# name can either be left out if the name doesn't matter or has to be given as a string -> "Arch"
def hasPokemonToGive(species,name=nil)
  return false if !pbHasSpecies?(species) # if the player doesn't even have the species, don't even open the party screen
  pokemon = nil
  index = -1
  # let the player select a Pokemon
  pbFadeOutIn(99999){
    scene = PokemonParty_Scene.new
    screen = PokemonPartyScreen.new(scene,$Trainer.party)
    screen.pbStartScene(_INTL("Choose a Pokémon."),false)
    index = screen.pbChoosePokemon
    screen.pbEndScene
  }
  
  # if the Pokemon is valid, remove it from party
  if ($Trainer.party[index].name==name || !name ) && isConst?($Trainer.party[index].species,PBSpecies,species)
    pbRemovePokemonAt(index)
    return true
  end
  
  return false
end
You can use this script in a conditonal branch to give the appropriate text to the player or whatever.
Looking for spriters to help with

Pokemon Hollow on pokecommunity.com

mgriffin

Seen 6 Hours Ago
Posted 7 Hours Ago
710 posts
5.5 Years
Any way to have trainer1 have an end speech if they win? Like a taunt still in the battle screen if they win for story purposes.
I don't think that question belongs in this thread?

Maybe look for the code that displays the losing end speeches, and expand it to cover winning too? Try searching for a message that's likely in the code, for example the message about having won money. I wouldn't be surprised if there's already a resource out there that expands the PBS files to cover this functionality, or maybe it's even built into Essentials.
Seen 1 Week Ago
Posted September 6th, 2019
12 posts
1 Years
---------------------------
Pokémon Chronicles
---------------------------
[Pokémon Essentials version 17.2]

Exception: RuntimeError

Message: Script error within event 18 (coords 21,17), map 66 (Stein Cavern):

Exception: NoMethodError

Message: PokeBattle_Battle:4191:in `pbEndOfBattle'private method `gsub' called for nil:NilClass

***Full script:

trainer1=[:POKEMONTRAINER_Max,"Max"]
trainer2=[:ROCKETADMPRT,"Proton"]
trainers=[trainer1,trainer2]
pbNPCBattle(trainers)


Interpreter:243:in `pbExecuteScript'

PokeBattle_Battle:2707:in `pbStartBattleCore'

PokeBattle_Battle:2506:in `pbStartBattle'

NPC Battle:163:in `pbNPCBattle'

NPC Battle:162:in `pbSceneStandby'

NPC Battle:164:in `pbNPCBattle'

NPC Battle:161:in `pbBattleAnimation'

NPC Battle:161:in `pbNPCBattle'

(eval):4:in `pbExecuteScript'

Interpreter:1606:in `eval'



Interpreter:276:in `pbExecuteScript'

Interpreter:1606:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:163:in `cng_dayseason_map_update'

Scene_Map:161:in `loop'

Scene_Map:170:in `cng_dayseason_map_update'

Seasons:124:in `update'



This exception was logged in

C:\Users\User\Saved Games\Pokémon Chronicles\errorlog.txt.

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

What i did wrong?
Advertiser Content