Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Click here to join us on IRC (#charas on irc.freenode.net)!
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
help with variables, hp, events and variables in my CMS
« previous
next »
Print
Pages: [
1
]
Author
Topic: help with variables, hp, events and variables in my CMS (Read 2328 times)
Ben
Some dude
Staff
Royal
Posts: 4,844
butts
help with variables, hp, events and variables in my CMS
«
on:
December 08, 2007, 03:09:50 AM »
Allright, so top secretly, Ive been working at my project quite a bit lately. Im trying to do things differently this time...so that i actually keep working on this project instead of scrapping it and starting over from scratch.
Ive got my chipsets made...Ive got my battle system, and all of my enhancment scripts working nicely.
Ive been working on a CMS.
I have been doing this in events, since scripting a CMS is beyond my abilities in RGSS
Ive finished the Main Menu, and a select player menu, much like in FFT..
Ive finished my equip menu, after a bunch of attempts resulting in mass bugs, and now in a polished well working product.
I have two systems left to work into this menu...
The Job system....which im pretty confident I can figure out...but dont want to start on until this other imperative system in done...
what im working on now is the....
Item/KeyItem/Status window.
The Regular Items, and Key Items (Which in this case are non-armor items that you can equip to one of three slots per character...its neat)These parts are fine.
But i seem to have hit a brain fart tonight, when starting on the Status window popup thing..
The whole menu uses alot of switches (150-350 many are currently inactive until i need to fill them) and a good handfull of variable, and a million and one fork conditions...
i have, In charset, SOme lovely Numbers, the size of tiles. 0,1,2,3,4,5,6,7,8 and,9.
I have three vital numbers to display here.
HP (max)
MP (max)
and Movement Range in the TBS. (taken Care Of)
I have a lovely design, via chipset laying the whole thing out.
I realize I have to store the currently selected Characters Maximum HP, and MP Into A variable....And Im going to need events to process that variable into a series of switches or event pages to display this number.
Im just stumped as to how to start this.
The Status Menu is its own Map for every Character. There are sixteen character. For now Im just working on One character at a time, and want to get the initial one evented well so I can copy paste accordingly for the other characters.
If I havent Explained well enough Ill try to post screenshots.
I guess basically, I was hoping somebody out there could help me through this one particular process of Representing the Currently selected Characters HP Via spirtes
Logged
DragonBlaze
A Wild DB Appeared!
Royal
Posts: 3,329
(No subject)
«
Reply #1 on:
December 08, 2007, 03:39:20 AM »
First of all, do you know how to split a 4 digit variable into 4 single digit variables? You'll need to know this for all the stats.
As for the seperat characters, the best way would be to just use ONE map for all characters. Before going on to the map, or just before displaying anything. Copy all values from the current hero into variables to represent the character. So like set herohp equal to hero1hp. Do the same for hero2 (herohp = hero2hp).
If you copy everything into a temp variable, you will only need to make one set of conditional branches, if you don't copy everything over like this, you'll need to recode this map 16 times.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN
Ben
Some dude
Staff
Royal
Posts: 4,844
butts
(No subject)
«
Reply #2 on:
December 08, 2007, 04:10:13 AM »
no, i think splitting a 4 digit variable is the part that perplexes me most. if i had it broken into 4 variables, i wouldnt have a problem
i intend on re-coding the map numerous times anyhow, because each characters menu is structured slightly different, in terms of chip layout
upon entering this menu, there is a switch activated...actor1,actor2,actor3,etc depending on the actor in the database selected.
a parallell process could store the max HP into a variable...
profit...
After i have that variable broken down, id be fine without problems for the rest of the menu
Logged
Ben
Some dude
Staff
Royal
Posts: 4,844
butts
(No subject)
«
Reply #3 on:
December 08, 2007, 05:19:29 PM »
nope. i need to do this via event.
Yeah, the more i examine this, the more i see that the only thing i need help with is breaking One Variable into Four.
Actor1HP Into HPthousands HPhundreds HPtens and HPones.
And then I can just repeat the process for the MP/SP
EDIT
Ive been thinking of this..
I have an idea but im not sure if it would work, or just lag the hell out of my menu
When you enter this menu...Or I shold say....Just prior to it...
A parrallell process event sets varibale names ACTOR_ONE-HP
to be the same as the actor One's HPs.
You enter this map....
here is another parallel process event...
It Has a conditional Branch
If ACTOR_ONE_HP is greater than 0
subtract 1 from ACTOR_ONE_HP
add one to variable named MENU_HP_ONES
else turn self switch A on
NEW EVENT PAGE (triggered by self switch A)
(parallel process)
If switch: Menu Refresh is on
turn self switch A off
NOTE: The menu refresh switch is something ive been using to update events every 20 frames....I just figured If i left this page blank, it would cause a bug when this event was used in say, the equipment menu, as my equipment in many cases, equips additional HP to a player)
And then of course more Parallel events/conditional Branches
If MENU_HP_ONES equal to (10)
Add 1 to MENU HP_TENS
set MENU_HP_ONES to 0
and so on for Hundreds and Thousands
And then of course Events for Ones, Tens,Hundreds,And thousands, to represent with sprites the values each of the broken down variables holds
Logged
Ben
Some dude
Staff
Royal
Posts: 4,844
butts
(No subject)
«
Reply #4 on:
December 10, 2007, 06:41:05 PM »
so i made the system using the idea I explained...It worked for the most part.
However...
As the event breaks down the variable ACTOR_ONE HP into the smaller sub variables. HP THOUSANDS, HP HUNDREDS, HP TENS and HP ONES, there is a long pause in gameplay.
I farted around with it a couple of ways, changing the order of certain things, and the mpost i could accomplish was a long pause, as the visible numbers on the status screen stopwatched andup counted for the duration of the long pause...Like it was the end of a level of contra and they were tallying my score.
I also tried putting the Breakdown event in an earlier map, thinking that may relieve the lag, having this event on an earlier map, to lighten up the load of what was being processed in one map.
It didnt help. I just got the same long pause in a different map.
No top mention, At HP 9999, the system just pretty much seemed to stall permanently, no error message, but the calculation took forever.
I apologize for the kick, but i figure it was warranted.
Does anyone have any suggestions to relieve the lag/stalling?
I can post screens of my event pages if it helps
Logged
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
help with variables, hp, events and variables in my CMS