elmokki / nationgen

NationGen is a program that procedurally generates new playable nations, including graphics, for the strategy game Dominions 4 published by Illwinter. Support for Dominions 5 may be forthcoming.
32 stars 25 forks source link

Theme documentation #903

Open elmokki opened 6 years ago

elmokki commented 6 years ago

Themes as defined by #theme are for many purposes best when they are documented so that new features and content can be built directly to support them: For example, if we know all lizardy races are themed as "reptile", we can as a simple step make the lizard flag top icon be more probable to all current and future reptile races very easily. Additionally, for future things stuff such as "serpent cult" theme for humans would be really neat to increase the probability of serpent headresses and stuff like that.

Related to the above, I'd like to add more thematic nation themes to as many nations as possible. Just like "serpent cult" to any race that has some graphics to support such thing or simply things like "this nation really likes cavalry". I think such features could add a lot to the program because instead of humans, for example, pretty much always being a somewhat similar mix of stuff there'd be more variance with very cavalry heavy nations (which might need cavalry archers or something though) or very lightly armored nations etc rather than those existing but being quite rare (except nearly full cavalry is probably impossible right now)

The Vaetti animal tribe thing is something like this, though I would really like more graphics tied to it. Now that I mention, at least the bear/wolf flag things should refer to whatever themes those totems have and this is the reason the use of themes should be documented.

Ealb commented 6 years ago

Assuming Imperial Humans are closer to 50% done rather than 90%, they were/are going to get a bit of this treatment. The idea had been for their (slightly silly) Tribal themes (the breakdown being Tribal, Regal, Republican, Imperial, relating to legion prevalence, equipment preferences, etc.; advanced Regals would be trotting around with advanced bronze armors while advanced Imperials would be in advanced iron gear) to have various different totem animals rather than defaulting to wolves or eagles for their icons, and their furs (see e.g. all the different furs I did for occidental warrior societies), headdresses, and non-flag standards would reflect it). That's still more defaulting-to-themes rather than optional ones like you're referring to, but it would be more graphic than vaettir.

elmokki commented 6 years ago

It doesn't even necessarily need to be graphic: Just documenting themes in general would be nice because I think that instead of the nearly completely path based naming we currently have it'd be very neat to have things like naming refer to themes more and generate Bear Warriors for bear tribe Vaettir or Bronze Wizards for humans that use bronze (albeit more rarely since the bronze isn't as defining feature of their culture I suppose)

I'm not sure whether there should be minor and major themes instead of just themes for this kind of stuff. Probably not. I mean, I suppose being bear tribe, being distinct from your fellow imperial humans by wearing bronze etc can but don't have to be culturally defining things.

I think lot of what I want could be gotten by just upgrading the naming system to work based on thematic tags and categories like discussed before and then randomizing a category for naming for each nation and use that at least to some degree.

Ealb commented 6 years ago

This harkens back to the old discussions of name revisions and creating semantic clouds for nations. It seems like it might be easier to have themes, poses, filters, and perhaps even some items selectively add themes tags to the nation, which could impact unit or epitaph naming (though if a nation was dynamically forming a cloud of concepts, obviously it would only care about features of major units/mages, and it would be worthwhile to distinguish between major (bear, moon) and minor (bronze, mounted archers) themes), and possibly automatically generated nonsense descriptions.

However, having written that... it would probably be more coherent to make nations optionally pick 0-1 dramatic/overarching theme (necromatic, amphibious, cave-dwelling), 0-2 major themes (forest, serpent, cold, technological/primitive, sailing, spellsinging, sneaky), and 0-3 minor themes (bronze, exotic, red, heavy, savage, stone). I.e., make theme assignment more structured, coherent, and make causality flow top-down instead of bottom up. Races would also have certain themes automatically. The idea would still be to create a semantic cloud for a given nation so there are recurrent themes and more cohesion, obviously.

The simplest approach would just be to add theme tags to the various names, yes. I was thinking of doing that anyway, to generalize the utility of the "generic Blood Guard" name-parts I'd defined.

This almost makes me wanna say that it would be good to either call this something other than themes or call the current national themes "variants" or something. Hmm, I'm probably overthinking this; it's just racial themes (current race-specific themes) and national themes (the new more-generic ones being discussed). Mechanically, it all should be doable with theme tags, ofc.

elmokki commented 6 years ago

Adding themes to nation is a bit unnecessary in the sense that we could just as well query whether any pose in the nation has theme x or anything in the nation has theme x. Honestly chanceincs need a passthrough that involves writing a program that goes through every file in /data/ and changes chanceincs to whatever it should be (and flags things that need to be completely rethought if any).

Technically there should already be functionality of some sort to add different tiers of themes, though their probability distributions aren't controllable. However, yes, having different layers of potential tiers is what I am seeking: Tech levels or cultures or major racial traits are neat variation, but especially for races where those are less visible it'd be neat to have minor cultural traits where possible and possibly tinier stuff. You probably know enough of how the program works to make more technical suggestions if you figure out a great way to do this.

Nation themes are a bit bad name when there are also theme tags so variants or just mutators or (nation) modifiers would probably be better. It's easy to refactor it really. That said, I think chanceincs and themeincs are confusing names as well, especially the latter. Chanceincs should probably be (probability) modifiers and themeincs should be something similar like, mutator maybe. I'm not sure these are the best names, but modifiers modify the probability of an entity being picked while mutators change a whole unit by modifying the probability distributions of what the unit can pick.

Oh, and ideally basechance should be weight, but that's not a huge issue.

elmokki commented 6 years ago

Also, minor/major theme tags is something I have thought of before. I'm just unsure how to implement it exactly. One way is to just link themes to new naming where good general major things would be tagged. The other is to add an extra optional argument to #theme which allows more flexibility in making something like bronze major sometimes and minor sometimes. However, I am not sure this is necessary.

It is also worth noting that naming can look for distinctive tags. For example, if one unit, or maybe a few, have bronze gear and the others don't, calling them "bronze foo" makes sense. If just the sacred is bronze, maybe the mages should be too or vice versa. Meanwhile, if the whole nation is bronze, it may make sense to have Bronze Magisters but a sacred called Bronze Vindicator is at most a bearable name.

Current basic unit naming does something loosely similar in the sense that the system tries to generate differentiated names for units as much as it feasibly can. Currently this is based on name lists linked to equipment ids, but it could be done differently too, though the algorithm works reasonably well in my opinion.