!Installation Instructions:
Note: These instructions are for those that wish to save the Arrow Selections. The arrow selection stays at last setting untile reselected.
1. Getting you familiar with serialize/deserialization: Your serialization saves your bow info (arrow selection). Your deserialization reads your bow info (arrow selection) on boot up.
2. You can't have your script read your deserialization if it hasn't been saved. It simply doesn't contain the saved info yet. So understanding that we need to boot your shard without your serialization.
3. You want the shard to save the info (arrow selection) after boot up. So in order to do that, the serialization must be added before the boot up. You will be doing this without the deserialization, like this (look at the line commented out in blue):
Code:
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int) 0); // version
writer.WriteEncodedInt((int)m_ArrowType);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
[COLOR=blue]//[/COLOR]m_ArrowType = (ArrowType)reader.ReadEncodedInt();
if (Weight == 7.0)
Weight = 6.0;
}
4. After booting your shard, save it, and then shut it down.
5. Get rid of the brackets were commented out, and save the script. Look at the example:
Code:
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.WriteEncodedInt((int)m_ArrowType);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_ArrowType = (ArrowType)reader.ReadEncodedInt();
if (Weight == 7.0)
Weight = 6.0;
}
6. Reboot your shard, save it and your done. If you follow these dirrections properly you will not have to delete any existing bows or composite bows, ect.
7. To remove these scripts you must reverse these directions. Save shard, comment out the serialization, save the script, reboot the server, save the server, shut down the server, comment out deserialization, save the script, reboot the server, and then save the server. Add in old scripts.
==================================================
I Dont understand what Scrip i add the // to but i think this is gonna be a great scrip yet again!