#Metadata Standard

88 messages · Page 1 of 1 (latest)

analog hornet
#

Some useful functions like ModDirectoryGetContent(dir: string) -> []string don't exist, but if mods came with some metadata (like the output of find . then they could be implemented.

The idea for the library is mods run what is effectively a build script before publishing that generates this metadata and stores it somewhere. In order to deal with old mods not being built with this a seperate dependency mod could be created that contains the output of the metadata gathering on all currently published workshop mods and puts that metadata into their mod folder via ModTextFileSetContent. This way the standard would (mostly) work even if nobody used it so it would be more safe for mods to rely on.

Potentially useful data that could be generated includes:

  • All files in the mod
  • Copies of mod.xml / workshop.xml (the builtin ones aren't readable from the api)
ember adder
#

this would be pretty damn good but beyond enemy/item/prop list it's not very useful for the work it takes to setup, as there's not much use in just raw filepaths, considering how diverse their contents can be

#

aka the single biggest benefit of this, being some form of global procedural something, is invalidated without additional manual labor of labeling each file

analog hornet
#

how so?

ember adder
#

for example, consider average content mod, the typical file structure, beyond the three categories I mentioned above, would be comprised of mostly heavily assorted scripts and images

analog hornet
#

sure?

#

you can tell mostly what something is by extension

ember adder
#

that's what I mean, extension is not telling anything in a large mod (the simplest case of xml alone is split between images and entities, and entities can be all sorts of things, and I'm not even talking about lua), one would have to do filename parsing to check folder structure to get a faintest idea

#

and worst case would require actual file content crawling

analog hornet
#

i suppose youd want to do the file reading at generation time

ember adder
#

then, there's the main issue – no benefits

analog hornet
#

wdym?

ember adder
#

if the community has agreed on a standard and everybody has put actual effort into setting up the metadata correctly, surely it is no issue for everybody to push niche compat case patches the global system like would be necessary for (otherwise it's just back to enemy and such lists)

analog hornet
#

i mean the idea is you run a script and its done

#

no manual effort at all

#

and the point of the global data is for proc content mods

#

as it is identify mods needs to spend a few minutes finding the files in a mod before baking because theres no way to get content

ember adder
#

both of these are true (procedural content and mod identity) but both are solved better by modders accepting dedicated standards for each (content, not file, lists + people just simply specifying content origin in a reasonable way, frankly just not datafiling would be half the job as it is typically trivial to retrieve the mod name from the path aside edge cases like spells that need people just adding fields to the table)

analog hornet
#

finding the modid isnt the issue, its finding the paths that the content lives at

ember adder
#

basically, diluting the metadata with assorted stuff is besides the point imo

ember adder
analog hornet
#

if you have some mods/modid/files/some_enemy.xml theres no good way to find that (and thus no way to know that the translation key corresponds to an enemy

#

the only real way to get around that is to specify what files are in your mod

ember adder
analog hornet
#

well you need to know it at init

#

and how are you supposed to find it

ember adder
#

oh, you add it to translation file cause vanilla game does not support in-line keys

#

fuck, I really am out of touch in my echochamber

#

well, I would still argue that this is better solved by an enemy list

analog hornet
#

you need it in translations otherwise it doesnt work in the progress menu

analog hornet
analog hornet
#

you could include only the enemies and hope nobody needs anything else, or you could include all the files and include some info about what they are

#

like i also need all items for identify mods

ember adder
#

enemies/items/props, yes

analog hornet
#

aka everything pretty much

ember adder
#

not really, any more or less elaborate mod would have a ton of assorted nonsense mentioned above only useful internally

analog hornet
#

like what?

#

what mod stores its own config data in xml?

ember adder
#

let me see apotheosis cause my projects might be too niche actually

ember adder
analog hornet
#

ive stored a bunch of generated stuff in lua

#

ig knowing the lua scripts in a mod isnt too useful

#

well other than for data files

#

its always good to know everything that exists in them

#

so metadata thats actually useful is all the content inside data, and all xml files

#

which is basically everything

#

doesnt make sense imo to not just complete the data

ember adder
ember adder
analog hornet
#

?

#

you can easily identify what is an enemy with nxml

#

which ofc is free since its when generating

ember adder
#

not really, not with stuff that goes beyond vanilla

#

any kind of a thing can have ai comp

analog hornet
#

true, some stuff would need manual tweaking or have some minor issues

ember adder
#

and not all enemies might have damage model for example

analog hornet
#

which is the same as it is now

#

except itll be several minutes better load times

ember adder
#

yes but you can't just label all stuff you are not sure about "idk" as you would not know what you are sure about

#

so one will try getting enemy pool and will get a bunch of game-crashing trash

analog hornet
#

enemy tag should be pretty good

ember adder
#

it's actually ever worse with whole workshop worth of content, since it's not given that stuff even works

ember adder
ember adder
#

if the example of the enemy pool is not culled and end user has some really shoddy mod installed, or a large project that has unused half-broken enemies hidden aways somewhere, it will explode

analog hornet
#

what mod are you thinking of that would cause it to explode?

#

spawn random enemies?

ember adder
#

there's all the matter of stuff on workshop, through all the years (unless last update cutoff point maybe? could make thing more stable)

analog hornet
#

i mean what mod feature would having unused content listed not work with

ember adder
#

figuring out what is used and what is not is teeth-crushingly hard, it can be one line of entityload or it can be custom script that assembles filepath on-fly through 5 concats and 15 variables

analog hornet
#

yes, deciding usage is in general not possible

#

but why do you need to?

ember adder
#

half-finished content is likely won't work at all

analog hornet
#

and whats wrong with that?

ember adder
#

the main value of global metadata is procedural content

analog hornet
#

true

ember adder
#

procedural content that's supposed to work

analog hornet
#

i suppose if you procedurally mutated enemies somehow or similar you would need to avoid unused content

ember adder
#

no, I mean more direct stuff, like custom biome that has all kinds of creatures

analog hornet
#

ig

ember adder
#

or even shop contents

analog hornet
#

you can include a reachability tag to see if something is obviously reachable

#

and content that depends on the things it uses being fullly functional can read that

ember adder
#

then it all returns back to having a proper enemy/item/prop list standard, as them being maintained manually would ensure it's safe and reliable

analog hornet
#

i imagine being autogenerated reachability would probably be correct enough for most mods

#

then you could just have some manual annotations if your mod does weird stuff that breaks the automatic reachability

ember adder
#

I'm still quite concerned for edge cases, in particular the fact that it might be discouraging for newcomes to wander beyond typical gameloop, but only listing normal stuff I agree is probably safe enough