v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing DF2014 Talk:Creature token

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "DF2014"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 +
<!-- DELETE THIS LINE -->{{newpage|type=cp|178.167.254.128}}
 +
 
== APPLY_CREATURE_VARIATION versus APPLY_CURRENT_CREATURE_VARIATION ==
 
== APPLY_CREATURE_VARIATION versus APPLY_CURRENT_CREATURE_VARIATION ==
  
Line 23: Line 25:
 
Specifically this prevents Elves from adding the creature as a trade-able (tame) caged creature to caravans.  This is notable as they can currently trade pets that have [CAN_LEARN] and [CAN_SPEAK] enabled.
 
Specifically this prevents Elves from adding the creature as a trade-able (tame) caged creature to caravans.  This is notable as they can currently trade pets that have [CAN_LEARN] and [CAN_SPEAK] enabled.
 
Found this by save scumming an incoming Elven caravan while testing out creature addition and removal from a civilization using [https://github.com/rndmvar/DFHack_scripts/blob/master/populate.rb populate.rb]
 
Found this by save scumming an incoming Elven caravan while testing out creature addition and removal from a civilization using [https://github.com/rndmvar/DFHack_scripts/blob/master/populate.rb populate.rb]
 
== [FREQUENCY] affects how often creature appears in trade caravans ==
 
 
I found that by setting [FREQUENCY:5] on a creature that the local Elves could trade, and save scumming an incoming caravan.  The rate of the creature appearing in the caravan dropped to 1/40 caravans (not truly 1/20 as it had to compete with roughly 100 other creatures with varying frequency settings).  By setting it to [FREQUENCY:100] it now appears in roughly 1/6 caravans.  (I'd test it more thoroughly if loading worlds took less time on my PC)
 
 
== [COPY_TAGS_FROM] does not copy caste tags applied to a creature ==
 
 
Wanted to note this here, as I've seen Giant versions of pack animals without the [PACK_ANIMAL] flag set in creature_raws[creature_index].caste[caste_index].flags.PACK_ANIMAL as viewed through DFHack.  As the [PACK_ANIMAL] flag CAN be set on the entire animal, and then pushed onto the male/female/whatever castes.  It is still a caste flag, and does not get copied when using [COPY_TAGS_FROM].  Which only appears to copy creature wide tags.
 
 
== SLOW_LEARNER doesn't apply CAN_LEARN ==
 
 
The SLOW_LEARNER token both sets all skill learn rates for a caste, and sets a special SLOW_LEARNER flag in its caste (which in turn gives the creature itself the HAS_ANY_SLOW_LEARNER flag). It ''doesn't'' change the INTELLIGENT_LEARNS flag of a caste (the one set by the CAN_LEARN token that enables the creature to learn). You'll see in troll's raws that CAN_LEARN is added alongside SLOW_LEARNER to make trolls able to learn.
 
 
You can make a caste that has the SLOW_LEARNER flag while still having standard skill rates by simply including [SKILL_LEARN_RATES:100] afterwards to override the extra changes to learn rates. I don't know if the system that checks for giving goblins access to creatures like trolls simply checks for the SLOW_LEARNER flag (well, presumably the HAS_ANY_SLOW_LEARNER of the creature), the skill learn rates, or a combination of both, but I'd guess (without testing) that it's likely that they just check for the flag.
 
 
This was all tested with some raw modding + digging through structures in DFhack.
 
 
== Re COPY_TAGS_FROM: “Copies creature tags, but not caste tags” ==
 
The table entry for [COPY_TAGS_FROM] currently reads: “Copies creature tags, but not caste tags, from another specified creature.” What is the source of this assertion? Is it accurate?
 
 
I notice that animal people with [COPY_TAGS_FROM:BIRD_x] (such as BLUEJAY_MAN) generally end up with “[FEMALE][LAYS_EGGS]” in the computed raws. But by usage, and per the table, [LAYS_EGGS] ''is'' a caste tag, and therefore ''shouldn't'' be found on the new creature. Is the entry wrong, or have I misunderstood something?
 
 
'''—'''[[User:Sriefmadsakzro|'''οɼѕаk''']] 20:51, 4 February 2021 (UTC)
 
 
:Where are you obtaining the "computed raws" from? If it's from [[DF2014:Bluejay_man/raw]], that is generated with the [https://github.com/quietust/DFRawFunctions DFRawFunctions] extension, which is a reimplementation of DF's logic that could potentially have bugs. &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 01:57, 6 February 2021 (UTC)
 
 
::If DFRawFunctions is how DFHack does it, then yes, that's what I mean by “computed raws.” But I investigated this after finding that a modded-in Bluejay man civilization (using a tweaked version of the original creature) produces offspring during worldgen, but not during gameplay. Pregnancies created via DFHack (using the same process as catsplosion) even count down to zero with birth never occurring. After I added CV_REMOVE_TAG:LAYS_EGGS to the modded Bluejay man creature, births (forced and otherwise) occur as expected. '''—'''[[User:Sriefmadsakzro|'''οɼѕаk''']] 16:39, 6 February 2021 (UTC)
 
 
::To be more specific, this is the line I entered into the dfhack console (with a bluejay man selected):
 
::* <pre>:lua (function () for _,v in pairs(df.creature_raw.find(dfhack.gui.getSelectedUnit().race).raws) do print(v.value) end end)()</pre> '''—'''[[User:Sriefmadsakzro|'''οɼѕаk''']] 16:47, 6 February 2021 (UTC)
 
 
:::Oh, DFHack does ''not'' use DFRawFunctions - DFHack is showing you the actual in-game data computed by DF, while DFRawFunctions is only used on the wiki (and is written in PHP, so it couldn't run under DFHack anyway). I didn't realize that the "raws" vector contained the computed raws in-game, but that's good to know! (You don't strictly need the enclosing function, by the way - just <code>:lua for _,v in pairs(df.creature_raw.find(dfhack.gui.getSelectedUnit().race).raws) do print(v.value) end</code> will work.)
 
:::From an initial inspection, it looks like COPY_TAGS_FROM is copying caste tags and intended to do so. Other animal men that I checked, including [[chipmunk man]] and [[lizard man]], don't specify [MALE] or [FEMALE] for the relevant castes, but they are in the computed raws, as they should be. Note that it's possible that something else I don't understand is adding these tags. I checked APPLY_CREATURE_VARIATION, but I don't think the ANIMAL_PERSON variation is doing anything to the MALE/FEMALE tags.
 
:::Short version: could be a mistake in the article, but I'm not really sure. People on the modding forum might have a better idea. &mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 01:05, 7 February 2021 (UTC)
 
 
::::I'm used to enclosing snippets in anonymous functions just to keep from polluting the global environment. I haven't read the docs or the internals religiously, so I wouldn't be surprised if they do something to keep that from happening anyway. It just helps me sleep at night. '''—'''[[User:Sriefmadsakzro|'''οɼѕаk''']] 14:17, 7 February 2021 (UTC)
 
 
::::Well, I haven't used the forums in a long time—I've forgotten my old login and then created a new one so many times—but maybe I'll ask around. Thanks for giving it a look, though. '''—'''[[User:Sriefmadsakzro|'''οɼѕаk''']] 14:32, 7 February 2021 (UTC)
 
 
== Caste token? ==
 
 
Should [[Caste]] be linked here as token ? --[[User:Jan|Jan]] ([[User talk:Jan|talk]]) 22:41, 1 February 2022 (UTC)
 
 
== questions about our table syntax ==
 
 
{| {{prettytable}}
 
| {{text anchor|SELECT_MATERIAL}}
 
| Creature
 
|
 
*<[[material token]]>
 
| Selects a locally defined material. Can be ALL.
 
 
|-
 
| {{text anchor|SELECT_TISSUE}}
 
| Creature
 
|
 
*tissue token
 
| Selects a tissue for editing.
 
|}
 
 
# Is there any significance to the angular brackets surrounding the 'material token' link?
 
# Any reason why 'tissue token' (or any other token argument we document) should be linked i.e. [[tissue token]]?
 
--[[User:Jan|Jan]] ([[User talk:Jan|talk]]) 14:56, 2 February 2022 (UTC)
 
 
Please understand; this is just ''my'' best guess - if either of these answers are wrong, someone more knowledgeable should be around ASAP for insight or correction.
 
 
 
:1. No?
 
:2. For reference, at least. (in the case of the ones already linked, anyway). [[User:Silverwing235|Silverwing235]] ([[User talk:Silverwing235|talk]]) 10:40, 10 February 2022 (UTC)
 
 
::1. What is the preferred syntax i.e. should we remove them or add them everywhere?
 
::2. Yeah. It was suppose to be "should ''not''" (was in hurry) i.e. why aren't all the entries are linked. Since I realized that we have to two types of token entries one to define new objects (e.g. [[Tissue definition token]]) and one to reference them, the later only available for common topics and are linked here.--[[User:Jan|Jan]] ([[User talk:Jan|talk]]) 15:08, 10 February 2022 (UTC)
 
 
== LIGHT_GEN - Possibly does nothing? ==
 
 
See title. Tested on fairies.
 
 
Also, it appears that light_gen is only supposed to work on vermin, which probably bears mentioning on the token.
 
This means that giant fireflies should not 'glow in the dark' in adventure mode, despite inheriting the token from fireflies.
 
 
== Verify: [VERMIN_BITE] and [SPECIALATTACK_INJECT_EXTRACT] ==
 
 
The trouble with these two tokens is illustrated by the fire snake's inability to melt stuff through its vermin bite.
 
 
Extensive testing yielded zero deaths from fire snake bites. While amulets made from fire snakes posed infinitely more danger to dwarves, and also notably kobolds.
 
 
Spawning giant fire snake creature variants with a [SPECIALATTACK_INJECT_EXTRACT], in place of their vermin bite, will presumably render the desirable effects of the bite interaction.
 

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Please sign comments with ~~~~

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: