Jump to content

Hugo Qwerty

Member
  • Posts

    324
  • Joined

  • Last visited

Everything posted by Hugo Qwerty

  1. Try this: require "RenameContainers/ISInventoryPage" local original_onRenameContainerClick = ISInventoryPage.onRenameContainerClick function ISInventoryPage:onRenameContainerClick(button, inventory) original_onRenameContainerClick(self, button, inventory) -- Any code here never runs. end The require will make sure the mod's file loads before your mod, which may or may not be the issue.
  2. I don't think any change is needed. I like doing Zero to Hero, 30 free traits points (from Obese, Unfit, & Weak) but it takes a long time to get your fitness & strength up. If levelling up was faster it would remove the challenge.
  3. You might have more luck on the PZ Modding Community Discord: https://discord.gg/V9RAwGSc There's a 'Commisions & Requests' section.
  4. Traps don't take the whole item (with the exception of worms), they take 5 hunger units from the item. You can take the bait out of the trap and have two items, but no more hunger units than you had to begin with.
  5. LOL. Spears are without doubt he best weapon in the game at killing large numbers of zombies. Yes, if you don't have enough experience they can absolutely get you killed - but when you know when to use them, and more importantly when not to, then they become so OP they are basically broken (given how easy they are to make, and how often zombies provide the weapons to make them with).
  6. Hugo Qwerty

    One Door OpenZ

    I'd be more than happy if smithing takes ages to level, e.g make us hunt a deer to get an antler, to make an antler pickaxe to mine copper, to make a copper pickaxe to mine tin, to combine with copper to make a bronze pickaxe to mine iron etc. Also, I'd love it if: 1) zombies have less impaled weapons over time, so you have to loot / craft your own. 2) Basic crafted weapons were terrible (stone hammer is bad, stone axe is good, crafted spear is geat - no matter how much Reddit says otherwise).
  7. With very few exceptions (e.g. the open car door visual bug) taking damage from a zombie is a skill issue. The people that can survive for over a year aren't lucky, they're just good at the game. Armour helps to protect you from damage, but its not going to save you if you keep making mistakes - and it may even hinder you as it can make you overheat.
  8. The following is the function CalcAttackVars referred to in the error, decompiled with decompiler.com. public void CalcAttackVars(IsoLivingCharacter var1, AttackVars var2) { HandWeapon var3 = (HandWeapon)Type.tryCastTo(var1.getPrimaryHandItem(), HandWeapon.class); if (var3 != null && var3.getOtherHandRequire() != null) { InventoryItem var4 = var1.getSecondaryHandItem(); if (var4 == null || !var4.getType().equals(var3.getOtherHandRequire())) { var3 = null; } } if (!GameClient.bClient || var1.isLocal()) { boolean var13 = var1.isAttackAnim() || var1.getVariableBoolean("ShoveAnim") || var1.getVariableBoolean("StompAnim"); var2.setWeapon(var3 == null ? var1.bareHands : var3); var2.targetOnGround.setMovingObject((IsoMovingObject)null); var2.bAimAtFloor = false; var2.bCloseKill = false; var2.bDoShove = var1.bDoShove; if (!var13) { var1.setVariable("ShoveAimX", 0.5F); var1.setVariable("ShoveAimY", 1.0F); if (var2.bDoShove && var1.getVariableBoolean("isMoving")) { var1.setVariable("ShoveAim", true); } else { var1.setVariable("ShoveAim", false); } } var2.useChargeDelta = var1.useChargeDelta; var2.recoilDelay = 0; if (var2.getWeapon(var1) == var1.bareHands || var2.bDoShove || var1.isForceShove()) { var2.bDoShove = true; var2.bAimAtFloor = false; var2.setWeapon(var1.bareHands); } this.calcValidTargets(var1, var2.getWeapon(var1), true, var2.targetsProne, var2.targetsStanding); HitInfo var5 = var2.targetsStanding.isEmpty() ? null : (HitInfo)var2.targetsStanding.get(0); HitInfo var6 = var2.targetsProne.isEmpty() ? null : (HitInfo)var2.targetsProne.get(0); if (this.isProneTargetBetter(var1, var5, var6)) { var5 = null; } if (!var13) { var1.setAimAtFloor(false); } float var7 = Float.MAX_VALUE; if (var5 != null) { if (!var13) { var1.setAimAtFloor(false); } var2.bAimAtFloor = false; var2.targetOnGround.setMovingObject((IsoMovingObject)null); var7 = var5.distSq; } else if (var6 != null && (Core.OptionAutoProneAtk || var1.bDoShove)) { if (!var13) { var1.setAimAtFloor(true); } var2.bAimAtFloor = true; var2.targetOnGround.setMovingObject(var6.getObject()); } if (!(var7 >= var2.getWeapon(var1).getMinRange() * var2.getWeapon(var1).getMinRange()) && (var5 == null || !this.isWindowBetween(var1, var5.getObject()))) { if (var1.getStats().NumChasingZombies <= 1 && WeaponType.getWeaponType(var1) == WeaponType.knife) { var2.bCloseKill = true; return; } var2.bDoShove = true; IsoPlayer var8 = (IsoPlayer)Type.tryCastTo(var1, IsoPlayer.class); if (var8 != null && !var8.isAuthorizeShoveStomp()) { var2.bDoShove = false; } var2.bAimAtFloor = false; if (var1.bareHands.getSwingAnim() != null) { var2.useChargeDelta = 3.0F; } } int var14 = Core.getInstance().getKey("ManualFloorAtk"); int var9 = Core.getInstance().getKey("Sprint"); boolean var10 = var1.getVariableBoolean("StartedAttackWhileSprinting"); if (Keyboard.isKeyDown(var14) && (var14 != var9 || !var10)) { var2.bAimAtFloor = true; var2.bDoShove = false; var1.setDoShove(false); } if (var2.getWeapon(var1).isRanged()) { int var11 = var2.getWeapon(var1).getRecoilDelay(); Float var12 = (float)var11 * (1.0F - (float)var1.getPerkLevel(Perks.Aiming) / 30.0F); var2.recoilDelay = var12.intValue(); var1.setVariable("singleShootSpeed", (0.8F + (float)var1.getPerkLevel(Perks.Aiming) / 10.0F) * GameTime.getAnimSpeedFix()); } } } It looks like the issue is that var1.bareHands is null, so calling null.getSwingAnim() is causing the crash. I know the game has a 'bare hands' weapon, I assume this is the 'weapon' you have equipped when you have no weapon equipped - not sure how this could ever be null but that seems to be what is happening.
  9. https://github.com/demiurgeQuantified/PZEventDoc/blob/develop/docs/Events.md
  10. I don't think you can have a server only mod, but you can make a mod that works on a server and does nothing client side. My 'Daily Kill Count' (on the Steam workshop) has code for writing to a file, I borrowed some code from the Twitch Stats mod by M3ss. https://steamcommunity.com/sharedfiles/filedetails/?id=2629062026&searchtext=twitch+stats File is created in C:\Users\username\Zomboid\Lua\, I don't know if there is a way of writing to a file somewhere else.
  11. Just tested this and the only wardrobe I found in ~20 houses that had something in was in a child's bedroom (loot table WardrobeChild, I assume). All the others were empty, it felt like more bedside tables than normal were empty as well.
  12. I noticed this in my current game (Zero to Hero, unfit & obese, so fitness of 0). I placed chairs at the distance from my base where I got the endurance moodle when running, however when I lost obese and gained overweight the distance I could run went down rather than up. Tested in debug mode to confirm: At full endurance, but 0 fitness & unfit, this is how far I could run with obese and overweight.
  13. It looks like one of your mods is throwing errors (just visible in the bottom right). Your console file (C:\Users\Username\Zomboid\console.txt) might shed some light on the cause.
  14. By default recipes (but not evolved recipes) don't accept rotten or frozen food (or broken items), so I assume this is also impacting on stale items (possibly because IsRotten() returns true for stale itemsn not just rotten items.
  15. Can't see what's wrong, but an easier way to do this might be to overwrite the Toothpaste item in a script file so it is a Food item instead of Normal - then it wouldn't need any code to work.
  16. This mod adds that feature back: https://steamcommunity.com/sharedfiles/filedetails/?id=2609849923 When I installed it all my previous settings were already there.
  17. A compass is being added in Build 42.
  18. \steamapps\common\ProjectZomboid\media\lua\server\RainBarrel\BuildingObjects\RainCollectorBarrel.lua, lines 10 to 12 Changing line 12 to the following should work: RainCollectorBarrel.largeWaterMax = 10000
  19. You can loop through the items within the OnCreate function. Something like: function MakeTheThing(items, result, player) for i=0, items:getSize()-1, do local item = items:get(i) --do something with item end end item:getReplaceOnUse() will give you the "BeerEmpty" for BeerBottle items (I assume, not tested it).
  20. Do those tags (Wine2, Wine, & Beer) exist? You'd need to create them, as they aren't vanilla. It would probably be easier to loop through all items to check for type Food with isAlcoholic() returns true. That said, I don't think you can do what you're trying - when I looked into doing something similar the game would insist that all 5 items be of the same type. I've seen some mods try to get around it by adding the same item on a new line in the recipe, but then the game gets confused and will let you use the same item to satisfy both lines - so you can craft the recipe but you get nothing because you don't actually have enough of the item.
  21. It looks to be caused by an item with the id: Base.Rusty. That's not an item from the base game, if you know which mod has added that you might want to try removing the mod to see if that fixes it.
  22. You might want to look at: https://zomboid-javadoc.com/41.78/zombie/characters/IsoGameCharacter.html#setHaloNote(java.lang.String) or https://zomboid-javadoc.com/41.78/zombie/characters/IsoGameCharacter.html#Say(java.lang.String) You could use these within a custom OnCreate function, bBoth let you show text above a player's head.
  23. If you make the ingredients be of type Drainable, you can then use the ReplaceOnDeplete value to set what they become when they have been used. If the items are all to hold a single use, then just set the UseDelta to 1.
  24. Try swapping the recipe result to Base.Bleach - if that works you will know its your mod causing the issue, if that also shows as non-poisonous then it could be a bug in the game. You could also try dropping PoisonDetectionLevel to zero to see if that has any impact - the name suggests the poison is only visible when some skill (cooking?) is at level 7 or above.
×
×
  • Create New...