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!

XmlPoints

ArteGordon

Wanderer
updated to version 1.15

from the changelog

New to version 1.15
updated 1/08/05

- added support for team challenge games.

- added a new installation step 7 to allow beneficial acts between team members.

- added the new Team LMS challenge game.
This supports any combination of team numbers and sizes, such as 2 vs 2, or 4 vs 3, or 2 vs 3 vs 10, etc.
The game organizer makes team assignments for each participant.
The rules are the same as regular LMS with the last team with remaining players being the winner.
The purse is divided equally among winning team members.
Players assigned to teams will have their NameHue changed to their team color for the duration of the game.

- added the new Team Deathmatch challenge game.
This supports any combination of team numbers and sizes.
The rules are the same as regular Deathmatch with the team with the highest score being the winner.

- added the "[teamlmschallenge" command and XmlPoints gump button which creates a new Team LMS challenge game.

- added the "[teamdeathmatch" command and XmlPoints gump button which creates a new Team Deathmatch challenge game.

- minor change to the regular LMS challenge game gump behavior. During the game the gumps now automatically update on any player death to reflect the new status.

- modified the ChallengeGameRegion to restrict beneficial acts to team-members-only for game participants. This means that non-participants cannot interfere with participants either in a negative or positive way during a game held in the region.

- modified the ChallengeGameRegion to block all harmful acts on non-participants during a game. This allows observers to watch matches safely.

- slight modification to corpse looting restrictions in ChallengeGameRegions. Restrictions now only apply while a challenge game is present (gauntlet is down), so before, during, and after a game player looting of other players corpses will be blocked, but at any other time, default rules apply.

- simplified individual challenge game scripts by consolidating functions into the BaseChallengeGame class.
 

sUpplier1

Wanderer
I found that DisableGuards property from ChallengeRegionStone aren't saving.
After the server restart is turns back to false.
 

ArteGordon

Wanderer
sUpplier1 said:
I found that DisableGuards property from ChallengeRegionStone aren't saving.
After the server restart is turns back to false.
ah, you're right. Forgot to ser/deser it. I'll get that in the next update. Thanks.
 

sUpplier1

Wanderer
Players reported that during a worldsave gloves are disapering (decaying I think) so challenge are deleting and players are became grey to each other
 

ArteGordon

Wanderer
I'll look into it. Is this only now happening with the most recent update? Is it only particular games?

(edit)

ok, I think I know what is going on. I dont believe that it is deleting a game in progress. I think that a game is getting completed and then a save is occurring immediately after that. Under those conditions it is possible for the gauntlet to decay immediately giving the appearance that the decay ended the game.
I'll change the decay code to guarantee that all gauntlets persist for at least the miminum post-game window (5 min default).

As for players going gray, currently when a game ends, noto immediately goes back to the default state so that if players were in the middle of attacking each other when the game ended, they might end up getting in some extra hits that could make them gray.
I'll force a break in combat for all participants on game end to handle that scenario.

Thanks.
 

Vento Divino

Wanderer
Hi Arte, once again another great work :)

I'll report some feedback from players on my shard, after some test sessions:

- in Team DM, when more than 8 players are added, appears the gump page 2, and that's fine. But once I set the team of the player in second page, the number of the team of the players in first page is resetted.
- in the challenge setup gump, there should be a button to "allow" the other players to accept the challenge. Now, while for example setting up teams or adding pgs and people continously accept, the gump shows up over and over to the organizer... It's pestering.
- during a challenge game, when players kill, gump show up, covering half screen and preventing pgs to see the situation around them. Also if this gump is closable by right-click, it's very pestering.
- [systembroadcastkill status is resetted at every restart
- it would be nice if when a player dies in challenge game, it is setted frozen so he can't go away from his body rests.

I hope some of this feedback will help you to make a greater script :)
 

ArteGordon

Wanderer
Vento Divino said:
Hi Arte, once again another great work :)

I'll report some feedback from players on my shard, after some test sessions:

- in Team DM, when more than 8 players are added, appears the gump page 2, and that's fine. But once I set the team of the player in second page, the number of the team of the players in first page is resetted.
- in the challenge setup gump, there should be a button to "allow" the other players to accept the challenge. Now, while for example setting up teams or adding pgs and people continously accept, the gump shows up over and over to the organizer... It's pestering.
- during a challenge game, when players kill, gump show up, covering half screen and preventing pgs to see the situation around them. Also if this gump is closable by right-click, it's very pestering.
- [systembroadcastkill status is resetted at every restart
- it would be nice if when a player dies in challenge game, it is setted frozen so he can't go away from his body rests.


I hope some of this feedback will help you to make a greater script :)

I will check on the page 2 behavior.

I think having a "request acceptance" button is a good idea.

you should be able to deal with the issue with the gump being automatically updated on kills by just repositioning it offscreen. Once repositioned, it will continue to be updated in that position and not in the play area. It should also be closable on right click.

I'll try out some ideas to keep people near their corpses. I think I will probably go with auto-teleporting to corpes on res. This would be configurable.

systembroadcastkill is a static variable that doesnt get serialized. I'll look into adding it to the LBSstone that handles maintaining static leaderboard save settings.

Thanks for the suggestions.

(edit)

ah, I just realized what you are talking about in the page 2 behavior.
If you make changes to the teams on a page, you have to hit the 'Set Teams' button before switching pages otherwise those changes will not be registered.
I had originally set it up to automatically register team settings when you changed pages but I didnt like it. I'll take another look at it.
 

Vento Divino

Wanderer
ArteGordon said:
you should be able to deal with the issue with the gump being automatically updated on kills by just repositioning it offscreen. Once repositioned, it will continue to be updated in that position and not in the play area. It should also be closable on right click.
Ok, I'll try, thanks for the advice :)

ArteGordon said:
ah, I just realized what you are talking about in the page 2 behavior.
If you make changes to the teams on a page, you have to hit the 'Set Teams' button before switching pages otherwise those changes will not be registered.
I had originally set it up to automatically register team settings when you changed pages but I didnt like it. I'll take another look at it.
Maybe I have explained it bad:
- I add the players (more than 8)
- I set the first 8 players team (well visible in first page)
- hit the "Set Teams" button
- change page, and the first 8 players return to "no team" (or 0)
 

ArteGordon

Wanderer
Vento Divino said:
Ok, I'll try, thanks for the advice :)


Maybe I have explained it bad:
- I add the players (more than 8)
- I set the first 8 players team (well visible in first page)
- hit the "Set Teams" button
- change page, and the first 8 players return to "no team" (or 0)

ok, it shouldnt do that. I'll check it out.

(edit)

fixed for the next update. Thanks!
 

ArteGordon

Wanderer
updated to version 1.16

from the changelog

new to version 1.16
updated 1/13/05

- the installation now comes in two zip files. XmlPoints-vxxx-1of2.zip and XmlPoints-vxxx-2of2.zip

- non-participants are now automatically cleared from the arena area at the start of a challenge game. (thanks to sUpplier1 for the suggestion) The arena area is defined by the arena size setting in each challenge game.

- added the new Capture the Flag (CTF) challenge game.
This supports any combination of team numbers and sizes.

Capture the Flag rules
The game organizer is responsible for assigning teams and for placing the home bases for each team.

Home bases are placed by clicking the button next to each team entry in the Team Status gump, and then targeting a location. Bases can be placed/repositioned at any time prior to starting a match.

Players capture opponents flags by moving to within 1 tile of the opponents home base when the flag is present. The flag will then be placed in the players backpack and the player will be surrounded with a particle effect in the color of the flag they are carrying.

Flags cannot be placed in containers, given to other players, or placed on the ground.

A player can only carry one flag at a time.

Players score a point by returning to their home base while carrying an opponents flag.

If a player is killed, any flag that they are carrying is returned to its home base. Players will then be autores'd after the specified RespawnTime (default 6 seconds).

If a player remains out of bounds (defined by the arena size) for longer than the allowed time , remains hidden past the allowed hiding time, is offline for longer than the allowed time, or changes maps, any flag they are carrying will be returned to its base.

The game ends when either the target score is reached or when the match timer counts down to zero. The team with the highest score at that point wins and the total purse is divided equally among winning team players.


- added the new Team King of the Hill game.
This supports any combination of team numbers and sizes.
The rules are the same as regular KotH with the team with team reaching the target score first being the winner.

- added the new Team Deathball game.
This supports any combination of team numbers and sizes.
The rules are the same as regular Deathball with the team with team reaching the target score first being the winner.

- added the "[teamkoth" command and XmlPoints gump button which creates a new Team KotH challenge game.

- added the "[teamdeathball" command and XmlPoints gump button which creates a new Team Deathball challenge game.

- added the "[ctfchallenge" command and XmlPoints gump button which creates a new Capture the Flag challenge game.

- the disableguards setting in the ChallengeGameRegion is now saved on server restarts (thanks to sUpplier1 for pointing this out).

- ghosts are now automatically teleported to their corpses on autores (thanks to Vento Divino for the suggestion).

- the m_SystemBroadcast setting that allows GMs systemwide control over kill broadcasts is now saved on the LBSstone across server restarts when changed by the [systembroadcastkills command. If you dont have an LBSstone placed somewhere, the changes from the default setting will not be saved (thanks to Vento Divino for the suggestion).

fixed a bug in the new team games setup where assigning teams on one page of the game setup gump would reset team assignments on other pages. (thanks to Vento Divino for pointing this out)

- the post-game decay of gauntlets is now controlled by the PostGameDecayTime property that is set to 5 mins by default in BaseChallengeGame.cs and can be overridden in individual challenge games. This eliminates the possibility of a gauntlet decaying immediately after a game is completed due to a world save and guarantees that all gauntlets will remain for the specified amount of time.
 

sUpplier1

Wanderer
I received such crash today.

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Engines.XmlSpawner2.ChallengeGameRegion.AllowHarmful(Mobile from, Mobile target) in s:\RUNuo-January\Scripts\_CustomNew\XML-spawner\XmlPoints-v116\ChallengeGameRegion.cs:line 36
   at Server.Mobile.CanBeHarmful(Mobile target, Boolean message, Boolean ignoreOurBlessedness)
   at Server.Mobiles.PlayerMobile.CanBeHarmful(Mobile target, Boolean message, Boolean ignoreOurBlessedness) in s:\RUNuo-January\Scripts\_Modified\Mobiles\PlayerMobile.cs:line 689
   at Server.Mobile.CanBeHarmful(Mobile target, Boolean message)
   at Server.Mobile.CanBeHarmful(Mobile target)
   at Server.Mobile.HarmfulCheck(Mobile target)
   at Server.Items.BaseWeapon.OnSwing(Mobile attacker, Mobile defender) in s:\RUNuo-January\Scripts\_Modified\Items\Weapons\BaseWeapon.cs:line 781
   at Server.Items.Fists.OnSwing(Mobile attacker, Mobile defender) in s:\RUNuo-January\Scripts\Items\Weapons\Fists.cs:line 164
   at Server.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)

the problem with:
if(ChallengeGame.GameInProgress)
return false;

Happens when some creature from region is attacking player not in region.
To solve it I added some additional BaseCreature checks
 

ArteGordon

Wanderer
thanks. I'll check it out.

(edit)

yes, that line should read

Code:
// protect all non-participants during a game
            if(ChallengeGame != null && !ChallengeGame.Deleted && ChallengeGame.GameInProgress)
                return false;

fixed and updated in v1.16a
 

Vento Divino

Wanderer
I've got the same crash and my scripter correct it so:
Code:
// if a challenge game is present but not in progress, then disallow any harmful acts
			if( ChallengeGame != null && !ChallengeGame.Deleted && !ChallengeGame.GameInProgress)
			{
				if (from is PlayerMobile ) 
					from.SendMessage( "Harmful acts are not allowed before or after a Challenge Game." );
				return false;
			}
In this way, the message is still showed to players. I think it's better than no message, or not?
 

ArteGordon

Wanderer
that test is the one that limits all harmful acts before and after a game, and it currently does give that message. The one that was causing problems involved non-participants during a game and it does not have a message, although you could add one there as well.

The entire method should currently look like this

Code:
public override bool AllowHarmful( Mobile from, Mobile target )
{
          // if a challenge game is present but not in progress, then disallow any harmful acts
	if( ChallengeGame != null && !ChallengeGame.Deleted && !ChallengeGame.GameInProgress)
	{
		from.SendMessage( "Harmful acts are not allowed before or after a Challenge Game." );
		return false;
	}

	// during a challenge game, only harmful acts between participants is restricted to opponents
	if(XmlPoints.AreInAnyGame(target) || XmlPoints.AreInAnyGame(from))
                return XmlPoints.AreChallengers(from,target);

          // protect all non-participants during a game
          if(ChallengeGame != null && !ChallengeGame.Deleted && ChallengeGame.GameInProgress)
                return false;

	return base.AllowHarmful( from, target );
}

(edit)

note, this is what is currently in the v1.16a release.
 

ArteGordon

Wanderer
I just realized that I forgot to mention one additional change that went into v1.16

- all combat between participants is now automatically terminated when a game ends (combatant null, warmode off) to avoid accidental attacks that could make players gray. (thanks to sUpplier1 for pointing this out).
 

ArteGordon

Wanderer
sorry, another quick update

This isnt a change in the code, just a change in one of the installation steps that should have been added for the team games.
I forgot to change step 5 to give team members Ally notoriety so that they highlight green during games.

that part of Step 5 now reads

in Notoriety.cs
in the MobileNotoriety method around line 240 change
Code:
	if ( target.Criminal )
		return Notoriety.Criminal;
to
Code:
	if ( target.Criminal )
		return Notoriety.Criminal;

	// XmlPoints challenge mod
	if(XmlPoints.AreTeamMembers(source,target))
                	return Notoriety.Ally;
	else
	if(XmlPoints.AreChallengers(source,target))
                	return Notoriety.Enemy;
also at the top of the file add the line
Code:
using Server.Engines.XmlSpawner2;

I also updated the xmlpoints.txt file in XmlPoints-v116b-1of2.zip, and that was the only change so no real need to download that again if you already had v1.16a.
 

akrondar

Wanderer
Hi Arte, great system xD. I have a question, is there a way to check that the arena zise can`t be out of the challengeregion set in the stone?..

thks in advance :)
 

ArteGordon

Wanderer
akrondar said:
Hi Arte, great system xD. I have a question, is there a way to check that the arena zise can`t be out of the challengeregion set in the stone?..

thks in advance :)
Do you mean just reporting during setup that a specified arena size is actually outside of the challenge region?
Any game that is set up in a challenge region will automatically use the challenge region bounds as the outer limits, even if the arena size is set larger.

this is from the changelog on the subject

New to version 1.17
- For games created within a ChallengeGameRegion when a participant is no longer within a ChallengeGameRegion they will be flagged as out-of-bounds. This is true even if no arena size has been specified or an arena size has been specified that might extend out of any ChallengeGameRegion so the ChallengeGameRegion bounds also serve as the maximum arena size. (thanks to Trying for the suggestion).

(edit)

I didnt realize this was in the old thread. For the latest version go here

http://www.runuo.com/forum/showthread.php?t=49903
 
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (4 errors, 3 warnings)
- Warning: Scripts\Customs\New\Commands\SpawnRem.cs: CS0184: (line 41, column 8
) The given expression is never of the provided ('Server.Scripts.Commands.Premiu
mSpawner') type
- Warning: Scripts\Misc\BaseKiller.cs: CS0168: (line 98, column 9) The variable
'item' is declared but never used
- Error: Scripts\Misc\Notoriety.cs: CS1502: (line 214, column 5) The best overl
oaded method match for 'Server.Engines.XmlSpawner2.XmlPoints.AreTeamMembers(Serv
er.Mobile, Server.Mobile)' has some invalid arguments
- Error: Scripts\Misc\Notoriety.cs: CS1503: (line 214, column 37) Argument '2':
cannot convert from 'Server.Items.Corpse' to 'Server.Mobile'
- Error: Scripts\Misc\Notoriety.cs: CS1502: (line 217, column 5) The best overl
oaded method match for 'Server.Engines.XmlSpawner2.XmlPoints.AreChallengers(Serv
er.Mobile, Server.Mobile)' has some invalid arguments
- Error: Scripts\Misc\Notoriety.cs: CS1503: (line 217, column 37) Argument '2':
cannot convert from 'Server.Items.Corpse' to 'Server.Mobile'
- Warning: Scripts\Samurai Empire\Mobiles\SE Monsters\YomotsuElder.cs: CS0162:
(line 15, column 19) Unreachable code detected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.


i get that any help
 

ArteGordon

Wanderer
toothlessbeaver said:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (4 errors, 3 warnings)
- Warning: Scripts\Customs\New\Commands\SpawnRem.cs: CS0184: (line 41, column 8
) The given expression is never of the provided ('Server.Scripts.Commands.Premiu
mSpawner') type
- Warning: Scripts\Misc\BaseKiller.cs: CS0168: (line 98, column 9) The variable
'item' is declared but never used
- Error: Scripts\Misc\Notoriety.cs: CS1502: (line 214, column 5) The best overl
oaded method match for 'Server.Engines.XmlSpawner2.XmlPoints.AreTeamMembers(Serv
er.Mobile, Server.Mobile)' has some invalid arguments
- Error: Scripts\Misc\Notoriety.cs: CS1503: (line 214, column 37) Argument '2':
cannot convert from 'Server.Items.Corpse' to 'Server.Mobile'
- Error: Scripts\Misc\Notoriety.cs: CS1502: (line 217, column 5) The best overl
oaded method match for 'Server.Engines.XmlSpawner2.XmlPoints.AreChallengers(Serv
er.Mobile, Server.Mobile)' has some invalid arguments
- Error: Scripts\Misc\Notoriety.cs: CS1503: (line 217, column 37) Argument '2':
cannot convert from 'Server.Items.Corpse' to 'Server.Mobile'
- Warning: Scripts\Samurai Empire\Mobiles\SE Monsters\YomotsuElder.cs: CS0162:
(line 15, column 19) Unreachable code detected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.


i get that any help

This is the the old thread. I would recommend using the latest version

http://www.runuo.com/forum/showthread.php?t=49903

Your error is from placing the changes in installation step 5 in the CorpseNotoriety method instead of the MobileNotoriety method. Just go back and do that step again. The code in those two methods looks very similar so look carefully at where you place it.
 
Top