Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Override Tag/Folder/Tweak for Raws  (Read 554 times)

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Override Tag/Folder/Tweak for Raws
« on: July 16, 2010, 12:22:25 pm »

This or something like it might have been suggested before, but I thought it was a decent idea. Right now, mods that have to modify default raw files are a pain if you want more than one, or if you've made your own tweaks (my situation). In addition, many times mods will pick the same name for an object by coincidence, or simply use the same resources from an entirely separate third mod.

Allowing creature/item/material/whatever definitions to gracefully override definitions already loaded would improve this, if not outright eliminate it in some cases. There could be three levels for this - an init tweak that arbitrarily picks one definition to use in case of duplicates (quick and dirty), an 'override' folder inside /raws/objects/ or just /raws/ whose definition names are loaded first, which then act in place of definitions with the same name (bit less quick and dirty), and a tag for object definitions that ensures that it is loaded as the winning definition no matter what (for fine tuning).

The finer level overrides the previous - if a definition inside /raws/objects/ has a [OVERRIDE] tag, and a definition inside /raws/override/ shares its name, the /raws/objects/ definition wins. If there's a definition with [OVERRIDE] in /raws/override/, it will win over any duplicates inside the override folder.

Thoughts?
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Override Tag/Folder/Tweak for Raws
« Reply #1 on: July 16, 2010, 05:38:33 pm »

My thoughts?

Something this sophisticated just to be user-friendly sounds like the sort of thing Toady would never do, honestly.

There are some third-party resources out there, however, that are designed to help you manage putting together mods.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Override Tag/Folder/Tweak for Raws
« Reply #2 on: July 16, 2010, 06:27:28 pm »

Except it's not really too sophisticated. It's merely a dictionary instead of a basic array - as objects go into it, duplicates either replace existing definitions (if [OVERRIDE] tag is found) or are ignored. This is something I could implement in VB in a day or two, and I'm hardly a master programmer.
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044