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

Help with buggy scripts

Status
Not open for further replies.
Level 1
Joined
Jul 24, 2012
Messages
3
Yo, this is probably my first post on hiveworkshop, but i have been around here for quite some time.

I'm creating an Arena Map only with heroes and items i make. I'm making the first hero right now but i'm having some hard time with the coding.

I wish someone could take a look at it and give me some hints about how to improve it and solve some bugs. I know i did some stupid things over there, like pointing a specific unit on the spell functions but i was just too anxious to start playing it (i mean passing to create the next heroes *crying* ).
Guess what? The thing is buggy as hell, and i just can't figure out a better way to save the attributes from the hero.

The skill descriptions for the hero are in portuguese, so i will describe them here alongside with some other debug functions to test the map:

The hero is basically a vampire that uses a "stacking" mechanic and life instead of mana. This stacking is called "THIRST" and keeps rising over the time, you can see a counter above his head. When reaching 100 (it's maximum) the THIRST will trigger an effect of conversion, weakening him. It converts his STR to INT until there is no STR left and his HP is at a minimum. Also, many skills use the thirst value for something, check it out.

His spells are:

Q - Suckying: From a short range, the hero will suck blood directly from the opponent draining it's hitpoints to replenish it's own. The damage calc is: A Fixed value per level (50 on level 1) + His INT. It also heals him for INT+THIRST. On FULL THIRST, this spell will cause double damage (But won't affect the healing rate it does, it will heal a huge amount of HP because of the increased INT).

W - Mist form: The hero becomes a mist-form creature and evades combat, increasing his speed and giving him evasion skill while the effect longs (A fixed value of 5 second duration for all levels).

This spell was hard as hell to do, basically because he didn't wanted to stop being able to use his spells while on mist form, and if he did anyways, he just keep getting himself trapped on the mist form forever, for some reason. I created a dummy and kinda solved it silencing him for 5 seconds.

E - Ocular Ray: He shots a electric ray on a target. The damage calc is: A fixed value (that increases per level) + His INT - Thirst. So the more "satiated" you are, the more damage you cause, in opposite of the Q skill. Also there is more, and i will explain with the ULT.

R - Demon Pact: It's a Attribute bonus with negative bonuses that trigger special effects per level on him, also make him slight bigger (the model).
Level 1: (-20 AGI, +5 STR) He gains 50% of his Thirst as movespeed.
Level 2: (-20 INT, +5 STR) He gains critical strikes of 1.5x damage ONLY when his Thirst is at 100. Also, at every critical strike, you have an 10% chance of triggering an "Reset All Cooldowns", so you'll have to be lucky twice to trigger the critical (25% chance) + When it crit, The Cooldown reset (10% chance).

I know its kinda OP but he's a god damned vampire, a predator. The lore on the skill says the more pacts he does with the underworld demons the more afflicted and bloodthirsty he gets, so i want him chewing his opponent's face twice. And the downside is pretty bad, since he'll be loosing STR per second while on this form, trying to get lucky.

Level 3: (+5 STR, to a total of +15 STR) His E slows the enemy now. Im thinking about giving him something more, but i think he's already strong enough.

Also, at every level of the ULT his Thirst and the conversion rate grows faster.

So, all i said here is already done but kinda buggy, i have been doing this map for 2 days or something, please test it out and tell me what do you think. And sorry for my bad engrish.

Some debug commands i made: -levelup, -enemy (spawns enemy), -enemyhero (spawns enemy hero), -sedefull (maximize his thirst), -showvar (shows the actual saved values for his STR and INT).
 

Attachments

  • Masteric Arena.w3x
    206.6 KB · Views: 102
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
Always, on any big/deep design, you must have a very clear sketch of what you want, because changing or adding a system at the half of the road implies re-coding almost everything most of the times. I tried making several maps, heroes, skills, etc, and that was always the case. So, try designing a very detailed idea of the SYSTEMS your map will need (Save/Load, item stacking, timers, backstab detection, etc.) determine if it's going to be MUI or MPI, for gods sake code it in JASS or vJASS using Bribe's Indexer, Hashtables (or Bribe's Jass Table Snipet) and several other stuff, usin GUI will be a pain.

Take a look to Jass resources and spell resources and try to select those who may make some use to your map, you can learn a lot by playing with those scripts.
 
Level 1
Joined
Jul 24, 2012
Messages
3
Hey! Sorry for the late reply! It was a very good tip! I will start to plan something about my maps beforehand, it's just that... I wanted to do something big, but still, quickly. I guess the outcome will never be good that way, heh. About the JASS and vJASS thing, i just gave up learning. I don't have the patience nor i do complete understand what is happening there. My english is modest to the point that anything i need to think hard while reading becomes a real pain, so... I will try to do something fun with what i have. I'm a doctor kludger.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Don't be so hard on yourself. JASS is very easy to learn, everything follows the same patterns. Try making one function like "Unit - Move unit" and convert it to Custom Script, and see how it's done. You'll see that what really happens when you create a unit is a function call (CreateUnitAtLoc) wih some arguments (Owner player of the unit, the unit type [like 'hfoo'] the position [location] and the facing angle).

If you go a bit deeper you can replace the "CreateUnitATLoc" function with "CreateUnit" which requires the same than the past function, but replaces the "location" with "X" and "Y" Coordenates to place the unit. This function is in many ways better than the original "CreateUnitAtLoc" and there you go...

You create stuff in GUI, see them in JASS, then try to improve them further (remove BJ's, use locals, etc.) untill you reach the point where you'll hate GUI :D
 
Status
Not open for further replies.
Top