Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006393Dwarf FortressCreaturespublic2013-11-25 09:492014-12-02 21:39
ReporterButton 
Assigned ToFootkerchief 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionreopened 
PlatformOSOS Version
Product Version0.34.11 
Target VersionFixed in Version 
Summary0006393: CV_CONVERT_TAG doesn't require an exact match; creature variations are applied in reverse order
DescriptionI added the following to the [CREATURE_VARIATION:GIANT] creature template (in this order):

    [CV_CONVERT_TAG]
        [CVCT_MASTER:BODY]
        [CVCT_TARGET:HEAD_HORN]
        [CVCT_REPLACEMENT:3HEAD_HORN_NUMBERED]
    [CV_CONVERT_TAG]
        [CVCT_MASTER:BODY]
        [CVCT_TARGET:2HEAD_HORN]
        [CVCT_REPLACEMENT:4HEAD_HORN]

I get the following error:

*** Error(s) found in the file "data/save/region14/raw/objects/creature_temperate_new.txt"
GIANT_IBEX:Unrecognized Creature Caste Body Token: 43HEAD_HORN_NUMBERED

For reference, the IBEX's body tag is:

[BODY:QUADRUPED_HOOF:TAIL:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:THROAT:NECK:SPINE:BRAIN:SKULL:2HEAD_HORN:MOUTH:GENERIC_TEETH:RIBCAGE]

It appears that the CV_CONVERT_TAG is stripping the 4 from 4HEAD_HORN when it goes looking for HEAD_HORNs to replace with 3HEAD_HORN_NUMBERED.
Steps To ReproduceCopy the above into your raws and create a giant ibex in Arena.
TagsIntentional/Expected?, raw, raw file, raw files
Attached Files

- Relationships

-  Notes
(0024227)
Button (reporter)
2013-11-25 10:26

Oh I should have mentioned, 4HEAD_HORN and 3HEAD_HORN_NUMBERED were/are both custom body tags of mine.

Update: changing the name of the 4HEAD_HORN custom BODY tag to 4HEAD_HORNS creates the illegal body tag 43HEAD_HORN_NUMBEREDS . So it's not just numbers that are disregarded - it's a 'contains' comparison when it should be an equality comparison.

Renaming the custom tag to 4HEAD__HORNS (two underscores) solves the problem.
(0024229)
Quietust (reporter)
2013-11-25 14:08

The problem is that it isn't requiring an exact match on the relevant token - when replacing HEAD_HORN with 3HEAD_HORN_NUMBERED, it changes 4HEAD_HORN to 43HEAD_HORN_NUMBERED.

It's also a problem with the order in which the replacements are being performed - if you put the 2HEAD_HORN -> 4HEAD_HORN one at the top, it might avoid the conflict.
(0024231)
Button (reporter)
2013-11-27 10:45

Upon further experimentation I have found that in fact, creature variation tags are applied in reverse order - from bottom to top.

I've been assuming this whole time that it would apply them from top to bottom, and creating my variations accordingly! This changes everything!
(0024279)
Footkerchief (manager)
2014-01-17 17:27

Given those revelations, I'm closing the report, but if you still consider this behavior a bug, feel free to reopen it. I'm on the fence.
(0024347)
Button (reporter)
2014-01-24 12:34

I think the partial token match issue still qualifies as a bug. Knowing the order in which variation tags are applied is nice, but the behavior is still there and could seriously trip up future creature raws.
(0031244)
Button (reporter)
2014-12-02 14:37
edited on: 2014-12-02 14:38

Update, this is definitely still an issue in 40.19. I modded in MAXAGE increases to the giant creature template. It scales up the maxages for giant creatures to at least 10 years, thus:

    [CV_CONVERT_TAG]
        [CVCT_MASTER:MAXAGE]
        [CVCT_TARGET:1]
        [CVCT_REPLACEMENT:10]
    [CV_CONVERT_TAG]
        [CVCT_MASTER:MAXAGE]
        [CVCT_TARGET:2]
        [CVCT_REPLACEMENT:10]

and so on. So, giant creatures belonging to base creatures with a 2-digit lifespan would receive maxages of 1010 years minimum, no matter how I order the conversions.


- Issue History
Date Modified Username Field Change
2013-11-25 09:49 Button New Issue
2013-11-25 09:50 Button Tag Attached: raw
2013-11-25 09:50 Button Tag Attached: raw file
2013-11-25 09:50 Button Tag Attached: raw files
2013-11-25 10:26 Button Note Added: 0024227
2013-11-25 10:26 Button Tag Attached: Probable Quick Fix
2013-11-25 14:08 Quietust Note Added: 0024229
2013-11-27 10:45 Button Note Added: 0024231
2014-01-17 10:33 Kirig Stonebeard Issue Monitored: Kirig Stonebeard
2014-01-17 17:26 Footkerchief Tag Detached: Probable Quick Fix
2014-01-17 17:26 Footkerchief Status new => resolved
2014-01-17 17:26 Footkerchief Resolution open => no change required
2014-01-17 17:26 Footkerchief Assigned To => Footkerchief
2014-01-17 17:27 Footkerchief Summary CV_CONVERT_TAG doesn't respect numbers in BODY tag => CV_CONVERT_TAG doesn't require an exact match; creature variations are applied in reverse order
2014-01-17 17:27 Footkerchief Note Added: 0024279
2014-01-24 12:34 Button Note Added: 0024347
2014-01-24 12:34 Button Status resolved => needs feedback
2014-01-24 12:34 Button Resolution no change required => reopened
2014-01-24 12:48 Footkerchief Tag Attached: Intentional/Expected?
2014-06-05 09:30 Footkerchief Status needs feedback => acknowledged
2014-12-02 14:37 Button Note Added: 0031244
2014-12-02 14:38 Button Note Edited: 0031244 View Revisions
2014-12-02 21:39 Footkerchief Status acknowledged => confirmed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker