UOGamers 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!

  • To obtain new Razor updates, please reinstall Razor from our new website.

[SVN527] Prisoner Camps are not like OSI

Status
Not open for further replies.
Re: [IN DEVELOPMENT] Prisoner Camps are not like OSI

Hmm.Seperating looks a like a better option and more control over the specific type of camp.

Well this version should cover all.

I've also modified the formatting in BaseEscortable to make it more readable.
I hope the patch file didn't screw it up so it would be better to test it on local before directly adding to TC.

Edit: Ah I forgot to add chest types other than metal chest.Now it should spawn with wooden and golden chests too.

If you haven't patched simply download the v1.1 .
 

Attachments

  • Camps.patch
    56.3 KB · Views: 4
  • Camps v11.patch
    57.4 KB · Views: 5

Copern

Sorceror
Re: [TESTING] Prisoner Camps are not like OSI

I see serialization problems with BaseCamp, RatCamp, and OrcCamp. You removed the reader for m_Gate, but it must to be read if it exists. Increase the version by one and use this.
Code:
case 1:
{
	m_Prisoner = reader.ReadMobile();
	break;
}
case 0:
{
	m_Prisoner = reader.ReadMobile();
	reader.ReadItem();
	break;
}

I'll have a look over BaseEscortable and see if I notice anything for serialization.
 

Copern

Sorceror
Re: [TESTING] Prisoner Camps are not like OSI

Ok, nothing wrong with BaseEscortable serializing, but I think it would be better to start using a switch for deserialize.

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

	writer.Write( (int)1 ); // version

	writer.Write( (bool) m_Captive );
			
	EDI dest = GetDestination();

	writer.Write(dest != null);

	if (dest != null)
		writer.Write(dest.Name);
		writer.Write(m_DeleteTimer != null);

	if (m_DeleteTimer != null)
		writer.WriteDeltaTime(m_DeleteTime);
}

public override void Deserialize(GenericReader reader)
{
	base.Deserialize(reader);

	int version = reader.ReadInt();
			
	switch ( version )
	{
		case 1:
		{
			m_Captive = reader.ReadBool();
			goto case 0;
		}
		case 0:
		{
			if (reader.ReadBool())
				m_DestinationString = reader.ReadString(); // NOTE: We cannot EDI.Find here, regions have not yet been loaded :-(

			if (reader.ReadBool())
			{
				m_DeleteTime = reader.ReadDeltaTime();
				m_DeleteTimer = new DeleteTimer(this, m_DeleteTime - DateTime.Now);
				m_DeleteTimer.Start();
			}
		}
	}	
}
 
Re: [TESTING] Prisoner Camps are not like OSI

Ugh..I must have missed that in seperation.Though my test world was empty that's probably why I didn't notice it.I don't think I made any changes to basecamp.

Only BaseEscortable,RatCamp,OrcCamp and the other 3 files are new.
 

Copern

Sorceror
Re: [TESTING] Prisoner Camps are not like OSI

Ahh you're right, I must have been seeing things.

As a side note, the formatting on BaseEscortable in the current SVN is hellish. Any chance you wouldn't mind fixing it up a little and include it in the patch?
 
Re: [TESTING] Prisoner Camps are not like OSI

Well on my version it's already fixed as I said,but it seems the tortoise svn is really a tortoise when it comes to format recognizing :)

I'll include a .cs version of BaseEscortable should be much better to view.

Also thanks for pointing this out before it could've wiped the TC :)

Also will this line read everything before? I haven't been able to fully understand how serialization works.
Code:
reader.ReadItem();
 

Copern

Sorceror
Re: [TESTING] Prisoner Camps are not like OSI

It'll still read it, it just isn't stored anywhere anymore.
 

psz

Administrator
Re: [TESTING] Prisoner Camps are not like OSI

Just to point something out real quick:

Always test on an empty world *AND* a pre-loaded world


Otherwise you may run into unforseen issues ;->
 
Re: [TESTING] Prisoner Camps are not like OSI

Yes that's why I work on scripts on a populated world and check them under svn build with 1 5 items world :) But somehow I missed these.
 

Copern

Sorceror
Re: [TESTING] Prisoner Camps are not like OSI

If you used my BaseEscortable edits, you'll need a world from the current SVN and not one saved from your previous changes or it'll want to delete all of them. May want to try it with a world saved from the SVN. That's because I saved the m_Captive before the other variables are written to make it easy to use with a switch on deserialize.
 
Re: [TESTING] Prisoner Camps are not like OSI

Well in current version m_Captive is only loaded if version is >= 1.Its pretty minor addition to use a switch with it.Though I'm downloading another svn to populate and apply the patch on it to see if it will work.
RatCamp and OrcCamps are working fine as they should thanks for point that one out.
 

Copern

Sorceror
Re: [TESTING] Prisoner Camps are not like OSI

There's nothing wrong with how you are doing it now. I'm just thinking of possible future additions made to BaseEscortable. The switch just makes it easier to read when more things are added/changed. There are some cases where you would use "if (version < someversion)" after the switch case. Say if you want to assign a new variable a default value without making a new case that reads all the values and breaks.
 
Re: [TESTING] Prisoner Camps are not like OSI

I see.It seems I'll have to find some documentation about serialization process to fully understand it.I've been checking other scripts to see what's going on but they will only teach me so much.
 
Re: [TESTING] Prisoner Camps are not like OSI

v.1.2:

Added:

  • Serialization versioning for BaseEscortable.
Fixed:

  • Fixed serialization errors found in OrcCamp,RatCamp.
  • Formatting in BaseEscortable.cs.
BaseEscortable.cs is already included in .patch file.However it seems it doesn't retain it's formatting when patched via tortoise svn.So replace your with this one instead.
 

Attachments

  • Camps v12.patch
    57.8 KB · Views: 13
  • BaseEscortable.cs.txt
    14.4 KB · Views: 7

Jofussx

Wanderer
Re: [TESTING] Prisoner Camps are not like OSI

I'm new to the Demise scene and cant program or script for the life of me but I'm still interested in being helpful

That being said, one thing I DO know is Orc camps from T2A and AoS around Delucia (if any of this information is not current to the way these camps are on OSI then I'm sorry, I havent played live UO since AoS). Orc hunting at Delucia was my favorite pass time even when it became totally trivial. The comments up until this post seem to be pointing in the right direction. One thing I have noticed is that there wasnt any mention of the "Keg" barrels. I saw the mention of the locked "treasure chests" and that there are supposed to be 2 per camp. This is correct. One steel chest and one "other" (Large/Small Crate, Barrel, Keg.) Everything should be locked but have no key and be lockpickable. The skill was different on the various types of "chests." The "Keg" barrel was somewhat more rare and was pickupable, (that was my favorite... Hording locked kegs.) Small crates were most common secondary chests, followed by larger crates and barrels being next common, a second actual chest being next and then the "keg" being the least common.

There was on average 2 orc camps in the hills immediately east of Delucia, 2 in the plains and hills north east of Delucia and 2 more in the hills and open plain to the north/north west of Delucia. Also, these orc camps had 4 regular orcs and one orc captain. Very rarely you would see "an Orc Mage" and/or "an Orc Captain." You would also rarely see "an Orc Lord." I'm not complaining that there is an orc mage every time now though, it makes it tougher and they have decent loot, its just not the same is all.

Also I'm not sure where I would post this otherwise and its of a similar note. The orc captains had partially set loot. They would always drop thigh boots, ringmail tunic, orc helmet, 2 hand axe, and between 100-150 gold along with the uncommon possibility of "other" random items. While personally I feel that the loot may have been a little heavy I am just mentioning how it was on OSI.

If any of this was helpful then I'm glad, if not feel free to tell me to STFU and GTFO.

Jofussx
 
Re: [TESTING] Prisoner Camps are not like OSI

Why would we tell you STFU or GTFO while all you do help the community to achieve it's goal?Also don't worry I'm new too :)

It's glad to have someone who will point out the coder in the right direction towards OSI of course :) Thanks for the info once I'm done with hirelings I will add rarities and kegs too.Thanks again.If you have more info on other things please feel free to share them :)
 

psz

Administrator
Re: [TESTING] Prisoner Camps are not like OSI

I haven't seen a keg barrel in a camp in a really really long time on OSI (T2A, Fel/Tram, Ilsh).

Not saying they aren't there, just that I haven't seen one in quite literally years. (As you said, they were rare to begin with)
 
Status
Not open for further replies.
Top