Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Generate giant and animal man variants from ordinary versions procedurally  (Read 1473 times)

PatrikLundell

  • Bay Watcher
    • View Profile

The suggestion is to write a pre processing program/script that takes the raw descriptions of the ordinary creatures and generates raw descriptions of giant and animal man versions from them.
The ordinary animal raw descriptions could be extended with overriding hints for the giant and animal men versions if needed. These hints would have no effect in DF itself, but would guide the pre processor in its generation.
The reason to produce raws for these derived creatures is to allow modders/players to change them, while vanilla DF would provide the results of generation only (DF itself would be oblivious to the generation and would use each creature raw for that creature, regardless of whether it was a base or derived version).
It would be a bonus if the pre processor would be provided so modders could do the same generation based on their modified creature sets.

Obviously, oddballs such as Plump Helmet Men, Gorlaks, and Gremlins would still have to be defined manually, since they're not derived from underlying creatures.

Implementing the suggestion would silence the bitching about the non existence of Giant Desert Scorpions, and might result in things like Mussel Men, Cave Spider Men , or Creepy Crawler Men (although a subterranean tag might be used to suppress generation of giant and animal people versions, if desired, with an override required to get/retain the GCS while suppressing the animal people version).

A very basic FotF level question is why this isn't done already, since it seems to be a natural fit for the DF philosophy. There might be some simple answer such as "it won't work because of..." or "haven't gotten to it yet" of course.
Logged

NullForceOmega

  • Bay Watcher
  • But, really, it's divine. Divinely tiresome.
    • View Profile

Patrik, this is how it already works (mostly), but not all of the creatures currently have the giant/animal man tags present.  Unless I'm gravely mistaken the c_variation tags handle this specifically.
Logged
Grey morality is for people who wish to avoid retribution for misdeeds.

NullForceOmega is an immortal neanderthal who has been an amnesiac for the past 5000 years.

FantasticDorf

  • Bay Watcher
    • View Profile

Patrik, this is how it already works (mostly), but not all of the creatures currently have the giant/animal man tags present.  Unless I'm gravely mistaken the c_variation tags handle this specifically.

The c_variation handles pre-determined body details (such as the humanoid body form) to be applied to a animal over its usually quadrupedal form via converting the existing tags (such as a dog-man with all the applicable body parts gets a swap out its collection of typical quadruped body parts for arms and legs without having to remove and re-add, its just changed model)


What patrick is suggesting from what i can gather is that its just a routine that does this to all creatures in a hard-coded fashion. So like tag in [CREATE_NEW_RAW_FROM_THIS_ORIGIN:GIANT] etc etc with relevant arguements underneath to appear in the game without requiring a raw themselves.

To pick a hole in the OP arguement. What material property is a mussel person's limbs since it is shell all around its exterior if it was generated to become a humanoid. Its a noble idea to do all of this for us automatically but it detracts from modding in our own solutions and is open to creating a lot of bugs due to the complex nature of creatures unlike the straightforward nature of c_variation that can be altered and modified however we wish to put in our own body plan and token shortcuts (because that's all it is besides from having to rip it out and re-implement)
« Last Edit: July 05, 2016, 10:47:15 am by FantasticDorf »
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile

Also it wouldn't actually fix giant desert scorpions. The reason they were temporarily removed was because there were no normal desert scorpions or desert scorpion men and Toady was overhauling that system at the time so he wanted to make giant desert scorpions follow the same rules as the other giant animals. However Toady just decided not to actually do that for some reason. It'll probably be a while until he does.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

PatrikLundell

  • Bay Watcher
    • View Profile

I have to admit I don't quite follow all of your explanations. However, it seems the c_variation things are what would tell the generator how to produce the derived raws, and it might be it (already/mostly?) does what I'm after.
My understanding of your c_variation description is that it directs DF to generate derived creatures without any explicit raws for these creatures?

I'd say a Mussel Man is not dissimilar from a Slug Man or any arthropod Man (although slug or worm is probably the closest, with the imagined result not that dissimilar from a ninja turtle). It's also possible the generation would just say this base isn't valid for generation.

I tried to specifically not block modding with the suggestion in that the conversion should generate new raw descriptions from the base one, but without the need for manual maintenance when the base is adjusted. Toady running the tool would generate a bunch of raws that are then used by DF itself together with the base ones, with DF having no knowledge of where the raws came from, so any modder could modify the generated raws, and as long as they stay within DF's boundaries (i.e. known tags and tag value ranges, etc, as per normal), the modder is free to replace, change, or remove any or all raws as desired.
If the tool was provided to modders, they could create a new base creature, crank the lever, and get the derived raw versions generated. If desired, these could then be further modified (but re-generation of something modified would require manual copy and merge). A modder would be free to ignore the tool, and just manually create the derived creatures (if any) from scratch.

As far as I understand, there's no relation between the various versions in DF itself (such as the Man version having some kind of affinity with the other ones), but if there are/were/will be, the generated versions should be tagged by the tool to point back to the base creature.

Basically, I want to remove tedious manual generation of things that seem to follow fairly simple rules, and that's what computers are very good at (body size of Man version being an average of the animal and a human, or whatever it was, for instance), and not making typos... If it doesn't work because of too many complications: too bad. If it is implemented already: so much the better.

And yes, if the base is missing, nothing would be derived...
Logged

Reelya

  • Bay Watcher
    • View Profile

Quote
I have to admit I don't quite follow all of your explanations. However, it seems the c_variation things are what would tell the generator how to produce the derived raws, and it might be it (already/mostly?) does what I'm after.
My understanding of your c_variation description is that it directs DF to generate derived creatures without any explicit raws for these creatures?

When the game loads it converts some tags into generated raws. The creature variations system is like a cut/paste template system. If you could export the raws from the running game you'd probably see the fully expanded raws for all the creatures.

Quote
I'd say a Mussel Man is not dissimilar from a Slug Man or any arthropod Man

It's not "dissimilar" on the abstract conceptual level. But they use very different bodyplans. "sort of the same" doesn't cut it if you actually have to PROGRAM CODE that takes the differences into account.

But really, something that's a pre-processor that you run over existing raws and it generates new files is a better fit for the Modding section, not Suggestions. The main reason is a good one: there are many of us and only one Toady One.

In other words, any John Doe could make what you're talking about. Why take Toady's time away from critical engine improvements? Why not try making this yourself? Reading and writing text files is just about the most basic level of learning in any programming language.
« Last Edit: July 06, 2016, 12:41:48 am by Reelya »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile

:
When the game loads it converts some tags into generated raws. The creature variations system is like a cut/paste template system. If you could export the raws from the running game you'd probably see the fully expanded raws for all the creatures.
:
But really, something that's a pre-processor that you run over existing raws and it generates new files is a better fit for the Modding section, not Suggestions. The main reason is a good one: there are many of us and only one Toady One.
Which is the reason I suggested it as part of the DF package: IF you could export the generated raws: What I suggest is to export (or rather, expose) the generated raws. If that's how it works today, it's basically a matter of separating that part of DF into a separate tool (which still requires work that might be given the "in a hundred years or so" priority), although the raw generation output would presumably be an addition. But yes, someone else could whip up a script that emulated the process (which would need to be maintained as the internal DF generation changed). I also don't know what happens when an internally generated raw clashes with a modded external version of the same raw. I have no intention to write an emulation script for the simple reason I have no reason to use it.

Regarding a Mussel Man: yes, an appropriate transformation would need to be found/constructed for such a creature to be generated. If there's no applicable transformation available no creature would be generated.

And I admit to not having done the research I probably should have done before posting a suggestion.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile

There are a few steps in making a giant or animalman variation.

[CREATURE:TOAD_MAN] Must be declared specifically so the creature has an ID.
   [COPY_TAGS_FROM:TOAD]
This gives the new creature a copy of the toad raws as a starting point.
   [APPLY_CREATURE_VARIATION:ANIMAL_PERSON]
Modifies some TOAD tags and deletes others.
   [GO_TO_END]
Additional raws to handle things not done automatically by the creature variation.
   [SELECT_CASTE:MALE]
      [CASTE_NAME:toad man:toad men:toad man]
   [SELECT_CASTE:FEMALE]
      [CASTE_NAME:toad woman:toad women:toad woman]
   [SELECT_CASTE:ALL]
   [APPLY_CREATURE_VARIATION:PUNCH_ATTACK]
   [APPLY_CREATURE_VARIATION:KICK_ATTACK]
   [APPLY_CREATURE_VARIATION:MOUTH_BITE_ATTACK]
   [APPLY_CREATURE_VARIATION:STANDARD_BIPED_GAITS:900:711:521:293:1900:2900] 30 kph
   [APPLY_CREATURE_VARIATION:STANDARD_CLIMBING_GAITS:2990:2257:1525:731:4300:6100] 12 kph
   [APPLY_CREATURE_VARIATION:STANDARD_SWIMMING_GAITS:2990:2257:1525:731:4300:6100] 12 kph
   [APPLY_CREATURE_VARIATION:STANDARD_CRAWLING_GAITS:2990:2257:1525:731:4300:6100] 12 kph
   [GO_TO_START]
   [NAME:toad man:toad men:toad man]
   [DESCRIPTION:A dark green man with the distinct head of a toad.]
   [POPULATION_NUMBER:5:10]
   [CLUSTER_NUMBER:1:5]
   [MAXAGE:60:80]
   [CREATURE_TILE:'t']
   [COLOR:2:0:0]


Creature variations can take arguments (as seen in the gaits), so it might be possible to take the automation further.  But as mentioned I'm not sure this is the best use of Toady's time.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game

It does have some relevance though.  Right now, savage biomes are ridiculous, with giant animal and animal people populations collectively outnumbering their mundane counterparts.  I'd much rather see a handful of modified creatures per world than have every creature have a modified counterpart.

As magic and sphere-based biomes become more a part of the world (Toady said that he will overhaul the current good/evil/savage system with a sphere-based approach), this sort of thing will become more relevant.  For instance, a sky-aligned biome might add wings to its animals, a fire-aligned one might give them fire breath, and so on.

One possibility:

Add a modification class creature tag.  For instance, MOD_CLASS:ANIMAL.  This tells the game that modifications of that type could be applied to this creature.

Modifications could then be associated with particular spheres, which tells the game it can generate creatures with said modification in a particular biome type.  (Alternatively, the SPHERE creature tag could be used to tell the game where it is allowed to appear, just like the current GOOD and EVIL tags, and the modification can just add those tags.  That would be simpler.)