Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Add 'mod' folder and its handling. Add detailed log output for mod loading  (Read 1076 times)

voliol

  • Bay Watcher
    • View Profile
Re: Add 'mod' folder and its handling. Add detailed log output for mod loading
« Reply #15 on: November 18, 2020, 07:31:48 pm »

I was basically trying to say having a program that could intelligently splice together text files from various mods (and point out those errors or conflicts) is what people will want, not whatever specifics you're saying is impossible about that Mod Manager.  I don't see Toady creating that but leaving it to the modding community to hash it out. Even with it being standard that everything get uniquely named I'm not sure that's helpful for automated mod merging, or we're just likely to get worlds with dozens of barely differently named Drow or whatever when we try to merge of bunch of monster mods.

But what do I know, I'm not a modder.
I doubt it can be done without any Toady's input. But something like you describe is possible - In Skyrim(?) mods had ids, and any item there was identified as MODID_ITEMID. Or maybe it was another game.

Any splicer could go the same way, if mod has some internal ID, it could just combine items without conflicts, maybe output warnings where there are items named in the same way.
A bit needy perhaps, but I’d like for my edit to PUTNAMMOD_CAT to work, even if Putnam discontinues their mod and someone else, say Pillbo picks it up. Having the targetable ID change then, from PUTNAMMOD_CAT to PILLBOMOD_CAT, even though it’s the same object, would be pretty annoying. Another example would be if Putnam did not discontinue, but Pillbo decides to compile it and some others into a ”best mods” modpack, requiring only one subscription. The suggested automatic change to e.g. PILLBOMODPACK_CAT would also break compatibility to my edit mod.

Evans

  • Bay Watcher
    • View Profile
Re: Add 'mod' folder and its handling. Add detailed log output for mod loading
« Reply #16 on: November 19, 2020, 06:19:19 am »

A bit needy perhaps, but I’d like for my edit to PUTNAMMOD_CAT to work, even if Putnam discontinues their mod and someone else, say Pillbo picks it up. Having the targetable ID change then, from PUTNAMMOD_CAT to PILLBOMOD_CAT, even though it’s the same object, would be pretty annoying. Another example would be if Putnam did not discontinue, but Pillbo decides to compile it and some others into a ”best mods” modpack, requiring only one subscription. The suggested automatic change to e.g. PILLBOMODPACK_CAT would also break compatibility to my edit mod.
An excellent point. So naming conventions seem unavoidable anyway.

On the side note, yesterday I was fighting with bringing Mephs tileset into my updated Masterwork version. Its truly incredible for me that updating graphics can break save games.
Why entity definitions are not decoupled from tiles definition that many years after graphic packs are a thing is beyond me.

Good thing I don't have many hairs left, or I would be pulling them en masse.

There should be a stand-alone file with high priority were you would define tiles and entities making use of these (mayhaps with colour variations), and if entity is not found in raw, it is simply ignored.
Display layer should be as decoupled from simulation layer as possible. Any tile definition in object raw should be treated as fallback default with low priority.
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

Pillbo

  • Bay Watcher
    • View Profile
Re: Add 'mod' folder and its handling. Add detailed log output for mod loading
« Reply #17 on: November 19, 2020, 02:54:02 pm »

Continuing the pure speculation on my end. What if Putnam modded cats in his modpack and I modded cats in my modpack and they didn't have unique ids, they were still just [CREATURE:CAT]? If a program could recognize these objects as the same but not identical you could prioritize it two ways (that I can imagine right now).

1. You could say 'mods are loaded in this order and new overrides old'. So I load PillboMod then PutnamMod and wherever there are conflicting object ids, like [CREATURE:CAT], PutnamMod is used.

2. You can have a GUI say "There are duplicate [CREATURE:CAT] objects in these mods, [click to use PillboMod's] or [click to use PutnamMod's]. Maybe even have a details option to show the diffs

I'd imagine you'd still need to use loading order in some way for mods like Modest Mod that remove objects and other mods that don't. Meaning loading PutnamMod first and it modifies [CREATURE:CAT] (and other things) then loading IHateCatsMod that removes them entirely. Otherwise your IHateCatsMod would delete [CREATURE:CAT], then the next mod would put it right back.

I'm sure there is still more I'm not aware of but this seems completely in the realm of possibility, much simpler than what DFHack currently is capable of.

Edit, or
3. some git style merge so if one mod's CAT breathes fire and the other CAT spits webs your get a web spitting fire breathing cat. It would be harder, I wonder if it's possible for a program to use git's merge ability to create files like that and recognize conflicts?
« Last Edit: November 19, 2020, 07:19:37 pm by Pillbo »
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Add 'mod' folder and its handling. Add detailed log output for mod loading
« Reply #18 on: November 19, 2020, 06:28:36 pm »

How about loading mods by asciibetical order of there directory (or subdirectory) names?  That way numerical prefixes can be added to control loading.  Also, a file called “mods.noload” with a list of module (sub)directories not to load in order to allow mods to be disabled without removing them entirely.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Add 'mod' folder and its handling. Add detailed log output for mod loading
« Reply #19 on: November 22, 2020, 10:50:02 pm »

Lexicographic ordering is sorta useful, you see it "abused" (i.e. that's technically not why, there has to be a mod load order by its nature, but it's still useful) in e.g. Stellaris modding a lot, but I kinda like date modified order a la Elder Scrolls cause that allows for community-curated mod order lists that modders don't have to maintain on their own, which is neat.
Pages: 1 [2]