VARIABLES HIGHER THAN 99,999,999?
Posts
Pages:
1
When I started using Rpgmaker XP, I was Ok with the max item price being 99,999 Coins, even though it even seemed a little low at the time. After a month of crafting my game, I needed items such as weapons and armours to have a much higher value than 99,999 Coins and figured out that by using my mouse wheel I could scroll up as far as I could go for the price to go ever higher. This made me able to get items to reach prices of 250,000 or 300,000 Coins, but in return would hurt my finger a lot.
As I started understanding more about the game maker, I grasped the concept of using switches and variables, and figured that I could also use them to set item prices (outside of shops).
So if I set the variable 'money' to be equal to how many coins player A had in his/her inventory, I could set a conditional branch checking whether player A had X amount of the variable 'money'.
I still kept crafting my game for years, and I reached the point where items were getting very expensive - which was about the time when I tried making an item worth over 100 million coins.
The game wouldn't let me.
So it has been a while now that I have been setting a lot of high-tier items at around 80-90 Million Coins, and I was wondering whether it could be possible to get rid of the cap on the number for a variable?
Thanks for your time.
As I started understanding more about the game maker, I grasped the concept of using switches and variables, and figured that I could also use them to set item prices (outside of shops).
So if I set the variable 'money' to be equal to how many coins player A had in his/her inventory, I could set a conditional branch checking whether player A had X amount of the variable 'money'.
I still kept crafting my game for years, and I reached the point where items were getting very expensive - which was about the time when I tried making an item worth over 100 million coins.
The game wouldn't let me.
So it has been a while now that I have been setting a lot of high-tier items at around 80-90 Million Coins, and I was wondering whether it could be possible to get rid of the cap on the number for a variable?
Thanks for your time.
How about using a second variable for the second half? So when it gets to 1 billion, add a 1 to the second variable and reset the first, then always check to see if the second variable has anything before checking the second.
It's a work-around.
It's a work-around.
I would think you can't make the variable go higher through the program. But you can use a second variable to track the number even higher.
Think Metroid

The number only goes to 99, so you add counters that signify that you've gone over.
When money variable reaches a certain point, you empty it and add 1 to the counter. If the variable can only hold 999mil and no more, you might want to set the cap slightly lower. Because if you are at 998mil and try to 10mil, it will max out at 999mil and you lose 8mil before you have a chance to reset the variable.
(Does the engine accept a value higher than 999mil, or is it just that you can't set it to higher than that? So if you set it to 999mil, and through a variable command add 1, will the variable become 1000mil, or will it stay at 999mil? I'm really not sure, so depending on that you would have two options for this system)
If you set the cap to, say, 900mil, then if you get 50mil, the variable will increase to 950mil, and the system would kick in because you've surpased 900mil. It would add 1 to the counter, and reduce your money by 900mil. Then you're left with 50mil + 1 counter equaling 900mil. The counter could go up to 999mil, so you'd have what I would hope to be an endless amount of money storage.
When you're money reaches 0, or possibly a higher number like 1mil, the counter will remove 1 and add 900mil to your current money. It might be easier to implement this as a bank, instead of something that is always running. The player can only hold 999mil, but can store an unlimited amount of money in the bank. And when you try to buy something from the store, it can take money directly from the bank. So an item in the bank can cost counters, instead of just a large number of money.
Think Metroid

The number only goes to 99, so you add counters that signify that you've gone over.
When money variable reaches a certain point, you empty it and add 1 to the counter. If the variable can only hold 999mil and no more, you might want to set the cap slightly lower. Because if you are at 998mil and try to 10mil, it will max out at 999mil and you lose 8mil before you have a chance to reset the variable.
(Does the engine accept a value higher than 999mil, or is it just that you can't set it to higher than that? So if you set it to 999mil, and through a variable command add 1, will the variable become 1000mil, or will it stay at 999mil? I'm really not sure, so depending on that you would have two options for this system)
If you set the cap to, say, 900mil, then if you get 50mil, the variable will increase to 950mil, and the system would kick in because you've surpased 900mil. It would add 1 to the counter, and reduce your money by 900mil. Then you're left with 50mil + 1 counter equaling 900mil. The counter could go up to 999mil, so you'd have what I would hope to be an endless amount of money storage.
When you're money reaches 0, or possibly a higher number like 1mil, the counter will remove 1 and add 900mil to your current money. It might be easier to implement this as a bank, instead of something that is always running. The player can only hold 999mil, but can store an unlimited amount of money in the bank. And when you try to buy something from the store, it can take money directly from the bank. So an item in the bank can cost counters, instead of just a large number of money.
The engine doesn't let you input a number higher than 99,999,999 for any variable.
I tried doing:
@>Control Variables: (money1) = Gold
@>Conditional Branch: Variable >= 10,000,000
@>Control Variables: (money2) +=1
@>Control Variables: (money1) = 0
@>
: Else
@>
: Branch End
@>
I soon realized that if I put this on a parallel process, it would keep pulling how much gold player A has from his inventory, and keep adding 1 regardless of actually how much money he has.
Anyways, my first approach before writing this thread was to take Player A's money and set it as a variable, but then divide it by 100 or so, so I could fit the number when I would be writing it.
Ex:
Control Variables (money1) = Gold
Control Variables (money1) /= 100
Control Variables (money1) = Variable (money2)
...but the actual problem is that it can't even recognize a number greater than 99,999,999, so if I had 500 million coins, and i put in the code above, it would give me an output of 999,999 just because it used 99,999,999 as my cash value and not 500,000,000.
I don't even know if it is possible to get around this honestly.
I tried doing:
@>Control Variables: (money1) = Gold
@>Conditional Branch: Variable >= 10,000,000
@>Control Variables: (money2) +=1
@>Control Variables: (money1) = 0
@>
: Else
@>
: Branch End
@>
I soon realized that if I put this on a parallel process, it would keep pulling how much gold player A has from his inventory, and keep adding 1 regardless of actually how much money he has.
Anyways, my first approach before writing this thread was to take Player A's money and set it as a variable, but then divide it by 100 or so, so I could fit the number when I would be writing it.
Ex:
Control Variables (money1) = Gold
Control Variables (money1) /= 100
Control Variables (money1) = Variable (money2)
...but the actual problem is that it can't even recognize a number greater than 99,999,999, so if I had 500 million coins, and i put in the code above, it would give me an output of 999,999 just because it used 99,999,999 as my cash value and not 500,000,000.
I don't even know if it is possible to get around this honestly.
If this is for 2k3 you'll probably have to look into a plug-in of some sort. If in XP or up, a script request would probably be your best bet.
That or scale things down. Make the money harder to come by and scale the prices appropriately. You know where the top benchmark is set, so aim for that.
You could also work around it with items. Say you can go to a bank to make something like gold bars that are worth 50 million. That way you can check for any gold bars in the inventory and use them. Or poker chips worth 10 million, if you're using even numbers and want to make it easier to calculate. That way you can deduct the amount straight from the items, and if the player wants to have 500 million they could just get 99 poker chips+ 99 Gold bars + 99,999,999 Gold if you really want huge numbers. The player can then cash in for their 100,000,000 Gold prize, but also have extra money squirreled away in case they need to buy something afterwards, in the form of bars or what-not.
Just be sure to let them know that there's a limit to how much they can hold at any one time and that it might be a good idea to put their money in gold bars and such for mobile storage.
That or scale things down. Make the money harder to come by and scale the prices appropriately. You know where the top benchmark is set, so aim for that.
You could also work around it with items. Say you can go to a bank to make something like gold bars that are worth 50 million. That way you can check for any gold bars in the inventory and use them. Or poker chips worth 10 million, if you're using even numbers and want to make it easier to calculate. That way you can deduct the amount straight from the items, and if the player wants to have 500 million they could just get 99 poker chips+ 99 Gold bars + 99,999,999 Gold if you really want huge numbers. The player can then cash in for their 100,000,000 Gold prize, but also have extra money squirreled away in case they need to buy something afterwards, in the form of bars or what-not.
Just be sure to let them know that there's a limit to how much they can hold at any one time and that it might be a good idea to put their money in gold bars and such for mobile storage.
Yeah, I was using items once upon a time, but it seems a bit unprofessional. People will say "why can't I just pay in money? I have millions, right?"
But most of the time high-tier items come from different locations, so using gold bars or such for every single location with higher tier items seems a little odd - but I guess it has to be the only way to actually do it without making a complicated script.
But most of the time high-tier items come from different locations, so using gold bars or such for every single location with higher tier items seems a little odd - but I guess it has to be the only way to actually do it without making a complicated script.
Pages:
1















