I was wondering if this possible say on my shard I have x sword and chest the sword gives 40 str 30 dex 40 int and the chest gives the same, i go into the script change the values save the shard, restart and look at that the items updated! I'm running runuo 2.0 rc1 and am curious if something like this is a thing
 
The way to do what your asking about is in the script you modified do something like this in the Serialize/Deserialize when you make your edit, and it will change all older versions of the item.

Code:
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0); //make the version number one higher than it was here
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
          
            if( version < [the version number where the property changed] )
            property = new value;
        }
 
The way to do what your asking about is in the script you modified do something like this in the Serialize/Deserialize when you make your edit, and it will change all older versions of the item.

Dude I love you right now.
[doublepost=1487064234][/doublepost]Okay so i changed them all to 1 but the old stat items are the same, something im missing?

Code:
 public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)1); // <-----
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
        
            if( version < [the version number where the property changed] )
            property = new value;
        }
 
I believe this
Code:
if( version < [the version number where the property changed] )
should actually be a bit more like this
Code:
if( version < 1 )
Visam just added the text as a description.
 
EDIT: I should mention this is runuo 2.0 rc1
adding that line of code in is throwing errors, ill post the new script. this is the error:

Error:
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.GetFullPath(String path)
at Server.ScriptCompiler.Display(CompilerResults results)
at Server.ScriptCompiler.CompileCSScripts(Boolean debug, Assembly& assembly)
at Server.ScriptCompiler.Compile(Boolean debug)
at Server.Core.Main(String[] args)
This exception is fatal, press return to exit

This is the script:

Code:
using System;
using Server.Items;

namespace Server.Items
{
  public class CloakOfDeathAwaitsYou : BaseArmor
   {
      public override int ArtifactRarity{ get{ return 1259; } }

      public override int InitMinHits{ get{ return 255; } }
      public override int InitMaxHits{ get{ return 255; } }

public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }

[Constructable]
      public CloakOfDeathAwaitsYou() : base( 0x1FB )
      {      Weight = 5.0;
            Name = "Cloak Of Death Awaits You";
            Hue = 0;
      
            Attributes.BonusStr = 45;
        Attributes.BonusDex = 35;
        Attributes.BonusInt = 35;
        Attributes.BonusHits = 35;
            ArmorAttributes.SelfRepair=100;
            Attributes.WeaponDamage=35;
            Attributes.AttackChance=35;
            Attributes.WeaponSpeed=15;
            ArmorAttributes.MageArmor=1;
            Attributes.DefendChance=20;
            Attributes.SpellChanneling = 1;
            Attributes.RegenStam = 15;
            Attributes.Luck = 1100;
            LootType = LootType.Blessed;

         PhysicalBonus = 50;
         FireBonus = 60;
         ColdBonus = 60;
         PoisonBonus = 60;
         EnergyBonus = 60;
}

public CloakOfDeathAwaitsYou( Serial serial ) : base( serial )
      {
      }

      public override void Serialize( GenericWriter writer )
      {
         base.Serialize( writer );

         writer.Write( (int) 0 );
      }
      
      public override void Deserialize(GenericReader reader)
      {
         base.Deserialize( reader );

         int version = reader.ReadInt();

         if( version < 1 )
         property = new value;

      }
   }
}

This is the original working script:


Code:
using System;
using Server.Items;

namespace Server.Items
{
  public class CloakOfDeathAwaitsYou : BaseArmor
   {
      public override int ArtifactRarity{ get{ return 1259; } }

      public override int InitMinHits{ get{ return 255; } }
      public override int InitMaxHits{ get{ return 255; } }

public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }

[Constructable]
      public CloakOfDeathAwaitsYou() : base( 0x1FB )
      {      Weight = 5.0;
            Name = "Cloak Of Death Awaits You";
            Hue = 0;
      
            Attributes.BonusStr = 400;
        Attributes.BonusDex = 45;
        Attributes.BonusInt = 55;
        Attributes.BonusHits = 65;
            ArmorAttributes.SelfRepair=600;
            Attributes.WeaponDamage=35;
            Attributes.AttackChance=55;
            Attributes.WeaponSpeed=15;
            ArmorAttributes.MageArmor=1;
            Attributes.DefendChance=30;
            Attributes.SpellChanneling = 1;
            Attributes.CastSpeed = 15;
            Attributes.RegenStam = 15;
            Attributes.Luck = 1100;
            LootType = LootType.Blessed;

         PhysicalBonus = 50;
         FireBonus = 60;
         ColdBonus = 60;
         PoisonBonus = 60;
         EnergyBonus = 60;
}

public CloakOfDeathAwaitsYou( Serial serial ) : base( serial )
      {
      }

      public override void Serialize( GenericWriter writer )
      {
         base.Serialize( writer );

         writer.Write( (int) 0 );
      }
      
      public override void Deserialize(GenericReader reader)
      {
         base.Deserialize( reader );

         int version = reader.ReadInt();
      }
   }
}
 
Last edited:
Change
Code:
writer.Write( (int) 0 );
to
Code:
writer.Write( (int) 1 );
in Serialize
I will try that now
[doublepost=1487075153][/doublepost]Yeah that did not seem to change anything, its making tons of scripts throw warnings and errors now here is the corrected script:
Code:
using System;
using Server.Items;

namespace Server.Items
{
  public class CloakOfDeathAwaitsYou : BaseArmor
   { 
      public override int ArtifactRarity{ get{ return 1259; } }

      public override int InitMinHits{ get{ return 255; } }
      public override int InitMaxHits{ get{ return 255; } }

public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }

[Constructable]
      public CloakOfDeathAwaitsYou() : base( 0x1FB )
      {      Weight = 5.0;
            Name = "Cloak Of Death Awaits You";
            Hue = 0;
       
            Attributes.BonusStr = 400;
        Attributes.BonusDex = 45;
        Attributes.BonusInt = 55;
        Attributes.BonusHits = 65;
            ArmorAttributes.SelfRepair=600;
            Attributes.WeaponDamage=35;
            Attributes.AttackChance=55;
            Attributes.WeaponSpeed=15;
            ArmorAttributes.MageArmor=1;
            Attributes.DefendChance=30;
            Attributes.SpellChanneling = 1;
            Attributes.CastSpeed = 15;
            Attributes.RegenStam = 15;
            Attributes.Luck = 1100;
            LootType = LootType.Blessed;

         PhysicalBonus = 50;
         FireBonus = 60;
         ColdBonus = 60;
         PoisonBonus = 60;
         EnergyBonus = 60;
}

public CloakOfDeathAwaitsYou( Serial serial ) : base( serial )
      {
      }

      public override void Serialize( GenericWriter writer )
      {
         base.Serialize( writer );

         writer.Write( (int) 1 );
      }
       
      public override void Deserialize(GenericReader reader)
      {
         base.Deserialize( reader );

         int version = reader.ReadInt();

         if( version < 1 )
         property = new value;
      }
   }
}

Here is the list of warnings and errors


Code:
Warnings:
+ Customs/Misc/New Added/Sprinkler.cs:
    CS0105: Line 10: The using directive for 'Server.ContextMenus' appeared previously in this namespace
+ Customs/try/did/New Try/Riddick/Furyan/Riddick.cs:
    CS0105: Line 11: The using directive for 'Server.Gumps' appeared previously in this namespace
+ Customs/try/did/put in 2/Updated Quests/Lighthouse Keeper Quest/Mobiles/LighthouseKeeper.cs:
    CS0105: Line 11: The using directive for 'Server.Misc' appeared previously in this namespace
+ Customs/try/did/Underworld Quest/Underworld.cs:
    CS0105: Line 11: The using directive for 'Server.Gumps' appeared previously in this namespace
    CS0219: Line 108: The variable 'hairHue' is assigned but its value is never used
+ Customs/try/did/Idolstickets/BaseIdol.cs:
    CS0436: Line 43: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
    CS0436: Line 43: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
    CS0108: Line 49: 'Server.Network.SpeedBoost.SetStatic()' hides inherited member 'Server.Network.Packet.SetStatic()'. Use the new keyword if hiding was intended.
    CS0436: Line 119: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
    CS0436: Line 129: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
    CS0436: Line 26: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
    CS0436: Line 26: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
    CS0436: Line 27: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
+ Customs/Misc/New Added/TrainingParasite.cs:
    CS0114: Line 13: 'Server.Mobiles.TrainingParasite.NoHouseRestrictions' hides inherited member 'Server.Mobiles.BaseCreature.NoHouseRestrictions'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
+ Customs/Misc/ItemIDChangeStone.cs:
    CS0108: Line 121: 'Server.Items.ItemIDChangeStone.CheckTarget' hides inherited member 'Server.Item.CheckTarget(Server.Mobile, Server.Targeting.Target, object)'. Use the new keyword if hiding was intended.
+ Customs/Quests/2.0 CustomQuests/VampireQuest/VampQuestItems/Drac Required items/DraculasTeleporter.cs:
    CS0114: Line 21: 'Server.Items.DraculasTeleporter.Location' hides inherited member 'Server.Item.Location'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
    CS0108: Line 28: 'Server.Items.DraculasTeleporter.Map' hides inherited member 'Server.Item.Map'. Use the new keyword if hiding was intended.
+ Customs/try/did/Irish Armor Quest/GiantEarth.cs:
    CS0114: Line 141: 'Server.Mobiles.GiantEarthElemental.OnBeforeDeath()' hides inherited member 'Server.Mobiles.BaseCreature.OnBeforeDeath()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
    CS0162: Line 95: Unreachable code detected
+ Customs/try/did/put in 2/Updated Quests/Magic Mushroom Quest/Mobiles/MMQMycologist.cs:
    CS0114: Line 18: 'Server.Mobiles.MMQMycologist.IsInvulnerable' hides inherited member 'Server.Mobiles.BaseVendor.IsInvulnerable'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
+ Customs/try/did/put in 2/Updated Quests/Orcish Forge Quest/Mobiles/OFQOrc.cs:
    CS0114: Line 21: 'Server.Mobiles.OFQOrc.IsInvulnerable' hides inherited member 'Server.Mobiles.BaseVendor.IsInvulnerable'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
+ Customs/try/did/CorpseRetrievalPackage_UsingXMLSpawner.cs:
    CS0108: Line 858: 'Server.CorpseSystem.CorpseBookAtt.Initialize()' hides inherited member 'Server.Engines.XmlSpawner2.XmlAttachment.Initialize()'. Use the new keyword if hiding was intended.
+ Commands/Handlers.cs:
    CS0436: Line 105: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
    CS0436: Line 110: The type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs' conflicts with the imported type 'Server.Network.SpeedBoost' in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\RunUO.exe'. Using the one in 'c:\Users\Chris Biddlecom\Desktop\merge project\DAY server\RunUO-2.0-RC1\Scripts\Customs\try\did\Idolstickets\BaseIdol.cs'.
+ Customs/ADDONS/From Daisy/AntiquePianoSouthAddon.cs:
    CS0168: Line 24: The variable 'ac' is declared but never used
+ Customs/ADDONS/newaddons/The Box/AphroditeAddon.cs:
    CS0219: Line 27: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/bluepostAddon.cs:
    CS0219: Line 28: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/chand1Addon.cs:
    CS0219: Line 27: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/chand2Addon.cs:
    CS0219: Line 27: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/chand3Addon.cs:
    CS0219: Line 27: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/DragonWallSAddon.cs:
    CS0219: Line 28: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/lampostEAddon.cs:
    CS0219: Line 27: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/LampostSouthAddon.cs:
    CS0219: Line 27: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/SkullPedestalAddon.cs:
    CS0219: Line 27: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/newaddons/The Box/TotemEAddon.cs:
    CS0219: Line 27: The variable 'ac' is assigned but its value is never used
+ Customs/ADDONS/BigFishTankAddon.cs:
    CS0168: Line 66: The variable 'ac' is declared but never used
+ Customs/ADDONS/SacrificeAlterAddon.cs:
    CS0168: Line 28: The variable 'ac' is declared but never used
+ Customs/ADDONS/toiletAddon.cs:
    CS0219: Line 31: The variable 'ac' is assigned but its value is never used
+ Customs/Custom Monsters/more Custom Monsters/GMC/BaseKiller.cs:
    CS0168: Line 99: The variable 'item' is declared but never used
Error:
System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
   at System.IO.Path.GetFullPath(String path)
   at Server.ScriptCompiler.Display(CompilerResults results)
   at Server.ScriptCompiler.CompileCSScripts(Boolean debug, Assembly& assembly)
   at Server.ScriptCompiler.Compile(Boolean debug)
   at Server.Core.Main(String[] args)
This exception is fatal, press return to exit
 
You have to define "property" and/or "value" with what you want before it'll compile, let alone work. Those were used by Visam to give you a visual hint on how to start.
 
Based on what you posted above it would look something like this. Just have the properties that changed in the section with the comments (not comparing the 2 scripts myself just copy/pasting a few of them)

Code:
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)1);
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
     
            if( version < 1 )
            {
                Attributes.BonusStr = 45;  //Note: whatever properties you changed would go
                Attributes.BonusDex = 35;  //in this area so they would be updated
                Attributes.BonusInt = 35;  //to the new values
            }
        }

Also the "warnings" that are showing up are always present, they are just suppressed unless there is an actual error. They are things that could possibly cause bugs but don't usually make it unplayable.
 
Based on what you posted above it would look something like this. Just have the properties that changed in the section with the comments (not comparing the 2 scripts myself just copy/pasting a few of them)

Code:
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)1);
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
    
            if( version < 1 )
            {
                Attributes.BonusStr = 45;  //Note: whatever properties you changed would go
                Attributes.BonusDex = 35;  //in this area so they would be updated
                Attributes.BonusInt = 35;  //to the new values
            }
        }

Also the "warnings" that are showing up are always present, they are just suppressed unless there is an actual error. They are things that could possibly cause bugs but don't usually make it unplayable.
I'm going to give this a shot, ill post results
[doublepost=1487096919][/doublepost]I guess I'm just being stupid, super tired on my end been tooling around on this shard all night its throwing another error:

Errors:
+ Customs/Custom Wear & Items/DAYitems/CloakOfDeathAwaitsYou.cs:
CS1513: Line 67: } expected
CS1513: Line 67: } expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

This is the script:


Code:
//Made By Brad Poe
using System;
using Server.Items;

namespace Server.Items
{
  public class CloakOfDeathAwaitsYou : BaseArmor
   { 
      public override int ArtifactRarity{ get{ return 1259; } }

      public override int InitMinHits{ get{ return 255; } }
      public override int InitMaxHits{ get{ return 255; } }

public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }

[Constructable]
      public CloakOfDeathAwaitsYou() : base( 0x1FB )
      {      Weight = 5.0;
            Name = "Cloak Of Death Awaits You";
            Hue = 0;
       
            Attributes.BonusStr = 400;
        Attributes.BonusDex = 45;
        Attributes.BonusInt = 55;
        Attributes.BonusHits = 65;
            ArmorAttributes.SelfRepair=600;
            Attributes.WeaponDamage=35;
            Attributes.AttackChance=55;
            Attributes.WeaponSpeed=15;
            ArmorAttributes.MageArmor=1;
            Attributes.DefendChance=30;
            Attributes.SpellChanneling = 1;
            Attributes.CastSpeed = 15;
            Attributes.RegenStam = 15;
            Attributes.Luck = 1100;
            LootType = LootType.Blessed;

         PhysicalBonus = 50;
         FireBonus = 60;
         ColdBonus = 60;
         PoisonBonus = 60;
         EnergyBonus = 60;
}

public CloakOfDeathAwaitsYou( Serial serial ) : base( serial )
      {
      }

      public override void Serialize( GenericWriter writer )
      {
         base.Serialize( writer );

         writer.Write( (int) 1 );
      }
       
      public override void Deserialize(GenericReader reader)
      {
         base.Deserialize( reader );

         int version = reader.ReadInt();

         if( version < 1 )
         {
            Attributes.BonusStr = 45;
            Attributes.BonusDex = 35;
         }
       }
 
Anywhere a { is used a } must be used to close it.
in this case it's telling you to put two more } at the end of the script to close out the opening braces from:

namespace Server.Items
{
public class CloakOfDeathAwaitsYou : BaseArmor
{
 
Anywhere a { is used a } must be used to close it.
in this case it's telling you to put two more } at the end of the script to close out the opening braces from:

namespace Server.Items
{
public class CloakOfDeathAwaitsYou : BaseArmor
{
Thank you so much, this is going to save me so much time and I can now avoid player wipes.. This is amazing! Thank you all for the help I serious appreciate it.
 
Back