Programming Skeleton Archers

The new Heroes games produced by Ubisoft. Please specify which game you are referring to in your post.
bkknight2602
Pixie
Pixie
Posts: 100
Joined: 23 May 2010
Location: Texas

Programming Skeleton Archers

Unread postby bkknight2602 » 06 Oct 2013, 00:56

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?

User avatar
parcaleste
Pit Lord
Pit Lord
Posts: 1207
Joined: 06 Nov 2007
Location: Sofia - Vulgaria

Unread postby parcaleste » 06 Oct 2013, 07:29

This the cheat for adding a skill? If you have TotE it's not working, and the cheat for Mark Of The Necromancer I couldn't find.

User avatar
markkur
Demon
Demon
Posts: 335
Joined: 14 Oct 2011

Re: Programming Skeleton Archers

Unread postby markkur » 06 Oct 2013, 14:59

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?
I'm not good with this stuff and I don't understand, are you creating something? What is "the skill skeleton archers?"

User avatar
parcaleste
Pit Lord
Pit Lord
Posts: 1207
Joined: 06 Nov 2007
Location: Sofia - Vulgaria

Unread postby parcaleste » 06 Oct 2013, 17:39

SKELETON_ARCHERS was the skill needed in the original Heroes V and and the HoF expansion, needed to raise Skeleton Archers, instead of regular Skeletons.

bkknight2602
Pixie
Pixie
Posts: 100
Joined: 23 May 2010
Location: Texas

Unread postby bkknight2602 » 06 Oct 2013, 18:38

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

User avatar
markkur
Demon
Demon
Posts: 335
Joined: 14 Oct 2011

Unread postby markkur » 08 Oct 2013, 15:38

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. :D

bkknight2602
Pixie
Pixie
Posts: 100
Joined: 23 May 2010
Location: Texas

Unread postby bkknight2602 » 08 Oct 2013, 21:49

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)

User avatar
markkur
Demon
Demon
Posts: 335
Joined: 14 Oct 2011

Unread postby markkur » 11 Oct 2013, 18:03

bkknight2602 wrote:The function is used for all new hires. I don't know what you mean by
"main Necromancy code"
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.

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.


Return to “Heroes V-VI”

Who is online

Users browsing this forum: No registered users and 39 guests