Alchemist equipdoll location? and affinity question
Posted: Thu Feb 08, 2018 7:02 pm
I'm trying to add a head slot onto the alchemist golem. That's actually really easy :
The golem can now equip a helm. The issue is that there's no space in the character slot for it (makes it hard to unequip), which I assume means I'll need to change "equipdoll="alchemist_golem" section. However, I can't find where this alchemist_golem equip doll is located in the game files. I'm assuming it'll be quite easy to change once I find it, but I've been looking for 30 minutes to no avail.
Second question:
I want to change body of fire to give fire affinity, so I looked at ice core for inspiration but the structure of the relevant parts of the two spells is totally different. Will I need to totally change body of fire?
Ice core :
Body of fire:
Bonus question
Does anyone know what this is about?
Edit:
I've found where it's located : load.lua
Unfortunately, that feels really bad to mess around with. I tried overloading it and that works, equips it on the doll. How do I get the inventory slot to appear in the picture above that? (Overloading load.lua is definitely a bad idea though, so I'll be looking at other ways).
Is what I'm looking for attachement spot? The terminology is a little confusing.
Code: Select all
body = { INVEN = 1000, QS_MAINHAND = 1, QS_OFFHAND = 1, MAINHAND = 1, OFFHAND = 1, BODY=1, HEAD=1, GEM={max = 2, stack_limit = 1} },
canWearObjectCustom = function(self, o)
if o.type ~= "gem" then return end
if not self.summoner then return "Golem has no master" end
if not self.summoner:knowTalent(self.summoner.T_GEM_GOLEM) then return "Master must know the Gem Golem talent" end
if not o.material_level then return "impossible to use this gem" end
if o.material_level > self.summoner:getTalentLevelRaw(self.summoner.T_GEM_GOLEM) then return "Master's Gem Golem talent too low for this gem" end
end,
equipdoll = "alchemist_golem",
Second question:
I want to change body of fire to give fire affinity, so I looked at ice core for inspiration but the structure of the relevant parts of the two spells is totally different. Will I need to totally change body of fire?
Ice core :
Code: Select all
critResist = function(self, t) return self:combatTalentScale(t, 10, 50) end,
getResistance = function(self, t) return self:combatTalentSpellDamage(t, 5, 45) end,
getAffinity = function(self, t) return self:combatTalentLimit(t, 50, 5, 20) end, -- Limit <50%
activate = function(self, t)
game:playSoundNear(self, "talents/ice")
local ret = {}
self:addShaderAura("body_of_ice", "crystalineaura", {}, "particles_images/spikes.png")
ret.particle = self:addParticles(Particles.new("snowfall", 1))
self:talentTemporaryValue(ret, "resists", {[DamageType.PHYSICAL] = t.getResistance(self, t) * 0.6})
self:talentTemporaryValue(ret, "damage_affinity", {[DamageType.COLD] = t.getAffinity(self, t)})
self:talentTemporaryValue(ret, "ignore_direct_crits", t.critResist(self, t))
return ret
end,
deactivate = function(self, t, p)
self:removeParticles(p.particle)
self:removeShaderAura("body_of_ice")
return true
end,
Code: Select all
activate = function(self, t)
game:playSoundNear(self, "talents/fireflash")
game.logSeen(self, "#FF8000#%s turns into pure flame!", self.name:capitalize())
self:addShaderAura("body_of_fire", "awesomeaura", {time_factor=3500, alpha=1, flame_scale=1.1}, "particles_images/wings.png")
return {
onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.FIRE]=t.getFireDamageOnHit(self, t)}),
res = self:addTemporaryValue("resists", {[DamageType.FIRE] = t.getResistance(self, t)}),
}
end,
deactivate = function(self, t, p)
self:removeShaderAura("body_of_fire")
game.logSeen(self, "#FF8000#The raging fire around %s calms down and disappears.", self.name)
self:removeTemporaryValue("on_melee_hit", p.onhit)
self:removeTemporaryValue("resists", p.res)
return true
end,
Bonus question
Does anyone know what this is about?
Code: Select all
function getGolem(self)
if game.level:hasEntity(self.alchemy_golem) then
return self.alchemy_golem, self.alchemy_golem
elseif self:hasEffect(self.EFF_GOLEM_MOUNT) then
return self, self.alchemy_golem
end
Edit:
I've found where it's located : load.lua
Unfortunately, that feels really bad to mess around with. I tried overloading it and that works, equips it on the doll. How do I get the inventory slot to appear in the picture above that? (Overloading load.lua is definitely a bad idea though, so I'll be looking at other ways).
Is what I'm looking for attachement spot? The terminology is a little confusing.