New account registration is temporarily disabled.

GREATREDSPIRIT'S PROFILE

sherman






o
Mario vs. The Moon Base
Mario must fight his way to Bowser's Moon Base to rescue the Princess!

Search

Filter

RPG Maker 95

I have the RM95 RTP in my locker. It has the music in the SYS/BGM folder.

[RM2K3] Help with variables.

Hopefully it'll help you with your own efforts to make a menu system. Good luck!

e: although looking at the last update for 2k3 it might've not been necessary after all!

[RM2K3] Help with variables.

Alright, here's a demo project: Download here.
Talk to Samurai Man and he'll ask what actor to get the stats for and one of a set of stats. He'll call a common event to put the requested stat into a single variable*. Then it'll call a second common event to break up a number into it's various digits, up to the thousands digit.

*After doing this changing the get actor stats to get ALL of their stats into a bunch of variables in a single Common Event might be better. Depends on implementation details.

If you can't open the project here's the various event codes:

Main User Interaction Event:

@> Comment: Get ActorID to show via a command choice for now
@> Text: Whose stat do you want to display?
@> Show Choices: \n[1], \n[2], \n[3], \n[4]
: When [\n[1]]
@> Control Variables: [0003:SourceActorID] = 1
@>
: When [\n[2]]
@> Control Variables: [0003:SourceActorID] = 2
@>
: When [\n[3]]
@> Control Variables: [0003:SourceActorID] = 3
@>
: When [\n[4]]
@> Control Variables: [0003:SourceActorID] = 4
@>
: When Cancel
@> End Event Processing
@>
: Branch End
@> Comment: StatIDs are the order they appear in the control variable
: : 1=LVL,2=EXP,3=HP,etc.
: : 0 is no value
@> Text: What stat do you want to show?
@> Show Choices: CURHP, MAXHP, ATK, DEF
: When [CURHP]
@> Control Variables: [0004:StatToShow] = 3
@>
: When [MAXHP]
@> Control Variables: [0004:StatToShow] = 5
@>
: When [ATK]
@> Control Variables: [0004:StatToShow] = 7
@>
: When [DEF]
@> Control Variables: [0004:StatToShow] = 8
@>
: When Cancel
@> End Event Processing
@>
: Branch End
@> Comment: Now we want to fetch the actor's stats into a temp variable,
: : VariableID#1. Write our parameters for our common event
@> Control Variables: [0006:GetActorStat ActorID] = Variable [0003]
@> Control Variables: [0007:GetActorStat StatID] = Variable [0004]
@> Control Variables: [0008:GetActorStat VarID] = 1
@> Call Event: [GetActorStat]
@> Text: The stat we will break up is: \V[1]
@> Comment: Next we'll break it up into all of it's precious little
: : digits
@> Control Variables: [0010:BreakUp SourceVarID] = 1
@> Control Variables: [0011:BreakUp DestVarID] = 13
@> Call Event: [Break Up Number]
@> Text: \V[13],\V[14],\V[15],\V[16]
: : Thank you and play again!




GetActorStat Common Event

@> Comment: Copy an actor stat to a given variable
: : "GetActorStat ActorID" is the ID of the actor to load
: : "GetActorStat StatID" is the stat to get
: : "GetActorStat VariableID" is the variable ID to write to
@> Comment: StatIDS:
: : 1: LVL, 2: EXP, 3: CurHP, 4: CurMP, 5: MaxHP, 6: MaxMP
: : 7: ATK, 8: DEF, 9: MIND, 10: AGI
@> Comment: We can't streamline this using clever variable usage
: : so we just have to hammer this shit out unfortunately.
@> Comment: ----- ACTOR 1 -----
@> Conditional Branch: Variable [0006:GetActorStat ActorID] == 1
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 1
@> Control Variables: Variable [0008] = [Zack]'s Level
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 2
@> Control Variables: Variable [0008] = [Zack]'s EXP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 3
@> Control Variables: Variable [0008] = [Zack]'s HP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 4
@> Control Variables: Variable [0008] = [Zack]'s MP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 5
@> Control Variables: Variable [0008] = [Zack]'s MHP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 6
@> Control Variables: Variable [0008] = [Zack]'s MMP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 7
@> Control Variables: Variable [0008] = [Zack]'s ATK
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 8
@> Control Variables: Variable [0008] = [Zack]'s DEF
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 9
@> Control Variables: Variable [0008] = [Zack]'s MND
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 10
@> Control Variables: Variable [0008] = [Zack]'s AGI
@> End Event Processing
@>
: Branch End
@>
: Branch End
@> Comment: ----- ACTOR 2 -----
@> Conditional Branch: Variable [0006:GetActorStat ActorID] == 2
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 1
@> Control Variables: Variable [0008] = [Albert]'s Level
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 2
@> Control Variables: Variable [0008] = [Albert]'s EXP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 3
@> Control Variables: Variable [0008] = [Albert]'s HP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 4
@> Control Variables: Variable [0008] = [Albert]'s MP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 5
@> Control Variables: Variable [0008] = [Albert]'s MHP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 6
@> Control Variables: Variable [0008] = [Albert]'s MMP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 7
@> Control Variables: Variable [0008] = [Albert]'s ATK
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 8
@> Control Variables: Variable [0008] = [Albert]'s DEF
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 9
@> Control Variables: Variable [0008] = [Albert]'s MND
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 10
@> Control Variables: Variable [0008] = [Albert]'s AGI
@> End Event Processing
@>
: Branch End
@>
: Branch End
@> Comment: ----- ACTOR 3 -----
@> Conditional Branch: Variable [0006:GetActorStat ActorID] == 3
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 1
@> Control Variables: Variable [0008] = [Vance]'s Level
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 2
@> Control Variables: Variable [0008] = [Vance]'s EXP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 3
@> Control Variables: Variable [0008] = [Vance]'s HP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 4
@> Control Variables: Variable [0008] = [Vance]'s MP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 5
@> Control Variables: Variable [0008] = [Vance]'s MHP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 6
@> Control Variables: Variable [0008] = [Vance]'s MMP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 7
@> Control Variables: Variable [0008] = [Vance]'s ATK
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 8
@> Control Variables: Variable [0008] = [Vance]'s DEF
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 9
@> Control Variables: Variable [0008] = [Vance]'s MND
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 10
@> Control Variables: Variable [0008] = [Vance]'s AGI
@> End Event Processing
@>
: Branch End
@>
: Branch End
@> Comment: ----- ACTOR 4 -----
@> Conditional Branch: Variable [0006:GetActorStat ActorID] == 4
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 1
@> Control Variables: Variable [0008] = [Craise]'s Level
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 2
@> Control Variables: Variable [0008] = [Craise]'s EXP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 3
@> Control Variables: Variable [0008] = [Craise]'s HP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 4
@> Control Variables: Variable [0008] = [Craise]'s MP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 5
@> Control Variables: Variable [0008] = [Craise]'s MHP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 6
@> Control Variables: Variable [0008] = [Craise]'s MMP
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 7
@> Control Variables: Variable [0008] = [Craise]'s ATK
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 8
@> Control Variables: Variable [0008] = [Craise]'s DEF
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 9
@> Control Variables: Variable [0008] = [Craise]'s MND
@> End Event Processing
@>
: Branch End
@> Conditional Branch: Variable [0007:GetActorStat StatID] == 10
@> Control Variables: Variable [0008] = [Craise]'s AGI
@> End Event Processing
@>
: Branch End
@>
: Branch End


Break Up Number Common Event

@> Comment: Take a variable and break it up into its various digits
: : Supports up to the thousands digit (4th digit)
@> Comment: "BreakUp SourceVarID" Variable ID to break up
: : "BreakUp DestID" Variable ID of thousands digit to write
: : digits to. Assumes next four Variables are for hundreds,
: : tens, and ones digits.
@> Comment: ==================
@> Comment: THOUANDS
@> Control Variables: Variable [0011] = Variable ID [V[0010]]
@> Control Variables: Variable [0011] /= 1000
@> Control Variables: Variable [0011] %= 10
@> Control Variables: [0011:BreakUp DestVarID] += 1
@> Comment: HUNDREDS
@> Control Variables: Variable [0011] = Variable ID [V[0010]]
@> Control Variables: Variable [0011] /= 100
@> Control Variables: Variable [0011] %= 10
@> Control Variables: [0011:BreakUp DestVarID] += 1
@> Comment: TENS
@> Control Variables: Variable [0011] = Variable ID [V[0010]]
@> Control Variables: Variable [0011] /= 10
@> Control Variables: Variable [0011] %= 10
@> Control Variables: [0011:BreakUp DestVarID] += 1
@> Comment: ONES
@> Control Variables: Variable [0011] = Variable ID [V[0010]]
@> Control Variables: Variable [0011] %= 10
@> Comment: END

If you have any questions or need more help feel free to ask!
e: lol rmn

[RM2K3] Help with variables.

Sure thing, I'll throw something together tonight then. Do you have the Steam version of 2k3? If not I can use the old maker, I just prefer some of the UI niceties added.

I miss when the internet was fun.

Screenshot Survival 20XX

That's cool as hell

[RM2K3] Help with variables.

Yeah, just do

Variable Operation: ATK Tens Digit
Set it to ATK Variable

Variable Operation: ATK Tens Digit
Divide it by 10

Variable Operation: ATK Ones/Units Digit
Set it to ATK Variable

Variable Operation: ATK Ones/Units Digit
Modulus Divide it by 10

Repeat for everything.


If you want to use a common event to help with the tedium:

Common Event: Split Number
It's parameters are two variables I'll call SourceVariableID and DestinationVariableIDStart. Put the variable ID of the character's ATK or other stat into SourceVariableID and the variable ID of the highest digit into DestinationVariableIDStart. It assumes the Tens and Ones digit variables follow each other.

Variable Operation: Variable ID referenced by DestinationVariableIDStart
Set it to the variable with ID referenced by SourceVariableID

Variable Operation: Variable ID referenced by DestinationVariableIDStart
Divide it by 10

Variable Operation: DestinationVariableIDStart
Add 1

Variable Operation: Variable ID referenced by DestinationVariableIDStart
Set it to the variable with ID referenced by SourceVariableID

Variable Operation: Variable ID referenced by DestinationVariableIDStart
Modulus it by 10


Then when you need to break up a number you can just set the SourceVariableID to be the ID of the variable you want to break up and DestinationVariableIDStart to be the ID of the tens digit you'll use when showing pictures. Then just call the common event and have it take care of the busy work.

This assumes you're using variables for character stats. If you're using the actor's stats then I'd suggest another common event that dumps a character's stats into variables. Pass it the actor ID and have a common event responsible for the horrors of dumping a character's stats into a set of variables for use by the menu.

e: If it'll help I can throw together a shitty demo in 2k3 tonight to show the code of what I'm trying to explain.

This is officially the most stupid thing I've read all day.

You can't out-satire reality sadly. Even The Onion is having trouble in this timeline!

[RM2K3] Help with variables.

Yeah, units is new to me. It was always ones, tens, hundreds, thousands, etc. when/where I was a kid. Couldn't hurt to post the whole thing at least, might be able to get more indepth answers from people more familiar with 2k.

This is officially the most stupid thing I've read all day.

This isn't Ted Cruz liking porn he found on twitter on the anniversary of 9/11. Bo~oring.





*checks thread title and date*
Oooooh, that's why! Apologies, please carry on.