Replies: 4 comments 6 replies
-
Thanks for opening this up! I think moving over to unique IDs would be a good idea regardless of modding support, perhaps NanoID might be interesting if there's a Godot implementation 👀 You could also look at name-spacing I'd envision a path something along the lines of It could also be worth adding a secondary path such as I really like the idea of being able to create the mod data files inside Godot using Pandora as this should make it nice and easy for modders to get it right. Though I may look into what it would take to create json specs for Pandora/games and the like so people could do it inside any code editor that supports those if they wanted. Sounds like a great feature to be added, once it's all planned out 🚀 |
Beta Was this translation helpful? Give feedback.
-
#84 could help out here as well, if game devs could export their types so that modders could import and build upon them in their own bundles of pandora data |
Beta Was this translation helpful? Give feedback.
-
It would be worth ensuring compatibility with Godot's PCK export system, which allows developers to support mods and dlc inside the Godot engine already. I now suspect content pack loading (mods + DLC) would need to be a wider implementation than Pandora should take ownership of, leaving a lot of the implementation to the developer. However, I would envision most games having something like The flow could look something like this:
With that kind of flow, Pandora needs to support loading Pandora files at runtime via the API and merging it with existing data. This approach leaves mod implementation down to the developer, allowing them to handle things like load order, compatibility checks, directories, and much more. Personally, I'd expect to see it look something like this:
With an open implementation, you can create any content structure and load Pandora files from both PCK files and directories depending on user preference, without extra complexity in Pandora. |
Beta Was this translation helpful? Give feedback.
-
👍 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Games like Rim World allow for modding where modders can setup an XML file (e.g. in
MyModName/Defs/**/*.xml
) that magically turns on new items. Data in Pandora is usually stored inside theres://
folder and when running Pandora as part of a game on initial load, data gets loaded from thedata.pandora
file only.ModLoader Autoload
For such a mod to properly work, data could be created at runtime by accessing the
Pandora
GDScript API:While this would work kinda fine, every developer trying to pull this off would need to do this extra step and figure out a good standard to parse/save/load entities themselves.
Designing in Pandora to export as mod
An idea I had was that someone could e.g. design items and other data inside Pandora and then simply "export" their setup into a mod-compatible file. Pandora then could provide functionality (maybe even a mod loader coming out of the box?) being able to parse these files.
Entity ids
Pandora currently generates unique IDs based on auto-increment for entities. The problem is that depending on the current maximum ID inside the
data.pandora
file, the entities created by a mod file may have different ids each time. When e.g. in a save game we store a reference to an entity loaded with a mod, the id of the modded entity can change and thus not finding the entity any longer! Also, persisting modded entities somewhere also does not help, as thedata.pandora
file may suddenly contain entities with the same ids, leading to even worse issues.One way to solve this could be to move away from auto-incrementing ids to something like UUID - @eth0net suggested using NanoID - for mods we can also introduce namespaces/ID prefixes.EDIT this has been addressed in #100 and Pandora now supports both integer ids (default) and nano ids.
Q&A
Q: What is multiple mod files have conflicting setup
A: Pandora is build in a way that it would create duplicates - so conflicting setups would just work alongside one another.
Feedback and ideas weldcome!
Beta Was this translation helpful? Give feedback.
All reactions