-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fixes and features to make it easier to access data #5
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thank you very much for submitting a PR! I like the changes you're proposing, however I can see an issue with setting the string encoding. The way it is now, whenever zenkit._native.load
is called with an encoding, it will change the encoding for all strings loaded by the library. This is unexpected behaviour, I'd think.
I propose instead, to add a function for setting the encoding globally and then applying ot to all string encoding and decoding performed by the library (e.g. a zenkit.set_string_encoding
function). This should then also replace the hardcoded "windows-1252"
in all str.encode
calls (you don't need to do that right now, but that'd be the plan).
2847c83
to
6d02807
Compare
What's the "real" functional difference between DaedalusScript and DaedalusVm? The latter is a subclass, and the Would it be possible to detect if a symbol is a function parameter inside the DLL, other than the The Same goes to other aspects, like the Lastly, it seems that DaedalusVm requires registering externals, even the defaults from Gothic. Why can't ZenKit provide them with the DLL, is there some licensing issue? |
The difference between Daedalus instances are runtime-initialized objects, meaning they have to be explicitly initialized by the engine by running some Daedalus code. That's the job of the VM. So no, Getting the parameters of a Daedalus function isn't as simple as checking for a Caching is something I haven't considered yet, because there are many cases in ZenKit where caching is the wrong answer. In those examples specifically though, I think caving would be a valid strategy, because the script itself is immutable. A generator could be great too. Externals are not registered by ZenKit, because most of them have something to do with game engine stuff, which ZenKit is not concerned with. Of course, things like |
I fat fingered the enter key on title and it created an empty PR 🙄
Anyway, I always wanted to be able to access script data from Python, there is PyDecDat but it doesn't support Ikarus/Lego extended scripts, and iirc was rather slow.
So for now I typically used DecDat and parsed the
.d
file with Python to extract data.When I saw this project I was happy that I don't have to parse the
.d
myself 😄...or so I thought.Turned out there are some kinks to be straightened out, so I will fix them along the way.
Edits for maintainers are enabled, so if you want to adjust some things, then go ahead ✌️
My goal is not to create another DecDat, or so I think for now 🤔
My goal is to easily extract data, and cross-connected it afterwards in my external scripts.
Example of previously extracted data about dialogues of an NPC together with their possible routines: