Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005690Dwarf FortressCombat -- Target Selectionpublic2012-03-22 11:322012-03-28 04:49
Reporternarhiril 
Assigned ToToady One 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version0.34.05 
Target VersionFixed in Version0.34.07 
Summary0005690: Interactions do not recognize valid targets when CE_ADD_TAG is used.
DescriptionTokens added or removed by syndromes are not acknowledged by interaction target tokens. For example. adding a token through a curse (i.e. a vampire's BLOODSUCKER) and then specifying [IT_REQUIRES:BLOODSUCKER] in another interaction will not allow the interaction to target the vampire, even though the condition is met.
Steps To ReproduceAdd the following raws to an interaction file:


[INTERACTION:SELF_ADD_REMOVE_TAG]
    [I_SOURCE:CREATURE_ACTION]
    [I_TARGET:A:CREATURE]
        [IT_AFFECTED_CLASS:GENERAL_POISON]
        [IT_LOCATION:CONTEXT_CREATURE]
        [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
        [IT_MANUAL_INPUT:target]
    [I_EFFECT:ADD_SYNDROME]
        [IE_TARGET:A]
        [IE_IMMEDIATE]
        [SYNDROME]
            [SYN_NAME:add/remove tags]
            [CE_ADD_TAG:MISCHIEVOUS:START:0]
            [CE_REMOVE_TAG:TRANCES:START:0]



[INTERACTION:TEST_ADD_TAG]
    [I_SOURCE:CREATURE_ACTION]
    [I_TARGET:A:CREATURE]
        [IT_LOCATION:CONTEXT_CREATURE]
        [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
        [IT_MANUAL_INPUT:target]
        [IT_REQUIRES:MISCHIEVOUS]
    [I_EFFECT:ADD_SYNDROME]
        [IE_TARGET:A]
        [IE_IMMEDIATE]
        [SYNDROME]
            [SYN_CLASS:EXPOSE_LFR]
            [SYN_NAME:add tag test result]
            [CE_DISPLAY_NAME:NAME:(added):(added):test:START:0]


[INTERACTION:TEST_REMOVE_TAG]
    [I_SOURCE:CREATURE_ACTION]
    [I_TARGET:A:CREATURE]
        [IT_LOCATION:CONTEXT_CREATURE]
        [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
        [IT_MANUAL_INPUT:target]
        [IT_FORBIDDEN:TRANCES]
    [I_EFFECT:ADD_SYNDROME]
        [IE_TARGET:A]
        [IE_IMMEDIATE]
        [SYNDROME]
            [SYN_CLASS:EXPOSE_LFR]
            [SYN_NAME:remove tag test result]
            [CE_DISPLAY_NAME:NAME:(removed):(removed):test:START:0]


...

Add the following to dwarves:

[CAN_DO_INTERACTION:SELF_ADD_REMOVE_TAG]
    [CDI:ADV_NAME:Add mischievous, remove trances]
    [CDI:TARGET:A:SELF_ONLY]
    [CDI:TARGET_RANGE:A:1]
    [CDI:WAIT_PERIOD:5]
[CAN_DO_INTERACTION:TEST_ADD_TAG]
    [CDI:ADV_NAME:Test for mischievous addition]
    [CDI:TARGET:A:SELF_ONLY]
    [CDI:WAIT_PERIOD:5]
[CAN_DO_INTERACTION:TEST_REMOVE_TAG]
    [CDI:ADV_NAME:Test for trances removal]
    [CDI:TARGET:A:SELF_ONLY]
    [CDI:WAIT_PERIOD:5]


...

Open up arena or adventure mode, control a dwarf, and use the interactions in descending order. Even though the MISCHIEVOUS tag was added and the TRANCES tag was removed (using CE_ADD_TAG and CE_REMOVE_TAG) by the first interaction, the second and third interactions fail to recognize the change.
Additional InformationI know this is not the most interesting bug in the world, but as a modder, this breaks my heart. With this working properly, I would be able to make vampire hunters, spies disguised as your civilization's members, dwarves that signal when they require a healing interaction, and oh so much more.
Tagsinteraction, modding, syndrome, tag
Attached Files

- Relationships

-  Notes
(0021663)
narhiril (reporter)
2012-03-22 11:40

There wasn't an "interaction" or "token" category, so I picked "combat: target selection" since I thought that was closest. Hopefully I didn't screw that up too badly.
(0021664)
narhiril (reporter)
2012-03-22 13:00
edited on: 2012-03-22 13:00

http://dffd.wimbli.com/file.php?id=5968 [^]

Uploaded a region with the changes stated above. Fire up arena or adventure mode as a dwarf to reproduce the bug.


- Issue History
Date Modified Username Field Change
2012-03-22 11:32 narhiril New Issue
2012-03-22 11:35 narhiril Tag Attached: modding
2012-03-22 11:35 narhiril Tag Attached: syndrome
2012-03-22 11:35 narhiril Tag Attached: tag
2012-03-22 11:35 narhiril Tag Attached: interaction
2012-03-22 11:40 narhiril Note Added: 0021663
2012-03-22 12:59 narhiril Issue Monitored: narhiril
2012-03-22 12:59 narhiril Issue End Monitor: narhiril
2012-03-22 13:00 narhiril Note Added: 0021664
2012-03-22 13:00 narhiril Note Edited: 0021664 View Revisions
2012-03-28 04:49 Toady One Status new => resolved
2012-03-28 04:49 Toady One Fixed in Version => Next Version
2012-03-28 04:49 Toady One Resolution open => fixed
2012-03-28 04:49 Toady One Assigned To => Toady One


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker