Universal Temporary Enemy Transformation

failbird105

Villager
Member
Joined
Mar 27, 2019
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
So, basically, I've been looking to make a sort of polymorph skill that changes the enemy it's used on into something else.

There's two problems I've realized with this though.

The first, is that I want the polymorph to be temporary, which would mean having some way to remember what the enemy it's used on was pre-polymorph so as to be able to turn it back, and also not override that memory when polymorphing something else.

The second, is that I would need a way for the effect to not work on bosses and other major enemies.


Ideally, the best way to do this would be to change only their battler sprite, and have all the other changes be caused through a state, but I don't know how one would go about changing an enemies battler graphic without transforming the enemy.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,430
Reaction score
7,711
First Language
German
Primarily Uses
RMMV
you'll probably have to mix troop events and skill effects, with the troop event for each enemy checking the time and transforming back.

the skill should probably set a state "transformed" on the enemy that does nothing, having the troop event check for that state and then handle the transformation
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
To transform an enemy's sprite, you would need to change the following properties:
  • battler_name (I know this sounds weird, but it's the battler's graphic file name)
  • battler_hue
For example, $game_troop.members[2].battler_name = ((whatever)) would change the battler's sprite to ((whatever)) you specify but would keep the same hue that the original battler had.
  • Note that you need to add attribute accessors for both battler_name and battler_hue, which should be done for the Game_Battler class - for example, attr_accessor :battler_name
  • I am honestly not sure whether you would also need to refresh the battler's sprite after changing it. If that's the case, simply doing the above will do nothing visually for the player, even though on the back end it will recognize the new sprite. I'm not 100% sure what the code would be to refresh the sprite.
If you also want to change the enemy's name, you will need to change the battler's original_name property, much like you do with battler_name and battler_hue above. This is a property of enemies only rather than all battlers, so be sure to add the attr_accessor inside the Game_Enemy class, not the Game_Battler class, this time.
  • Due to "plurals" like Slime A, Slime B, Slime C, etc., you might get some strange behavior with the polymorphed enemy's name once you do this. If that's the case, look at the "def transform(enemy_id)" method within Game_Enemy for some guidance on how you can get rid of weird plurals.
WITH ALL THAT SAID, I can't think of any way to actually track what sprite you should change each enemy back to once the polymorph ends, and apply that reversion back to their original sprite (and name), without a literally insane amount of troop eventing in every single troop. If this were for one enemy troop, it wouldn't be too hard, but to apply it as a skill, which could be used against almost any enemy in almost any troop, I think you're talking at least weeks, maybe months, of evening to make this work.

I think you would need a Script to make this feasible. I personally don't know of any existing scripts that would be able to pull this off in VX Ace. You could use Yanfly's Buffs and States Core in RPG Maker MV, and I'm currently working on something that would make it very easy in RPG Maker MZ.

I'm going to leave this thread on the normal support board as @Andar seems to believe this is feasible without scripts, so I may be missing something. However, if you want this moved to the RGSS3 (Ace) Script Requests section, where people are more likely to be able to point you to a script that would be helpful or even create a new one for you, please Report this post and say as your reason that you would like it moved to Script Requests.
 

failbird105

Villager
Member
Joined
Mar 27, 2019
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I mean, I actually know how you would do the reversion back part, I was just hoping someone else would know a simpler way. Instead it seems that not only is that the best way, but we're better off just using transform enemy then doing all this extra script work to change only the battler graphic.

That being; one variable for every possible enemy index in a troop(I think there's 8 of them? Not sure)
When using the polymorph skill, have it call a common event that gets the position number of the actors last target(the move is specific to one character), then detects what actual enemy type it is, and sets the corresponding variable for its position to that. Then applies an(empty) state, and transforms the enemy.

Then, using a script that is already being made use of in the game, have it call a common event when the transformed enemies state runs out, which reads the variable to tell what enemy to change them back into.

Of course, I'd need to know the script calls for stuff like detecting enemy type and transforming enemies. Meanwhile I don't even know how to make a conditional branch work in scripts(I do know how to get the position of an actors last target though)


Edit: Nevermind, I've realized a critical flaw in my plan. Yeah, I'm going to need a script for this.

I'm thinking like, Himeworks State Faces could possibly be modified to apply to battlers instead, but I wouldn't know how to go about making it do so.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,430
Reaction score
7,711
First Language
German
Primarily Uses
RMMV
without a literally insane amount of troop eventing in every single troop.
depends on how you do this.
you'll need one troop event for every enemy in every troop, yes, because that is where the original of the enemy is remembered.
However that event can be relatively simple in itself as long as you don't care what the enemy is transformed into and leave that to a common event.
 

failbird105

Villager
Member
Joined
Mar 27, 2019
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMVXA
So, now that it's been moved, what I'm asking for is pretty much Tsukihime's State Faces script, but modified to affect battlers instead of faces.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,447
Members
137,820
Latest member
georg09byron
Top