• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

One-time Raids

Siegh

Thronar Developer
Joined
Mar 12, 2011
Messages
1,279
Solutions
1
Reaction score
637
Location
Brazil
Hello, I'm attempting to use the default raids as a rare spawn kind of thing. What I mean is that every X minutes, there is a small chance of some monster spawn at y location.

The problem is that since my desired intervals and chances aren't very hard to occur, it often causes the raid to trigger again and 2 or more of the rare spawn will happen, and that's not intended.

Is there some way to limit raid occurences to a one-time event?

This is my xml line:

Code:
<raid name="bloodskeleton1" file="bloodskeleton1.xml" interval2="60" margin="1" chance="7" enabled="yes"/>

Thanks in advance.
 
What TFS version are you using? Let me guess, either 0.3 or 0.4?

As far as I can see, there is no 'repeat' attribute for raids in 0.3/4 but it does exist in the TFS 1.x series (raids are non-repeatable by default there).

So if you've got any C++ experience, you could easily add it to your own source by looking at the TFS 1.x implementation.
 
What you want is probably better done by globalevents, since you have more control over what happens there than with xml-made raids, unless you want to edit sources like Ninja suggested.
+1
If I were setting it up I'd create a timer in global events for every 30 minutes to activate the lua file

the script would probably include
- Chance to trigger each event
- Maximum chances before a forced trigger of each event (to ensure no stagnant events)
- Multiple locations for a particular event (if event triggers it will choose random location from pre-set list)
- Area spawn or singular
- continuous or static spawning
- Use global broadcasts (before/after/at start) (all/some/none)
- Flexibility for other events other then just simple monster spawning (walls/ladders/objects | appearing/disappearing - for a quick example)
 
I'm currently using 0.2. But well, I guess I will stick to global events then.

Thanks for the support!
 
Back
Top