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?
Tweaking enemy formations based on party size?
Moderators: marionline, SDHawk
- SwordPlay
- Chemical Slime
- Posts: 966
- Joined: Sun Jan 22, 2017 9:32 am
- Location: London, England
- Contact:
I think you might use this section to tweak formations. Adding or removing enemies.
http://hamsterrepublic.com/ohrrpgce/doc ... 0Functions
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/doc ... ecountdown
http://hamsterrepublic.com/ohrrpgce/doc ... 0Functions
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/doc ... ecountdown
Last edited by SwordPlay on Sun Mar 11, 2018 5:20 am, edited 5 times in total.
- FnrrfYgmSchnish
- Metal Slime
- Posts: 741
- Joined: Thu Jun 18, 2009 4:37 am
- Location: Middle of Nowhere
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.
-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.
Code: Select all
if(hero by slot(#) == -1)
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.
Last edited by FnrrfYgmSchnish on Sun Mar 11, 2018 8:33 am, edited 1 time in total.
FYS:AHS -- Working on Yagziknian NPC walkabout sprites
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))"
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))"
Last edited by TMC on Sun Mar 11, 2018 1:28 pm, edited 1 time in total.