Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2017-03-19 13:46:31

Wild
Member
From: Blighty
Registered: 2016-12-30
Post 10/12

[pokered] Adding trainers to new maps

Hi Everyone,

Little recurring problem I am having here with adding new trainers into the overworld. The problem is similar to the one described and solved in this topic here : https://hax.iimarckus.org/topic/5656/

However, I am trying to add new trainers to Route 2, a map that didn't already have trainers on it originally. Even though my object data and script is seemingly fine, a virtual carbon copy of Route 3, the trainers do not behave correctly.

They will see you, the battle will initiate and work fine, however when you beat the trainer, the flag is not set saying that you have. This results in an endless battle loop that you can't excape from. I have added new event constants for these new trainers, is there something else that I'm missing?

There's also another strange glitch happening on this map, where an NPC gives you a Freshwater. The event plays out fine, but at the end, his sprite and those of all the others on the map glitch. Something's seriously wrong somewhere, but I can't work it out.

Any help, pointers or advice would be greatly appreciated if anyone has experienced this same problem. Cheers!

Offline

#2 2017-03-19 13:54:58

Fotomac
Member
Registered: 2015-10-25
Post 291/332

Re: [pokered] Adding trainers to new maps

I think you might be looking for the event constants. That's a good place to start.

Offline

#3 2017-03-19 14:38:54

Wild
Member
From: Blighty
Registered: 2016-12-30
Post 11/12

Re: [pokered] Adding trainers to new maps

Thanks Fotomac, however I have added new event constants for every trainer. Unless there is somewhere else other than event_constants.asm that would need editing as well?

Offline

#4 2017-03-19 23:47:41

Fotomac
Member
Registered: 2015-10-25
Post 292/332

Re: [pokered] Adding trainers to new maps

You would need to edit the corresponding script to add the events, if I remember correctly. It worked for me when I added a Lass into Pewter Gym as a reference to Pokémon Origins, but just in case I'd like to suggest setting each trainer's line of sight to 0, so talking to the trainer becomes mandatory to trigger a battle.

Offline

#5 2017-03-20 10:51:41

Wild
Member
From: Blighty
Registered: 2016-12-30
Post 12/12

Re: [pokered] Adding trainers to new maps

OK, so I figured out what was causing the sprite glitching in the game. Turns out that Route 2's sprite set is split into two, and all battles and events that were set below the boundary between the two different sprite sets for the map were behaving incorrectly. A simple change of the map's assigned sprite set to not have the split solved the problem straight away.

With regard to trainer flags not being set, it was a typo of one number on my part that caused the problem. Woops! :O Thanks for giving your ideas Fotomac!

Offline

#6 2017-03-21 00:05:35

Fotomac
Member
Registered: 2015-10-25
Post 293/332

Re: [pokered] Adding trainers to new maps

Always glad to help.

Offline

Board footer

Powered by FluxBB