• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

Battle freezes when unit moves before acting

Started by Porklin, March 23, 2020, 03:30:39 pm

Porklin

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!
  • Modding version: PSX
  • Discord username: porklin

Verdeni

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?
  • Modding version: PSX
  • Discord username: V3rdeni

Porklin

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.

UnitAnim(x81,x00,x001A,x00)
WaitForInstruction(x0B,x00)
UnitAnim(x82,x00,x0001,x00)
WaitForInstruction(x0B,x00)
UnitAnim(x07,x00,x0001,x00)
WaitForInstruction(x0B,x00)
UnitAnim(x00,x01,x0001,x00)
Camera(+01064,-00012,+00952,+00302,-00512,+00000,+04096,+00045)
WaitForInstruction(x04,x00)
Reveal(120)
Wait(00120)
DisplayMessage(x10,x12,x0001,x07,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
Wait(00030)
UnitAnim(x07,x00,x0016,x00)
WaitForInstruction(x0B,x00)
Wait(00120)
UnitAnim(x07,x00,x0001,x00)
WaitForInstruction(x0B,x00)
Wait(00060)
DisplayMessage(x10,x12,x0002,x07,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
Wait(00030)
WalkTo(x07,x00,009,009,x00,x00,+008,x01)
WaitWalk(x07,x00)
UnitAnim(x07,x00,x0001,x00)
WaitForInstruction(x0B,x00)
Wait(00030)
FaceUnit(x81,x00,x07,x00,x00,x07,x00)
Wait(00020)
DisplayMessage(x10,x12,x0003,x07,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
Effect(x021F,x81,010,009,x00)
WaitForInstruction(x41,x00)
FadeSound(x00,060)
Wait(00090)
Sound(x00A1)
Wait(00030)
UnitAnim(x81,x00,x0016,x00)
WaitForInstruction(x0B,x00)
Wait(00070)
DisplayMessage(x10,x12,x0004,x81,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
Wait(00020)
DisplayMessage(x10,x11,x0005,x07,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
DisplayMessage(x10,x72,x0006,x81,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
Camera(+01176,-00144,+01176,+00302,-00512,+00000,+04096,+00045)
WaitForInstruction(x04,x00)
Music(x01,+127,030)
WalkTo(x82,x00,009,007,x00,x00,+032,x01)
WaitWalk(x82,x00)
FaceUnit(x82,x00,x07,x00,x00,x07,x00)
Wait(00020)
UnitAnim(x82,x00,x0021,x00)
WaitForInstruction(x0B,x00)
DisplayMessage(x10,x11,x0007,x07,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
Wait(00120)
DisplayMessage(x10,x12,x0008,x81,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
Camera(+00168,-00036,+00504,+00302,-01536,+00000,+04096,+00045)
WaitForInstruction(x04,x00)
DisplayMessage(x10,x11,x0009,x02,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
Wait(00060)
Camera(+01176,-00036,+01176,+00302,-00512,+00000,+04096,+00045)
WaitForInstruction(x04,x00)
DisplayMessage(x10,x11,x000A,x81,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
UnitAnim(x81,x00,x0001,x00)
WaitForInstruction(x0B,x00)
Wait(00060)
Camera(+01176,-00036,+01176,+00302,-01536,+00000,+04096,+00045)
WaitForInstruction(x04,x00)
DisplayMessage(x10,x11,x000B,x82,x00,x00,+00000,+00000,+00004,x01)
WaitForInstruction(x01,x00)
DarkScreen(x00,x01,012,064,x00,004)
WaitForInstruction(x36,x00)
DisplayConditions(x08,060)
WaitForInstruction(x38,x00)
DisplayConditions(x00,060)
WaitForInstruction(x38,x00)
RemoveDarkScreen()
WaitForInstruction(x36,x00)
EventSpeed(x01)
March(x04,x02,030)
EventEnd()

//INSTRUCTION SECTION END -  TEXT START
//Message x01
{font:08}Traveler{br}
{font:00}The names here are{br}
hard to read.{end}


//Message x02
{font:08}Traveler{br}
{font:00}That's a bit better.{end}

//Message x03
{font:08}Traveler{br}
{font:00}This is an odd statue.{end}


//Message x04
{font:08}Statue{br}
{font:00}Alert. SEEKING CREDENTIALS{end}

//Message x05
{font:08}Traveler{br}
{font:00}What?{end}

//Message x06
{font:08}Statue{br}
{font:00}UNRECOGNIZED.{br}
Signaling unit Alpha.{end}

//Message x07
{font:08}Traveler{br}
{font:00}!!!{end}

//Message x08
{font:08}Statue{br}
{font:00}Additional threats detected.{end}

//Message x09
{font:08}{Ramza}{br}
{font:00}Uh oh!{br}
Looks like trouble.{end}

//Message x0A
{font:08}Statue{br}
{font:00}COMBAT DIAGNOSTIC INITIATED.{end}

//Message x0B
{font:08}Unit Alpha{br}
{font:00}BBZZZTTT ... Daedalin?{end}
  • Modding version: PSX
  • Discord username: porklin

Nyzer

I'd also recommend including a clip of the event.

That Effect has no EffectStart or End command, that's one possible cause.
  • Modding version: Other/Unknown

Porklin

Quote from: Nyzer on March 23, 2020, 06:19:27 pmI'd also recommend including a clip of the event.

That Effect has no EffectStart or End command, that's one possible cause.

Aha! That was absolutely it.

I ended up just deleting the effect and that solved it.

Thanks!
  • Modding version: PSX
  • Discord username: porklin

3lric

Quote from: Porklin on March 23, 2020, 06:31:23 pmAha! That was absolutely it.

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.

ELRIC'S COPY/PASTE EVENT HELPER
(UNIT IDs HIGHLIGHTED IN RED)
------------------------------
------------------------------

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)
------------------------------

ANIMATION
UnitAnim(x01,x00,x0002,x00)
------------------------------

FACEUNIT COMMAND
FaceUnit(x01,x00,x00,x01,x00,x00,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 W/ CHANGEDIALOG SETUP
DisplayMessage(x10,x92,x0001,x01,x00,x00,+00000,+00000,+00000,x03)
WaitForInstruction(x01,x00)
ChangeDialog(x02,x0002,x00,x00)
WaitForInstruction(x01,x00)
ChangeDialog(x02,xFFFF,x00,x00)
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)
  • Modding version: PSX

3lric

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*
  • Modding version: PSX

Verdeni

Quote from: Elric on March 24, 2020, 12:45:47 amWho are you and why do you know things? *stares suspiciously*

*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!
  • Modding version: PSX
  • Discord username: V3rdeni