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!

Hi all :D My first scripts <-- Imbuing system

jamesreg

Sorceror
So far I have not had the delete items issue the other guy experienced but my world is not fully spawned eighter just my player and admin accounts is all. Will I experience that issue if i spawn the world?

PS Milva

I player roughly for a short time on ABC which has Imburing and dont know if they are OSI accurate or not but this seemed to be the exact same thing.
 
ok well with a few edits we have it all set to run production. it does ask that u delete a few things over and over but in the end not a whole lot one thing that the system needs right out tho is success chances adjusted. at 120 it gives u a 225% success on spell channel still it works nice with sa content shards and as for osi its got 450 magic weight and 5 props should be close to what original was and not all that hard to make adjustments to
as long as u have the proper items ie orb server it should conver rather easy. i have too many edits for the bases and player mobile stuff to release mine as a drag and drop but with some work its gonna be a really nice system thanks dream seeker for doin such a good job.
 

Dreamseeker

Sorceror
Cool, glad it's semi-working :cool:

I'm working on the serialization thing, but I'm at a dead end for the minute.. my only work-around solution is to remove the 'm_TimesImbued += 1;' from the ImbuingGumpC.cs script - Then you can keep your Distros untouched ... But then you'll lose the pretty (Imbued) property. When I've figured it out I'll update, but I have a bad feeling the 2 objects are incompatable. A server tweek on the Item.cs might work, but I've not tried a recompile yet.

P.S - I reckon RunUO and Orb are both good.. as for Pissing contests, I piss like a War Horse :eek: Share the goodness.
Also I'll post up my next script at some point soon - Abyss MiniChamps - which is alot simpler
 

Fixxxer

Sorceror
I am looking forward on having a working imbuing system, thank you for working on this and sharing with the community.
 
ok so now that ive had time to look all this over i was wondering where the base for magic weight and prop lvls are in the scripts.
 

Dreamseeker

Sorceror
All the weights are calculated in ItemID.cs when using the skill, in Imbuing.cs for unravelling ( There's unravel item & Unravel container as I did them seperate as I'm still a little weak at C# ) and in ImbuingGumpC.cs for the actual imbuing, they have no static Dimension for the value, weight & props are calculated on the fly.

- I've just thought.. not sure if I put max weight check in.. lemme check quickly...
Ah HA! I didn't get round to it.. or Maxprops check either. Awesome dude! You've have reminded me that I need to do that, good man Bale Fire! I'm on it :rolleyes:

( Please remember that I've been doing C for only two months.. it's not just because I'm thick! ;) )
 

Nockar

Sorceror
Thank you so much for taking the time to do these scripts!! I found a little problem with the way you did your serylization. When ever you add something new to the ser/deser it goes at the top & you bump up the version. So, if your curent version is 7, you add the info above the 7 and make hte new version 8. Same thing for the Deserialize. You add a new section that is 8 and put the new info in there.
 

Dreamseeker

Sorceror
Ah ha! I was thinking about the version bit of the reader/writer, wondering if that was the key. Nice one! .. makes sense, and object saved with a lesser version won't call the reader to open the var and thus won't need to wipe it just to conform :p
I've been working on a more flexible method instead of seperate parts for each of the BaseItem classes (Nothing yet).. ideally it needs a core modification in the Item.cs to call the TimesImbued etc.. hmmmmm
 

Nockar

Sorceror
This is as far as I have goten so far. Not sure why im getting these errors.

Code:
+ Items/Armor/BaseArmor.cs:
    CS0103: Line 947: The name 'flags' does not exist in the current context
    CS0103: Line 953: The name 'flags' does not exist in the current context
    CS0103: Line 1133: The name 'flags' does not exist in the current context
+ Items/Weapons/BaseWeapon.cs:
    CS0103: Line 2970: The name 'flags' does not exist in the current context
    CS0103: Line 2976: The name 'flags' does not exist in the current context
    CS0103: Line 3251: The name 'flags' does not exist in the current context
+ Items/Clothing/BaseClothing.cs:
    CS0103: Line 1066: The name 'flags' does not exist in the current context
    CS0103: Line 1072: The name 'flags' does not exist in the current context
    CS0103: Line 1193: The name 'flags' does not exist in the current context

Code:
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)14); //version 13
//SF Imbuing 3/7 Start
            #region SF Imbuing
            SetSaveFlag( ref flags, SaveFlag.TimesImbued,  m_TimesImbued != 0 );
            #endregion
//SF Imbuing 3/7 End
//SF Imbuing 4/7 Start
            #region SF Imbuing
            if ( GetSaveFlag( flags, SaveFlag.TimesImbued ) )
                writer.WriteEncodedInt( (int) m_TimesImbued );
            #endregion
//SF Imbuing 4/7 End
 

Dreamseeker

Sorceror
Looks like your BaseWeapon does not have this part yet.
public override void Serialize

It's hidden up in a #Region seralize/deseralize, just before public BaseWeapon( int itemID) : Base( itemID)

Just found that there is no write for BaseWeapon, needs the m_TimeImbued to be added :(
Think I know what the error you're getting is, maybe something conflicting with the setting up of saveflags..

Gotta rush out, but will get this done later.
 

Dreamseeker

Sorceror
Hey all, just sorted out the Serialization on the Distro files.. there should be no more conflicts that require you to delete all objects etc..

It was the write version which cured this.. the Flags bit of the error was because the SaveFlags we're set after the version writes so it couldn't find 'em.

Also - Ignore the Soul Reforging bit, it requires a magic Artifact system I've not even started on lol :p
 

Attachments

  • BaseArmor.cs
    67.3 KB · Views: 33
  • BaseClothing.cs
    43.5 KB · Views: 34
  • BaseJewel.cs
    22.4 KB · Views: 29
  • BaseWeapon.cs
    158.4 KB · Views: 44

Nockar

Sorceror
Thanks for the update. It does compile now. It also still want to delete stuff. Something is still not quite right in the save. It should not be deleting anything.
 

Dreamseeker

Sorceror
Yeah... before anyone deletes their shards object, lemme try and do one last tweek. I left in a line that kept my items intact and didn't think it'd be a big thing... it is and I shoulda sorted that out.

But damn man, I'm high and it's been the most Tradgic month of my badly coded life (Mini-violins & tissues on standby). :confused:

*EDIT* Should work, lemme know if not. I'll find a work around if it takes me the rest of june!
 

Attachments

  • BaseArmor.cs
    66.9 KB · Views: 27
  • BaseClothing.cs
    43.3 KB · Views: 24
  • BaseJewel.cs
    22.2 KB · Views: 22
  • BaseWeapon.cs
    158.3 KB · Views: 30

rondelin

Sorceror
When attempt to imbue jewelry and choosing skill group #4 the gump closes [crashes] any ideas on fixing this?
 
Top