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!

(Nujel'm) Battle Chess

Urk

Wanderer
Arya said:
Are you sure you're using the latest version? Does this happen always? Please give me some more details, possibly a way to reproduce the bug.
Just downloaded it and faced this problem as started testing it - 5 minutes before posting here.
 

Arya

Wanderer
Urk said:
Just downloaded it and faced this problem as started testing it - 5 minutes before posting here.
Does this happen always? Or just sometimes? Does it happen only when you're capturing? Are you using some weird region setting? Or did you make changes to the AI? Or possibly didn't you set the board height correctly? Unless you give me something to work with, it's unlikely I can help you solve it.

On a side note, I posted a small update. Thanks to Sp1der as always for the hints and fixes. I changed the OverrideMinorHue property to work as you intented, it actually looks nice too!
 

Urk

Wanderer
Arya said:
Does this happen always? Or just sometimes? Does it happen only when you're capturing? Are you using some weird region setting? Or did you make changes to the AI? Or possibly didn't you set the board height correctly? Unless you give me something to work with, it's unlikely I can help you solve it.

On a side note, I posted a small update. Thanks to Sp1der as always for the hints and fixes. I changed the OverrideMinorHue property to work as you intented, it actually looks nice too!
Well, I placed it in Felucca, Nujel'm. In props of the stone I gave coordinates of the upper-corner of the board. All figures were placed properly and I've started the game with one of my GMs. But very first pawn didn't go to the rune that appeared on the floor and just started walking around.
We tried it a few times but failed.
I did not edit anything and just downloaded the script that submitted.
 
E

Eddie Vandetti

Guest
OK, I love this script, it works fine with no bugs for me. BUT, I was wondering if it could be possible to make the two kill eachother instead of them getting removed? Like when you go to capture a chess piece they would fight but the capturer would always kill the capturee. I dunno just somethin me and my friend thought up. Please any help would be good. Thanks.
 

xetic

Wanderer
XxSP1DERxX said:
The bug is here in ChessGame.cs on line 451

Code:
						m_White.CloseGump( typeof( GameGump ) );

Should be changed to

Code:
						m_Black.CloseGump( typeof( GameGump ) );
Ok, i used microsoft word to find line 451 but thats not the right line, can you post a little more about where this change needs to be made please? I searched for that line and found 4 of them. Thank You!
 

Arya

Wanderer
xetic, that fix has been implement in the newest revision. If you download the latest version, you don't need to apply it manually.
 
E

Eddie Vandetti

Guest
Arya said:
xetic, that fix has been implement in the newest revision. If you download the latest version, you don't need to apply it manually.
Arya, Can you please respond to my post?

OK, I love this script, it works fine with no bugs for me. BUT, I was wondering if it could be possible to make the two kill eachother instead of them getting removed? Like when you go to capture a chess piece they would fight but the capturer would always kill the capturee. I dunno just somethin me and my friend thought up. Please any help would be good. Thanks.
 

Kamron

Knight
Code:
Exception: 
System.NullReferenceException: Object reference not set to an instance of an object. 
   at Arya.Chess.GameGump..ctor(Mobile m, ChessGame game, ChessColor color, String message, Boolean move, Boolean moving) 
   at Arya.Chess.ChessGame.SendAllGumps(String whiteMsg, String blackMsg) 
   at Arya.Chess.ChessControl.OnDoubleClick(Mobile from) 
   at Server.Mobile.Use(Item item) 
   at Server.Network.PacketHandlers.UseReq(NetState state, PacketReader pvSrc) 
   at Server.Network.MessagePump.HandleReceive(NetState ns) 
   at Server.Network.MessagePump.Slice() 
   at Server.Core.Main(String[] args)
Here is the newest crash, I am still investigating the problem. I am assuming it has to do with m the mobile that is invalid when used from the chess control. But I am just guessing.
 

Arya

Wanderer
It occurs when the stone is double clicked during game setup and one of the two players is null. I fixed it in 1.2.3, thank you for reporting it.

Eddie, that's surely possible to do. However I don't have plans on doing it myself for now, and I personally think that the 'battles' look good enough with just the effects and sounds. Making the pieces battle each other, would just slow the game further... and you know chess isn't a fast paced game on its own :) Either way if you or someone else wish to implement this, I'll be happy to merge it into the script with a flag (and credit of course). Otherwise I might end up doing it when I have a little time :)
 

Kamron

Knight
It would be alot less coding to use the OverrideMinorHue to set the SolidHueOverride property (and set to -1 when you take it off). Sorry if I am a nag about this.. but it is more effecient than changing every part of them to a different hue. :\ I'll code it for you and submit it to make life easier ;)

Also, as an issue (maybe). The peices call guards when someone is attacked nearby (NuJel'm). This should be looked into.


EDIT: Here, check this out (I changed OverrideMinorHue to use SolidHueOverride). When you see the coding, and how it works in-game, you will see what I mean. Choose main colors, then click OverrideMinor hue to true in-game, and see.

Another note, but you probably already know. Hair hues are not the same between the same peices of the same side.
 
E

Eddie Vandetti

Guest
Arya said:
It occurs when the stone is double clicked during game setup and one of the two players is null. I fixed it in 1.2.3, thank you for reporting it.

Eddie, that's surely possible to do. However I don't have plans on doing it myself for now, and I personally think that the 'battles' look good enough with just the effects and sounds. Making the pieces battle each other, would just slow the game further... and you know chess isn't a fast paced game on its own :) Either way if you or someone else wish to implement this, I'll be happy to merge it into the script with a flag (and credit of course). Otherwise I might end up doing it when I have a little time :)

I would love to be able to do that but I'm not a very good scripter and I don't even know where the stuff would be to edit.. lol. I guess I'll just wait to see if you have enough time or what ever :p
 

jason x

Wanderer
m8 ur script is a crash machine

dang ur script crashes so much can u fix and make a better version like with out
the crashes like a v2.0 with no crashes at all if u can ty .
 

Kamron

Knight
Crash number three -

Code:
Exception: 
System.NullReferenceException: Object reference not set to an instance of an object. 
   at Arya.Chess.ChessGame.OnPlayerDisconnected(DisconnectedEventArgs e) 
   at Server.DisconnectedEventHandler.Invoke(DisconnectedEventArgs e) 
   at Server.Mobile.set_NetState(NetState value) 
   at Server.Network.NetState.ProcessDisposedQueue() 
   at Server.Core.Main(String[] args)
 

Kamron

Knight
This does not contribute to fixing the BattleChess crash bug that I posted, although this code runs slightly faster. Go to ChessGame.cs and find OnPlayerDisconnected, and change the method to this

Code:
		private void OnPlayerDisconnected(DisconnectedEventArgs e)
		{
			if ( e.Mobile == m_Black || e.Mobile == m_White )
			{
				if ( m_Status == GameStatus.Setup )
				{
					Cleanup();
				}
				else
				{
					m_Pending = true;
					
					if (m_Black != null && m_Black.NetState != null)
					{
						//Clean Targeter
						if (m_Black.Target != null && m_Black.Target is ChessTarget )
							( m_Black.Target as ChessTarget ).Remove( m_Black );

						m_Black.CloseGump( typeof( GameGump ) );

						// Send end gump to remaining player
						m_Black.SendGump( new EndGameGump( m_Black, this, false,
							"Your partner has been disconnected", ChessConfig.DisconnectTimeOut.Minutes ) );
					}

					if (m_White != null && m_White.NetState != null)
					{
						//Clean Targeter
						( m_White.Target as ChessTarget ).Remove( m_White );
						
						m_White.CloseGump( typeof( GameGump ) );
						
						// Send end gump to remaining player
						m_White.SendGump( new EndGameGump( m_White, this, false,
							"Your parner has been disconnected", ChessConfig.DisconnectTimeOut.Minutes ) );

					}
					
					if ( m_Timer != null )
						m_Timer.OnPlayerDisconnected();
				}
			}
		}
 

Arya

Wanderer
jason x said:
dang ur script crashes so much can u fix and make a better version like with out
the crashes like a v2.0 with no crashes at all if u can ty .
How about you write your own version instead? No one is forcing you to use this script.

For all the others, I'm out of town until tomorrow. I'll fix the crashes reported when I return.
 

Hybrid

Wanderer
jason x said:
dang ur script crashes so much can u fix and make a better version like with out
the crashes like a v2.0 with no crashes at all if u can ty .

why dont you post the crash log?

Had it in since 24th of June, never crashed. (updated it always ofcourse) :eek:

It just great.

*thanks*

:rolleyes:
 

Arya

Wanderer
I have posted an update that should finally resolve any issue with players logging out. Also I merged the solid hue override code by Sp1der, and hair/skin hue should be the same for both colors now when not using the OverrideMinorHue property.
 
Top