I've officially bogged myself down trying to figure this one out. I'm trying to event an arena betting side-game in which the player character can bet on other gladiator matches while he, himself, is not fighting, while simultaneously learning more about the fighting styles of the other gladiator to his advantage. What I'd like to do is choose a fighter from the upcoming featured fight to bet on, place any bet I choose up to the amount of gold carried, and then actually force the battle to happen between the two with a random outcome, like an auto-battle the player can watch, and receive gold or not based on the results.
I understand the betting mechanics so far as using a variable to equal the game data gold, and I kind of understand how to pay out odds. What I don't know how to do is make a bet on a specific fighter, then have the fight play out, then get paid.
I think I'm just overwhelmed, and can't seem to separate the pieces enough to go step by step. Can anyone make sense of it for me?
I'll try to post some screens once I get htings moving along, but right now my brain is in a knot.
I think you'd need a plugin to do this. For the auto battle bit I can't think of anything that'd let you in the base program.
Eventwise, I'd set up some betting tiers (i.e. a 50 gold bid, a 500 gold bid, and 1000 gold bid), it might be easier from here to let the plugin work take over from there, call like "Scene_Betting" or something after submitting a bet tier, have the plugin pick some enemies in a set list that you specify in notetags as gladiators and for each one generate a random opponent, have some kinda power level notetag for the enemies and have the plugin generate the odds based on that, call on the special battle scene(there's no way the plugin maker doesn't have a lot of work here lol.) have the NPC's fight, save the result, compare it to the bet of the player and payout (or don't) and then maybe a script call form there for like a "Congrats!" text or a "Better luck next time, kid" depending on the outcome. It's a great idea but yeah, there's no way you can do that without a specially made plugin
I myself would do this by setting the odds for the bet, then rolling a random number. If the random number is above x value (x is what you set based on the odds), then you win. Else, you lose. Only problem is, you can't see the fight this way.
I do agree it will probably take a plug-in to watch the battle between both as an auto-battle. However, maybe you could transfer the player to an arena screen where the battle plays out on the map instead? After all, you can show animations on the map via a command. You'd just have to manually keep track of HP of each battler, as well as a lot of if/else conditions to do the AI (if one is desired).
Ugh, I can't find anything that does what I want. That's okay, though, I'll do it without the visual arena battle. Instead, I'm trying to use common events for the arena betting mechanic. I'm still stuck on a couple of things.
I have the fights basically randomized within the variable for Arena Fight. 1 is if fighter 1 wins, 2 is if fighter 2 wins. How do I reflect the player's choice within the result, though? And how can i have the fighter names show up in the common event instead of fighter 1/fighter 2? (To be more specific, can I use one common event for all of the fighters, and just have something overwrite the fighter 1/fighter 2 with a specified variable. Say "Brondo (fighter 1)VS Kelvin(fighter 2)" is fight 1 and "Melbor(fighter 1) VS Pantaloons(fighter 2)" is fight 2, is there a way to store the names in the common event properly without making a different event for each fight, and have it show in a text box as the announced winner?)
Who do you want to bet on?
Fighter 1
Fighter 2
How much do you want to bet?
player input
THEN, how do I pay out appropriately? Do I just use a ton of if/else branches?
I'm trying to do something similar but for a horse race, and thinking i could play a movie of a horse race and then the results show, I just dont know how I'd name the horse or if I just go by Jockey 1, Jockey 2, Jockey 3, ect. It'd be hard to have a lot of different horse names, and randomize it without a plugin i think