Post new topic    
Metal Slime
Send private message
Tweaking enemy formations based on party size? 
 PostSun Mar 11, 2018 2:35 am
Send private message Reply with quote
One thing I've noticed playtesting my game Snowshoe Forest is that when it's just the main hero as single party member, encounters with regular enemies can be pretty dicey. But as soon as 1 or 2 allies join, the same battles are total steamrolls.

Was thinking of tweaking enemy formations to add more enemies based on party size, but I'm not sure how to do this. Can you rewrite foemaps? I can't find anything like that in plotdict.xml and I'm not sure what the best way to do this is. Make duplicate formations and use an instead-of-battle script to override them?
Chemical Slime
Send private message
 
 PostSun Mar 11, 2018 4:31 am
Send private message Reply with quote
I think you might use this section to tweak formations. Adding or removing enemies.
http://hamsterrepublic.com/ohrrpgce/docs/plotdict.xml#Enemy%20and%20Formation%20Functions

add enemy to formation (formation, enemy id, x, y, slot)


delete enemy from formation (formation, slot)


and "reset formation" and "reset formation slot"

Changes do not carry over in saves

"set battle countdown" might be helpful for controlling whether battle occurs or not.
http://hamsterrepublic.com/ohrrpgce/docs/plotdict.xml#about-setbattlecountdown
Liquid Metal Slime
Send private message
 
 PostSun Mar 11, 2018 7:58 am
Send private message Reply with quote
There are "is in party tags" for heroes and stuff like that, right? You could write an instead-of battle script that checks for heroes, and use a different formation set depending on how many you have. That sounds simple, right?
I can't write in cursive.
Metal Slime
Send private message
 
 PostSun Mar 11, 2018 8:33 am
Send private message Reply with quote
Rather than checking for each hero, maybe check to see which party slots don't have a hero in them and then shrink down the default "full strength" battle formation to something more appropriate for how many blanks you have.

Code:
if(hero by slot(#) == -1)


-1 is what the engine spits out in any situation where a script's checking for something but there's nothing there, so using hero by slot this way will tell you if slot # is empty.

If you have more than 4 heroes in your game that would make it a bit quicker, since you only have to do three checks rather than going down a long line of hero-in-party tags for everyone. There's probably an even simpler way of doing it, but that's the first idea that comes to mind.
Teekee -- Onboard the Big Humpty Star
FYS:AHS -- New demo released! Download it here!
Puckamon -- Not until the reserve party is expanded
Metal King Slime
Send private message
 
 PostSun Mar 11, 2018 1:27 pm
Send private message Reply with quote
What you're looking for is the "room in active party" command.

You could edit the formations with a script. But for more control you can do it manually, creating different formation sets for differing numbers of heroes, and pick one with an instead-of-battle script. You could use switch blocks, or just give the formation set variants consecutive IDs. Use the "random formation" command to pick from the set, like "fight formation(random formation(form set + room in active party))"
Display posts from previous: