• Having trouble receiving email verification when signing up? Contact an administrator via our Discord server!
  • Consider joining our Discord server if you haven't already! Discord is a free voice and text chat platform that's more or less a combination of Skype and Teamspeak. Using Discord, you can chat with other Relic Castle members in real-time! Wowza! Click here for the details!
Resource icon

Resource NPC Battles (NPC vs. NPC) 1.01

Hollow_Ego

Trainer
Member
Posts
77
#1
Hollow_Ego submitted a new resource:

NPC Battles (NPC vs. NPC) - Set up battles between 2 NPCs that th player can watch

NPC BATTLE SCRIPT

This script allows you to let two NPCs battle each other in an actual battle enviroment, so that the player can watch it. The outcome can not be modified.

Features:
- let any two NPCs battle that are defined in the trainer pbs
- allows double battles
- player can control the NPCs action if wanted
- doesn't level NPCs Pokemon
- doesn't effect players money
- by default each battle can be lost, so the player won't black out
- the party that is...
Read more about this resource...
 

Hollow_Ego

Trainer
Member
Posts
77
#2

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Posts
23
#3
Super interesting script, something i thought would be cool ages ago, glad to see someone technical did it!

works mostly okay, in a single 1v1 battle however i get like the trainers VS animation with the BW protagonists with the weird long message (can provide a screenshot) but not in double battles (might be the existing trainer classes)

and also crashes after ending. (calls to pbafterbattle, changed to to pbendbattle as of v16 but still the same thing)

any reason this might be? sorry to post here about it might just be a me thing

Edit: managed to fix it; changing it to "Events.onEndBattle.trigger(nil,decision,canlose)" seemed to work for me, since others havent complained im sure it works fine in 17 just was a backstep/downgrade thing
 
Last edited:

Hollow_Ego

Trainer
Member
Posts
77
#4
Super interesting script, something i thought would be cool ages ago, glad to see someone technical did it!

works mostly okay, in a single 1v1 battle however i get like the trainers VS animation with the BW protagonists with the weird long message (can provide a screenshot) but not in double battles (might be the existing trainer classes)

and also crashes after ending. (calls to pbafterbattle, changed to to pbendbattle as of v16 but still the same thing)

any reason this might be? sorry to post here about it might just be a me thing

Edit: managed to fix it; changing it to "Events.onEndBattle.trigger(nil,decision,canlose)" seemed to work for me, since others havent complained im sure it works fine in 17 just was a backstep/downgrade thing

Thank you for your feedback!

I'm glad you were able to fix the issue and appreciate that you posted the solutio.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Posts
23
#5
So small issue, again might be a downgrade thing, when the npc on the players side loses there is no end speech (understandable) and the match ends almost abruptly and the pokemon icon bars remain (could be a thing to ebs too however) could easily fix this by swapping them around but felt i'd point it out.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Posts
23
#6
so most likely a v17 script to v16 thing (even though the only removal was that of the afterbattle thing)

it pretty much breaks saves, moreso, before its fine, watch the battle then player pokemon items are broken (they are set to nil not 0 or the item (even if they have or havent got items) felt it was another issue but i used a version from like 2 months ago and i still get it. (not sure where to point to as the errors are that the .item of the players pokemon are 0.

might find a way to save the players party to a variable then give it back? might fix it. if you have any idea let me know but it seems tied to this script or moreso the battles (tested with trainers ones and it doesnt happen, so maybe since i downgraded it it somehow doesnt return the value for the player pokemon's items)
 
Top