We have moved!

Sunday, August 7, 2011

Simple Effects Tutorial

Be Advised Effects now run in the event system!!! This information is no longer accurate.

Compared to Items, effects offer a lot of options and a lot of complications. Effects bring about a change in a timed manner, either expiring after they are done or continuing on forever. They can also be designed to change what they do depending on other variables. Something Items are just not designed to do.

Go ahead and this time open the folder

/otherworld/libs/otherlibs/effectStuff/

drop your 12 x 12 image of the effect into

/effectImages/

It must be 12 x 12 or else it will look weirdly sized when viewed.

Open up effectInfo.xml with your notepad++.

For the most part when adding effects from the fan base the effects will be associated with an item. Either given when drunk or eaten or added by wearing an item such as a tattoo. This association creates an easy way to start them.

Once started the Effect is then triggered during each time frame. They are morning, afternoon, evening, night, shift (every shift or 1/4 day), cycle (a full day). It is very important that the right trigger is used or you will have unexpected results things will either grow to fast or to slow.

The basic effect options look very similar to an items... but with a lot fewer different categories. All of the following are required though.

name - The name of the effect make sure this matches the effect name used by the item that adds the effect. Also it is dropped to lower case and then re-capitalized by the game so, odd capitalizing will be lost.

file - where the item is in the /effectImages/ folder and its name.

description - The float over text description.

maxcounter - The max number of counters that the item can have. Counters can be removed each trigger pull. Resulting in the effect being removed over a given time.

startcounter - The counter to start on or add to the current counter total. This can be important if for like alcohol that add 1 counter each time.

timedremoval - does the item remove itself when its out of counters. (true/false defaults false)

timer - when to pull the trigger

associate - where to display the effect in the character screen (health/happiness/etc)

switcher - does this effect have if conditions. (more on this later) (true/false defaults false)

That's if for the basic effect characteristics. Now here is where it gets a bit complicated or simple. The simplest type is just a mod by itself with out conditions. Even with conditions the syntax for the mods are the same the way they fire is just a bit different. * are required.