UltimaLive Lumber Harvesting

UltimaLive Lumber Harvesting 0.43

No permission to download

john burns

Citizen
I am getting this error with this package:

+ _Customs/GraphicBasedHarvestSystems/BaseHarvestablePhase.cs:
CS0246: Line 279: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
CS0246: Line 329: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
CS0246: Line 336: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
CS0246: Line 386: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
CS0246: Line 499: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
+ _Customs/GraphicBasedHarvestSystems/LumberHarvest/BaseTreeHarvestPhase.cs:
CS0246: Line 61: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
CS0246: Line 93: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
CS0246: Line 132: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
+ _Customs/GraphicBasedHarvestSystems/LumberHarvest/HarvestableTrees.cs:
CS0246: Line 86: The type or namespace name `MapOperationSeries' could not be found. Are you missing an assembly reference?
 
I'm not sure I understand how to use the custom graphic. Do we have to make our own custom art and add it somewhere? I was going to message @Hank but his profile is private or something and I cannot. I've got UltimaLive and the harvesting system all up and working, but when using the custom graphic by commenting out the appropriate line, I end up with unused tiles. Was a graphic provided somewhere that I missed?
 

Piotr

Citizen
I got this system to work, but all of my trees regrow at the same time. My regrowth timer is set to 5 minutes. Say I chop a tree and 3 minutes later I chop another tree. The first tree that was chopped should respawn in 2 minutes and the second one in 5 minutes.
However, in that situation they both respawn in 2 minutes. It's like the regrowth counts since the first tree that was chopped. Don't they have individual timers?
 

GoldDraco13

Knight
I got this system to work, but all of my trees regrow at the same time. My regrowth timer is set to 5 minutes. Say I chop a tree and 3 minutes later I chop another tree. The first tree that was chopped should respawn in 2 minutes and the second one in 5 minutes.
However, in that situation they both respawn in 2 minutes. It's like the regrowth counts since the first tree that was chopped. Don't they have individual timers?

Having a timer for each tree would cause a issue if you had a lot of players chopping trees, if you want to solve this, I would think that you would need to have a enum on the tree that has 5 states, which represent each regrowth state and have the single timer just move up the enum to the next state, this would allow each tree to be at different states and have only one timer controlling it all. I would use a timer at one minute intervals, which after 5 intervals is the 5 min total time for regrowth from time it is chopped!

Just my 2 cents, there could be better ways to solve this!
 

gametec

Rookie
I only get regular logs nothing else any ideas???
that is because the other logs, if I remember correctly, aren't defined in the system. However if I trouble shoot this further, Ash, Oak, Heartwood etc. are all defined randomly as to what tree yields what logs. Once found though, that tree will always produce those logs. The question remains: if said tree falls and it yielded heartwood while standing, will its fallen counterpart yield the same type of log?

My assumption is no. The reason is because the fallen tree is a different itemID and therefore a different object in the game.
 

timginter

Citizen
I've just noticed a bug in my previous code - it won't give you resources until you have enough skill to be able to chop both main and the fallback resource. I had to make more modifications to the whole system, though, I'll post the 2 files I changed here if you don't mind, Praxiiz.

BaseAxe.cs seem to not have IUsesRemaining interface in original ServUO files - you have to add that interface for axes to lose 'Uses' on chopping, BaseAxe declaration should look like this:
Code:
public abstract class BaseAxe : BaseMeleeWeapon, IUsesRemaining
(reported as bug)

\Scripts\Services\Harvest\HarvestTarget.cs - around line 60 you have to change all this.m_System is Lumberjacking to this.m_System is UltimaLiveLumberjacking, otherwise you will not be able to carve anything or destroy furniture with axes.

\Scripts\Custom\GraphicBasedHarvestSystems\LumberHarvest\LumberHarvest.cs - file attached below - now deleting tree phases and giving tree resources dependant on a successful Lumberjacking SkillCheck. Added FailMessage on unsuccessful chop (unsuccessful SkillCheck).

\Scripts\Custom\GraphicBasedHarvestSystems\BaseHarvestablePhase.cs - file attached below - added a check for skillReq for main and fallback resource earlier in the code. Changed the way main and fallback resource are given - main as a chance, fallback as a guaranteed resource since the character passed a SkillCheck() earlier. If player doesn't have enough skill for either main and fallback resources he'll get a message telling him he will not yet be able to chop any useful wood out of that type of trees.


------------------------------------------------

It's difficult to troubleshoot if you do not debug on your own. It's clear UltimaLive is the not working one, hard to give more clues as to what to do. Hope you'll get UltimaLive working in the end.

@Cody messaged me with an "Index out of bounds" exception he was getting. I was less experienced with C# and programming when I wrote the changes 4 years ago, it could have been much better... anyway, I have no idea why I wrote it that way. There's an error in my changes, in BaseHarvestablePhase.cs line 453 - I'm building a list of main resources from PhaseResources a few lines above that, but when getting a random main resource I'm using:
C#:
resource = mainResources[Utility.RandomMinMax(1, PhaseResources.Count - 1)];
this is not correct - replace it with:
C#:
resource = mainResources[Utility.RandomMinMax(0, mainResources.Count - 1)];

The changes I made to this system are in post-45087 - read this thread from that post to get my changes and corrections (corrections in post-45448, post-47873 and this post - the change to RandomMinMax() above)