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] Player Government System Version 2

Avelyn

Sorceror
Player Government System Version 2-Update

Update (I will probably be doing a lot of these)

Sorry it took so long, but I needed the break from UO for a while. Here is version 2.21.


This is the next incarnation of Ronin's FS Government System. This has been updated to and only works with Runuo 2.0. This system allows players to create

player run towns with a good many features that are available with the normal towns and some that are not.

This system has been completely updated/fixed.

If you have the system already installed, you should not have to make any distro changes, just overwrite the rest. The upgrade system will convert all your existing cities.

Additions to the system ver 2.21:

Squashed a lot of existing bugs.

The big update is the addition of a new city structure-- The city Market. This is a version of my NPC controlled vendor mall for your player run city. It allows the town to have a central place for commerce. Any member can place a city player vendor here for free. Also, non citizens may rent space and place their vendors in towns that have a lot of traffic so they can sell their stuff. The mayor selects the sales tax for all vendors in the city and will be taken out of all purchases and deposited into the city treasury. The tax rate is noted on the vendor gump. Finally, as an added bonus, the city market will spawn 2 npc town vendors for the members of the town to buy and sell from so they may not need to go into the main towns as much. The vendor types are selected from a list and will change on every update.

Addition of an upgrade system which will allow updates without having to change existing cities. When you upgrade the system, it will compare the old and new version numbers and tell you in the Console window if you need to run the update command. If not, it will report that the system is current.

Included is the 2.01 version of my vendor mall system which is required for the markets. Of course since the system is included you can use it outside of the cities also!

Optimized the way cities delete and the cleanup of all addons, vendors, items and buildings.


Additions to the system ver 2.00:

It is optional to allow the mayor to place normal house addons in the city as decoration

Added a City Player Vendor which is the only player vendor allowed in the town. It will allow the mayor to take sales tax from whatever the vendor sells for the town. (Named income tax)

Added the resource box system (Thanks Al_i_en!!) with a special box for towns that all citizens may access to store resources and work together.

Added a 3 time per city update limit on corpse retrieval and made it only for citizens

Added an Assistant Mayor position that is picked by the current mayor to take over in the event the mayor leaves the town, if none is picked a new mayor is picked at random and an election is forced.

Added an NPC vendor that sells all city deeds in case you dont want the crafting items.

Added an admin command that will update the city when the command is run and the stone is clicked.



Installation:

Just a fair warning, this is NOT a super easy system to install. It does require the modification of several distro files.
You will need to edit your files, do NOT try and overwrite anything, I do not update the archive files with the newest SVN. I STRONGLY suggest you use a comparison program and compare mine to yours, but if not, then the changes are listed in the Docs folder as text files and are pretty easy to understand.

If you choose to use the optional House addons, you need to edit your files with the files in the Addons Folder.

If you choose to use the optional crafting system to make the deeds, you need to edit the file in the Optional distros folder.


Delete the folder that says its not for use in your custom folder after you have modifyed your distros.

if you do not wish to use the crafting system, delete the craft folder.

if you do not wish to use the resource box system, delete the resource box folder.

If you do already use Al_i_en's resource box, just copy out the 2 city resource box files.


The rest of the folder just copy into a custom folder and then open and edit the playergovernment.cs file and set your numbers where you want them.
The file is pretty self explanatory even for the scripting novice.

Once you get it installed and compiled use the [govhelp command to learn more about how the sytem works.

Other Commands:
[FindCities -Lists all current active cities
[CityUpdate -Target a city stone to force an update
[Movevendor - Allows a mayor to move a city vendor or city resource box
[upgradecitysystem - An Admin needs to run this when the console tells you to


I can guarantee the system compiles on a fresh runuo 2.0. So PLEASE try and work out compiler issues before you post errors. I have tried to be clear on the

changes in the docs files.

If you do find errors (except spelling on the gumps!) please post and I will squash them asap.

This system has been running on my shard now for almost 7 months and the new version about a week after 2.0 came out. It seems pretty stable but I always miss something.

It is a lot of work to get running but my players love it!

I can't say enough thanks for Ronin for the original idea, backbone code and permission to do this.
Also many thanks to A_Li_N for a kick ass resource box system and his permission to mess with it.
 

Attachments

  • Player Government System 2.21.zip
    379 KB · Views: 1,453

Tru

Knight
You know how long I been waiting for this....BIG THANKS!!
++Karma (hmm wouldnt let me add to karma)

I got an error from your LoginStats.cs that it couldnt find Playermobile...so I added using Server.Mobiles;
Also the original version had edits to AccountPrompt.cs that loaded player cities did you remove that code or move it?
 

ksy79

Sorceror
Server Crash

CityManagementStone double click Server Crash

Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 2006-07-22  pm 7:13:31
Mobiles: 2420
Items: 100498
Clients:
- Count: 1
+ 127.0.0.1: (account = test) (mobile = 0x2 'test')

Exception:
System.FormatException: Input string was not in a correct format.
   at System.Text.StringBuilder.FormatError()
   at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Server.Gumps.CityManagementGump..ctor(CityManagementStone stone, Mobile from)
   at Server.Items.CityManagementStone.OnDoubleClick(Mobile from)
   at Server.Mobile.Use(Item item)
   at Server.Network.PacketHandlers.UseReq(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
 

Avelyn

Sorceror
Need more than that. What did you do beside click the stone? That could be anything from something in the gump to something else you may have been doing. No one else has had a problem with it crashing just from clicking the stone.

Where did you place the city? Did you use the deed to do it? Was it in green acres? <-- Do NOT do this.
 

Avelyn

Sorceror
Tru said:
You know how long I been waiting for this....BIG THANKS!!
++Karma (hmm wouldnt let me add to karma)

I got an error from your LoginStats.cs that it couldnt find Playermobile...so I added using Server.Mobiles;
Also the original version had edits to AccountPrompt.cs that loaded player cities did you remove that code or move it?


Thanks Tru for the distro catch, I obviously use moded files! :) The change to Accountprompt was a thing iamjedi did. It isnt necessary for this version.
 

godfood

Sorceror
Hey, I love the system. I'm interested in adding more structures, but i'm not sure how to add the "signs" and such to multi's. Could anyone shed some light on this for me?
 

ksy79

Sorceror
Work that I do
1. Basis RunUo install
2. Basis Government System install
(Nothing edited)
3. Make test account and character and connected to server
4. Found suitable place (wide earth on the Minoc north)
5. Added item using [add MarbleCityHallDeed Command (I Like Marble)
6. MarbleCityHallDeed built City Hall at the double click
7. Come and did CityManagementStone double click inside City Hall


There is result on down ↓↓↓↓↓↓

Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 2006-07-22  pm 7:13:31
Mobiles: 2420
Items: 100498
Clients:
- Count: 1
+ 127.0.0.1: (account = test) (mobile = 0x2 'test')

Exception:
System.FormatException: Input string was not in a correct format.
   at System.Text.StringBuilder.FormatError()
   at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Server.Gumps.CityManagementGump..ctor(CityManagementStone stone, Mobile from)
   at Server.Items.CityManagementStone.OnDoubleClick(Mobile from)
   at Server.Mobile.Use(Item item)
   at Server.Network.PacketHandlers.UseReq(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

Sorry my english is no good
 

Avelyn

Sorceror
Hmm I can't reproduce this, but you're the second to have this problem. I will keep trying.

There is only 1 instance of the String.Format method in that part of the gump and it shows you where the center of the town is located. The only reason that would be an error is if the place you have the town is invalid.


There is 1 other possiblity but I can't imagine why it works for most and not for some....
I did not modify this part of code from the stock stuff, but just as a possible problem, edit the CityManagementGump.cs file...

at line 90 you should see this:
Code:
AddLabel(25, 140, 1149, @"City Location: " + fmt.ToString() );

Change it to this:
Code:
AddLabel(25, 140, 1149, @"City Location: " + fmt );

It was never something I had an error with so I never checked that and noticed it was redundant. Let me know if this fixes your problem and I will make the change in the distro. If not, please see if you can give me a debug crash report and I will keep looking. Thanks!
 

Avelyn

Sorceror
godfood said:
Hey, I love the system. I'm interested in adding more structures, but i'm not sure how to add the "signs" and such to multi's. Could anyone shed some light on this for me?

Make the multi just like you would any other add on. Then take alook at the Deeds to place the buildings. It should guide you on how to make the building with the city sign.

Just make sure everything is always linked to the CityManagementStone! Let me know if you have difficulties.
 
Me love you long time? Seven screwed up something on shard, so we will have to wait until he gets stuff working properly before we can install this, but Can I say YAY enough times?
 
I should probablt try this once before asking a bunch of questions but I kinda want to know before doing alot of work.

On my shard I will be using a unique housing system. I will be starting with knives town houses and removing current housing as an option to players. The entire shard will be using the town houses with some changes. This is where I need to ask my question. How well would this work if I intend to use nothing but town houses and could I create the towns set them up and then let players run them like this?
 

Avelyn

Sorceror
Midnightdragon said:
I should probablt try this once before asking a bunch of questions but I kinda want to know before doing alot of work.

On my shard I will be using a unique housing system. I will be starting with knives town houses and removing current housing as an option to players. The entire shard will be using the town houses with some changes. This is where I need to ask my question. How well would this work if I intend to use nothing but town houses and could I create the towns set them up and then let players run them like this?

I am not familiar with how the townhouse system works, but if the houses are set up as a house region, and you can check them via the normal house methods in BaseHouse.cs I don't see why not.

As for you setting the towns up, that could be done, it could be as easy as setting it up and creating a deed or command to transfer mayorship (you COULD just do props on the stone and change it also but that's cheezy) to them or rewrite that part of the system. Just be careful because as a GM/Admin you can place them in alot more places then players and when the town updates it does do checks on the town. Would hate to see it deleted out from under them. Note: You would only be able to set them as a level 1 town under the current code because it's solely based on town population. You would need to recode the core of the system if you wanted to be able to set up an already made empire etc...
 

A_Li_N

Knight
ksy79 said:
Work that I do
1. Basis RunUo install
2. Basis Government System install
(Nothing edited)
3. Make test account and character and connected to server
4. Found suitable place (wide earth on the Minoc north)
5. Added item using [add MarbleCityHallDeed Command (I Like Marble)
6. MarbleCityHallDeed built City Hall at the double click
7. Come and did CityManagementStone double click inside City Hall

I followed those steps and it didn't crash for me...
I'm at 129.38N 86.16E
Any debug crash log?
 

ksy79

Sorceror
2.01 versions install island in the sea still same Server Crash happen
While found one strange point, if it builds to green acres, there is no more than any

I here friends and other point I am that use WindowXP course client that use 2byte letter.
Perhaps, use Government System in Operating System that use 2byte letter does not problem exist?

I am sorry because can not make English freely
 

A_Li_N

Knight
ksy79 said:
2.01 versions install island in the sea still same Server Crash happen
While found one strange point, if it builds to green acres, there is no more than any

I here friends and other point I am that use WindowXP course client that use 2byte letter.
Perhaps, use Government System in Operating System that use 2byte letter does not problem exist?

I am sorry because can not make English freely
If you can reproduce the crash, do it in -debug mode so we know exactly where the problem is.
 

Tru

Knight
I actually just set my first town up Last Night:

4. Found suitable place (wide earth on the Minoc north)
5. Added item using [add MarbleCityHallDeed Command (I Like Marble)
6. MarbleCityHallDeed built City Hall at the double click
7. Come and did CityManagementStone double click inside City Hall

I did exactly that, North of Minoc.....everything seems fine.
 
Top