• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Item Attributes..

AbsoluteX

Learning Lua
Joined
Nov 9, 2009
Messages
121
Reaction score
3
Location
Australia
Hello,
When i add item attributes to a certain item they dont show..
Etc.
Code:
	<item id="2656" article="a" name="blue robe">
		<attribute key="weight" value="2200" />
		<attribute key="armor" value="11" />
		<attribute key="slotType" value="body" />
		<attribute key="absorbPercentElements" value="5" />		
	</item>

In-Game:
Code:
23:37 You see a blue robe (Arm:11, protection energy +5%, earth +5%).
It can only be wielded properly by sorcerers and druids of level 100 or higher.
It weighs 22.00 oz.

See? it only shows 2 of the 4(or 5? not sure if holy is included) but it still gives damage reduction for the other 2 elements (fire and ice)
I've tried doing it seperately, e.g: absorbPercentFire, Ice, Earth, Energy but it still only shows Energy and Earth In-Game.. I thought maybe it only shows 2 attributes by default but then i tried this:

Code:
	<item id="10016" article="a" name="batwing hat">
		<attribute key="weight" value="600" />
		<attribute key="armor" value="3" />
		<attribute key="slotType" value="head" />
		<attribute key="absorbPercentPhysical" value="5" />
		<attribute key="absorbPercentDeath" value="5" />
	</item>

But when i look In-Game it only shows Physical%.
I've tried adding <attribute key="showattributes" value="1" /> But that does nothing.
Does anyone know why?

Im using TFS 0.4 Rev 4225.
Thanks.
 
Maybe because your changing a whole different item?

Blue robe ingame and batwing hat in file?

Lol. I thought items were only able to show 2 attributes by default, so i tried with batwing hat and put only 2 attributes, but, only one of the two attributes show in-game, its like it only shows half of the attributes.. Blue Robe - 2/4 Attributes shown in-game, Batwing Hat - 1/2 Attributes shown in-game.
 
oi again mate, can you compile? try replacing lines 1165 to 1214 in item.cpp with this:
[cpp]//
int32_t show = it.abilities.absorb[COMBAT_FIRST];
for(uint32_t i = (COMBAT_FIRST + 1); i <= COMBAT_LAST; i++)
{
if(it.abilities.absorb == show)
continue;

show = 0;
break;
}

if(!show)
{
bool tmp = true;
for(uint32_t i = COMBAT_FIRST; i <= COMBAT_LAST; i++)
{
if(!it.abilities.absorb)
continue;

if(tmp)
{
if(begin)
{
begin = false;
s << " (";
}
else
s << ", ";

tmp = false;
s << "protection ";
}
else
s << ", ";

s << getCombatName((CombatType_t)i) << " " << std::showpos << it.abilities.absorb << std::noshowpos << "%";
}
}
else
{
if(begin)
{
begin = false;
s << " (";
}
else
s << ", ";

s << "protection all " << std::showpos << show << std::noshowpos << "%";
}[/cpp]
 
Back
Top