View Full Version : [DD/scriptparser] FFCs malfunction when recompiling Link and Zelda: Panoply of Calatia

01-12-2017, 01:38 PM
Per Zoria's request, I have been testing DarkDragon's new script parser, recompiling the scripts in my quest and testplaying it to see what might be affected.

The quest file can be found here: http://www.purezc.net/index.php?page=download&section=Quests&id=618

The script files can be obtained by downloading these two zip files, then copying the second zip's files over the older versions in the first:
https://www.dropbox.com/s/v1h6nrqlg5u3b36/Link%20and%20Zelda%20-%20Panoply%20of%20Calatia%20Support%20Pack.zip?dl= 0

You can then compile what's already in the quest buffer, or import `LaZPoC_01-09-2017.z, which is the global script file and begins with all the importing of FFC and item scripts (there's about 100 of them).

Here are the relevant snippets of the skype messages I sent to Zoria about the bugs I found:

recompiling went mostly okay so far but there were two oddities:

- There was one single FFC script that it marked **, which means it was "not found in the buffer"; it's a tiny script, "MoveZelda.z", that isn't used much (a single script my Error Mode thing might pull up that yanks the Link/Zelda follower around to random positions), but that script _did_ have a slot, and _is_ included with the others when I'm compiling it, so I have no idea what's different about it to cause that problem
- There was a much longer wait after I clicked okay on the "Assign Compiled Script" window; I actually thought ZQuest had locked up for a moment, but it just took a minute (I think it was about 45 seconds?) to finish. Might have to do with my computer being kind of old (Windows 7, 2GB RAM, parts all generally around 5+ years old)

Several FFC scripts aren't working right though

Doormove.z, which is supposed to force the player to walk while touching it when they first enter the screen, does nothing;

ZIIMusic.z, which is supposed to play specific enhanced music tracks from certain NSFs, does play music, but not the correct track dictated by the FFC argument D0 or alternate file dictated by D2;

SimpleNPC.z displays a flashing "A" icon on the hud as intended (so it's also still doing stuff), but displays no text string when talking...

In fact, thinking about it, these are all acting like the arguments are blank, but are otherwise operational?
I'll go ahead and check 2.50.3RC1

Alright, confirmed:

- Compiling in 2.50.3RC1, while I did get the same ** error for MoveZelda.z and it did seem to take silghtly longer (but not quite as long?) to close the Assign Compile Scripts window, the FFCs that I described malfunctioning in DarkDragon's version all worked fine when compiled in 2.50.3RC1.
- Loading the quest that was saved in DarkDragon's version into 2.50.3RC1 and playing it, the same malfunctions occurred, suggesting the problems come from how scripts are compiled in DarkDragon's version.

if I had to guess, DarkDragon's version somehow breaks FFC scripts ability to read from their arguments
: (

If I can be of further assistance with this, please let me know; sorry to bring bad news. However, it is worth noting that I haven't found any other script errors yet; the stuff in the Global itself seems to work fine, and I think the FFC problems might be limited solely to whatever's keeping them from reading their D arguments. I'll let you know if I find anything else though.

01-14-2017, 02:05 PM
Looks like there are two separate issues:
1) A bug with slot assignments (old)
2) Incorrect handling of run() arguments (my new branch)

I will look into both.

01-16-2017, 04:21 AM
2. I've fixed this issue. As you say, there was a bug in my new stack location assignment code that caused all FFC arguments to be shifted by one.

1. I looked into the .qst you sent, and I do not see where MoveZelda.z is being imported. I didn't check for recursive imports, but it's not in the main buffer, and also if I delete MoveZelda.z from the file system I do not get any preprocessing errors. Are you sure you didn't accidentally delete the import at some point?

01-16-2017, 04:01 PM
Are you sure you didn't accidentally delete the import at some point?
Oops! I sure did. Welp, that solves the mystery I guess.