RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC1] Economy Control System

merlyn2000

Sorceror
the best thing to do, if can wait, is to do just that. when i get home this evening, ill upload a corrected set of files.

again, im sorry, i zipped up my workin directory, when i should have been zipping up a seperate set of files
 

merlyn2000

Sorceror
ok, this is the PROPER package.

i checked and removed some references that were in err.

almost any ver 2 shard should run this with only the modified lootpack.cs


thanx for your patience,
merlyn
 

Attachments

  • economy control system.zip
    9.3 KB · Views: 240

Joeku

Lord
That's pretty cool dude - thanks a lot.

Suggestion for the future: make "taxes" available for towns, controllable by individual town and/or globally (i.e. you can put a 7% tax on all goods bought in Moonglow, but a 15% tax on all goods bought in Britain - encouraging travel to other towns). Of course you would have to round up the values (so if you buy a candle for, say, 5 gold, it doesn't add .35 to the price and turn around and chop it off). You round up as follows:
Code:
int newval = (int)Math.Ceiling( (double)val + tax );
Where "val" is the current price of an item, "newval" is the price with the tax added in (and rounded up).

You might also want to look into controlling costs for placing houses with the House Placement tool, too.
 

Pyro-Tech

Knight
that's a pretty good idea joeku....you could also do it by reading the regions...that way you can work it for custom maps too by reading the "town" region

heck, if you wanted to do some custom regions you could even go as far as to possibly effect player vendors if you so chose i would think :)

thanks for getting the good one's uploaded....been having problems getting it working...gonna try it now
 

merlyn2000

Sorceror
lemme know how it goes installing. its a surprisingly simple system, so any problems, i should be able to help you thru.





as far as the taxes, and regions, i have no idea how to implement, but i WILL keep those ideas in my mind.

my next idea was to make the system automagic, and then to offer rewards for using the checkbook.
 

El Muerte

Wanderer
i have a little problem with you script
when you change to 90% or something like this jewells and scrolls will drop with amount 0 so you cant use and cant sell them
 

merlyn2000

Sorceror
to be honest, the scripts as posted shouldnt affect anything other than the ROLL() function, which determines the amount of gold dropped.

ill try to reproduce the problem and look at the code, but i suspect there may be another culprit at play.


thank you,
merlyn2000
 

merlyn2000

Sorceror
ok ... thanx to my wife.

as i was looking at the problem on my shard she says, "kill 'em, then look see if they carry scrolls".

scrolls, gems and some other items arent added to the corpse/creature until the ondeath method. therefore, you need to see if the items are in the corpse, not the creatures pack.
 

El Muerte

Wanderer
yes i know but for some reason it´s really so.. i set droprate to 90% and kill a gargoyle all scrolls and gems have amount of 0

so let me explain a little better
scrolls and gems are in the corpse and lootable but the all have an amount of 0 if you look at them with #props
so you can´t use can´t sell them
 
More scripts to help a shards doomed economy!!!
Brilliant script and a brilliant idea to have in the first place, especially since any shard "out of the box" has a doomed economy due to the very flaw in its design.


Not one single shard on UOGateway/ConnectUO has a healthy balanced economy.
They aren't totally destroyed yet, but they are on their way to OSI's standards as time goes by.

Steps can be taken to fix it over a certain time and this certainly looks like a step in the right direction.
 

merlyn2000

Sorceror
El Muerte;650872 said:
yes i know but for some reason it´s really so.. i set droprate to 90% and kill a gargoyle all scrolls and gems have amount of 0

so let me explain a little better
scrolls and gems are in the corpse and lootable but the all have an amount of 0 if you look at them with #props
so you can´t use can´t sell them

surely there must be something else 'out of place'. the economy scripts simply dont modify anything that would affect gems or scrolls.
 

Lordicon

Wanderer
Seems this system doesnt do anything, All it does is tells you how much gold is on the shard, If you et the props from 100% to 50% including doing a restart on the server it always displays the same amount of gold in the world :(:(
 

septor

Sorceror
Lordicon;675373 said:
Seems this system doesnt do anything, All it does is tells you how much gold is on the shard, If you et the props from 100% to 50% including doing a restart on the server it always displays the same amount of gold in the world :(:(
It doesn't remove existing gold, it only decreases/increases the amount of dropped gold.
 

Lokai

Knight
El Muerte;650872 said:
yes i know but for some reason it´s really so.. i set droprate to 90% and kill a gargoyle all scrolls and gems have amount of 0

so let me explain a little better
scrolls and gems are in the corpse and lootable but the all have an amount of 0 if you look at them with #props
so you can´t use can´t sell them

I know this post is a little old, but this was never addressed, and I found this script, and checked, and you are correct. It does affect Gems and Scrolls. In LootPack.cs we find this line:

PHP:
    if ( item.Stackable )
     item.Amount = m_Quantity.Roll();

Since Gems and Scrolls are stackable, when 1 gem or 1 scroll is dropped, the 90% is applied to it, and rounded down, causing it to result in a quantity of zero.

The fix would be to change the return value to return the Math.Ceiling result of the calculation, rather than the (int) "explicit cast" of the calculation.
 

Curuis

Wanderer
not working for me..

got this errors...
any ideas?

Code:
Errors:
 + Misc/LootPack.cs:
    CS0246: Line 920: The type or namespace name 'StoneGoldCounter' could not be
 found (are you missing a using directive or an assembly reference?)
    CS0246: Line 922: The type or namespace name 'StoneGoldCounter' could not be
 found (are you missing a using directive or an assembly reference?)
    CS0246: Line 922: The type or namespace name 'StoneGoldCounter' could not be
 found (are you missing a using directive or an assembly reference?)
 
Top