Yandros on 30/3/2020 at 20:28
In our case, it was apparent after just a minute or so because the AI already had hundreds of metaprops on him. We now have another crash in Feast but luckily only a few people are seeing it and it's after 5+ hours of playing. However we're still trying to track down the possible cause. It is not easy when you can't run the code in an IDE with a debugger.
R Soul on 1/4/2020 at 22:16
The report file will make it clear if an AI has lots of metaprops, especially duplicates, but not other types of object.
You can use a squirrel script on all metaprops to report the object ID, and that will make it clear if there is a high number of duplicates:
In the FM's folder create a folder called sq_scripts
Create a file called dup.nut (the filename doesn't matter, but the .nut extension is essential)
Paste this text into it:
Code:
class DupMPFind extends SqRootScript
{
function OnBeginScript()
{
print(self);
}
}
To be sure things work right, and to ensure monolog is clear of unnecessary text, close Dromed if it's currently open.
Load the mission, or a savegame that has plenty of gameplay (e.g. most/all objectives done/secrets/loot found, convs and other scripted events triggered etc)
run the command script_load squirrel
In the hierarchy, go to MetaProp (-2) and add the script DupMPFind.
Go in game and then back to the editor. No need to wait longer than a second. monolog.txt will show lots of object IDs. When an ID is listed more than once it means it has multiple metaprops.
Note that does not mean they're duplicates. Just more than one of any metaprop. An AI, for example, will legitimately have quite a few. If you see an object ID lots of times it's a good thing to focus on.
edit: Here's a script that can help you identify duplicate objects (you can paste it in to the same .nut file as above or create another one):
Code:
class DupCoordFind extends SqRootScript
class DupCoordFind extends SqRootScript
{
function OnBeginScript()
{
local myPos = GetProperty("Position","Location");
print(myPos + " ID: " + self);
}
}
To use this one, add the script DupCoordFind to Object (-1), then run the command AI_Sleep_All (AI locations change very slightly as they perform motions/patrol etc so this command will keep duplicates in the exact same place).
Paste the output from monolog into Excel or anything else that can sort lines of text. If you have any duplicate objects their identical coordinates will now be grouped together and quite easy to see.
Yandros on 2/4/2020 at 00:41
I recently found these commands in the NewDark docs:
Code:
spew_relations : toggle debug info to mono when relations are added/removed during game mode
spew_metaprops : toggle debug info to mono when metaproperties are added/removed during game mode
spew_stimulations : toggle debug info to mono for stimulation events during game mode
In particular spew_metaprops comes in handy. If you just go in game or load a save in Dromed, wait a minute and then exit, you can check the monolog for all metaprops being added to anything. That made it easy to find the most recent problem in
Feast of Pilgrims. You could also run in windowed mode and watch the monolog window while you're in game.
RippedPhreak on 15/6/2023 at 21:06
Quote:
Patch your Dromed.exe and Thief2.exe via EnableLAA.exe. You can find it in main NewDark archive. Put it in Thief folder and just drag Dromed/Thief2.exe to this utility. Then a message appears indicating that the operation was successful.
Just putting in here for posterity that I got the "Dynamic array resize" error, and Soul Tear's fix quoted above was indeed the cure.