Jump to content

Maris

Member
  • Posts

    244
  • Joined

  • Last visited

Everything posted by Maris

  1. Let's say I want to get item X from ingredients A, B and C. recipe Make X { A, A/B/C, A/B/C, Result:X, Time:50.0, } "A" is most rare. And I have 3 "A" and 100 "B". What ingredients will be consumed? AAA or ABB? And what conditions may affect this?
  2. I mean to make an item that is clothes & container at the same time. I think it will be enough to get the goal, cos the mod may just replace items via craft.
  3. I'd like to attach a small container to a clothing item. Is it possible?
  4. Maris

    Siren bug

    1. Turn on any siren 2. Wait at least 200 zombies 3. See stuck zombies around https://youtu.be/YzhdHNAFsDQ https://youtu.be/8PjZjFY8lto
  5. Maris

    Spawn chances

    Sadly, now ItemPicker code was moved to Java. So ItemPicker.lua contains a single line of code: ItemPicker = ItemPickerJava
  6. Maris

    Zomboid Distribution

    If you see procedural = true, you should look in ProceduralDistributions.lua The game picks up one of procedures depending on the room look like, e.g. WardrobeMan or WardrobeChild etc require "Items/ProceduralDistributions" local a = ProceduralDistributions.WardrobeMan.items if a[#a-1] == 'Katana' then a[#a] = 50 end --etc
  7. local function addItems(id) local player = getSpecificPlayer(id); -- Java: get player which is just created local inv = player:getInventory(); -- Java: access player inv -- Java: add the actual items to the inventory inv:AddItem("Base.Axe"); inv:AddItem("Base.RippedSheets"); inv:AddItem("camping.TentPeg"); end Events.OnCreatePlayer.Add(addItems); OR local function addItems(id, player) if not player then return end -- just for sure local inv = player:getInventory(); -- Java: access player inv -- Java: add the actual items to the inventory inv:AddItem("Base.Axe"); inv:AddItem("Base.RippedSheets"); inv:AddItem("camping.TentPeg"); end Events.OnCreatePlayer.Add(addItems);
  8. I'm trying but my function doesn't work. What am I doing wrong? print('Hello!'); -- test passed, the mod is working require "recipecode" local old_RipClothing_OnCreate = RipClothing_OnCreate; if not old_RipClothing_OnCreate then error('ERROR: Cant inject into RipClothing_OnCreate'); -- test passed (no error, defualt function found) end function RipClothing_OnCreate(items, result, player, ...) -- trying overwrite print('Huh?'); -- test not passed! the code does not work return old_RipClothing_OnCreate(items, result, player, ...) end
  9. You need free 40kg in your inventory. Character can take items until inventory is full - maximum 50kg. So items in inventory including equipped items must be under 10kg. Just drop your bags and most of heavy items and you will be able to drag generator to your inventory.
  10. Color of background means temperature. Red - high temperature (in oven). Blue - low (in frigde). As you see it's red and "frozen" at the same time. And it should take very little time to defrost in oven.
  11. Maris

    Beard

    Probably, yes.... I mean, that beard may be missing. So I need to detect if it's exist and which type.
  12. Maris

    Beard

    How can I get/set beard color?
  13. What is best weapon in pvp?
  14. Let's say I have a variable: obj = nil; Let's say I initialized it somewhere: for i = 0, worldObjects:size() - 1 do obj = worldObjects:get(i); break; end Then some time passed. The object could be removed from the world. How to check that the object referenced by a variable still exists?
  15. Hey guys, I found that if I publish new version as a separate mod with the same mod id, it doesn't conflict with old versions of the mod for which I subscribed. Seems it's a very cool feature: only one mod at a time is active with specific mod id. But I don't understand is there any rule which mod is picked exactly? What if I have few steam subscriptions, another version in mods folder and one more version in workshop folder?
  16. Use online services like this one: https://rextester.com/l/lua_online_compiler Test your scripts there. If there is no syntax errors, all is fine.
  17. I mean the case when item does not exist but you know it's id. For example, "Wire". getText("DisplayName_Wire") doesn't work. getText("Wire") doesn't work.
  18. Let's say I want to check all nearby players. If and only if a player is near specific object, I want to send them a packet from the server using sendServerCommand. Is it possible? Give an example please.
  19. 1. Build any gate. 2. Loot at health (hp) of the gate. Now each tile returns 300 hp. 3. Open the gate 4. Close the gate. 5. Look at the health again. Tiles in the middle now return 500 hp. What??? Even more. 6. Hit the gate in the middle using an Axe. 7. Look at hp. Now it's 490 hp. Okay. 8. Open the gate. 9. Close the gate. 10. Look at the hp again. Now it's 500 hp again. What???????? Opening and closing the gate restores health in the middle of it. If this is normal, let me know, please! I'm trying to figure out how to fix my mod "Unbreakable Metal Walls". By now I plan to make a kind of a hack to fix this game bug (or feature).
×
×
  • Create New...