Enemy encounter depletion

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Enemy encounter depletion

Post by Foxley »

I'm entertaining the idea of using after-battle scripts and other methods to cause enemy encounter rates in dungeon areas to become less frequent the more fights are won. I think this would be a good way to reduce the "UGH, so many freaking BATTLES" feeling players can get if they're going through a dungeon and need to do any amount of backtracking, and just keep getting caught up in fights that're either annoyingly easy or hard enough to where it just chews away at hero HP and MP excessively. I'd probably have it reset to the default values upon exiting the dungeon.

Any thoughts on this, either design-wise or does anyone have any insights on what plotscript commands would be good to use?
User avatar
FnrrfYgmSchnish
Metal Slime
Posts: 741
Joined: Thu Jun 18, 2009 4:37 am
Location: Middle of Nowhere

Post by FnrrfYgmSchnish »

Sounds like a neat idea.

I know I like to get into a lot of fights when I first get to a new area in a game (mostly to see all the different monsters that show up--it's really disappointing when people don't put hardly any variety in their random encounters, though...), but after a while I'm more likely to run from things, either in order to avoid overleveling, because I've already seen everything and gotten stolen/dropped items from them, or just because my characters are beat up and I'm trying to go heal so I don't need to be fighting anything at that point.

Having the encounter rate lower the more you fight makes sense, too. There's not an infinite supply of critters running around for you to fight or anything, and once you've killed a bunch of their kind some critters will naturally be more likely to avoid you. And resetting when you leave works, too--generally when someone leaves a dungeon area they're making a trip back to someplace else before coming back, which gives some time for the critters to come out of hiding or for new ones to be born/move in, depending on how much time's passed.
FYS:AHS -- Working on Yagziknian NPC walkabout sprites
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

Thanks for mentioning overlevelling, that's another cause for concern that could be addressed by this kind of system. I would also like to eliminate the need for players to run from battles just because they're sick of them, in addition to preventing overlevelling. The only time the player should run from battle is to narrowly escape getting party wiped by a dangerous enemy or set of enemies.

I'm at work right now so I don't have much time to get into Plotscript Dictionary and try to find relevant commands, but I'll try to look into it later tonight.
User avatar
FnrrfYgmSchnish
Metal Slime
Posts: 741
Joined: Thu Jun 18, 2009 4:37 am
Location: Middle of Nowhere

Post by FnrrfYgmSchnish »

Off the top of my head, my first thought is to use an after-battle script that increases a global variable whenever you win a fight. Upon leaving a dungeon, that variable is reset to 0.

Then an instead-of-battle script will check to see how high that variable is and possibly skip the battle, with a higher chance going by how high the variable gets.

Maybe something along the lines of "if a random number between 1 and 100 is less than or equal to (variable), no battle happens." That way you'd ALWAYS get a random encounter battle the first time you triggered one, and for a while the "no battle" chance would be pretty low even after winning several battles (probably not noticeable until you've won 10 battles or so, then 1 out of every 10 future battles will be getting skipped), but if you try to keep fighting the same monsters over and over to grind for experience you'll find the supply of battles drying up before too much longer. Random encounters would eventually stop coming entirely, though you'd need to fight 100 battles before the actual fight rate hits 0.

Maybe having the "no more encounters" point at a number lower than 100 would make more sense, though, since 100 encounters in the same area sounds like a huge amount... at least assuming the encounter rate isn't super high to begin with and this isn't some massive hours-long multi-level dungeon, anyway.
FYS:AHS -- Working on Yagziknian NPC walkabout sprites
User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Post by Mystic »

This is a good idea, and more games should do it.

The current version of Silhouette does something similar, but the context is vastly different (resources are not gained/lost through battles)

I've tied the encounter rate to filling the game's bestiary: the player is much, much less likely to encounter enemies they have already defeated and added to the bestiary. In fact, the only reason it's not zero is to still have some element of surprise.

However, this doesn't work when encounters don't only exist as a one-time puzzle. Still, I wish a lot of major titles did this - it makes me more willing to explore dungeons. (Extra experience through encounters feels like a punishment to me, especially when winning fights is about as fast as avoiding or running from them)

As for implementation, I imagine you're already catching your encounters anyway with instead-of-battle scripts. If not, you might want to start, because there are plenty of things you probably want to start tracking. The simplest thing to do would be to simply NOT run the encounter when you generate a random number that beats whatever your current threshold is, based on how many battles you've done. You might also do something else, like create a dialog box after you've been in a dungeon for a while that says "hey there's a monster but they aren't attacking - should we attack them?" and let the player say no to quickly get on their way, and lower the encounter rate as the player continues to say no until they really don't have to. (And you could also check the relative strength of the monster to give the player the choice only on weaker enemies, too, etc. etc.)
Last edited by Mystic on Wed Oct 15, 2014 6:47 pm, edited 2 times in total.
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

I'd think it would be cool for a "congrats, jerkwad, you over-hunted and made the landscape barren of all wildlife"
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
Pepsi Ranger
Liquid Metal Slime
Posts: 1457
Joined: Thu Nov 22, 2007 6:25 am
Location: South Florida

Post by Pepsi Ranger »

Tightfloss Maiden does pieces of this. Specifically, it tracks hero level and numbers of battles fought, then sets attack conditions accordingly. If the hero reaches a certain level that's equal or higher to the base level of the strongest enemy (since the OHR doesn't store enemy levels like it does hero levels, this value is arbitrary), then it triggers an auto-kill animation similar to what Earthbound does when the heroes are "over-leveled" for that area. Basically, in auto-kill, we see the hero taking out the enemy squad in one hit. It's one of the ways the game keeps random battles from getting too monotonous.

The player still gains experience from auto-kills, so over-leveling is still possible. But you no longer have to actually fight for it when faced against certain enemy types.

The battle counter is used to voice the player's thoughts through the main character's mouth. After 100 battles, for example, she'll make a comment to the effect that these battles are getting tiresome.

One person--I forget who--suggested I add a system that lessens enemy encounters if the player makes a habit out of running. I still haven't implemented that yet, but it's on my early to-do list. I think it's something worth considering for the type of system you're building.

Each of these systems is simple to implement. You just have to use global variables to track battles and let your after-battle scripts run resulting effects when special conditions are met. Also, I don't use the foemap for this system; I use each-step scripting, and that eliminates the need for instead-of-battle scripting while allowing for more complex ways of initiating battles--if that's what you want. I guess it could work either way, though.
Place Obligatory Signature Here
User avatar
Mogri
Super Slime
Posts: 4669
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Cthulhu Saves the World does something like this.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

I like the idea as well. If the purpose is to not be annoying, then I probably wouldn't entirely reset a dungeon after you leave it, though.

The only relevant script command is fightformation. There's no need to have both an instead of battle and an after battle script: fightformation returns whether you won the battle or not.

What I would do is to have a value that represents the number of enemies left in the dungeon. When you win a battle, decrease it by 1, probably with some lower limit, or allow it to be slowly replenished. The chance of an encounter would be the inverse of the number of enemies running about.
Post Reply