Page 1 of 1

[1.6.0 + orcs 1.0.5] Innovation will cause item bug

Posted: Fri Oct 25, 2019 10:24 am
by starsapphire
Innovation is a talent in Orcs DLC, that will increase equipments you wear's stats by a percent.
However, if you wear an equipment with innovation, then hand it to another actor, it will cause a bug when take off it.

Steps to reproduce:
Let an actor learn Innovation.
Wear an equipment with master/steamtech power source.
Take it off and hand it to another actor (i.e. your golem)
Order another actor it to wear it, then take off it. The bug occured.

This will also occur to enemies' drop if the enemy have Innovation, which will be common for steam classes.
The equipment will be lost permanently in this process. If you are using another equipment to replace it, both equipment will be lost.

When we investigate into the code about this talent in `tome-orcs/superload/mod/class/Actor.lua`

Code: Select all

--- Call when an object is taken off
local onTakeoff = _M.onTakeoff
function _M:onTakeoff(o, inven_id, bypass_set)
	onTakeoff(self, o, inven_id, bypass_set)

	if o.__innovation_adds then
		o:tableTemporaryValuesRemove(o.__innovation_adds)
	end
end
`__innovation_adds` is will the code store the temporary stats provided by innovation. However, on taking off this equipment, it will remove the temporary stats, but not `__innovation_adds` property itself.
Then, when another actor trying to wear off it, it will trying to remove an non-exist temporary value. This attempt will trigger an error, and the equipment will be lost.

Re: [1.6.0 + orcs 1.0.5] Innovation will cause item bug

Posted: Thu Nov 28, 2019 2:44 pm
by starsapphire
This bug is still in 1.6.4 + orcs 1.1.3
Aside from the loot from enemies with innovation, Annihilator would also be a victim during normal gameplay, since it both have Innovation as class talent, and a permanent summon that can wear equipments (mecharachnid).

Re: [1.6.0 + orcs 1.0.5] Innovation will cause item bug

Posted: Thu Nov 28, 2019 6:44 pm
by GlassGo
Thaks, will be careful with this untill it get fix.