Jump to content

Tykvesh

Member
  • Posts

    82
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Tykvesh's Achievements

  1. Stress and stress from cigarettes are tracked independently, probably so you can't just read a book to get rid of it. As @Hugo Qwerty said, kills reduce regular stress, but then stress from cigarettes overrides it back.
  2. 41.78.16, Singleplayer, Vanilla, New save While stress from cigarettes is barely above Anxious, each zombie kill causes the moodle to disappear and pop up again. Smoker should not be able to reduce stress from kills (unless above the cap from cigarettes?), so it won't lead to this visual noise.
  3. According to ClimateManager, precipitationIntensity is used both for snow and rain, which makes sense. This forageSystem function will return "isRaining" during snow, because it tests for any precipitation. I have not 100% confirmed it, but figured it was worth mentioning. function forageSystem.getWeatherType() if getClimateManager():getPrecipitationIntensity() > 0 then return "isRaining"; end; if getPuddlesManager():getPuddlesSize() > 0.1 then return "hasRained"; end; if getClimateManager():getSnowStrength() > 0 then return "isSnowing"; end; return "isNormal"; end public float getPrecipitationIntensity() { return this.precipitationIntensity.finalValue; } public boolean isRaining() { return this.getPrecipitationIntensity() > 0.0f && !this.getPrecipitationIsSnow(); } public float getRainIntensity() { return this.isRaining() ? this.getPrecipitationIntensity() : 0.0f; } public boolean isSnowing() { return this.getPrecipitationIntensity() > 0.0f && this.getPrecipitationIsSnow(); } public float getSnowIntensity() { return this.isSnowing() ? this.getPrecipitationIntensity() : 0.0f; }
  4. Can UI3DScene be expanded to support vehicle color, rust and skin? Usage example: self.javaObject:fromLua2("setVehicleRust", "vehicle", 1) self.javaObject:fromLua2("setVehicleSkinIndex", "vehicle", 0) self.javaObject:fromLua4("setVehicleColorHSV", "vehicle", 0, 0.5, 0.5) I'm using it for a vehicle preview
  5. There's probably a better way, but you can get a list of functions by peeking into metatables: --prints functions from userdata type objects local function PrintUserdataFunctions(userdata) for k, v in pairs(getmetatable(userdata).__index) do print(k) end end PrintUserdataFunctions(getScriptManager():getRecipe("Base.Clean Bandage")) --result: getName isHidden getResult getSource getOriginalname needToBeLearn Load getFullType getSound getHeat getTooltip getCategory getLuaCreate setLuaCreate setOriginalname setNeedToBeLearn DoResult setCategory getRequiredSkills getTimeToMake addRequiredSkill FindIndexOf noBrokenItems findSource isKeep setNearItem isDestroy setSound getRequiredSkill DoSource isAllowFrozenItem setLuaGrab setAnimNode getProp1 setStopOnWalk setAllowFrozenItem getProp2 isRemoveResultItem setStopOnRun getLuaGrab isStopOnWalk getLuaTest getLuaGiveXP setProp2 getAnimNode setIsHidden isStopOnRun setLuaTest setLuaGiveXP getCanPerform getNearItem setProp1 setCanPerform getRequiredSkillCount clearRequiredSkills setAllowDestroyedItem getNumberOfNeededItem getWaterAmountNeeded setRemoveResultItem setCanBeDoneFromFloor isCanBeDoneFromFloor isAllowDestroyedItem getModule wait equals toString hashCode getClass notify notifyAll
  6. Intended or not, currently the magazine does not unlock medicinal herbs. Lemon Grass is an exception, which can be found by anyone. This is because medicinal herbs require the trait to be visible. Also confirmed in 41.66 (unstable). Plantain = { type = "Base.Plantain", minCount = 2, maxCount = 8, xp = 15, traits = { "Herbalist" }, function forageSystem.hasNeededTraits(_character, _itemDef) local knownTraits = 0; for _, trait in ipairs(_itemDef.traits) do if _character:HasTrait(trait) then knownTraits = knownTraits + 1; end; end; return #_itemDef.traits == knownTraits; end
  7. It's just a namespace, kinda similar to "Base" module used for items, recipes and so on. You can name it however you want.
  8. Here's an example how you can modify specifically one of "Open Umbrella" recipes. There's probably a way to directly modify recipes with the recipe:Load function, but I haven't figured out the arguments. local recipes = getScriptManager():getAllRecipes() for i = 1, recipes:size() do local recipe = recipes:get(i - 1) if recipe:getName() == "Open Umbrella" then local result = recipe:getResult() if result:getType() == "UmbrellaRed" then result:setType("Pie") return end end end
  9. There's a temporary solution in singleplayer, is using the Claustrophobic trait. You gain panic in smallish rooms on Fast Forward x1, unlike on any other speed, where it is overpowered by passive panic reduction (starting from 4-5 months). Basically turns Fast Forward x1 into a "wipe all my boredom" button.
  10. That's because Maple Syrup is a "spice", spices can be only added after regular ingredients. I'd love to have plain maple pancakes, but that means adding extra assets. Also, the true crime here is inability to use honey
  11. It seems that this room in the prefab was not marked as a room, but@bpdlrafter I enclosed the space as shown below, it started counting as indoors. 10248x11011
  12. A few years ago preview image for Steam Workshop items was increased from 256x256 to 268x268 pixels. The in-game requirement was never updated, so it results in PZ items having previews with black borders. So once it's fixed, newly updated mods should have up to date previews. (Click to open workshop pages in your browser)
  13. Here's an example for your script: function Recipe.OnCreate.hezhuangqichea(items, result, player) if getWorld():getGameMode() ~= "Multiplayer" then for i=0,items:size() - 1 do local item = items:get(i) if item:getType() == "carboxmustangpolice" then if not player:isOutside() or player:getZ() > 0 then player:Say(getText("IGUI_zuzhuangshibai")) player:getInventory():AddItem("carboxmustangpolice") else --first we tell the server to spawn a vehicle for us sendClientCommand(player, "eroge", "SpawnVehicle", { type = "Base.ATAMustangPolice" }) end Events.OnClientCommand.Add(function(module, name, player, params) if module == "eroge" and name == "SpawnVehicle" then --server got the request and spawns the desired vehicle local vehicle = addVehicleDebug(params.type, randomdir[ZombRand(4) + 1], -1, getSquare(player:getX(), player:getY(), player:getZ())) --should repair properly as this code is run server-side vehicle:repair() --tell back to the player to do their client-side stuff sendServerCommand(player, "eroge", "ClaimVehicle", { vehicle = vehicle:getId() }) end end) Events.OnServerCommand.Add(function(module, name, params) if module == "eroge" and name == "ClaimVehicle" then local vehicle = getVehicleById(params.vehicle) if vehicle ~= nil then --now client can get some keys in peace player:getInventory():AddItem(vehicle:getCurrentKey() or vehicle:createVehicleKey()) player:Say(getText("IGUI_zuzhuangchenggong")) end end end)
  14. Tykvesh

    42 Techdoid

    Ropes weight less so they're still better? And if that's not enough, sheet ropes can have a lesser weight reduction or something.
  15. I think you can resolve all three with client-server commands, using functions sendClientCommand, sendServerCommand, and events OnClientCommand, OnServerCommand. There are plenty of examples in the code! For example, this built-in command should repair vehicles properly (see VehicleCommands.lua): sendClientCommand(player, "vehicle", "repair", { vehicle = vehicle:getId() })
×
×
  • Create New...