Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

In-Battle Character Transformation: Tricky Bits

Hey everyone, first of all, great site you've got here.

Second, I'm a non-scripter, so bear with me if my problem is dumb.

My ultimate goal is to give one of the characters in my game a skill that has the following affects:

1. A text box is displayed upon using the skill
2. The character's stats change
3. The character's battler's appearance changes to that of a monster
4. The character learns several new skills
5. All the changes are reverted at the end of the battle
6. All the changes have a chance to revert if the character takes physical damage
7. In the event that the changes revert due to physical damage, another text box is displayed

What I tried first was to link the skill to a common event that flipped a switch, caused the battler image to change, and added the stat changes and new skills to the character, and then I used a parallel common event triggered by the switch to undo all the changes. This worked okay, but I couldn't implement the chance-to-revert-upon-taking-physical-damage bit.

My next thought was to try making the skill inflict the state "transformed" on the character, giving this state the property of randomly reverting when the character took physical damage, and running a parallel common event with a conditional branch "If this character is in state: transformed, change battler graphic to Monster.png and add skills A, B, and C -- If not, change batter graphic to Character.png and forget skills A, B, and C". Sadly I could not make this work, and I have no idea why. :blush:

Finally I tried simply adjusting the Transformed state settings so that it ran a 1-frame animation of the actual battler image flashing completely transparent and the image of my desired battler image flashing in its place. This worked better than I expected it to, visually at least. Sadly, is still had problems, specifically, I wasn't able to add the new skills this way, and I couldn't display any other status effects while this one was active (the source material I am working from demands that the character be shown visually both transformed into this monster state, and benefiting from enhancements from a certain magic item, simultaneously).

So that's what I'm up against. I know you guys have both a lot more experience with XP, and a lot more technical knowledge, than I do. Any input would be greatly appreciated. Thanks!
 
All right, it's been a few days now... couldn't anyone offer maybe a hint as to what the best way to do this might be? I'm totally stumped and I'm kind of working on a deadline.
 
The parallel process event won't work in a battle. They do not run during battles.

Instead, you'll need to create a Battle Event in every Troop that checks the State of the character(s) who can do that every turn. It'll do the same thing, more or less.
 
Hey, thanks Unka Josh! Id forgotten all about battle events, lol (yes, this is my first project, as I'm sure is obvious).

I think your method seems like the way to do it. I am still having a little trouble, though; when I set the span to "turn", the character doesn't transform immediately, instead he waits until he takes his action on the next round. And when I set the span to "moment", the game freezes.

Anyone got a guess as to what my new problem might be?
 
Yeah, "Moment" checks continually and often freezes the game. I dislike using it for that reason. You could always use Change Actor Graphic in the initial Common Event called by the skill to make it kick in right away, and add the skills at that time, too. In fact, that's what I'd really recommend.
 
The only problem with that is that it won't allow me to make the character transform back when he takes physical damage.

I did whip up a set of battle event pages with "moment" span that doesn't freeze the game, but mysteriously it still waits for the character's next action to make the transformation! :unsure: Here's what I tried:

Event Page 1:
Condition: Turn 1
Span: Battle
Control Switches: [Switch A] = ON

Event Page 2:
Condition: Turn 1X, Switch A is ON
Conditional Branch:
[Character] is [Transform] inflicted:
[Various transformation changes]
Control Switches: [Switch B] = ON
Control Switches: [Switch A] = OFF
Else:
Nothing

Event Page 3:
Condition: Turn 1X, Switch B is ON
Conditional Branch:
[Character] is [Transform] inflicted:
Nothing
Else:
[Transformation changes revert]
Control Switches: [Switch A] = ON
Control Switches: [Switch A\B] = OFF

Edit: Hang on a sec... maybe if I do what you suggested on top of this, that might do what I want? Okay gimme a minute I'll try that out, lol

Edit Again: Okay, it does work, at least for the initial transformation anyway. Now the character transforms immediately and stays that way until he loses the transform state due to physical damage. The only problem is that once he loses the state, he doesn't revert back until his next turn. That's a little bit lame, but it's still a huge improvement over how I had it working before.
 
Yeah, that's going to be the problem, because of the limitations of the Moment check. Unfortunately, unless you can tweak a Moment check to the point where it doesn't freeze the game, that's about your choices.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top