Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Random Arguments for Creature Variations  (Read 607 times)

Urlance Woolsbane

  • Bay Watcher
    • View Profile
Random Arguments for Creature Variations
« on: January 26, 2016, 08:21:12 pm »

Currently, randomized creatures are impossible to create, via raws alone. Understandably, Toady wishes to cross this bridge when he comes to it.

That said, there is a simple change to the raws that would work as a nice prelude to more complex or convenient randomization, without upsetting anything.

The APPLY_CREATURE_VARIATION tag allows for the inputting of arguments, allowing for variability with a single variation. If the arguments could be randomized, so could the creatures. I imagine the syntax could work like this:
Code: [Select]
[APPLY_CREATURE_VARIATION:MENDELSSOHN:1;2;3:YES:blue;black;red:NOFEAR|NOPAIN;NOTHOUGHT;CRAZED]
Where a group of semicolons indicates a set of equally possible choices for an argument.

This implementation would of course be somewhat clumsy, but it would open up a lot of possibilities, without the need for recourse to hackery, thus allowing for greater ease of use, and of distribution.
Logged
"Hey papa, your dandruff is melting my skin. Is that normal?"
"SKREEEONK!!!"
"Yes, daddy."

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Random Arguments for Creature Variations
« Reply #1 on: February 03, 2016, 10:56:15 am »

I think this is a good idea, but could be more easily handled by using the TL_COLOR_MODIFIER syntax for a weighted random attribute.

For a stand-alone tag, this is straightforward:

[RANDOM_TAG:NOTHOUGHT:5:CRAZED:2:NOPAIN:1]

Add a NONE option to make no effective tag at all, and you're set.  I can see this being restricted to the set of tags that can be manipulated with syndromes, since it requires individual-level tracking.


For an argument inside a tag, the syntax isn't immediately obvious.  It needs either declaring the number of choices at the head of the list, or nesting brackets.  Something like

[APP_MOD_NOUN:RANDOM:3:hair:3:fur:1:wool:1:SINGULAR]
[APP_MOD_NOUN:[hair:3:fur:1:wool:1]:SINGULAR]


The problem isn't storing the data at an individual level, it's parsing it when needed for descriptions or combat or whatnot.
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