- 2
- Posts
- 8
- Years
- Seen Nov 26, 2021
Hi,
I had the idea of adding version differences, but having players choose their version when starting a new game, (circumventing the need for multiple builds.)
Of course, the answer is simple - switches, but implementing it in scripts is where I'm struggling somewhat.
I've tried to deduce as much as possible, before running here asking for help.
My coding knowledge really boils down to tweaking what's already there, or implementing something similar somewhere else.
I think I'm on the right track in terms of where these implementations belong, but what to place there is another matter entirely.
So far I've worked out how to modify a Pokemon's form based on a switch in pField_EncounterModifiers (With the different form being a different front sprite, ala Gold/Silver) (For a touch of flair)
This was wonderful, until I realized I would also need to modify the form of an enemy trainer's entire team, to go along with this, using the same switch.
At the bottom of pField_EncounterModifiers, there's a dummied out script, concerning modifying an enemy trainer.
Events.onTrainerPartyLoad+=proc {|sender,e|
if e[0] # Trainer data should exist to be loaded, but may not exist somehow
trainer=e[0][0] # A PokeBattle_Trainer object of the loaded trainer
items=e[0][1] # An array of the trainer's items they can use
party=e[0][2] # An array of the trainer's Pokémon
YOUR CODE HERE
end
I think I'm on the right track, but I'm not sure what to put tweak or place in this script section (if $game_switches[XX], somewhere, obviously), as the wording seems different from any examples there are of modifying wild Pokemon.
Similarly, I had the idea of modifying the roster of wild Pokemon in an area (In-keeping with the multiple version theme), by creating a new encounter type, with the same switch as a trigger. (In PField_Encounters, under 'def pbEncounterType')
Likewise, there's no example of utilizing a switch that I can see to use as a 'springboard' to making this happen.
Apologies for the essay, but any help would be greatly appreciated.
Thanks in advance
I had the idea of adding version differences, but having players choose their version when starting a new game, (circumventing the need for multiple builds.)
Of course, the answer is simple - switches, but implementing it in scripts is where I'm struggling somewhat.
I've tried to deduce as much as possible, before running here asking for help.
My coding knowledge really boils down to tweaking what's already there, or implementing something similar somewhere else.
I think I'm on the right track in terms of where these implementations belong, but what to place there is another matter entirely.
So far I've worked out how to modify a Pokemon's form based on a switch in pField_EncounterModifiers (With the different form being a different front sprite, ala Gold/Silver) (For a touch of flair)
This was wonderful, until I realized I would also need to modify the form of an enemy trainer's entire team, to go along with this, using the same switch.
At the bottom of pField_EncounterModifiers, there's a dummied out script, concerning modifying an enemy trainer.
Events.onTrainerPartyLoad+=proc {|sender,e|
if e[0] # Trainer data should exist to be loaded, but may not exist somehow
trainer=e[0][0] # A PokeBattle_Trainer object of the loaded trainer
items=e[0][1] # An array of the trainer's items they can use
party=e[0][2] # An array of the trainer's Pokémon
YOUR CODE HERE
end
I think I'm on the right track, but I'm not sure what to put tweak or place in this script section (if $game_switches[XX], somewhere, obviously), as the wording seems different from any examples there are of modifying wild Pokemon.
Similarly, I had the idea of modifying the roster of wild Pokemon in an area (In-keeping with the multiple version theme), by creating a new encounter type, with the same switch as a trigger. (In PField_Encounters, under 'def pbEncounterType')
Likewise, there's no example of utilizing a switch that I can see to use as a 'springboard' to making this happen.
Apologies for the essay, but any help would be greatly appreciated.
Thanks in advance
Last edited: