Help - Search - Members - Calendar
Full Version: [Resolved] AI Fights and Stats
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion
Sashikinaroji
Ok, so, for my game, I wanna have a section of the world where monsters fight each other as AI, with absolutely no input from the player. I also want the outcome of said fights to be semi-random, based only on chance and skills of the monsters that fight.

That is, I want the outcome to be unknown to everyone, even me, the creator of the game!

The reason for this, is taht I don't want a definite pattern (such as, if Enemy A and Enemy B fight, Enemy B will always win), but something more along the lines of an actual battle, prefferably using the actual battle scene, where the monsters kill each other.

furthermore,

I have 10 possible contestants, and I want the game to decide, by variable, who will fight who, but do not want to event every single possible outcome of this randomization (it would take very long), and as such, I would like to know if there is some way to replace the variables with the correct names (NVM, I think I know how to do this, have the variable be the troop number, right? Correct me if I'm wrong).

And, after the characters are selected, I want the stats for the two contestants to be put up on the screen side-by-side so that the player can see how they match up...

but, again, I want this to be as compact and painless as possible (and how I see it now, this will be quite painful.

So, things that I will need:

A way of displaying randomized names based on variables, to be put in a text box
A way of displaying two sets of enemy stats outside of the battle scene, based on what was displayed in the text box
A way of making the two enemies who were priorly selected fight to the death (preferably without turning them into characters).
A way to find out who won said fight.
BasharTeg6
QUOTE (Sashikinaroji @ Apr 11 2010, 10:55 PM) *
Ok, so, for my game, I wanna have a section of the world where monsters fight each other as AI, with absolutely no input from the player. I also want the outcome of said fights to be semi-random, based only on chance and skills of the monsters that fight.

That is, I want the outcome to be unknown to everyone, even me, the creator of the game!

The reason for this, is taht I don't want a definite pattern (such as, if Enemy A and Enemy B fight, Enemy B will always win), but something more along the lines of an actual battle, prefferably using the actual battle scene, where the monsters kill each other.

furthermore,

I have 10 possible contestants, and I want the game to decide, by variable, who will fight who, but do not want to event every single possible outcome of this randomization (it would take very long), and as such, I would like to know if there is some way to replace the variables with the correct names (NVM, I think I know how to do this, have the variable be the troop number, right? Correct me if I'm wrong).

And, after the characters are selected, I want the stats for the two contestants to be put up on the screen side-by-side so that the player can see how they match up...

but, again, I want this to be as compact and painless as possible (and how I see it now, this will be quite painful.

So, things that I will need:

A way of displaying randomized names based on variables, to be put in a text box

You can store text in variables using a script entry. When I'm at home I will edit in an explanation.

A way of displaying two sets of enemy stats outside of the battle scene, based on what was displayed in the text box

Again, you could probably use a script entry for this.


A way of making the two enemies who were priorly selected fight to the death (preferably without turning them into characters)

What battle system are you using? If you are using the default system, the ONLY way to make them fight using the battle scene would be to make one of them a character and the other an enemy troop, and checking "auto battle" for the character. However, you can also create skills that cause them to damage a random ally. The only problem with that is it might limit the kinds of abilities you can give them. If you decide against the battle system, you can just randomize variables and have the outcome determined by chance.


A way to find out who won said fight.

If you're going to go with my suggestion and make them characters, you just need to check the option for the defeat case and go from there.
Sashikinaroji
sorry, was in a post when I hurried... biggrin.gif

Anyways, the system I am using is an SBS, Tenkanai's (sp) which is edited by (shootdang, I forgot who it was edited by... haha)... Anyways, I kinda want to have the player actually watch the fight, which is why I want to use the battle scene...

I figure I can work something up to make the enemies fight? Idk... I really don't want ot have any unneccesary chars in this game... But I guess I have no choice.

Hrm... So, I would need to have an unbreakable berserk on my monster character, in order for him to be uncontrollable, (or, yeah, check auto-battle, haha!)

So, how would you suggest setting up these chars and such???
Sashikinaroji
Bumped for lack of edit on Bashar's part (perhaps help from someone else, eh?)
BasharTeg6
Eh, I didn't notice your edit.

Making the chars should be simple enough, though I don't know how it would work with a SBS. Can't help you in that department - all I use is the modified default system.
XZidDede
QUOTE
So, things that I will need:

A way of displaying randomized names based on variables, to be put in a text box

A way of displaying two sets of enemy stats outside of the battle scene, based on what was displayed in the text box

A way of making the two enemies who were priorly selected fight to the death (preferably without turning them into characters)

A way to find out who won said fight.

The easiest way I can think of is set up a dummy party that does auto-battle, and then have the enemies be immortal. That way, the battlers will autobattle, and you can control who wins. You'll probably want as many new actors as the max possible battlers in a party per battle (i.e. if every group can only have up to 1 person, you'll only need 1 new actor), then just change the actor graphic before the battle. I guess the cost of that is a lot more troops, though. As for the rest, you'll probably need at least 1 or 2 variables, and a bit of scripting (unless you want to make it REALLY difficult).

I could do the scripting, but I really don't feel like it (sorry...). If anyone else is interested, you'll probably want an array to get the troop id values. Then, use that information to get the name and stats, and remove the loser's id from the array every battle.

Btw, if you don't want it to look like the same side will always win a battle in Tankentai, just randomly change the switch that controls back attacks.
Sashikinaroji
QUOTE (XZidDede @ Apr 13 2010, 08:01 PM) *
The easiest way I can think of is set up a dummy party that does auto-battle, and then have the enemies be immortal. That way, the battlers will autobattle, and you can control who wins.


Sorry, but that is'nt what I want... I just want the chars to be able to battle each other as if they were a player and a monster (that is, the result isn't always the person with the best stats, but the person who used their skills more wisely)...

I didn't want to use variables to control who won, because I wanted the SBS to show the fight, and I don't know, and don't want to know, how to set who wins by variables...

So, because I consigned to making the contestant the player chooses a character, I can make this much easier, and will only need:

A quick "how-to" on setting up variables to display names based on Monster names.

A script that displays battle stats of monsters (perhaps some sort of modified bestiary?)

And some advice on how to balance the monster contestants to the character contestants (because they just don't seem to be very evenly matched, even if all their stats are the same...
BasharTeg6
QUOTE (Sashikinaroji @ Apr 14 2010, 02:04 PM) *
A quick "how-to" on setting up variables to display names based on Monster names.

It's actually really easy. You'll need 2 variables - the first one (MonsterVAR, variable number 10) will determine which monster's name is selected, and the second (MonsterNAME, variable number 20) will store the name. So say Slime is monster 1. Set MonsterVAR = 1. Now, you can use a common event to set MonsterNAME. With a conditional branch, check to see if MonsterVAR is 1. If it is, use the script command and enter this line: $game_variables[20] = "Slime"

Do this for each monster you want. If you want to put more than one of these in the same text box, you will probably need to duplicate the process with a different MonsterNAME variable (like MonsterName2,) which really shouldn't take that long with copy and paste. Then in the text box, just put \v[20] for wherever you want the variable name to be.


And some advice on how to balance the monster contestants to the character contestants (because they just don't seem to be very evenly matched, even if all their stats are the same...

Test, test, and test some more.
Sashikinaroji
QUOTE (BasharTeg6 @ Apr 14 2010, 02:51 PM) *
QUOTE (Sashikinaroji @ Apr 14 2010, 02:04 PM) *

And some advice on how to balance the monster contestants to the character contestants (because they just don't seem to be very evenly matched, even if all their stats are the same...

Test, test, and test some more.


I was afraid you would say that...

Well, I suppose that is alright, but what about displaying the enemy stats?

You see, I would just go and make pics of it, but I want them to be in windows... Also, I want the windows to match the player's chosen skin (I have a skin selector in the game I am making, so they can change color and style)

Do you have any ideas?
BasharTeg6
QUOTE (Sashikinaroji @ Apr 15 2010, 07:36 PM) *
QUOTE (BasharTeg6 @ Apr 14 2010, 02:51 PM) *
QUOTE (Sashikinaroji @ Apr 14 2010, 02:04 PM) *

And some advice on how to balance the monster contestants to the character contestants (because they just don't seem to be very evenly matched, even if all their stats are the same...

Test, test, and test some more.


I was afraid you would say that...

Well, I suppose that is alright, but what about displaying the enemy stats?

You see, I would just go and make pics of it, but I want them to be in windows... Also, I want the windows to match the player's chosen skin (I have a skin selector in the game I am making, so they can change color and style)

Do you have any ideas?


Check out the scripting tutorials here. They give you ideas for making basic windows. If you can't find a script to do it for you, that might be the next best place to look.
Sashikinaroji
QUOTE (BasharTeg6 @ Apr 15 2010, 07:18 PM) *
QUOTE (Sashikinaroji @ Apr 15 2010, 07:36 PM) *
QUOTE (BasharTeg6 @ Apr 14 2010, 02:51 PM) *
QUOTE (Sashikinaroji @ Apr 14 2010, 02:04 PM) *

And some advice on how to balance the monster contestants to the character contestants (because they just don't seem to be very evenly matched, even if all their stats are the same...

Test, test, and test some more.


I was afraid you would say that...

Well, I suppose that is alright, but what about displaying the enemy stats?

You see, I would just go and make pics of it, but I want them to be in windows... Also, I want the windows to match the player's chosen skin (I have a skin selector in the game I am making, so they can change color and style)

Do you have any ideas?


Check out the scripting tutorials here. They give you ideas for making basic windows. If you can't find a script to do it for you, that might be the next best place to look.


The closest thing I found was Modern Algebra's Bestiary script.. But that isn't nearly close enough...

I just want something that will come up like this:
[Show/Hide] example


and the closest anyone has offered is half of that, and only as a menu item that displays a list of monsters opposite it...

I just want the variable to select the monster, and then have the monster data displayed accordingly... with included picture.
BasharTeg6
QUOTE (Sashikinaroji @ Apr 15 2010, 11:23 PM) *
The closest thing I found was Modern Algebra's Bestiary script.. But that isn't nearly close enough...

I just want something that will come up like this:
[Show/Hide] example


and the closest anyone has offered is half of that, and only as a menu item that displays a list of monsters opposite it...

I just want the variable to select the monster, and then have the monster data displayed accordingly... with included picture.


You're going to have to script for something like that. Eventing won't be enough. I suggest requesting it in the Script Requests forum, but this is as far as I can help you.
Sashikinaroji
Well Bashar, thanks for all your help!

Without you, I would still be stubbornly sticking to my dreams of event based amazingness and full auto battling (it can really only go so far, ya know?

[accepting no new replies]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.