ZoeyToonz

Warper
Member
Joined
Aug 2, 2021
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMZ
This is my first time using this forum so I don't know if this belongs somewhere else or was already asked before, but here goes. I'm trying to make a ton of my own abilities for my game, some of which have completely different uses in and out of battle. For instance, the ability I'm struggling with is a teleport. In battle, the user's party will just flee. Out of battle, you will be able to return to the overworld map. I have it coded in a way this works, until exiting my first battle. After that, the skill won't work out of battle. I know it has to do with the way my conditional branches are set up, but I can't seem to figure it out.

Also, I don't have a good name yet so, ignore the Japanese I guess...
If anyone is curious, I think it roughly translates to "A Kitsune's/Fox's Trial"
I could be horribly wrong...
 

Attachments

  • Kitsune no Saiban - RPG Maker MZ 8_1_2021 5_42_26 PM.png
    Kitsune no Saiban - RPG Maker MZ 8_1_2021 5_42_26 PM.png
    102.9 KB · Views: 11

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,911
Reaction score
2,095
First Language
English
Primarily Uses
RMMV
What I'd do is run a common event at the start of every battle that checks whether an actor has the skill equipped, and if so, forget that skill and learn the battle version of the skill (requires 2 database entries for the skill, 1 for on-map, 1 for in-battle).
At the end of each battle, run a similar event that checks for these skills and swaps them back to on-map skills.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
879
Reaction score
382
First Language
english
Primarily Uses
RMMV
my thing for this was plugin related.
learn 2 versions, field version has <hide in battle>, battle version has <hide in field>
it looks like the MZ plugin version is visustella's skill/state core in the skill accessibility notetags.

edit: i see in your event that you turned on an 'else' branch in the 2nd check and never used it.
dont think it should be causing any issues but would still fix that anyways.

you also dont have a condition checking if teleporting should be disabled
this would be a switch you just turn on when you dont want them teleporting.

an event version i would get someone with script knowledge to help make 1 check for 'party in battle'
conditional branch: 'script' (edit2: thx @caethyril)

and i see that your teleport is using fixed numbers, this fine if its only a 1 dungeon game.
could also be good practice using position variables here for bigger project warp/teleport and puzzles.
my thing for warp is the transfer event going into a dungeon sets 3 variables "tpMapID" "tpX" "tpY"
(and turns off the restrict warping switch)
then the warp out of dungeon event uses those 3 variables instead of fixed numbers to warp outside the dungeon entrance (and turn on the restrict warp switch again because exiting a dungeon)
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,739
Reaction score
2,094
First Language
EN
Primarily Uses
RMMZ
The game remembers the last troop encountered per session, that's why your approach breaks after one battle.

A non-plugin option could be to use Conditional Branch > Script: $gameParty.inBattle(), e.g.

◆If:Script:$gameParty.inBattle() ◆Comment:Battle effects ◆Abort Battle ◆ :Else ◆Comment:Map effects ◆Text:None, None, Window, Bottom : :Return to the overworld? ◆Show Choices:Yes, No (Window, Right, #1, #2) :When Yes ◆Transfer Player:Overworld (11,9) ◆ :When No ◆ :End ◆ :End
 

Latest Threads

Latest Profile Posts

wow, Surface Tension is really one MF of an FPS level huh
So, I got let go from my current job because my skill set didn't align with the department's goals anymore. I have some hope, because I am currently in contact with a manager from a different department, and they are desperate for more employees. We'll see what happens... :kaoswt:
Noriko_Human.png
Worked on some face-sets. Need to finish up the lot and cut some out of the game. She's looking pretty cute.
Even though I'm not going for the first time in...ten years or something...ordered my Gen Con dice!
Will be focusing on map making today and adding locked chests :LZSsmile:Screenshot 2021-09-16 095316.png

Forum statistics

Threads
115,114
Messages
1,087,334
Members
149,592
Latest member
Krazix
Top