UltimaLive Lumber Harvesting

UltimaLive Lumber Harvesting 0.43

No permission to download

Praxiiz

Rookie
Praxiiz submitted a new resource:

UltimaLive Lumber Harvesting - Lumber Harvesting

Introduction
UltimaLive Lumber Harvesting is a graphics based harvest system. It allows players to actually chop down trees and cut them into pieces. Tree locations are saved and re-spawned according to a minimum interval set by shard owners.


Requirements
  • UltimaLive v.0.97
  • Cut Down Trees, Stumps and Saplings v.0.30 by Hank
Installation
  1. Unzip the archive into your UltimaLive folder.
  2. Install Custom Graphics
More...

Read more about this resource...
 

Hank

Squire
If anyone needs any help with my graphics or any other graphics relating to UltimaLine Lune Harvesting by Praxiiz. You can also pm me for aid on adding the art/tiledata.
Also check out his Map Streamer and Editor
 
Last edited:

Isidor

Citizen
Excellent resource here, gentlemen. I've deployed it and UltimaLive on my own shard (http://www.13thrones.com), and I'm currently testing it. Working great so far, save for a scant few issues:

1) Artwork for the downed trees needs to be added into sub 0x4000 blocks when importing - if added in the 0x4000 or 0x5000 range, the harvest system will not recognize the items as harvestable when targetted. Not sure if this is an issue with the harvesting scripts itself, UltimaLive, or simply client issues/limitations.

2) Specifying a custom time between harvest phases/respawns doesn't appear to work - regardless of the timespan override, trees cycle through their regrowths on every save.

Other than that, this is a pretty amazing system!
 

m309

Moderator
In LumberHarvest.cs, line 33

Code:
tiles[i] += 0x4000;

Try raising that to 5000? I haven't implemented the system yet, but its the only reference I saw.
 

Isidor

Citizen
First thing I tried. At work now, but I can't remember if it threw me an error in compiling or just simply didn't work.
 

m309

Moderator
Hrm, hopefully Praxiiz has an idea then, because that would definitely stink. My only available free slots are well into the 4-5k's.
 

Milva

Moderator
This will limit those who want to use this because of the "custom graphics" if one package could also be posted with out having the custom graphics, I'm sure more would like to use this :) Just my thoughts
 

Hank

Squire
You could tell it to use any of the distro art. In HarvestableTrees.cs Look at the #region OhiiTree, #region Generic Tree 1 and so on.
Most people will have to change their graphic hex values anyways because it unlikely everyone will be using the same exact graphic hex value.
All someone needs to do is go through and change the hex values to use default in game art
Not sure if praxiiz has a distro art style for this version.
 

Isidor

Citizen
That's pretty much required as is. Also a non artwork release would be doable if one were to just use the log art. Also Hank you may want to check your .csv files for mass imports. There were a few erroneous file paths in there specifically for Willow trees (willow vs. Willow1). Awesome work on the art by the way. Absolutely stunning.

Sent from my SCH-I535 using Tapatalk
 

Praxiiz

Rookie
This will limit those who want to use this because of the "custom graphics" if one package could also be posted with out having the custom graphics, I'm sure more would like to use this :) Just my thoughts

I was planning on having a non-custom graphics version. I haven't decided if I am going to handle that with a separate script or something like a #define. I am currently working on making that available.

You can see the stock graphics I was planning on using here:
 

Praxiiz

Rookie
Excellent resource here, gentlemen. I've deployed it and UltimaLive on my own shard (http://www.13thrones.com), and I'm currently testing it. Working great so far, save for a scant few issues:

1) Artwork for the downed trees needs to be added into sub 0x4000 blocks when importing - if added in the 0x4000 or 0x5000 range, the harvest system will not recognize the items as harvestable when targetted. Not sure if this is an issue with the harvesting scripts itself, UltimaLive, or simply client issues/limitations.

2) Specifying a custom time between harvest phases/respawns doesn't appear to work - regardless of the timespan override, trees cycle through their regrowths on every save.

Other than that, this is a pretty amazing system!

The underlying HarvestSystem base class (found in HarvestSystem.cs) is what we're working with. It is a stock server file that is distributed with RunUO/ServUO. The flow of execution looks like this:

BaseAxe.OnDoubleClick --> HarvestSystem.BeginHarvesting --> Sends new HarvestTarget

HarvestTarget.OnTarget --> HarvestSystem.StartHarvesting-->GetHarvestDetails

Code:
public virtual bool GetHarvestDetails(Mobile from, Item tool, object toHarvest, out int tileID, out Map map, out Point3D loc)
{
  if (toHarvest is Static && !((Static)toHarvest).Movable)
  {
    Static obj = (Static)toHarvest;

    tileID = (obj.ItemID & 0x3FFF) | 0x4000;
    map = obj.Map;
    loc = obj.GetWorldLocation();
  }
  else if (toHarvest is StaticTarget)
  {
    StaticTarget obj = (StaticTarget)toHarvest;

    tileID = (obj.ItemID & 0x3FFF) | 0x4000;
    map = from.Map;
    loc = obj.Location;
  }
  else if (toHarvest is LandTarget)
  {
    LandTarget obj = (LandTarget)toHarvest;

    tileID = obj.TileID;
    map = from.Map;
    loc = obj.Location;
  }
  else
  {
    tileID = 0;
    map = null;
    loc = Point3D.Zero;
    return false;
  }

  return (map != null && map != Map.Internal);
}

The relevent portion of code is
Code:
 tileID = (obj.ItemID & 0x3FFF) | 0x4000;

It could be to support lower client versions. I haven't really dug into it to know for sure. What I do know is that it would need to be changed to support higher graphics slots.
 

Praxiiz

Rookie
I just realized that I never actually implemented the growth timer. Currently it just regrows every time the world saves. This will be coming soon!
 

Hank

Squire
are there missing install instructions?

on this part (Modify Base Axe, and Polearm) I get the following error.
Code:
+ Items/- BaseClasses/BaseAxe.cs:
  CS0103: Line 68: The name 'UltimaLiveLumberjacking' does not exist in the cu
rrent context
 + Items/- BaseClasses/BasePoleArm.cs:
  CS0103: Line 63: The name 'UltimaLiveLumberjacking' does not exist in the cu
rrent context
I tried adding using UltimaLive; and using UltimaLive.LumberHarvest; and it still did not work.
 

Praxiiz

Rookie
Check your LumberHarvest.cs and see if the top portion matches this:

Code:
namespace Server.Engines.Harvest
{
  public class UltimaLiveLumberjacking :  HarvestSystem
  {
 

Hank

Squire
line 13 - 16
Code:
namespace Server.Engines.Harvest
{
  public class UltimaLiveLumberjacking :  HarvestSystem
  {

Also I extracted GraphicBasedHarvestSystems folder directly into Servuo/UltimaLive folder.
aka I extracted the archive into the UltimaLive folder.

(Post 300 :D)
 

Praxiiz

Rookie
Does your BaseAxe.cs have

Code:
using Server.Engines.Harvest;

at the top?


The method in BaseAxe.cs should look something like
Code:
public virtual HarvestSystem HarvestSystem
  {
  get
  {
  return UltimaLiveLumberjacking.System;
  }
  }
 

Hank

Squire
Does your BaseAxe.cs have
Code:
using Server.Engines.Harvest;
at the top?
Yes it does

This is my method in BaseAxe.cs
Code:
public virtual HarvestSystem HarvestSystem
  {
  get
  {
         //return Lumberjacking.System;
  return UltimaLiveLumberjacking.System;
  }
  }

I am also having an issue with UltimaLive map streamer and editor, I can't moved my character to the example 'test' map 32. It causes my client to lock up. I'm using client version 7.0.18