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!

Harvest System [revised] w/ Garden Deed

DarkJustin

Wanderer
Harvest System [revised] w/ Garden Deed v. 1

Summary:
I have taken the '[Any] Harvest System 1.4' and revised it a bit. And I've also added the ability to have 'Garden Deeds' so that players can plant their produce inside of their own garden.

Description:
The Original Harvest System Can Be Seen "http://www.runuo.com/forum/showthread.php?t=30744".

Harvest System (unchanged):
-GM's can add trees. [add pear/peach/applesapling--[change] ANYONE can pick fruit from trees...Lumberjackers can chop the trees down.
-GM's can add 'special trees' [add BananaTree/CoconutPalm--[change] ANYONE can pick fruit.


Changes to Harvest System:
-Can plant seeds inside of a customized house, providing the tiles are 'ground' tiles
-Changed growing times...shortened them.
-Instead of Lumberjacking being the base skill for the script it is cooking.
-To harvest Wheat, Corn [corn is not a buyable seed...beacuse it does not yeild corn itself], Carrots, Onions, Lettuce, and Cabbage one must have the cooking skill.
-To harvest Flax or Cotton one must have the tailoring skill.
-To harvest Garlic and Ginseng one must have the Magery skill.


Additions to Come:
-Changing the yeild of wheat from bread to sacks of flour (can someone help this) [done]
-Mandrake/Nightshade/BlackPearl/Bloodmoss/SpiderSilk reagent seeds. [no artwork]
-'Growable' Honey w/ bees and what not.
-Cantaloupe/Squash/Gourd Plants
-Watermelon/Pumpkin/Grape vines.

Garden Deed System:
-The base of this is Dupre's Tent...but I modified it quite extensivly.
-There is a chest that has a max of 50 items for storage of seeds or produced items and what not.
-The scissor sign on the right will 'clean-up' your garden in which case you will no longer be able to plant anything.

Additions to come: (I am unsure on how to do the following)
-Gates (code is [add LightWoodGate EastCW & [add LightWoodGate WestCCW)
-Make the gates lockable so only the person whos garden it is can get in.
-Allow no telelportation within the fence.
-Wipeing the area so that nothing is left behind ((because plants that are planed will remain so after the garden is 'cleaned up'.))


***PLEASE IF YOU CAN HELP ME OR WHAT NOT PLEASE POST HELPFUL-NESS, I AM NOT VERY EXPEREINCED ABOUT ALL I CAN DO IS TWEAK SCRIPTS...***

Installation:
Scripts\Custom\HarvestSystem

Place a farm hand somewhere so the players can buy the garden deed and seeds.
 

Attachments

  • Harvest System.zip
    52.8 KB · Views: 2,077

minorj

Wanderer
is this a beta 36 or RunUO 1?

Lines 7 , 30 , 52 & 74 refer to a baseseed. RansackAgent search shows that those are the only reference to baseseed. This leads me to ask for what version of RunUO is this ment for?
 

Horde_Pil

Wanderer
bug

there is a major bug, if the player plants crops, the crops will remain when the garden is destroyed.. you should make it destroy the crops.
 

Horde_Pil

Wanderer
here is an idea, make the crop check the tile its on whenits growing and/or when harvested.. if it does not match a garden tile it dies..

another thing you can do is make the garden wipe all items in the area ofthe garden whe its destroyed.. this would be better to do, and if this was done in that way, make it check to see if its in a house, make it to where a player cant use the placement tool in a house so it does not wipe there items in there house when it is removed
 

pauln375

Sorceror
Thank You

I dont know if this was made per my request but I requested something of this nature a while ago so thank you
 

DarkJustin

Wanderer
minorj said:
Lines 7 , 30 , 52 & 74 refer to a baseseed. RansackAgent search shows that those are the only reference to baseseed. This leads me to ask for what version of RunUO is this ment for?

This script (to my knowledge) works on RunUO 1...[thats the server I run], But I don't think that it would have a problem cross platforming...Someone wanna test that?
 

DarkJustin

Wanderer
Horde_Pil said:
here is an idea, make the crop check the tile its on whenits growing and/or when harvested.. if it does not match a garden tile it dies..

another thing you can do is make the garden wipe all items in the area ofthe garden whe its destroyed.. this would be better to do, and if this was done in that way, make it check to see if its in a house, make it to where a player cant use the placement tool in a house so it does not wipe there items in there house when it is removed


((and it really isn't an untold bug--I mentioned this in the top section of this forum ;)))
Horde I totally agree...but how can we put this into action. I love the thoughts--but I don't know how code thuis.
 

Horde_Pil

Wanderer
hmm

well i thought about that, what i would do is set the crops to check the tiles they are on durring an action such as growth or harvest.. if the tile is not of a dirt piece then it give some message of death and removes itself..
 

DarkJustin

Wanderer
Horde_Pil said:
well i thought about that, what i would do is set the crops to check the tiles they are on durring an action such as growth or harvest.. if the tile is not of a dirt piece then it give some message of death and removes itself..

Can you post the code on how this would look? Because that is my issue, I have NO IDEA how to code that. I also had that idea, but I am stuck at the idea phase of this project because I cannot code it. :cool:
 

minorj

Wanderer
Ok then where is the code for baseSeed in your scripts?

DarkJustin said:
This script (to my knowledge) works on RunUO 1...[thats the server I run], But I don't think that it would have a problem cross platforming...Someone wanna test that?

only place I can find referance to it in the entire script folder is in plantseeds.cs and it is in the form of redseed : baseSeed , thus causeing an error
 

David

Moderate
*watches with interest*

If I can shed any light on any portion of the origional version let me know. I do still intend to do a total rewrite of this system, but it may be many months away yet.
 

DarkJustin

Wanderer
David said:
*watches with interest*

If I can shed any light on any portion of the origional version let me know. I do still intend to do a total rewrite of this system, but it may be many months away yet.


SWEET! Uhm... *raises hand in delight*... QUESTION.

How can the harvest system be tweaked so that only the person that planted the seed can harvest it? (GM's and Admin can be differnt so they can plant things around the land for ALL to harvest))

Is there a way to put a check in the script so that when the seed hits a non compliant tile that it will die?

ANY THOUGHTS?!?!
 

David

Moderate
First question, in any crops OnDoubleClick() just add if ( m_sower != from ) return; at the very begining of the method. You can expound on it from there, but that will do the trick.

Second, in the seed portion of any crop where the check against CropHelper.CheckCanGrow() is performed, add a Consume(); before the return; line.
 

DarkJustin

Wanderer
David said:
First question, in any crops OnDoubleClick() just add if ( m_sower != from ) return; at the very begining of the method. You can expound on it from there, but that will do the trick.

Second, in the seed portion of any crop where the check against CropHelper.CheckCanGrow() is performed, add a Consume(); before the return; line.

The problem is that when the garden deed is used...you can plant seeds--and when you redeed the garden the seeds that are growing are left in the spot of the garden--the second thing that you gave will now check to see if it is in a compliant square or not? Would you mind explaining the way that the consume thing works--so I can learn?

In the following code where do i add the consume thing?

Code:
 		public virtual bool CanGrowFarm{ get{ return true; } }
		public virtual bool CanGrowHouseTiles{ get{ return true; } }
		public virtual bool CanGrowDirt{ get{ return false; } }
		public virtual bool CanGrowGround{ get{ return false; } }
		public virtual bool CanGrowSwamp{ get{ return false; } }
		public virtual bool CanGrowSand{ get{ return false; } }
		 // For Player Deeded Plots
		public virtual bool CanGrowGarden{ get{ return false; } }
 
H

hudel

Guest
Thanks you, good work. What files do I need if I want the garden deed alone?
 

Horde_Pil

Wanderer
hmm

i am at a friends house so i have not had time to work on it, but today when i get home i plan on it.. anyway this is how it should work.. in the script there is a timer that dictateswhen its itemid changes, this is simmulating a growth proccess, but instead of it just changing the itemid have it first check the tile it is resting on, this is done initially when you plant a seed so its kind of the same system or proccess.. so just transpose and chenge what is needed to get it to do a secondary check for a tile.. then what you need to do is the same thing on a double click, it would normally do its skillcheck and ownership check, but first have it once again do a tile check in which it will remove itself and say something to the player in the effect that they do not find any food worth harvesting..

the other method would be to have the farmland on removal wipe all in its radious or tile area, this would also work but if this was how it would be done then i would make it not allow to be built in a house.. have it do a housecheck..
 

DarkJustin

Wanderer
hudel said:
Thanks you, good work. What files do I need if I want the garden deed alone?


Within the Zip file, ((when you extract it somewhere)) it should go into two seperate folders. These folders will have harvest and garden. The files within the Garden are just the garden deed...

The files that just go with the garden deed all have the word Garden in the cs file...
 

Greystar

Wanderer
Next logical step is figuring out how to make the built-in plant system use the harvest system. IE the parts where you can plant plants in dirt tiles. Yes i know it might make it so that you would have to elimnate pots and what not since it would look funny if the seed you planted grows into a plant with a pot, but it would be cool if people who customize there houses with dirt would be able to use there dirt spots in the house to include the other seeds and what not. but another thing that occurred to me. How about adding two more garden sizes. IE)
Existing One = Small
New Two = Medium
New Three = Large

add new costs for the new deeds and what not. I still think using the Alchemy skill would be the best skill for use with a Gardening system. Cooking still doesnt seem right, although since it is a little underused I can see why you picked it. But maybe keep the Cooking skill for harvesting but use Alchemy for upkeep and maintenance. Dunno, just an Idea.
 
Top