Jump to content

johndough

Member
  • Posts

    74
  • Joined

  • Last visited

Everything posted by johndough

  1. It could maybe be done by making erratic calls to IsoZombie:AttemptAttack() and IsoZombie:PathTo(). But to make it look good you would need new animations.
  2. Well, do you queue the sleep action also?
  3. Lol, they have stated that they will? If so, I think I will shelve this for now.
  4. THIS MOD WAS MADE FOR AN OLDER VERSION OF PZ AND IS NO LONGER WORKING PROPERLY. DOWNLOAD AT YOUR OWN RISK. Extract this to the *root* folder, not the media folder. Update 0.9.3: - Added realistic infection chances - Added gloves item. The icon looks amateurish. I need to improve my pixel art for the final version. Gloves are used simply by having them in your main inventory(not backpack, plastic bag etc.) - Added chance of infection when cleaning, removing corpses or grabbing from corpse inventory - Hypochondriacs have a very large chance of catching a "fake" infection when dealing with corpses - Hypochondriacs refuse to clean without gloves - Hypochondriacs complain when living in infested rooms, and of course, have a large chance of catching fake infections if they do - Fixed naked corpses bug. Probably. If this appears again, a restart will always fix it now. - Tweaked bleach spawn rates Update 0.9.2: - Changed chance of infection. I had accidentally set this to a debug value that was much higher than intended. Players who care about their character should download again. - Added some sound effects - Added option to open old bleach item types. This will convert them to the new bleach item type. - Possibly fixed naked corpses from spawning. Please let me know if you experience this. --- This mod will allow you to clean your safehouse, remove corpses and also adds new ways of getting infected. Two new items are added: drainable bleach and gloves. Use bleach to clean your safehouse of zombie corpses and gloves to protect yourself from infection when dealing with corpses. This is work in progress. Please let me know if you encounter any bugs. Right now removal of blood is not possible, AFAICT. This is because there is no getter method for the IsoFloorBloodSplats in the IsoChunk class. So I will have to add that later, if it becomes possible then. Some quirks: - You need to actually be inside the room you want to clean. It does not matter where you click, only where you stand. - PZ's "rooms" aren't necessarily rooms. Sometimes rooms are cut in half or they extend further than what you would expect. Sometimes one or two gridsquares in a room aren't actually part of that room. However, as long as you make sure there are no zombie corpses nearby, you should be safe(and your character will tell you that the room is clean if you try to clean it). - The old bleach items can be used by right clicking and choosing 'Open bleach bottle'. http://pz-mods.net/gameplay/CorpseMod/
  5. Forget that. InventoryItem:getUses() always returns 1 for some reason. getDelta(), however, will return the current amount of usage left(between 0.0 and 1.0). getUseDelta() will return the delta set in the items and recipes file. So to find the number of uses left for a given 'item', you need to do: math.floor(item:getDelta()/item:getUseDelta()). To find the number of uses for a full item, getDelta() can be replaced with 1.0.
  6. Also, the number of uses can be retrieved through InventoryItem:getUses(). You don't need to calculate anything.
  7. The delta simply tells you how much, from a base value of 1.0, is used every time the item is used.
  8. I tested with both an old world and a new, with a 100% chance of spawning a new item. Without the require... none of my new items would spawn (possibly because my mod starts with C and is loaded before the Items directory). The items would not spawn in containers I had already opened. They would, however, spawn in containers inside rooms I had visited(without opening the container). Old or new world didn't matter.
  9. Looks like require 'Items/SuburbsDistributions' is required and that spawns are done the moment the container is opened.
  10. Oh, that wouldn't work. I've been everywhere. And the few places I haven't been, I can't remember. I guess I need to do some testing. Asking questions usually saves a lot of time though
  11. No, unfortunately not yet, only Johndough beer. :cool: And which containers would that be, exactly? The ones that haven't yet been opened?
  12. Couldn't that be problematic if Suburbsdistribution.lua is not parsed first? What I don't quite understand is where and when the new spawn rules take effect. If I add table.insert(SuburbsDistributions["JohndoughsKitchen"]["fridge"].items, "JohndoughsMod.CanOfBeer");table.insert(SuburbsDistributions["JohndoughsKitchen"]["fridge"].items, 5);and then load up an old saved game where I am standing in a JohndoughsKitchen - do I then suddenly get a 5% chance of having a beer in my fridge? This is probably a stupid question, but anyway...
  13. Hmm, so when exactly do these two lines need to be called to change the spawn distribution? I suppose some of the early pre map loading events?
  14. Thanks, I will try some of those out.
  15. johndough

    LUA Validators

    Does anybody have a good LUA syntax validator to recommend? I'm a bit tired of running the game to squash out every minor syntax error. I found this: http://doris.sourceforge.net/lua/weblua.php but it is kind of limited.
  16. The only events I've noticed dragging down the performance on my old laptop are the draw events. And it usually takes a lot of for loops to do it. Still, it would be nice to have an EverySecond event. EveryTenMinutes is usually too infrequent and OnTick too frequent.
×
×
  • Create New...