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!

[2.x] Terraforming - based on Ultima Live Map Streamer/Editor (By Praxiiz)

Vhaldir

Sorceror
This is intended to (eventually) be a complete player-terraforming system based on Praxiiz's Ultima Live Map Streaming/Editing system.

Below are three individual/stand-alone scripts that will allow players to harvest grass/dirt/water respectively and re-place them in the world to modify land tiles and/or elevation.

*NOTE* In order for players to be able to harvest land tiles (for dirt & grass), there needs to be changes made to the distro mining script.

The 'waterbucket' script however, is drag-drop (as long as you have the Ultima Live system http://www.runuo.com/community/threads/ultima-live-map-streamer-and-editor.533772/).

Dirt/Grass are pretty simplistic/basic and don't do a whole lot yet. These were the starting points/'proof of concept' scripts I started with for player terraforming implementation. I am providing them solely for the community's sake; should anyone care to take them further (Otherwise, I will get around to it,.. eventually). Right now, if the targeted tile/area meets the requirements, they simply edit a 3x3 area to dirt/grass tiles.

All the real work was done in the water bucket script, which allows players to collect/place bodies of water. This one isn't quite finished yet either, but it's close. It still needs some tweaks and additions to the borders/transitions for land and static checks. Right now it only checks/modifies grass borders (Still need to do snow, rock, sand, forest, jungle, etc).

I am probably going to be in and out for a while again, as my motivation to develop for UO wanes and waxes; which is why I am providing these scripts in an unfinished state. Anyone who wishes to carry these further, feel free. I only ask that you share with the community, so that all may enjoy. Feel free to highjack this topic or w/e.

Again, sorry for the partial submission, but I'm running out of drive atm and too busy IRL, but wanted others to be able to take advantage of this idea/work so far..

Here we go..

INSTALLATION:
REQUIRED: UltimaLive by Praxiiz : http://www.runuo.com/community/threads/ultima-live-map-streamer-and-editor.533772/

Mining.cs (Optional Distro EDITS)- My mining script is fairly heavily customized, so I am including the entire script for location reference, etc. Look for any references to Dirt/Grass, and CheckTerraform and edit them into your mining script, if you want to be able to dig/mine dirt or grass from land tiles (otherwise, leave 'em out and just add these objects some other way. NOTE: I also added a new 'terraforming' smartregion.. which you may or may not wish to include.. if not, just ignore that reference in this script.

Dirt.cs (Plug/Play - drop it in your scripts/custom folder..) : This is a VERY BASIC dirt 'item', harvested by digging/mining dirt tiles. When dropped to the world on dirt, it will raise the elevation. NOTE: Praxiiz recommended the .DoOperation()'s be moved to a MapOperationSeries so that multiple updates are not pushed to the client (better performance)

Grass.cs (Plug/Play - drop it in your scripts/custom folder..) : Same as 'dirt', but for grass...

WaterBucket.cs (Plug/Play - drop it in your scripts/custom folder..) - Procedural water generation/removal (read the comments at the top of the script). This script allows the player to use the water bucket to collect/place water. It uses targeting and then gathers information from the targeted tile, then each tile around the target; adding each tile checked to an array for re-check (procedural) until it finds a border meeting the elevation requirements. Someone might be able to better optimize this code, but it works..

Here's a quick .avi of the WaterBucket at work (procedurally placing water)
 

Attachments

  • Dirt.cs
    4.6 KB · Views: 6
  • Grass.cs
    4.3 KB · Views: 5
  • Mining.cs
    39.5 KB · Views: 4
  • WaterBucket.cs
    35.5 KB · Views: 5

ft2085267

Sorceror
Great! However, I encountered some problems:( . Thanks.
Errors:
+ UltimaLive_0_97/Terraforming/Dirt.cs:
CS0246: Line 83: Could not find the type or namespace name "NoTerraformingRegion" (are you missing
using directive or an assembly reference?)
CS0246: Line 83: Could not find the type or namespace name "NoTerraformingRegion" (are you missing
using directive or an assembly reference?)
CS0246: Line 83: Could not find the type or namespace name "NoTerraformingRegion" (are you missing
using directive or an assembly reference?)
+ UltimaLive_0_97/Terraforming/Grass.cs:
CS0246: Line 119: Could not find the type or namespace name "NoTerraformingRegion" (whether the lack ofLess using directive or an assembly reference?)
CS0246: Line 119: Could not find the type or namespace name "NoTerraformingRegion" (whether the lack ofLess using directive or an assembly reference?)
CS0246: Line 119: Could not find the type or namespace name "NoTerraformingRegion" (whether the lack ofLess using directive or an assembly reference?)
+ UltimaLive_0_97/Terraforming/WaterBucket.cs:
CS0246: Line 1003: Could not find the type or namespace name "NoTerraformingRegion" (whether the lack ofLess using directive or an assembly reference?)
CS0246: Line 1003: Could not find the type or namespace name "NoTerraformingRegion" (whether the lack ofLess using directive or an assembly reference?)
CS0246: Line 1003: Could not find the type or namespace name "NoTerraformingRegion" (whether the lack ofLess using directive or an assembly reference?)
 

Vhaldir

Sorceror
Mining.cs (Optional Distro EDITS)- My mining script is fairly heavily customized, so I am including the entire script for location reference, etc. Look for any references to Dirt/Grass, and CheckTerraform and edit them into your mining script, if you want to be able to dig/mine dirt or grass from land tiles (otherwise, leave 'em out and just add these objects some other way. NOTE: I also added a new 'terraforming' smartregion.. which you may or may not wish to include.. if not, just ignore that reference in this script.

You will want to remove these references from the script, or create a 'NoTerraformingRegion' (attached) and assign it to whichever region definitions you would like..
 

Attachments

  • NoTerraformingRegion.cs
    532 bytes · Views: 3
Top