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!

Resource icon

[2.x] Ultima Live Map Streamer and Editor 0.97

No permission to download

Eric T. Benoit

Wanderer
After chatting with Praxiiz for a bit today I decided it might be a good idea to document some of the commands involved with using this system. I am missing a few here, a couple because I do not know what they do, one because I need to discuss it a bit more with the bossman, and one because I am not sure how to describe it succinctly. Anyway, here is what I have for you. Hope it helps. :)

Code:
IncStaticAlt [-]<n>, Raises or [lowers] static by n.
SetStaticAlt [-]<n>, Sets static z to n.
SetStaticID <n>, Change a statics id, just like changing itemid on a normal item.
DelStatic, Delete a static.
AddStatic <n> <n2> [n3], add a static with id n and hue n2, both arguments are required n2 can, of course, be 0, n3 is optional and will set the z of the added static to n3.
MoveStatic, Move a static, same as move command for normal items.
IncLandAlt [-]<n>, Raise or [lowers] targeted land tile by n.
SetLandAlt [-]<n>, Sets targeted land tiles z to n.
SetLandID <n>, Changes targeted land tiles ID to n. Similar to [set itemid.

I am actually thinking of overloading AddStatic on my local copy so it can be used with only 1 arg and default to hue 0.
 

fwiffo

Sorceror
I have a couple of bug fix:

FileExport ([ClientFileExport), adds the extra maps in the folder even if they are associated to main one, to avoid this there is a fix in the included patch;

CompareStaticTiles, if the static tile is in the same Z axys, it will keep original reading order of the client, to avoid static swapping, the fix is also included in the patch;

Of course you have to pass extra parameters to the sort method, this is passed with a static variable containing the map where we are currently working.

I also removed an unused var...nothing really useful, but at least I have no warnings when compiling it all.

Patch included...
 

Attachments

  • fixes_ultimalive.patch
    4.2 KB · Views: 3

Praxiiz

Sorceror
Ok a little more info on my issue. It looks like everywhere I gate in is good except Luna and Umbra. Those seem to be the only places that give a black screen or I fall through the floor of them.
This is fixed in the next version. Stay tuned.
 

Gamble

Traveler
Fwiffo I pplied this patch and It seemed to almost fix my issue but not quite... I was able to move around more in Umbra than usual but still mostly black and falling through the floot. Not sure if that patch was to fix the issue I posted but it did help some
 

Praxiiz

Sorceror
Praxiiz updated Ultima Live Map Streamer and Editor with a new update entry:

UltimaLive v.0.96

0.96
Fixed terrain refresh bug that caused black tiles to appear in some stock maps and in custom maps.
Removed some client function signatures that were no longer being used
Added Client Export fix patch submitted by fwiffo that properly handles exported maps when virtual maps are used
Fixed bug in serverside files that would reset the hues of statics in the same x,y to 0 when a static was deleted
Fixed a minor bug that prevented MapRegistry.cs from compiling on .NET < 3.0

Read the rest of this update entry...
 

Praxiiz

Sorceror
After understanding part of Eric T. Benoit's shard's setup, I realized that there are some things that need to be added and/or fixed:
A command to edit the hue of a static item
Some ground leveling tools
Fix the CircularIndent command - it's not currently working on some shards
Change the sequence of the map definition packet so that it occurs after you have selected a server from the server list. The reason that it happens where it does was to avoid distro edits, but this system can no longer maintain that goal.
 

Praxiiz

Sorceror
Also, if anyone is feeling ambitious, I would gladly add a client file exporter that supports UOP if anyone wants to write one.
 

Eric T. Benoit

Wanderer
Ok, I didn't overload, I just made some adjustments to the existing methods, works well on my shard. Just replace your AddStatic class in UltimaLive.cs with the one below.

Code:
  public class AddStaticCommand : BaseCommand
  {
    public AddStaticCommand()
    {
      AccessLevel = AccessLevel.GameMaster;
      //Supports = CommandSupport.AllNPCs | CommandSupport.AllItems;
      Supports = CommandSupport.Simple;
 
      Commands = new string[] { "addStatic" };
      ObjectTypes = ObjectTypes.All;
      Usage = "addStatic itemId Hue [altitude]";
      Description = "Add a static.";
    }
 
    public override bool ValidateArgs(BaseCommandImplementor impl, CommandEventArgs e)
    {
      bool retVal = true;
      if (e.Length < 1 || e.Length > 3)
      {
        e.Mobile.SendMessage("You must specify the Item ID and, optionally a Hue and a Z value");
        retVal = false;
      }
      return retVal;
    }
 
    public override void Execute(CommandEventArgs e, object obj)
    {
        int newHue = 0;
      int newID = e.GetInt32(0);
        if(e.Length >= 2)
      newHue = e.GetInt32(1);
 
      if (obj is IPoint3D)
      {
        IPoint3D location = e.Mobile.Location;
 
        if (obj is IPoint3D)
        {
          location = (IPoint3D)obj;
        }
 
        int newZ = location.Z;
        if (e.Length == 3)
        {
          newZ = e.GetInt32(2);
        }
        Console.WriteLine("adding static");
        new AddStatic(e.Mobile.Map.MapID, newID, newZ, location.X, location.Y, newHue).DoOperation();
      }
    }
  }

The only problem with doing it this way is that if you want to include a z you MUST also include a hue.

EDIT: Edited here to reflect the change from below.
 

Gamble

Traveler
Just installed It and I have the same issue. Was there any edits that needed to be made? Still have the issue in Umbra and Luna
 

Eric T. Benoit

Wanderer
Just installed It and I have the same issue. Was there any edits that needed to be made? Still have the issue in Umbra and Luna


I am far from being an expert on this but pls PM me your shard address and I will come take a look and see if I can help you determine your problem.
 

Eric T. Benoit

Wanderer
Praxiiz, I know you're busy with work and updating thg the stability of the system as a whole so I went and wrote that command to change hues on statics for you.

First, in UltimaLive.cs find:
Code:
  public class DelStaticCommand : BaseCommand
and just above it add:
Code:
  public class SetStaticHueCommand : BaseCommand
  {
    public SetStaticHueCommand()
    {
      AccessLevel = AccessLevel.GameMaster;
      //Supports = CommandSupport.AllNPCs | CommandSupport.AllItems;
      Supports = CommandSupport.Simple;
 
      Commands = new string[] { "SetStaticHue" };
      ObjectTypes = ObjectTypes.All;
      Usage = "SetStaticHue";
      Description = "Set the hue value of a static.";
    }
 
    public override bool ValidateArgs(BaseCommandImplementor impl, CommandEventArgs e)
    {
      bool retVal = true;
      if (e.Length != 1)
      {
        e.Mobile.SendMessage("You must specify the hue");
        retVal = false;
      }
      return retVal;
    }
 
    public override void Execute(CommandEventArgs e, object obj)
    {
      int Hue = e.GetInt32(0);
      if (obj is StaticTarget)
      {
        new SetStaticHue(e.Mobile.Map.MapID, (StaticTarget)obj, Hue).DoOperation();
      }
    }
  }
Then find:
Code:
      TargetCommands.Register(new SetStaticIDCommand());
and underneth it add:
Code:
      TargetCommands.Register(new SetStaticHueCommand());

Next, in MapOperations.cs find:
Code:
    public class MoveStatic : ExistingStaticOperation
and above it add:
Code:
    public class SetStaticHue : ExistingStaticOperation
    {
        protected int m_NewHue;
        public SetStaticHue(int mapNum, StaticTarget targ, int newHue) : base(mapNum, targ)
        {
            m_NewHue = newHue;
        }
 
        public override void DoOperation(Dictionary<int, LocalUpdateFlags> blockUpdateChain)
        {
            if(m_StaticTiles==null || m_StaticTiles.Length==0) return;
            m_StaticTiles[m_TileIndex].Hue = m_NewHue;
            base.DoOperation(blockUpdateChain);
        }
    }


Enjoy! :)
 

Eric T. Benoit

Wanderer
Hmm...did you change anything in [LiveFreeze? Whenever we LiveFreeze an area and then save&restart the server, the area we froze vanishes...it is fine until we restart though.
 

Eric T. Benoit

Wanderer
Found a small bug in my change to the addstatic command, in my change you will see a line:
Code:
if(e.Length == 2)
In reality it should be:
Code:
if(e.Length >= 2)
 
Top