WTF Relay script collection

fredg1

Member
Can I know why the script automatically opens every Inventory Section? Is it possible to not make it do that?

I recently retried checking "Close All Inventory Sections By Default" ("Delay Loading of Collapsed Inventory Sections" is checked) for I-forgot-why, and when going in my inventory, the sections WERE all collapsed! (Doesn't happen normally)

I opened "hats", and everything was normal; each equipment piece had its enchantments described as usual (after the loading, of course).

Every time I opened my inventory afterward, inventorywtf restarted automatically opening the sections, as usual...
 

ckb

Well-known member
Seems like WTF Familiars breaks if you have generic familiar equipment.

It actually broke from not importing the data file correctly... I think this was a Mafia change a while back that required "data/familiars.txt" instead of just "familiars.txt".
I also cleaned up the code a bit and added some special abilities for new fams.
 

fronobulax

Developer
Staff member
It actually broke from not importing the data file correctly... I think this was a Mafia change a while back that required "data/familiars.txt" instead of just "familiars.txt".
I also cleaned up the code a bit and added some special abilities for new fams.

How long ago is a while back? None of my scripts require data/ as a preface to the data file name if it is in data. Given the JavaScript changes it is possible that there is a real mafia bug here in which case it would be worth reporting and fixing.
 

ckb

Well-known member
How long ago is a while back? None of my scripts require data/ as a preface to the data file name if it is in data. Given the JavaScript changes it is possible that there is a real mafia bug here in which case it would be worth reporting and fixing.

I don't know when it stopped working... some of my other scripts are fine, but this is definitely a thing:
Code:
    string[string, string, string] dattxt;
    file_to_map("data/familiars.txt",dattxt);
    string[string, string, string] famtxt;
    file_to_map("familiars.txt",famtxt);
    print("famtxt = "+count(famtxt)+", dattxt = "+count(dattxt));

Yields this:

famtxt = 0, dattxt = 277


This result would be the same for other Mafia data files (classskills.txt, combats.txt, concoctions.txt, etc.). file_to_map() seems to work just fine without the "data/" if the file is user-created and actually in the 'data' folder and not packaged with Mafia itself.
 
Last edited:

MCroft

Developer
Staff member
Frono, it was probably gausie’s changes to file_to_map to insure better compliance with the chroot jail.

r20495
 

fronobulax

Developer
Staff member
OK. I tend to forget that some data files live in the user's local file system and some live in the mafia jar but they are accessed the same way in ash. If I had remembered I would have responded differently. I'll confirm that the script of mine that should be broken, actually is.
 
Top