I have tried to program the skill skeleton achers with lua.
I have tried:
SKILL_SKELETON_ARCHERS
SKILL_Skeleton_ARCHERS
SKILL_RAISE_ARCHERS
PERK_SKELETON_ARCHERS
PERK_Skeleton_ARCHERS
PERK_RAISE_ARCHERS
None of these has worked. Has anyone programmed the skill If so what is the correct phrase?
Programming Skeleton Archers
- parcaleste
- Pit Lord
- Posts: 1207
- Joined: 06 Nov 2007
- Location: Sofia - Vulgaria
Re: Programming Skeleton Archers
I'm not good with this stuff and I don't understand, are you creating something? What is "the skill skeleton archers?"bkknight2602 wrote:I have tried to program the skill skeleton achers with lua.
I have tried:
SKILL_SKELETON_ARCHERS
SKILL_Skeleton_ARCHERS
SKILL_RAISE_ARCHERS
PERK_SKELETON_ARCHERS
PERK_Skeleton_ARCHERS
PERK_RAISE_ARCHERS
None of these has worked. Has anyone programmed the skill If so what is the correct phrase?
- parcaleste
- Pit Lord
- Posts: 1207
- Joined: 06 Nov 2007
- Location: Sofia - Vulgaria
-
- Pixie
- Posts: 100
- Joined: 23 May 2010
- Location: Texas
I'm trying to program the skill for Necro heroes. The code I have looks like this, but doesn't work for Skeleton Archers. I have even tried, as you will in the code, adding 61, which is the ID for PERK_Skeleton_ARCHERS in the editor documentation.
function TestMe()
playernames = GetPlayerHeroes(1);
HeroName = length(playernames) - 1;
for x = 1, 12 do
for y = 1, 3 do
GiveHeroSkill(playernames[HeroName], x);
end;
end;
sleep(10);
for x = 1, 4 do
GiveHeroWarMachine(playernames[HeroName], x);
end;
for x = 1, 8 do
GiveArtefact(playernames[HeroName], x + 35);
end;
GiveArtefact(playernames[HeroName], 21);
GiveArtefact(playernames[HeroName], 25);
if HasHeroSkill(playernames[HeroName], 13) then
GiveHeroSkill(playernames[HeroName], 13);
GiveHeroSkill(playernames[HeroName], 13);
GiveHeroSkill(playernames[HeroName], 13);
GiveHeroSkill(playernames[HeroName], PERK_HOLY_CHARGE);
GiveHeroSkill(playernames[HeroName], PERK_PRAYER);
GiveHeroSkill(playernames[HeroName], PERK_EXPERT_TRAINER);
GiveHeroSkill(playernames[HeroName], KNIGHT_FEAT_ABSOLUTE_CHARGE);
elseif HasHeroSkill(playernames[HeroName], 14) then
GiveHeroSkill(playernames[HeroName], 14);
GiveHeroSkill(playernames[HeroName], 14);
GiveHeroSkill(playernames[HeroName], 14);
GiveHeroSkill(playernames[HeroName], PERK_CONSUME_CORPSE);
GiveHeroSkill(playernames[HeroName], PERK_HELLFIRE);
GiveHeroSkill(playernames[HeroName], PERK_DEMONIC_STRIKE);
GiveHeroSkill(playernames[HeroName], DEMON_FEAT_ABSOLUTE_GATING);
elseif HasHeroSkill(playernames[HeroName], 15) then
GiveHeroSkill(playernames[HeroName], 15);
GiveHeroSkill(playernames[HeroName], 15);
GiveHeroSkill(playernames[HeroName], 15);
GiveHeroSkill(playernames[HeroName], PERK_RAISE_ARCHERS);--PERK_RAISE_ARCHERS);
GiveHeroSkill(playernames[HeroName], 62);--PERK_NO_REST_FOR_THE_WICKED);
GiveHeroSkill(playernames[HeroName], 63);--PERK_DEATH_SCREAM);
GiveHeroSkill(playernames[HeroName], 111);--NECROMANCER_FEAT_ABSOLUTE_FEAR);
elseif HasHeroSkill(playernames[HeroName], 16) then
GiveHeroSkill(playernames[HeroName], 16);
GiveHeroSkill(playernames[HeroName], 16);
GiveHeroSkill(playernames[HeroName], 16);
GiveHeroSkill(playernames[HeroName], PERK_MULTISHOT);
GiveHeroSkill(playernames[HeroName], PERK_SNIPE_DEAD);
GiveHeroSkill(playernames[HeroName], PERK_IMBUE_ARROW);
GiveHeroSkill(playernames[HeroName], RANGER_FEAT_ABSOLUTE_LUCK);
elseif HasHeroSkill(playernames[HeroName], 17) then
GiveHeroSkill(playernames[HeroName], 17);
GiveHeroSkill(playernames[HeroName], 17);
GiveHeroSkill(playernames[HeroName], 17);
GiveHeroSkill(playernames[HeroName], PERK_MAGIC_BOND);
GiveHeroSkill(playernames[HeroName], PERK_MELT_ARTIFACT);
GiveHeroSkill(playernames[HeroName], PERK_MAGIC_MIRROR);
GiveHeroSkill(playernames[HeroName], WIZARD_FEAT_ABSOLUTE_WIZARDY);
elseif HasHeroSkill(playernames[HeroName], 18) then
GiveHeroSkill(playernames[HeroName], 18);
GiveHeroSkill(playernames[HeroName], 18);
GiveHeroSkill(playernames[HeroName], 18);
GiveHeroSkill(playernames[HeroName], PERK_EMPOWERED_SPELLS);
GiveHeroSkill(playernames[HeroName], PERK_DARK_RITUAL);
GiveHeroSkill(playernames[HeroName], PERK_ELEMENTAL_VISION);
GiveHeroSkill(playernames[HeroName], WARLOCK_FEAT_ABSOLUTE_CHAINS);
end;
end;
By the way none of the "ultimate" perks/feats work either, but I figure the game will not allow those to be added by program. They can be added through the console add_skill nnn
function TestMe()
playernames = GetPlayerHeroes(1);
HeroName = length(playernames) - 1;
for x = 1, 12 do
for y = 1, 3 do
GiveHeroSkill(playernames[HeroName], x);
end;
end;
sleep(10);
for x = 1, 4 do
GiveHeroWarMachine(playernames[HeroName], x);
end;
for x = 1, 8 do
GiveArtefact(playernames[HeroName], x + 35);
end;
GiveArtefact(playernames[HeroName], 21);
GiveArtefact(playernames[HeroName], 25);
if HasHeroSkill(playernames[HeroName], 13) then
GiveHeroSkill(playernames[HeroName], 13);
GiveHeroSkill(playernames[HeroName], 13);
GiveHeroSkill(playernames[HeroName], 13);
GiveHeroSkill(playernames[HeroName], PERK_HOLY_CHARGE);
GiveHeroSkill(playernames[HeroName], PERK_PRAYER);
GiveHeroSkill(playernames[HeroName], PERK_EXPERT_TRAINER);
GiveHeroSkill(playernames[HeroName], KNIGHT_FEAT_ABSOLUTE_CHARGE);
elseif HasHeroSkill(playernames[HeroName], 14) then
GiveHeroSkill(playernames[HeroName], 14);
GiveHeroSkill(playernames[HeroName], 14);
GiveHeroSkill(playernames[HeroName], 14);
GiveHeroSkill(playernames[HeroName], PERK_CONSUME_CORPSE);
GiveHeroSkill(playernames[HeroName], PERK_HELLFIRE);
GiveHeroSkill(playernames[HeroName], PERK_DEMONIC_STRIKE);
GiveHeroSkill(playernames[HeroName], DEMON_FEAT_ABSOLUTE_GATING);
elseif HasHeroSkill(playernames[HeroName], 15) then
GiveHeroSkill(playernames[HeroName], 15);
GiveHeroSkill(playernames[HeroName], 15);
GiveHeroSkill(playernames[HeroName], 15);
GiveHeroSkill(playernames[HeroName], PERK_RAISE_ARCHERS);--PERK_RAISE_ARCHERS);
GiveHeroSkill(playernames[HeroName], 62);--PERK_NO_REST_FOR_THE_WICKED);
GiveHeroSkill(playernames[HeroName], 63);--PERK_DEATH_SCREAM);
GiveHeroSkill(playernames[HeroName], 111);--NECROMANCER_FEAT_ABSOLUTE_FEAR);
elseif HasHeroSkill(playernames[HeroName], 16) then
GiveHeroSkill(playernames[HeroName], 16);
GiveHeroSkill(playernames[HeroName], 16);
GiveHeroSkill(playernames[HeroName], 16);
GiveHeroSkill(playernames[HeroName], PERK_MULTISHOT);
GiveHeroSkill(playernames[HeroName], PERK_SNIPE_DEAD);
GiveHeroSkill(playernames[HeroName], PERK_IMBUE_ARROW);
GiveHeroSkill(playernames[HeroName], RANGER_FEAT_ABSOLUTE_LUCK);
elseif HasHeroSkill(playernames[HeroName], 17) then
GiveHeroSkill(playernames[HeroName], 17);
GiveHeroSkill(playernames[HeroName], 17);
GiveHeroSkill(playernames[HeroName], 17);
GiveHeroSkill(playernames[HeroName], PERK_MAGIC_BOND);
GiveHeroSkill(playernames[HeroName], PERK_MELT_ARTIFACT);
GiveHeroSkill(playernames[HeroName], PERK_MAGIC_MIRROR);
GiveHeroSkill(playernames[HeroName], WIZARD_FEAT_ABSOLUTE_WIZARDY);
elseif HasHeroSkill(playernames[HeroName], 18) then
GiveHeroSkill(playernames[HeroName], 18);
GiveHeroSkill(playernames[HeroName], 18);
GiveHeroSkill(playernames[HeroName], 18);
GiveHeroSkill(playernames[HeroName], PERK_EMPOWERED_SPELLS);
GiveHeroSkill(playernames[HeroName], PERK_DARK_RITUAL);
GiveHeroSkill(playernames[HeroName], PERK_ELEMENTAL_VISION);
GiveHeroSkill(playernames[HeroName], WARLOCK_FEAT_ABSOLUTE_CHAINS);
end;
end;
By the way none of the "ultimate" perks/feats work either, but I figure the game will not allow those to be added by program. They can be added through the console add_skill nnn
I see, so you want all Necros to Raise Archers. Just a guess but have you tried editing the main Necromancy code? Maybe that is overriding?
One sort of related note. An odd thing happened after I edited one Hero; I created a map and gave Lethos Necromancy (within the Editor) . Then later, when playing the map, all Dungeon Heroes had a chance to learn Necromancy.![smile_teeth :D](/forums/images/smilies/smile_teeth.gif)
One sort of related note. An odd thing happened after I edited one Hero; I created a map and gave Lethos Necromancy (within the Editor) . Then later, when playing the map, all Dungeon Heroes had a chance to learn Necromancy.
![smile_teeth :D](/forums/images/smilies/smile_teeth.gif)
-
- Pixie
- Posts: 100
- Joined: 23 May 2010
- Location: Texas
The function is used for all new hires. I don't know what you mean by
"main Necromancy code"
On another side note, have you or anyone else ever coded a combat?
I have tried but I keep getting error message when code is compiled at the start of any map that the particular code doesn't exist. Not in those words but basically then same.
The script I tries t use was Start(), Prepare() and AddCreature(side, type, number, x, y)
"main Necromancy code"
On another side note, have you or anyone else ever coded a combat?
I have tried but I keep getting error message when code is compiled at the start of any map that the particular code doesn't exist. Not in those words but basically then same.
The script I tries t use was Start(), Prepare() and AddCreature(side, type, number, x, y)
You are light-years ahead of me on this stuff, so keep that in mind. What I mean by the main-Nec-code would be how the base skill operates for any Necromancer by default.bkknight2602 wrote:The function is used for all new hires. I don't know what you mean by
"main Necromancy code"
As I've understood you, you're looking to script a Hero? Is that correct?
I'm just wondering if maybe making a Mod by rewriting the base XDB to place into the Data folder might be the way to go?
I shared this little bit because I've tried to make changes inside the Editor at times but whatever I selected (like music) would not override the default, even though I was instructing the game to do something different. I was wondering if it was the same sort of thing, you're writing a script but the default is overriding your effort? Just thinking out loud and hoping it might spark an idea for you, etc.
Who is online
Users browsing this forum: Bing [Bot] and 3 guests