Enemy Transform modification

lohenien

Veteran
Veteran
Joined
Mar 15, 2012
Messages
153
Reaction score
8
First Language
english
 I want to use the script call section to make custom enemy transform calls based on a game variable instead of the manual drop down menu in the editor. Doing so should allow designers to create one troop that can spawn any enemies in your game, eliminating the need for unique troops for every desired possibility of an encounter mix. This is the function for it but I'm not sure how to call it properly via script.

Code:
// Enemy TransformGame_Interpreter.prototype.command336 = function() {    this.iterateEnemyIndex(this._params[0], function(enemy) {        enemy.transform(this._params[1]);        $gameTroop.makeUniqueNames();    }.bind(this));    return true;};
 
Last edited by a moderator:

lohenien

Veteran
Veteran
Joined
Mar 15, 2012
Messages
153
Reaction score
8
First Language
english
This is for MV, don't think that will work but thanks for the offer.

If I can get the script call code right I can work out my own algorithm for the rest of it.
 

Rexal

Digital Fuzzball
Veteran
Joined
Oct 27, 2015
Messages
141
Reaction score
267
First Language
C#
Primarily Uses
RMMV
I made this plugin, which will transform enemies with a certain note tag at the start of the battle into whatever is defined. Is that what you're looking for?
 

lohenien

Veteran
Veteran
Joined
Mar 15, 2012
Messages
153
Reaction score
8
First Language
english
No, not specifically Rex. That script is controlled via note tag, I am planning on using something that is event oriented. I only need to know how to properly use the transform code.
 

Rexal

Digital Fuzzball
Veteran
Joined
Oct 27, 2015
Messages
141
Reaction score
267
First Language
C#
Primarily Uses
RMMV
No, not specifically Rex. That script is controlled via note tag, I am planning on using something that is event oriented. I only need to know how to properly use the transform code.
 Gotcha. In that case, here's a script call example:

Code:
var enemyId = [1,2,3,4,1,2,3,4];BattleManager.setup(1, true, false);for(var i = 1; i< $gameTroop.members().length; i++){$gameTroop.members()[i-1].transform(enemyId[i-1]);$gameTroop.makeUniqueNames();}BattleManager.setEventCallback(function(n) {this._branch[this._indent] = n;}.bind(this));$gamePlayer.makeEncounterCount();SceneManager.push(Scene_Battle);
Basically you have to call $gameTroop.transform after you setup the battle, otherwise it doesn't work.
 
Last edited by a moderator:

SarcasticSloth

Villager
Member
Joined
Jul 11, 2018
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMMV
Sorry to necro-post, but I am very interested in this topic as well, and the answer that was given doesn't quite make sense to me.
I'm using a troop event to transform enemies in a troop on the first turn of a battle.
This is the code I am using:

$gameTroop.members()[1].transform($gameVariable.value[14]);

variable 14 is a random number that I generate. This random number corresponds to an enemy in the enemy database.
Using this method would allow me to easily set up random encounters that correlate with the player's current level.

Is the script call I am using the correct way to transform an enemy mid-battle?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,240
Members
137,609
Latest member
shododdydoddy
Top