-
Member Statistics
-
Who's Online 12 Members, 0 Anonymous, 378 Guests (See full list)
-
New Topics
-
2790 The Ultimate Question!
-
1. Which is better: pancakes or waffles?
-
PANCAKES
-
WAFFLES
-
- Please sign in or register to vote in this poll.
- View topic
-
-
Posts
-
Você é O CARA! Valeu maninhooo, eu tenho um server que ta crescendo rapido (US), queria saber se vc faz parte de alguma comunidade ou grupo que troca idea sobre servers, dahsboards etc? Eu criei os meus e queria compartilhar com pessoal que tem server tbm e pegar idea de novos. Muito Obrigado!
-
By JemersonBarros · Posted
I've mada a patch to bring back the code of 42.18, removing the limiters that was inserted on 42.19 to cull zombies, i've made on Brazilian Portuguese, you can translate the comments if wanna understand. Need to save it as .ps1 file, it is a powershell, need to run on root folder of dedicated server, where the /java/ folder is located and startserver64.bat it is self explananed, just nullify the insertion that was made on the class and was absent on patch notes. <# .SYNOPSIS Reverte o cull server-side de zumbis adicionado na Build 42.19. .DESCRIPTION Mudanca na 42.19: MovingObjectUpdateScheduler.postupdate() passou a chamar ZombieCountOptimiser.deleteZombies() a cada frame no servidor dedicado, reduzindo a populacao de zumbis de ~5000 para ~400 em servidores com muitos players conectados. Na 42.18 esse cull nao existia no servidor - o codigo era client-side only. O patch substitui os 9 bytes do cull por NOPs: B2 00 2F getstatic GameServer.server 99 00 06 ifeq 9 B8 00 D7 invokestatic ZombieCountOptimiser.deleteZombies() -> 00 00 00 00 00 00 00 00 00 (9 x nop) Resultado: postupdate() comportamento igual ao da 42.18. Patch binario in-place (mesmo tamanho). Idempotente. .PARAMETER JarPath Caminho do jar. Default: java\projectzomboid.jar (relativo ao CWD). .EXAMPLE .\patch-zombie-nocull.ps1 .\patch-zombie-nocull.ps1 -JarPath "D:\pz\java\projectzomboid.jar" #> [CmdletBinding()] param( [string]$JarPath = "java\projectzomboid.jar" ) $ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest if (-not (Test-Path -LiteralPath $JarPath)) { throw "Jar nao encontrado: $JarPath (rode o script na raiz do servidor PZ, onde existe a pasta 'java\')" } $JarPath = (Resolve-Path -LiteralPath $JarPath).Path $stamp = Get-Date -Format 'yyyyMMdd-HHmmss' $backup = "$JarPath.bak.$stamp" Copy-Item -LiteralPath $JarPath -Destination $backup -Force Write-Host "Backup: $backup" Add-Type -AssemblyName System.IO.Compression | Out-Null Add-Type -AssemblyName System.IO.Compression.FileSystem | Out-Null function Find-BytePattern { param( [Parameter(Mandatory)][byte[]]$Haystack, [Parameter(Mandatory)][string]$HexPattern ) $tokens = @($HexPattern -split '\s+' | Where-Object { $_ }) $len = $tokens.Length $bytePat = New-Object 'int[]' $len for ($k = 0; $k -lt $len; $k++) { if ($tokens[$k] -eq '??') { $bytePat[$k] = -1 } else { $bytePat[$k] = [Convert]::ToInt32($tokens[$k], 16) } } $end = $Haystack.Length - $len for ($i = 0; $i -le $end; $i++) { $ok = $true for ($j = 0; $j -lt $len; $j++) { if ($bytePat[$j] -ne -1 -and $Haystack[$i + $j] -ne $bytePat[$j]) { $ok = $false; break } } if ($ok) { return $i } } return -1 } function Update-JarEntry { param( [Parameter(Mandatory)][string]$Jar, [Parameter(Mandatory)][string]$Entry, [Parameter(Mandatory)][scriptblock]$Mutator ) $zip = [System.IO.Compression.ZipFile]::Open($Jar, [System.IO.Compression.ZipArchiveMode]::Update) try { $e = $zip.GetEntry($Entry) if ($null -eq $e) { throw "Entrada nao encontrada no jar: $Entry" } $bytes = $null $is = $e.Open() try { $ms = New-Object System.IO.MemoryStream try { $is.CopyTo($ms); $bytes = $ms.ToArray() } finally { $ms.Dispose() } } finally { $is.Dispose() } $result = & $Mutator $bytes $patched = [byte[]]$result if ($null -eq $patched) { throw "Mutator devolveu null para $Entry" } if ($patched.Length -ne $bytes.Length) { throw "Mutator alterou tamanho ($($bytes.Length) -> $($patched.Length)) - invalido." } $e.Delete() $ne = $zip.CreateEntry($Entry, [System.IO.Compression.CompressionLevel]::Optimal) $os = $ne.Open() try { $os.Write($patched, 0, $patched.Length) } finally { $os.Dispose() } } finally { $zip.Dispose() } } # Patch: MovingObjectUpdateScheduler.postupdate() # # 42.19 adicionou no inicio do metodo: # B2 00 2F getstatic GameServer.server:Z # 99 00 06 ifeq 9 (se nao for server, pula) # B8 00 D7 invokestatic ZombieCountOptimiser.deleteZombies() # # Padrao unico (9 bytes): B2 00 2F 99 00 06 B8 00 D7 # Patch: substituir por 9 NOPs (00 x 9) # # Nao aplicavel a builds anteriores a 42.19 (padrao nao existe). # $patchNoCull = { param([byte[]]$b) $searchHex = 'B2 00 2F 99 00 06 B8 00 D7' $patchedHex = '00 00 00 00 00 00 00 00 00' $idxAlready = Find-BytePattern -Haystack $b -HexPattern $patchedHex # padrao patchado e identico a muitos NOPs, nao e confiavel checar assim # checar pelo searchHex diretamente $idx = Find-BytePattern -Haystack $b -HexPattern $searchHex if ($idx -lt 0) { # pode ja estar patchado ou ser build diferente de 42.19 Write-Warning " Padrao nao encontrado - build pode ser diferente de 42.19 ou patch ja aplicado." return ,$b } for ($i = 0; $i -lt 9; $i++) { $b[$idx + $i] = 0x00 # nop } Write-Host (" Patch aplicado em offset {0}: deleteZombies() -> 9x nop." -f $idx) return ,$b } Write-Host "Aplicando patch em $JarPath ..." Update-JarEntry -Jar $JarPath -Entry 'zombie/MovingObjectUpdateScheduler.class' -Mutator $patchNoCull Write-Host "" Write-Host "Concluido. Reinicie o servidor (StartServer64.bat) para aplicar." Write-Host "Backup do jar original: $backup" it mades a backup on the jar file too. was made for windows machines. -
Hey another black cat! Its an Open Source Dashboard? If yes, do you have the link? Many thx <3
-
BUILD 41.78.19 I have been for the last couple days trying to do a "simple" script that basically as soon as the player's character spawns their inventory gets removed. But I've not made it work. I was thinking maybe how things are made don't allow for this kind of possibilities? I've read other solutions like doing it as admin from in-game but that's just not realistically possible. I want to automate it so as soon as anyone enters the world with a new character, their character starts with a clean inventory so the customization advantage of the character customization screen doesn't count and everyone is at the same base level. any ideas? maybe I am too dumb and just don't know how to do it but I don't feel it should be that hard... This is one of the tries, I've reformed this so much and tried many things. local function stripPlayerClothes(playerIndex, player) local items = player:getWornItems() local itemKeys = {} for i = 0, items:size() - 1 do table.insert(itemKeys, items:getLocation(i)) end for _, location in ipairs(itemKeys) do player:removeWornItem(player:getWornItem(location)) end end Events.OnCreatePlayer.Add(stripPlayerClothes)
-
[42.17] Controller Concurrency bug: the character stumbling and pushing air with no controller inputHeya. Big thanks on a comprehensive report and ways to fix it. I appreciate it. ☺️🙌 Just wanna let you know it hasn't been forgotten. It's been on my list for a while. Sorry it's taken so long to get to. A bunch of critical tasks kept piling up. Getting on top of most of it now and feels like I'm finally coming up for air. 😔 With the CharacterInputComponent and CharacterJoypadButton/AxisBindings now re-worked, the input handling code no longer scattered all over the place, the Keyboard no longer fighting the Gamepad, and the Gamepad fully customizable at last. I am now digging through to the next layer down, the ControllerState. Hoping to add support for more buttons and axes for different controllers, like the Steamdeck. Buuut first, I wanna make sure we stomp any lurking gremlins, like this race condition we have here. ☺️
-