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!

[RunUO 2.0 RC1] GD13 Sickness System v2.0.0

Lokai

Knight
JamesCurtis;757353 said:
Alright, well now i have the playermobile.cs figured out, and the food.cs is having serialization problems. I swear to you i've merged many a systems as we have 26 systems in our shard, many which have distro mods, but this one seems to be getting the best of me. Now all of the food is wanting to be deleted. I've messed with the food.cs using some of what you've taught me. This script works without the gd13 additions, does not work with the gd13 additions. It will compile, but won't save and reload without serialization issues.

I figure that at least if people look back at these issues it will save them from having to ask about it :)

Edit: I think the problem might be at line 191. I've tried changing it to 5, but to no avail.

You have it like this:

Code:
  public override void Serialize( GenericWriter writer )
  {
   base.Serialize( writer );
   /*GD13_SicknessSYS_Start_6*/
   writer.Write( (int) 4 ); // version
   /*GD13_SicknessSYS_End_6*/
   writer.Write( m_Poisoner );
   Poison.Serialize( m_Poison, writer );
   writer.Write( m_FillFactor );
   /*GD13_SicknessSYS_Start_7*/
   writer.Write( m_Rotten );
   /*GD13_SicknessSYS_End_7*/
  }

Should be like this:

Code:
  public override void Serialize( GenericWriter writer )
  {
   base.Serialize( writer );
   /*GD13_SicknessSYS_Start_6*/
   writer.Write( (int) 5 ); // version
   /*GD13_SicknessSYS_End_6*/
   
   /*GD13_SicknessSYS_Start_7*/
   writer.Write( m_Rotten );
   /*GD13_SicknessSYS_End_7*/
   writer.Write( m_Poisoner );
   Poison.Serialize( m_Poison, writer );
   writer.Write( m_FillFactor );
  }

We need to write 'm_Rotten' FIRST after the version number, because that will be the first thing we will read.

If you already saved once using your old method, then you will still get errors loading. In that case, you will need to do something else. I can show you that later.
 

JCurtis_2004

Wanderer
I have to give you props for understanding this stuff, I can understand most of what's going on in scripts, but serialization throws me for a loop. I think with those two basic guidelines I'll be able to finish with most of my other serialization issues :)

Thanks!
 

Aulus

Wanderer
Got a few errors... cant seem to figure it out. Any ideas anyone?

Code:
Errors:
 + Mobiles/PlayerMobile.cs:
    CS0117: Line 2342: 'Server.Spells.Necromancy.TransformationSpell' does not c
ontain a definition for 'UnderTransformation'
    CS0104: Line 550: 'Puke' is an ambiguous reference between 'Server.Items.Puk
e' and 'Server.Gumps.Puke'
    CS0104: Line 550: 'Puke' is an ambiguous reference between 'Server.Items.Puk
e' and 'Server.Gumps.Puke'
    CS0104: Line 587: 'Puke' is an ambiguous reference between 'Server.Items.Puk
e' and 'Server.Gumps.Puke'
    CS0104: Line 587: 'Puke' is an ambiguous reference between 'Server.Items.Puk
e' and 'Server.Gumps.Puke'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

Tru

Knight
oldschool-3038;777250 said:
Re post sickness zip im using vista and when i extract it gives errors no files so please repost file


Rename the .zip file to .rar. Then the file that you get after that name .zip then unzip it (I just did and it works).
 

Anglohel

Wanderer
Code:
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
 + Items/Food/Food.cs:
    CS0152: Line 255: The label 'case 5:' already occurs in this switch stateme
t
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.


Hello,
Give what's wrong???
 

Tru

Knight
Anglohel;777370 said:
Code:
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
 + Items/Food/Food.cs:
    CS0152: Line 255: The label 'case 5:' already occurs in this switch stateme
t
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.


Hello,
Give what's wrong???

Looks like in Food.cs You used Case 5 twice. Post the file if you can't figure it out.


oldschool-3038;777395 said:
Ahh just told you whats wroung the link is broken. You need to reupload the files. Probly best to just make a new post and upload.

You don't seem to understand...this person is no longer around. I told you how to ge the file (as I tried right before I posted) It will work if you do it the way I told you to.

Tru;777319 said:
Rename the .zip file to .rar. Then the file that you get after that name .zip then unzip it (I just did and it works).

Btw the guy above seems to have gotten it so its obviously working.
 
Thanks i must of missed that part. Anyway thanks for posting I think Im going to add some new sickness like STD's and cancer aka un cureable things lol
 
hey tru u have a corrected version u can upload for us? I kept getting errors about the cobbler i read an seen something messed up with serial so if you have a good fresh copy please post for all ty
 

Tru

Knight
oldschool-3038;777574 said:
hey tru u have a corrected version u can upload for us? I kept getting errors about the cobbler i read an seen something messed up with serial so if you have a good fresh copy please post for all ty


I'm sorry I've never actually used this version of the system (It's a modified copy of my modified copy of the original). I'll try and help you (with your serialization) in you script support thread.
 

Sythen

Sorceror
I Updated The RunUO SVN 303 With This Script....

ROFL... AWESOME! AWESOME! Script. I absolutely love the random sicknesses available... lol
 
Does anyone know, how to generally lower the chance on Player catching a Sickness?
In the Playermobile are two lines
Code:
		private int MinorSickness = 	9999; 	//This is the chance of players catching minor sickness (high [4 to 10000] rare).
		private int MajorSickness = 	10000; 	//This is the chance of players catching major sickness (high [3 to 10000] rare).
but changing these values seems to have no effect.
 

Tiamat13

Sorceror
Nevyn Silberhand;837942 said:
Does anyone know, how to generally lower the chance on Player catching a Sickness?
In the Playermobile are two lines
Code:
		private int MinorSickness = 	9999; 	//This is the chance of players catching minor sickness (high [4 to 10000] rare).
		private int MajorSickness = 	10000; 	//This is the chance of players catching major sickness (high [3 to 10000] rare).
but changing these values seems to have no effect.


The lower the number the more chance you have at getting sick, the larger the number the more rare it becomes that anyone gets sick.

The minor and major refer to sickness types.

This way you can set the rarity of each class of sickness's.

example's

This would allow players to get sick a lot by both minor and major sickness's
Code:
		private int MinorSickness = 	4; 	//This is the chance of players catching minor sickness (high [4 to 10000] rare).
		private int MajorSickness = 	3; 	//This is the chance of players catching major sickness (high [3 to 10000] rare).

This would not allow players to get sick a lot by both minor and major sickness's
Code:
		private int MinorSickness = 	20000; 	//This is the chance of players catching minor sickness (high [4 to 10000] rare).
		private int MajorSickness = 	20000; 	//This is the chance of players catching major sickness (high [3 to 10000] rare).

This would allow players to get sick a lot by minor but not major sickness's
Code:
		private int MinorSickness = 	4; 	//This is the chance of players catching minor sickness (high [4 to 10000] rare).
		private int MajorSickness = 	20000; 	//This is the chance of players catching major sickness (high [3 to 10000] rare).


GD13,
:)
 

ETsCat

Sorceror
OK I tryed to dl your zip, and no mater where I put it Its not there. Whas Up?
:(
I'm using registered Winzip, and after looking at the zip file in notpad I noticed it has pk but its not reading the rest of the header.
 

Tiamat13

Sorceror
ETsCat;838475 said:
OK I tryed to dl your zip, and no mater where I put it Its not there. Whas Up?
:(


Are you using WinRAR or WinZip to unpack this?

The files were zipped with WinZip, so using something other then WinZip could cause error's when unzipping.


GD13,
:)
 
Top