| 08-07-2009, 07:48 AM | #1 | |||
Hi! I'm kinda new to this forum (Though have looked around in it for some time now, without posting) and I thought I'd post a spell I've made here. Tormental Wrath
Any name ideas are welcome, though might not use them XD This is actually the very first vJASS/JASS spell I've ever made (Yay me XD) so hope you like it :D MUI/MPI: MUI GUI/JASS/vJASS: vJASS Requires: The spell-trigger itself the XEbasic, XEfx, XEcollider and XEdamage libraries the BoundSentinel library JASS Newgen Pack version 5d And finally, the patch 1.23b, or higher, for Warcraft 3. Here are some screenshots :D
A small description of the spell:
And here's the spells code: Tormental Wrath:scope TormentalWrath initializer Init // requires xedamage, xebasic, xefx, xecollider, BoundSentinel /////////////////////////////////////////////////////////////////////////////////////////////////////////////// //***********************************************************************************************************// //@@//////////////////////////////////Tormental Wrath, Made by Komaqtion///////////////////////////////////@@// //@@ Now using XE! @@// //@@ @@// //@@ @@// //@@ How to import: @@// //@@ @@// //@@ ¤ First copy the ability "Tormental Wrath" and the unit "Dummy" and change the constant @@// //@@ "SPELL_ID" to the rawcode of the newly copied spell, then go into the trigger called @@// //@@ "xebasic", and change "XE_DUMMY_UNITID" to the Dummy's rawcode ! @@// //@@ Then you need to import Vexorian's dummy.mdx file from this map, or another, and change @@// //@@ the "Dummy" unit's model to it. Then, of course, you need to import the triggers, which @@// //@@ are in the categories "The Spell" and "Required Systems". @@// //@@ Then you're free to change any of the given global constants to suit your needs. @@// //@@ @@// //@@ @@// //@@ Requirements: @@// //@@ @@// //@@ ¤ Patch 1.23b or newer. @@// //@@ ¤ JASS Newgen Pack, version 5d or newer. @@// //@@ ¤ This spell, of course ! @@// //@@ ¤ The dummy.mdx, BoundSentinel and the XE libraries, all made by Vexorian ! @@// //@@ @@// //@@ @@// //@@ Credits to: @@// //@@ @@// //@@ * Vexorian, for the dummy.mdx file, BoundSentinel and the XE libraries ! @@// //@@ * Anitarf and Pyrogasm, for their help on the rewrite of it :D @@// //@@ * Rising_Dusk, for helping me a bit on the forum ! @@// //@@ @@// //@@ And, of course, so many thanks to all of the many helpful people at WC3C.net @@// //@@ who has helped get is spell working! @@// //@@ @@// //@@ @@// //@@ Note: This is my very first fully working, and quite good, spell made completely in vJASS. @@// //@@ @@// //@@ So much feedback, and suggestions are very much welcome, and maybe some tips to make it @@// //@@ even better would be nice :D @@// //@@ @@// //@@///////////////////////////////////////////////////////////////////////////////////////////////////////@@// //***********************************************************************************************************// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// globals // Effects! Change as you'd like ;)\\ private constant string EFFECT_C = "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" // Effect on the caster! private constant string EFFECT_1 = "Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl" // Effect 200 range from the caster! private constant string EFFECT_2 = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" // Effect at the end! private constant string EFFECT_T = "Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl" // Effect on the damaged units! private constant string ATTACH_POINT = "origin" // The attach point of EFFECT_T! private constant string ODD_EFFECT = "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" // The effect which appears at each ODD_PERIOD! private constant string DUMMY_EFFECT = "Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl" // Effect on the moving dummy! // Rawcodes! Change these rawcodes to the ones on your map :D (Note: To change the Dummy unit's ID, you'll need to go into the trigger called "xebasic", and change "XE_DUMMY_UNITID" !) \\ private constant integer SPELL_ID = '0000' // ID of the spell! // Other constant integers! Change at will :P\\ private constant real DAMAGE_FACTOR = 1. // Just a simple real to make it easy to change the damage! private constant real RANGE_FACTOR = 1. // Just a simple real to make it easy to change the range! private constant integer ANGLES = 16 // The number of angles the effects will show at! (360/ANGLES) private constant attacktype ATTACK_TYPE = ATTACK_TYPE_NORMAL // Explains itself i think XD private constant damagetype DAMAGE_TYPE = DAMAGE_TYPE_UNIVERSAL // Same here :P private constant weapontype WEAPON_TYPE = WEAPON_TYPE_WHOKNOWS // And same here :D private constant real TIME = 2.5 // How long it takes for the spell to complete! private constant real SLIDE_SPEED = TIME/XE_ANIMATION_PERIOD * TIME // How much the dummy effect moves each second! (It's 200. atm :D) private constant real EXPLOSION_OFFSET = 200. // How much range the first explosions are offset the casters porition! private constant boolean ODD_EFFECTS = false // Wether or not the ODD_EFFECT s will appear! private constant real ODD_EFFECT_TIMEOUT = .75 // How frequently the ODD_EFFECT s appear! private constant boolean DAMAGE_ALLIES = false // Wether the spell should damage allies, or not! private constant boolean ATTACK = true // If the spell should count the damage dealt by it as an attack! private constant boolean RANGED = true // If the spell should count the damage dealt by it as ranged! // Here are some UNIT_TYPE's which you can add that won't be damages during this spell!\\ private constant unittype STRUCTURE = UNIT_TYPE_STRUCTURE private constant unittype MAGIC = UNIT_TYPE_MAGIC_IMMUNE // To add more "exeptions" to the spell, simply create another on of these constants, and also add another one of " set dmg.factor(input unittype constant here, .0) " // to the function "Spell_Actions"... There are other ones of these there, so you should find it :D endglobals // Damage functions!\\ // V // This one is for the DPS on the projectiles! \\ V \\ private function Damage_Small takes integer lv returns real return DAMAGE_FACTOR * lv endfunction // V // This one is for the explosions around the caster! \\ V \\ private function Damage_Medium takes integer lv returns real return 50 + lv * DAMAGE_FACTOR * 25 endfunction // V // This one is for the explosions at the very end! \\ V \\ private function Damage_High takes integer lv returns real return 50 + lv * DAMAGE_FACTOR * 50 endfunction // Range functions!\\ // V // This one is for the DPS on the projectiles! \\ V \\ private function Range_Small takes nothing returns real return RANGE_FACTOR * 100 endfunction // V // This one is for the explosions around the caster! \\ V \\ private function Range_Medium takes nothing returns real return RANGE_FACTOR * 10 endfunction // V // This one is for the explosions at the very end! \\ V \\ private function Range_High takes nothing returns real return RANGE_FACTOR * RANGE_FACTOR endfunction // End of Configuration!\\ globals // Don't touch these globals ! \\ private integer tempData private xedamage dmg endglobals // Don't touch these globals ! \\ private struct Data extends xecollider integer lvl player play real cx real cy unit cast private real tick private method onDestroy takes nothing returns nothing call .flash(EFFECT_2) call dmg.damageAOE(.cast, .x, .y, Range_High(), Damage_High(.lvl)) endmethod private method loopControl takes nothing returns nothing set tempData = this set .tick = .tick + XE_ANIMATION_PERIOD if .tick >= ODD_EFFECT_TIMEOUT and ODD_EFFECTS == true then call DestroyEffect(AddSpecialEffect(ODD_EFFECT, .x, .y)) call dmg.damageAOE(.cast, .x, .y, Range_Medium(), Damage_Medium(.lvl)) set .tick = 0 else call dmg.damageAOE(.cast, .x, .y, Range_Small(), Damage_Small(.lvl)) endif endmethod endstruct private function Spell_Conditions takes nothing returns boolean return GetSpellAbilityId() == SPELL_ID endfunction private function Spell_Actions takes nothing returns nothing local Data d local integer i = 0 local unit u = GetTriggerUnit() local real x=GetUnitX(u) local real y=GetUnitY(u) local real x2 local real y2 local real a=GetUnitFacing(u)*bj_DEGTORAD call DestroyEffect(AddSpecialEffect(EFFECT_C, x, y)) loop exitwhen i >= ANGLES set d = Data.create(x, y, a) set d.fxpath=(DUMMY_EFFECT) set d.collisionSize=(Range_Small()) set d.direction=a set d.speed = SLIDE_SPEED set d.expirationTime = TIME set d.play = GetOwningPlayer(u) set d.cast = u set d.cx = x set d.cy = y set d.lvl = GetUnitAbilityLevel(u, SPELL_ID) set x2 = x+EXPLOSION_OFFSET*Cos(a) set y2 = y+EXPLOSION_OFFSET*Sin(a) call DestroyEffect(AddSpecialEffect(EFFECT_1, x2, y2)) call dmg.damageAOE(d.cast, x2, y2, Range_Medium(), Damage_Medium(d.lvl)) set a = a + (2*bj_PI/ANGLES) set i = i + 1 endloop set u = null endfunction private function Init takes nothing returns nothing local trigger t=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(t,Condition(function Spell_Conditions)) call TriggerAddAction(t,function Spell_Actions) set dmg = xedamage.create() set dmg.dtype = DAMAGE_TYPE set dmg.atype = ATTACK_TYPE set dmg.wtype = WEAPON_TYPE set dmg.damageAllies = DAMAGE_ALLIES call dmg.factor(STRUCTURE, .0) call dmg.factor(MAGIC, .0) call dmg.useSpecialEffect(EFFECT_T, ATTACH_POINT) endfunction endscope Please give much feedback, and tips both for this spell and future stuff :D
|
| 08-07-2009, 08:16 AM | #2 |
You credit some Jesus4Lyf character for KeyTimers, but it is not approved here, so it follows that this spell in its current form cannot be approved here. You should use TimerUtils instead. |
| 08-07-2009, 08:24 AM | #3 |
I can't use systems from another forum in order to get approval here ? :S Well, ok then... I'll just have to do a TimerUtils version of it too then :( EDIT: Can't honestly seem to get it working with Timerutils :( This gives the "Unexpected: "requires Timerutils"": JASS:scope Dummy initializer Init requires TimerUtils Why won't it compile ? |
| 08-07-2009, 09:32 AM | #4 |
Scopes require all libraries by default, so you don't need to state it. It might be good practice to get in the habit of doing stuff like this, though: JASS:scope EclipseOfSanity initializer Init //requires LinkedList, TimedLoop, xebasic, xepreload, xefx |
| 08-07-2009, 10:53 AM | #5 | |
Now it compiles at least :D But there is some serious lag now :( Here's the new code:
And btw, I'm using TimerUtils Blue flavor, don't know if this is too fast for it or something, but just wanted to let you know :D |
| 08-07-2009, 08:49 PM | #6 |
Haha you post it here as well. Nice spell and that name where did you get it |
| 08-07-2009, 09:15 PM | #7 |
Why would you want a new name its cool and nice spell |
| 08-08-2009, 09:26 AM | #8 |
Working now! :D |
| 08-09-2009, 11:22 AM | #9 |
Updated it now to use TimerUtils :D Anything else needed for approval ? :o |
| 08-09-2009, 01:22 PM | #10 | |
Quote:
|
| 08-09-2009, 02:40 PM | #11 |
How do I add the Preview image ??? :S And what size does it need to be ? All changes made exept the preview image :D |
| 08-09-2009, 07:03 PM | #12 |
Just a 100x100 image that is displayed next to th thread in the spells forum. |
| 08-09-2009, 07:08 PM | #13 |
Yeah, but how do I add it ? :S |
| 08-09-2009, 07:23 PM | #14 |
Edit post > go advanced > attachments |
| 08-09-2009, 07:31 PM | #15 |
Done now :D |
