there is a Random spawnpoint mutator available

Search, find and discuss about Mutators!
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: there is a Random spawnpoint mutator available

Post by papercoffee »

Shadow wrote:
papercoffee wrote:This RSM is a must for the HoldTheFrigginBurger game type of Food Fight. Do you hear me Shadow???
Yes I hear you Boss^^ Well I already have a random placement code for the burger. It iterates through the nav points and places it randomly at some point. Are you satisfied with that?
:tu:

Didn't know you already did something like this ... :mrgreen:
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: there is a Random spawnpoint mutator available

Post by MrLoathsome »

Quick question regarding team bases.

I was assuming that all bases for CTF would have 2 actors of class FlagBase on them.
Found a map today, that does not. CTF-Realmpf.unr. (CTF-Realm)
It has 2 flags of course, but seem to be lacking the FlagBase actors.

Are there any DM maps out there that actually are setup with Bases for each team?
Or are renamed CTF maps the only option at this point?

I can fix the mutator to work correctly with that CTF-Realmpf map easily enough, but that
one would not work as a DM-Map with 2 bases....

Fix for that, as well as the 2 glitches mentioned a few posts back, will be included in the next update.

Edit: DERP :ironic2:

The issue with CTF-Realmpf has been resolved. The flags on that map are on thin ramps over a lava pit, and the location
was getting excluded from the list.

This question still remains:

Are there any DM maps out there that actually are setup with Bases for each team? And if so, how exactly
are they setup?
Or are renamed CTF maps the only option at this point?

Edit - Nobody got an answer to the above question?? :?: :|

Also. Versions RC4 and prior of this were junk, and not actually random.
Delete them.

Previous versions were just building a list based on the exact locations of
some of the various items/actors in the map. (Starts, navigation points, inventory etc...)
It did find a lot more, but they weren't really random.

Noticed right away during testing it wasn't random enough. I adjusted quickly to looking for respawns near any pickups or weapons
locations in addition to the usual spawnpoints. Those locations get memorized by a player quickly. (I think...)

Next release has some actual randomization to the search for spawn locations.
The number of valid locations it finds will vary a bit each time you run the map.
It will also find a LOT more locations. (700 locations found last test on CTF-Face...)
Finds more locations than there are actors on the map. (Usually)
blarg
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: there is a Random spawnpoint mutator available

Post by Wises »

i think in regards to Teambased DM games ie; TDM and such , there are no need for flags - as its the first team to get to the desired fraglimit or the team with the most frags at the desired timelimit. Therefore no flags need to be accounted for. However having that ability is pretty cool - just not necessary.. therefore in essence all teams could be spawned antwhere in the map.

regarding the spawn close to other players option could you make this booleanable is saying that admins can perhaps adjust the radius in which players are spawned from each other?

just wondering about Sniper type games and such.. Unless you were to autodetect sniperarena and adjust it automatically idk.

so have had a few tests and lol at spawning in boxes @ stalwart .. that happened quite a bit in the (2) crates there. although admitantly no biggy .. it seems kinda .. bugish I guess. and with the great critiques I am used to playing with , you'd think it was the end of the friggin world.

also .. lol.. the player I requested this mod for had a little .. moan.. but lols worth it :)

thanks.
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: there is a Random spawnpoint mutator available

Post by MrLoathsome »

Wises wrote:i think in regards to Teambased DM games ie; TDM and such , there are no need for flags - as its the first team to get to the desired fraglimit or the team with the most frags at the desired timelimit. Therefore no flags need to be accounted for. However having that ability is pretty cool - just not necessary.. therefore in essence all teams could be spawned antwhere in the map.
You misunderstand. This won't be adding any flags....

The presence and location of 2 or more actors of class FlagBase in the map, are the only
clues this mutator has as far as where the Teambases are. For both TDM and CTF.

If you rename a CTF map to DM, flags will not spawn. But the FlagBase actor is still in the
map and it's location used internally by the mutator to figure out where to spawn the 2 teams.
The FlagBase class itself will only spawn a flag if the game is CTF.

(FlagBase is a default UT class, and has not been altered by this mutator in any way...)

If you play TDM on the regular DM maps, both teams will spawn all over the map.
If you use a renamed CTF map or any map that has FlagBases in it, this will automatically detect the FlagBases, and try
to spawn the players for each team on their side of the map.

I may try to include a new TDM gametype that will use both DM and CTF maps in the available maps list by default.
This would eliminate the need to screw around with copying and renaming maps, and the horrible waste of space
that would require.
regarding the spawn close to other players option could you make this booleanable is saying that admins can perhaps adjust the radius in which players are spawned from each other?
just wondering about Sniper type games and such.. Unless you were to autodetect sniperarena and adjust it automatically idk.
You are on the right track with those questions. Here is how this mutator is handling that currently.

It calculates a number for the radius the spawner will use when it checks for nearby players that is a percentage of how big the map is.
(Caps it so it doesn't waste time with giant radius searches on huge maps....)

The mutator then does a search for a random, valid spawn location using that starting value that was calculated at map start.
If there is any other player in that area, it reduces the starting radius by 10%, and does another check.
It will repeat that up to 16 times, reducing the search radius by 10% each time.
This system is working remarkably well in testing.

It almost never gets close to 16 tries. Even when testing on maps like CTF-2vs2-Crates or DM-Morbius, with me
and 16 bots on. Last tests I did, it was actually taking less tries on CTF-2vs2-Crates than it was on CTF-Face.
Need to do more testing to find the optimal initial starting radius value on that bit.

I am trying to write this thing so it will handle anything like that internally, and not require any values
from an ini file.

It will be plug and play.

Not sure if that problem with the crate spawns on DM-Stalwart still exists in this version or not. It might.
The odds of it happening have been reduced considerably by the addition of many more possible spawn
locations.
I have also made considerable changes to the code that validates possible locations since RC4.

That is on the list of things I still need to test a bit. The amount of testing required to make this thing
work the way I want it to is crazy.
I spent at least 2 or 3 hours last night, just killing myself over and over and over again on CTF-Face and
DM-Hyperblast, to make sure none of the spawn locations were out over empty space.

Just a few more tweaks, and I am going to put it on my DM/CTF and AS/DOM servers and start some
online testing in "real" games. I have been using me and 16 bots in almost all my development testing
so far. It should run even faster with fewer players on.
blarg
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: there is a Random spawnpoint mutator available

Post by Wises »

ahh nice.

so is there a RC5 version available yet or is that the one you will be testing?

cheers.

Also Keep up the good work :)
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: there is a Random spawnpoint mutator available

Post by Wises »

just thinking about the spawn in crates or garage on stalwart thinggy.. um.. it would happen I guess if players are in the immediate vacinity of the crates at time of spawn.. which is why it would mostly likely occur due to alot of activity within that area.. also in garage and the boxes there lead to the Rocketlauncher in Stalwart XXL or Armour in Stalwart.

Also above belt on Roof in Agony.. there is an invisible collision hull blocking the player from jumping up through and/or coming back down through (in case of RSL)

anyway bumping this thread.. is there any news on RC5?

I would like to test this mutate relocate thing ;)

Great stuff.
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: there is a Random spawnpoint mutator available

Post by MrLoathsome »

Still testing and tweaking it. Want to get it working as well as possible before the next public release to
keep the number of versions of it out there to a minimum.

When I decided it needed to add full teamgame support on any map with flagbases and/or control points
in addition to having it work with all the default gametypes, that complicated things a bit.

CTF maps are mostly setup with the bases at either end, and the team spawnpoints near the bases.
Domination maps are mostly setup with the various controlpoints spaced equidistant on the map, with spawnpoints
being away from the controlpoints....

Trying to write something that makes Team Deathmatch work well on both, has been interesting.
Less than trivial even.

It is very close to working the way I want, but more testing is required.

I can't use UED to save my life, but I will make the maps do what I tell them to. :mrgreen:

*Edit.
Wises wrote:just thinking about the spawn in crates or garage on stalwart thinggy.. um.. it would happen I guess if players are in the immediate vacinity of the crates at time of spawn.. which is why it would mostly likely occur due to alot of activity within that area.. also in garage and the boxes there lead to the Rocketlauncher in Stalwart XXL or Armour in Stalwart.

Also above belt on Roof in Agony.. there is an invisible collision hull blocking the player from jumping up through and/or coming back down through (in case of RSL)
Well, you are sort of on the right track with the crates/garage issue, but exactly the opposite.
If lots of activity is going on in that area, that will almost eliminate the odds of respawning there.
The mutator will look for a location where there isn't so much activity.
This thing builds its giant list of possible spawn locations before the match even starts.
Only real checks it does during games at the moment, is during teamgames to check
if the current randomly selected location is in the team area, and not too close to the enemy flag,
and not to close to other players. (It does ignore teammates for that check.)

That is in the version currently running on my server, but the next release will probably be
building separate location lists for each team before the match starts, which will improve
performance in team games considerably.
Only check that will need to be done in real time will be for opponents in the area.

Problem with the crates/garage on stalwart, is there is nothing in the area to indicate
that it is a bad spawn location.
Just did a test on stalwart where I pretty much just relocated for 15 minutes over and over.
Spawned in the crate that has the keg of health and rocket ammo 3 times, and in the garage
once. Odds are reduced, but it is still possible.

Re: invisible collision hull blocking the player

Is there an actor class for that? or something that would be detectable by a short
radius search that would indicate that something like that was in the area?
blarg
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: there is a Random spawnpoint mutator available

Post by Wises »

Re: invisible collision hull.. it is in the Map DM-Agony up above shield-Belt on platform.
would need to open map to sus it out.

^ not sure how RSL works here but perhaps it's 'Height Spawn' is a little to 'High'?.. perhaps try lowering it a bit.. as I notice alot of players falling from the sky - so to speak..
well at least they seem to spawn and drop from 128-256pixels in a-lot of cases.

thoughts on relocation side of things.. have a look at this ,

Code: Select all

class TeamSwitcher expands Mutator;

function PostBeginPlay() {
 Level.Game.RegisterMessageMutator(Self);
}

// Catch messages from players:
function bool MutatorTeamMessage(Actor Sender, Pawn Receiver, PlayerReplicationInfo PRI, coerce string Msg, name Type, optional bool bBeep) {
 if (Sender == Receiver && Sender.IsA('PlayerPawn')) { // Only process each message once.
  if (Left(Msg,1)=="!") {
   CheckMessage(Msg, PlayerPawn(Sender));
  }
 }
 return Super.MutatorTeamMessage(Sender,Receiver,PRI,Msg,Type,bBeep);
}

function CheckMessage(String Msg, PlayerPawn Sender) {

  if (Msg ~= "!RED") {
    ChangePlayerToTeam(Sender,0);
  }

  if (Msg ~= "!BLUE") {
    ChangePlayerToTeam(Sender,1);
  }

  if (Msg ~= "!GREEN") {
    ChangePlayerToTeam(Sender,2);
  }

  if (Msg ~= "!GOLD" || Msg ~= "!YELLOW") {
    ChangePlayerToTeam(Sender,3);
  }

  if (Msg ~= "!SPEC" || Msg ~= "!SPECTATE") {
    if (!Sender.IsA('Spectator')) {
      Sender.PreClientTravel(); // not sure if this is actually needed
      Sender.ClientTravel("?OverrideClass=Botpack.CHSpectator",TRAVEL_Relative, False);
    }
  }

  if (Msg ~= "!PLAY") {
    if (Sender.IsA('Spectator')) {
      Sender.PreClientTravel(); // not sure if this is actually needed
      Sender.ClientTravel("?OverrideClass=",TRAVEL_Relative, False);
    }
  }

}

function ChangePlayerToTeam(Pawn p, int teamnum) {
  if (teamnum == p.PlayerReplicationInfo.Team) {
    return;
  }
  Level.Game.ChangeTeam(p,teamnum);
  p.Died(None, '', p.Location); // Kills the player, forcing them to drop flag if they have it
}

^ I think this method would compliment "mutate relocate" because then all players can see that the player has attempted to relocate
as well as being very easy , ie; !reloc or !respawn

if we were to keep the "mutate relocate" I think.. Try adding a nice Big Center-Screen Message so that everyone knows that whoever relocated ?.. and if abused then.. well thats what 'Kickvote' is for lmao.
also be good to have a little message at gamestart .. like.. your mod name and version (like Zeroping103 does)

Code: Select all

MRLoathsome's Random Respawn Mutator
------------------------------------------
if you get stuck type !respawn or bind to key
via console > 'set input <key> mutate relocate.
=========================================
^^ covers a-lot of bases .. could make message toglable of course as some admins maybe not so kean to advertise.

Keep up the good work :D

ps: I know that you are a 'Plug-n-play' kinda chap :D and that's cool .. but as an admin for many years and all the mods I use.. I love having a few (more the merrier) options in .ini's to fiddle with or tweak so to speak .. in fact I love these mods. Because they allow me some control over certain aspects of it which I wish to bEnable/bDisable at will :tu:
User avatar
Hitman
Adept
Posts: 282
Joined: Mon Aug 16, 2010 11:01 am
Location: Sweden
Contact:

Re: there is a Random spawnpoint mutator available

Post by Hitman »

Why not use the same command as for BTCheckPoints the "!cp" and a lot of us already have that button configured and I dupet this will never be used for bunny-track LOL
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: there is a Random spawnpoint mutator available

Post by Wises »

ok back to this one , have tested it on servers and generally its a mixed feedback..

firstly the radius in which it spawns players for DM Maps is too close according to some leet players..
^ it would be good to be able to set some kind of thresh-hold here like say between 5meters-10meters or watever uu units UT uses.

secondly spawning into walls (facing) is there anything we can do here..

and finally CTF still spawning to close to middle of map .. ie; face .. spawned dead center couple of times.
perhaps a few settings for admins in some.ini?

with options like;

bSpawnDistanceMin=5.0
bSpawnDistanceMax=10.0
bMaxRadiusFromBase=33.33 //Percentage

also I think it spawns near light-source actors which causes the spawn on roof thing .. perhaps.
so maybe eliminate light-sources from spawn groups perhaps?

Keep up the good works

have temp removed it for now.. :\
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: there is a Random spawnpoint mutator available

Post by MrLoathsome »

Were you testing the last RC4 release or that test copy I sent you?
There should be a buffer zone in the center of the maps now.

Have a note here to adjust players view rotation so they wont be staring at a wall when they
spawn, but haven't tracked down the best way to do that yet....

Still fine tuning some details such has how close players might spawn to each other.

There is such a wide variety in maps, size, how close bases are to each other etc, that I can't
really put options such as you listed in an ini file. Fixed values like that might work great on one map
but then will break things in the next.

Those need to be calculated at runtime for each map.
blarg
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: there is a Random spawnpoint mutator available

Post by Wises »

this is the version you sent bro :)

ahh yep understand. weplay a lot of small - medium DM Maps.. mainly .. like all the vanilla ones in UT.. acually I lie heres the list of maps we play lol

Deck-16
Agony
liandri
Veridian tourny (one of the BP's)
Curse
1v1frenzy
1v1davidM

^thats about it really .. then on the odd occasion other maps.. but atm we're tryning to bring old-skoolers back .. so keep it kinda vanilla ..

also the Mutate thing.. any updates on how this can be controlled..? This one I think would def need a bMutateRelocate=True in the .ini I think.
as for other things like player radius spawning etc.. how about start at 512uu unless there is no room then anywhere.. for when there are alot of players on the map

one way to test could be like veridian tourny .. add 12-16 bots and just spec them :)

appended..

thinking lower the spawn radius for ctf games.. but also allow use of Playerstarts.. as mappers may want to spawn players in funny spots and can do so.
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: there is a Random spawnpoint mutator available

Post by Wises »

how we going with this mate ?

have had alot of games so far and it all seems to go pretty well.

only negative feedback from 1 or 2 players was.. Spawning in front of others in mid-fight.. and the occasional spawning of players outside of the box.
the later I personally like and have no problem with.. as too me that is a cool feature of RSL ^_^ kinda like some of the glitches you find in epic maps like the wall hacks in curse or the hall-of-mirrors on phobos stairs and Liandri upper-door-way.

not too mention all the little buggy thinggies on face classic.. :)

anyway.. regarding the relocate thing.. as an admin I would like to more control over that and some settings would be appreciated. for example how many times it can be used per match.. and an easier way of accessing it , ie; !relocate or !respawn along with mutate relocate , mutate respawn for "keybinds"
in terms of settings ... I think ... 'Round-Based' number of uses.. [1-99]

This needs to be put into place to avoid abuse.. and currently is exploitable.

also.. some kind of customisable message to display mid screen if/when players use the relocate function.
to alert others of the fact that player relocate.. save WTF's later.

so in all the current list of problems / feature requests to complete this mod would be as follows;

1.) Spawning distance between players with MinDistanceSetting= ~(not sure if you can do this but have DefaultPlayerStartOveride=Bool , incase some mapper deliberatly wanted players to spawn next to each other)
2.) Ability to Limit and/or turn off Relocation feature with NumRelocates=0/1/99
2a.) Customised Message when player Relocates/Spawns... "Player1 had to Relocate due to sticky circumstances"
3.) additional "say !relocate" / "say !respawn" cmds for the not so smart players.. and lazy admins like self.

that about covers it.
:gj:
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: there is a Random spawnpoint mutator available

Post by MrLoathsome »

Wises wrote:how we going with this mate ?

have had alot of games so far and it all seems to go pretty well.

only negative feedback from 1 or 2 players was.. Spawning in front of others in mid-fight.. and the occasional spawning of players outside of the box.
the later I personally like and have no problem with.. as too me that is a cool feature of RSL ^_^ kinda like some of the glitches you find in epic maps like the wall hacks in curse or the hall-of-mirrors on phobos stairs and Liandri upper-door-way.

3.) additional "say !relocate" / "say !respawn" cmds for the not so smart players.. and lazy admins like self.
It is coming along fairly well. I am still testing it out, and got sidetracked a bit by another project..... :shock:

Good feedback. I have notes to make the next release of this spawn players farther away from others if possible, and may add a check to
make sure you are not spawning near a projectile.

Will be adding a few config variables so you will be able to tweak it a bit. So you can either have the mutate relocate command active
the whole game, or off, or restrict it to x number of uses per match. Will probably only have it broadcast a message, if you have it set
for x number of uses. Will probably add an option to enable or disable Mutate Relocate in spectator mode.

Re: #3

You can use the Mutate Relocate command several ways.
1. Hit Tab and type Mutate Relocate.
2. Hit the ` key that is next to the 1 and above Tab and type Mutate Relocate.
3. Press your regular Talk key, and hit backspace 4 times to clear the "Say " and type Mutate Relocate.
3. Bind a key to Mutate Relocate. (Recommended method.)

I guess I just fail to understand why using a !cmd thingy is so much better.
Looked at the code you posted, and I could easily make that work with this thing,
but why would I want to add that much extra code to duplicate a function that is already there?
The current Mutate function in RSL consists of 3 if statements....

If you have players that can't figure out how to use Mutate Relocate, I have to wonder
who is turning on their computers for them...... :noidea :lol2:

Going to jump back on this as soon as I get this other thing ready for first release.

Re: The other thing.

I have made some progress the last few days in making the monsters play Domination.
Without any new scriptedpawn or monster classes. Just poking at the default values for
the default monsters right in the default scriptedpawn class.

Just did a test 15 minutes ago, where I setup Domination game with me on Red, 1 bot on
Blue, and 4 monsters on Gold. (Pupae, Skaarj, Krall, and Mercenary)

I just spectated, and watched the 4 monsters beat the bot several games in a row. :rock:

Something nifty is on the way...... 8)
blarg
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: there is a Random spawnpoint mutator available

Post by Wises »

I guess I just fail to understand why using a !cmd thingy is so much better.
Looked at the code you posted, and I could easily make that work with this thing,
but why would I want to add that much extra code to duplicate a function that is already there?
The current Mutate function in RSL consists of 3 if statements....
for simplicity's sakes.. friend.. that is why

some times we try to cater for the total newby. not always the veteran.. in saying that the veterans I know have trouble finding their install folders.. so.. ^^

to give you an example I had input into a much used mod called SendTo.. which utilises custom !cmds which can send players to websites or servers.. shame it couldn't execute cmds as well but didn't think of that in the beginning or it probably would have..

it is used on just about every server Ive been on and works really well. And players are picking up on it .

however .. your choice.. cant see how a couple of lines would and any stress to it.. but yer.. well.
shall wait and see I guess. I have noticed that you have gone off on a tangent.. so we shall see what happens.

also just to point out a few other things , players are still spawning facing into walls and stuff..
Post Reply