Thank you m309 feed backLooks great so far!
Can you explain a little bit how it works? Does it update maps in real time like Ultima Live, or are the trees "spawned" etc?
If I am not wrong these Trees are Mobiles? I guess the part where you see the hatchets hits is you turning it? And then you got the death animation.
Or its using the IDamageItem thing, but I am not sure about animations for that. unless you used different itemids and changed them per script.
Ok, now to the critic part it looks pretty good but the tree stump shouldnt move around. Not sure if you want the damage number to display there. Also after the tree fell down it stripped all leaves. You could either keep them on the tree or use the leaf itemid and spawn some around? But again it looks pretty nice.
Thank you for your inputVery awesome to see a tree that will fall over with chopping now can the tree be cut up after this?
private static VisibleDamageType m_VisibleDamageType;
public static VisibleDamageType VisibleDamageType { get { return m_VisibleDamageType; } set { m_VisibleDamageType = value; } }
public static VisibleDamageType VisibleDamageType { get; set; }
private VisibleDamageType m_VisibleDamageTypeInstance = VisibleDamageType;
public virtual VisibleDamageType VisibleDamageTypeInstance { get { return m_VisibleDamageTypeInstance; } }
switch (m_VisibleDamageType)
switch (VisibleDamageTypeInstance)
private bool m_CanBleed = true;
public virtual bool CanBleed { get { return m_CanBleed; } }
public virtual void AddBlood(Mobile attacker, Mobile defender, int damage)
{
if (damage > 0)
public virtual void AddBlood(Mobile attacker, Mobile defender, int damage)
{
if (damage > 0 && defender.CanBleed)
Found your idea interesting and actually started to fiddle. What you would want is at least 1 Core edit I would recommend 2. And for the Blood you would need the optional second Core edit, unless you want to do it in BaseCreature.
What I did!
Server - Mobile.cs Line ~5260
I took this,
Code:private static VisibleDamageType m_VisibleDamageType; public static VisibleDamageType VisibleDamageType { get { return m_VisibleDamageType; } set { m_VisibleDamageType = value; } }
and changed it to
Code:public static VisibleDamageType VisibleDamageType { get; set; } private VisibleDamageType m_VisibleDamageTypeInstance = VisibleDamageType; public virtual VisibleDamageType VisibleDamageTypeInstance { get { return m_VisibleDamageTypeInstance; } }
The previous version allowed you to show or hide the damage numbers on a global setting, here it defaults to a global value based on the Expansion as befor but you get the option to override it in the creature.
Next part:
Server - Mobile.cs Line ~5547
lets change this (I am not sure why it wasnt using the property in the first place)
toCode:switch (m_VisibleDamageType)
Code:switch (VisibleDamageTypeInstance)
Voila! Now you can override the property in the TreeMobile you have there! So no more numbers for it the others can still get them.
Now for the blood!
What I did and kind of liked was the way to add this to the core itself as well.
Code:private bool m_CanBleed = true; public virtual bool CanBleed { get { return m_CanBleed; } }
Reason why a property and not a simple variable in this case. Well because you can then override the property and you would not care about the (de-)serialization and if you like you can add some logic depening on the monster there too for special monster types.
And now so this actually has an effect!
Script - BaseWeapon ~2976
You will find the AddBlood method there.
All we need to do there is add our new CanBleed property in the check! Like this ..Code:public virtual void AddBlood(Mobile attacker, Mobile defender, int damage) { if (damage > 0)
Code:public virtual void AddBlood(Mobile attacker, Mobile defender, int damage) { if (damage > 0 && defender.CanBleed)
Dont forget to recompile and set your tree up as well
I am running ServUO, you will have Mobile.cs in the Server folder not in your script folder (wrote it next to the filename)
if(damage >0 && !(defender is BaseCreature && !defender.CanBleed))
Oh right, in at least that version the RunUO Core only came by compiled, that will complicate the approach to do this in RunUO 2.2
I dont really know if there is a better way then but in that case you would need to override and rewrite the OnDamge function to allow for the VisibleDamageType to be different in that case. The thing is though, I do not know if the method is the same as it is currently in ServUO.
The CanBleed functionality would go into BaseCreature, the AddBlood method change basically stays the same but you would want something like.
Code:if(damage >0 && !(defender is BaseCreature && !defender.CanBleed))
But is there any reason you stick to that old version?
Well the code look like this in runuoWhat do you mean with you dont like how it is coded? ServUO is an updated fork of RunUO
You should use a proper editor, that is just a different line ending that your editor doesnt understand properly and sees it as an space.
I only know that the basic windows editor does this.
Nice.............Anyway I am trying your stuff out and nothing is working on my end ..Even an old man can get used to a better tool I personally like Sublime Text as a text editor. You can drop in your folder and do fast searches and directly open the files based on names without searching them down but thats a little advanced ^^. But I guess you could try Notepad++ since it is more of a basic but solid editor.
Notepad++ should work no prob with RunUO 2.2 I was using it with that and that method should be found in BaseCreature.cs in Runuo 2.2I cant say if it works on RunUO 2.2 since I didnt test it there, that was just speculation of how it should work .
But I can tell you that what I wrote would work on ServUO, since I tested that.
We use essential cookies to make this site work, and optional cookies to enhance your experience.