Adding a point to Golem Resilience and replying "No" to the "Keep changes?" prompt when exiting the level up screen still adds the Armour Training and Thick Skin skills to your golem. Further, the process can be repeated endlessly without an upper bound on the levels of those skills. It only takes about 2 minutes to give yourself a golem with 70% resist all and 100% phys. crit. reduction at character level 4.
Edit:
Golem Power does the same thing with your golem's Combat Accuracy and Weapons Mastery skills. Add the points, click "No," and repeat as necessary for max accuracy and physical power.
Further edit:
If I understand LevelupDialog.lua correctly, a copy of the PC is made when the dialog starts. The copy is discarded if the player keeps their changes while the newly changed actor is discarded and the copy kept when exiting the level up screen without applying the changes. That is: click "Yes" and keep the new character, click "No" and keep the copy of the old one.
The problem occurs because adding points to these golemancy skills calls their on_learn functions which edit the golem's skills. The PC is copied, but the golem is not! And so the old PC keeps the new golem when changes are reverted.
I've also tested the case of killing the golem and reviving it with Refit Golem. It still keeps the changes. One possible fix would be to alter makeGolem to set the values of its skills from the alchemist's skill level, make a new one on level up, and replace the old one with the new. Actually, that sounds like an ugly kludge.
Anyway, on_learn modifies an actor other than self and on_unlearn is never called to remove those side effects. And Bob's your uncle.
[b42] Cancelling Golem Resilience doesn't
Moderator: Moderator
Re: [b42] Cancelling Golem Resilience doesn't
I've uploaded an addon that fixes thus bug. I'd have had this one fixed days ago but I misremembered/mistyped a variable name the first time around. Such is my genius.
For those interested, here are the changes:
For those interested, here are the changes:
Code: Select all
--- D:/games/!golem-fix/LevelupDialog.lua Sat Aug 18 09:33:10 2012
+++ D:/games/!golem-fix/overload/mod/dialogs/LevelupDialog.lua Fri Aug 31 15:57:20 2012
@@ -31,6 +31,23 @@
module(..., package.seeall, class.inherit(Dialog, mod.class.interface.TooltipsData))
+local function backup(original)
+ local bak = original:clone()
+ bak.uid = original.uid -- Yes ...
+ return bak
+end
+
+local function restore(dest, backup)
+ local bx, by = dest.x, dest.y
+ backup.replacedWith = false
+ dest:replaceWith(backup)
+ dest.replacedWith = nil
+ dest.x, dest.y = bx, by
+ dest.changed = true
+ dest:removeAllMOs()
+ if game.level and dest.x then game.level.map:updateMap(dest.x, dest.y) end
+end
+
function _M:init(actor, on_finish, on_birth)
self.on_birth = on_birth
actor.no_last_learnt_talents_cap = true
@@ -54,8 +71,8 @@
self.actor.__hidden_talent_types = self.actor.__hidden_talent_types or {}
self.actor.__increased_talent_types = self.actor.__increased_talent_types or {}
- self.actor_dup = actor:clone()
- self.actor_dup.uid = actor.uid -- Yes ...
+ self.actor_dup = backup(actor)
+ if actor.alchemy_golem then self.golem_dup = backup(actor.alchemy_golem) end
for _, v in pairs(game.engine.Birther.birth_descriptor_def) do
if v.type == "subclass" and v.name == actor.descriptor.subclass then self.desc_def = v break end
@@ -116,14 +133,8 @@
end
function _M:cancel()
- local ax, ay = self.actor.x, self.actor.y
- self.actor_dup.replacedWith = false
- self.actor:replaceWith(self.actor_dup)
- self.actor.replacedWith = nil
- self.actor.x, self.actor.y = ax, ay
- self.actor.changed = true
- self.actor:removeAllMOs()
- if game.level and self.actor.x then game.level.map:updateMap(self.actor.x, self.actor.y) end
+ restore(self.actor, self.actor_dup)
+ if self.golem_dup then restore(self.actor.alchemy_golem, self.golem_dup) end
end
function _M:getMaxTPoints(t)
- Attachments
-
- golem-fix.txt
- Patch file
- (1.9 KiB) Downloaded 221 times
Re: [b42] Cancelling Golem Resilience doesn't
Nice thanks !
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
