Author Topic: [UA] Implementing finite number of random encounters?  (Read 157 times)

Offline Zeea

  • Newbie
  • *
  • Posts: 5
[UA] Implementing finite number of random encounters?
« on: April 11, 2017, 05:42:42 PM »
I really enjoyed Pool of Radiance's limited random encounters per module. It made random combats feel a little less pointless when you could clear them all out and get credit for it.* Is there any way to implement that in FRUA? I figured out how to make encounters contingent on "quest in progress" and have them increase a quest stage each time a combat was resolved. But I couldn't figure out a way to complete the quest once it reached a certain step. I'm not entirely positive it can be done, but I thought I'd ask here to see if there's something I'm missing.

*Slowly killing a zillion goblins in PoR's laggy engine, over and over again, wasn't that fun. But the basic concept was fun and would be awesome with more interesting monsters.

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1921
Re: [UA] Implementing finite number of random encounters?
« Reply #1 on: April 12, 2017, 12:44:03 AM »
Here is one way that should work, assuming each of the "random encounters" is achieved by a step event, and that all of the random combats are in the same step event chain.

In the same step event chain, create a Quest Stage event at the top of the chain (ie, before the combat events). In that Quest Stage event, set the "stage" setting to however many random encounters you want to occur before the dungeon is "cleared", +1. Select "Automatic (no question) from the "Accept" drop-down menu. Turn on the "Quest completed upon acceptance" button -- this will set the quest as "complete" (value 255) so that the "quest in progress" trigger will not longer be satisfied and the combat events will cease being activated. If you want further text or other events to occur when the dungeon is cleared (eg, a Gain Experience event), you can include those events in the "Chain on accept".

If the random combat events are found in different step event chains then you can either place the Quest Stage event (as above) that the top of a step event chain that happens on "every 1 step" in every zone where the combat events can occur, or duplicate the Quest Stage event at the top of each chain that includes one or more random combat events.

Hope that makes sense.

Offline PetrusOctavianus

  • Sr. Member
  • ****
  • Posts: 389
Re: [UA] Implementing finite number of random encounters?
« Reply #2 on: April 12, 2017, 03:14:23 AM »
I remember the ancient design (from 1993) Kobold Uprising had a finite amount of random encounters in the starting town.

Offline Zeea

  • Newbie
  • *
  • Posts: 5
Re: [UA] Implementing finite number of random encounters?
« Reply #3 on: April 12, 2017, 05:10:06 PM »
steve_mcdee: Thanks! That makes perfect sense. Think I was misunderstanding how the Quest Stage event worked until now. Very much appreciated.

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1921
Re: [UA] Implementing finite number of random encounters?
« Reply #4 on: April 12, 2017, 06:09:13 PM »
Think I was misunderstanding how the Quest Stage event worked until now.
Very easy to do. In that case, I had perhaps better just check how you are advancing the quest stage by one each time a random combat occurs. The way I think I would do this is as follows.

Chain a Utilities event immediately after each random combat event. Set the Combat event so that the Utilities event will happen only "if event happens". In the Utilities event, make it so that 1 "is added to" the relevant quest you are using.

Offline Null Null

  • Maker of excessively difficult vanilla mods
  • Hero Member
  • *****
  • Posts: 551
Re: [UA] Implementing finite number of random encounters?
« Reply #5 on: May 20, 2017, 09:09:39 PM »
Since 'failed' means 128 and 'completed' 255, if your number of encounters is a factor of 255 (or 128), you can just increment by that at the end of each encounter and your quest will be set to 'completed' or 'failed' automatically.

255=51x5=17x15=85x3. So if you wanted 15 random encounters you could increment by 17 each time and only check as long as the quest wasn't completed. After the 15th encounter the quest will reach 255 and you are done.

What does everyone think?

Offline ProphetSword

  • Mod Designer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2859
  • FRUA Lives!
    • Lands of Adventure
Re: [UA] Implementing finite number of random encounters?
« Reply #6 on: May 21, 2017, 06:48:41 AM »
If it works that way, it's brilliant!  I may have to utilize this in the future.
LANDS OF ADVENTURE: An Old-School Style CRPG

More Information Here: http://landsadventure.blogspot.com/

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1921
Re: [UA] Implementing finite number of random encounters?
« Reply #7 on: May 22, 2017, 12:08:11 AM »
Yep, that would seem to work, and will save you one or more events compared with the way I suggested.