-
Posts
52 -
Joined
-
Last visited
-
Days Won
12
Content Type
Profiles
Forums
Downloads
Gallery
Events
Posts posted by Vixda
-
-
-
I guess that there is a way to balance the team by code. Reading some forums I find this:
QuoteI have a code, it's a modification of omnibot "balanceteams" function, that makes always equal number of bots, so if you have 2 axis humans and 4 allies humans, and maxbots 12, teams would not be "6vs6", they would be 5vs7, so new players are forced to join the teams with less bots.
If you don't want to touch omnibot code (they recommend/ encourage not, but i didn't know another way to do it), then you just have to verify if it's bot, you can do it by making a function that check if first 7 characters of GUID is "OMNIBOT", and do nothing. If it's not "OMNIBOT", then add the clientnum to table. Also, check ping. If ping = 0, then exclude the bot. (I don't know how it works with people that really have 0 ping).
An example (untested) would be this:
modname = "balance" version = "0.1" function et_InitGame(levelTime,randomSeed,restart) et.RegisterModname(modname .. " " .. version) end unevenDiff = 2 max_unevenTime = 45 max_unevenDiff = 4 axisPlayers = {} alliedPlayers = {} unevenTime = 15 function isBot(clientNum) if et.gentity_get(clientNum,"ps.ping") == 0 then return true -- is Bot end end function et_RunFrame( levelTime ) local numAlliedPlayers = table.getn( alliedPlayers ) local numAxisPlayers = table.getn( axisPlayers ) if numAlliedPlayers >= numAxisPlayers + max_unevenDiff then local clientNum = alliedPlayers[ numAlliedPlayers ] et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. " r" ) et.G_globalSound("lua/playermove.wav") et.trap_SendServerCommand(-1, "chat \"balancing teams... " .. et.gentity_get( clientNum, "pers.netname" ) .. "^7 moved to ^1AXIS\"" ) elseif numAxisPlayers >= numAlliedPlayers + max_unevenDiff then local clientNum = axisPlayers[ numAxisPlayers ] et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. " b" ) et.G_globalSound("lua/playermove.wav") et.trap_SendServerCommand(-1, "chat \"balancing teams... " .. et.gentity_get( clientNum, "pers.netname" ) .. "^7 moved to ^4ALLIES\"" ) elseif numAlliedPlayers >= numAxisPlayers + unevenDiff then if unevenTime > 0 then if tonumber( levelTime ) - unevenTime >= max_unevenTime * 1000 then local clientNum = alliedPlayers[ numAlliedPlayers ] et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. " r" ) et.G_globalSound("lua/playermove.wav") et.trap_SendServerCommand(-1, "chat \"balancing teams... " .. et.gentity_get( clientNum, "pers.netname" ) .. "^7 moved to ^1AXIS\"" ) end else unevenTime = tonumber( levelTime ) end elseif numAxisPlayers >= numAlliedPlayers + unevenDiff then if unevenTime > 0 then if tonumber( levelTime ) - unevenTime >= max_unevenTime * 1000 then local clientNum = axisPlayers[ numAxisPlayers ] et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. " b" ) et.G_globalSound("lua/playermove.wav") et.trap_SendServerCommand(-1, "chat \"balancing teams... " .. et.gentity_get( clientNum, "pers.netname" ) .. "^7 moved to ^4ALLIES\"" ) end else unevenTime = tonumber( levelTime ) end else unevenTime = -1 end end function et_ClientSpawn( clientNum, revived, teamChange, restoreHealth ) if teamChange ~= 0 then local team = tonumber( et.gentity_get( clientNum, "sess.sessionTeam" ) ) -- these were the teamnumbers prior to the move local numAlliedPlayers = table.getn( alliedPlayers ) local numAxisPlayers = table.getn( axisPlayers ) if team == 1 then for i, num in ipairs( alliedPlayers ) do if num == clientNum then table.remove( alliedPlayers, i ) break end end -- this should not happen but still check for it to avoid doubles for i, num in ipairs( axisPlayers ) do if num == clientNum then return end end -- make sure a player who (got) moved when teams were uneven doesn't get moved right back if numAlliedPlayers >= numAxisPlayers + unevenDiff then table.insert( axisPlayers, 1, clientNum ) else if isBot(clientNum) then --do nothing else table.insert( axisPlayers, clientNum ) end end elseif team == 2 then for i, num in ipairs( axisPlayers ) do if num == clientNum then table.remove( axisPlayers, i ) break end end for i, num in ipairs( alliedPlayers ) do if num == clientNum then return end end if numAxisPlayers >= numAlliedPlayers + unevenDiff then table.insert( alliedPlayers, 1, clientNum ) else if isBot(clientNum) then --do nothing else table.insert( alliedPlayers, clientNum ) end end else for i, num in ipairs( alliedPlayers ) do if num == clientNum then table.remove( alliedPlayers, i ) return end end for i, num in ipairs( axisPlayers ) do if num == clientNum then table.remove( axisPlayers, i ) return end end end end end function et_ClientDisconnect( clientNum ) for i, num in ipairs( alliedPlayers ) do if num == clientNum then table.remove( alliedPlayers, i ) return end end for i, num in ipairs( axisPlayers ) do if num == clientNum then table.remove( axisPlayers, i ) return end end end
- 1
- 2
-
Thanks everyone, hope to play and have fun with everyone
- 1
-
I have never talked to Darkshot but last week I complained with massive about the rushing in Adlernest map. I think we shoud use an antirush that obliges the allies team to explode the box at the begging before obtaining the papers. The two maps I've seen that needs an antirushing is that one and Fuel dump
-
I usually prefer the attacking side but I would like to have more maps where the Germans are the attackers ( I've just seen 2, the western map and the egyptian). I will try to play more in the German side
- 4
-
His channel is one of my favorites in youtube. I guess my favorite episode is the castlevania marathon
-
Sorry, where are the tags Kate? xd
-
invitation from : Kate
In-game name: Vixda
Previous gaming aliases: lobitozxc, vixda (I don't remember if I have used the Anysoul name in ET)
Previous clans: No
Age: 26
What country are you from?: Colombia
What languages do you speak?: English, Spanish, French
Do you use a translator to post in English? No
How did you find our community?: I have seen the messages in the server and Kate told me about the server the last week
Do you have any admin experience?: No
Will you be able to help in recruiting new members?: Yeah, I'll try
Do you have any special expertise (coding, modding, Photoshop, etc.)?: A little of coding
Tell us about yourself (optional): Well... I have recently graduated from electronical engineering and I'm improving my programming skills. I draw in my freetimes and I like to watch anime sometimes
Playing regulary on our server and collected at least ~100k XP
Do you agree with the rules : Yes
- 2
Logo for ETS clan T-shirt
in Discussions related to ET
Posted
Or even better, I found the wolfenstein's font and maybe with that we can put even our names with wolfenstein's font
Here is the font https://fontmeme.com/fuentes/fuente-wolfenstein/