newTalent{
name = "Reshape Weapon/Armour", image = "talents/reshape_weapon.png",
type = {"psionic/finer-energy-manipulations", 2},
what is the name of that talent?
because trying to find out its name... NONE OF THESE WORK:
THEY ALL GIVE A TABLE NIL VALUE OR FAIL TO PERFORM ARITHMETIC (the slash divide causes that one):
[ActorTalents.T_RESHAPE_WEAPON/ARMOUR] = 1,
[ActorTalents.T_RESHAPE_WEAPON_ARMOUR] = 1,
[ActorTalents.T_RESHAPE_WEAPON] = 1,
[ActorTalents.T_RESHAPE_WEAPON_/_ARMOUR] = 1,
[ActorTalents.T_RESHAPE_WEAPONARMOUR] = 1,
so even trying to add it into a simple birth class fails.
it took me a while to realize i left out the U but it still doesnt work.
trying to copy the talent exactly as it is into a talent file and just rename it also fails with same errors (which happens to most talents I try to do anything with, these table nil errors).
What is the Name of the Reshape Weapon/Armour Talent? REALLY
Moderator: Moderator
Re: What is the Name of the Reshape Weapon/Armour Talent? RE
Its "Reshape Weapon/Armour", but that isn't actually what you want to know.
The id is "T_RESHAPE_WEAPON/ARMOUR", to enter it in a way the code understands, you can't use the self.T_... notation, you have to use self["T_RESHAPE_WEAPON/ARMOUR"].
Although "T_RESHAPE_WEAPON/ARMOUR" might also work.
The id is "T_RESHAPE_WEAPON/ARMOUR", to enter it in a way the code understands, you can't use the self.T_... notation, you have to use self["T_RESHAPE_WEAPON/ARMOUR"].
Although "T_RESHAPE_WEAPON/ARMOUR" might also work.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: What is the Name of the Reshape Weapon/Armour Talent? RE
hmm, keeps wanting to make the slash a math if i follow the same format as other talents in birth class
these all work:
[ActorTalents.T_WEAPON_FOLDING] = 1,
[ActorTalents.T_SPIN_FATE] = 1,
[ActorTalents.T_MATTER_WEAVING] = 1,
[ActorTalents.T_STONE_SKIN] = 1,
but the slash makes that name fail.
[ActorTalents."T_RESHAPE_WEAPON/ARMOUR"] = 1,
?
that didnt work.
other codes like
game.player:learnTalent(game.player.T_RESHAPE_WEAPON/ARMOUR, true, 1)
that work certain places for other talents also did not work for this precause of the slash
well i managed to stick the relevant code in a different talent now so solved but thx / curious.
these all work:
[ActorTalents.T_WEAPON_FOLDING] = 1,
[ActorTalents.T_SPIN_FATE] = 1,
[ActorTalents.T_MATTER_WEAVING] = 1,
[ActorTalents.T_STONE_SKIN] = 1,
but the slash makes that name fail.
[ActorTalents."T_RESHAPE_WEAPON/ARMOUR"] = 1,
?
that didnt work.
other codes like
game.player:learnTalent(game.player.T_RESHAPE_WEAPON/ARMOUR, true, 1)
that work certain places for other talents also did not work for this precause of the slash
well i managed to stick the relevant code in a different talent now so solved but thx / curious.
-
- Uruivellas
- Posts: 708
- Joined: Wed Apr 30, 2008 5:55 pm
Re: What is the Name of the Reshape Weapon/Armour Talent? RE
Due to various reasons, you can just use the string in place of the talent id like that.
Behind the scenes, ActorTalents.T_WEAPON_FOLDING resolves to "T_WEAPON_FOLDING".
So you can just do T_WEAPON_FOLDING = 1, etc.
In lua, A.B is just shorthand for A["B"]. But for something like A.B/C, you can't use the shorthand, because it thinks you're trying to divide A.B with C. But the quotes in the longhand fix that: A["B/C"].
Behind the scenes, ActorTalents.T_WEAPON_FOLDING resolves to "T_WEAPON_FOLDING".
So you can just do T_WEAPON_FOLDING = 1, etc.
You can't do ." like that. Instead you want [ActorTalents["T_RESHAPE_WEAPON/ARMOUR"]] = 1,xnd wrote:[ActorTalents."T_RESHAPE_WEAPON/ARMOUR"] = 1,
In lua, A.B is just shorthand for A["B"]. But for something like A.B/C, you can't use the shorthand, because it thinks you're trying to divide A.B with C. But the quotes in the longhand fix that: A["B/C"].
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated.
Currently working on Elementals. It's a big project, so any help would be appreciated.

Re: What is the Name of the Reshape Weapon/Armour Talent? RE
thanks for info.
that does add it (i had typed that but thought it didnt work since it greyed out the code in the quotes just as the other quotes try did : P).
well its better where i stuck the shaping code, if it functions, since in class file it brings with it telekinetic grasp stuff.
that does add it (i had typed that but thought it didnt work since it greyed out the code in the quotes just as the other quotes try did : P).
well its better where i stuck the shaping code, if it functions, since in class file it brings with it telekinetic grasp stuff.
Re: What is the Name of the Reshape Weapon/Armour Talent? RE
That's what I said.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: What is the Name of the Reshape Weapon/Armour Talent? RE
i looked in combat.lua like you said for superpower and also noticed the reshape there!:
--- Gets the 'power' portion of the damage
function _M:combatDamagePower(weapon_combat, add)
if not weapon_combat then return 1 end
local power = math.max((weapon_combat.dam or 1) + (add or 0), 1)
if self:knowTalent(self["T_RESHAPE_WEAPON/ARMOUR"]) then power = power + self:callTalent(self["T_RESHAPE_WEAPON/ARMOUR"], "getDamBoost", weapon_combat) end
return (math.sqrt(power / 10) - 1) * 0.5 + 1
end
So, then i'd assume the code for the talent that I copied and put in another talent isnt enough to make it work because I would also have to alter the combat lua (which im not gonna try to attempt) with the name of that new talent?
this is troublesome if whenever I copied any talent code to make a new talent, there is other code elsewhere keyed to the name of the original talent and so i may have talents that part work or dont work. would it work to then just grab this code also and stick it in the talent itself?! probably not?
--- Gets the 'power' portion of the damage
function _M:combatDamagePower(weapon_combat, add)
if not weapon_combat then return 1 end
local power = math.max((weapon_combat.dam or 1) + (add or 0), 1)
if self:knowTalent(self["T_RESHAPE_WEAPON/ARMOUR"]) then power = power + self:callTalent(self["T_RESHAPE_WEAPON/ARMOUR"], "getDamBoost", weapon_combat) end
return (math.sqrt(power / 10) - 1) * 0.5 + 1
end
So, then i'd assume the code for the talent that I copied and put in another talent isnt enough to make it work because I would also have to alter the combat lua (which im not gonna try to attempt) with the name of that new talent?
this is troublesome if whenever I copied any talent code to make a new talent, there is other code elsewhere keyed to the name of the original talent and so i may have talents that part work or dont work. would it work to then just grab this code also and stick it in the talent itself?! probably not?
-
- Halfling
- Posts: 86
- Joined: Thu Jul 16, 2015 4:46 am
Re: What is the Name of the Reshape Weapon/Armour Talent? RE
Dumb question, where do I find and read the code?
Re: What is the Name of the Reshape Weapon/Armour Talent? RE
...so looks like I have to actually make a combat.lua in superload/mod/class/interface ?? and add my talents in that so it adds the code to the combat.lua?
i thought the game would error me if stuff wasnt working. i have various things, like code from carbon spikes, which are also noted in the combat.lua, so i guess talents ive made are not actually functioning? i wonder where else things might be mentioned.
---
"Dumb question, where do I find and read the code?"
assuming thats not said because of me basically asking the same thing,
its like here
C:\Users\Admin\Downloads\t-engine4-windows-1.3.1\t-engine4-windows-1.3.1\game
wherever you have the game.
a file like te4-1.3.1.teae is you rename it with .zip and then unzip the code and open it in like notepad++ free program you can get.
and then you make this face
i thought the game would error me if stuff wasnt working. i have various things, like code from carbon spikes, which are also noted in the combat.lua, so i guess talents ive made are not actually functioning? i wonder where else things might be mentioned.
---
"Dumb question, where do I find and read the code?"
assuming thats not said because of me basically asking the same thing,
its like here
C:\Users\Admin\Downloads\t-engine4-windows-1.3.1\t-engine4-windows-1.3.1\game
wherever you have the game.
a file like te4-1.3.1.teae is you rename it with .zip and then unzip the code and open it in like notepad++ free program you can get.
and then you make this face
