wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > General Development
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-14-2010, 07:09 PM   #1
The Druidinator
User
 
The Druidinator's Avatar
 
Join Date: May 2008
Posts: 30

The Druidinator has little to show at this moment (4)

Default Adding Additional Hero Spells?

Hello everyone in the forums!
I'm working on a custom campaign that I will post here later on for feedback, but for the moment I'm wondering if it's possible to add extra spells to a Hero unit, in midgame. Not as in make it learn an existing skill, but adding something new through triggers.
This is part of my plan for the map, but after a little triggering around I'm unsure if it can be done. What I am looking for is to remove one of the 4 original ones by buying an using an item, that also teaches a new spell to replace the old one. In that way, you would be able to have 8 spells in total, but a visit to a shop would be needed to swap, giving the player a tactical choice and flexibility. Also, a Tome of Retraining is for sale to simplify things.
A second solution that I've though of would be using Robo-Goblin, adding a second Hero form. But that would give a new dimension of balancing cooldowns on the transform (imagine switching around and using two Ultimates in a row).

Also, as a second issue, I am trying to create a passive spell that would add a stacking attack speed buff to the Hero that would ultimately turn into a flurry of blows. What I can't seem to get working though, is how to make it proc to start off. As I use Bash as a base, GUI doesn't register it as an Ability Being Cast. I thought of using a randomly generated % for it, but then it would need to check if the Hero has the passive spell, and I can't seem to find a way to check it.
I would be very grateful for help on any of my two issues, it would be a great help. Thank you on forehand!
The Druidinator is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-14-2010, 07:29 PM   #2
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default

As far as I'm aware, you can't hot-swap hero abilities like that.

The closest you can get is using Engineering Upgrade to let the player choose an initial skill-set, by using it on Channel-based dummy abilities with the same number of levels; you just add the Engineering Upgrade ability and then disable it.

The problem is that when changing the abilities, Engineering Upgrade doesn't seem to update some properties (or something like that), so if you try to hot-swap two completely different abilities then you'll get a horrible mish-mash of both. Channel can only be swapped for any ability because it's special; otherwise you can only interchange versions of the same ability just like the original ability intends.

Or you could do magic with spell-books if they don't have to be proper hero abilities, but I', not familiar with spell-book-related buggery.

For your second problem, you could try an Orb ability causing an auto-cast of some dummy ability you can have an event for.
__________________
Rao Dao Zao is offline   Reply With Quote
Old 04-14-2010, 07:29 PM   #3
Michael Peppers
Lepus?
 
Michael Peppers's Avatar
 
Join Date: Jan 2009
Posts: 1,308

Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)

Default

For the second one use a periodic timer that checks if the hero has that skill and at which level it is, then add a skill based on the Gloves of Speed item ability, with multiple levels to increase the attack speed bonus.
Probably you already know that there's an hardcoded limit to how much fast attacks can be.

Cheers.


Nevermind, I misunderstood the question. =P
__________________
Projects:Tutorials: Competitive AI Step by Step with AI Editor (Pending)
Resources: [AI Script] Michael Peppers's Melee AI template (Pending)

Last edited by Michael Peppers : 04-14-2010 at 07:56 PM.
Michael Peppers is offline   Reply With Quote
Old 04-14-2010, 07:55 PM   #4
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

The second ability is tricky, since it requires you to increase attack speed in increments and remove the bonus after a certain duration. I would use DamageEvent to detect when attacks hit, then use BonusMod to increase the attack speed gradually with each attack. Then I would keep a timer running for each unit with this ability activated that would get reset whenever the unit dealt damage, but if it wasn't reset on time and expired then the attack speed bonus would be removed from the unit. Of course, the easiest way to tie all this together is with a vJass struct which I would have to associate with the unit in some way.
__________________
Anitarf is offline   Reply With Quote
Old 04-19-2010, 07:26 AM   #5
The Druidinator
User
 
The Druidinator's Avatar
 
Join Date: May 2008
Posts: 30

The Druidinator has little to show at this moment (4)

Default

To start off with, I'm really thankfull to all those who took time to help me, I actually didn't expect help that fast. Been gone for a couple days due to heavy school work though.

On the front of switching Hero skills in midgame, I think I'm dropping it or saving it for last, as it's a bit too advanced for me. I though of using spell books, yes, but they only have one rank of an ability and you need o be constantly carrying around the item.

On the proc-based spell, I found a way to work around my problems. I can truthfully confess that vJass is something I've never been able to grasp, I'm a GUIer. Using an Orb ability though didn't seem to work (I take it you pointed to Orb of Annihilation or something along those lines, at least that was what I tried). So I created a trigger that activates when the spell is learned, that gives a 20% chance when the unit who has the spell (it doesn't check for that though, it simply checks for Hero unit type) and spawns a dummy unit with a 10 sec expiration. It also then buffs the Hero, and on the way counts all of these dummies owned (Charges for the ability) and then gives a proper rank of 6 versions of Bloodlust. Will post the trigger once I can get acces to my map again.
The Druidinator is offline   Reply With Quote
Old 04-19-2010, 12:47 PM   #6
Michael Peppers
Lepus?
 
Michael Peppers's Avatar
 
Join Date: Jan 2009
Posts: 1,308

Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)

Default

To know if a hero/unit has a passive ability, just check if that ability's level is different from 0.
__________________
Projects:Tutorials: Competitive AI Step by Step with AI Editor (Pending)
Resources: [AI Script] Michael Peppers's Melee AI template (Pending)

Last edited by Michael Peppers : 04-19-2010 at 12:52 PM.
Michael Peppers is offline   Reply With Quote
Old 04-25-2010, 09:23 PM   #7
The Druidinator
User
 
The Druidinator's Avatar
 
Join Date: May 2008
Posts: 30

The Druidinator has little to show at this moment (4)

Default

As this post has pretty much served its purpose, I just felt like posting the trigger I used to solve my problem, and to see if you people think there are ways to improve it (besides the obvious, such as that if the unit with hthe buff has the buff dispelled, the Charge count doesn't reset, and that it currently only has one rank). The Attacking unit in the trigger, the Underworld Rager, is the unit who has the ability.

Trigger:
Unyelding Rage
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
Collapse And - All (Conditions) are true
Collapse Conditions
(Unit-type of (Attacking unit)) Equal to Underworld Rager
(Owner of (Attacked unit)) Not equal to Player 1 (Red)
(Owner of (Attacked unit)) Not equal to Player 3 (Teal)
(Random percentage) Greater than or equal to 75.00
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
RageCharge Equal to 3.00
Collapse Then - Actions
Unit - Remove Unyelding Rage (Dummy) buff from (Attacking unit)
Unit - Create 1 Dummy Caster for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Rage 4 (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
Unit - Create 1 Unyelding Rage Charge for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Add a 12.00 second Generic expiration timer to (Last created unit)
Trigger - Turn off (This trigger)
Wait 2.50 seconds
Trigger - Turn on (This trigger)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
RageCharge Equal to 2.00
Collapse Then - Actions
Set RageCharge = 3.00
Unit - Remove Unyelding Rage (Dummy) buff from (Attacking unit)
Unit - Create 1 Dummy Caster for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Rage 3 (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
Unit - Create 1 Unyelding Rage Charge for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Add a 12.00 second Generic expiration timer to (Last created unit)
Trigger - Turn off (This trigger)
Wait 2.50 seconds
Trigger - Turn on (This trigger)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
RageCharge Equal to 1.00
Collapse Then - Actions
Set RageCharge = 2.00
Unit - Remove Unyelding Rage (Dummy) buff from (Attacking unit)
Unit - Create 1 Dummy Caster for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Rage 2 (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
Unit - Create 1 Unyelding Rage Charge for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Add a 12.00 second Generic expiration timer to (Last created unit)
Trigger - Turn off (This trigger)
Wait 2.50 seconds
Trigger - Turn on (This trigger)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
RageCharge Equal to 0.00
Collapse Then - Actions
Set RageCharge = 1.00
Unit - Remove Unyelding Rage (Dummy) buff from (Attacking unit)
Unit - Create 1 Dummy Caster for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Rage 1 (Dummy) to (Last created unit)
Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
Unit - Create 1 Unyelding Rage Charge for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Add a 12.00 second Generic expiration timer to (Last created unit)
Trigger - Turn off (This trigger)
Wait 2.50 seconds
Trigger - Turn on (This trigger)
Collapse Else - Actions
Do nothing

And this one controls the lasting of the buff:
Trigger:
Rage Decay
Collapse Events
Unit - A unit Dies
Collapse Conditions
Collapse And - All (Conditions) are true
Collapse Conditions
(Unit-type of (Dying unit)) Equal to Unyelding Rage Charge
(Number of living Unyelding Rage Charge units owned by (Owner of (Dying unit))) Equal to 1
Collapse Actions
Set RageCharge = 0.00

And this one enables the ability trigger once learned. I know, a little unsofisticated, but it works by my current standards.

Trigger:
Rage Activation
Collapse Events
Unit - A unit Learns a skill
Collapse Conditions
(Learned Hero Skill) Equal to Unyelding Rage
Collapse Actions
Trigger - Turn on Unyelding Rage <gen>
Trigger - Turn on Rage Deactivation <gen>
Trigger - Turn off (This trigger)
The Druidinator is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 11:21 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services