Author Topic: Broken Ladders  (Read 119 times)

DLPB

  • No life
  • *
  • Posts: 9238
  • Karma: 297
  • For I realized that God's a young man, too.
    • View Profile
Broken Ladders
« on: 2018-10-09 15:54:08 »
Uprisen noted to me a few broken ladders in the game.  When pressing OK at the top/bottom of ladders it is possible to lock the game - or crash it entirely.

Here's why:

When you get onto a ladder the first time, generally the code is safe. A line activation leads to a script.

And the script is "Only if script not already running"  - so mashing the OK button will have no effect.

But the problem lies where you enter a screen already on a ladder.  Here, the script programmers made a mistake. They didn't factor in that the script version with "Only if script not already running" is no longer being used, as they elected to use MAIN of the character instead. This means that the script version hasn't yet run and can be activated at the same time as the MAIN version is active, leading to hangs and crashes.

How to fix is very simple:

Let's take sbw4_3, which has 2 ladders that will both crash the game.

Under LINE 1 I have added a check for [5][255] flag

Code: [Select]
If key [OK|CIRCLE] or [???] pressed once (else goto label 1)
If Var[5][255] == 0 (else goto label 1)
Execute script #4 in extern group cloud (No4) (priority 6/6) - Only if the script is not already running
Label 1

Only if 255 is 0 will the grab ladder code be accepted.

And in the MAIN of Cloud, at the top

Var[5][255] = 1 (8 bit)

and the bottom

Var[5][255] = 0 (8 bit)

This ensures that MAIN will be fully complete before allowing the ladder code.  So there will never be a simultaneous call while on a ladder.

I have added this to LINE 2 as well, as both ladders on this field are broken.

Code: [Select]
If key [OK|CIRCLE] or [???] pressed once (else goto label 1)
If Var[5][255] == 0 (else goto label 1)
Execute script #5 in extern group cloud (No4) (priority 6/6) - Only if the script is not already running
Label 1

Uprisen has noted various others that I've fixed for The Reunion. 

rktbas2, las0_2 among them.  So, if you know of any more, let me know.






DLPB

  • No life
  • *
  • Posts: 9238
  • Karma: 297
  • For I realized that God's a young man, too.
    • View Profile
Re: Broken Ladders
« Reply #1 on: 2018-10-09 15:58:25 »
sbwy4_6 also has it at bottom of ladder. Just noticed.

DLPB

  • No life
  • *
  • Posts: 9238
  • Karma: 297
  • For I realized that God's a young man, too.
    • View Profile
Re: Broken Ladders
« Reply #2 on: 2018-10-09 17:18:50 »
https://drive.google.com/file/d/1m6Q2d1QMtu7AJ_pXzjxXAB7bQZrTROBV/view?usp=sharing



Also in sbwy4_6

If you enter this field from the north ladder (go out then back to this map) and go to the Save Point, Cloud will have the ladder animation, because script programmer added animation 3 as a loop by accident.
« Last Edit: 2018-10-10 00:43:45 by DLPB »

DLPB

  • No life
  • *
  • Posts: 9238
  • Karma: 297
  • For I realized that God's a young man, too.
    • View Profile
Re: Broken Ladders
« Reply #3 on: 2018-10-09 21:49:04 »
sbwy4_6 is totally broken... Experiment with the larger ladder and you'll see why. Not just the above - this field is really really bad.  Multiple bugs.

Nope.  I fixed a few bugs and made a new one.  :o
« Last Edit: 2018-10-09 22:32:48 by DLPB »