Snacktaveous 0 Posted May 1, 2015 Hi, all! I've made a boss fight where a shark fights the party and then it's joined by pirates at the halfway point. In combat with the shark boss, pirates show up as the shark's backup once its health is below 50%. The shark has an attack that kicks in at 50% health or lower, allowing it to eat a random pirate ally for health. The issue I'm trying to fix is that if the heroes defeat all of the pirates (or the shark itself gobbles them all up), then the shark will still have the pirate-eating attack kicking in at less than 50% health, but unfortunately it won't have any more allies to eat...but it'll keep using the attack and eating non-existent pirates. I playtested the battle to make sure that the shark would have an issue with still using the "eat an ally" attack after all its yummy friends were killed, and that issue did indeed happen as expected. How do I set up the battle so that the shark boss only uses the "eat an ally" attack while its pirate allies are present? (bonus points if you know how I could use the system to trigger pirates to start randomly attacking the shark in addition to the party after it eats one of them ) Does anyone out there in the community have any ideas to help my shark boss dreams come true? I'm willing to try anything. Thanks! Share this post Link to post Share on other sites
devonm0 37 Posted May 1, 2015 I have something, but depending on how many pirates you have join the battle, it might not be worth the effort. However, I'll let you be the judge of that. So this is what I have. You'll need a variable set to random, with the range being twice the number of attacks that you have programmed for the pirates to use. You'll also need a state that you otherwise won't use. It should be a dummy state, that will only be used as a flag for a conditional branch. On top of that, a copy of each attack the pirates use will need to be made, so you'll have one that targets allies, and another that targets enemies. I'm going to assume that you have the skill itself all figured out, so to start, any attacks that the pirate enemies have on their own profiles, delete. They'll only get in the way if you choose to use this method. This method relies entirely on the event pages present on the troop profiles. First off, as I'm sure you're aware if you're as far along as you seem to be, Set the troop's first event page to trigger when the shark's hp is below half, to make the hidden pirates appear. Also, if you want to have the shark not eat a pirate the turn they arrive, use this page to set a state to the shark, though it doesn't have to be stun or an equivalent. I'll tell you why later. This of course is set to happen only once. Next, on a second event page, also set to the shark's health being at half or lower, though you can also click the 'at the end of the turn' condition if you want it to not happen first. Take heed, this method requires the pirate eating thing to happen either first or last in a turn. Also, if you don't want to have it happen every turn, use the conditions to set it to happen every so many turns. This is unfortunately the best I could do. Also, I couldn't make it random without making the boss itself a potential target of what you want to have happen, you an order has to be set up for the pirates to be eaten. To make it work properly, you want to set up a number of conditional branches equal to the number of pirates, and make them independent of each other. Have each conditional branch check if its corresponding pirate is visible. This way, if it has been slain or fallen victim to the shark, it will be ignored. Uncheck 'set handling if conditions do not apply'. We won't be using else, so to leave it there would be a waste of space. Now, if the space of each condition, Create a forced action event where the shark uses its eating thing on that pirate. Also, under the condition of the first pirate to be eaten, set up a series of change enemy state events, where you set each remaining pirate to have the dummy state mentioned above applied. Finally, at the bottom of the contents of each conditional branch, put a Jump to Label event. make the label whatever you want. Finally, at the bottom of the page, put a label for the previously mentioned event commands to jump to. This part is extremely important, because it is all that keeps the shark from feasting on all of the pirates at once. Now onto page 3. This will be a long one. Start by making a conditional branch checking if the second pirate has appeared. We'll do the first one last since it will have the shortest list of commands. So, for the second pirate, uncheck the box that controls the else, and in the space make the variable I mentioned. Below that control variables line, make a conditional branch that checks the pirate in question for the dummy state. This time, do not uncheck the checkbox. Now, in that new space, make yet another conditional branch, this one checking for the possibility of the first number in the random range popping up, leaving the checkbox checked. Then create a force action command where the pirate in question uses one of its attacks on the shark. Now copy that last conditional branch you made, and past a copy of it in the else field. Continue to paste more copies into the else field of the previous copy until you have one for each variable possibility. Change the fields accordingly, namely the number the branch checks for and the attack used. Make each odd numbered variable check correspond to an attack on the shark, and each even check have an attack on a random one of the player's characters carried out. I'm sure you can figure out what I'm talking about. Now for the reason i told you not to uncheck the else box for the branch that checked the status of the pirate. More branches. This time however, you want to have the variable checks be for every even number and below. So less than or equal to 2, 4, 6, etc. For however many it takes. This will be for the short time that the pirates spend acting normally. Once you have that taken care of, make a copy of everything you've done so far on page 3, and Paste copies of it completely outside of the previous condition fields. Make one for each pirate, including the first to get eaten. We'll come back to him later. For now, you just have to change a few things in each additional conditional branch. Make sure each appearance and status check corresponds to the correct pirate, as well as the force action. Make sure no pirate attacks twice by mistake. Once you've done that for all except the first pirate, the one I was saying we'd do last, go to his conditional branch and delete the portion that would only apply if the dummy state is applied to him. Since it will be his demise that causes the state, it's pointless to have it there. So get rid of that portion, and change the rest of it like you did the others. This should work, I'm only sorry it's such a long process. If you need any help fine tuning it, let me know. 1 Share this post Link to post Share on other sites
Snacktaveous 0 Posted May 4, 2015 Thanks, devonm0! It took a while but I managed to complete everything you said to do for the battle event pages to work correctly. That was my first time playing with random variables in a battle system and it was fun. Page three towards the end took a while, but I created a separate project dedicated to making sense of things on a smaller scale. Six pirates show up and Sharkules successfully eats them. I added in a line of text "Aaaaah! Kill the shark!" Every time sharkules eats a pirate (on page 2 on each conditional branch after the shark uses its devour attack). While playtesting, I found that the text would still be shouted, even after Sharkules was dead and no longer eating the two remaining pirates (the event's condition "sharkules' hp 50% or below" would admittedly still be true in that situation, but he's busy being dead, so it's funny that the text is still shouted.) My pirates only have a basic attack, which was pretty great for helping cut down on extra copying and pasting of attacks split between shark/heroes on page three. The perfectionist in me wants to have the pirates turn around and face Sharkules once he eats a pirate. Obviously he's the real issue for them in the battle. One thing I didn't end up doing was mentioned in your final paragraph, to change the first pirate's conditional branch to remove the dummy state portion. I was stuck on the idea that the player might kill that specific pirate before the shark could eat him, so I'd just have all pirates be the same as insurance. Still, I am more than willing to admit that my inability to wrap my head around the reasoning for that could be preventing something really cool from happening in the fight. As is, the shark just immediately eats a pirate, which I'm cool with Your response was quite fast and awesome. One million kudos! Share this post Link to post Share on other sites
devonm0 37 Posted May 4, 2015 (edited) I just realized I forgot something. When describing the first page, I mentioned a state to set to the shark to keep it from eating a pirate right away, if that's what you want. However, I never told you how to make it work. If you want there to be a delay before the shark's first meal, set a different dummy state to the shark at the end of the first page, then in page 2, create a conditional branch around the branches that check for the pirates being visible. In other words, create a condition that checks for the dummy state one the shark, and put each of the pirate appearance conditions in the else field. Afterward, create a change enemy state command under the label at the bottom of page 2, that removes the dummy state from the shark without giving it a chance to feast afterward that same turn. You can also combine this with what I said before about setting the shark to eat only once every few turns, though once again, it's up to you. Edited May 4, 2015 by devonm0 Share this post Link to post Share on other sites