SBMutFixTeleportersURL

Search, find and discuss about Mutators!
User avatar
Barbie
Godlike
Posts: 2390
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

SBMutFixTeleportersURL

Post by Barbie » Sun Aug 21, 2016 7:41 pm

This mutator runs once after a map is loaded and checks all Teleporters for a URL that points to another level (technically: Teleporter.URL contains a '#'). If such a teleporter is found, it will be disabled. Optionally a MonsterEnd is spawned at that location.
Download
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 5871
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: SBMutFixTeleportersURL

Post by sektor2111 » Sun Aug 21, 2016 8:39 pm

I must say that is not bad... Else I would be interested to see a configurable <class> to spawn at teleporter location because this way causes dependency with MH and some MH2 types won't end with default MonsterEnd trigger. So that new configurable class might be a... ServerTravelTrigger or a general MH GameEnder toy. Perhaps word "peer" is also embedded in these URL types...

Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: SBMutFixTeleportersURL

Post by Aldebaran » Sun Aug 21, 2016 9:20 pm

Thank you very much Barbie.
With that some Single Player Maps can be played on a Monster Hunt server :-)
Last edited by Aldebaran on Fri Nov 18, 2016 5:10 pm, edited 1 time in total.

User avatar
Barbie
Godlike
Posts: 2390
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: SBMutFixTeleportersURL

Post by Barbie » Sun Aug 21, 2016 9:47 pm

Aldebaran wrote:With that some Single Player Maps can be played on a Monster Hunt server :-)
Because SP maps usually have only 1 PlayerStart, I run code to add some PlayerStarts in my BaseMutator and use them in my MonsterHunt GameType:
Spoiler
Show

Code: Select all

function int PlayerStartsCreate(byte DesiredPlayerStartCount, ELogType Logtype) {
/*******************************************************************************
Spawns up to *DesiredPlayerStartCount*-1 addditional PlayerStarts around
existing and enabled PlayerStarts.
The number of created PlayerStarts is returned.
*******************************************************************************/
Example for 127 additional PlayerStarts
Show
Playerstarts128.jpg
I used a vase (nearly same collision cylinder as PlayerStart) to visualize the PlayerStarts
But because Level.Game.FindPlayerstart() has to be adapted to use these new PlayerStarts it is IMO not possible to have this as a standalone Mutator for all types of GameType, only for the ones the Mutator coder knows. See No telefrag at start for details on this.
You do not have the required permissions to view the files attached to this post.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: SBMutFixTeleportersURL

Post by Aldebaran » Sun Aug 21, 2016 10:17 pm

Barbie wrote:it is IMO not possible to have this as a standalone Mutator for all types of GameType, only for the ones the Mutator coder knows
So sektor2111's LessTele Mutator is not working with a custom Monster Hunt Mod?

I have tested two SP maps with the SBMutFixTeleportersURL mutator, i have not played to end but the log says that each one URL-Teleporter was found and replaced. :tu:

User avatar
sektor2111
Godlike
Posts: 5871
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: SBMutFixTeleportersURL

Post by sektor2111 » Sun Aug 21, 2016 11:11 pm

Aldebaran wrote:So sektor2111's LessTele Mutator is not working with a custom Monster Hunt Mod?
Have you tested that and doesn't work ? Let me know. That mutator has nothing to do with any special game-type, it do works in games using "StartMatch()" unless your game-type screws "ModifyPlayer()". Else Findplayerstart can be rewritten depending on needs - but obviously I think is not interesting to see 127 players ass-in-ass into a default Level :what: .
127 × 20kb = 2540 kb/s used - I'm doubt about a smoother game at such speeds...

Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: SBMutFixTeleportersURL

Post by Aldebaran » Mon Aug 22, 2016 3:42 am

I have tested LessTele with 10 bots in two single player maps playing with a custom Monster Hunt Mod and in some normal monster hunt maps too. I realized no difference with or without the mutator. In the single player map Enslaved for example bots and myself were telefragged eachother when spawning.

The server log says that the LessTele mutator was started correctly:

Code: Select all

Mapvote: Starting Mutator: LessTele.LessTele
ScriptLog: MH-Cliffs.LessTele0  has been loaded and started.
Last edited by Aldebaran on Fri Nov 18, 2016 5:10 pm, edited 1 time in total.

User avatar
OjitroC
Godlike
Posts: 2972
Joined: Sat Sep 12, 2015 8:46 pm

Re: SBMutFixTeleportersURL

Post by OjitroC » Mon Aug 22, 2016 10:14 am

I tried Enslaved as a Monster Hunt with 2 bots and LessTele running and the bots spawned OK - I think that's the limit as with 3 bots one telefragged another. Have a look at your UT.log and you'll see what spots LessTele attempts to spawn players/bots in. Whether or not you can get 10 bots spawned in a single player map is going to depend on the number of AlarmPoints, InventorySpots etc at the start, since there will normally be only one player start (as there is in Enslaved).

Yes - LessTele does work and works well, provided there is somewhere for spawning to take place. I've used it successfully with small 1-on-1 DM maps with few player starts.

If you do want 10 bots in a single player map, you can use MrLoathsome's Random Spawn Locator (RSL) but they will be spawned anywhere in the map, not just at the start.

The other thing about Enslaved is that there are no pathnodes in the early sections so the bots aren't going to do very much; getting them to follow the player is not really worth the effort - this probably applies to other single player maps as well.

So SP maps would need to be modified to be played as MH successfully with anything other than a small number of bots (by adding more player starts, pathnodes etc).

Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: SBMutFixTeleportersURL

Post by Aldebaran » Mon Aug 22, 2016 12:53 pm

I understand, so it depends little bit on the map how good the mutator works. Spawning everywhere in the map with RSL makes no sense in monster hunt in my opinion.
Last edited by Aldebaran on Fri Nov 18, 2016 5:11 pm, edited 1 time in total.

User avatar
OjitroC
Godlike
Posts: 2972
Joined: Sat Sep 12, 2015 8:46 pm

Re: SBMutFixTeleportersURL

Post by OjitroC » Mon Aug 22, 2016 3:24 pm

Aldebaran wrote:I understand, so it depends little bit on the map how good the mutator works.
Yes, it does - really it depends entirely on the map and if there are useable Navigation Points at the start and if there are, how many. However you could try increasing the SpawnRadius to see if you can spawn more bots without telefragging.
Aldebaran wrote: Spawning everywhere in the map with RSL makes no sense in monster hunt in my opinion.
Indeed not.

Perhaps the best solution would be a mutator to add extra player starts to a map, as Barbie does.

User avatar
sektor2111
Godlike
Posts: 5871
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: SBMutFixTeleportersURL

Post by sektor2111 » Mon Aug 22, 2016 11:12 pm

OjitroC wrote:Perhaps the best solution would be a mutator to add extra player starts to a map, as Barbie does.
I was working this morning at such thing but I want it compatible with Team-games too Eg CTF. If mutators will put other 3 PlayerStarts in red team, for sure has to balance Blue team too. For DM is not that important but for other games like Assault CTF are definitely important. Else I have time limited for UT, I'm working almost all day so I cannot be that fast + I have to do tests as long as I don't want to release some trash to piss of people. It is LessTele2 with TeamGames enhancements: Adding new starts which must take in account teams. It should be ready for a 16 vs 16 Match according to default array rules, it's not only about relocating player as primary version.

User avatar
Barbie
Godlike
Posts: 2390
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: SBMutFixTeleportersURL

Post by Barbie » Mon Dec 12, 2016 6:00 am

New version 1 released. I moved the fixing code from Mutator's state code to earlier executed event PreBeginPlay() so that the MonsterEnd fix code of Level.Game treats the additional MonsterEnd also. (Using MonsterHunt2Gold or MonsterHunt2v3 you will still get an error log entry, because they do not deactivate nor delete the original MonsterEnd's.)
Info and Download...
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 5871
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: SBMutFixTeleportersURL

Post by sektor2111 » Mon Dec 12, 2016 3:12 pm

Hint Notes.
Chronology:
MH = MonsterHunt(Level.Game)
Checking "if (MH != None)"
If MH exist (game is original), Spawn MonsterEnd and leave it alone.
if MH doesn't exist but... "Level.Game.IsA('MonsterHunt')" - MonsterEnd.LifeSpan = 4.000000 - No more stupid spam logs. What for ? Because we don't play an original rammed crap ? If Game is a sort of MonsterHunt Spawn End temporary - that's all. 4 seconds should be enough for different MonsterHunt games to add their own End and... bye. I would go even for self destruction since mutator does a simple job and makes no sense to stay loaded because it is not for whatever tracking purposes.

"AlternatePath"
Customize a general end-game trigger in style MonsterEnd which will end game from any kind not only MH, just end game. No dumb logs, nothing else than simple ending. A fancy texture might be welcomed for showing that map is a "fixed one", else player future admin will take it as a good one, and will mess any future server. Let people to know. To be honest I would broadcast at starting game if map has been successfully set for game-play.