Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

DrMcCoy

14
Posts
1
Followers
19
Following
A member registered Mar 01, 2015 · View creator page →

Recent community posts

Ah, okay, yeah, thinking about it, that makes sense, I guess. JSON itself doesn't really make any distinction between integers and floats, it just has a generic "number" data type. (Which is technically not even a float, but a real number of arbitrary precision.)

So when Godot loads a dictionary from a JSON, it can't really say if it originally was an integer or a float, so I guess it just makes it all floats as a compromise. It could do some semi-intelligent heuristics, like if it does have something behind the decimal point, make it a float, but then the question would be, what to do with Arrays. You could maybe check all values in the Array, but that all gets ugly fast.

A different solution would be to, maybe, have an additionally type dict in there as well, which maps names (or "paths", if you will) to explicit type, and handle that automatically on serialization/deserialization. But that of course makes it more complex as well, and cuts down on thethe easy editable nature of JSON. Or have each value be a dict with explict type information, but that too sacrifices the human-readability.

So I assume that's the compromise they made: numbers in save data will fold to float on save/load.

Okay, I snooped a bit, and I found out why the hasemail() function doesn't work (though not *why* it doesn't work)

This issue is that the contents of the emailreadlist (and emailunreadlist), i.e. the email ids, are floats. type_string(typeof(globals.save_data['emailreadlist'][0])) is "float", while the type of the parameter id in hasemail is an int. So the Array.has() method won't find it.

I don't know why that is, I don't know how the Godot type system works. I don't see you adding, say, 33.0 or something to the list, so I would have assume it's always an int. But I don't know. Maybe it comes from loading a save?

Going to the computer in your apartment and reading the newly received email makes it int, though.

If you change the if expression in hasemail() to

if save_data['emailreadlist'].has(id) or save_data['emailunreadlist'].has(id) or save_data['emailreadlist'].has(float(id)) or save_data['emailunreadlist'].has(float(id)):

(checking for both int and float, just to be on the save side) then it works, but that's a bit ugly. It's a workaround, I guess?

Also, whack code is fine. We all start somewhere :)

And I spent several years reverse-engineering old 90s point-and-click adventures from an obscure-ish French company. I've already seen all the wackiness out there, you won't be able to top that. :P

Sorry for the late reply; it's been...a week.

Here's one of my save files: https://drmccoy.de/zeugs/hardcoded_beryl_mail_bug-savefile0.json

Just load it, go to Beryl's apartment and the conversation that adds the mail will pop right up, even though the mail is already on the "read" list. Twice, even.

Still happens with 1.05 too, I just tried.

You can reproduce the email issue though, right? If not, I could see if I can find a save file where it happens for me, with short instructions to trigger it

At this point, if there's no debugger that lets you step through the scripts (I don't know if Godot has that, I don't really know much about how it looks like from a game dev perspective, I just like to see how things work "under the hood"), you could pull out the old "printf-debugging", i.e. adding tons of temporary log messages to see where the code flow is going and what the state of the variables and expressions are at each step. That's tedious, but sometimes the only thing you have available.

Also, for some reason, the Beryl feet pic conversation fires multiple times for me, including getting the email (id 33) 4 times now. I don't see why, though, the if condition checks for hasemail, that id is in the correct list and hasemail() looks to do the correct thing too. I must be missing something.

The logic in the cafe scene, with how the if tree is constructed, also means that brumini1 == 5 and above never fires (since it always gets into the cafeday >= 12 or >= 14 branches, and never reaches the >= 18 branch).

I think there's a bug in the Beryl/Misha quests? bsdmclub.gd (line 642, but that's the disassembled script, no idea if the original is the same) says globals.save_data['bermisquest']==1 , i.e. comparison not assignment, which is a NOP there

(That's from the Linux release, in case that's different from the Windows one)

It looks to me like it should be an assignment and with it start the bermis quest line. Instead it doesn't do that and there's no other trigger for those quests, I think?

Oh, right, I forgot to give you feedback here. Works like a charm, thank you very much :)

Attacks would be nice to have, but I guess the way that sheet works, that would be difficult to implement.

In either case, it works fine for me on Linux here as well :)

...And I just saw that feature request post where this is a bullet point. Nevermind, sorry about that :P

Thanks for that tool! :)

However, all my games currently use the official Pathfinder sheets, not the community ones (which might have been a mistake, maybe). Switching seems like it would be a lot of work, both on me as a GM and on my players (some who are new-ish to RPGs, and we all are new-ish to roll20.

Due to the way your tool works I realize it's not directly compatible with the official sheet. Is adding that on your TODO list or is that something you're not planning to do?

Me too, please :)

You're using Ren'Py, right? Could you please upload a Linux build? Thanks! :)