PDA

View Full Version : !zspawn and auto respawn


SirCole
12-16-2009, 06:59
I had an issue arise after enabling auto respawn and I was blaming the plugin as the issue, as players ended up in a respawn loop.

After actually going in game and finding a map that would do it for me it came to my attention that it was not actually the plugin but infact the map. A fair few escape style zombie maps now do what they refer to as 'slaying the afkers' or one some maps the refer to it as 'something blowing up'

this means that once this has happened anyone who spawns in the normal spawn points or the are of the map now affected will die, once they die they respawn, and thus the loop starts.

disabling respawn on such maps is an easy out for the moment, but running a 64slot server I can only imagine people crying when they have to wait for a round to finish when it could take 10 mins..

My proposal solution is recoding the spawning aspect to not only be able to spawn to normal spawn points but to other points located in say a sql database of some sort.

it would be pointless if admins have to manually go through maps and find the locations but it would be good if they can open the zombie admin menu and save a location as a spawn location.

on the same not if sourcepawn allows it would be necessary for admins to be able to disable people from respawning to the maps default spawn points but instead the players only spawning to admin created spawn points.

I could imagine over time that people sharing their spawnpoint files it would not be long before we had a good database of usable ones for people to download as well.


Cole

Sandfly
12-16-2009, 07:11
Thanks for posting that Cole .. yes, the dreaded autospawn loop .. once caught in its grip, it is not released until end of that map.

Richard & Greyscale, this was the issue I was trying to explain ... it is a nasty piece of work ...

The only solution currently is to turn off Autospawn, which as Cole has said above, means a very long wait, especially on Escape maps for players, and lots of players are lost from the server for them being sick of waiting for a long map or similar to end.

Cole's suggestion as a fix seems a very good one - can you get back to us about this to see what might be possible? Cheers guys, speak soon! :)

SirCole
12-16-2009, 09:27
Okay I decided to do some extra research because I know I have seen the spawn functionality I was speaking of before in another plugin and it is BAILOPAN's DM plugin

http://forums.alliedmods.net/showthread.php?p=507959

the key part of Bailopan's respawn is this bit of configuration:

// Sets the CS:S DM spawn method.
// "none" -- Spawn at the normal map spawn points.
// "preset" -- Spawn at a random point from a config file.
// --
// Default: "preset"
cssdm_spawn_method "preset"

Because his plugin is written in modules I would install the feature to implement this but on our server we like the following setting that would not work if we used Bailopans plugin..

// Respawn player as a zombie. [Dependency: zr_respawn]
// Default: "1"
zr_respawn_team_zombie "0"

by doing this when a player dies as a zombie they respawn as a human, this means humans can essentially cure the infection by slaying the zombie.. it creates a more even playing field and a longer game which in a full server is a lot of fun..

by implementing bailopans plugin without recoding it I would not be able to do this as players that die a zombie will respawn as a zombie..





All in all I understand if this does not stand high, if so i will just get our coder to do a workaround for us. But I'm sure with Bailopans permission he would be happy to let you use the code quoting him, that is what it's open source for :)


Cole

Xoleum
12-16-2009, 11:51
Problem is with this that if people can respawn as humans, most zombies will just let themselves get killed to play as a human.

rhelgeby
12-16-2009, 14:22
That's a very good idea for a solution, and it must be handled in the ZR core because of team management of zombies/humans. But we gotta draw a line here since this feature doesn't really belong in ZR, but must be handled in ZR. A solution to this is to make a addon plugin just for ZR that implements this feature.

We gotta make a plan for this feature because I think it shouldn't be implemented directly, but through new concept in ZR I've been thinking of; game modes (normal, zombie riot, escape, etc.). This concept will make several changes in the plugin core to make it work better in each mode, so we should focus on a final 3.0 release before making such huge changes. I'm not discarding your idea, it's really good. We're most likely going to make it in a 3.1 release or something. If this is implemented right now it will just be a patch, and after a while ZR will be a big mess of patches. This stuff need careful planning so it's easier to implement new feautres in the future.

BAILOPANs plugin might help you solve the issue, but I don't know how well it will work with ZR because ZR need to to that zombie/human management properly. A simple solution to this is to make forwards in ZR so your coder can make a plugin compatible with ZR as a workaround while we're developing.

Don't give up on this idea, because Greyscale and I definitely have plans with ZR. We're aming to get out of beta and reach 3.0 first, then we can start make bigger features on 3.1 and newer.

Xoleum: We already have a solution for that problem. Lookup zr_respawn_team_zombie_world in the manual. It will respawn zombies if a zombie was killed by the map or physics world damage. By keeping manual suicide commands blocked I don't know any way to bypass this feature. Even reconnect and respawn won't help because we took care of that too. ^^

SirCole
12-16-2009, 18:28
Xoleum! I know what you mean but as rhelgeby says its pretty well handled in the plugin core and to add to that we find that most players enjoy been a zombie when its a bit more challenging. I've had my server running in this style for 1 and a half years or so.

rhelgeby,

as it comes to the best way to implement this I sort of get your idea, I already got our coder to patch a simple solution but I did notice it sort of bypasses the core's team management. I would be very happy if you gave me a heads up on what to get haza to look for in the ZR code to integrate this as a better 'patch' for our server in the mean time. Because all I'm after is the functionality of forcing users to respawn to set spawn points, and the ability to add and manage those which is already coded..

Anyway if you don't mind I wold appreciate if you were happy for me to get haza to PM you or something in regards to it:)

thanks,

Cole

Greyscale
12-16-2009, 20:17
The idea would be functional, but to me seems like a lot of work for a small fix. Having a separate database of spawn points is a bit excessive and would require more work to maintain and populate. As a coder, I am very lazy. I like to find the easiest way (for me) to solve a problem.

If the maps are killing people would it not be easier to just disable or destroy the entity that's killing the players?

rhelgeby
12-16-2009, 20:24
Yes, it's actually possible to delete certain entities in a map with Stripper:Source (by BAILOPAN) so you could erase the afk kill feature on that map. The map needs to be decompiled with vmex and analyzed to find the entity that kill players.

In my opinion a map shouldn't do player management, that's the server's job. :P

Greyscale
12-16-2009, 20:33
I agree with that one. Plugins do management.

We could make a small module to kill those entities in the plugin as well, it would be very simple. I'm thinking it would be a point_hurt entity.

SirCole
12-16-2009, 20:44
I agree with that one. Plugins do management.

We could make a small module to kill those entities in the plugin as well, it would be very simple. I'm thinking it would be a point_hurt entity.

If you could do that I would be more than grateful ZE mappers seem to take server management into their own hands and its annoying.

if its not something of high interest for you I can get our haza onto it, but as you guys do the zombie thing and he doesn't..

Greyscale
12-16-2009, 20:58
Haza can make a temporary fix for you guys. It's not zombie related all, just simply finding the entity that's killing players and deleting it. That can be done externally. But this is a simple enough feature that it will (99% likely) be in 3.0

SirCole
12-16-2009, 21:44
thanks :)

Xoleum
12-18-2009, 09:49
Xoleum: We already have a solution for that problem. Lookup zr_respawn_team_zombie_world in the manual. It will respawn zombies if a zombie was killed by the map or physics world damage. By keeping manual suicide commands blocked I don't know any way to bypass this feature. Even reconnect and respawn won't help because we took care of that too. ^^

I meant zombies letting themselves get killed by human guns, like just standing in front of them instead of trying to convert them.

rhelgeby
12-18-2009, 18:08
If they let humans kill them on purpose we can't make code that will detect that. At least it's not worth it. Admins watching the server is the solution.

Sandfly
12-18-2009, 20:41
Exactly ... what Mod exists that can take care of all less-than-desirable Human exploitative behaviour in game? ZERO!

That kind of situation should be monitored and dealt with at Server Admin level - or at least in servers than can claim any skill in administering player behaviour themselves ... certainly not lumped on the Senior Dev's head with respect to Zombie: Reloaded. :nono:

Xoleum
12-19-2009, 23:36
That was my whole point, it's not possible. Nothing else, no need to get worked up over it. :p

SirCole
12-20-2009, 22:37
I have a new light on the issue at hand I've been experiencing the problem on maps that try to end the round with a nuke, because the respawn plugin is so persistent even after round end it respawns say 10 times every player before the next round..

I realise I can increase the time before a player gets respawned but generally even if I set that for maps that are effected players will just bitch.

How hard is it for you to implement a !respawn command so players can select to respawn manually if enabled..

at the same time the option to have manual and auto respawn should be both on or one on and one off somehow in the configs..

rhelgeby
12-20-2009, 23:11
Players can already manually spawn with "!zspawn". You might need to configure the zspawn time limit and other settings: http://helgeby.no-ip.org/zrdev/manual/#3.17

SirCole
12-21-2009, 09:17
thats just referring to the chance that a player joins the game late.. would it allow a respawn again and again if I set the timer to unlimited?

rhelgeby
12-21-2009, 09:20
Yes. Maybe we could put a counter on it too, so you can limit number of respawns (even in combination with a time limit). I know this feature can be improved a little bit more. Tell us if you have more ideas.

SirCole
12-21-2009, 09:23
0 for unlimited? and thankyou :)

rhelgeby
12-21-2009, 11:49
Seems like there are some logic bugs in zspawn code about the time limit. It's not actually checking the time at all, just if a time limit is enabled or not. But I don't have time to make a fix now.

Greyscale
12-21-2009, 14:25
There's no fix to be made..

if (tZSpawn == INVALID_HANDLE) is the check.

tZSpawn is the handle to the timer that is started on round freeze end with zr_zspawn_timelimit_time as it's time. After it's callback has been called, tZSpawn is set to INVALID_HANDLE.

// Block is the time limit is up.
new bool:zspawntimelimit = GetConVarBool(g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT]);
if (zspawntimelimit)
{
// IF THIS PASSES THEN THE TIMELIMIT HAS EXPIRED.
if (tZSpawn == INVALID_HANDLE)
{
new zspawntimelimitzombie = GetConVarInt(g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT_ZOMBIE]);
switch(zspawntimelimitzombie)
{
case -1:
{
// Get timelimit
new Float:zspawntime = GetConVarFloat(g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT_TIME]);

// Tell client the timelimit for this command has expired.
TranslationPrintToChat(client, "ZSpawn timelimit", RoundToNearest(zspawntime));
return false;
}
case 0:
{
teamzombie = false;
}
case 1:
{
teamzombie = true;
}
}
}
}