• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to Customise Lightning Effects

Level 14
Joined
Jun 3, 2005
Messages
209
Introduction:
This tutorial is a very quick guide on how to import and customise lightning effects. Lightning effects include Finger of Death, Healing Wave, Spirit Link, and so on.

You will need:
  • An MPQ browser (check Tools)
  • Something to edit spreadsheets (Excel)

What to do:
  • Open War3x.mpq and extract Splats\LightningData.slk

    attachment.php

    .
  • Open it.

    attachment.php

    .
  • You'll notice there are lots of fields to edit here. AvgSegLength is the portion of the texture file visible at any instant (50 is half, 100 is full). TexCoordScale is negative for drain lightnings because the texture moves back towards the caster. Duration is how long it will take to naturally fade (as with object editor abilities). NoiseScale determines how fuzzy the lightning will become over long distances; 0.00001 will remove any noise.
    .
  • I'm going to add a new lightning using a texture in war3x.mpq which makes a nice lightning (Textures\BlueWaves.blp). I'm picking values which I think might look nice here.

    attachment.php

    .
    attachment.php

    .
  • Now, save that file and import it in the World Editor. Change its path to the original path, Splats\LightningData.slk so it'll overwrite the usual file.

    attachment.php

    .
  • Finally, you can go to the object editor and by shift-clicking on the Art - Lightning field, change the usual four letter lightning code (AFOD in this case) to one of the new ones.

    attachment.php

    .
  • ...and voila! Our Finger of Death ability should use the new custom lightning. Of course, you can use the new lightnings in triggers too by using the four letter code you chose in the .slk (GUI users may have to use one line of custom script for this bit).

    Here's what the blue waves looks like in a sample ability:

    attachment.php

The advantages of this method are that we don't have to overwrite old lightnings to add new ones. We also don't have to limit ourselves to the usual speeds, thickness, or fade times of the standard lightnings. Their versatility is something which I feel is under-appreciated in most maps, hence this brief introduction. I hope everyone found it useful.

Some screenshots showing what you can do with custom lightning from my map Rise of Winterchill:

attachment.php

attachment.php
 

Attachments

  • LightningTutorial1.png
    LightningTutorial1.png
    7.5 KB · Views: 7,030
  • LightningTutorial2.png
    LightningTutorial2.png
    36.6 KB · Views: 6,939
  • LightningTutorial3.png
    LightningTutorial3.png
    37.1 KB · Views: 7,176
  • BlueWaves.jpg
    BlueWaves.jpg
    1.8 KB · Views: 11,695
  • LightningTutorial7.png
    LightningTutorial7.png
    7.2 KB · Views: 6,986
  • LightningTutorial6.png
    LightningTutorial6.png
    5.6 KB · Views: 6,963
  • LightningTutorial8.png
    LightningTutorial8.png
    195.4 KB · Views: 7,144
  • LightningTutorial9.png
    LightningTutorial9.png
    575.3 KB · Views: 7,667
  • LightningTutorial10.png
    LightningTutorial10.png
    592.4 KB · Views: 7,550
Last edited by a moderator:
Level 14
Joined
Sep 28, 2011
Messages
968
You can improve just indicate that you can make easier the adding off lightning effect by editing the unit editor data in the ui folder.
At the end of this txt you see
[lightningEffect]
Sort=1
00=CLPB,WESTRING_UE_LIGHTNINGEFFECT_CLPB
01=CLSB,WESTRING_UE_LIGHTNINGEFFECT_CLSB
02=MBUR,WESTRING_UE_LIGHTNINGEFFECT_MBUR
03=CHIM,WESTRING_UE_LIGHTNINGEFFECT_CHIM
04=AFOD,WESTRING_UE_LIGHTNINGEFFECT_AFOD
05=HWPB,WESTRING_UE_LIGHTNINGEFFECT_HWPB
06=HWSB,WESTRING_UE_LIGHTNINGEFFECT_HWSB
07=MFPB,WESTRING_UE_LIGHTNINGEFFECT_MFPB
08=DRAB,WESTRING_UE_LIGHTNINGEFFECT_DRAB
09=DRAL,WESTRING_UE_LIGHTNINGEFFECT_DRAL
10=DRAM,WESTRING_UE_LIGHTNINGEFFECT_DRAM
11=FORK,WESTRING_UE_LIGHTNINGEFFECT_FORK
12=SPLK,WESTRING_UE_LIGHTNINGEFFECT_SPLK
13=LEAS,WESTRING_UE_LIGHTNINGEFFECT_LEAS
NumValues=14
you can increment the NumValuesand and add your lightning effect
 
Last edited:
Level 6
Joined
May 4, 2012
Messages
187
Wow! I really learned from this! >:D

But I got some lil questions, about the BlueWave thingy, I cannot see the 'BLUE' from the list in lightning effects! And I'm new in object editor. HAHAHA


Here is the SS. (Note that I already changed the Finger of Death to mana flare for enjoyment lol :DD )
537564_368592896529503_706446316_n.jpg


Hope you can answer soon! Tnx :)
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
It won't appear in the editor, the imported files only affect the game after the map's been loaded. So you can only use those lightning effects via triggers, or by modifying the built-in ones.

Sorry this is not true.

You can easily use imported one's by Shift Clicking on the lightning part on a spell in the object editor. Once you Shift Click it you can type in the code for the lightning yourself. So just type BLUE in there and you should be able to see it with the spell.
 
Level 19
Joined
Jan 22, 2011
Messages
3,979
is there a way to make this availe for imported
IMPORTTANT EDIT:
in the SLK, at the prace were you write the Dir, you can write war3mapImported to add ANY custom imported skin to the map, it woks it you leave the war3Imported\[your imported BLP] in the import manager, attached i images that proves it!!!

attachment.php


the other image is in the tumbsmail.
 

Attachments

  • example.jpg
    example.jpg
    16 KB · Views: 539
  • WC3ScrnShot_031913_210933_01.tga
    1.8 MB · Views: 115
Last edited:
Level 2
Joined
May 27, 2013
Messages
17
i don't want monsoon. i am customizing monsoon. i was using monsoon as an example of a spell that has lightning falling from the sky....i just want that. cuz when i used this ability it was finger of death and it was a straight beam-like thing. i want it vertical and i don't know how to do that with GUI and i don't know much JASS
 
Level 19
Joined
Jan 22, 2011
Messages
3,979
it kinda does relate to this post actually. he says in his tutorial that "GUI users will need to use some JASS here" but doesn't explain how to do so
He is talking about other methods to make other effects, sight... To make a like moonsooneffect: Create a dummy flying unit over the point/unit where lightning will fall, preferable at an insane hight. Them, just make the GUI, so when the spell is casted, the unit apears, and them you use the special effect create lightning effect, and you set it between the unit and the point/target. Got it?
 
Level 19
Joined
Jan 22, 2011
Messages
3,979
You can improve just indicate that you can make easier the adding off lightning effect by editing the unit editor data in the ui folder.
At the end of this txt you see
[lightningEffect]
Sort=1
00=CLPB,WESTRING_UE_LIGHTNINGEFFECT_CLPB
01=CLSB,WESTRING_UE_LIGHTNINGEFFECT_CLSB
02=MBUR,WESTRING_UE_LIGHTNINGEFFECT_MBUR
03=CHIM,WESTRING_UE_LIGHTNINGEFFECT_CHIM
04=AFOD,WESTRING_UE_LIGHTNINGEFFECT_AFOD
05=HWPB,WESTRING_UE_LIGHTNINGEFFECT_HWPB
06=HWSB,WESTRING_UE_LIGHTNINGEFFECT_HWSB
07=MFPB,WESTRING_UE_LIGHTNINGEFFECT_MFPB
08=DRAB,WESTRING_UE_LIGHTNINGEFFECT_DRAB
09=DRAL,WESTRING_UE_LIGHTNINGEFFECT_DRAL
10=DRAM,WESTRING_UE_LIGHTNINGEFFECT_DRAM
11=FORK,WESTRING_UE_LIGHTNINGEFFECT_FORK
12=SPLK,WESTRING_UE_LIGHTNINGEFFECT_SPLK
13=LEAS,WESTRING_UE_LIGHTNINGEFFECT_LEAS
NumValues=14
you can increment the NumValuesand and add your lightning effect
Forggot how to do this, any explains?
 
@Pailian:

You would have to look at this tutorial:
http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/modding-we-trigger-editor-52529/

Although, I don't recommend adding your own constants. Other users won't be able to open your map in the editor unless they have the same data in their UI folder. (I mean, technically you can use it as a really soft, easy-to-break protection) I don't remember which file it is though. It is most likely UI/WorldEditStrings.txt, judging by the text in that post. Note that you will have to extract this file from War3patch.mpq using an mpq editor (such as MPQMaster).
 
Level 19
Joined
Jan 22, 2011
Messages
3,979
So, I know this is some bad necro posting, and double posting, but I really have an important question.
How do you use this with trigger created lightnings? because If I use a spell, I would have to keep casting it until eternity so that the lightning effect doesn't fades, which would surely cause lag.
 
Top