MY GAME IS A SCRIPTING NIGHTMARE! I NEED HELP!

Posts

Pages: 1
Okay, I've been having a LOT of problems programming (sorry for calling it scripting in the title) the game I want to make, so I decided to come here to ask for help. However, I'm only going to ask for a couple things at a time so that I don't create walls of text (at least, I hope I don't).

1: My game has lots and lots of characters, and I'm not trimming the list, nor am I killing anyone off. Instead, I plan on having a system for switching party members at will (at one fixed location, of course). Coding that seems really hard right now, though. Could someone help me to program that?

2: I'm trying to make a level-up item (like Pokemon's Rare Candy), but I can't seem to figure out how to make the game easily detect who's in the party and in what position. Is there some simple way to do this that I'm overlooking?
You'll need to say what maker you're using. Certainly if it's xp or vx you can do the first one with events, and probably the second one too. Older makers...I haven't used so I'm not sure how flexible the eventing is.
SunflowerGames
The most beautiful user on RMN!
13323

Yanfly has already done this for you (if your using VX Ace.)

No limit to your party size, up to 5 character in battle,
and the ability to change party members in mid battle.

Otherwise you should be able to change you battle party
from your menu at any time.
Sorry for not specifying, but I'm using RM2K3. I don't have the money for the newer versions (yet. When I get the money, I'll probably buy VX).
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
"scripting" had made me think a newer RPG Maker, since RM2K3 doesn't, uh, allow any form of scripting.
Fortunately this can be done trivially with just dialogue options by talking to dudes in your base or whatever if you don't want to figure out how to make custom menus. You just make a room where when you enter it removes everyone from your team but the main character, and you can talk to people to have them join. There are hundreds of other ways to do party switching, but this is an extremely easy one since you seem to be having trouble.
Hmmm... I never thought of that. That's brilliant! Simple, yet effective! Thanks! And sorry for calling it "Scripting". I meant "programming".

However, I'm still having trouble with the level-up item. Do you know how I could accomplish that easily?
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
You can't easily detect who's in the party and in what position. But, in the room where the team members get added, each time the player adds a character to their team, you can set a variable indicating who just got added in what slot.

You'll need five variables: Number of Party Members, Character 1, Character 2, Character 3, and Character 4. When entering the room, set the number of party members to 1, and set the first variable to the main character (assuming he never leaves). When adding a character to the team, first increase the Number of Party Members by 1, and then use a conditional branch to detect what the variable is. In the conditional branch, set the either the Char 2, Char 3 or Char 4 variable to the ID of the character being added, depending on whether the number of party members variable is 2, 3 or 4.

Now you have variables telling you who's in each slot. Whee! When using a rock candy, you can call a common event that displays a choice to the player. If your Character 1 variable is variable #41, then the first one of the choices should be, \N[\V[41]], which will display the name of the character whose ID is stored in variable #41.
Thanks! I have some other problems, though.

3: If I make the battle music start before an event battle (like Golden Sun does with Mimics), After the battle ends, even if I have the event resume the map's music right away, the battle music plays for a split second before the map's music resumes playing. Is there a way to prevent this?

I had more, but I can't remember them right now. I'll list them later.
re: Party Makeup; There's condition branches and page conditions for 'If X is in the Party' and there's a variable to track the size of the party. There's no native mechanism to see the order of the party though.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
author=TheLastDraconian
3: If I make the battle music start before an event battle (like Golden Sun does with Mimics), After the battle ends, even if I have the event resume the map's music right away, the battle music plays for a split second before the map's music resumes playing. Is there a way to prevent this?
Not within RPG Maker itself. You could edit the MP3 file in Audacity to add 0.5 seconds of silence at the beginning of it, I guess. Then no one would be able to tell that it had played the first split second. (Audacity is free and stuff like this is really super easy to do in it)

This'll be noticable when the song reaches the end and loops, though. If it's a boss battle that takes more than a couple rounds, and you feel comfortable playing around in Audacity, you might want to try to loop it four or five times within the actual MP3 file, so that it has to play for four or five times as long before RPG Maker reaches the end of the file and loops it back to the beginning where the pause is.
It's risky, but you can also try running a parallel process that keeps track of the time of the current song. Let's say you have a variable "Music Duration" and you increase it by 1 every frame. When it reaches a certain value corresponding to the end of the song, you can switch to a similar background music track that doesn't have the .5 seconds of silence. Or even delay the song playing until a certain point by using this variable that keeps track of time.

You can also use Disharmony (http://www.uglyhorst.de/rPG%20Maker/patches) to set loop points within mp3 music files.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
If he's getting this issue in the first place, it's because loading an mp3 lags the game by that much. Manually loading MP3s at specific times demonstrably doesn't work, in other words. It creates exactly the amount of lag he's already experiencing.

0.5 seconds of silence + custom loop point via Disharmony is a good solution, though. A better solution than my stupid idea of making the song five times longer, at least, which would probably just make it take five times longer to load up and start playing.

As an aside to this, I should mention to everyone that Disharmony loop points do not seem to create that music loading lag, because they start the music streaming from a certain point instead of loading it all over again.
Okay, first of all, it's a battle theme from the XP RTP. It's pre-looped, and it's a MIDI, not an MP3. Will Audacity still work for that?
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
I have no idea! Probably!

but man if you're using midis I don't know why this is even happening in the first place; it seems like if the first thing you do after the battle ends is change the music, it should start the new song immediately. Is the song you're playing afterwards an mp3?
No. It's also a MIDI. I have no idea why this is happening. I'll try to modify the battle theme in audacity when I get the time, though.
Hmm... Before you edit any raw data of your game resources, have you tried fiddling with the point at which you change the music? This sounds like some kind of sound card buffer issue or even a bug in the original XP script coding.

Instead of doctoring the music, try playing a short .mp3 or .wav of silence (as a BGM), then changing the music.

Edit: Whoa, I forgot that this was RPG Maker 2003. Below, Locke is right: sometimes you have to be creative within the engine instead of trying to force it to do what you want it to do. But I'd encourage you to keep messing around with event commands for now. Like trying the Memorize BGM command.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
You could possibly just avoid the entire issue by changing the victory music change to be the same as the battle music too, and then have the music fade out slowly as the cut scene starts after the battle.

In RM2K3 you'll find that a sometimes, unfortunately, you have to change how your game works in order to be possible within the engine. And sometimes even if you don't have to, it's just so much easier that it's not worth the effort of making it exactly like it was in your mind.
Pages: 1