Drunkennewbie

Initiate
Request if anyone knows where or anything about the following line, I am curious if anyone has any information on each piece I know the following:

-------------------------( Graphic, ?, ?, Plant Information/name, ? , ? , ? ),

new PlantTypeInfo( 0x0CC8, 0, 0, PlantType.JuniperBush, true, false, false ),

So 5 things idk what they do and i can't figure it out.

Any help is appreciated. Thanks!
 
Hello Drunkennewbie!

What you're looking at is the data to create the PlantTypeInfo in code. I haven't worked with this personally, but let's see what the code is telling us.

PlantTypeInfo is defined to accept an itemID, an X and Y offset (this can help nudge the graphic into the right place by adjusting its location from where it originally spawns), then comes the actual PlantType itself, followed by four Boolean values:

Does this contain a plant? (Possibly the difference between decoration and functional flower?)
Is this flowery? (Not sure about that one)
Is this crossable? (This may define whether a flower can be walked on or not)
Does this plant reproduce?

Finally comes the PlantCategory, which includes Default, Common, Uncommon, Rare, Exceptional, Exotic, Peculiar, and Fragrant.

Much of this data exists in structures specifically created for ServUO, such as PlantTypeInfo, PlantCategory, PlantType, etc. (EDIT: Forgot to mention, I found this in PlantType.cs, which resides in Services\Plants) These can help shed light on the individual functions that drive each plant (or anything else!) and help you figure out what does what.

The cool thing is, you can fairly safely change a lot of this and test it to see what happens without having to be concerned anything is permanently broken. Use comments to record your changes and put things back if they break, or continue tweaking, until it does what you want.

Where do I find the ItemID?

0x0CC8 is the graphic to display from the UO's graphics resources. These files can be browsed with UOFiddler - should be in the Resources section here. According to UOFiddler, 0x0CC8 is a Juniper Bush. :)


If you can tell us what your specific goals are, might be able to help a little more.
 
Last edited:
The PlantType.JuniperBush, true, false, false
=
public bool ContainsPlant { get { return m_ContainsPlant; } } << Plant type
public bool Flowery { get { return m_Flowery; } } << Does it produce flowers?
public bool Crossable { get { return m_Crossable; } } << can it be crossed with other plants to produce something new?
public bool Reproduces { get { return m_Reproduces; } } << does it produce seeds that you can harvest?

So.. It's a Juniper Bush that has flowers (the true) that cannot be crossed with other plants (the 1st false), nor does it have harvestable seeds (the last false).
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back