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

Fixing Devileye

Hultin

Member
Joined
Dec 2, 2008
Messages
262
Reaction score
17
There is a crossbow called Devileye, it's the only item I know of that has -hit%, this reflects oddly in the game. It shows up as +0% hit instead of -20%.

I now wonder how to correct this error?
 
items.cpp
Code:
			else if(tmpStrValue == "hitchance")
			{
				if(readXMLInteger(itemAttributesNode, "value", intValue))
					it.hitChance = [B][COLOR="Red"]std::max(0[/COLOR][/B], std::min(100, intValue)[B][COLOR="Red"])[/COLOR][/B];
			}
It's bugged because of this, it prevents it from being lower than 0 :p

However if you remove this, it would probably never hit because it can't be lower than 0.
To achieve the real effect you would have to put it to 70 (because default hitchance for ammo is 90), even though it would be misleading for the player :p

One last thing, you must change maxHitChance, and not hitChance
 
Last edited:
Hum.. Thought this might be a fairly easy fix but aparantly it's not.. I should perhaps remove it from the game instead to avoid confusion.
 
Back
Top