Xeno

Member
I am using servuo ver 0.5 build 6423.13585

I made a new tribal paint called lava paint (just modified color) It works but when I shut down the server and restart, the character reverts back to the traditional tribal paint color. I know it is related to the the savage paint timer in the playermobile and tried to modify that. It compiles just fine but if there was a character saved with the new color, it wants to delete all player mobiles. I don't know if anyone can help with this or not but will upload the 2 scripts. I marked my changes on the playermobile with // Edit.

Any help would be greatly appreciated.
 

Attachments

  • PlayerMobile.cs
    177 KB · Views: 2
  • LavaPaint.cs
    2.8 KB · Views: 4
Check this line in serialization, when you scroll down to deserialize you're on case 36. Pretty sure this needs to be 36 instead of 35. Anytime something tries to delete itself on load it usually has to do with serialization.

(line4712) writer.Write(35); // version

Also if you run in debug mode it will tell you exactly which line is causing the error.
 
Find your .exe and create a shortcut for it. Then right click your shortcut and click Properties. For the Target Path (which is something like C:/blah/blah/blah) put " " around that then add -debug to the end of it. When your server crashes for any reason or won't load it'll will spit out the file that's causing the error followed by which line caused the initial error.
 
I made the change to the line you mentioned and changed it from 35 to 36. It is still trying to delete the character. I ran the debug and it seems to be fine other than trying to delete the character. It is not showing any errors.

Here is the end of the debug
ai.imgur.com_K4KujUn.png

Here it is after deleting the character, it shows an error so maybe it helps. I should have did a screen shot of it earlier.

ai.imgur.com_0h4KvdH.jpg

I am attaching the 2 scripts again as well. Thanks for helping with this!
 

Attachments

  • LavaPaint.cs
    2.8 KB · Views: 2
  • PlayerMobile.cs
    177 KB · Views: 2
It is definitely your player mobile.cs that is causing the error, and it has something to do with the serialization. Try moving line 4859: writer.Write(LavaPaintExpiration); to line: 4713. You have to serialize in the the order that you deserialize.
 
Same issue :(

Here it is with that change made.
 

Attachments

  • PlayerMobile.cs
    177 KB · Views: 2
writer.Write(36); // version
writer.Write(LavaPaintExpiration); //Edit
writer.Write(_BlessedItem);
writer.Write((int)m_ExploringTheDeepQuest);
// Version 31/32 Titles
writer.Write(m_ShowGuildAbbreviation);
writer.Write(m_FameKarmaTitle);
writer.Write(m_PaperdollSkillTitle);
writer.Write(m_OverheadTitle);
writer.Write(m_SubtitleSkillTitle);
writer.Write(m_CurrentChampTitle);
writer.Write(m_CurrentVeteranTitle);

It should be like this
 
Well I give up I guess. It loaded just fine but the lava paint reverted back to tribal paint hue at after server restart. Thanks for the help though, much appreciated. :)
 
in PlayerMobile.cs you have

case 36: // Edit
{
LavaPaintExpiration = reader.ReadTimeSpan();
if (LavaPaintExpiration > TimeSpan.Zero)
{
BodyMod = (Female ? 184 : 183);
HueMod = 0; <---------- try 1260 here
}
goto case 35;
}

But... in your Lavapaint.cs you have

else
{
from.BodyMod = (from.Female ? 184 : 183);
from.HueMod = 1260;
if (from is PlayerMobile)
((PlayerMobile)from).LavaPaintExpiration = TimeSpan.FromDays(7.0);
from.SendMessage("You now bear the markings of the molten tribe. Your body paint will last about a week or you can remove it with an oil cloth.");
this.Consume();
}

Change the HueMod in your PlayerMobile.cs to match your LavaPaint and see if that does anything.
 
Last edited:
You are the man, you found what I missed. 1260 is the hue that I wanted, while 0 is the hue from savage kin paint. I needed to change this:
case 36: // Edit
{
LavaPaintExpiration = reader.ReadTimeSpan();
if (LavaPaintExpiration > TimeSpan.Zero)
{
BodyMod = (Female ? 184 : 183);
HueMod = 0;
}
goto case 35;
}

to

case 36: // Edit
{
LavaPaintExpiration = reader.ReadTimeSpan();
if (LavaPaintExpiration > TimeSpan.Zero)
{
BodyMod = (Female ? 184 : 183);
HueMod = 1260;
}
goto case 35;
}


I tested and it worked!! Thanks for running through it with me and finding why it was trying to delete the characters.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back