Jump to content

Brybry

Member
  • Posts

    213
  • Joined

Reputation Activity

  1. Like
    Brybry got a reaction from TiTANSTORM in Web Public Server List/Browser   
    So, I made a public server/browser list that's compiled from the public server list and the steam API.
     
    You can see it at http://pz.archspace.org/
     
    If you do not want the bot to pull details from your server then add Robots=Disallow to your servertest.ini (or $servername.ini)
    You can also kick or ban the user PubServerBot from your server and it will eventually get removed. Optionally send me a message or post in this thread.
    Almost every server is actually flagged 'public' but a couple of popular servers weren't flagged and I was unsure if I should keep them or not.
    Post-steamworks integration the above no longer applies.
     
    You can click an active server and get more details including recent players, server options, mods, etc.
     
    The website is very much so an in-development product and mostly a learning exercise for node.js and jquery. It might blow up.
  2. Like
    Brybry got a reaction from Pudge in Some basics - generating random numbers and killing the player   
    for 1) try ZombRand I think it's 0 to max with max being exclusive (so for example 9 would return 0 to 8, or maybe 8.9999...I don't remember)
    not sure for the other though
    Edit:
    maybe try player:inflictWound(BodyLocation.Hand,1.0,false,10.0) or player:getBodyDamage():AddDamage(BodyDamage:ToIndex(BodyPartType.Hand_R), damage)or maybe something like player:getBodyDamage():DamageFromWeapon(InventoryItemFactory.createItem("Base.Shotgun")) if you flat out want to kill them then I think you'd want setOverallBodyHealth and/or setHealth
  3. Like
    Brybry got a reaction from MountainSage in Applying an XP Boost (not XP Multiplier) to a perk post-character creation   
    Alternate way to do it:
    -- This is magical.local __INTEGER_MAP__ = Trait.new("__INTEGER_MAP__", "__INTEGER_MAP__", 0, "__INTEGER_MAP__ Trait Not For Use", false, false);local function numberToInteger(num) if not num or type(num) ~= "number" then num = 0 end __INTEGER_MAP__:addXPBoost(Perks.None, num); local tempMap = transformIntoKahluaTable(__INTEGER_MAP__:getXPBoostMap()); return tempMap[Perks.None];endlocal function getXPForPerkLevel(perk, level) if not perk or not level then return 0 end local target = nil; for i = 0, PerkFactory.PerkList:size() - 1 do local info = PerkFactory.PerkList:get(i); if info:getType() == perk then target = info; break; end end if not target then return 0 end return target:getTotalXpForLevel(level);endfunction applyTraitBoostsToPlayer(player, traitName) if not player or not instanceof(player, "IsoPlayer") then print("Error in applyTraitBoostsToPlayer: invalid player = "..tostring(player)); return end -- Remove this bit if you do not want it if player:HasTrait(traitName) then print("Error in applyTraitBoostsToPlayer: player already has trait: "..tostring(traitName)); return; else player:getTraits():add(traitName); end if not traitName or type(traitName) ~= "string" then print("Error in applyTraitBoostsToPlayer: invalid traitName or player already has trait: "..tostring(traitName)); return end local trait = TraitFactory.getTrait(traitName); if not trait then print("Error in applyTraitBoostsToPlayer: trait "..tostring(traitName).." doesn't exist"); return end local playerBoostMap = player:getDescriptor():getXPBoostMap(); local traitBoostMap = transformIntoKahluaTable(trait:getXPBoostMap()); local xp = player:getXp(); for perk, value in pairs(traitBoostMap) do -- Add the appropriate value to xp boost based off of current value local oldBoost = playerBoostMap:get(perk); if not oldVal then oldBoost = 0; end local newBoost = value:intValue(); newBoost = math.min(3, oldBoost + newBoost); playerBoostMap:put(perk, numberToInteger(newBoost)); -- Level perk trait-value times and set appropriate experience local oldLevel = player:getPerkLevel(perk); local oldXP = xp:getXP(perk) - getXPForPerkLevel(perk, oldLevel); for i = 0, value:intValue()-1 do player:LevelPerk(perk); end xp:setXPToLevel(perk, player:getPerkLevel(perk)); xp:AddXPNoMultiplier(perk, oldXP); endend
  4. Like
    Brybry got a reaction from MountainSage in Applying an XP Boost (not XP Multiplier) to a perk post-character creation   
    I come bearing ugly presents
    function applyTraitBoostsToPlayer(player, traitName) if not player or not instanceof(player, "IsoPlayer") then print("Error in applyTraitToPlayer: invalid player = "..tostring(player)); return end if not traitName or type(traitName) ~= "string" or player:HasTrait(traitName) then print("Error in applyTraitToPlayer: invalid traitName or player already has trait: "..tostring(traitName)); return end local trait = TraitFactory.getTrait(traitName); if not trait then print("Error in applyTraitToPlayer: trait "..tostring(traitName).." doesn't exist"); return end -- Get existing perks from the player xpBoostMap for caching local xpBoostMap = transformIntoKahluaTable(player:getDescriptor():getXPBoostMap()); local cachedPerks = {}; -- Cache old perk/xp values and set the perk level to 0 for perk, value in pairs(xpBoostMap) do local oldValues = {}; oldValues.level = player:getPerkLevel(perk); local totalXP = player:getXp():getXP(perk); local levelXP = getXPForPerkLevel(perk, oldValues.level); oldValues.xp = totalXP - levelXP; -- Value here is actually java.lang.Integer so convert it oldValues.boost = value:intValue(); cachedPerks[perk] = oldValues; player:level0(perk); end -- Add trait to the player via applyTraits. This applies XP boost and appropriate levels local traitList = ArrayList.new(); traitList:add(traitName); player:applyTraits(traitList); -- Add back old perk levels and XP from cached values for perk, oldValues in pairs(cachedPerks) do local xp = player:getXp(); local curLevel = player:getPerkLevel(perk); local oldLevel = oldValues.level; local oldBoost = oldValues.boost; local targetLevel = oldLevel + curLevel - oldBoost; -- counteracts applyTraits() str/fit +5 if perk == Perks.Strength or perk == Perks.Fitness then targetLevel = targetLevel - 5; end if targetLevel > curLevel then for i = curLevel, targetLevel do player:LevelPerk(perk); end elseif targetLevel < curLevel then for i = curLevel, targetLevel+1, -1 do player:LoseLevel(perk); end end xp:setXPToLevel(perk, player:getPerkLevel(perk)); xp:AddXPNoMultiplier(perk, oldValues.xp); endendfunction getXPForPerkLevel(perk, level) if not perk or not level then return 0 end local target = nil; for i = 0, PerkFactory.PerkList:size() - 1 do local info = PerkFactory.PerkList:get(i); if info:getType() == perk then target = info; break; end end if not target then return 0 end return target:getTotalXpForLevel(level);end 
    Gist in case I update anything
     
    I might be able to do a cleaner method since it may be possible to use getXPBoostMap():put() if I can create (or clone) a java.lang.Integer object but I'll have to play with it to see if that will work out.
     
    If you only want the XP Boost but not the initial perk levels from the trait then set targetLevel = oldLevel and remove the strength/fitness offset bit.
  5. Like
    Brybry got a reaction from erlisbl in Can't setup server on Debian machine.[Solved   
    If you're pulling appid 108600 then you need to pull appid 380870 instead. The "Buying & Running the server" thread may be old and have out of date info.
     
    I think the full command is:
    steamcmd +login $username $password +force_install_dir ./install/path +app_update 380870 validate +quitwith -beta iwillbackupmysave -betapassword lookforthepasswordintheforums if you want the beta branch.
  6. Like
    Brybry got a reaction from EnigmaGrey in Web Public Server List/Browser   
    Yeah, sorry about that. There was a bug where I would lose connection to steam and stop updating.
     
    I'm going to give it a little love this coming week and improve the performance and add some filters. When I originally made it there weren't the 400(!) servers there are now.
  7. Like
    Brybry got a reaction from Aniketos in Server Not Responding   
    What I'm guessing is happening here is that the OP is trying to set up the server using the base game files and is setting up a non-steam server and then trying to connect to that with a steam enabled client.
    Follow the instructions in EG's link about downloading SteamCMD and grabbing appId 380870 and using that as that's the easy way to do it.
     
    With regards to ports: I don't think steam ports do need to be forwarded anymore. I'm going to write a wiki article on server setup and configuration eventually but as far as I can tell it only needs the game port and map data tcp ports forwarded still. At this time I'm unsure if the game port only needs udp still or if it wants udp and tcp.
     
    Steam port 1 is used to talk to steam and so does need to be able to bind and be allowed outbound access but it doesn't need anything inbound. Most setups allow outbound by default or else things like web browsing won't work for them.
    Steam port 2, as far as I can tell, is unused because I think that functionality (query port) is multiplexed into the game port (default 16261.)
     
    After all of the trouble people have been having with ports I'm thinking about how hard it would be to write a mod to put everything on one port TCP/UDP and use UPnP/STUN/TURN to handle forwarding.
  8. Like
    Brybry got a reaction from EnigmaGrey in Server Not Responding   
    What I'm guessing is happening here is that the OP is trying to set up the server using the base game files and is setting up a non-steam server and then trying to connect to that with a steam enabled client.
    Follow the instructions in EG's link about downloading SteamCMD and grabbing appId 380870 and using that as that's the easy way to do it.
     
    With regards to ports: I don't think steam ports do need to be forwarded anymore. I'm going to write a wiki article on server setup and configuration eventually but as far as I can tell it only needs the game port and map data tcp ports forwarded still. At this time I'm unsure if the game port only needs udp still or if it wants udp and tcp.
     
    Steam port 1 is used to talk to steam and so does need to be able to bind and be allowed outbound access but it doesn't need anything inbound. Most setups allow outbound by default or else things like web browsing won't work for them.
    Steam port 2, as far as I can tell, is unused because I think that functionality (query port) is multiplexed into the game port (default 16261.)
     
    After all of the trouble people have been having with ports I'm thinking about how hard it would be to write a mod to put everything on one port TCP/UDP and use UPnP/STUN/TURN to handle forwarding.
  9. Like
    Brybry got a reaction from ethanwdp in Looping through a table of all recipes   
    For efficiency you can do something like this:
    local recipes = getAllRecipes();local knownRecipes = getPlayer():getKnownRecipes();for i = 0, recipes:size()-1 do local recipe = recipes:get(i); if recipe:needToBeLearn() and not knownRecipes:contains(recipe:getOriginalname()) then knownRecipes:add(recipe:getOriginalname()); --print("Added Recipe ["..recipe:getOriginalname().."] from module "..recipe:getModule():getName()); endend
  10. Like
    Brybry got a reaction from ethanwdp in Looping through a table of all recipes   
    local recipes = getAllRecipes();
    for i = 0, recipes:size()-1 do
        local recipe = recipes:get(i);
        print("Recipe ["..recipe:getOriginalname().."] from module "..recipe:getModule():getName());
    end
  11. Like
    Brybry got a reaction from EnigmaGrey in Web Public Server List/Browser   
    Updated to support steam servers, look for the 'steam' icon.
    Server setting/options information doesn't currently work for steam servers but player and mod listing does.
  12. Like
    Brybry reacted to EasyPickins in RELEASED: IWBUMS 32.20   
    Valve just changed it so our anonymous server can access the Workshop.  However, the Workshop is currently only visible to "Customers & Developers", so the server can't access workshop items at the moment.  Once this build goes public, we'll set the Workshop to "Visible to everyone" which should allow the server to install workshop items.
     
    FYI WorshopItems=ID1;ID2;ID3 uses semicolons to list multiple items.
  13. Like
    Brybry reacted to RobertJohnson in RELEASED: IWBUMS 32.18   
    HOW DO I GET THIS?
    http://theindiestone.com/forums/index.php/topic/4183-iwbms-the-i-will-backup-my-save-branch/
     
    Hello guys!
     
    Sorry for the delay we're all been busy on lot of exciting stuff lately..
     
    Anyway, this update contains a few things:
    Health panel overhaul: damaged bodyparts are in a scrolling list. Added highlighting to the button-labels in MainScreen. Allow the EXIT button to be activated by the controller. Fixed zombies that are attacking getting pushed by other moving zombies. Also fixed the player getting pushed too much by zombies Unequip fishing net when placing it. Fixed calling sendObjectChange() in ISPlant when not on the server.   Fixed InventoryPane tooltips showing when another window is in front. Removed xeno-mods.com from list of valid mod URLs. (Issue #001960) Don't do the latestsave.ini for multiplayer game. [MP] Added KickFastPlayers server option. Don't kick players that were made invisible by an admin [MP] If NoFire is set on server, walls won't burn (from pipe bombs for example) [MP] Prevent copying a character (MP or SP) to another server
  14. Like
    Brybry got a reaction from EnigmaGrey in No one can connect to my server   
    It sounds like the IP is correct and UDP is working fine but TCP port forwarding isn't working right or something is blocking the TCP connections (or possibly the server is listening on IPv6 for TCP connections which won't work and is fixed with -Djava.net.preferIPv4Stack=True )
     
    Can you connect to your own server?
    Also, a paste of the full console log after startup might be helpful as if there are any errors then those can be telling as to what the issue might be.
     
    Example normal good connection in log:
    User admin is trying to connect.Connected new client admin ID # 0 and assigned DL port 16262testing TCP download port 16262client connected to TCP download port 16262 okExample connection where client never tries to connect on TCP:
    User foo is trying to connect.Connected new client foo ID # 0 and assigned DL port 16262testing TCP download port 16262TCP port test: accept() timed out, client will have to try againAlso: UDP is a stateless protocol so
    netstat -an |find /i "listening"won't work for udp.
    >netstat -an | find /i "1626" UDP 0.0.0.0:16261 *:*Is what I get on a running server with no clients connected.
    >netstat -an | find /i "1626" TCP 127.0.0.1:16262 127.0.0.1:32711 TIME_WAIT -- server TCP for map info to client #1 TCP 127.0.0.1:26982 127.0.0.1:16262 TIME_WAIT -- client TCP for map info from server UDP 0.0.0.0:16261 *:* -- server UDP for game info to all clientsIs one client connected (not shown is UDP 0.0.0.0:somerandomport for the client's UDP connection to the server.)
    In this case the client and server are on the same machine.
  15. Like
    Brybry got a reaction from mads232 in Windows 10   
    I've been running the same Windows 7 partition (profile hand migrated from a windows XP install from 2007) across multiple computers for 5 years without any meaningful slowdown. But I'm also not a typical user.
    I'm not going to update my desktop anytime soon but I've been playing with the insider program preview in a VM for a while.
     
    Windows 10 is a definite improvement on Windows 8 and makes the OS more like traditional Windows.
    The new start menu is probably better than the Windows 7 start menu if you have a lot of applications that you like to pin/favorite.
    The task and resource manager has more useful information even though the UI uses more space in some cases.
    They've finally caught up to linux of 15 years ago (and Windows XP with extensions) with multiple desktop support.
    The bootloader is better than the Windows 7 bootloader (though it's basically the windows 8 bootloader -- which was also better.)
    The new action/notification center has a lot of potential for centralizing app notifications.
    Conhost (the console) is improved so cmd.exe and powershell are better.
    Scheduled restarts (it can automatically schedule at time you don't use the computer) for windows updates is way better than the annoying behavior in Windows 7 and previous (I don't remember what it was like in Windows 8 as I rarely use Windows 8.) Still dumb that you have to restart for 99% of updates though.
     
    That said, it still has a lot of metro (or at least metro-inspired) apps that take up more space to display the same information for the sake of ease of use with touch interface devices.
    They change icons for the sake of change without actually making them meaningfully represent anything better, which is confusing for users.
    It has some dumbing down of features to make them easier for the average user. For example, Windows updates are pretty much entirely automatic without letting you pick and choose what updates you want. Sure, you can manually uninstall updates and then use a tool to hide those updates from getting reinstalled but this is a feature regression.
    I ran into various other small configuration regressions where the UI either didn't support the configuration option or it was moved to a place that I didn't know. I'm sure the registry settings haven't been removed for those options but, again, regression!
    Search is much improved so that is helpful in finding things but I usually turn off Windows Search on Win 7 systems because that is one of those features that usually doesn't scale well as a computer ages / the index size increases.
    I'm not a big fan of stuff like the Microsoft Store because that's another background process that I have to learn and disable because it's a feature that I just don't care about. Supposedly some services will automatically stop when they're no longer needed but I've yet to actually observe that happen.
     
    If you're running Windows 8 then I would upgrade but I don't see any meaningful reason to update from Windows 7 at this time.
  16. Like
    Brybry got a reaction from Svarog in Windows 10   
    I've been running the same Windows 7 partition (profile hand migrated from a windows XP install from 2007) across multiple computers for 5 years without any meaningful slowdown. But I'm also not a typical user.
    I'm not going to update my desktop anytime soon but I've been playing with the insider program preview in a VM for a while.
     
    Windows 10 is a definite improvement on Windows 8 and makes the OS more like traditional Windows.
    The new start menu is probably better than the Windows 7 start menu if you have a lot of applications that you like to pin/favorite.
    The task and resource manager has more useful information even though the UI uses more space in some cases.
    They've finally caught up to linux of 15 years ago (and Windows XP with extensions) with multiple desktop support.
    The bootloader is better than the Windows 7 bootloader (though it's basically the windows 8 bootloader -- which was also better.)
    The new action/notification center has a lot of potential for centralizing app notifications.
    Conhost (the console) is improved so cmd.exe and powershell are better.
    Scheduled restarts (it can automatically schedule at time you don't use the computer) for windows updates is way better than the annoying behavior in Windows 7 and previous (I don't remember what it was like in Windows 8 as I rarely use Windows 8.) Still dumb that you have to restart for 99% of updates though.
     
    That said, it still has a lot of metro (or at least metro-inspired) apps that take up more space to display the same information for the sake of ease of use with touch interface devices.
    They change icons for the sake of change without actually making them meaningfully represent anything better, which is confusing for users.
    It has some dumbing down of features to make them easier for the average user. For example, Windows updates are pretty much entirely automatic without letting you pick and choose what updates you want. Sure, you can manually uninstall updates and then use a tool to hide those updates from getting reinstalled but this is a feature regression.
    I ran into various other small configuration regressions where the UI either didn't support the configuration option or it was moved to a place that I didn't know. I'm sure the registry settings haven't been removed for those options but, again, regression!
    Search is much improved so that is helpful in finding things but I usually turn off Windows Search on Win 7 systems because that is one of those features that usually doesn't scale well as a computer ages / the index size increases.
    I'm not a big fan of stuff like the Microsoft Store because that's another background process that I have to learn and disable because it's a feature that I just don't care about. Supposedly some services will automatically stop when they're no longer needed but I've yet to actually observe that happen.
     
    If you're running Windows 8 then I would upgrade but I don't see any meaningful reason to update from Windows 7 at this time.
  17. Like
    Brybry got a reaction from Magic Mark in Easily Digestible List of Trait Balance Issues   
    Bump for this. Traits that do nothing probably shouldn't be there until they actually do something
  18. Like
    Brybry got a reaction from EnigmaGrey in Multiplayer randomly stopped working?   
    Make sure you and your friend are both on the same version of the game.
     
    Make sure your external (ISP) IP didn't change. Make sure your server's internal network IP didn't change if you're behind a router (as that would mess up the port forwarding.)
    I know you said you set up a static IP but I'm unsure if you mean that you set up a static IP with your ISP or for your server / computer on your local network or what.
     
    What message does your friend get when he tries to connect? Do you see his connection attempts in the server log?
    Can you connect to your own server from the external IP address?
  19. Like
    Brybry got a reaction from tehuster in Can't run ProjectZomboidServer   
    Don't run it as administrator, that'll cause issues.
     
    Your issue is probably some security or anti-virus software causing the "access is denied" message.
     
    It's unlikely, but possible, that you have weird permissions on your user's Temp folder but it's almost certainly anti-virus/security software.
    You can go to C:\Users\Thomas\AppData\Local\Temp\ and check the properties of sqlite-3.8.10.1-25f36d0f-ef17-4729-8206-d1f55b90a700-sqlitejdbc.dll and make sure it's not read only and that user "Thomas" has Full Control permissions.
     
    Optionally as a workaround you could replace "sqlite-jdbc-3.8.10.1.jar" in the server .bat with "sqlitejdbc-v056.jar" as I don't think that version uses the Temp directory.
    Also, what version of windows? And 32 or 64bit?
  20. Like
    Brybry reacted to J0hnm13 in Balanced sheet rope nerf?   
    A lot of people with build 32, including myself, have decided that a floating base with sheet ropes is good as hell, which it is. What if you couldn't climb a sheet rope if your character was at all over encumbered, exhausted, exerted, etc? Simply put, you need to be in good condition to climb. 
     
  21. Like
    Brybry got a reaction from ethanwdp in getFileWriter - relative / direct path (b32.3)   
    It's in both. It's actually been around since before build 28.
  22. Like
    Brybry got a reaction from JohannesMP in libstdc++6 error when trying to run dedicated server on debian 7.8   
    Yeah, the easiest (and best) solution is to install a 64bit jvm. You can certainly have multiple JVMs on the same machine.
     
    Typically the current system JVM is managed with update-alternatives
    If you look at > which java then it's likely in /usr/bin/java but that is probably just a symlink to /etc/alternatives/java which is itself a symlink to the location of the currently set system jvm via update-alternatives ( something like /usr/lib/jvm/jdk{version}/bin/java )
     
    So you can go ahead and install another JVM (openjdk or oracle, it doesn't really matter though 1.7 is the target java version for Project Zomboid.)
    If for whatever reason your default jvm gets unset from the current oracle 32bit then you can probably do sudo update-alternatives --config java to bring up a dialog and change it back.
     
    Anyway, once you have a second jvm installed you can edit projectzomboid-dedi-server.sh to point directly to that instead of using the java in path.
    Or, optionally, you could do something like:
    sudo update-alternatives --install "/usr/bin/java64" "java64" "/usr/lib/jvm/jdk1.7.0/bin/java" 1where jdk1.7.0 is an example path and then edit projectzomboid-dedi-server.sh
    XMODIFIERS= java \to
    XMODIFIERS= java64 \Also, you might want to rename projectzomboid-dedi-server.sh or make a copy and then run off of that because if it gets updated I think it'll reset your changes.
  23. Like
    Brybry got a reaction from meonfire in bring back water / electricity   
    PZServerSettings.exe in the steam game directory is a GUI application for setting those values / creating a sandbox vars file.
     
    I don't think you can permanently make it night without a mod. Maybe messing with the nightlengthmodifier setting could do it. Probably not though.
  24. Like
    Brybry got a reaction from meonfire in bring back water / electricity   
    You can also turn water/electricity back on by increasing the values in the sandbox vars.
     
    Something like:
    shutdown server
    edit servertest_SandboxVars.lua with the appropriate values:
    WaterShutModifier = 9999, ElecShutModifier = 9999,where 9999 is will be '9999 game days (actually nights) since server start until water shuts off.'
    start the server again.
     
    Then to turn it off again just set the values to 0.
  25. Like
    Brybry got a reaction from EnigmaGrey in bring back water / electricity   
    You can also turn water/electricity back on by increasing the values in the sandbox vars.
     
    Something like:
    shutdown server
    edit servertest_SandboxVars.lua with the appropriate values:
    WaterShutModifier = 9999, ElecShutModifier = 9999,where 9999 is will be '9999 game days (actually nights) since server start until water shuts off.'
    start the server again.
     
    Then to turn it off again just set the values to 0.
×
×
  • Create New...