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!

OSI Plant Growing (Updated 12/20)

Status
Not open for further replies.

UOT

Knight
OSI Plant Growing (Updated 12/20)

Click here to download

Summary:
OSI plant growing system, including resources gathered from plants.



Description:
This is 100% exact to OSI plant gorwing system. Includes plant resources (green thorns, orange petals and red leaves). Also includes fertile dirt, vines and the codex of wisdom packet.



Installation:
Read the README.txt included in the zip file. It contains instructions on how to set up the plant system and how to add the changes to playermobile to have the orange petals work (poison immuninty).

NOTE: I didn't want to edit any base scripts but the only way to get the poison immunity for orange petals to work was by editing playermobile. However I did not change wipping vines and vorpal bunnies to be exact to OSI. So you'll have to add the vines on wipping vines yourself, the readme explains how. Also I did not edit the basebeverage script so you can only add water to plants thru the plant gump. Hopwfully if the devs see it fit for the distro they'll make the change to basebeverage so you can doubleclick a water pitcher and pour water on the plant.

Special thanks to silverwolfe and his shard for helping me gather the info on OSI and testing this package.

[EDIT] If you add the orange petals code into your custom playermobile (dovPlayerMobile for example) you'll also need to to change the following lines in PlantResources.cs from PlayerMobile to your custom Mobile (ie dovPlayerMobile):
line 582
line 584
line 605
line 607

Those should be the only change you need to make.

Updated 11/11 Fixed a small bug that dealt with healing diseased and poisoned plants and a bug regarding potion kegs. Only files you need to replace is PlantBowls.cs and Plantgumps.cs. Link to new zip updated.

Update 12/20 Fixed bug when target water pitcher it would not consume water. Fixed bugged that allowed duping deco plants.

If you don't feel like downloading the whole package you can make the changes manually to PlantGump.cs to fix these bug.
Right after line 526 which is [code:1]pot.Water = pot.Water + 1;[/code:1]add[code:1]bb.Quantity--;[/code:1]then at line 834 right before [code:1]from.SendGump( new ConfirmDecoMode ( from, pot ) );[/code:1] add [code:1]if ( !pot.Deleted )[/code:1]then what should be line 1131 (if you added the previous changes) change [code:1]if ( pot.Hits > 0 )[/code:1]to[code:1]if ( pot.Hits > 0 && !pot.Deleted )[/code:1]
 

Trixie

Wanderer
Wonderful. Thank you very much :)
One quick question, it is easy to adapt for using dovplayermobile?
I had a quick look at the read me, and it gives the directions, which I thank you for, just want to make sure I am not going to run into problems.
 

UOT

Knight
You shouldn't run to any problems at all especially since no values are being serialized or deserialized for playermobile/dovplayermobile. If you do though let me know and I'll get them squared away.
 

Tru

Knight
UOT said:
You shouldn't run to any problems at all especially since no values are being serialized or deserialized for playermobile/dovplayermobile. If you do though let me know and I'll get them squared away.

hes correct i just added it to my dovplayermobile with no probs just gotta change plantresource.cs to look at dovplayermobile and not just playermobile (orange petal entry)
 

Phantom

Knight
Anyone that uses an additiona Mobile class besides PlayerMobile.

Make sure all your players are that one "type".

Otherwise you will get cast errors if you try to cast a PlayerMobile to a dovPlayerMobile or vice versa.
 
Thank you for the incredible work UOT, my playerbase looks forward to working with you in the future.

To those of you using this system, I an certain you will be plesantly surprised. Some of my player base plays both OSI and My shard and they have been commenting that they can not tell the difference.

As far as OSI correctness, LOL i was actually affraid that my player base was going to drive UOT nuts with all the nit picking, but UOT stuck it out and produced the absolute clone of the OSI Plant System. I know there are others out there, but if you are striving for OSI correctness then this is the script you will want to run.

For those of you nervous about editing the PlayerMobile I edited mine in test envrioment. ran the system, saved after several hours (with accelerated growth) then removed the code from the player mobile and removed the plantsystem from the folder. While all plants and seeds and resources in the world had to be removed (obviously), the Player mobiles were not adversly affected in any way.
 

Vidi

Page
Questions:

Ive noticed from looking at the scripts that black and white seeds are possible.

In OSI, the way to get these was to crosspollinate with same plant types. For example, crossing two plain campions gave you a chance at the mutant black or white. Crossing two dissimular plant types would not yeild a mutant color type.

1) Is this the case with this system?

2) What are the chances of a mutant color type?

3) Will mutant plants produce seeds? they should not but I didnt see anything refering to it in the scropts ( I may have just missed it )

4) Pitchers of water cannot target the plant bowl itself ( though they can still be watered using the gump itself )

Does this code from the PlantGump.cs have anything to do with it?

[code:1]
private class LuiquidTarget : Target
{
private FullPlantBowl pot;
public LuiquidTarget(FullPlantBowl m_pot) : base( 4, true, TargetFlags.None )
[/code:1]

I dodnt place it all in just the neccessary code. Notice that Liquid is misspelled Luiquid.

Would that make a difference? Is the code calling something already in the core in order to work?



Great system btw. Glad to see the "fishing weight" issue is fixed and the streamlining of the seeds into a single Pseed works great!

Thanks UT

Vidi
 

UOT

Knight
Ive noticed from looking at the scripts that black and white seeds are possible.

In OSI, the way to get these was to crosspollinate with same plant types. For example, crossing two plain campions gave you a chance at the mutant black or white. Crossing two dissimular plant types would not yeild a mutant color type.

1) Is this the case with this system?

Actually from my test on OSI you can get mutant seed from any cross pollenation of 2 plants. Like I got a black one on OSI crossing a yellow fern with a yellow elephant ear plant. You have a chance of mutation only if the plant is cross-pollenated, won't work for self pollenation.

2) What are the chances of a mutant color type?
The basic chance for white or black mutants are 1 in 100

3) Will mutant plants produce seeds? they should not but I didnt see anything refering to it in the scropts ( I may have just missed it )
No neither mutants or rare color plants produce seeds or resources. Line 121 of Seeds.cs makes sure of this.

4) Pitchers of water cannot target the plant bowl itself ( though they can still be watered using the gump itself )
I covered that on this first post in this thread. I didn't want to edit base scripts so if this doesn't become part of the distro it will be easy to update. The only way to make a plant targetable by a water pitcher is by editing basebeverage. To make up for this I added the code so when you click on the water pitcher in the plant gump it'll take water directly from your backpack if you have any, otherwise you'll get a targeting cursor. On OSI you get a targeting cursor from the gump wether you have have water in your BP or not.

I dodnt place it all in just the neccessary code. Notice that Liquid is misspelled Luiquid.

Would that make a difference? Is the code calling something already in the core in order to work?
That was just a typo and since I copy and pasted it, it's the same throughout the plant gump script :? , which doesn't affect anything. That code is just in case you don't have any water or potions or kegs (of the type of which button you pressed) in your backpack. So if you press the greater cure pot button on the gump and don't have a greater cure keg or pot in your backpack the targeting cursor comes up. Now with this targeting cursor, even though you pressed cure, you can select any valid type of liquid (water, greater poison pot or keg, etc) that's within 4 tiles or you, which is how it is on OSI.

Any other question or clarifications feel free to ask :D
 

blain

Wanderer
PackItem(new PSeed())

im putting that in

[Constructable]
public Bogling() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a bogling";
Body = 779;
BaseSoundID = 422;

SetStr( 96, 120 );
SetDex( 91, 115 );
SetInt( 21, 45 );

SetHits( 58, 72 );

SetDamage( 5, 7 );

SetDamageType( ResistanceType.Physical, 100 );

SetResistance( ResistanceType.Physical, 20, 25 );
SetResistance( ResistanceType.Fire, 10, 20 );
SetResistance( ResistanceType.Cold, 15, 25 );
SetResistance( ResistanceType.Poison, 15, 25 );
SetResistance( ResistanceType.Energy, 15, 25 );

SetSkill( SkillName.MagicResist, 75.1, 100.0 );
SetSkill( SkillName.Tactics, 55.1, 80.0 );
SetSkill( SkillName.Wrestling, 55.1, 75.0 );

Fame = 450;
Karma = -450;

VirtualArmor = 28;

PackItem(new PSeed( 1 ) );
PackGold( 25, 50 );
PackItem( new Log( 4 ) );
// TODO: 1 seed
}

but now when i try and spawn a bogling it says

usage:
bogling

no bogling though :(
 
D

draco

Guest
ERROR

[code:1]

error: scripts/costum map/plantsystem/plantgump.cs:CS0246
The type or namespace name 'Pitcher Water' could not be found..
error: scripts/costum map/plantsystem/plantgump.cs:CS0246
The typ or namespace name 'Glass Pitcher' could not be found...

[/code:1]
 
Status
Not open for further replies.
Top