davo899 / CobblemonTrainers

Adds a trainer battle system to Cobblemon with challenging trainer AI
Other
1 stars 4 forks source link

Trainer SetWin and SetDefeat Commands Not Working (Fabric) #27

Closed nervixbreakdown closed 1 month ago

nervixbreakdown commented 1 month ago

Hey! Just wanted to notify the board in case anyone else is having this same issue.

First off, I play on a server with several other people and we have been loving the CobbleTrainers mod. Battling and setting up trainers works great! However, there are some very strange limitations we've noticed.

Some background on our setup:

The main issue is that /trainers setwincommand and /trainers setlosecommand do nothing when applied to any of our NPCs. And we've tried everything. A simple command like " /trainers setwincommand Snorlax_Girl '/give @p cobblemon:leftovers' " does nothing upon winning against the trainer. We've also noticed that using any dialog commands (for opening easy_npc dialog options) does nothing. We've also tried replacing @p with %player% and %PLAYER%, however nothing works.

We've had to simply deal with not using the additional commands at all and issue a notice that trainers won't give any rewards at this time.

We've also done several tests on newly created NPCs, recreating NPCs, in single player, in multiplayer, and clearing NPC win history to try and see if this changes anything. Sadly, we haven't found any solution yet.

If anymore information is needed, please let me know! Would love to hear that this issue is fixed in the future, but we hope this note helps for future development.

davo899 commented 1 month ago

You need to remove the slash from the inner command: /trainers setwincommand trainerName 'give %player% cobblemon:leftovers'. Sorry this caused so much trouble haha

nervixbreakdown commented 1 month ago

You need to remove the slash from the inner command: /trainers setwincommand trainerName 'give %player% cobblemon:leftovers'. Sorry this caused so much trouble haha

This fixed the issue, thank you so much!