Randomizing battle backgrounds?

Status
Not open for further replies.

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Maybe it is something simple I am overlooking but is there a way to set up more than one battle background for random enemy encounters? I just put together a fun simple fighter game and am tired of every single person, even the bosses and secret fights getting the same background. I know how to set up music and that's all good. What about backgrouds?

In case this info is relevant to my troop background concerns:

There is no traveling. the game starts automatically once a player hits either continue or new game and everything is controlled in a single event on one map: character selection, shop selection, character menu, etc.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Are your battles random encounters set up on the map, or are they triggered from map events?


If from events, add the following logic to the event before the Battle Processing call:


1. Set a variable to a random number between 1 and however many different backgrounds you want


2. Do a series of conditional branches (nested or not) to check if the variable is 1, 2, 3, etc


3. Inside each condition, do a Change Battle Back and set a different background


4. To save time checking each additional condition once the correct one has been found, add a Jump to Label


5. After all the conditions, just before the Battle Processing call, add the Label that's referred to above.


If you call battle processing from several events, put all of the above into a common event (NO TRIGGER), and on the events that trigger the battle, just have them call that common event.


If your battles are set up as random encounters on the map properties, then you'll have to use a script to change the battle back.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
if the battle starts using an event, there are event command for changing battle backgrounds


EDIT: oh Shaz posted... :)
 
Last edited by a moderator:

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
edit: deleted post as it was already covered while I was typing and better explained =)
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
@Venka - per tile is only for World type tilesets, else it's just a blurred background if nothing is specified... :)


@CWells - so, is it evented battles or random encounter?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
ugh! He said in the first post that it's random. I should have re-read that, as I didn't pick it up.


So how do you want them randomized? You wouldn't want ANY floor with ANY wall, so only in the pairs that Ace already uses? Did you check to see if there's already a script that does this?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I think I saw one for random encounters... if not,I might be able to make you one in a moment, just say so
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Sorry guys let me rephrase the random part. The battles are triggered by a map event as everything is being operated by an event. It is not walking around and fighting.

What I should have said was, "I have created a variable to randomize the enemy encounters within the event, mimicking an arcade style fighter where you go from stage 1 to 2, 3, blah blah."

So it is basically:

Enemy select variable random 1-14

if 1 then

if 2 then

if 3 then

So it's all evented battles.

I will check Shaz's idea. It should work for me...

Yes, I see the option in the event commands on page 3. Okay, this will work.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yes, that should work. You'll just have a lot of conditional branches to check for each background.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Yes, that should work. You'll just have a lot of conditional branches to check for each background.
Nah I wont need any extra conditionals for this. I just assigned backgrounds to each of the characters you fight without randomizing it. Easier that way. No need to have more conditionals in a conditional for my enemy selector. It's all good now =D
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top