(RMXP) CURRENCY PROBLEM

Posts

Pages: 1
I seem to have stumbled onto a bit of a problem involving the games currency. I need to make it change names every time you switch between worlds. I also need it where when you get back to the previous world, you have the same amount of currency as when you left. (E.G. If you had 100 coins when you left to another world, you didn't take those 100 coins with you. But when you go back to the world you left, you get the 100 coins back.)
Don't know the first one. Second one is trivial. Just store the amount you have in a variable BEFORE you leave the world, and restore from that variable again when you come back to that world. You'll obviously need as many variables as you have worlds.
LouisCyphre
can't make a bad game if you don't finish any games
4523
Go into the Vocab script and find the method for Gold's name. Paste it in here so I can take a look - making it change names won't be that hard but I'm not sure if RMXP handles currency naming the same way RMVX does.
I guess I could just solve the first problem by calling it something else in-game (like a character talking about credits in World A, in World B a character calls them coins, but the menu still says credits.) As for the second one...huh?
LouisCyphre
can't make a bad game if you don't finish any games
4523
For example, in RMVX, there is a method in the Vocab script that reads like so:

  # G (Currency Unit)
def self.gold
return $data_system.terms.gold
end

This tells the game to use the database's term for gold. Find me RMXP's version of this, and I can whip up something to let you change the name for your currency.
Ugh. Script searching is a problem. But I don't see anything that says Vocab in here.
Um, Aten, wouldn't the variable require me to know the exact amount of gold a player has at the given moment of the removal?

LouisCyphre
can't make a bad game if you don't finish any games
4523
Yes. There is a function for setting a variable to the player's current gold count.
I managed to get the variable to take the gold. It's giving it back that's driving me insane!!!

EDIT: Finally got it to work.
Yeesh. If I do the same thing with items, I have to do each item one at a time.
You can actually use arrays and pointers to create a loop that does it all for you, but..... since you're having problems with basic variables, that might be out of your league for now...

Just look around for a script. It IS rmxp afterall...
Well, I am still a newbie with RMXP, but I'll figure it out.
Here's a question: Can I put multiple items in the same variable, or do I have to use a different variable every single time? E.G. If I put 2 potions and a sword in the same variable in that order, will I only get the sword back, or will I get the potions and the sword back?
Nevermind. Yes, you do need a variable per item. Otherwise... Let's say I set it to where it would take these 3 items: 5 swords, 2 teas, and 11 staffs in that order. When I get the items back, it'll look like I have 11 of each item. That's bad.
Pages: 1