• 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!

Solved Decay duration attribute problems #lua #cpp #tfs1.1

Blackheart OT

Defense in depth
Joined
Nov 21, 2014
Messages
26
Reaction score
2
Location
USA
Hello fellow developer,

I am running TFS 1.1 on a Windows machine. Using the latest nightly compile binaries (#581).

Let me start by explaining the problem: For items with duration set in /data/items/items.xml, attribute "duration" in seconds, the game correctly displays the duration time, however it decays them at the rate of 1 minute = 1 second. As an example, an item with "duration" = 60, would decay in 1 second, where I would expect it to decay in 60 seconds.

I tried browsing through game.cpp file, and say that every 250 ms the game checks all decay items for expiration, here it assumes that the duration variable is in ms, and this is correct since in Item::setID the duration is multiplied by 1000. The error does not appear to be here.

Ive also tried searching through the lua scripts on the server, and I cant find anything that loads items.xml. It seems that only luascript.cpp does this, and that those are the values used by Game and Item objects.

I would sincerely appreciate your help, and rep you accordingly.

-Mike
 
The nightly builds is not always up-to-date.

You need to download the latest source code and compile it.

Thank you very much Ninja, I guess the wasted time fits me right for having been lazy in the first place.

If anyone else is having this issue, compiling the distribution yourself might help!
 
Back
Top