You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's would be cool to have modding system similar to Cataclysm DDA game:
All mods have same structure (kindaa similar)
Base game data is in it's own mod (not similar :( )
Each mod loads it's own data (similar)
So I suggest to move data files into it's own mod (there will be no data folder, so make global variables for all data) and during mod load each supported file in each mod will merge it's return with global variable.
Like
-- Global data table
data = {achievements = {}}
-- Load mod with name 'name'
local function load_mod(name)
-- List of file names to load from mod (all filenames that now in data folder)
local files = {'achievements'}
-- Load each file
for _, part in ipairs(files)
local path = 'mods/' .. name .. '/' .. part
if love.filesystem.exists(path) then
-- Get returned table from mod file
local mod_data = require('mods/' .. name .. '/' .. part)
for k, v in pairs(mod_data) do
data[part][k] = v
end
end
end
end
So core data as other mods will have same structure and loading will be simplified (because of unification), And it will be possible to delete core data because global variables for data containment will be created not in data files.
I can do PR for this but idk if there will be changes to data.
The text was updated successfully, but these errors were encountered:
It's definitely an interesting idea, and it's giving me some ideas on how to change mods (which I admittedly haven't updated at all since Possession). I think making it so that they and the data files work in the same way is a good idea.
But I don't think we're quite able to do that to the degree you're talking about at this point without a bit of reworking how things work.
For one, there's some stuff in data/ that is pretty necessary regardless of game and that mods shouldn't necessarily need to have (the map layouts and AI come to mind), but those might be worth moving somewhere else.
Also, when making an actual game with this, you'll probably want there to be a core set of data it loads by default. But I can see how putting in a way to not load that data when there's a different mod to load may be useful.
It's would be cool to have modding system similar to Cataclysm DDA game:
So I suggest to move data files into it's own mod (there will be no data folder, so make global variables for all data) and during mod load each supported file in each mod will merge it's return with global variable.
Like
So core data as other mods will have same structure and loading will be simplified (because of unification), And it will be possible to delete core data because global variables for data containment will be created not in data files.
I can do PR for this but idk if there will be changes to data.
The text was updated successfully, but these errors were encountered: