Jump to content
Sign in to follow this  
Ciar

[Guide] Effect Tool Usage

Recommended Posts

Hello! After posting in Herc and rAthena to ask about the effect tool files in the various official GRFs, it seemed no one knew how to edit them for usage in custom maps, so I gave up until a few days ago when i started tinkering again and finally figured it out. Turns out I was just being a nub and it wasn't as annoying as it seemed, so I decided to write a guide in hopes that others can use these in their maps to make them even more fabulous.

 

If someone figures out how to add/edit the other Effect Tools like Magic Floor or Evil's Paw, please post it below or in its own thread, it would be a big help for others!

 

I should note that I'm only going to post the bare minimum needed to get them working on your map. Everyone is encouraged to tinker around to discover different and better uses, methods, etc., and please let me know if any information provided here is incorrect or if there's anything I missed, etc, so that I may fix it. For this guide i used the 2014-04-16aRagexe client.

 

Useful/Needed:

  • Browedit 586, 620
  • Notepad++
  • Browedit 2
  • GRF Editor

 

First off, I should explain what is an "effect tool". They're used to add additional effects to maps. For every map that will use one, there is a .lub file in the GRF, under "data\luafiles514\lua files\effecttool" (File path may vary). The most commonly used effect tool function, which is the one I'll be talking about in this guide, uses the "EF_EMITTER" effect, #974. It is assumed you know how to work Browedit, at least enough to add a special effect and not crash.

 

The file will look like this below. 

Spoiler

_map_name_effect_version = 2
_map_name_emitterInfo = {
[0] = {
dir1 = {X, Z, Y}, 
dir2 = {X, Z, Y}, 
gravity = {X, Z, Y}, 
pos = {X, Z, Y}, 
radius = {X, Z, Y}, 
color = {R, G, B, Opacity/Transparency}, 
rate = {min#, max#}, 
size = {min#, max#}, 
life = {min#, max#}, 
texture = "effect\\filename.bmp", 
speed = {#}, 
srcmode = {#}, 
destmode = {#}, 
maxcount = {#}, 
zenable = {#}} 
}

Click below to see what some of these lines means.

Spoiler

_map_name_effect_version = 2 --- Your Map Name goes here, it must include _ before and after your map name. If your map name contains an @, like [email protected], omit the @.
_map_name_emitterInfo = { --- Same as above
[0] = { ---Just the number of the effect. Starts at 0 and must be increased by 1 for every EF_EMITTER effect you want to add/edit.
dir1 = {X, Z, Y}, --- Direction in which the effect can move/point to (360 degrees?)
dir2 = {X, Z, Y}, --- Additional movement in which the effect can move. The more varied the numbers are from "dir1" the more scattered it looks.
gravity = {X, Z, Y}, --- "Pull" of the effects. Direction where effects will gravitate to from the effect epicenter. Unconfirmed: Leaving as 0 sets it to EF_EMITTER's movement
pos = {X, Z, Y}, --- Doesn't seem to do anything, from the quick tests I did. It may change the position of the effect when viewed ingame (but not on the map files), with 0, 0, 0 meaning it stays in the exact location where specified by the map.
radius = {X, Z, Y}, --- Range the effect can appear in. Can make it so it appears in a small area from the epicenter or go all over.
color = {R, G, B, Opacity/Transparency}, --- Self explanatory! Leaving RGB at 255 will make it show the original color.
rate = {min#, max#}, --- Minimum to Maximum amount of particle effect that it can show. Untested if the first number can be higher than the second one.
size = {min#, max#}, --- Size in unknown amounts applied randomly. Presumably each number increases/decreases the size by 1%.
life = {min#, max#}, --- Duration in an unknown time unit, either seconds or milliseconds.
texture = "effect\\filename.bmp", --- Effect to show, from any file from texture, english only, korean and others don't seem to work (bmp and tga work, other files were not tested)
speed = {#}, --- Speed of effect movement, default is 0 AKA No Movement. If there is no movement, "dir1", "dir2" and "gravity" are inconsequential as the effect stays in one place.
srcmode = {#}, --- Changes certain behavior of the effect. On official maps, it is commonly "7" ([email protected], [email protected], [email protected]), but it has been seen at "5" on lasa_dun01~03, at "9" in prt_lib_q, and at "10" in morroc only. I tested this on 2014-04-16aRagexe, and at 5 the effect fades in more smoothly, and also allows for .tga files to show pretty nicely, while any other number it made the .tga files like fog2.tga look rather unsightly.
destmode = {#}, --- Most commonly it is at "2", but 4, and 7 has been seen as well. At 0 it seems to not apply transparency, meaning that black backgrounds will be shown.
maxcount = {#}, --- Presumably, max amount the effect will show at any given time. So far it's unknown if it affects or overrides the "rate" line above, or vice versa.
zenable = {1}} --- Can be 0 or 1. When set to 1, the effect can chop through the ground ("z fighting"). 
}

^This last line should end with a , (comma) if more effects will be added below.

 

To make whatever you want visible on your map: 

1. Add effect #974, EF_EMITTER to it. If you don't see it on your effects list, edit your effects.txt file on browedit's data folder to add it. When placing the effect, loop time seems to not matter, though to be sure, you may set it to 9999999 (9,999,999) which is what official maps commonly use.

2. Once you added EF_EMITTER wherever you want, save it, generate quadtree and whatnot so you can properly see your map ingame. 

3. Create a .lub file as seen above. You can also just copy it from what GRF editor shows as preview and edit from there, or use to decrypt from an official one.

4. Just change the numbers as you wish, pick effects, and add the file to your effecttool folder and check it out ingame.

Notes:

- It is unknown how it picks which emitter effect is affected, but I assume it corresponds with the order of the effect list in browedit.

- Missing a comma, etc will cause you to receive an error message ingame and the effects won't show.

- As mentioned previously, this guide only details how to work with EF_EMITTER. "EffectToolUtil.lub" and "effectfunc.lub" indicates other effects can be worked with, such as 1025 (EF_MAGIC_FLOOR) and 1039 (EF_EVILS_PAW), and regular effects, but I couldn't get these to work.

- Z axis in this file works the same way as Browedit (and water heights), where negative numbers raises the height while negative numbers decreases them.

- Images are flipped vertically. It's not possible to flip them back via effecttool, so effects like "heart_1.bmp" must be flipped manually and saved to GRF that way (with a different name so as not to mess up other effects).

 

Spoiler

Examples:

Large Lv-99-esque aura

[0] = {
dir1 = {-50, -50, -50}, 
dir2 = {0, 0, 0}, 
gravity = {0, 0, 0}, 
pos = {-212.5, -5, 242.9}, 
radius = {0, 0, 0}, 
color = {10, 100, 210, 200}, 
rate = {5, 10}, 
size = {10, 20}, 
life = {3, 10}, 
texture = "effect\\pikapika.bmp", 
speed = {1}, 
srcmode = {7}, 
destmode = {9}, 
maxcount = {50}, 
zenable = {1}}, 

 

Scattered Purple Orbs

[1] = {
dir1 = {50, -50, -50}, 
dir2 = {0, 0, 0}, 
gravity = {-2, -10, 1}, 
pos = {-240.3, -50, 316.2}, 
radius = {50, 50, 50}, 
color = {200, 200, 200, 200}, 
rate = {1, 10}, 
size = {1, 50}, 
life = {1, 20}, 
texture = "effect\\glow12.bmp", 
speed = {0}, 
srcmode = {7}, 
destmode = {2}, 
maxcount = {10}, 
zenable = {1}}

 

Screenshot isn't as compelling as a GIF, but here's an example of what you can do with the first example in the hidden spoiler above.

image.png.f5b36e172dd2e5dabd6d8354fa98779e.png

Let me know if any information provided here is incorrect or if there's anything I missed, etc, so that I may fix it.

Edited by Ciar
Made guide shorter and more to the point

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.