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!

FULL Diablo 2 Style Socket System =)

KillerBeeZ

Knight
Zeal said:
That is untrue, the counting is base 0, so 0 is a number. If you changed them to 7's, then your server would crash when a 7 was rolled. Well, it would not crash necessarily, but nothing would happen.


Code:
			if ( m_PerfectSocketGemRoll == 0 )
			{
				if ( m_GetPerfectSocketGemRoll == 0 )
				{
					PackItem( new PerfectAmethyst() );
				}
				else if ( m_GetPerfectSocketGemRoll == 1 )
				{
					PackItem( new PerfectDiamond() );
				}
				else if ( m_GetPerfectSocketGemRoll == 2 )
				{
					PackItem( new PerfectEmerald() );
				}
				else if ( m_GetPerfectSocketGemRoll == 3 )
				{
					PackItem( new PerfectRuby() );
				}
				else if ( m_GetPerfectSocketGemRoll == 4 )
				{
					PackItem( new PerfectSapphire() );
				}
				else if ( m_GetPerfectSocketGemRoll == 5 )
				{
					PackItem( new PerfectSkull() );
				}
				else if ( m_GetPerfectSocketGemRoll == 6 )
				{
					PackItem( new PerfectTopaz() );
				}
			}

Count the gem types one can get including the one for the 0 roll

7

private int m_GetPerfectSocketGemRoll = Utility.Random( 6 );

is rolling for 6 items not 7

As proof...

Have you gotten a Topaz yet? Has anyone? (doesnt count if you created it)

I have gotten 385 gems, killing all types of creatures, I have an even amount of every one of them, except no Topazes, now I know its all chance but thats too much to be left to chance, it simply doesnt give them.

Look at ANY switch statment that requires something be given each time and you will see the Utility.Random( * ); is ALWAYS 1 more than the number if the cases, or equal to the number of case statements including 0

thus I do believe you are mistaken
 
Z

Zigler

Guest
well i added it to my loot list.. well the lower gems.. so not sure if its workign how you say or not.. but i do not its not saving socket numbers for me after a reboot
 

Yotuf

Wanderer
Killerbeez, if i understand you , we have to do this here to :
Code:
		private int m_SocketWeaponRoll = Utility.Random( 42 );
		private int m_SocketArmorRoll = Utility.Random( 40 );
		private int m_SocketShieldRoll = Utility.Random( 6 );
 

brianre001

Wanderer
error

Scripts: Compiling C# scripts...failed (13 errors, 0 warnings)
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1519: (line 3427, colum
n 3) Invalid token '{' in class, struct, or interface member declaration
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1519: (line 3430, colum
n 28) Invalid token '==' in class, struct, or interface member declaration
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1519: (line 3432, colum
n 29) Invalid token '==' in class, struct, or interface member declaration
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1520: (line 3434, colum
n 6) Class, struct, or interface method must have a return type
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1031: (line 3434, colum
n 16) Type expected
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1520: (line 3434, colum
n 20) Class, struct, or interface method must have a return type
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1002: (line 3434, colum
n 34) ; expected
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS0116: (line 3436, colum
n 5) A namespace does not directly contain members such as fields or methods
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS0116: (line 3606, colum
n 4) A namespace does not directly contain members such as fields or methods
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1518: (line 3999, colum
n 10) Expected class, delegate, enum, interface, or struct
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1518: (line 4005, colum
n 10) Expected class, delegate, enum, interface, or struct
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1518: (line 4011, colum
n 42) Expected class, delegate, enum, interface, or struct
- Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1022: (line 4026, colum
n 4) Type or namespace definition, or end-of-file expected





This is what i got nothing else biut the base critter =/
 

KillerBeeZ

Knight
Yotuf said:
Killerbeez, if i understand you , we have to do this here to :
Code:
		private int m_SocketWeaponRoll = Utility.Random( 42 );
		private int m_SocketArmorRoll = Utility.Random( 40 );
		private int m_SocketShieldRoll = Utility.Random( 6 );

you know what, your 100% correct.

Add 1 to each of those or you will get no Socketed Wooden Shield, Socketed Studded Legs or Socketed Viking Sword
 

KillerBeeZ

Knight
H Cube prototype

ok, this is the 1st version of the Horadric Cube.

Its not that pretty but it does work

Take 3 gems to make one of the next type.

I used the picnic basket ID as the cube because I can't think of anything more suitable that looks like a cube (feel free to make suggestions)

I plan to spice up the gump a bit later, and maybe even redo it to work a bit differently.

Also I added the option to transmute 6 perfect gems to get a random socketed item (Topaz = random weapon, Skulls = random armor, Amethyst = random shield)

I will be creating Runes and Jewels to go with this system when I can.

Please test this out, and let me know what you think, comments, ideas and suggestions are welcome.
 

Attachments

  • HCube.cs
    31.4 KB · Views: 141

KillerBeeZ

Knight
to fix the problem with the gem types listed dissapearing on reboot, I am thinking that each socketed item type will need to be edited to include the Augmentlist in the Serialize and Deserialize... is this correct? and if so, anyone feel like doing it?
 

Zeal

Wanderer
KillerBeeZ said:
to fix the problem with the gem types listed dissapearing on reboot, I am thinking that each socketed item type will need to be edited to include the Augmentlist in the Serialize and Deserialize... is this correct? and if so, anyone feel like doing it?

Actually that is only sort of correct, the problem is that the label variable on the socketed weapons is not being serialized. Just change the following code, for example, in the socketed katana.

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

			writer.Write( (int) 0 ); // version
			writer.Write( (int) UsedSockets );
			writer.Write( (int) MaxSockets );
		}

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

			int version = reader.ReadInt();
			UsedSockets = reader.ReadInt();
			MaxSockets = reader.ReadInt();
		}

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

			writer.Write( (int) 0 ); // version
			writer.Write( (int) UsedSockets );
			writer.Write( (int) MaxSockets );
			writer.Write( (string) AugmentList );
		}

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

			int version = reader.ReadInt();
			UsedSockets = reader.ReadInt();
			MaxSockets = reader.ReadInt();
			AugmentList = reader.ReadString();
		}
 

KillerBeeZ

Knight
Zeal said:
Actually that is only sort of correct, the problem is that the label variable on the socketed weapons is not being serialized. Just change the following code, for example, in the socketed katana.

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

			writer.Write( (int) 0 ); // version
			writer.Write( (int) UsedSockets );
			writer.Write( (int) MaxSockets );
		}

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

			int version = reader.ReadInt();
			UsedSockets = reader.ReadInt();
			MaxSockets = reader.ReadInt();
		}

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

			writer.Write( (int) 0 ); // version
			writer.Write( (int) UsedSockets );
			writer.Write( (int) MaxSockets );
			writer.Write( (string) AugmentList );
		}

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

			int version = reader.ReadInt();
			UsedSockets = reader.ReadInt();
			MaxSockets = reader.ReadInt();
			AugmentList = reader.ReadString();
		}


is that not what I said?

"each socketed item type will need to be edited to include the Augmentlist in the Serialize and Deserialize"
 

LordHogFred

Knight
Ok, I'm almost finished with a new release.
I will alter the Augmentation list so as it correctly serialised/deserialised. Also I'm going to try and release the gems in the LootPack.cs to make the distribution easier.
The one thing I would like to know is (as a balance issue) whether I should only allow socketed helms and breastplates.

Thanks,
 

KillerBeeZ

Knight
LordHogFred said:
Ok, I'm almost finished with a new release.
I will alter the Augmentation list so as it correctly serialised/deserialised. Also I'm going to try and release the gems in the LootPack.cs to make the distribution easier.
The one thing I would like to know is (as a balance issue) whether I should only allow socketed helms and breastplates.

Thanks,

I think you can include all the armor if you limit some of them as far as max sockets, like a helm needs 1, gorget, 1, gloves 1, arms 2 and so forth
 
Might as well keepem all

IMHO it would be easier for an admin to take out the armor types (bracers, legs, etc) than try to add them in. For instance on mine I would like to have all armor and weapons able to be socketed but joe schmoe over there wouldn't want but the actual D2 armors and weapons to have the socket ability. the system by itself does cause alot of balance issues when it comes to these uber items players can make, but not all shards are geared at being osi difficulty. I just think it would be better for the admins to decide for what they are looking to use the system for, if you allow all armor and weapons to be socketed then the admin can pick and choose what they want for their shard and you won't have to worry about an umpteen newb posts about how to add to the system. Just my 2 cents.
 

KillerBeeZ

Knight
wanderingchi198 said:
IMHO it would be easier for an admin to take out the armor types (bracers, legs, etc) than try to add them in. For instance on mine I would like to have all armor and weapons able to be socketed but joe schmoe over there wouldn't want but the actual D2 armors and weapons to have the socket ability. the system by itself does cause alot of balance issues when it comes to these uber items players can make, but not all shards are geared at being osi difficulty. I just think it would be better for the admins to decide for what they are looking to use the system for, if you allow all armor and weapons to be socketed then the admin can pick and choose what they want for their shard and you won't have to worry about an umpteen newb posts about how to add to the system. Just my 2 cents.

Another way to help balance a bit (and giving more control over said balance ) is to redo the max socket chance

from this

Code:
			switch ( Utility.Random( 6 ) ) 
			{ 
			case 0: MaxSockets = 1; break;
			case 1: MaxSockets = 1; break;
			case 2: MaxSockets = 1; break;
			case 3: MaxSockets = 2; break;
			case 4: MaxSockets = 2; break;
			case 5: MaxSockets = 3; break;
			}
to this

Code:
			Private int SocketChanceRoll = Utility.Random( 50 );

			if ( SocketChanceRoll == 0 )
			{
			MaxSockets = 3;
			}
			else if ( SocketChanceRoll <= 10 )
			{
			MaxSockets = 2;
			}
			else
			{
			MaxSockets = 1;
			}

This will reduce the amount of typing needed to adjust the chances for the 3 socketed items or 2 socketed items, and in my opinion give the system better balance
 

Greystar

Wanderer
LordHogFred said:
Ok, I'm almost finished with a new release.
I will alter the Augmentation list so as it correctly serialised/deserialised. Also I'm going to try and release the gems in the LootPack.cs to make the distribution easier.
The one thing I would like to know is (as a balance issue) whether I should only allow socketed helms and breastplates.

Thanks,


Although you could also leave the sockets how they are and just tell people what sections need to be changed/removed to eliminate the extra sockets on the items... Although I like it as it stands... although I am looking forward to updates to see what has been changed/improved.
 

LordHogFred

Knight
Ok well I was thinking and what would be cool is if I could add the socketed attribute to runic hammers ?

Unfortunalt yI have no idea of where to even start with this so if someone could give me some help with that I will add socketed to runic hammers :D

Thanks,
 

KillerBeeZ

Knight
LordHogFred said:
Ok well I was thinking and what would be cool is if I could add the socketed attribute to runic hammers ?

Unfortunalt yI have no idea of where to even start with this so if someone could give me some help with that I will add socketed to runic hammers :D

Thanks,

I don't believe I'd have any use for socketed runics, but I'd say just do these like you did the rest of the weapons

I am currently working on the Runes and Jewels for this, like the Zod rune that adds 500 durability (better not make the items indestructable) and the 40/15 ed/ias jewel, does just that adds 40% weapon damage and 15% attack speed

There are a lot of these so might take a bit (just wanted to mention it in case someone else was working on them)
 

Greystar

Wanderer
LordHogFred said:
Ok well I was thinking and what would be cool is if I could add the socketed attribute to runic hammers ?

Unfortunalt yI have no idea of where to even start with this so if someone could give me some help with that I will add socketed to runic hammers :D

Thanks,


Do you mean so you could add gems/skulls to the hammer OR do you mean so you could make it so the hammer could help you make an Item with sockets?
 
Top