Enemy insists on being friends
Moderator: Moderator
Enemy insists on being friends
I changed the faction to enemy but it keeps my faction. I also changed compassion from 10 to -100 (is this how well they think of me?). I got rid of where it tried to add them to my party.
What do I have to do to make it my enemy? its like duh I changed the faction code....
local m = require("mod.class.NPC").new(self:cloneFull{
no_drops = true, keep_inven_on_death = false,
faction = enemies,
summoner = self, summoner_gain_exp = false,
exp_worth = 1,
summon_time = t.getDuration(self, t),
ai_target = {actor=nil},
ai = "summoned", ai_real = "tactical",
ai_tactic = resolvers.tactic("ranged"), ai_state = { talent_in=1, ally_compassion=-100},
desc = [[The real you... or so ]]..sex..[[ says.]]
full at http://pastebin.com/zkCgnEvv
What do I have to do to make it my enemy? its like duh I changed the faction code....
local m = require("mod.class.NPC").new(self:cloneFull{
no_drops = true, keep_inven_on_death = false,
faction = enemies,
summoner = self, summoner_gain_exp = false,
exp_worth = 1,
summon_time = t.getDuration(self, t),
ai_target = {actor=nil},
ai = "summoned", ai_real = "tactical",
ai_tactic = resolvers.tactic("ranged"), ai_state = { talent_in=1, ally_compassion=-100},
desc = [[The real you... or so ]]..sex..[[ says.]]
full at http://pastebin.com/zkCgnEvv
Re: Enemy insists on being friends
image = "talents/cease_to_exist.png",
adding that one line to this talent, the only change made, has made ALL the talents' images just be white squares. I even got rid of this code and reloaded 3 times. "cease_to_exist" just made them all cease to exist. i added it the same way I add images to any talent, looked identical. how do I get my talent images back?
adding that one line to this talent, the only change made, has made ALL the talents' images just be white squares. I even got rid of this code and reloaded 3 times. "cease_to_exist" just made them all cease to exist. i added it the same way I add images to any talent, looked identical. how do I get my talent images back?
Re: Enemy insists on being friends
I think the icons will reappear with a new game.
You do not define an icon in the talent definition.
As for your original issue, I don't think you are supposed to have any arguments for cloneFull().
Make all the changes to the actor after its cloned.
You do not define an icon in the talent definition.
As for your original issue, I don't think you are supposed to have any arguments for cloneFull().
Make all the changes to the actor after its cloned.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Enemy insists on being friends
????
1.
yet the original code has the stuff there; i simply changed it from:
local m = require("mod.class.NPC").new(self:cloneFull{
no_drops = true, keep_inven_on_death = false,
faction = self.faction,
summoner = self, summoner_gain_exp=true,
exp_worth = 0,
summon_time = t.getDuration(self, t),
ai_target = {actor=nil},
ai = "summoned", ai_real = "tactical",
ai_tactic = resolvers.tactic("ranged"), ai_state = { talent_in=1, ally_compassion=10},
desc = [[The real you... or so ]]..sex..[[ says.]]
2.
This is orginal xorn code:
newTalent{
name = "Extract Delicious Gem Base",
short_name = "X_GEMS",
type = {"race/xornbase", 2},
image = "talents/extract_gems.png",
this is mine that works:
newTalent{
short_name = "HERE_THEY_COME",
name = "Here They Come",
type = {"race/Chrono_Xorn", 1},
image = "talents/vimsense.png",
among others that work.
but this one has caused something bad or the game just happened to break or get possessed at the same time:
newTalent{
short_name = "NEMESIS_X",
name = "Nemesis Clone",
type = {"race/Chrono_Xorn", 1},
image = "talents/cease_to_exist.png",
its the same thing!
I have tried 5 new games!!!!!! They are all white still and stay that way in all game screen where talents would show them!
1.
yet the original code has the stuff there; i simply changed it from:
local m = require("mod.class.NPC").new(self:cloneFull{
no_drops = true, keep_inven_on_death = false,
faction = self.faction,
summoner = self, summoner_gain_exp=true,
exp_worth = 0,
summon_time = t.getDuration(self, t),
ai_target = {actor=nil},
ai = "summoned", ai_real = "tactical",
ai_tactic = resolvers.tactic("ranged"), ai_state = { talent_in=1, ally_compassion=10},
desc = [[The real you... or so ]]..sex..[[ says.]]
2.
This is orginal xorn code:
newTalent{
name = "Extract Delicious Gem Base",
short_name = "X_GEMS",
type = {"race/xornbase", 2},
image = "talents/extract_gems.png",
this is mine that works:
newTalent{
short_name = "HERE_THEY_COME",
name = "Here They Come",
type = {"race/Chrono_Xorn", 1},
image = "talents/vimsense.png",
among others that work.
but this one has caused something bad or the game just happened to break or get possessed at the same time:
newTalent{
short_name = "NEMESIS_X",
name = "Nemesis Clone",
type = {"race/Chrono_Xorn", 1},
image = "talents/cease_to_exist.png",
its the same thing!
I have tried 5 new games!!!!!! They are all white still and stay that way in all game screen where talents would show them!
- Attachments
-
- whiteout.png (96.39 KiB) Viewed 1647 times
Re: Enemy insists on being friends
i added
m.faction = enemies
if that's the place you referred to, but it did nothing.
m.faction = enemies
if that's the place you referred to, but it did nothing.
Re: Enemy insists on being friends
How about m.faction = "enemies"
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Enemy insists on being friends
im gonna try that but i saw elsewhere like in temp hounds without the quotes.
Re: Enemy insists on being friends
lol well it makes it an enemy with a personal reaction of friendly 100 so enemy still insisting on being friends.
not sure why the quotes worked here yet in other talents I have seen them without the quotes.
i think i have to reinstall the game. my talent images seem permanently gone. programming logic: use talent image that says "cease to exist" and thats what they did.
i dont see lua errors in the log, they just wont load!
not sure why the quotes worked here yet in other talents I have seen them without the quotes.
i think i have to reinstall the game. my talent images seem permanently gone. programming logic: use talent image that says "cease to exist" and thats what they did.
i dont see lua errors in the log, they just wont load!
Re: Enemy insists on being friends
Maybe the other code you looked at was bad?
Have you tried running the game with no addons?

Have you tried running the game with no addons?
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Enemy insists on being friends
i ccleaned and restarted my computer and that fixed it. now the icons load including for the new talents. but how do I make the clone an enemy? I tried adding some ally comp 0 or -100 lines in m. but they didnt do it or i didnt do it right.
Re: Enemy insists on being friends
Should be m:setPersonalReaction(self, -100).
Ally compassion is what stops the AI nuking you when you are friendly.
Ally compassion is what stops the AI nuking you when you are friendly.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Enemy insists on being friends
This did not work here in this part of the code, still friendly:
m:removeAllMOs()
m:setPersonalReaction(self, -100)
m.make_escort = nil
m.on_added_to_level = nil
Still friendly!
and putting it down below also breaks it with an error message:
m.on_takehit = nil
m.faction = "enemies"
m.setPersonalReaction(self, -100)
m.no_inventory_access = true
m.clone_on_hit = nil
m.remove_from_party_on_death = nil
error says:
stack traceback:
[C]: in function 'error'
/engine/interface/ActorTalents.lua:148: in function </engine/interface/ActorTalents.lua:138>
Lua Error: /engine/interface/GameTargeting.lua:118: /engine/interface/ActorTalents.lua:148: /mod/class/NPC.lua:304: attempt to index local 'src' (a number value)
stack traceback:
/mod/class/NPC.lua:304: in function 'setPersonalReaction'
/data-Chrono_Xorn/talents/Chrono_Xorn.lua:751: in function </data-Chrono_Xorn/talents/Chrono_Xorn.lua:708>
[C]: in function 'xpcall'
/engine/interface/ActorTalents.lua:145: in function </engine/interface/ActorTalents.lua:138>
At [C]:-1
At [C]:-1 error
At /engine/interface/GameTargeting.lua:118 fct
At /engine/interface/GameTargeting.lua:124 targetMode
At /engine/interface/GameTargeting.lua:253 targetMouse
At /mod/class/Game.lua:2113 fct
At /engine/Mouse.lua:56
Is the problem that it is a talent set to target where to put the clone? I'd rather have the clone just appear anywhere like evil clone is supposed to but was not even getting to that point yet. it still insists on being a friend or gives error.
m:removeAllMOs()
m:setPersonalReaction(self, -100)
m.make_escort = nil
m.on_added_to_level = nil
Still friendly!
and putting it down below also breaks it with an error message:
m.on_takehit = nil
m.faction = "enemies"
m.setPersonalReaction(self, -100)
m.no_inventory_access = true
m.clone_on_hit = nil
m.remove_from_party_on_death = nil
error says:
stack traceback:
[C]: in function 'error'
/engine/interface/ActorTalents.lua:148: in function </engine/interface/ActorTalents.lua:138>
Lua Error: /engine/interface/GameTargeting.lua:118: /engine/interface/ActorTalents.lua:148: /mod/class/NPC.lua:304: attempt to index local 'src' (a number value)
stack traceback:
/mod/class/NPC.lua:304: in function 'setPersonalReaction'
/data-Chrono_Xorn/talents/Chrono_Xorn.lua:751: in function </data-Chrono_Xorn/talents/Chrono_Xorn.lua:708>
[C]: in function 'xpcall'
/engine/interface/ActorTalents.lua:145: in function </engine/interface/ActorTalents.lua:138>
At [C]:-1
At [C]:-1 error
At /engine/interface/GameTargeting.lua:118 fct
At /engine/interface/GameTargeting.lua:124 targetMode
At /engine/interface/GameTargeting.lua:253 targetMouse
At /mod/class/Game.lua:2113 fct
At /engine/Mouse.lua:56
Is the problem that it is a talent set to target where to put the clone? I'd rather have the clone just appear anywhere like evil clone is supposed to but was not even getting to that point yet. it still insists on being a friend or gives error.
Re: Enemy insists on being friends
m: not m.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Enemy STILL insists on being friends
yes, read again, its exactly what I tried first. i even put it in two places. it does nothing.
again:
local sex = game.player.female and "she" or "he"
local m = require("mod.class.NPC").new(self:cloneFull{
no_drops = true, keep_inven_on_death = false,
faction = enemies,
summoner = self, summoner_gain_exp = false,
exp_worth = 1,
summon_time = t.getDuration(self, t),
ai_target = {actor=nil},
ai = "summoned", ai_real = "tactical",
ai_tactic = resolvers.tactic("ranged"), ai_state = { talent_in=1, ally_compassion=-100},
desc = [[The real you... or so ]]..sex..[[ says.]]
})
m:removeAllMOs()
m:setPersonalReaction(self, -100)
m.make_escort = nil
m.on_added_to_level = nil
m.energy.value = 0
m.player = nil
m.puuid = nil
m.max_life = m.max_life
m.life = util.bound(m.life, 0, m.max_life)
m.forceLevelup = function() end
m.die = nil
m.on_die = nil
m.on_acquire_target = nil
m.seen_by = nil
m.can_talk = nil
m.on_takehit = nil
m.faction = "enemies"
m:setPersonalReaction(self, -100)
m.no_inventory_access = true
m.clone_on_hit = nil
m.remove_from_party_on_death = nil
---
i just did that over again, new code and new game, and pasted it here. enemy is still friendly.
again:
local sex = game.player.female and "she" or "he"
local m = require("mod.class.NPC").new(self:cloneFull{
no_drops = true, keep_inven_on_death = false,
faction = enemies,
summoner = self, summoner_gain_exp = false,
exp_worth = 1,
summon_time = t.getDuration(self, t),
ai_target = {actor=nil},
ai = "summoned", ai_real = "tactical",
ai_tactic = resolvers.tactic("ranged"), ai_state = { talent_in=1, ally_compassion=-100},
desc = [[The real you... or so ]]..sex..[[ says.]]
})
m:removeAllMOs()
m:setPersonalReaction(self, -100)
m.make_escort = nil
m.on_added_to_level = nil
m.energy.value = 0
m.player = nil
m.puuid = nil
m.max_life = m.max_life
m.life = util.bound(m.life, 0, m.max_life)
m.forceLevelup = function() end
m.die = nil
m.on_die = nil
m.on_acquire_target = nil
m.seen_by = nil
m.can_talk = nil
m.on_takehit = nil
m.faction = "enemies"
m:setPersonalReaction(self, -100)
m.no_inventory_access = true
m.clone_on_hit = nil
m.remove_from_party_on_death = nil
---
i just did that over again, new code and new game, and pasted it here. enemy is still friendly.
Re: Enemy insists on being friends


Maybe try a self:setPersonalReaction(m, -100) as well?
My feedback meter decays into coding. Give me feedback and I make mods.