Monster Compatible UT GameTypes - UTSPFix

Discussions about GameTypes
Post Reply
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Monster Compatible UT GameTypes - UTSPFix

Post by MrLoathsome »

6/18/12 - Grab the latest version of this here: http://ecoop.ucoz.com/load/utspfix/1-1-0-42

Here is the current Readme:

Code: Select all

6/18/2012 UTSPFix RC5

These GameTypes are targeted at players who are adding Monsters to default UT games.

The amazing amount of errors and warnings in the log file that show up when ScriptedPawns, (Monsters), are
added to the default UT Gametypes have annoyed me for years.
Decided to do something about it.

I had determined a while ago that most of those problems could not be corrected via a mutator
without causing even more issues. Decided to try and just fix the default gametypes.

UTSPFIX adds the following new gametypes:

DeathMatch - SP Fix
Team DeathMatch - SP Fix
CTF - SP Fix
Assault - SP Fix
Domination - SP Fix

Configuration for all settings other than the new ones are done the same way as you have always done them
via the Practice Match config screens. Just pick one of the new gametypes and setup the game with the
settings you want as usual.

These gametypes include some extra options.

1. Bot may be more inclined to attack monsters if they encounter them.
2. Added 2 new config variables that add 3 scoring options when a monster is killed.

New config variables:

For AS_SP, DOM_SP and CTF_SP:

bScoreSPKills=True // If True, players score point for killing monsters.
bNegScoring=False // If True, players lose a point for killing monsters. (bScoreSPKills must be False)

For the AS_SP gametype only:
bScoreTeamKills=True // If True counts kills of other players or bots in the Team Score, as well as monsters.
(Default Assault makes no use of the team score....)

New options for the DM_SP gametype:

bScoreSPKills=True // Same as described above.
bNegScoring=False // Same as described above.
bScoreDeathsBySP=True // If True, players deaths is incremented if they are killed by a monster.
bMonsterTeam=True // If True game adds a Player named "The Monster Team" to the game. Will score a point whenever monster kills a bot or player.
bScoreSPvsSP=True // If True, and bMonsterTeam=True, "The Monster Team" will score a point when a monster kills another monster.

New options for the TDM_SP gametype:

bScoreSPKills=True // Same as described above.
bNegScoring=False // Same as described above.
bScoreTeamKills=True // Same as described above.
bMonsterTeam=True // Same as described above.
bScoreSPvsSP=True // Same as described above.
MonsterTeamNum=3 // Team number to put "The Monster Team" on. Valid range 0-3.
ForceTeamNum=255 // Team number for Human Players. Valid range 0-3. If 255, players can join any team.
bSpawnInTeamArea=True // Attempt to spawn players and bots in Team Area, if the map has PlayerStarts for that team.
bRandTeams=False // If True, The Monster Team will be on a random team between 0-3 each game.
// If True AND ForceTeamNum is NOT 255, Players will also be placed on a random team.

Note regarding MaxTeams.
The default setting for number of teams you can set during game config, will be used
for adding bots and players, and team balancing, if it is enabled. By setting some of the new variables, you can force
additional teams for human players and/or The Monster Team as you wish.

If The Monster Team is on any team, and that team wins, the game will announce that "The Monster Team" has won.

These new options may be accessed 2 ways.

1. Via the UT menu. Options - Advanced Options - Game Types*
2. Edit the new gametype sections in your UT.ini file.

2. After you play a game with one of the new gametypes, a new section should be appended to
you UnrealTournament.ini file.

Look for sections: [UTSPFix5.DM_SPGame], [UTSPFix5.CTF_SPGame] etc.

You can edit the settings there if you wish.

-------------

Installation:

Drop UTSPFix5.int and UTSPFix5.u into your UnrealTournament\System folder.
Select one of the new gametypes and play.

-------------

For servers, add UTSPFix5 to the ServerPackages section of your ini file.
uz file provided for your redirect.

You will need to be using a mapvote mutator that lets you specify the
GameType classes in its ini file.

Look for a section like this:

DMGameType=BotPack.DeathMatchPlus
TDMGameType=BotPack.TeamGamePlus
DOMGameType=BotPack.Domination
CTFGameType=BotPack.CTFGame
ASGameType=BotPack.Assault

Change it to this:

DMGameType=UTSPFix5.DM_SPGame
TDMGameType=UTSPFix5.TDM_SPGame
DOMGameType=UTSPFix5.DOM_SPGame
CTFGameType=UTSPFix5.CTF_SPGame
ASGameType=UTSPFix5.AS_SPGame

Enjoy !

*Credit to Dr.Flay over at UT99.org for the int file tweak that gives access to the
gametype settings in Advanced Options.
Note you must have OldSkool installed for the Advanced Options menu to be available.

**Update:

Note, this will not fix warnings specific to the types of monsters you are adding to your games.

Errors like this are problems with the monster class itself:

Code: Select all

ScriptWarning: Fly CTF-Face.Fly5 (State UnrealShare.Fly.TacticalMove:0019) Accessed None
ScriptWarning: Fly CTF-Face.Fly5 (Function UnrealShare.ScriptedPawn.TacticalMove.PickDestination:007A) Accessed None
ScriptWarning: Fly CTF-Face.Fly5 (Function UnrealShare.ScriptedPawn.TacticalMove.PickDestination:0082) Accessed None
In this case, you should be using a different fly class to avoid those warnings. (i.e. the MonsterSpawn fly....)

These are the type of errors these gametypes are trying to eliminate:

Code: Select all

ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.AssessBotAttitude:002C) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.GameThreatAdd:0013) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.GameThreatAdd:0013) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.ReduceDamage:003A) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.AssessBotAttitude:002C) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.ScoreKill:002C) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.TeamGamePlus.IsOnTeam:0014) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.TeamGamePlus.IsOnTeam:0014) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.TeamGamePlus.IsOnTeam:0014) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.AssessBotAttitude:002C) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.AssessBotAttitude:002C) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.AssessBotAttitude:002C) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.ReduceDamage:0022) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.ReduceDamage:003A) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.ScoreKill:002C) Accessed None
ScriptWarning: CTFGame CTF-Face.CTFGame0 (Function Botpack.CTFGame.ReduceDamage:003A) Accessed None
If anybody tries it out, let me know what happens..... :wtf:

*Edit - Decided after I posted this that it might be a good idea to see how it works online.
Put it on my DM/CTF server.

Seems to work very well in initial testing.
As expected, the massive reduction in script warnings and errors seem to have improved performance in a number of ways.
Primarily due to all the warnings that not longer being replicated from server to client I suspect. (Less channels etc) :what:

I did see a handful of warnings on a 3rd party map during testing on my server, but nothing like the giant flood of accessed none
warnings it used to generate. Client side logs were looking fine.

Because this server starts up on a DM map, I made the following change in addition to the above changes to the gametype
classes in the servers UnrealTournament.ini file:

Code: Select all

[Engine.Engine]
DefaultServerGame=Botpack.DeathMatchPlus
Changed to:

Code: Select all

[Engine.Engine]
DefaultServerGame=UTSPFix4.DM_SPGame  // Only needed for dedicated servers.
:omfg:
Last edited by MrLoathsome on Tue Jun 19, 2012 2:31 am, edited 5 times in total.
blarg
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Monster Compatible UT GameTypes - UTSPFix

Post by Dr.Flay »

I've been meaning to ask about filtering data from being spewed into the log file.
Glad you have decided to address this issue, but can't we just block certain stuff with the right line in the ini file? (like block all output that has the result=accessed none).

Will be trying this out later. Nice one :tu:
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Monster Compatible UT GameTypes - UTSPFix

Post by MrLoathsome »

Well, you can suppress all the warnings and errors, by putting these 2 lines in the [Core.System]
section of you UnrealTournament.ini file:

Code: Select all

Suppress=Warning
Suppress=ScriptWarning
However just hiding the errors, does not fix what is causing them... :ironic2:
blarg
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Monster Compatible UT GameTypes - UTSPFix

Post by Dr.Flay »

True, thanks :tu:
And from the point of view of bug-testing, a bit pointless at that level.
Though that is blocking the root, can you not block by result ?
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Monster Compatible UT GameTypes - UTSPFix

Post by MrLoathsome »

I dont think you can.

In any case, suppressing all those warnings is sort of like putting a piece of tape over the check engine light on your dashboard.
blarg
User avatar
EvilGrins
Godlike
Posts: 9668
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Monster Compatible UT GameTypes - UTSPFix

Post by EvilGrins »

I already use monsters in various gametypes with either MonsterSpawn or MonsterMadness quite effectively.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Monster Compatible UT GameTypes - UTSPFix

Post by MrLoathsome »

EvilGrins wrote:I already use monsters in various gametypes with either MonsterSpawn or MonsterMadness quite effectively.
As have I for quite a long time, however you guys are missing the point of this.

These new gametypes dont just suppress those accessed nones, they correct the root cause in
the script functions so they never happen in the first place.

Every time you see an accessed none in the log, it means something in the code that caused it is broken.
AND the engine has to spend a bit of extra time, processing the error, and writing it to the log file.

In the case of servers, bandwidth is wasted sending all the error info to the client machines.
And then they also spend extra time processing the error..... :loool:

I am pretty sure just suppressing these warnings and errors in your UT.ini file, only skips the last step that actually writes the
line to the log. The engine still will be doing its error handling code internally.

These gametypes just extend the default ones, and I only tweaked a few functions in each, just enough
to fix the accessed none errors when scriptedpawns show up.

The ScoreKill function needed adjustments for all of them, so I added the extra scoring options since
I was messing with that function anyway.

Been testing it on 2 live servers last day, both have a number of mutators running. No problems at all so far.
blarg
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Monster Compatible UT GameTypes - UTSPFix

Post by Dr.Flay »

MrLoathsome wrote:I dont think you can.

In any case, suppressing all those warnings is sort of like putting a piece of tape over the check engine light on your dashboard.
Ahhh yes, old-skool fixes.
How about if I tap the side of the PC vigorously, until something blinks? :loool:

Seriously. I do understand.
You have already explained the issue enough for me. I have some basic programming experience, so I am aware of the hell of error-trapping.

I've been playing a little, and no problems here so far.
I am loving my tiny little log files. Thankyou :tu:
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Monster Compatible UT GameTypes - UTSPFix

Post by MrLoathsome »

Dr.Flay wrote: Seriously. I do understand.
You have already explained the issue enough for me. I have some basic programming experience, so I am aware of the hell of error-trapping.

I've been playing a little, and no problems here so far.
I am loving my tiny little log files. Thankyou :tu:
Been testing these out on 2 live servers now for 10 days, no problems at all yet.

And again, these gametypes aren't just trapping or suppressing these errors, they fix them....
blarg
User avatar
Feralidragon
Godlike
Posts: 5489
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Monster Compatible UT GameTypes - UTSPFix

Post by Feralidragon »

Didn't check the whole topic, but I just took a look at the last MrLoathsome's post (not the one above, the one before) and at Dr.Flay afterwards and I must say the following:
MrLoathsome is right. If you're a player and don't give a crap if the mod is working right or wrong as long as it "apparently" works, then suppress the errors, however if you're either a server-admin, a developer (specially a developer) or at least some who DO *care* if the mods are working right or not, don't suppress them, check them out, and then report to whoever did the mod, or ask permission to fix them yourself, or at least try to look for a fixed version.

Like MrLoathsome pointed out, each error in the log means bad programming. It doesn't mean whoever did it is a bad programmer at all (otherwise every coder would be a bad programmer lol), it just means that somewhere in the code pointed out by the error there's a reference that is null and the coder didn't predict that situation (Accessed None, the most common ones), the code is trying to retrieve info from an element in an array that does not exist (Array out of bounds error), etc..

They're the first signs of why something goes wrong, as it means the programmer simply didn't predict that, and every time something isn't predicted in the code, something bad will eventually happen (a bug, an exploit, a server crash, a client GPF, etc).
Hermskii
Average
Posts: 70
Joined: Fri May 23, 2008 3:33 am
Personal rank: Secret Administrator
Location: Houston, TX.
Contact:

Re: Monster Compatible UT GameTypes - UTSPFix

Post by Hermskii »

The first time I read this I really didn't read it closely I must confess. This second time just now....... I did read it entirely and understood it well. This is a big deal and a great solution. I understand it doesn't fix it all but that it slows the bleeding to the logs and to the network traffic substantially. I have not tried it but it makes me want to make another server and try it out. I already know it works basically based on testing so far.

I especially like the part where it can take a point for killing an annoying monster that may get in your face while you're trying to frag other players. LOL. That part is extra funny. Why? Because I used to spawn multiple flying monsters like Cave Mantas, Giant Flies and Warlords on a server I have where hiding and guiding is much of the game. I did it to make sure players in sweet hiding places would be found and annoyed by monsters that could fly thus reaching all parts of the maps even the hard to get to high camping spots. That server would be "Curious George's Redeemer Insanity" and it annoyed the folks badly that while they were guiding their Redeemer they would be getting attacked by one of these monsters and would not know it except for the screen turning red each time they took damage. They would have to detonate their Guided Redeemer to see what was attacking them. Then because it was a Redeemer Only Mod Server they would have to get far enough away from that monster that was attacking them to shoot them with their Redeemer to kill them. LOL! That would make them have to get out of a great hiding spot. I thought it was real funny at the time but my players sure didn't. I won't make that mistake again but to have monsters spawning in a standard DM setting is real fun! I have done that before too.

I think you folks can count me in on a new server soon. Thanks for this UTSPFix MrLoathsome! Thank God for people like you just looking around for hard work to do in order to make it easier on us Server Admins out here!
Last edited by Hermskii on Thu Dec 29, 2011 6:49 pm, edited 1 time in total.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Monster Compatible UT GameTypes - UTSPFix

Post by MrLoathsome »

Thanks to Feralidragon, Hermskii and all for looking at this.

In the event that nobody finds any major problems with this, and there continues to be further interest, I may
spend an hour or 2 adding fixed gametypes for LMS and RocketArena. I left those out because I cant remember the last
time I played either of them. However adding support for those would make this thing complete, assuming no issues are reported.

Test some more and let me know!
blarg
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Monster Compatible UT GameTypes - UTSPFix

Post by MrLoathsome »

Post #1 updated with latest version of this, again.

Only the Readme section of Post #1 was changed. The rest of it still applies.

The only mutator I have found in testing that has an occasional issue with this, is my very own ScoreSave
mutator. I would recommend not running that with this on your servers. (Are there still a lot of players
using dialup anymore these days who are prone to random disconnects?)

Note if you run the DM_SP gametype with the BadNews! RC 4, you will want to set bScoreDeathsBySP=False, or
you will get 2 deaths counted when you are killed by a monster.
blarg
Post Reply