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!

Instances Experiment

Rocko Wang

Wanderer
HellRazor;707597 said:
Those aren't the same things. An "instance" is a temporary copy of an area that only certain players can enter. And then, when there is no more use for the "instance", it is deleted.

Registering a new map means that the map stays with the server and isn't deleted.

I know exactly what you mean. I am just point out to AodHanW if he really wants to use the "Instance" concept for housing, better register it through code instead (a map divided into many small chunks where players could place house, and have limit on access), then he doesnt have to worry about saving/loading or one day someone complains the map their house is built on expired by accident.
If he still wants to call it an instance, I think it is perfectly fine, it is a copy of an existing map after all, and he could delete the register line if he is sure that map is empty again. And both are eventually aa call to new Map(). It is more like a long-term instance. For all practical purpose, register it and be done with it (delete it only needs to), is much easier than allocate it dynamically and have to worry about many other things. :)
For access, you could certainly create a teleporter with an owner (a person, group or guild) that never expires unless the map it points to is non-existing, to be used with a registered map just for housing.

Besides, even with registered map, you can still introduce dynamic allocation. Just divide the map into small chunks, then have a central teleporter, that assign a new chunk to each new player/group using the portal. Then save that link information, and use it every time. Can also reclaim that chunk if it has been sitting idle for say 1 month.

All I am trying to say is, registered map (however you call it) is the low-maintainance low-cost (less-fancy) way for something like housing.
 

HellRazor

Knight
Yeah, you're right, for something that isn't intended to be temporary, it would be better to register a new copy of the map. You only need to use these "instancing" mods to the core for areas that are temporary (like a quest dungeon that you only want a certain player or party to be able to enter at one time).
 

Kamron

Knight
Okay I seem to need to address a few issues here:

An instance is simply a map object... you can do with it what you want. The only difference between the instance and a normal map file are the following:

You can add/delete/edit the map object during runtime.
You can save/load the map object during world loads/saves.

The way I coded instances, they never "expire". If you add an instance, and make clumsy code that never cleans it up when it is not needed anymore, you could potentially clutter your server with unused maps.

Instance dungeons, as I have coded it, come into existence when a player enters it, and exists up to 24 hours after the player exits.

If you create instances for the sake of housing space (which I will be doing as well), then its simple. Section off the housing in green acres, when more housing space is needed, add a new instance (will not expire by default). When it is full of houses, it should automatically create more instances. If someone sells/removes their house and it is the only house in that instance, the instance should be automatically disposed of when the player leaves.

It is coded right now so that if you dispose of a map properly - Map.Delete() - then all items and mobiles in the instance will be removed. Players will then be ejected to the static version of the instance they are on, or whatever you specify.

Once you add the core code for instances, you will never need to touch the core code again, unless you are added features to the base instance code.

In terms of resources usage.. Its simple: a map is an object.. whether you use instance maps or registered maps, you will be using (roughly) the same amount of resources. The instance map is empty when you create it, so you do not need to worry about decos or spawns etc, unless you plan to do that yourself.

What makes resources get higher are the following:
Items, Mobiles, and Regions
Houses are multis, which is a single item (not including doors/deco).

Now onto the technical aspect of housing and instances.. I will be doing it like this:
Players want to place a premium house, they can choose from any of the following villages. Each village will be a predesigned instance with land where houses can be placed. The land will be represented by the "empty land" multis for AOS houses. A player places his house on the empty land, and the empty land is removed, and his house placed.

I will be making teleporters to allow players to go to the villages, and as more are needed, GMs will design/add more. The towns will be similar to britain, having a bank and other necessary buildings.

Only players who have an active subscription (donation) will be allowed to place houses in a village. Houses which are transferred from a subscriber to a non-subscriber will fall according to OSI's secondary house rules unless they subscribe.
 

HellRazor

Knight
I just don't really understand the need for the additional overhead of using instances for housing when there isn't a player run server out there with a population that will ever come close to using the space that is already available on the normal map. Even if you want to keep a map free of housing clutter there are 4 other maps (to include one exact duplicate of the main map) to choose from for that. And its also relatively easy to code up systems that prohibit certain players from entering certain regions.

So what's the advantage?

Dungeons and quest areas I understand. You don't want other players interfering with the player/party, so instances are handy for this. Create em, use em, throw em away.

But housing? I'm not getting why anyone would want to go to all the trouble and overhead of using instances for that. It's a lot easier (and requires no core mods) to just register a copy of one of the maps.
 

AodhanW

Wanderer
HellRazor;707843 said:
I just don't really understand the need for the additional overhead of using instances for housing when there isn't a player run server out there with a population that will ever come close to using the space that is already available on the normal map. Even if you want to keep a map free of housing clutter there are 4 other maps (to include one exact duplicate of the main map) to choose from for that. And its also relatively easy to code up systems that prohibit certain players from entering certain regions.

So what's the advantage?

There are several advantages to my way of thinking:
1. I don't want the 'main map' cluttered up with housing. Its one of the things that aggravated the hell out of me.. People cluttering up the environment with houses to the point there was no unhoused areas. However, I want people to have housing, and I want it to serve more functions than merely being HOUSING.

A. These areas will be houses. Yes.
B. There will be new types of Multis strictly used for planting new objects that are for 'farming'. These will be used for raising things such as wheat, rye, barley, peas, carrots, watermelons, etc. Through an interface. Players will be permitted as many of these as can be fit in their instance, until they 'buy' a new instance of larger size. (This is speculation at this point, but I can see no reason it can't be done based on information given).
C. Additionally, these areas will be used for Animal Husbandry, new Multis called 'farmyard'. On these items will be able to be 'built' via the locking mechanism that contain chickens, horses, cows, pigs, goat, sheep, etc. These 'objects' will only be able to be placed and locked on Farmyard Multis.

With these being implemented, I do not want this major landgrab fest happening on the main map, nor do I want it to be a 'first come first serve' type situation. (Note: Number of Multis available will vary as I further refine the idea).

In your usual UO shard, you're right, there'd be no use. In mine, they'll almost be essential. Especially as I intend to have no 'towns' or 'NPC Vendors', buildable space must be completely controllable and reasonably limitless.


Dungeons and quest areas I understand. You don't want other players interfering with the player/party, so instances are handy for this. Create em, use em, throw em away.

Amusingly, the shard I'm working on, when finished, will have no quests that aren't player created. And they'll be created by need. The system is in its infancy, and is still being mapped out for the coding that will need be done. But I'm fairly certain its going to work.

But housing? I'm not getting why anyone would want to go to all the trouble and overhead of using instances for that. It's a lot easier (and requires no core mods) to just register a copy of one of the maps.

Because housing won't be just housing on the shard under development.
 

HellRazor

Knight
I'm still not hearing anything that can't be done without instances.

And when I say "instances" I'm talking specifically about the instance system in this thread and the one described by Kamron above.

What I am saying is, you could use a Trammel/Felucca scenario to accomplish all the same things. You can register new clones of the main map as needed to accomodate new housing.

So I still don't understand why "instances" would be needed for any of this. "Instances" as outlined in this thread weren't really designed to be used as permanent areas.

My confusion may be because your definition of "instances" and mine might be different. My definition of an "instance" is a copy of an exisiting area that is created as needed and then discarded when no longer needed. It is a temporary area used for a specific purpose and then discarded.

The temporary nature of an instance is the only reason the core mods in this thread are needed. Otherwise, you can create non-temporary copies of an exisiting map without using instances/core mods, you just register a new map in mapdefinitions.cs.
 

Kamron

Knight
I dunno about you guys... but I coded instances as any easy way to make cloned maps. The maps are more versatile and dynamic than regular registered maps. They are permanent by default, but can be discarded if needed.

If you think of instances in the context of existing only when players are in them, then I would guess that my thinking is more broad than that, and possibly the word instance is the wrong term to use.
 

HellRazor

Knight
Kamron;707990 said:
I dunno about you guys... but I coded instances as any easy way to make cloned maps. The maps are more versatile and dynamic than regular registered maps.

For a duplicate map, the only advantages I can see that instances have over registering a map is that with instances you can dynamically delete the map and that you can define a smaller area (rather than a whole map).

But for a housing area, you probably don't want to delete it. If you did, you could just as easily wipe a defined area on a normal map.

Depending on what you are trying to do, I guess I can see some small advantage to having a smaller defined area. For example, if you had a guild town that you wanted to be limited to a certain amount of space, and accessable only to guild members, you could use an instance. Or if you wanted all guild towns to be accessable from the same entrance. Or if you wanted all the town areas to look the same but to represent different towns.

But I guess I still don't see the great advantage of using an instance for something like this. Maybe it's just personal preference, or maybe I just need to see it in practice to understand the advantage better.

If you think of instances in the context of existing only when players are in them, then I would guess that my thinking is more broad than that, and possibly the word instance is the wrong term to use.

Yeah, I don't think instances is the best term. "Virtual copy" might be better. I mean, effectively you're using an instance to register a new map (or make a copy of part of an existing map).

When i think of "instances" I think of areas that are copies of a location that are reserved for a player or group of players for a specific amount of time. Typically used for dungeons and quest areas where you don't want players to freely interact. In City of Heroes the "missions" are all instances. In D&D Online the dungeons are "instances". I imagine that Everquest and WoW probably have instanced dungeons/quests too.

I'm not saying that instances can't be used as a permanent area, but on the same token, I'm not sure why anyone would want to use an instance as a permanent area.
 

Alari

Wanderer
There were housing systems similar to instanced housing on various places I used to visit. Neocron had common entrances to an instanced house, you would enter a password to select which one you wanted to go to. Older games, text based, had a similar system too, one such area was a skyscraper that would add a new floor when the previous one filled up. Other MMO housing uses instanced areas, that is the same graphics are re-used or a separate copy is made, or a common entrance is provided.

For UO, you could create a large 'suburb' as an instanced area, (and can make it accessible from any town even), and when it fills up just make a new instance of the same area. If you want a lot of control over the instanced housing, you could code in support to copy UO houses and rental systems or the Townhouse rentals and save yourself a lot of work. Or just do like they did on the later maps, and have rectangles of grassy areas bounded by no-build objects. =) Either way, instances could be useful for housing.
 
Top