- 8
- Posts
- 7
- Years
- Seen Dec 26, 2016
Hey! Sorry for multiple threads, I'm in the groove and I've been making a ton of progress on my FireRed mod (well, at least on the tools and techniques required to make it happen haha!)
Anyways, my question is pretty simple. I want to insert a script at the end of EVERY battle, or whenever the map loads but the battle is over. I need this on wild pokemon, it'd be preferable not to have it on trainers (though I'm willing to compromise). Is this possible?
I want to use the script to force the player into discarding all their pokeballs (and other various forms) at the end of a battle. This way they're forced to use the Pokeball in the battle or risk losing the chance to catch the pokemon.
It's part of a Nuzlocke challenge script that I'm adding as an optional in my FireRed script. So far I have succeeded in making fainted pokemon get deleted when a zone is changed and locking players into a new route when they access it for the first time (if they're carrying a pokeball, they're not allowed to leave). I was thinking that when they end the battle, removing the pokeball would work.
Alternatively, if there's a "Start of battle" area I can put my script into, that would work as well, I would just have to create a var that says at the start of battle, if the flag isn't set, they discard their pokeball. Then set the flag next, so that it doesn't discard their pokeball if it's the first battle. This would be fine.
Any advice is welcome :) In the meantime... I'm going to continue trying to google a solution..
edit: if this isn't possible, then I'm considering forcing a wild encounter on a new route whenever the player enters a new route. This I think is do-able and much easier since it would be a one-off event triggered by the player stepping on a scripting tile (which automatically gives them a pokeball, starts a wild encounter, and flags so you can't get the pokeball again). This is a workaround but I'm not partial to it, I really would like players to be able to go up and use their old rods so they can get water types or something like that.. which requires the 'discard at end of battle' problem I'm looking at above.
edit2: I think I'm going to try the method I mentioned in the last edit. However, I might give the player the option to engage in a water or grass battle, on any routes after they have successfully obtained the Old Rod. This can allow players to get water pokemon from the zones without altering anything else in the game too much. Really, I'd still love to find a way to access the 'end of battle' region of scripting.
Anyways, my question is pretty simple. I want to insert a script at the end of EVERY battle, or whenever the map loads but the battle is over. I need this on wild pokemon, it'd be preferable not to have it on trainers (though I'm willing to compromise). Is this possible?
I want to use the script to force the player into discarding all their pokeballs (and other various forms) at the end of a battle. This way they're forced to use the Pokeball in the battle or risk losing the chance to catch the pokemon.
It's part of a Nuzlocke challenge script that I'm adding as an optional in my FireRed script. So far I have succeeded in making fainted pokemon get deleted when a zone is changed and locking players into a new route when they access it for the first time (if they're carrying a pokeball, they're not allowed to leave). I was thinking that when they end the battle, removing the pokeball would work.
Alternatively, if there's a "Start of battle" area I can put my script into, that would work as well, I would just have to create a var that says at the start of battle, if the flag isn't set, they discard their pokeball. Then set the flag next, so that it doesn't discard their pokeball if it's the first battle. This would be fine.
Any advice is welcome :) In the meantime... I'm going to continue trying to google a solution..
edit: if this isn't possible, then I'm considering forcing a wild encounter on a new route whenever the player enters a new route. This I think is do-able and much easier since it would be a one-off event triggered by the player stepping on a scripting tile (which automatically gives them a pokeball, starts a wild encounter, and flags so you can't get the pokeball again). This is a workaround but I'm not partial to it, I really would like players to be able to go up and use their old rods so they can get water types or something like that.. which requires the 'discard at end of battle' problem I'm looking at above.
edit2: I think I'm going to try the method I mentioned in the last edit. However, I might give the player the option to engage in a water or grass battle, on any routes after they have successfully obtained the Old Rod. This can allow players to get water pokemon from the zones without altering anything else in the game too much. Really, I'd still love to find a way to access the 'end of battle' region of scripting.
Code:
tile pseudoscript 1
if flag is 0
Give pokeball
Engage in wild battle (water or grass?)
set flag to 1
if flag is 1
Remove pokeball(s)
set flag to 2
if flag is 2
release
end
Last edited: