Jump to content

Tiax

Member
  • Posts

    22
  • Joined

  • Last visited

Everything posted by Tiax

  1. Yeah but maybe just put the regular texture, not this
  2. Rotten fish is missing textures, e.g. "WorldItems/PikeRotten" (while "Cooked" and "Burned" exist).
  3. Update 41.70 changed it to stop, once the first stack is full. So it's "Consolidate Until First Full" now
  4. I put this on the workshop, until officially addressed: https://steamcommunity.com/sharedfiles/filedetails/?id=2802925854
  5. The rest action is in the lua files. For the sitting on ground, for comparison, you'll have to dig a little deeper into the java classes. I'll add the formulas/code snippets here, when home. I do agree though: the current system is not really intuitive from a game logic perspective (cold floor > comfy sofa). Edit: -- lua\client\TimedActions\ISRestAction.lua:13 -- note: self.mul = 2 function ISRestAction:update() if self.character then local endurance = self.character:getStats():getEndurance() + ((ZomboidGlobals.ImobileEnduranceIncrease * self.character:getRecoveryMod() * self.mul) * getGameTime():getMultiplier()) if endurance > 1 then endurance = 1 end if endurance < 0 then endurance = 0 end self.character:getStats():setEndurance(endurance) self.character:setMetabolicTarget(Metabolics.SeatedResting); end end // IsoPlayer.java:2800 // Note: public static double SittingEnduranceMultiplier = 5.0D; private void updateEndurance(float var1) { Stats var10000; float var2; if (this.isSitOnGround()) { var2 = (float)ZomboidGlobals.SittingEnduranceMultiplier; var2 *= 1.0F - this.stats.fatigue; var2 *= GameTime.instance.getMultiplier(); var10000 = this.stats; var10000.endurance = (float)((double)var10000.endurance + ZomboidGlobals.ImobileEnduranceReduce * SandboxOptions.instance.getEnduranceRegenMultiplier() * (double)this.getRecoveryMod() * (double)var2); this.stats.endurance = PZMath.clamp(this.stats.endurance, 0.0F, 1.0F); } // rest omitted }
  6. "Too much" in comparison to what? Looking at the code, sitting on ground has a 5x multiplier and is same as sitting in a car. Using the "Rest" action on furniture only has a 2x multiplier (and also seems to ignore Sandbox settings and fatigue for recovery). If anything, the "Rest" action recovers too little. Probably because you can combine the two, which is an odd concept by itself - they should be mutually exclusive, with resting giving a bonus over ground.
  7. I love how this feature is finally in, but for the love of god please make it perform any partial progress, when the action is not fully completed. If you consolidate hundreds of threads, this action can take literal ingame hours and if you cancel the action it starts from scratch with zero progress.
  8. Still present on 41.69 (unstable). Selecting a large, uncollapsed stack selects more items after it in the inventory (including worn clothes).
  9. This is relatively easy to reproduce: Have a large stack of items in your inventory, try with 100 threads for good effect (or ripped sheets or practically anything else) Expand the stack in the inventory pane Click on the stack's "heading" to select the full stack Now, right click any of the contents: You'll see context menu options of other items coming after that item stack in your inventory (e.g. load bullets into magazine, wear clothes, whatever comes later in the list). The inventory considers those all selected due to key conflicts with how the lua tables (ISInventoryPane.items, ISInventoryPane.selected) are populated. If you drop the stack like that, it will also drop those others things it considers selected. There's probably more side effects.
  10. Tiax

    Loot tables

    Rewriting the entire looting algorithm in a mod for something that should be so simple is a big no-no.
  11. This does not seem to work at all. I can see no code change for it either. Can you confirm this has been merged properly?
  12. Doing it like that seems like a bit of a hack though, since you're changing it globally, not just based on the current player? Edit: this *has* to be done with an event. You could have multiple players look at an item in a container. You will need to show each player a tooltip based on the player's state, which may not be the same one, when sticking to the read/unread example.
  13. Tiax

    Loot tables

    Well the change could be as simple as adding a lua table instead of a string to the Distribution. Let's go with wallets on inventorymale: inventorymale = { rolls = 1, items = { ... "RiversideMap",0.1, "Wallet", 1, "Wallet2", 1, "Wallet3", 1, "Wallet4", 1, "Locket", 1, ... } }, becomes inventorymale = { rolls = 1, items = { ... "RiversideMap", 0.1, { "Wallet", "Wallet2", "Wallet3", "Wallet4" }, 4, "Locket", 1, ... } }, Type being string/list should be easy to check in the java. If it's string nothing changes, if it's a list pick a string from it at random (all same chance). Wouldn't break anything and open a lot of possibilities. You could now add a thousand wallet types and wouldn't drown in drops Want some wallets to be more common than others? Add them multiple times to the list!
  14. Tiax

    Loot tables

    Let's talk about how loot tables currently work. I made a mod adding a bunch of items, added them to the loot tables for zombie male+female as a (what I thought was a rare chance) drop and to my surprise got stuff from every couple of zombies. Really... stuff dropped like crazy. Checking the the java implementation, I found the equation for loot to be generated in a container is: Roll N times (that's a var in the table) for every item in the table check if: Rand.Next(10000) <= loot_table_chance × 100.0 × luck_modifier × world_loot_modifier + chunk_zombie_intensity_modifier Problem #1: the chunk_zombie_intensity_modifier sets a lower bound for the minimum drop chance, which you CANNOT influence (unless you set a negative drop chance, but that breaks pretty much every mechanic of lucky/unlucky traits and world_loot_modifier etc., so let's disregard that "hack"). This makes it so by definition you cannot make rare drops, if you add many items. You can expect this to max out at 80 (=0.8% bonus) quickly, which doesn't sound like a lot, but it adds up very quickly, which leads me to problem 2... Problem #2: It always rolls for every item in the table; there are no groups in the drops. Let's assume your mod adds 20 items to a container with a drop chance of literally zero, you'll still find at least one of those 20 items at almost 15% chance, assuming maxed out chunk_zombie_intensity_modifier (1 - (1-0.008)^20 = 0.148). This explained my observation of stuff dropping like crazy. With drop groups introduced to the existing tables, it could (also) roll if a group is "hit" (think: a drop group for a container to have ANY handgun, another one for pills like antideps, beta blockers and the likes) and then pick something from those lists. That would also resolve stuff like zombies dropping two pistols, which with the current implementation you cannot prevent (though the chances for it to happen are rare, of course!).
  15. Request: OnInventoryItemTooltip It would be nice, if mods could implement dynamic tooltips on inventory items, based on the game's or character's state. Example: achieve something like the vanilla game's "already read" on literature items.
  16. Already put it in the release announcement thread, putting here again to properly track it: Unstacking three or four logs still yields three or four ropes, respectively, instead of the two (from the new recipe in 41.46). Temporary fix in Steam workshop for my fellow lumberjacks: https://steamcommunity.com/sharedfiles/filedetails/?id=2292387684
  17. Unstacking of 3 or 4 logs returns 3 or 4 ropes respectively Workshop fix, until an official release fixes it: https://steamcommunity.com/sharedfiles/filedetails/?id=2292387684
  18. It seems like the same thing happens, when you cancel (ESC) during the casting animation.
  19. Was doing some testing with the nutrition system and enabled the "stored calorie" display in ISCharacterScreen.lua While jogging (SHIFT key) seems to increase the calorie burn drastically, sprinting (ALT key) burns the same calories as standing/walking!
  20. From checking the LUA, it looks like smaller food items (based on "hunger" value) will always be forced to the same consumption time as cigarettes: steamapps\common\ProjectZomboid\media\lua\client\TimedActions\ISEatFoodAction.lua o.maxTime = math.abs(item:getBaseHunger() * 150 * o.percentage) * 8; if o.maxTime > math.abs(item:getHungerChange() * 150 * 8) then o.maxTime = math.abs(item:getHungerChange() * 150 * 8); end -- Cigarettes don't reduce hunger if o.maxTime < 100 then o.maxTime = 450 end I published a small mod to fix it on the Steam workshop, if you cannot wait for an official fix: https://steamcommunity.com/sharedfiles/filedetails/?id=1902015925
×
×
  • Create New...