• 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.X+ Invalid "countmax" 225 used for loot, the max allowed value is 100.

Jeyci

Banned User
Joined
May 6, 2023
Messages
289
Solutions
3
Reaction score
36
As title says. the problem is that sometimes the itemid with countmax 225 should be gold coins or something else. If the value is decreased to 100, players wont receive the "real" or desired amount 225. Is there a workaround for this? Thanks
Post automatically merged:

changing here wont cause problem?
if (lootCountMax > 1000) {
to
Lua:
    if (lootCountMax > 1000) {
edit: tried increasing values, but now I'm not receiving anything

Lua:
08:38 Loot of a grim reaper: nothing
08:38 Loot of a grim reaper: nothing
08:38 Loot of a grim reaper: nothing
08:38 Loot of a grim reaper: nothing
08:38 Loot of a grim reaper: nothing
08:38 Loot of a grim reaper: nothing
08:38 Loot of a grim reaper: nothing
08:38 Loot of a poison spider: nothing
08:44 Loot of a poison spider: nothing
Post automatically merged:

edit: i edited a part of the code
Lua:
        if (lootCountMax > 500) {
and it works cool the problem comes when i edit
Code:
const uint32_t MAX_LOOTCHANCE = 100000;
if i increase the value in here i can't loot
changed
Code:
const uint32_t MAX_LOOTCHANCE = 100000;
to
Code:
const uint64_t MAX_LOOTCHANCE = 1000000;
and it working strangely(not properly). items are not appearing mixed with gold and vice versa.
 
Last edited:
Solution
E
Solution
MAX_LOOTCHANCE has absolutely nothing to do with max item loot count and you should NOT change it

these are the changes you are looking for:
thank you. so to fix lootchange i must do in xml files then? there's no other way?
 
you don't need to fix lootchance at all lol, why are you changing it? its not broken
i mean, about the errors in console
Lua:
[Warning - Monsters::loadMonster] Invalid "chance" 100500 used for loot, the max is 100000.
[Warning - Monsters::loadMonster] Invalid "chance" 100500 used for loot, the max is 100000.
[Warning - Monsters::loadMonster] Invalid "chance" 387500 used for loot, the max is 100000.
[Warning - Monsters::loadMonster] Invalid "chance" 387500 used for loot, the max is 100000.
 
i mean, about the errors in console
Lua:
[Warning - Monsters::loadMonster] Invalid "chance" 100500 used for loot, the max is 100000.
[Warning - Monsters::loadMonster] Invalid "chance" 100500 used for loot, the max is 100000.
[Warning - Monsters::loadMonster] Invalid "chance" 387500 used for loot, the max is 100000.
[Warning - Monsters::loadMonster] Invalid "chance" 387500 used for loot, the max is 100000.
yes, each xml file need to me modified individually (or use a search&replace regular expression to make all values correct) as they are wrong, not the source code

100000 = 100%
any value higher than 100% doesn't make sense in loot therefore they are wrong

btw this is warning, not an error
 
Last edited by a moderator:
yes, each xml file need to me modified individually (or use a search&replace regular expression to make all values correct) as they are wrong, not the source code

100000 = 100%
any value higher than 100% doesn't make sense in loot therefore they are wrong

btw this is warning, not an error
right, thank
 
Back
Top