• 🏆 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!

Hero Contest #5 - Science Fiction

Status
Not open for further replies.
Level 22
Joined
Dec 31, 2006
Messages
2,216
Hmmm, I've gotten stomped today by something I assume is a bug in vJASS.

For simplicity this is my setup:
JASS:
//Parent struct
struct foo
    boolean wantDestroy

    //This is the stub method where the wtf-BOOM happens.
    //Note that nothing happens in this struct, but the struct that inherits this method.
    stub method derp takes nothing returns boolean
        return false //The return is irrelephant
    endmethod

    //This method is run by a timer. Every 0.04 second.
    static method run takes nothing returns nothing
        local thistype t
        //I do some shit. "t" is not null btw.
        .
        .
        .
        if t.derp() then //Here I'm calling the stub method
            //This is irrelephant
            .
            .
            .
        endif
        //At this point t.wantDestroy is false
        if t.wantDestroy then
            //Doesn't run D:
        endif
    endmethod
endstruct

//Child struct
struct bar extends foo

    //Here I override the default derp
    method derp takes nothing returns boolean
        set this.wantDestroy = true //As you can see, the wantDestroy member is set to TRUE
        //I do more shit that is TOTALLY unrelated to this struct, the parent struct or any of their members
        .
        .
        .
        //this.wantDestroy is still true at this point
        return false //The return is irrelephant
     endmethod

endstruct
Basically, I allocate a "bar" object and then let the internal functions of "foo" take over. The overridden derp function does run, and "this.wantDestroy" is true right before the return. I would also like to clarify that nothing happens between the call to t.derp() and the check for t.wantDestroy. However, if I remove the UNRELATED stuff in the derp method, then t.wantDestroy suddenly becomes true, like it should be.

Sometimes I want to kick Vex in the face.
 
Last edited:
Level 6
Joined
Jun 16, 2007
Messages
235
Sometimes I want to kick Vex in the face.

The four things that make vJass better than jass: globals, struct, scope, library.

Notice that keyword method is not in the list.

Game scripting is inherently functional, OO concepts are just a waste of time here.
There is a reason structs are called structs and not objects.

EDIT:
Btw does this strange contest even have judges yet?
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Actually, now that you mention it. Structs is another thing that makes me want to kick him in the face. What we're using is not structs, but classes. Oh, and scopes suck btw :>

Also, I already know vJASS is better than JASS. That wasn't the point with that sentence, but things like stub methods suddenly reverting changes just because they can, is not a good feature.



I would like to clarify something too. I'm quite sure you guys may think that the totally unrelated things going on in that method is some big shit that might actually be the cause of the error. That's not the case :>
The only thing happening is the allocation of a different struct, and the only thing passed to it, is coordinates. This struct is in no way related to the parent struct or child struct.
 
Level 6
Joined
Jun 20, 2011
Messages
249
Is balance being evaluated? Why? It only matters if the spell is modifiable so the user can adapt it to it's own requirements.
It's obviously stupid (and this should be taken into consideration) to code a spell that does things like "cast this 3 times and you win the game" or "kill enemy unit instantly"
It shouldn't matter if the spell causes 10000 damage as long as you can change it
Also, judges, expect a lot of advanced code from me, my hero is already very confusing (extensive unreleased custom libraries and such)
 
Still the initial values should be balanced compared to standard heroes. No question about it, always been like that.
And this will never change, idea is to create hero that can anytime replace blizzard created one. :)

Anyway I coded my 2nd spell, work awesome.
I get used to this vJass thing :D

Btw those spells will be presented in my SotP map as well (in different shape ofc) :)
 
Level 13
Joined
Sep 29, 2008
Messages
671
It only matters if the spell is modifiable so the user can adapt it to it's own requirements.

Should it be really like that? I thought this was a hero contest, an individual interpretation of a hero. "Your" interpretation of what a unique balanced hero is and not someone else who can modify it.

The only thing that should matter in spell judging in a hero contest is that the spell code is working based on Hive's standards, spell's synergy with your hero, appearance, and balance... I guess.
 
Should it be really like that? I thought this was a hero contest, an individual interpretation of a hero. "Your" interpretation of what a unique balanced hero is and not someone else who can modify it.

The only thing that should matter in spell judging in a hero contest is that the spell code is working based on Hive's standards, spell's synergy with your hero, appearance, and balance... I guess.

Configurability is part of Hive's standards.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
I finally found the cause of the weird bug I got. Apparently allocating a struct within a stub method causes the thread to split. The boolean, despite being global, is only true within the context of the thread. In some cases the thread also crashes, preventing the bool from ever being set to true. The struct is still allocated though.

Edit: Hoho, found out why allocating the struct caused the thread split. After a shitton of debugging I finally found out that it in fact attempted to use a nil index. I wish wc3 would throw exceptions ._.

So, it wasn't Vex's fault after all, but I still want to kick him in the face :>
 
Last edited:
Level 22
Joined
Nov 14, 2008
Messages
3,256
saying that the spell is working, that is in the level of hive's minimum standards. ^_^

Nope it's not. It should be fully MUI and configurable towards multiple levels. The standards are not the same as they were a few years ago (thanks spellmods, finally).

@TRD

I don't even get why you need to extend the struct... (you probably have some evil plan behind it after all)

We all wanna kick Vex in the face :)
 
Level 17
Joined
Jan 21, 2010
Messages
2,111
i guess i reserve a spot here for my hero:
Tim "Grenade Man" Danfolks the Elite Marauder

this hero is based on this model by amazing Fingolfin
Orderskill 1skill 2skill 3 ultimate
Name
Adrenal Inject
TE-AS-0098Terrazine ArmorGrenade man
Description
Extent the power of the marauders, Tim inject the adrenaline to his vein, making him more vulnerable, but swifter than anyone
TE-AS-0098 stands for "Terran Engineered-assassination squad-project number 0098" artificially target an enemy unit, trap it, and call (Unit level*3) Goblin like Robot to deal 10-10/20-20/30-30 Chaos Damage, these tiny robot last for 5 s, it has 1.25 s attack speedThe armor of marauders are made from unknown material named "Terrazine", this rare ore constantly changes due to heat, cold, even damage, this armor grant marauder +2/3/4 armor, when damaged the marauders may convert half of the damage to redamage the enemies at 20/25/30% chanceThe title not just only a title, Tim is really a grenade man, when learned gives additional 3 skill to tim
CostHealth: 25% from max HPmana:100no manano mana
Cooldown25s50s00
Last15s5s00
EffectAdd +15/20/25% Increased Attack Speed, and 20/25/30% Increased Movement speed, but take 30% more damageIn the DescriptionReturn Half of the damage taken to the attacker at 20/25/30% Chance, and also add additional 2/3/4 armorAdd 3 additional skill
Additonal skill
  • Frost Grenade - Target unit
    Tim throw a frost grenade contains liquid nitrogen that quickly explode on impact, slowing any unfortunate enough enemies that stand still near the target for 75%, deal 150 damage
    mana cost: 120
  • Fire Grenade - Target unit
    Tim throw a fire grenade that contain molten lava, deal 250 damage and additional 50 damage to any enemies around the target
    mana cost:100
  • Flash Grenade - Target point
    Tim Throw a flash grenade, the grenade explode on impact and blind any enemies around 450 AoE, making them miss for 60% of their attack
    mana cost:150
 
Last edited:
Level 30
Joined
Jan 31, 2010
Messages
3,551
Okay guys, I had some time to give this contest a slight touch of order. You can use this to get your entry nicer and easier for judges to understand, but it's not a must. Have fun!


Note: This is not my entry. This hero is taken from unreleased version of Legendary War map (mine).
Apheraz's Entry
BTNHuntress.png
[TD][/TD]
Elainiel, the Moon Rose
[TD][/TD]

Agility:15 (+1,2 per lvl)
Strength:16 (+1,7 per lvl)
Intelligence:21 (+3,1 per lvl)
Attack Range:128 (melee)
Affiliation:Night Elf
Hero Role:Offensive Caster

BTNStarFall.png
Shooting StarsCalls down a wave of stars to crush enemies in the desired area. Damage is increased by 20% during night.
BTNTheBlackArrow.png
Lunation BladeSummons a spectral blade to cut a deep wound upon each enemy it passes through, until it reaches targeted unit. Each unit suffers armor loss and takes damage. Casting range is increased by 30% during night.
BTNRegeneration.png
Phase CycleAllows caster to shift out of existence, moving at maximum movement speed and with complete transparency, for a short duration. Enemy units that attack caster will suffer reduced magical resistance. Allows casting upon allies during night.
BTNBlink.png
Moon FinaleUnleashes full potency of lunar powers upon a single target, dealing massive damage. Penetrates magical immunity during night.

Hero compiles with whole Night Elven population, excelling at battles during Nighttime. Drawbacks are very low attack range, unlike other Night Elves, low armor and slightly lesser movement. Blah blah blah. Just like that.
[box="Your name's Entry"][TABLE][tr][TD][COLOR="LightBlue"]Hero Icon[/COLOR][/tr][/TD][/TABLE][TABLE][tr][TD][COLOR="LightBlue"]Hero Name, the Hero Class Name[/COLOR][/tr][/TD][/TABLE]

[table][COLOR="DeepSkyBlue"]Agility[/COLOR]:[c]xx (+y,z per lvl)[r][COLOR="Lime"]Strength[/COLOR]:[c]xx (+y,z per lvl)[r][COLOR="DeepSkyBlue"]Intelligence[/COLOR]:[c]xx (+y,z per lvl)[r] [c] [r] [c] [r] [c] [r]Attack Range:[c]xyz[r] Affiliation:[c]Race[r]Hero Role:[c]*[/table]

[table]ICON[c]First Ability[c]Describe what the skill and sub-skills do, if there are any. My suggestion is to not write mana cost, cooldown and other un-needed information for display only.[r]ICON[c]Second Ability[c]Describe what the skill and sub-skills do, if there are any. My suggestion is to not write mana cost, cooldown and other un-needed information for display only.[r]ICON[c]Third Ability[c]ADescribe what the skill and sub-skills do, if there are any. My suggestion is to not write mana cost, cooldown and other un-needed information for display only.[r]ICON[c]Fourth Ability[c]Describe what the skill and sub-skills do, if there are any. My suggestion is to not write mana cost, cooldown and other un-needed information for display only.[/table]

[table]Anything desired can be placed here: synergies, balance discussions, further explanations, or whatever suits your needs. You can put an image of model you used in here.[/table][/box]
*The most famous roles: Support, Caster, Tanker, Ganker, Initiator, Summoner. Known tags: Universal, Defensive, Offensive, Backfire, Closerange, Booster, Sweeper.
 
Level 13
Joined
Sep 29, 2008
Messages
671
@Apheraz Lucent yea, this is very helpful. will use these tags. clean, good to look at, cool. :D

how about nukes role? xD because my hero's spells are mostly aoe, wait i think all of them aoe, because of his name "Radius Axis" the Temporis Artifex/or something something. Haven't quite thought of a good hero name.

I think i'm gonna go for this one if no one used it yet Elemental Fencer or this Lightning Elemental

@rysnt11 those are some serious fire power. btw, the ulti has 3 more abilities? very tempting to copy but i think originality has counts here. haha xD
 
Last edited:
Level 14
Joined
Mar 23, 2011
Messages
1,436

That is by hand the weirdest post in the history of the hive workshop,you could've atleast said like "Why would it be to appoint judges before the contest starts?"

Anyway any hero updates? i've only seen Rysnt11's and some guys picking their models
 
Status
Not open for further replies.
Top