• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.2 Corpses declay time - need helpo

Umffa

New Member
Joined
Feb 1, 2024
Messages
8
Reaction score
1
Hello,

I've encountered a specific issue that I'm unable to solve on my own. Specifically, I can't find the part of the code where I can adjust the decay time for corpses (e.g., rats). In the engine I'm using, corpses disappear after 10 seconds. I've gone through enums.h and found ITEM_ATTRIBUTE_DECAYSTATE = 1 << 18, but I'm not certain this is the correct place.

Another idea I had was to look into configmanager.cpp and the line integer[MONSTERS_BEHAVIOR] = getGlobalNumber(L, "MONSTERS_BEHAVIOR", -1);

Could anyone offer some guidance?
 
Hello,

I've encountered a specific issue that I'm unable to solve on my own. Specifically, I can't find the part of the code where I can adjust the decay time for corpses (e.g., rats). In the engine I'm using, corpses disappear after 10 seconds. I've gone through enums.h and found ITEM_ATTRIBUTE_DECAYSTATE = 1 << 18, but I'm not certain this is the correct place.

Another idea I had was to look into configmanager.cpp and the line integer[MONSTERS_BEHAVIOR] = getGlobalNumber(L, "MONSTERS_BEHAVIOR", -1);

Could anyone offer some guidance?
without fact checking.. I'm pretty sure this is all handled in items.xml

and with some quick checking, yes, items.xml

XML:
    <item id="5964" article="a" name="dead rat">
        <attribute key="containerSize" value="10" />
        <attribute key="decayTo" value="3073" />
        <attribute key="duration" value="10" />
        <attribute key="corpseType" value="blood" />
        <attribute key="fluidSource" value="blood" />
    </item>
 
Hey, thank you for the quick response. It seems to me that it's still not the right place.


XML:
<item id="2813" article="a" name="dead rat">
        <attribute key="weight" value="6300" />
        <attribute key="containerSize" value="10" />
        <attribute key="decayTo" value="2814" />
        <attribute key="duration" value="9000" />
        <attribute key="corpseType" value="blood" />
        <attribute key="fluidSource" value="blood" />
    </item>
    <item id="2814" article="a" name="dead rat">
        <attribute key="weight" value="4400" />
        <attribute key="containerSize" value="10" />
        <attribute key="decayTo" value="2815" />
        <attribute key="duration" value="300" />
        <attribute key="corpseType" value="blood" />
    </item>
    <item id="2815" article="a" name="dead rat">
        <attribute key="weight" value="3000" />
        <attribute key="decayTo" value="2816" />
        <attribute key="duration" value="30" />
        <attribute key="corpseType" value="blood" />
    </item>
    <item id="2816" article="a" name="dead rat">
        <attribute key="weight" value="2000" />
        <attribute key="decayTo" value="0" />
        <attribute key="duration" value="30" />
        <attribute key="corpseType" value="blood" />
    </item>


Every other monster disappears in a similar way.
 
Hey, thank you for the quick response. It seems to me that it's still not the right place.


XML:
<item id="2813" article="a" name="dead rat">
        <attribute key="weight" value="6300" />
        <attribute key="containerSize" value="10" />
        <attribute key="decayTo" value="2814" />
        <attribute key="duration" value="9000" />
        <attribute key="corpseType" value="blood" />
        <attribute key="fluidSource" value="blood" />
    </item>
    <item id="2814" article="a" name="dead rat">
        <attribute key="weight" value="4400" />
        <attribute key="containerSize" value="10" />
        <attribute key="decayTo" value="2815" />
        <attribute key="duration" value="300" />
        <attribute key="corpseType" value="blood" />
    </item>
    <item id="2815" article="a" name="dead rat">
        <attribute key="weight" value="3000" />
        <attribute key="decayTo" value="2816" />
        <attribute key="duration" value="30" />
        <attribute key="corpseType" value="blood" />
    </item>
    <item id="2816" article="a" name="dead rat">
        <attribute key="weight" value="2000" />
        <attribute key="decayTo" value="0" />
        <attribute key="duration" value="30" />
        <attribute key="corpseType" value="blood" />
    </item>


Every other monster disappears in a similar way.
check monster folder, rat.xml

you'll see that the corpseId is 5964 not 2813-2816
 
Yeah look
10seconds and disapear.


Lua:
15:41 You see a dead rat (Vol:10).
Item ID: 5964
Decays to: 3073
Position: 32366, 32215, 7
15:41 You see a dead rat (Vol:10).
It weighs 63.00 oz.
Item ID: 2813
Decays to: 2814
Position: 32366, 32215, 7
15:41 You see a dead rat (Vol:10).
It weighs 63.00 oz.
Item ID: 2813
Decays to: 2814
Position: 32366, 32215, 7
15:41 You see a dead rat.
It weighs 44.00 oz.
Item ID: 2814
Decays to: 2815
Position: 32366, 32215, 7
 

Similar threads

Back
Top