• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Update the skills

Status
Not open for further replies.

Ira

Ira

Level 4
Joined
Apr 18, 2016
Messages
104
if you are without warcraft anyways what do you really need the guide for? planing ahead? relearning abilitys is really cheap is the latest versions you can just reskill everytime you need something diffrent.
 
Level 6
Joined
May 20, 2014
Messages
228
I'd totally be up for updating the guide, if someone wants me to. It wouldn't take me long to figure out the skills/talents, if Alex is inactive (he hasn't logged on for a month or so), and I'm super bored anyway. I'd probably need to ask him for permission to use his format though.
 
Level 7
Joined
Aug 23, 2014
Messages
208
To be honest, abilities guide is pretty hard to maintain atm. I just do not have enough time for it (work, business trips, personal life, other games, etc :)
That's why I making a Perl script which will generate guide automatically. I will share it in guide thread, so anybody can use it later if I disappear for long time :)
Code:
#!/usr/bin/env perl
no warnings 'experimental::smartmatch';

my $r = {};
my $ih = do 'hero_id.ini';
my $iz = do 'target_types.ini';
my $il = do 'ability_levels.ini';
my $ii = do 'icons.ini';
my $ia = do 'ability_data.ini';
my $cfg = do 'convert.cfg';
my $ability_regex = $cfg->{ability_regex};

#
# Take these lines from war3map.j
#
open FILE, "<ability_init_calls.txt" or die;
    while (<FILE>) {
        s/[\(|\)]//g;
        s/$ability_regex//;
        my $t = $1;
        my $f = [ grep { s/\'//g; 1 } split ',' ];
        if ( $t eq $cfg->{basic_ability_function_name} ) {
            $r->{$ih->{$f->[0]}}->{$il->{$f->[6]}}->{$f->[5]} = {
                cd => $f->[8],
                st => $f->[9],
                tp => $iz->{$f->[10]},
            };
        } else {
            $r->{$ih->{$f->[0]}}->{$il->{$f->[4]}}->{$f->[3]} = {
                cd => $f->[6],
                st => $f->[7],
                tp => $iz->{$f->[8]},
            };
        }
    }
close FILE;

my $dic = {};
my $cur = '';
open FILE, "<CampaignAbilityFunc.txt" or die;
    while (<FILE>) {
        s/\|c..(......)/[COLOR=#$1\]/g;
        s/\|r/[\/COLOR\]/g;
        /^\[(.*)\]$/;
        if ( $1 ) {
            $cur = $1;
            next;
        }
        /^(.+?)=(.+)$/;
        my $nam = $1;
        my $val = $2;
        /()/;
        $val =~ s/\|n/\n/g;
        $val =~ s/^"|"$//g;
        my $n;
        for ( split '","', $val ) {
            $dic->{$cur}->{$nam}->{++$n} = $_;
        }
    }
close FILE;

my $slk = {};
$cur = '';
open FILE, "<AbilityData.slk" or die;
    while (<FILE>) {
        /^C;X.*?;Y.*?;K"(.*)"$/;
        if ( $1 ) {
            $cur = $1;
            next;
        }
        /^C;X(.*?);K(.*)$/;
        my $id  = $1;
        my $val = $2;
        if ( $cur eq 'alias' ) {
            $val =~ s/"//g;
            $val =~ s/(\d*)$//;
            $slk->{$id} = {
                v => $val,
                n => $1,
            };
        } else {
            $dic->{$cur}->{$slk->{$id}->{v}}->{$slk->{$id}->{n} || 1} = $2;
        }
        /()()/;
    }
close FILE;

open FILE, ">guide.txt" or die;

print FILE '[point]Top[/point][CENTER][SIZE=3]Jump to: '.(join ' | ', map { sprintf "[goto=%s]%s[/goto]", $_, $_ } ( @{$cfg->{linked}}, 'Bottom' ) )."[/SIZE]\n";
print FILE $cfg->{header};

for my $hero ( qw/ Squire Berserker Crusader Ranger Hunter Druid Thief Assassin Bard Cleric Bishop Monk Magician Necromancer Sorcerer Mystic Hexblade Psion / ) {
    if ( $hero ~~ @{$cfg->{linked}} ) {
        print FILE $cfg->{line};
        printf FILE "[point]%s[/point]", $hero;
    }
    printf FILE "[INVTABLE][tr][td][IMG]%s[/IMG][/td][td][keepspace][SIZE=5] %s[/SIZE][/keepspace][/td][/tr][/INVTABLE]",($cfg->{url}.$ii->{h}->{$hero}),$hero;
    print FILE '
[TABLE]
[tr]
[TD][CENTER]BTN[/CENTER][/TD]
[TD][CENTER]Icon[/CENTER][/TD]
[TD][CENTER]Name[/CENTER][/TD]
[TD][CENTER]Description[/CENTER][/TD]
[TD][CENTER]Mana[/CENTER][/TD]
[TD][CENTER]Casttime[/CENTER][/TD]
[TD][CENTER]Cooldown[/CENTER][/TD]
[TD][CENTER]Talents[/CENTER][/TD]
[/tr]
';

    for my $order ( sort {$a <=> $b} keys %{$r->{$hero}} ) {
        for my $ability ( sort keys %{$r->{$hero}->{$order}} ) {
            print FILE "[tr]\n";
            printf FILE "[td][CENTER][COLOR=Yellow][SIZE=5][B]%s[/B][/SIZE]\n\n[COLOR=White][SIZE=2][B]%s[/B][/SIZE][/COLOR][/COLOR][/CENTER][/td]\n",$dic->{$ability}->{Hotkey}->{1},$order;
            printf FILE "[td][IMG]%s[/IMG][/td]\n",($cfg->{url}.$ii->{a}->{$dic->{$ability}->{Name}->{1}});
            printf FILE "[td]%s[/td]\n",$dic->{$ability}->{Name}->{1};
            my $desc = $dic->{$ability}->{Ubertip}->{1};
            $desc =~ s/\[COLOR=#ccccff\]Cooldown:.*//s;
            printf FILE "[td]%s[/td]\n",$desc;
            printf FILE "[td][CENTER][COLOR=RoyalBlue]%s[/COLOR][/CENTER][/td]\n",($dic->{$ability}->{Cost}->{1} || '-');
            printf FILE "[td][CENTER]%s[/CENTER][/td]\n",
                $ia->{$dic->{$ability}->{Name}->{1}}->{cast}
                    ? $ia->{$dic->{$ability}->{Name}->{1}}->{cast} < 0
                        ? '[COLOR=Gray]-[/COLOR]'
                        : $ia->{$dic->{$ability}->{Name}->{1}}->{cast} > 9000
                            ? '[COLOR=Magenta]Channel[/COLOR]'
                            : $ia->{$dic->{$ability}->{Name}->{1}}->{cast} > 3
                                ? sprintf '[COLOR=Orange]%s sec[/COLOR]', $ia->{$dic->{$ability}->{Name}->{1}}->{cast}
                                : sprintf '[COLOR=Yellow]%s sec[/COLOR]', $ia->{$dic->{$ability}->{Name}->{1}}->{cast}
                    : '[COLOR=White]Instant[/COLOR]'
            ;
            printf FILE "[td][CENTER]%s%s[/CENTER][/td]\n",
                $ia->{$dic->{$ability}->{Name}->{1}}->{cool} ? sprintf "[COLOR=Gray]%s[/COLOR]\n\n", $ia->{$dic->{$ability}->{Name}->{1}}->{cool} : '',
                $dic->{$ability}->{Cool}->{1}
                    ? $dic->{$ability}->{Cool}->{1} < 1
                        ? sprintf '[COLOR=White]%s sec[/COLOR]', $dic->{$ability}->{Cool}->{1}
                        : $dic->{$ability}->{Cool}->{1} < 30
                            ? sprintf '[COLOR=Yellow]%s sec[/COLOR]', $dic->{$ability}->{Cool}->{1}
                            : sprintf '[COLOR=Orange]%s sec[/COLOR]', $dic->{$ability}->{Cool}->{1}
                    : '[COLOR=Gray]Passive[/COLOR]'
            ;
            printf FILE "[td]";

            for my $thero ( sort keys %{$ia->{$dic->{$ability}->{Name}->{1}}->{tals}} ) {
                printf FILE '[INVTABLE][tr][td][IMG]%s[/IMG][/td][td]',($cfg->{url}.$ii->{h}->{$thero});
                printf FILE "[B]%s:[/B] %s\n", $_->[0], $_->[1] for @{$ia->{$dic->{$ability}->{Name}->{1}}->{tals}->{$thero}};
                print FILE "[/td][/tr][/INVTABLE]";
            }
            printf FILE "[/td]\n";
            print FILE "[/tr]\n";
        }
    }

    print FILE '
[/TABLE]
';

}

print FILE $cfg->{line};
print FILE '[point]Bottom[/point][CENTER][SIZE=3]Jump to: '.(join ' | ', map { sprintf "[goto=%s]%s[/goto]", $_, $_ } ( 'Top', @{$cfg->{linked}} ) )."[/SIZE]\n";
print FILE $cfg->{attachments};

close FILE;
142732d1422014615-abilities-guide-horizontalline1140x1.jpg

142619d1421914273-talents-guide-clericicon32x32.jpg
Cleric
BTN
IconNameDescription
Mana
Casttime
Cooldown
Talents
Q

1
142687d1421948663-abilities-guide-clericheal.jpg
HealHeals a friendly target for Spellpower x 5.
9
2.5 sec
0.5 sec
142620d1421914273-talents-guide-bishopicon32x32.jpg
40: mana cost -20%
142619d1421914273-talents-guide-clericicon32x32.jpg
25: replenish 1% of max mana to the target healed
25: cast time -50% if used on oneself
Q

1
142689d1421948680-abilities-guide-clericsoulstrike.jpg
Soul StrikeA blast of magic strikes the target. Deals Spellpower x 3 magic damage. Deals 150% damage to undead units.
8
2.5 sec
0.5 sec
142620d1421914273-talents-guide-bishopicon32x32.jpg
40: removes Weakened Soul spell damage malus
142619d1421914273-talents-guide-clericicon32x32.jpg
25: 33% chance to hit an additional target
W

3
142686d1421948663-abilities-guide-clericcripplingcurse.jpg
Crippling CurseDeals Spellpower x 7 shadow damage over 15 seconds.
7
Instant
15 sec
142620d1421914273-talents-guide-bishopicon32x32.jpg
40: spell crit chance +10% on debuffed targets (self)
45: replenishes 2 mana per tick
45: cooldown -50%
142621d1421914273-talents-guide-monkicon32x32.jpg
45: attacks against debuffed targets ignore armor (self)
45: 5% chance on attacks to debuff target
W

3
142636d1421941762-abilities-guide-notreleasedyetability.jpg
SunfireConjures an explosion of purifying energy, dealing Spellpower x 2.0 fire damage to all units within a small area around the caster. Undead units take double damage.
9
???
18 sec
Z

7
142685d1421948663-abilities-guide-clericconfidence.jpg
ConfidenceIncreases resistances of all nearby friendly units by 15 and evasion by 3%.
-
-
Passive
142620d1421914273-talents-guide-bishopicon32x32.jpg
35: resistance bonus +7%
Z

7
142684d1421948663-abilities-guide-clericburstoflight.jpg
Burst of LightThe caster releases a massive amount of holy energy, healing all nearby friendly units around the caster for Spellpower x 7.
Creates no threat.
15
Instant
90 sec
142620d1421914273-talents-guide-bishopicon32x32.jpg
35: cooldown -30%
A

13
142688d1421948663-abilities-guide-clericressurection.jpg
RessurectionBrings the target back to life with 50% HP and 20% MP. Cooldown resets when out of combat.
50
10 sec
Reset

300 sec
A

13
142690d1421948680-abilities-guide-clericsymboloffury.jpg
Symbol Of FuryImbues the target with divine fury. Increasing attackspeed by 20% and spellhaste by 30%. Lasts 45 seconds.
8
Instant
60 sec
142620d1421914273-talents-guide-bishopicon32x32.jpg
30: attack speed bonus +10%
142621d1421914273-talents-guide-monkicon32x32.jpg
30: duration +15 sec
 
Last edited:
Level 6
Joined
May 20, 2014
Messages
228
That's a cool script although new forum platform so code might not work/be updated, I don't mind taking over if you don't have the time to finish. I'd need a few days figuring out abilities and such but should be super simple.
 
Level 4
Joined
Jul 14, 2014
Messages
75
Alex, I have to say it. You work seems pretty impressive to me. I only code in Javascript so I don't understand all of your code and I know there could be things to optimize, but as far as I know, the code is super-functional and amazing.
 
Level 7
Joined
Aug 23, 2014
Messages
208
Alex, I have to say it. You work seems pretty impressive to me. I only code in Javascript so I don't understand all of your code and I know there could be things to optimize, but as far as I know, the code is super-functional and amazing.
Thanks :)

Well. New forum settings are pretty restrictive, so I can not update old guide: too much images in one post :)

I think to create new guide from a scratch: place all images to the gallery and make 1 post per base&advanced classes (6 posts in a row + 1 extra for technical information), so 200 images limit will not be overrided.
Found workaround - just replace class icons with names in talents list. :)
 
Last edited:
Status
Not open for further replies.
Top