JUSTROB'S PROFILE

Search

Filter

[RM2K3] CMS questions

Yep I'm an idiot lol. Thanks

[RM2K3] CMS questions

author=psy_wombats
author=psy_wombats
^ that event does do the whole digit isolation thing. Your current mod math is on the right track, just once you're done, you need to subtract the lesser digits (eg for 514 you'd have 14 - 4, then 514 - 10 - 4) and then divide by the place you're going for (/1000, /100, /10, etc, so 500/100, 10/10, 4/1). Subtraction probably not necessary but I don't trust RM to round integer division consistently.


I see what you mean, but I run into a problem here.

I'm calculating the 1s value first, then the 10s, then the 100s. If I add event commands to take the 10s value and subtract 4 from it, then divide it by 10, then yes I will have the second digit of 514 as a singular digit. But then when it's calculating the 100s value, it no longer works because the variable used to calculate the 10s no longer holds the correct value.

Man, it's difficult to even type this up. I don't know if I'm explaining it right.

[RM2K3] CMS questions

No, that's not how it works. It just saves the current HP but shaves off the first digit. So if HP is 514, then it returns 14.

I'm trying to get it where it does return only a single digit. But I dunno how to do that.

[RM2K3] CMS questions

Look, you can do this in Show Picture in the retail version of Rm2k3:



Now this saves me a fuckton of space when it comes to displaying the "ones" value (the last digit of a hero's HP). I literally only need one Show Picture and set it to the value that my other event calculated.

But that only works for the ones. When calculating the tens, the result is the second and third digits of the HP. When calculating the hundreds, the result is all three digits of the HP. I don't wanna make 1000 different pictures for each possible value.

Is there any way to do some magic here?

[RM2K3] CMS questions

author=Sidewinder
You can specify pictures by variables in the official version of RPGmaker 2003.


So you can. I actually just found out about this. I own the Steam version of Rm2k3, apparently you can specify pictures by adding a numbered suffix at the end which the Show Picture command can use with a variable.

But does this offer an advantage in any way? I'm still going to have to check 1 through 9 for every digit for every hero, right?

[RM2K3] CMS questions

Yeah I thought it was wishful thinking. I think I'd rather not mess with DynRPG for now. Oh well, at least a lot of this can be copy pasted and slightly modified.

[RM2K3] CMS questions

Okay, now I have a legit question.

So, in my game when you open up the menu it shows three bars (one for each party member) which displays their portrait, name, level, class, HP and MP.

I made an event which calculates the current HP of each party member. I haven't inserted it into the actual menu yet, just a test. It works great. Downside is, it's long as hell. I know when making a custom menu you can't avoid having huge event lists, but I wanna optimize this as much as I can.

So basically the question is: Is there any way to do this that takes up less space?

My test event:

Calculating HP:
What I'm doing here: First I store the current HP of a hero into a variable. Then I store that variable inside another variable called Hero Modded HP. Then I do a modulus operator on that variable to find out the different HP digits. Then I store that into three separate variables for each hero. The ones, the tens, and the hundreds. Min HP is 1, max HP is 999.



Drawing the HP with pictures:

This one is a bit convoluted to explain. Basically I'm using the three variables I have. AlexHP(1s) contains only the last digit of his HP. AlexHP(10s) contains the middle and the last digit. AlexHP(100s) contains all digits. Using a shitload of conditional branches, I'm checking each of these variables to find out how high they are, then based on that the game knows which one to execute and which picture to show.

When all is said and done, there's three pictures on the screen, one for each digit.



So as you can see the second event here is already pretty fucking huge. But that's not even all of it. I have that same event for the second and third party member, each one just as long. But that's not all. This is only to calculate the current HP. I also have to one of these events for each party member to find out their max HP.

Right now I only have three playable characters, and no real plans to add many more. But if I do decide to add more playable characters, it means for each one I'm going to have to do this again.

So if anyone was able to follow all this, do you know if there's a way to slim this down a bit? Make it a bit more compact?

[RM2K3] CMS questions

Edit: Nevermind. Figured this one out on my own. Should mess around a bit longer before making a new thread.

[RM2K3] Is it possible to disable buttons?

Yeah, you're right. That's what I figured

[RM2K3] Is it possible to disable buttons?

Link_2112, if I give players the option to name the heroes in my game, do you know if it's possible to store whatever name they entered inside a variable? I know there's a textbox command to display the name of a certain hero, but as far as I know you can't put that in a variable.

I'm kinda debating if I want to allow people to change the hero names. I'm leaning towards no, mainly because it's a linear story with pre-written characters, and because it's either impossible to combine with a CMS or a ton of work.