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.0]Winecrafting

dracana

Sorceror
[2.0]Winecrafting

Winecrafting System
Current Version: 2.0.1

********************
Original Post
This is my winecrafting system updated to work with RunUO 2.0 Rc1. This crafting system is based on other scripts that I have found here, including Sigma's grapevines and Demented's/Kesia's Brewing craft system.

This is a fully working script system, but I consider it a beta release to the RunUO community until I can get feedback/bug reports :)

Here are the features...
Wine crafting - using Alchemy skill. Alchemy of 80 required. Exceptionally crafted wines can bear vinyard name (maker's mark) and are made as "Special Reserve" wines.
Too add to realism, players craft kegs instead of bottles. Kegs must ferment for 7 real world days, before they can be bottled. Kegs are equiv of 15.5 gallon kegs and can bottle 75 wine bottles. If you prefer players to craft bottles, simply open defWinecrafting.cs and uncomment line 94 and comment out line 96.

Enhanced Sigma Grapevines - Includes gump to place, move, delete vines as well as set which variety of grape vine will hold.
Grape Picking - Multiple varieties of grapes can be picked from the vine and used in crafted wines. These varieties are...
Cabernet Sauvignon, Chardonnay, Chenin Blanc, Merlot, Pinot Noir, Riesling, Sangiovese, Sauvignon Blanc, Shiraz, Viognier, and Zinfandel​
Winecrafter NPC - Sells/Buys grape varieties. Sells winecrafting supplies (sugar, yeast, empty wine bottles, and winecrafter kit). Sells the grapevine placement tool and the vinyard ground addon deed.
Vintner NPC - Sells/Buys Bottles of wine

Tools
*Grapevine placement tool. This tool will open the same gump that admins use, but it is locked down when used by players to validate that they are placing/moving/deleting vines in their own house and only on dirt/ground tiles.
You can set the rules for placing grapevines by editing the following parameters in VinePlacement.cs…

AllowPlayerYards - (default = false) - Option if your shard allows players to build outside their house foundation. Currently set to allow players to place within 5 tiles of house
AllowAllHouseTiles - (default = false) - Option to allow players to place on all house tiles or only on dirt or vinyard ground addon.
AllowAllYardTiles - (default = false) - Option to work when AllowPlayerYards is true. To allow players to place on any type of tile or only on ground and dirt tiles.
m_VinePrice - (default = 250) - the price that each vine will cost the player and the price they will be refunded.

* Vinyard ground addon. This is only needed by players that don't have custom houseing. It is an addon that will add dirt tiles into their house.
NEW: Added two new addons that were created by masternightmage. These are the Keg Storage Rack and Bottle Rack.

* Vinyard Label Tool. This tool can be purchased from the Winecrafter NPC and can be used by players to name their own vinyard. To use, players need to double click label tool, then click on one of the following (depending on what they want to do...
Crafted Bottle of wine (crafted by them and exceptional only) - this will only label that specific bottle.
Crafted Keg of Wine (crafted by them and exceptional only) - this will label all bottles poured from that keg.
The Vinyard label Tool itself - If they name the tool, all future kegs, etc they craft will hold that name. Tool must be in backpack at time of crafting kegs!​

Addons two new addons that were created by masternightmage. These are the Keg Storage Rack and Bottle Rack. These are currently not sold by NPC’s. You can add in whatever manner you want.

To install, download the attached file and unrar it to your customs directory. Restart your server and you are ready to setup. You have different options to setup.

1. Using Vendors (required). You will want to add the Vintner(optional) and Winecrafter vendors to the world. Use spawner or [add to add them. I recommend adding Vintner to towns and Winecrafter in the farmlands somewhere. If you use the grapevines, I would add this vendor somewhere near the vines.

2. Using Grapevines (optional). Use the command [addgv to place vines into farmland (or wherever) of you world. This will bring up the Grapevine add gump to add vines. Vines can only be added to land tiles. You can set the variety of grape the vine will hold in the gump.

3. Modify GenericSell.cs for higher exceptional prices - If you would like "Reserve" wines to sell to vintner for higher price, look for the following...
Code:
   else if ( item is BaseBeverage )
   {
    int price1 = price, price2 = price;

    if ( item is Pitcher )
    { price1 = 3; price2 = 5; }
    else if ( item is BeverageBottle )
    { price1 = 3; price2 = 3; }
    else if ( item is Jug )
    { price1 = 6; price2 = 6; }

    BaseBeverage bev = (BaseBeverage)item;

    if ( bev.IsEmpty || bev.Content == BeverageType.Milk )
     price = price1;
    else
     price = price2;
   }
and add...
Code:
   else if ( item is BaseCraftWine )
   {
    BaseCraftWine wine = (BaseCraftWine)item;

    if ( item is BottleOfWine )
    {
     if ( wine.Quality == WineQuality.Low )
      price = (int)( price * 0.60 );
     else if ( wine.Quality == WineQuality.Exceptional )
      price = (int)( price * 1.25 );
    }
    if ( price < 1 )
     price = 1;
   }
4. Tell your players :)

I have changed the names of most items, etc to avoid conflicts. I did not however change the name of Sigma's vines. If you already have Sigma's grapevines, you will need to replace them with the new vines included here. The grapevines are named...
East
GrapeVinePoleEast, GrapeVinePoleEast2, GrapeVinePoleEast3, GrapeVineBranchEast, GrapeVineBranchEast2
North
GrapeVinePoleNorth, GrapeVinePoleNorth2, GrapeVinePoleNorth3, GrapeVineBranchNorth, GrapeVineBranchNorth2

I will follow this post with a post of further images.


Credit:
Sigma - For his grapevines. I used these as the basis for my grapevines. Most of his code is intact, with exception of the addition of varieties, and I reduced the number of files by using BaseGrapeVine.
Demented/Kesia - For the Brewing Craft scripts, which I based my winecrafting scripts on.
XSTG - For the Sweeties Pack, where I got the idea for my WinecrafterSugar from.
A-Li-N - For the Yard and Garden System, which I based alot of the player placeable vinyards on.
Masternightmage – for the keg storage rack and bottle rack addon scripts.

Feel free to post any bugs or critical feedback

Thanks and hope you enjoy!
 

Attachments

  • [2.0]Winecrafting_2.0.1.rar
    33.4 KB · Views: 518

dracana

Sorceror
Here are some images from the winecrafting system...

!!Tools images are not updated... they are from my original system. I will update with new images soon :p


Add Grapevine Gump


Add Grapevine Gump (Select Variety)


Add Grapevine Gump (Item Detail)


Sample Grapevine field


Grapes


Winecrafter Tool


Winecrafter Tool Gump


Winecrafter Tool Gump (Grape Variety Selection)


Winecrafter Tool Gump (Requirements page)


Cheap wine (raise your alchemy skill!!)


Reserve Wine (that's better)
 

dracana

Sorceror
UPDATE June 25, 2006
********************
FIXED: VinyardGroundAddon.cs- Replace item names GroundItemPart and GroundPosition due to conflicts with Variable Carpet Addon custom script.

Please redownload and install updated rar file in initial thread
 

Vhaerun

Sorceror
Thanks! I hadn't gotten around to error-testing the 1.0 on the server, but I'll let you know if I run into any problems.

EDIT: Compiled like a charm. No problems or errors at all. Will be testing out the scripts' functionality soonish.
 

Shadowdark

Wanderer
Complie Error

I received the message "Cannot declare a namespace and type both named server.commands"

I dug around but i couldnt find anything I though was relevant. Im a total amature with this stuff though, SO i probably just missed it.
 

dracana

Sorceror
Shadowdark said:
I received the message "Cannot declare a namespace and type both named server.commands"

I dug around but i couldnt find anything I though was relevant. Im a total amature with this stuff though, SO i probably just missed it.

can you cut/paste the entire error, so I can better help?
 

Shadowdark

Wanderer
Ah yes.... That was pretty much it, but i did leave out a little

"Error: :CS0010: <line 0, Colum 0> Cannot declare a namespace and type both named server.commands"

Thats it =/

I forgot to mention as well, I'm Running 1.0

and it suddenly dawned on me that i may have missunderstood Vhaeruns post.....
 

Vhaerun

Sorceror
It's all good. Get 2.0 or look for the 1.0 version of the script. :)

Anyway, Dracana, using my Admin char, with all skills set to 500, it doesn't list a chance to make exceptional? Was that removed?
 

Shadowdark

Wanderer
Well, now that i did some research i wish id dine befre startingup with 1.0 ....im well on my way to RUO 2.0 fanboydom
 

Shadowdark

Wanderer
Well, I got it installed..Complied just fine, and works well too!

I have a question though....I assume that to mark your wine, it must cme from grapes that are inside your house?

Becayse i just built a Vineyard outside Brit, and tried to mark it. It said it either was not worth marking, or did not come from my Vineyard.

Although, it said I created an exceptional Item, THe Keg says "Cheap Table Wine"
 

Tru

Knight
Shadowdark said:
Well, I got it installed..Complied just fine, and works well too!

I have a question though....I assume that to mark your wine, it must cme from grapes that are inside your house?

Becayse i just built a Vineyard outside Brit, and tried to mark it. It said it either was not worth marking, or did not come from my Vineyard.

Although, it said I created an exceptional Item, THe Keg says "Cheap Table Wine"
Do you have a Vinyard Label Maker? (use it on itself and name your Winery...If I remember correctly)
 

Silverxanth

Sorceror
Got a error:
*...Addons/VineyardGroundAddon.cs:
CS0101: Line 101: The namespace 'Server.Items' already contains a definition for 'GroundPosition'
CS0101: Line 195: The namespace 'Server.Items' already contains a definition for 'GroundItemPart'

Could use a little help on this one... Not sure what I might need to change to make it function correctly.
:(
 

Vhaerun

Sorceror
It means you already have a script for an item that is named 'GroundPosition' and 'GroundItemArt'. If you have some kind of yard/garden custom script in, it's probably conflicting.

I'd suggest looking there. If you can't find anything named that, pull the winecrafting script, reboot, and go in and do [add groundposition. Or do a search on your scripts for that (groundposition). I'm guessing it's not constructable.

Or, I suppose, if you want to skip all that, just go in and find -every- instance of 'GroundPosition' and 'GroundItemArt' and change them to something a bit different, like GroundPosition2. Not the safest code thing to do, but it's what I'd probably try to do, and fail. ;)

But those namespace items aren't used by distro 2.0 so it's definitely something else you have in your custom scripts.
 

Silverxanth

Sorceror
Vhaerun said:
It means you already have a script for an item that is named 'GroundPosition' and 'GroundItemArt'. If you have some kind of yard/garden custom script in, it's probably conflicting.

I'd suggest looking there. If you can't find anything named that, pull the winecrafting script, reboot, and go in and do [add groundposition. Or do a search on your scripts for that (groundposition). I'm guessing it's not constructable.

Or, I suppose, if you want to skip all that, just go in and find -every- instance of 'GroundPosition' and 'GroundItemArt' and change them to something a bit different, like GroundPosition2. Not the safest code thing to do, but it's what I'd probably try to do, and fail. ;)

But those namespace items aren't used by distro 2.0 so it's definitely something else you have in your custom scripts.

Tried removing some scripts and even tried the idea of [add groundposition (not constructable). Guess I will need to go though a lot of scripts and see which 1 is causing it not to work. Thanks tons for the help and the most timely response.
 

Vhaerun

Sorceror
No problem. Any other problems, just post. I love the system. As a wine-maker IRL, I like the ability to do it in game without using some kind of cheesy GM made and [name'd bottles.

<3 on Dracana for one of my favorite scripts of all time. ;)
 

dracana

Sorceror
Silverxanth said:
Got a error:
*...Addons/VineyardGroundAddon.cs:
CS0101: Line 101: The namespace 'Server.Items' already contains a definition for 'GroundPosition'
CS0101: Line 195: The namespace 'Server.Items' already contains a definition for 'GroundItemPart'

Could use a little help on this one... Not sure what I might need to change to make it function correctly.
:(
Yeah, I can guess that you probably have another custom script that uses those two vars. Do you happen to have the variable carpet addon? I know that is one that has the same names. What Vhaerun posted would be a good way, just search my winecrafting scripts folder for "GroundPosition" and "GroundItemPart" and change every instance found to something else like "VinyardGroundPosition" and "VinyardGroundItemPart"

I will also change this in my scripts and repost tonight for anyone else that may experience this conflict.
 

Silverxanth

Sorceror
You hit it on the nail.... Hehehe. Hadn't even looked at the carpet addon I had, but yeah that was it. I use a ton of script addons and hadn't gotten to that one yet but removed it and tried yours again and works great! Thanks tons for all of the help.:D
 

dracana

Sorceror
Updated version to fix conflicts

UPDATE June 25, 2006
********************
FIXED: VinyardGroundAddon.cs- Replaced item names GroundItemPart and GroundPosition due to conflicts with Variable Carpet Addon custom script.

Please redownload and install updated rar file in initial thread
 
Top