Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
Hello. I'm curious if anyone has played around with this and experienced weirdness when you incorporate Appear Halfway and Transform to enemies in a battle.

I have a troop with one enemy NOT set to Appear Halfway and another 8 set to Appear Halfway.

◆Script:
: :$gameTroop.members()[1].transform($gameVariables.value(261));
: :$gameTroop.members()[1].appear();
: ://$gameTroop.members()[1].appear($gameVariables.value(261));

Using the appear() code by itself enables the default Appear Halfway enemy to appear visually. When combined with a transformation code, the enemy doesn't appear "visually" initially. I have to go into a targetable attack/skill option that highlights and visually reveals the enemy.

Using the transform code by itself with the enemy NOT set to Appear Halfway works and causes the enemy to visually change. And, same as above, when combined with the appear code (and set to Appear Halfway), doesn't appear "visually" initially.

I've been trying different orders and versions of the code to no luck.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,987
Reaction score
8,625
First Language
German
Primarily Uses
RMMV
several questions:
1) is that "8 set to appear halfway" a typo? because by default there are only 8 enemies in a troop, and with one visible there can only be 7 set to appear halfway. There are ways around that, but that would mean scripta/plugins and potential errors (like the one you experience)

2) does the same happen when you use the regular event commands instead of the script equivalents? Sometimes a script command can be off sequence, that should not happen with event commands

3) do you use any battleplugins at all or is that happening in default battle? Front view or sideview?
 

Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
@Andar

1) More a misdirection. I actually intend to go as high as 8 extras (Didn't know the limit was 8), but my current testing is with 6.

2) The same happens with the Enemy Appear event command. I didn't try the Enemy Transform event command because I can't specify a variable to be the transform target. I guess I could do it through a common event, but that'd be tedious for every enemy index and every potential enemy ID.
Edit: Just tried Enemy Appear + Enemy Transform. Same problem.

3) Hime's (changebattleback, actor battle command, state modifier) and Yanfly's plugins. (I've since set it to the dtb sideview mode)

Edit 2:

My work around is just having multiple versions of the troop battle (Main Enemy, Main Enemy + 1 Ally, Main Enemy + 2 Allies, etc) depending on the number of variable extra enemies I want. The extra enemies are not set to Appear Halfway and just transform at the start of the battle. My problem is that sometimes, depending on lag and such, the player could get a glimpse of the default enemy before the transformation - the reason I was exploring Appear Halfway.
 
Last edited:

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
598
First Language
English
Primarily Uses
RMMV
I am unable to reproduce this.
Double EDIT: (at first I thought the problem was just with appear)

I am in fact able to reproduce this. It happens when transforming, yessir!
This seems to be default MV because I have no plugins.

The only way I can make it work without a special plugin is with a timeout...
PHP:
$gameTroop.members()[2].appear();
setTimeout(function() {
  $gameTroop.members()[2].transform(1);
}, 20);

20 milliseconds is hardly noticeable and it keeps the transform asynchronous of the appear.
 
Last edited:

Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
@mogwai ._hidden = false also produces the same problem for me. I've also been logging the variables and the values are correct. The correct enemies do appear. I just need to highlight them first to make them appear visually. It's probably a problem with a plugin. I'd just try to work with my work around.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
598
First Language
English
Primarily Uses
RMMV
You posted while I was editting my post.

I'm sorry. I was able to reproduce this afterall. It seems like default RPG Maker MV behavior for calling transform() in conjunction with appear(). I don't know why.

See my edited post ^
@Rink27
 

Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
@mogwai Mfw someone reproduces the problem :D :D

*Ahem* And I've been able to fix it with using the timeout function too. Putting a wait between the commands works as well.
I wonder what would be an ideal timing. Is it possible 20 milliseconds could be too short for a slower/weaker device or are device specs irrelevant to the timing?

Does this qualify as a bug that we should alert someone about?
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
598
First Language
English
Primarily Uses
RMMV
You're right. "wait" is probably better because there is no random chance it fires too early while the monster data is loading, because it uses frames.
 

Latest Threads

Latest Posts

Latest Profile Posts

My entire world, full of monsters and treasures, will likely be done by the end of the year. After that it's all NPCs and side quests... then done. I'm never making an open world game again xD
The more I read Calvin and Hobbes as an adult, the more I deeply respect Bill Watterson. Plenty of stuff flew over my head, but now that I'm old enough to appreciate the viewpoints he shared with the fun and imagination? I am grateful that C&H was basically my early childhood.
After years of relying on others and the community to help with making my games, I've decided to delve into the world of scripting. Thought I'd share a few simple scripts that I made that I'm very proud of and excited about!

Redesigning characters after such a long time feels great. Makes me excited to work on an old game again.
Phone menu to replace main menu WIP:

Forum statistics

Threads
116,097
Messages
1,095,760
Members
151,486
Latest member
d2taylord
Top