Modding => Help! => Topic started by: Porklin on March 23, 2020, 03:30:39 pm
Title: Battle freezes when unit moves before acting
Post by: Porklin on March 23, 2020, 03:30:39 pm
Hi, I've encountered a weird problem that I cannot make sense of.
I have a battle that takes place on the Public Cemetery map. After the set up event, if a unit moves before acting, they reach their destination and stop. Nothing else. The battle does not continue though all other units are still marching, so the emulator hasn't frozen. It doesn't seem to matter if it's a guest or a player-controlled character.
If the unit acts before moving, which the RNG seems to let happen sometimes, the battle proceeds as normal, and units can act and move in whatever order they want.
For whatever reason, that first move is really important.
As I said, I have zero ideas as to where the problem lies. All I could possibly imagine is that this map isn't used originally for combat and may have some weird properties because of that. Any insight would be appreciated. Thanks!
Title: Re: Battle freezes when unit moves before acting
Post by: Verdeni on March 23, 2020, 04:55:47 pm
Hmm... I can't imagine the map itself is the issue. It most likely has to do with the way the event was pieced together--even something as simple as not including the relative wait command for a specific instruction can cause issues.
Can you upload the text file of your event?
Title: Re: Battle freezes when unit moves before acting
Post by: Porklin on March 23, 2020, 06:11:44 pm
Quote from: Verdeni on March 23, 2020, 04:55:47 pmHmm... I can't imagine the map itself is the issue. It most likely has to do with the way the event was pieced together--even something as simple as not including the relative wait command for a specific instruction can cause issues.
Can you upload the text file of your event?
Yes, attached is the text of the event
Offset(x002B0000) //Remove the previous line if you wish not to override the offset in CONFIG.INI. //Remove the previous line if you wish text to compile directly after instructions.
I ended up just deleting the effect and that solved it.
Thanks!
Effects can be finicky. I recommend you do like I did when I started out (I've made more events than square did at this point!) and make yourself a cheat sheet of easily to copy/paste commands. I'll post mine here, maybe I'll make a thread for things like this in the future. I apologize if it looks wonky, as it is being copy/paste from one of my excel docs.
I do have a example of a standard effect in here, as i use them frequently, however keep in mind that event with this setup, you may have to increase/reduce the wait time or add one between the start and end of the effect.
ADD A UNITS DATA BACK TO THE MAP AFTER REMOVE/TELEPORT/NOT PRESET (UNIT MUST BE IN EVENTS ENTD) AddUnitStart() AddUnit(x01,x00,x01) AddUnitEnd() WaitAddUnitEnd() ------------------------------
WARPUNIT TO SPECIFIC COORDINATES 00,01,02,03 = S,W,N,E WarpUnit(x0D,x00,002,000,x00,x02) ------------------------------
WALK IN FROM SOUTHERN EDGE OF MAP (THIS SETUP ASSUMES THE UNIT IS PRESENT BUT NOT DRAWN) SpriteMove(x01,x00,+00000,+00000,-00014,x00,x01,+00000) ColorUnit(x01,x00,x01,-006,-004,-002,000) Wait(00002) Draw(x01,x00) ColorUnit(x01,x00,x08,+000,+000,+000,004) SpriteMove(x01,x00,+00000,+00000,+00000,x00,x01,+00014) WaitSpriteMove(x01,x00) WalkTo(x01,x00,001,005,x00,x00,+008,x01) WaitWalk(x01,x00) UnitAnim(x01,x00,x0002,x00) RotateUnit(x01,x00,x00,x00,x00,x00) WaitRotateUnit(x01,x00) ------------------------------
CAMERA SETUP FOR FADE IN Camera(+00225,-00048,+00600,+00302,-00512,+00000,+04096,+00001) Reveal(120) WaitForInstruction(x04,x00) ------------------------------
WALKTO COMMAND SET WalkTo(x01,x00,006,000,x00,x00,+008,x01) WaitWalk(x01,x00) ------------------------------
ROTATE COMMAND SET RotateUnit(x01,x00,x08,x00,x00,x00) WaitRotateUnit(x01,x00) ------------------------------
FACEUNT (ONLY LIVING UNITS) BOTH TEAMS TO UNIT 60 UnitAnim(x03,x01,x02,x00,x00) UnitAnim(x01,x01,x02,x00,x00) FaceUnit(x60,x00,x03,x01,x00,x00,x04) FaceUnit(x60,x00,x01,x01,x00,x00,x04) ------------------------------
DISPLAY MESSAGE BELOW CHARACTER DisplayMessage(x10,x12,x0001,x01,x00,x00,+00000,+00000,+00000,x03) WaitForInstruction(x01,x00) ------------------------------
DISPLAY MESSAGE (NO PORT W/ ARROW) DisplayMessage(x10,x11,x0001,x01,x00,x09,+00000,+00000,+00000,x10) WaitForInstruction(x01,x00) ------------------------------
END NORMAL CUTSCENE EVENT FadeSound(x00,060) ColorScreen(x02,000,000,000,255,255,255,+00060) Wait(00050) EventEnd() ------------------------------
NON LUCAVI/EVENTSPEED EFFECT Effect(x00AD,x15,007,005,x00) EffectStart() EffectEnd() Wait(00050)
Title: Re: Battle freezes when unit moves before acting
Post by: 3lric on March 24, 2020, 12:45:47 am
Quote from: Verdeni on March 23, 2020, 04:55:47 pmHmm... I can't imagine the map itself is the issue. It most likely has to do with the way the event was pieced together--even something as simple as not including the relative wait command for a specific instruction can cause issues.
Can you upload the text file of your event?
Who are you and why do you know things? *stares suspiciously*
Title: Re: Battle freezes when unit moves before acting
Post by: Verdeni on March 24, 2020, 11:04:56 am
*buries face in sweater* Uhhhhh... I guess you could say a long-time lurker? :oops: Been mostly quiet, but pushing my limits with different tools and spreadsheets for a few years now!