Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > Zelaron Gaming > RPGMaker

 
 
Thread Tools Display Modes

 
Question Question for bluecube.
Reply
Posted 2004-08-21, 02:04 PM
I was wondering bluecube if you have ever played uncharted waters?
The reason I am asking is because I would like to know if it is possible to make an economy like in that game.If you never played it before let me know and I'll give a description of the market.
Old
Profile PM WWW Search
ograx is neither ape nor machine; has so far settled for the in-betweenograx is neither ape nor machine; has so far settled for the in-between
 
 
ograx
 



 
Reply
Posted 2004-08-21, 06:17 PM in reply to ograx's post "Question for bluecube."
Never played it.

So yeah, tell me about the economy and I'll think about whether or not it's possible. Give as much detail as possible, please.

(Also changed the title to be a bit more.. descriptive.)

Last edited by BlueCube; 2004-08-21 at 06:20 PM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-08-21, 06:33 PM in reply to BlueCube's post starting "Never played it. So yeah, tell me..."
Ok here it goes.(This is not exacty like uncharted waters but is the economy I would like to implement.)
1:Every city has trade goods at varying prices.
2:Each city has production rates for the various goods.
3:When you purchase goods the price goes up because you're buying out stock.(Only at the town of purchase.)
4:When you sell goods the price of selling that item goes down.(Same as 3.)
5:There is random shortages and overflows of goods.
6:Items are priced differently in each town.
7:Every city has specialty items which can only be bought there.

The parts I have not been able to figure out are random shortages and overflows,and the changing of price dependent on how much of it you bought or sold.I also cannot figure out the production rates.

Last edited by ograx; 2004-08-21 at 11:56 PM.
Old
Profile PM WWW Search
ograx is neither ape nor machine; has so far settled for the in-betweenograx is neither ape nor machine; has so far settled for the in-between
 
 
ograx
 



 
Reply
Posted 2004-08-22, 11:28 AM in reply to ograx's post starting "Ok here it goes.(This is not exacty..."
After sleeping on it: Custom menu system for each store. Hard as heck, but can be done.

We'll say 3 towns, with 20 items for sale + 1 Unique


============

There's two ways I can think of to pull that off.

#1 - Each item at each store has 4 variables - Buying, Selling, Stock, and Refill Rate.

This would be the "long way" to do it (because you'd have to set each and every item's price at every refill and purchase), but you'd have more control over the prices within the game, adjusting them to your whims. Of course, this is completely hidden to the player and is pretty much wasted effort.

-Your events are gonna look like this:

Code:
Bought ItemA:

<>Branch (Stock >= AskingToBuy)
  <>TempVar = Price
  <>TempVar =* AskingToBuy
  <>Branch (GP >= TempVar)
    <>GP =- TempVar
    <>TownA_ItemA_Stock =-AskingToBuy
    <>Price Determination Lines
    ...Blah More Price
    ...Blah More Price
    ...Blah More Price
    ...Blah More Price
    ...Blah More Price
    ...There's probably more to determine price
    <>
  :End
  <>
:End


=====

Sold ItemA:

<>Branch (ItemInYourStock >= AskingToSell
  <>TempVar = TownA_ItemA_SellingPrice
  <>TempVar =* AskingToSell
  <>GP =+ TempVar
  <>ItemInYourStock =- AskingToSell
  <>Increase TownA_ItemA_Stock by whatever you bought
  <>Price Determination Lines
    ...Blah More Price
    ...Blah More Price
    ...Blah More Price
    ...Blah More Price
    ...Blah More Price
  ...There's probably more to determine price
:End
...for each and every item in your store in every store. This also isn't including the parts where the CMS resides. WAY too much reused code. And then you have to debug this.

#2 -
There's 2 main variables for each item type - BasePrice, BaseRefillRate. On each item in each store, there's the variables ItemStock,

ItemBuyingPrice, ItemSellingPrice, and ItemRefill. The price is calculated via an event, one for each store, and selling is a percentage of the normal price.

This will make your efforts MUCH easier, from a programming standpoint, for these reasons:

-You'll declare the main variables first, and never have to touch them again. (Make sure they're separate in the variable list).

-The ItemPrice ensures that you won't have to touch price directly within a shopkeeper event. You send this off to a common event whenever the ItemStock variable changes (Just bought 5 Potions? TownA_PotionStock goes down by 5, and you run EventReCalculateTownA. Just sold 3 ethers? TownB_EtherStock goes up by 3, and EventReCalcuateTownB is run.)

The only problem with this, is that the event would pretty much end after each transaction, and you'd have to talk to the shopkeeper again to buy something else. It'd be insanely difficult to figure out where to jump to once the event was done.

Code:
Buying ItemA:

<>TempVar = TownA_ItemA_BuyingPrice
<>TempVar =* AskingToBuy
<>Branch (GP >= TempVar)
  <>GP =- TownA_ItemA_BuyingPrice
  <>TownA_ItemA_Stock =- whatever
  <>Run EventReCalculateTownA
  <>
:End

====

Selling ItemA:

<>Branch "Have enough items to sell"
  <>TempVar = TownA_ItemA_SellingPrice
  <>TempVar =* AskingToSell
  <>GP =+ TempVar
  <>TownA_ItemA_Stock =- AskingToSell
  <>Run EventReCalculateTownA
  <>
:End
---

Basically, some key points:

-- You'd have a cycle for restocking based on the production rates (an overall timer is best, say 100 seconds).

-- A small subroutine for price adjustment, based on "Base Price" and current stock. This would actually be the same subroutine for when the price goes up OR down. You'd just call that after every purchase, and for each product restocking schedule to calculate the new price. Not sure how Uncharted Waters calcuates it, but there's probably an upper and lower limit on it as well - that can be hardcoded into the subroutine for each store.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-08-23, 05:33 PM in reply to BlueCube's post starting "After sleeping on it: Custom menu..."
Nice work again Bluecube,both ways worked fine for me.The cms looks terrible but what the hell it can be fixed.I will probably post the demo I made with the two systems when I fix the cms.

---New question---
Is it possible to use numbers with decimal values in rpgmaker2003?
ie.(100x1.13)
This would be an example of a tax command for the economy.
So as price can also be controlled by separate tax rates.
The 100 represents the value of the variable which is hte price of the items you bought.

Last edited by ograx; 2004-08-23 at 05:37 PM.
Old
Profile PM WWW Search
ograx is neither ape nor machine; has so far settled for the in-betweenograx is neither ape nor machine; has so far settled for the in-between
 
 
ograx
 



 
Reply
Posted 2004-08-23, 07:15 PM in reply to ograx's post starting "Nice work again Bluecube,both ways..."
ograx said:
---New question---
Is it possible to use numbers with decimal values in rpgmaker2003?
ie.(100x1.13)
This would be an example of a tax command for the economy.
So as price can also be controlled by separate tax rates.
The 100 represents the value of the variable which is hte price of the items you bought.

Nope. Do this:

(Make sure Tax is something like 106 (for 106%, obviously)

<> PriceAfterTax = OriginalTax
<> PriceAfterTax = Itself*OriginalPrice
<> PriceAfterTax = Itself/100

-----

Example Usage:

500 value, 6% tax. Tax would then be 106.

Tax = 106
Tax = 106 * 500 = 53000
Tax = 53000 / 100 = 530

-----

I believe that RPGMaker always rounds down when dealing with division. To fix this, you can simply add 50 before you divide by 100 - this will basically translate into an extra 0.5.

1.2 would round down normally, which is good. Adding 0.5 wouldn't change this (it would be 1.7, which still rounds down to 1).

1.6 would also round down, which is NOT good. Adding 0.5 fixes this (2.1 rounds down to 2)

Last edited by BlueCube; 2004-08-23 at 08:10 PM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 02:29 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.