View Issue Details

IDProjectCategoryView StatusLast Update
0006393Dwarf FortressCreaturespublic2014-12-02 21:39
ReporterButton Assigned Touser6 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionreopened 
Product Version0.34.11 
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

Activities

Button

2013-11-25 10:26

reporter   ~0024227

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.

Quietust

2013-11-25 14:08

reporter   ~0024229

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.

Button

2013-11-27 10:45

reporter   ~0024231

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!

user6

2014-01-17 17:27

  ~0024279

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.

Button

2014-01-24 12:34

reporter   ~0024347

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.

Button

2014-12-02 14:37

reporter   ~0031244

Last edited: 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.

Add Note

Note

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 17:26 user6 Tag Detached: Probable Quick Fix
2014-01-17 17:26 user6 Status new => resolved
2014-01-17 17:26 user6 Resolution open => no change required
2014-01-17 17:26 user6 Assigned To => user6
2014-01-17 17:27 user6 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 user6 Note Added: 0024279
2014-01-24 12:34 Button Note Added: 0024347
2014-01-24 12:34 Button Status resolved => feedback
2014-01-24 12:34 Button Resolution no change required => reopened
2014-01-24 12:48 user6 Tag Attached: Intentional/Expected?
2014-06-05 09:30 user6 Status feedback => acknowledged
2014-12-02 14:37 Button Note Added: 0031244
2014-12-02 14:38 Button Note Edited: 0031244
2014-12-02 21:39 user6 Status acknowledged => confirmed