#mod_development
1 messages ยท Page 59 of 1
you can test most of those changes while ingame, especially the DoParam
ScriptManager.instance:getItem("Tsarcraft.CassetteACDCHighwayToHell(1979)"):DoParam("DisplayName = Unlabelled Cassette")
and spawn the item from Items List
how do i execute that from within game?
i did know about debug mode, just didn't know about the console part of it
@fast galleon @thick karma Thanks guys, I tried using setJoypadFocus however it doesn't seem to work in the main menu (joypadData seems to have a MainMenu flag implying it might be treated differently)
I've ultimately got it working by forwarding the onJoypad* methods from the parent panel to my element when it's the current panel button. the vanilla Lua does something similar in ISPanelJoypad
Glad you got it solved!
turns out it is spitting out errors for the actual mesh replacement portion of that code
let me check a time i actually used that
oh i forgot how weird the syntax was, my bad
local model = getScriptManager():getModelScript('Tsarcraft.TCVinylrecord5')
if model then
model:Load('TCVinylrecord5', '{mesh = WorldItems/DifferentModel,}')
end
thank you!!
is there a way i can group them like we did with the DoParams for the weight?
this works pretty well on the small scale of changing the cassette mesh but... turns out the vinyl's dictated on a per-item basis which makes sense, but would require me to individually edit 1000 models
for i=1,#modelList do
local model = getScriptManager():getModelScript('Tsarcraft.' .. model)
if model then
model:Load(model, '{mesh = WorldItems/DifferentModel,}')
end
end
modelList should be a table of models without the module
is there a way to change player animations through mods? i.e. Character holds guns pointing downwards instead of upwards when not aiming.
is there any kind of warning functionality instead of using assert and stopping everything?
I've been using print(string) for warnings, and error(string) to throw a Lua error which stops the current script, but the game carries on.
Just checked, doesn't seem to be it.
That method "isDismantable()", seems to exist only for Thumpables (which I never understood what the heck are "ThumpableS")
What properties specifically? just checked and its not very clear.
it looks that the game just destroys everything blindly when you have a sledgehammer.
I guess I need to check the other way around, around damage performed by some stuff, like an Axe.
Thanks! I'll try that
Is there a "best practice" for transitioning a mod from separate SP and MP versions to a single, combined (backwards-compatible) version? The options as I see it is for the combined version to have a new modID (requiring both SP players and server admins to change their mod lists), or re-use either the SP or MP modID, allowing one to just upgrade smoothly, but requiring the other to change their mod list. And then there's the question of what to do with the now-unused modID(s)... do you leave a non-functional placeholder there saying "use the other mod", or do you just delete, forcing the player/server admin to do the switch if they want to load the save/start their server?
(Specifically, the RV Interior mod has SP and MP versions which are distributed under the same workshop ID, so anyone subscribed currently has both. The next version is a single combined mod, but we want to minimize the disruption for users.)
if you delete a mod, it can be really unclear for end users which mod disappeared or why. Or even that it happened, but their game will throw errors. Best to leave a placeholder at least for that
Thanks bro I found it
Ok, makes sense.
you might be able to force the game to unload the mod and load the new one, but i haven't really heard of anyone actually doing it, just theorising about it, and it'd probably behave badly on servers
We're thinking that we'll re-use the SP modID, since we figure that (as a gross generalisatoin) server admins are more technically savvy on average than SP players. And we're thinking that we'll make the MP version a non-functional placeholder that just logs messages saying "change to the combined version!"
personally I would roll the version thats compatible with both into the MP modid, and then leave a fully functional SP version behind that warns them every 10 minutes or whatever that the version is outdated and no longer supported
I'd leave it functional so they don't lose anything, although I don't know how you'd migrate a savegame across to a new modid, they'd probably lose stuff anyway
yeah servers will be a lot more annoyed than singleplayer
just swap out the mods?
if the new mod is a different modid, and that's in the item names or whatever, they'll disappear
why would the modid be in the item names? isn't it just the same mod but multiplayer/singleplayer version?
RV Interior has no unique items. It has custom maps (the interiors), but they're the same between the two versions, and for existing saves maps don't get updated when the underlying mod changes in any case.
are people just using generic names for things without their ID? Doesn't that just invite conflicts?
well there you go
yeah, but there's no expectation that you'll use the exact modid
instead of using 'ModSP.item' and 'ModMP.item' you'd just use 'Mod.item', surely? otherwise it complicates everything for no gain
When I originally built the combined version, I based it on the MP version, and I've tested upgrading SP games to the combined version (including my actual long-term nomad run) without issues.
Well, any issues I encountered, I fixed ๐
yeah, just add a little popup or any kind of notice to switch to the combined version
And you reckon make it easy on server admins and use the MP ModID, and force SP players to update?
yeah that's what i'd go with, server admins have a lot to deal with with mods already
Yeah - Zomboid + Workshop + MP, what a mess. Players regularly unable to connect because some mod has updated, until the server does a restart.
Unless the server admin creates their own modpack, which many mod devs disallow.
finally got around to checking this, loot is generated when the vehicle is created
Nice! That should make things simpler ๐
when the event is fired by a vehicle, it returns the vehicle type in place of the room type
ty for being kind and helping others thats rlly cool. this community is so friendly. idk rlly how to contribute here but i rlly want to learn modding just 4 this game.
queen
how hard would it be to make a gun mod 4 this game
I really want to add the mp40
i love it sooo much its so cool
If you can 3d model then it shouldn't be too hard to add one gun
https://steamcommunity.com/sharedfiles/filedetails/?id=2857842616
sharing this because, hey, i just pushed the last very major content update for this mod! i'm proud to announce that, barring any bugs that come up from this patch and any new features i might think to add in the future, at least music-wise, Music for the End of the World is now a completed project and has a ton of new customization features and improvements to loot distribution
Can anyone point me in roughly the right direction to mod the industrial generator (the thing in the back of the 3 car detached garage along Louisville's mansion row) to be functional? I don't want to add/remove anything from the world, I just want to make that tile have the same behavior as a portable generator. I've modded inventory items, but not world tiles so not sure where to start.
i can't think of a way to do that outside of maybe hiding a generator inside it?
generators are pretty hardcoded i'm afraid
maybe you can manually set the powered status of nearby objects...?
Hmm. That's a bit of a shame. I'll consider those options. I want it to be reasonably immersive, so just powering nearby objects isn't really what I'm after. Maybe hiding a generator in it will work. I'll think about possibly placing one in the world and seeing if that might work out. Time for some experimenting. Thanks for your help.
as far as i know, it's either hiding a generator or reimplementing generators entirely
has anyone here used mrbountys simpleui?
Does anyone know where I can find the ingame cardboard box Java Class? I don't know where to look I am assuming it starts with "Base." But idk if its Base.Cardboardbox.
i think you might be on the wrong track, specific objects rarely have their own class in java
Forgive me idk wtf I am talking about lol.
the wording of your question makes me think you might be looking for the type of the item
which probably starts with Moveables. in this instance
I am creating a mod that makes the ingame cardboard box visible in your hand when you equip it.
Okay Ill check there.
Base.Mov_CardboardBox
how did you find it! lol
i went ingame and used the debug item list
it doesn't show modules though, so i used the console to print the full type
Ohh huh. Idk how to use console to print full types lol. Did you get the base id from the Big cardboard box or the small one you find in vacant houses? I need the small one lol
oaky thank you!
Hey so it looks like I am going to have to overwrite the vanilla cardboard box. Do you know where I can find all the information regarding that box? Planet Algol had to overwrite vanilla items for his mod to work as well. And I am using his mod as a template. This mod is mainly for myself. But I might post it to the workshop if it comes out well enough.
item Generator
{
DisplayCategory = Electronics,
Weight = 40,
Type = Normal,
DisplayName = Generator,
Icon = Generator,
Tooltip = Tooltip_Generator,
RequiresEquippedBothHands = true,
MetalValue = 500,
ConditionMax = 100,
Tags = HeavyItem,
StaticModel = PA_Generator,
primaryAnimMask = HoldingTorchRight,
secondaryAnimMask = HoldingTorchLeft,
}
I am looking for this kind of information. But for the small moveable cardboard box.
Also I am aware overwriting vanilla items are bad practice from what he said.
I am just brute forcing atm to make it work for me atleast. I am completely done with everything else regarding the mod. but without this info I keep crashing to desktop.
i didn't think blair tended to overwrite items? i've only looked at one he made but that used doparam, which is the good practice way of modifying vanilla items
this data likely doesn't exist, moveable items are generated at runtime
yes doparam didn't work for him in this case. And fuqqqq lol. I came so far haha.
/* NOTE: overwriting vanilla items is generally a BAD PRACTICE. However, for whatever reason, using lua + the DoParam function to modify the script items in question did not work in this instance.
I have no idea why; using lua in that fashion has always worked before in my experience, and is best pratices, but in this case I had to overwrite the scripts themselves.
Hopefully I will be able to figure out the issue and find a solution that works w/o overwriting vanilla items, as it is a BAD PRACTICE. */
this is from his note.
i wonder why... maybe moveables are created later than their code ran - though i'm sure they would have thought of that
that said, though it is very unappealing, as far as overriding items goes you're not likely to find another mod that modifies cardboard boxes
i'd like to experiment with changing it through lua but i've just gotten into bed ๐
haha no worries man. If you have time tomorrow. Ill be in here tomorrow harassing people to figure this out haha jk. But not really lol. Like this mod is fully complete besides this. But I might have to add container capabilities for the cardboard box in the lua. but i doubt it.
oh I was told somebody was using that to make his objects indestructible, but I too don't see it.
you can check ISDestroyCursos:canDestroy(object)
the masks have more logic done on load right after DoParam happens...
Added this to requests on the forum...
@frank rivet
#mod_development message
yeah type is a confusing term to use cuz at first you will think of types like weapon, food,medical etc
why is there no portable cassette player into the game yet? earbuds are already in all we need is just a way to use cassettes on the go
hm, does any one have a function that can match a series of OnKeyPressed to a string, so you can do
if text == "querty" then
just sharing some random thoughts and I remember again why I drop this, almost every key triggers something.
this has been done by skizot already
#mod_development message
i don't mind if others do it ๐
It's the little things like this that make me rage:
-- ISUIElement.lua
function ISUIElement:drawRect(x, y, w, h, a, r, g, b)
function ISUIElement:drawText(str, x, y, r, g, b, a, font)
One has a call signature of a,r,g,b and the other has r,g,b,a. 
Thats an hour of my life I won't get back
yeah, once you go beyond a few arguments, you really should use a struct, or, since this is lua, a table
but it's less effort to take args in java from lua than it is to process the table
Damn so THAT'S why my rect box was coming out the wrong color. Good catch!
I'm gonna just add a declaration for ISUIElement:drawRectangle and reorder that argb into rgba in my mods from now on.
I can't fix this bug when i'm creating a top hat ๐ฆ
do you have a shader and a texture defined on the model?
Texture yes, 128x128
what is your script looking like?
woah.. looks like it can be used for dr strange roleplay
ok thought i finally understood the whole inventory context menu thing...
but then again i was wrong.. i dont know how to capture the exact item that i clicked.
the arg items returns a table of items and some arent even on my inventory... and i cant even print it out for some reason cuz of some buffer thing...
does anyone know how to properly asign a variable to whetver i right clicked on"? pls help thnk you ๐
Here is a simple example of how to capture the item when clicked in your inventory
ISInventoryMenuElements = ISInventoryMenuElements or {}
function ISInventoryMenuElements.ContextMyMod()
local self = ISMenuElement.new()
self.invMenu = ISContextManager.getInstance().getInventoryMenu()
function self.init()
self.theItemClicked = nil
end
function self.createMenu(item)
if not item or item:getType() ~= "MyModItemType" then
return nil
end
self.theItemClicked = item
end
return self
end
edit: forgot the return self
Thank you gravy ill try it now
the item.txt?
modelItems.txt too?
imports {
Base
}
item Gorrito
{
DisplayCategory = Accessory,
Type = Clothing,
DisplayName = Gorrito,
ClothingItem = Gorrito,
BodyLocation = Hat,
Icon = Gorrito,
CanHaveHoles = false,
BloodLocation = Head,
BiteDefense = 0,
ScratchDefense = 0,
ChanceToFall = 10,
Insulation = 0.25,
WaterResistance = 0.2,
Weight = 1,
}
}```
and ```module TM {
imports {
Base
}
model Gorrito {
mesh = WorldItems/Clothing/Gorrito,
scale = 1,
}
}```
it looks like your model is missing a texture file
is there an easy way to make a certain food contract a trait over time?
somewhat like how tainted water contracts sickness that kills you but instead of an affliction is a trait
trying to make someone sick of eating the same stuff but to a specific food, not just any dish in the game
and then if they keep eating they eventually contract a trait that makes their life a tad tougher
perhaps store the type of the last x meals in the player's mod data, and every time they eat check how many times that item is in the cache
my hassle is at the trait tho
how can I "give" a trait to an existing character
a trait that you dont exactly choose at the character creation screen
obviously if the cache reaches a limit it can then give trait but I dont know how to give a trait
IsoPlayer:getTraits():add('TraitName')
wow thats simple
I figured it couldnt be the same as afflictions, I guess I was wrong
thank you
With MUCH help from the awesome people here, I have launched my first mod! A big thank you to @bronze yoke, @ruby urchin, @finite owl and the rest of y'all who helped me out.
https://steamcommunity.com/sharedfiles/filedetails/?id=2897800323
nice job!
ooooh I didn't know he did this! Id love to have the download links for these mods!
Hey I seen you created the mod I am trying to make with holding the cardboard box, and you did all sorts of other in game objects. Would you happen to have a compilation pack of that mod? I'd love to have those ingame models in hand!
it's not public atm... but yeah it's out there.
I just published a mod to zoom in more yesterday on nexus mods
yeah, it seems like a lot of the workshop mods are also published there as well for some reasons
i guess there *are* non-steam users lol
ohhh i didn't think about that lol
i've never really thought to account for them LOL
most of my mods are available on github now but it's not really discoverable (or meant to be, it's just a portfolio lol)
yarr!
non steam user? never heard of em
i'm a non-steam user ๐
gog?
yep
i technically own it on steam as well for testing stuff (it was a gift) but i really dont use steam
Can you tell me if you needed to overwrite over Vanilla items? Planet algol did the visible generators mod and he needed to do it since doparam didn't work for him.
Some direction for how I can do it myself would be awesome man. I really want to be able to do what you did.
of course you will lol.
why wont my mini map work when i host with mods
or play anything wont work anywhere ive uninstalled and validated
You've enabled the ability to use the minimap in the server's sandbox settings?
Would anyone here be interested in a mod collaboration for a playable board game mod? I specifically want to implement a mtg mod and have all of the required assets, however I do not know anything about lua or gui coding ๐ feel free to dm me if you would like more details
so I am basically done with everything but I need to know where to find the information that looks like this. This is from planet algol's visible generator mod. item Generator
{
DisplayCategory = Electronics,
Weight = 40,
Type = Normal,
DisplayName = Generator,
Icon = Generator,
Tooltip = Tooltip_Generator,
RequiresEquippedBothHands = true,
MetalValue = 500,
ConditionMax = 100,
Tags = HeavyItem,
StaticModel = PA_Generator,
primaryAnimMask = HoldingTorchRight,
secondaryAnimMask = HoldingTorchLeft,
or should I go fuq myself?
lol
item Mov_CardboardBox
{
DisplayCategory = Furniture,
Type = Moveable,
Icon = default,
Weight = 0.5,
DisplayName = Cardboard Box,
WorldObjectSprite = trashcontainers_01_24,
}
from newMoveables.txt
Thank you!!
sorry was on my phone couldn't be as exact.
is there a lua event for equiping/unequiping clothing? i couldn't find it on the wiki
np. so uh i made this lol. idk if thats enough lol item Mov_CardboardBox
{
DisplayCategory = Furniture,
Type = Moveable,
Icon = default,
Weight = 0.5,
DisplayName = Cardboard Box,
WorldObjectSprite = trashcontainers_01_24,
RequiresEquippedBothHands = true,
StaticModel = PA_Cardboard Box,
primaryAnimMask = HoldingTorchRight,
secondaryAnimMask = HoldingTorchLeft
}
that should handle it.
Okay Ill try it. If i don't respond. My computer probably exploded.
depends what you need it for, if it doesn't have to be *only* when clothing is equipped/unequipped you can use OnClothingUpdated, otherwise you'll probably want to just hook the timed action for equipping clothing
item Mov_CardboardBox
{
DisplayCategory = Container,
Weight = 2,
Type = Container,
DisplayName = Large Box,
Icon = Cartbox,
Tooltip = Tooltip_Cartbox,
EquippedNoSprint = TRUE,
WeightReduction = 65,
RequiresEquippedBothHands = true,
ConditionMax = 100,
Capacity = 50,
OpenSound = OpenBag,
CloseSound = CloseBag,
PutInSound = PutItemInBag,
Tags = HeavyItem,
StaticModel = KYRP/PA_Cardboard_Box,
primaryAnimMask = HoldingCarryGrabRight,
secondaryAnimMask = HoldingCarryGrabLeft,
WorldStaticModel = W_Cardboard_Box,
}```
oooh that will probably be better lol. Ill try mine then yours and see what happens lol
i crashed with both lol. All good tho! I was just trying to see if i could crank out my first mod. It was a flop lol. no worries! Your work is dope tho.
What exactly calls events? Can you make custom events? The modding wiki was very vague. Also what do you mean by hook.
you can insert your own code into a vanilla function by saving the original function into a variable, and then overwriting it with your own code followed by (or following) a call to the original
you can make custom events but it's not too often useful
you can do this with something like LuaEventManager.AddEvent('OnEventName') and then triggerEvent('OnEventName', param1, param2, etc)
im assuming the java files can call events as well for somethings?
yeah, most events are from java
thanks!
i need some assistance with lua and simpleui.
I am trying to make something very similar to this. image on the left. two title lines. and 4 cells below that.
As well as the event system where you register a callback against a particular event using e.g. Events.OnKeyPressed.Add(myCallbackFunction), there are also client commands... they're half of the client-server comms system for MP, but client commands also fire in SP. A callback registered for the OnClientCommand event using Events.OnClientCommand.Add(myClientCommandHandler) will be invoked on every client command, passed the arguments module (string), command (string), player (the player the command was send on behalf of, mostly) and arguments (a Lua table of parameters which are different for each different client command). You can detect some interesting events that way - anything that would need to be sent to the server in a MP game, basically. So for example you can check if module == 'vehicle' and command == 'uninstallPart' to detect if the player has just uninstalled a part from a vehicle.
I've been using Lua tables to make it easy to register callbacks against certain combos of module and command. I just use those params to look up the callback in tables, like this:
-- Generic handler for client commands
local clientCommandHandlers = {}
local adminClientCommandHandlers = {}
local clientVehicleCommandHandlers = {}
local allCommandHandlers = {
RVInterior = clientCommandHandlers,
RVInteriorAdmin = adminClientCommandHandlers,
vehicle = clientVehicleCommandHandlers
}
local function onClientCommand(module, command, player, arguments)
local handers = allCommandHandlers[module]
if handers and handers[command] then
handers[command](player, arguments)
end
end
Events.OnClientCommand.Add(onClientCommand)```
And then you can just assign a callback to one of those handler tables to fire when that module/command combo is fired, e.g.:
--- Synch when a battery is removed
clientVehicleCommandHandlers.uninstallPart = function(_player, arguments)
if arguments.part == "Battery" then
synchBatteryAndGeneratorIfBothLoaded(getVehicleById(arguments.vehicle))
end
end
Anyone using PW template to develop mods?
https://steamcommunity.com/sharedfiles/filedetails/?id=2897591332
finally made and finished requested from many times by many ppl
huge thanks to @sour island for helping me to make it simplest as can 
question: does anyone here know of a way to compress audio files in a way that might be usable by PZ? my music mod has about 4gb of music in it, and currently they're just ogg files sitting in the open, and i feel like there's gotta be a good way to compress them further into like a pack file or something so that they take up less space until they're loaded
use wav
Ogg Vorbis files already use a pretty good compression algorithm. Wavs are uncompressed and much larger.
yeah those would be much worse lol
Whats that
Lots of individual files take up a lot more space if the files are small, because they usually round up to some minimum block size. Lots of sizable files won't be wasting that much space relative to the total size, though.
Like how pz did it? Stored in class files
So it says event =
Instead of file =
Ah wow . Have you joined their discord?i dont think they are active anymore tho
The devs .. i mean
Jab returned from Navy so, right now its on hold
It works fine, until you try to implement your own lets say UI class
Working with intellisense is more convenient, since in lua you can't see farther then parent "class"
Ye he mentioned he will comeback soon.. ๐
I want to learn how they did the rcon commands
But i guess sau is willing to teach em too.
I like when I can see all fields/methods exposed
Those sprites are awesome
I wish I could help
Speaking of TCGs, I made an alternate version of the checklist for the PKMN Trading Cards mod
lol, can somebody make "dig meseum" game for PZ. Collect bones around Kentucky, to build Dinosaur skeletons.
Yeah I've reached out to the creator of that mod but haven't heard back. I love the collecting aspect of what they already have implemented but think it could be taken to the next level if the games themselves were to be also implemented
honestly, I am waiting for v.42 monster rancher mods.
No matter what I do, sendServerCommand or sendClientCommand does absolutely nothing.
-- ISBlackjackMenu.lua
ISBlackjackMenu = ISPanel:derive("ISBlackjackMenu")
ISBlackjackMenu.cOnServerCommand = function(module, command, player, args)
print("On server module", module)
print("On server command", command)
print("args") print(args)
end
Events.OnServerCommand.Add(ISBlackjackMenu.cOnServerCommand)
From console:
sendServerCommand("ISBlackjackMenu", "test", {"abc"})
sendServerCommand(getSpecificPlayer(0), "ISBlackjackMenu", "test", {"abc"})
question: if i include a sandbox options file in a mod that contains an option, and then put that sandbox option's translation into another mod that is required by the first mod, will that work fine or do the translation and the sandbox option need to be stored within the same mod?
update: tested it myself, works fine
how are you testing this? if you're in multiplayer, clients can't send server commands so the console isn't going to help you
it was the fact that I wasnt running dedicated
server commands work in hosted too
Ya, hosted works just like dedicated. It can be a little confusing, it was for me at first, but your client handles server commands and your server handles client commands. In other words, you call sendServerCommand from the server, and sendClientCommand from the client
when you use the console in-game, thats client side, so sendServerCommand would do nothing
Hello im new here and i want to play with my friends on my DEDICATED SERVER.... so i dont know how i can setup my own BRITAS WEAPON MOD like changing the spawnrate can someone help me out because no one in youtube shows it... like i know that i have to setup my own mod but yeah i dont know what i should put in there... anyone have time for a call ?
Anyone here messed with multi-stage building? I am trying to figure out if I can have it work on something that is larger than a single tile.
For the sake of explanation- something like turning a dining table into a couch. Both are 2 wide, using 2 separate tile definitions- but I just wanna make sure that is a possibility
Maybe the mod that has the sandbox loaded first.. MAYBE
translations are translations, the game doesn't care where they come from
Havent tried it but im pretty sure the thing u want to do can be done via lua..
is there any way to check if there are zombies within x range of the player?
i don't think there's a better way than either checking the squares or using the zombie list
should be, just walk outward from the selected tile and detect the expected second tile
the game also seems to know which second tile is programmatically associated with the first for picking it up
so there may well be an even cleaner way to do it too
as far as multi-stage building goes, probably not? vanilla doesn't use it so i don't see why it'd be a feature
but it would be easy enough to do yourself
actually I am thinking about a logic but I am not sure what's the best way to do this. So basically, what I am trying to do is have the player have an uncontrollable mental breakdown when sadness is above a certain level, and has picked a certain trait. So, to make it realistic, he shouldn't have that kind of mental breakdown when he's fighting hordes or there are zombies nearby, cause yk, survival instincts
that's where it gets complex. I thought initially about making it check if there are zombies present within the range of the player, but that doesn't take into account whether player is aware of the zombie's presence or not
can't sleep, enemies nearby
maybe IsoGameCharacter:getSurroundingAttackingZombies()?
no idea exactly what it does but it sounds like it could be useful
Yeah, as mentioned, server commands don't fire in single player, although client commands do. It's rather annoying - if server commands just triggered the event handlers in SP as well, it would reduce the amount of coding you'd need to do when writing a SP+MP mod. As it is, you can write your own version of sendServerCommand which triggers the event handler:
-- Do nothing in multiplayer on the client (isClient always returns false in single player)
if isClient() then return end
-- Wrap sendServerCommand to invoke the event handler for singleplayer, because the game engine doesn't do it.
local function sendServerCommandTo(player, module, command, arguments)
arguments = arguments or {}
arguments.playerId = player:getOnlineID()
if isServer() then
sendServerCommand(player, module, command, arguments)
else
triggerEvent("OnServerCommand", module, command, arguments)
end
end
Definitely does sound useful, but from the context of it, I guess it doesn't take into account zombies you can see but are not attacking you, or in a more simple sense, haven't noticed you yet
how about looping through getCell():getZombieList() and checking if their target is the player with IsoZombie:getTarget()?
There's player:getStats():getNumChasingZombies() and player:getStats():getNumVisibleZombies()
oo that does sound like we're getting somewhere, that definitely solves 80% of the issue
I love how one of the java files is just called "Thumpable"
out of curiousty, would there be a function that lets you know if the player can hear any zombie nearby (but can't see it and the zombie isn't attacking the player)?
like, a zombie groaning, or thumping on a nearby door/gate/window
Im not really sure, how do i paste code blocks?
There is something in the source code that says fuck
Enclose the code in three backticks (the symbol above the tilde on US keyboards). Like this, but using backticks instead of apostrophes
'''lua
(code)
'''
```lua
code here
```
makes
code here
package zombie.iso.objects.interfaces;
import zombie.inventory.types.HandWeapon;
import zombie.characters.IsoGameCharacter;
import zombie.iso.IsoMovingObject;
public interface Thumpable
{
boolean isDestroyed();
void Thump(final IsoMovingObject p0);
void WeaponHit(final IsoGameCharacter p0, final HandWeapon p1);
Thumpable getThumpableFor(final IsoGameCharacter p0);
float getThumpCondition();
} ```
or ```java in this case
Ah yes there is a java property called OhFuckMoment lol
Looks like the Thumpable interface is for things like doors, windows, roller doors... environmental objects you can break by thumping them.
of course there's both getNumVisibleZombies() and getVisibleZombies() and they do the exact same thing
i'd think getVisibleZombies returns a list of visible zombie objects
whereas getNumVisibleZombies() returns an integer of visible zombies
an integer
playerObj:getStats():getNumVeryCloseZombies()
apparently there is this as well
not sure how veryClose we're talking about
You could also check for level of panic. Since you wanna optimize how your code is running, you donโt wanna like constantly check for zombies- so you could set the check on the sadness and the trait, then look for panic, if they are panicking, look for close zombies as mentioned above
So I am making a mod that is skizot made with being able to visibly see different ingame objects in your hand when having them equipped. And I keep getting crashes. Heres my lua local scriptItem = getScriptManager():getItem("Base.Mov_CardboardBox") if scriptItem then -- print("Visible Cardboard Box!") scriptItem:DoParam("StaticModel = PA_CardboardBox") scriptItem:DoParam("primaryAnimMask = HoldingTorchRight") scriptItem:DoParam("secondaryAnimMask = HoldingTorchLeft") end
script 1 ```module Base
{
model PA_CarboardBox
{
mesh = PA_CardboardBox,
texture = PA_CardboardBox,
scale = 0.005,
}```
{
DisplayCategory = Furniture,
Weight = 0.5,
Type = Moveable,
DisplayName = Cardboard Box,
Icon = default,
RequiresEquippedBothHands = true,
Tags = HeavyItem,
StaticModel = PA_CardboardBox,
primaryAnimMask = HoldingTorchRight,
secondaryAnimMask = HoldingTorchLeft,
}```
script 2. Can anyone tell me where I went wrong. I am able to launch the game now atleast. but when I reload my lua it crashes.
@frank rivet have you tried making a new item, basically copying the base cardboard box- but with your changes to make sure there isnโt something else that is broken?
Wait
okay lol.
Is this an entire script file?
Like, you posted 3 things- are any of them in the same? Or are they all separate
all separate. the top code block is my VisibleCardboardBox_vanillaModifications.lua and the other 2 are my script.txt files
did I pick a whole bouquet of oopsy daisy's?
You need to end your brackets for the module here
And
On your item file you didnโt declare the module, so- you can do the same as your other script with
module Base {
your code
}
Oh okay one sec. I can try to fix the second script but what should it look like for the first script? I'm confused on how to end the brackets for the module lol
{
item Mov_CardboardBox
{
DisplayCategory = Furniture,
Weight = 0.5,
Type = Moveable,
DisplayName = Cardboard Box,
Icon = default,
RequiresEquippedBothHands = true,
Tags = HeavyItem,
StaticModel = PA_CardboardBox,
primaryAnimMask = HoldingTorchRight,
secondaryAnimMask = HoldingTorchLeft,
}```
Like, you have your module set and then your have an bracket โ{โ
At the VERY end you are missing a another โ}โ
{
model PA_CarboardBox
{
mesh = PA_CardboardBox,
texture = PA_CardboardBox,
scale = 0.005,
}}```
does that look better lol?
For cleanup put it one row down in line with the one on the top
{
model PA_CarboardBox
{
mesh = PA_CardboardBox,
texture = PA_CardboardBox,
scale = 0.005,
}}```
? I have no idea what I am doing as you can tell haha.
{
model PA_CarboardBox
{
mesh = PA_CardboardBox,
texture = PA_CardboardBox,
scale = 0.005,
}
}```
Like this is what I mean, so your brackets line up
Oh thank you! I really appreciate the help!
Just looks nicer lol
hmm that works but panic is affected by external factors, like desensitized, Agoraphobic and Clausterphobic, Brave, Hemophobic
Hey so I did what you asked me to and weirdly enough I still keep getting crashes. If I send you my mod would you be able to take a look at it?
True- but itโs be a stopgap. Basically โif trait + sadโ as your first check, then โif panic and near zombies -> end the whole thingโ as your second
Sure thing
๐
I am aware the model for it is a little weird lol. I got it off sketchfab since i didn't know how to find ingame models lol.
There isnโt one for those boxes, the placed item is a tile not a model- so itโs 2D not 3d
That would work, yea
i'll still have to figure sth out for the more complex circumstances
#mod_development message << did skizot have to make a new item when he made the cardboard box visible?
hmm. I am confused on how to ask this now. So planet algol made the visible generator mod. But the difference between the generator and the box is that the box is only a tile and not a equippable like the generator?
Really quick @frank rivet edit your mod.info file, and set the id to
id=VisibleCardboardBox
then try launching it lol
okay I will! one sec haha
The generator has a .fbx file - so it is already modeled in 3d. The cardboard box doesnt have a 3d model in the base game
ah that makes sense lol. And yeah I changed the mod.info and still getting a crash lmao. I was really hoping I didn't have to create a new item lol. But it looks like I might have to D:
So- From what I am seeing is that your lua is basically just free floating- You dont have a trigger, so it is just 'there'.
I would consider either just removing the lua, and seeing if that works. Or like you said- make a new item. That way you can set more about it and make it your own
any modders that want to create some pretty immersive mods for a server let me know I'd love to talk about some commissions. (farming, cooking, creating things) or any base game changes that might make things harder like the health system and so fourth. I normally just pay weekly or we can do a one off project. also if you already have a big immersive mod and want to improve it or add on but don't have the motivation let me know and maybe I can help you find that motivation haha, thanks!
You should check out my recent mod :) It's simple, but nice for servers
https://steamcommunity.com/sharedfiles/filedetails/?id=2897228813
adds the ability to pin up / stab paper
Ill look now, I have a pretty big roleplay server.
as well as some ooc markers for event staff
Thanks! :)
Was a pain to figure out at first, but the notes keep their information when you put them up/take them down too
that's actually sick I could for sure see some like serial killer rp type stuff going on, leaving notes at the crime scene.
we had a bomber in the server a few weeks ago who left pipe bombs around and notes.
but- also, if you have anything specific in mind, me and a few friends have started some mod dev stuff recently. If you have anything particular in mind, we might be able to help out!
Ow like the tile has the paper write function?
uh oh here comes trouble
it isnt a tile, it is an item. That way you have freedom to place as you want, without the hassle of the tile system
Wow
so you can place it free floating anywhere technically as its just a floating item?
Yeah, technically- but it does mean that you can pin it to just about anything. So you could leave notes on trees, graves, walls, or whatever else you can think of
hmm i see, i'd have to be careful cause any chance my people get to abuse something to troll they will. apparently its easy to craft mortars and pestles as you get a ton with glytchers mining mod he built for us, so instead of properly disposing of the stones or even selling them because you can do that
people crafted over 3000 mortar and pestles
in like a week and just left them in piles
Jesus... That is brutal
they are little assholes if you don't watch them
Similar stuff happens with knitting needles in the base game though too, since people will find any way to farm the hell out of a resource if possible
also apparently its easy to craft crosses so at the sell point people crafted like 500 crosses and started placing them around the sell point in satanic formations.
that one is pretty funny though- ngl haha
Looool one sec then you have stuff like this on the server ๐ฉ๐ฉ I guess when players donโt have any zombies to kill they find very creative ways to spend their newly found free time
The corn lord taketh and the corn lord giveth
I think his name is cornhulu?
gotta be REAL careful with balance.
He left me a interesting note on my desk in my office.
Ahh itโs fun though, I admire the creativity of some of the random methods they have come up with. however I donโt think the people that want to mine peacefully and get more then 1 frame while doing so appreciated the large piles.
Hey did you have to create new items for the items in game that didn't have visible fbx models? I think that is probably why I am running into issues with my mod lol.
so i think i found a tool to edit the java files easier, so now you will be able to zoom out further in my zoom mod
what do you mean?
i was able to override the existing stuff
In progress work:
nice!
super cool!
Super efficient too. the light show takes place entirely in client, with only a "show setup" message going from the originating client to server then to all other connected players. Basically it causes like zero server overhead ๐
PZ clubbing incoming!
Thats the game plan
@robust briar btw PZ clubbing: would it be possible to create a modded radio which plays mp3 files of a folder stored on that server or another ftp url? also synced between nearby players?
I dont like that oldschool mp3 exchange for all clients and making sure everyone has identical files
Ummm... I don't think pz has an http or ftp Lua library enabled
I can test later, but I doubt it
Okay so then this is what I got so far. Idk if you could tell me why I would be crashing. "module Base { item Mov_CardboardBox { DisplayCategory = Furniture, Weight = 0.5, Type = Moveable, DisplayName = Cardboard Box, Icon = default, RequiresEquippedBothHands = true, Tags = HeavyItem, StaticModel = PA_CardboardBox, primaryAnimMask = HoldingTorchRight, secondaryAnimMask = HoldingTorchLeft, }
{
model PA_CarboardBox
{
mesh = PA_CardboardBox,
texture = PA_CardboardBox,
scale = 0.005,
}
}```
if scriptItem then
-- print("Visible Cardboard Box!")
scriptItem:DoParam("StaticModel = PA_CardboardBox")
scriptItem:DoParam("primaryAnimMask = HoldingTorchRight")
scriptItem:DoParam("secondaryAnimMask = HoldingTorchLeft")
end```
sorry the lua pasted weird.
this cardboard box will be the death of me.
did you check the log?
Let me generate a new one. I have been playing alot today lol. One sec.
its currently crashing. its almost done. lolol
I didn't see any errors.
And i only ran it with my mod activated.
@frank rivet sorry, I had some stuff come up
I made a file that went over my corrections, if you wanna try that
I dont have the opportunity to test it myself
no worries! And Ill give it a whirl! lol
I haven't crashed! Now i just gotta find a box haha! dude if this works, I seriously owe you man.
Taxi go broom
They've got nice models, personally prefer the white bar with black taxi logo.
So there will this vehicle in game
What do you mean by that?
Well you see here they can be randomize
I just prefer how it looks out of the 2 taxi models, just an opinion as they are both nice textures
Explains the different tail lights
Exactly
Anyone here use the only cure mod? does the arm have to be bitten to amputate it
cause I cant see any menus for some reason
so ive encounted a map bug. I tried reinstalling the game without mods, but I still have it. Based on the online map it seems some ferns aren't showing up right. Any suggestions? location 10798, 10050
this just happens in debug mode
ohh, that makes me feel a lot better! thanks
Hey so good news! I didn't crash and i seen what you wrote! That's going to be super helpful going forward. But unfortunately when I pick up the cardboard box and equip it. My model doesn't show up. I seen you said something about an event trigger. But I used planet algol's generator mod as a template and filled in the blanks with information regarding the cardboard box. He didn't have a trigger in his. So I wouldn't have a clue on how to create that haha. I was hoping I could recreate what he did for my "first" mod. But it's turning out to not be as easy as I hoped lol.
OR the Riddler could have it out for him. Can't rule that out.
Hello, I'm looking for sprinter zed spawn mod
Has anyone done it yet?
random zombies is quite good
You can change your zed's to sprinters in the sandbox settings. But yeah there are mods out there that can summon random ones. Download the silent hill mod. It will give you a killer experience if you want sprinters.
customizable zombies is another good one. But like herb said random does the same thing.
I'm making zomboid server and want to make some map have only sprinter by hoard manager
Ah if its map specific, I wouldn't be much help lol.
like create only sprinter by admin tool
Hi, I'm fairly new to the modding, and I'm here to get some help creating a mod. I'm trying to create a mod with weapons that can be converted to each other. Let's say the mod has weapon Alpha and Beta.
recipe Convert to Beta
{
Alpha,
Result:Beta,
Time:30.0,
Category:Weapons,
}
recipe Convert to Alpha
{
Beta,
Result:Alpha,
Time:30.0,
Category:Weapons,
}
When I create recipe scripts like above, I can see the converted items keep the original condition. But I'd also like to keep the original repair counts as well. I'm looking into codes related with spear-crafting but I couldn't find a clue to do so. Anyone can help me out? Or is there any mod with similar features I can refer to? Or would there be any way to make the recipe work only with items with no repair counts?
This mod here hasn't been updated in a while and I would like to strip the core feature of it and make it into an addon to the original bow mod. Would anyone be willing to help me do so? https://steamcommunity.com/sharedfiles/filedetails/?id=2830364476
the creator of it made it an entirely stand alone mod so it's fallen behind the original.
So I'm working on a sort of quasi mod/patch for a bunch of the military vehicles on the workshop. I've noticed that with the exception of Filibuster Rhymes' cars, NONE of them have what I would consider to be "military" themed loot. So I've been working the last few days on a set of loot and vehicle tables that allows a lot of military gear from both the vanilla experience and many mods to spawn inside any abandoned jeeps, deuces or humvees you'll find. In addition to KI5's US army stuff, I've added cars from a few others into the mix as well.
Also, I've created a class of military vehicle called "Black Ops". Blacked out army vehicles that are very rare, but are filled to the gills with high grade loot. I like to think they're immersive. The idea being that in those few early days of the outbreak, these task forces were running around trying to figure out what was going on on the ground. weeks or months later, their rides can still be found, scattered around the map. Finding one of these would mean you are very lucky and are having a good day:
That would be easier to do if you could somehow get the version of Gluten the Sensitive's original mod that Chill down based their modification on.
But yes, it's annoying that the Bow and Arrow AddOn QoL mod has been updated to work with the new version of Gluten the Sensitive's mod, and so is no longer compatible with Alternative Drawing.
yea it's a shame because I love the alternative drawing mod.
Nice
Anyone know of an elegant way to 'lock' an inventory/item container?
Basically- put items in, "close/seal" it, and it makes it so there is no way to access the things inside without actually "opening" the item
object containers can be locked, don't think there's anything like that for item containers
yeah, i know about the locking mech for obj containers. My goal is to add boxes/packages that can be sealed/opened
Like- In inventory, as items
I'm confused
you can store all the items into moddata and destroy the original container and recreate it when it's unlocked, but that's kind of a massive nightmare of figuring out which properties you need to store and stuff
maybe you can just hijack the inventory ui?
oh you'd still have to block stuff being taken out for like recipes and stuff...
Yeah, that sounds like a cluster fโ ngl. I wanna avoid that sorta stuff if possible. Iโm thinking I could hijack the UI like you said, make it so that it doesnโt show anything inside unless you specifically open it
Would something like this be viable as a mod?
I think it's be interesting to have a proper multitool, only downside is it'd be pretty heavy.
yes, and using tags it would be really easy
Would have the functionality of an axe, can opener, screwdriver, hammer, and knife all in one.
Would likely dumb down it's damage though since it's meant to be a tool and not a weapon.
Axe part is for cutting trees.
yeah, you could do that. would be pretty op- imho. but it would work
I was thinking of making it moreso like a craft able that requires a crap ton of supplies.
You'd need every piece, perhaps some carpentry, some duct tape, screws (wow a use for screws!), etc
Was also thinking like tool kits.
Would be heavy but just means you can transfer one item instead of like 5.
Multitool might be more proper for something like this but I dunno
Toolboxes already kinda exist I guess so shrug
that would be pretty easy too, same deal. You'd just have to copy over all the item tags from each item into the one you wanna add
it does
Sweet
so does hammer, saw, and more
Well this'll be an easy implementation.
yeah
Only problem is how am I gonna balance this cuz a multitool is like you said, kinda op.
it should definitely be the worst axe
Def
okay well it's hard to be worse than the stone axe, but let's ignore that one
Maybe equal to, if not a tad better than stone.
You'd have to sacrifice a hand hatchet or something to get the parts so
Man how would I balance something like this-

The creation fee in itself may be it's balance.
Cuz it'd likely require a hand hatchet of some sort, a screwdriver, screws, perhaps proficiency in some skills a saw (?), a can opener, a hammer of some sort, and a knife of some sort.
Perhaps metalworking skill.
Throw in some screws and scrap metal requirement and I think we're closer.
is there a list of all item tags, or do i need to dig through the item lua to find them?
I never really like tools like that because they do everything badly rather than one or two things good
Thinking of making it makeshift
Companies can't do it right, so you make it yourself.
remember everything is a hammer if you try hard enough
Fair point
i dont think its possible, but it would be really cool if you switch weapon modes to some of the different tools
it's possible but kind of a pain
Incoming new mod where you can visibly see most things you pick that don't currently have a model when equipped. I have finally gotten one step closer to bringing this mod to reality.
Absolutely, yeah.
Blair Algol made a mod that adds multitools and the like. There's a standalone version as well as being part of his Advanced Gear mod.
isnt @faint jewel doing the same? he posted a lot screens here. holding tv etc.
also there is already this. so maybe Skizot doing a coop and extend this mod? https://steamcommunity.com/sharedfiles/filedetails/?id=2809719515
He knows. His getting advice from skizot
Must be lvl 10 strength to be able to lug one of those beasts with ease.
I remember almost breaking my foot replacing one of those
just use glue ๐คฃ
How can we add items to a tag table without writing it on the item script?
And can wr create own tag with lua
New Tag Info! - Several new Tags were added to the item scripts, and their functionality added to the lua code. - This allows for modders to add new items that seamlessly work with the game in several places, such as adding new fully-functional Sledgehammer items, or adding new Gasoline container...
Ow yrmeah now i remember this.
Yeah I'm aware it's been done before. I'm just making the mod for myself atm. Anything I make I can guarantee skizot could do better.
I had a look comparing the code from the Alternate Draw mod to the current version of Bow and Arrow. It's a bit confusing because B&A has updated since AD took it and made changes on top (as you know), and AD appears to change quite a few things beyond the drawing of the bow, but it looks like it should be possible to write a mod which just adds the left-click-to-draw, release-to-shoot behaviour of AD to B&A
or work together with him. maybe you can split things up
Thats true fuse.. but the thing is seddows want to create the mod uptill skizots's current progress.
Not like beyond it i think
he lit wrote Incoming new mod where you can visibly see most things you pick that don't currently have a model when equipped
so I guess he wants to do this for a lot items, like skizot. so why not split the work
I plan on expanding it. But again it's for myself. Skizot said his mod compendium for the visible assets is already out there. But I wasn't able to find it "because he never uploaded it" so I decided to retrace his steps. This is my first mod. Weather it gets put on the workshop by me or someone else isn't my focus. Also. In regards to us working together. Skizot is leagues ahead of me. He would get more done with less time just working on it himself lol.
"Incoming mod" was just an update on my progress lol.
That would be great if so. I'm at work ATM so I can't really talk but I'll hit you up when I get home.
Cool, although it's 8pm here so might be ๐ค by then ๐
No worries.
I want to have visual difference between converted items (buckets) for uis and the best way seems to modify the icons. Considering these are very small in size, what's a good way to do this? Scaling down other textures like pvp_icon and backpack would probably not work for this.
Ah ok then. So you plan to make all vanilla's missing static models? Or just the big ones?
Anyone knows how to capture the square you right clicked when doing context menu
Like the getSquare() of that rightclick
worldobject:getSquare() is how vanilla does it
I mean one of worldobjects btw, not the table.
Is it ok to make it worldobject cuz i see all the params use worldobjects
Ah so i have to loop thru it and look for what exactly? To convert worldobjects to worldobject
it's a lua table with items in world
there's already some context's for actions on clicked players like medical, not sure where it is though
Ye and trade but i cant seem to disect it..
Same problem with what i did yesterday but it was inventoryitem
I think this is a diffent set of pain ahead of me lol
I was only able to do it cuz gravy helped me
But idont think i can apply the same method
This mod is no longer being made as we have moved on from modding!
anyone know a similar map mod?
this one i have been waiting for a while but it has been canceled sadly
What was this mod supposed to do? Just edit the map to make it more trashed and wild? ๐ค
Mh I see ๐ค
Is possible to change getSaveInfo() properties?
in case someone finds it useful, kahlua has serialize and deserialize functions
print(deserialize("{x = 10}").x)
print(serialize({x = 10, y = 50, z = 20, object = {one = "asdsa"}}, "\n", " "))
Is the modder for the basement mod here around? I would like to know if the code is opensource
Why not ask in the comments of the workshop page?
When youโre trying to tell squidward to get a job lol
MY mod is currently on a private rp server. That's why it's out there, but not fully released.
anyone knows how you can access the inventory of duffel bags and such through your character?
There's the something function on the something object, which can be found somewhere in the java API documentation or in some parts of the base game LUA where it calls relevant functions. (this answer is not greatly detailed)
Has anyone made a chemlight mod?
Is there a way to have joggers zombies? Like spriters, but less fast
Authentic z has chem lights
Amazing! This can be so usefull to dump lua tables to a file and then parse it again
Sure why not, the only issue I'm aware of is that modded lights dont sync well in MP
As an example, authentic z chem lights don't sync up
Wonder what vanilla does differently.
Most of the modded light especially the one you can "wear" they just make a client side light, that's why
Ah, I see.
I'm fairly sure that it can be synched with some networking code, but it's quite challenging
In my mod I send a simple message from the source client to the server, which then relays it to all players about a light.
It's really quite simple once you get the idea
Tell me your knowledge
Interesting, does it sync if the light moves?
Well, in my case its about lamps, so they are not moving, but in theory if you say "PlayerX has a light of X color with Y intensity" the receiving client could do the check of their orientation and apply the light there.
Then use the OnTick event to adjust the light.
Obviously, lots of bail early checks would be needed to keep up performance
The other "gotcha" is when dealing with both SP and MP. I had to do a bit of weird things to make it work in both. If you want to see all my lua, and how I accomplish it you can look up the "Remote Lights Controller" mod. I do both "server synced" and "clients only" light modifications.
Hi, did someone fix the dup of any item through disconnecting from the server?
I don't know, maybe you can somehow implement a delay in exiting the server, or at least an idea of how it can be implemented?
Does Events.OnCreatePlayer trigger when a player is created, ala joins the server or starts the game. or is that in reference to the character creation screen?
It doesn't seem so. I wonder if there is an event
Does anyone have a list of mods that have a public git repository? New to modding and good to see how some things are done
Wait, maybe it does.. I had the params wrong. Testing again lol
You can see all the lua to any mod you are subscribed to
^^
Assuming windows, C:\Program Files (x86)\Steam\steamapps\workshop\content\108600
Need some ideas for what should be in what tier for like, a makeshift multitool mod.
Right now i'm thinking like
SMK = Knife, Can Opener, Screwdriver
LG = All features of SMK, Saw, Scissors, Spoon
CT = All features of SMK + LG, Hammer, Axe, Wrench
TS = All features of SMK, LG, and CT, Shovel
Don't know if the "Tactical Shovel" should have access to a lug wrench or not.
The solar mod is on github
every time a character joins the server
if you want to only fire on creation, set some mod data
Ty
would the :stop() function in timed actions get called if the player quits mid timed action?
yeah
neat
ooft of course, that makes sense haha
ty!
I have a small problem that's driving me crazy and not sure whether its a problem in the logic which I am not noticing or the overall style of the code
Hang on lemme upload code to pastebin so it's more readable
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
So according to the code, it checks if player:getModData().breakIntoTears_lastRoll and player:getModData().breakIntoTears_lastForcedCry are equal to current in-game day
... yup i think i just found where the issue is now that I laid down the problem.
could i comment on performance?
of course
as the code currently is, you could remove the function from onplayerupdate after they finally cry, and have it readded by a check in everydays, and it would behave exactly the same but not run the day checks every frame
you could also have a function oncreateplayer that checks for the trait and only adds the event if they have it, so you aren't checking for the trait every frame
How do I exactly do that? Also to keep in mind, I have to take into account players who may try to cheese the trait by quitting mid action, so the code will consider the crying action be done when it actually is done, not when it starts
like they quit the game mid cry? that's a pain
yupp
hence me asking about this
oh
but basically my thought is instead of this
player:getModData().breakIntoTears_lastRoll = getGameTime():getDay()
```you can use
```lua
Events.OnPlayerUpdate.Remove(nameOfFunction)
```you'll need to use the traditional function constructor and then add it to the event, not
```lua
Events.OnPlayerUpdate.Add(function(player)
```to do this, though (but you should do that for the sake of patchability anyway)
then you have a function on EveryDays that just readds it
hm yea that does sounds more viable performance-wise. Definitely not acceptable to have the code repeat itself each frame if the action was done already
I will keep that in mind, thanks!
Say I wanted to have access to the ingame models for my mod I am making. Are there accessible fbx files. Or are they call only?
steamapps\common\ProjectZomboid\media\models_X
Is .X extension just a renamed .fbx?
no you'd have to convert them
There are also .fbx files in the subfolders. For the .x, like spongie said, needs converting
the character models and most clothing items are pinned in the modelling channel but you can use https://3d-convert.com and convert to ".dae" and they usually work fine in blender
Convert any 3D files easily and quickly with our free online converter. Whether it's STL files for 3D printing, OBJ files for computer animation or CAD: we can easily convert them all. Give it a try.
Thoughts?
Honestly speaking not sure what I am looking at
Swiss Army knife right?
Correct
that's actually norwegian.
I'm working on a permadeath mod, someone knows if is there a mod similar to this?
any idea why I am getting __le not defined for operand at if (currentUnhappyness >= 80 and currentStress < 0.75 and chasingZombs == 0 and visibleZombs == 0 and veryCloseZombs == 0 and attackingZombs == 0) then? Not sure what the error means
either currentUnhappyness or currentStress is null
hmmm yea actually both are null since I apparently defined them inside an if condition that didn't get executed
Thanks!
Would this be the correct way to do it?
function BreakIntoTears.ForcedCryCheck(player)
--code
end
Events.EveryDays.Add(Events.OnPlayerUpdate.Add(BreakIntoTears.ForcedCryCheck))
function BreakIntoTears_ForcedTimedAction:perform() -- Triggers when the action is complete
--Some irrelevant code here
Events.OnPlayerUpdate.Remove(BreakIntoTears_ForcedCryCheck)
end
the horror
Stuck on textures - icons. Need something that would make more obvious what type of bucket you have in inventory and also radial for conversion.
you can't pass a function call to an event, only a function reference, otherwise you're just passing it the return of that function (which is probably nil)
you also might need to check the event isn't already added, or you could have it doubled (i think removing the event before adding it will work, i don't think it'll error if it's already been removed)
So what's the best way to do this? Adding a function to an event -- inside of an event?
How do you check for that?
Type of bucket?
I add bucket conversions, weapon, container types. (Plus also compost and dirt use)
function BreakIntoTears.EveryDays()
Events.OnPlayerUpdate.Remove(BreakIntoTears.ForcedCryCheck) -- i don't think removing it when it's not actually there will throw an error, so this should be fine - do test it though
Events.OnPlayerUpdate.Add(BreakIntoTears.ForcedCryCheck)
end
Events.EveryDays.Add(BreakIntoTears.EveryDays)
You changed the item type of empty buckets to weapons?
no, add new empty, add weapon add container
So you have to right click to convert?
Besides the item deletion on old saves/or removing the mod- there isn't an issue with changing the type btw
but for ease I also thought a radial menu would be useful
I did it for my Vanilla Weapons Expanded mod
I am stuck on images
Let's say I add a second item, I need to differentiate them somehow.
Thanks!
Does OnCreatePlayer get called the first time a character is created or every time a character spawns?
i think once but it gets called even if you havent spawned and itcauses error.. i cant really remember for sure tho. , this what i recall from last time i was making an SP mod.. i ended up using moddata..
ongamestart then apply tthe moddata .. read it next time skip the functions
yeah I saw this mod after I already started
Hello. Been a mighty minute since I've been on a PC.
really? hmm what could have i ben doing wrong then
ah wait i remember.. its not oncreate i think it was something else like even before you choose a server
Might be more active again with helping people in here for TypeScript / some Lua questions. ๐
yey for sledgehammer ๐
Any idea what both those warnings mean?
Warning that gamesound doesn't exist-- even though it working perfectly fine?
also what does "bugged action, clearing queue" mean, even though the timed action is working perfectly fine?
ow its a time action thing,, the bugged action isnt really an error the first one is obviously a missing audio file
so its safe
the bugged action it hink it cuz u canceled it
bugged action means cancelled or invalid i think
kinda weird since the bugged action thing only happens when the timed action finishes
but how can it be missing if it plays o-o
Does anyone know where most of the movable items are? I found punch of them at the scripts/newMoveables, but most are not there
it means there isn't a gamesound, not that the audio file is missing
what do you want to do?
Most of it is defined in map tools.
I need their item names for a recipe
you'll want to use sprites instead probably.
What's the difference? Also do I need to worry about that warning in the first place --- Does it affect anything?
i don't think so, vanilla has that error sometimes too
sprite names act as item names in recipes as well?
I use something like "moveables.sprite_01_01"
Thank you. I'll give it a try
does Paw Low Loot still work?
there's a thing that you might spawn an item "module.myitem" but after you pick it up, it will be a "moveables.spritename"
#mod_support message
things to ignore in console...
I am trying to add a Cry to sleep context option that "inherits" all of the Sleep option properties. That means appearing where the Sleep option appears, when the Sleep option appears, and when pressed, executes the same function as going to sleep. Only difference is that I am adding an additional piece of code that lets the player actually cry to sleep and removing some moodles.
Would there be an easy way to do that-- Inheriting all of the properties of the "sleep" option into a new context option?
Can you clarify on that? What exactly is "hook"-ing?
it's about a million different things and whoever you ask will say different things do and don't count ๐
okkkkaay.. so how do you hook then ๐
oooo that's hooking. Done it before, but I don't get how'd that work on adding a new context option
local old_addOption = ISContextMenu.addOption
function ISContextMenu:addOption(name, ...)
local option = old_addOption(self, name, ...)
if name == 'Sleep' then
-- whatever
end
return option
end
you can add another option, hijack that call, whatever you want
You hijack the original contest menu
if this isn't applicable then i don't know what you mean by 'inherit'
We wre thinking of the same thing but she just coded the thing while i search reference lol. Albions wizzard
Doesn't that edit the original option?
It does in a clean way cuz u stored the original one . It can still. Be used afaik
And your intention isnt really going to cause serious mod conflicts i think cuz ur just adding sound right?
you can choose not to override it and just run your own code next to it
not quite, my intention with the new context option is, aside from adding a sound, removing some moodles like unhappyness
Ahhh but it would be better if the sleep is the same . Doesnt show cry to sleep
But would cry when depressed
I thought about having it automatically come into effect when you're too depressed and go to sleep
but not optimal since it'd conflict with other mods. Sleep on it, for example. That's why I am giving the player the option to choose to cry to sleep in the first place
Oh i never played with sleep on so i really dont know
hmm I will think of something. Thanks either ways for you both!
you can even just not hijack it
There are mods that tampered with sleep already? Then i gues that would be like part of the description saying conflicts with ___ mod
I prefer to have it compatible with other mods if I can help it
wdym?
you can just use that code to trigger your own code
you don't have to override vanilla at all
hmm i guess that's a possibility
i don't know what else inheriting an option might refer to
The other thing to note with overriding methods by keeping a ref to the original and replacing with your own is that you want to make it work when you use F11 to reload the script. So you might want to only assign the var to the original function if it's currently unassigned, so you don't end up replacing it with a long chain of function closures with all your bugs baked into it.
If I'd reword it to being more clear, I meant simply copying a context option into a whole new one and adding to it
I guess that was answered already (If I am understanding correctly)
i guess your code could run the vanilla function twice, edit one, and return the unedited one
yea that makes a lot of sense
I'll try to think first of a way to make it work without having to utilize context options in the first place. Easier that way. Gonna have to put it off as a last resort considering how problematic it may be
Is there a sound produced when sleeping ? Like flre example snoring? If u overwrite just the sfx
That wont cause any bugs 100%
i doubt there are any sounds played when sleeping except the meta events/zombies
I may end up having the code automatically trigger when sleeping
and just simply adding a check if player has any mods that may cause conflicts
so it goes like
if NOT has mod that may cause conflict then
if player:isAsleep() then
--code
end
end```
Hmmm... Ok probably the last idea i can think of. I think theres a way tk create your own even
If you could then just have a listener that wait for the isAsleep
Or is kt called isSleep? But yeah
Then if it know the player is asleep and ks depressed then play crytosleep.ogg
the sound may not be even a priority/needed tbh now that i think about it
Speaking of sleep m hesding to bed now good luck arendameth dont forget to sleep lol
what would the conflict be, anyway?
Sleep On It, for example, already removes unhappyness from the player when he goes to sleep. Having my mod remove it automatically as well doubles the effect, making it overpowered
i guess the best way is to just check if such mods I may be aware of exist, if not, execute the code normally. If they do, ignore the code and prioritrise the other mods
If you're down to colab I would be. I never got around to making models for in hand.
Possible to create voice links in game? Like a phone call between two players?
I know I know (walkie talkies) but I want something a little more advanced.
In a similar manner of thinking to the discussion of context options - is there an event I can hook into to know when the player selects an option (any option, of any kind) from a context menu. i.e. "Rip Sheets" or "Smoke"?
There's Lua functions for adding context options
I vaguely recall it being an event ๐ค
Yeah I've been checking out https://pzwiki.net/wiki/Modding:Lua_Events
Seems there's a few around when rendering the context options, just nothing I could see that was for when one was selected.
You can add options after they're "filled"
This is what I remember it from
has anyone here ever used typescript instead of lua ? I'm looking for some examples ๐
Does anyone remember where the vanilla items lua is again? I appear to have forgotten where it was
What is vanilla items lua?
where all the item info is stored right?
Oh wow yeah (I wanted to type something about forgetting but what I thought of seemed rude) it's not in a lua file it's in \scripts.
Wait, Zomboid supports scripting in Typescript?
there is some other project that allows it, ya
Does anyone use the built in attachment editor? Is it this buggy for everyone?
i don't, but from what i hear, yes
Okay, was just making sure I didn't miss something... the "rotate" on the model attachment points has me so confused. For some reason I just CAN NOT wrap my head around it. I keep holding my hand out in front of my and spinning it around like "okay okay... twist is x, flip is y. I need Z wtf"
Then I save and reload and the model is half way inside my body ๐ญ๐ญ๐ญ
anyone have a script handy for adding an option to a tile when you right click it?
Is there a channel where updates to mods can be announced? The new version of RV Interior has been released, and I thought I'd spruik it on the Discord if there's an appropriate channel.
๐ runs to mod page to peek at updates
"Enter the interior using the vehicle radial menu (instead of changing seats)." THANK YOU
The hotkey is even more convenient ๐
(But radial menu works for split-screen controller users, who can't use hotkeys)
I feel like a mod release/update channel would be a great idea
anyone working on a super immersive building mod? i will buy the time you use in making it work. looking for super immersive building. between placing new roads, laying down concrete, building houses from start to finish. let me know if you're interested
i'd like to make it possible to 100% build a normal house in pz from scratch. i know theres mods that do this, "more builds" but i want to actually have the crafting recipes made if certain things require glass, and some things require a higherskill because they have more detail. and so fourth lmk if you are interested i think it would be a cool mod, for all pz players. but i'd love to pay for you to do it if needed. i know it would be a big mod
Thats what sledgehammer did
And the authors a starting to become active agaain
anyone remember where the lua event files are? i forgot to write that down and can't find them anymore
what do you mean?
like where the list of events is stored in code
there's no one place, i think the from java events are probably in luamanager but the from lua defined events are all over the place
Do you mean the list of all event hooks being created? That's in LuaEventManager.java, function AddEvents()
Thanks thats exactly where it was
there's a bunch of events that are created from lua though, and they're just in whatever the relevant file is
Can weapon models use .fbx instead of .x?
that makes sense now!
these ones in particular
So how difficult would it be to do so?
It looks like it shouldn't be too bad actually. The Bow & Arrow mod kindly stores much of its code and data in a global MandelaBowAndArrow table, so you can drill down and get at e.g. MandelaBowAndArrow.Client.attackHook, the function that it runs when the player fires the bow.
I actually made a start on doing the overrides needed to make drawing behave like Alternate Drawing, and was having some success, but didn't get too far before I had to deal with some other stuff.
Like, RV Interior has been released, and the legacy version of the SP mod is breaking players' saves by deleting their walls ๐ฆ
What the?! My discord msg never got sent
An org called sledgehammer
They built pipewrench
A proj that allows modders to use templates typescript for pz
That's no good
I don't know the first thing about the mapping/tile side of PZ, but the walls of RV Interior were custom tiles, and they've somehow been omitted from the last release
Unfortunately Maxwelt is asleep, and he's the one who knows that side of things.
and this is just SP you say? Cuz I have that on my MP server with frinds and was just playing in my RV
granted it was actually the buss
Yup, just SP.

We left in the SP legacy version so people could upgrade in their own time... but it apparently got mangled between being deleted in Git, then recreated but in a different directory.
But, yeah, add-on version of Alternate Draw for the current bow & arrow mod looks totally doable to me.
speaking of the RV. I was trying to change the floor of my bus to wood flooring but it wouldn't let me. Will this ever be possible?
That's great.
I'll be happy to be able to use it again. I had reached out to the original creator as well but got no response
I know that the walls are custom tiles to make the indestructible. As well as stopping players using a sledge to expand their caravan interior into a mega-base, there were apparently problems in earlier versions in MP where people would leave their ovens on and cause fires which burned people in the interior of other vehicles ๐
Not sure about the floor tiles.
that would be hilarious though, infinite scp rv
yea giant rv interiors would be a problem lol. being able to change up the floor and wall textures would be a cool feature tho.
makes me think of those tiny home videos you can find on YT of people tearing apart buses and vans and making them into living spaces
So the legacy version of RV Interior is missing these lines from the mod.info:
pack=rvinterior
tiledef=rvinterior 446
Would that explain why custom tiles have vanished from people's maps?
yeah
If they didn't have a backup of their save, are we screwed?
i don't really know for sure, but probably
Ok, cool, cool. ๐คฆโโ๏ธ
Didn't test the legacy mod before releasing, just the shiny new version...
so say i wanted to get an item's tags would i go item.getTags()?
item:getTags(), not item.getTags() (usually)
that works great thanks, but umm isnt the item a java object rather than lua? isnt the colon syntax only for lua?
unless you're making a java mod, you need to use colons when interacting with java objects (usually)
They're Lua wrappers of Java objects.
im putting that on the list! thanks
if its a method that is accessing that particular object, you almost always use a colon, java or lua
if its a "static" method, then you use the dot
obv if its just a table then you use the dot as well
How do you link up a model to a weapon..?
I have an .fbx file I got, a texture, everything.
module Base
{
model SwedishKnife
{
mesh = Weapons/1Handed/SwissArmyKnife,
texture = Wepaons/1Handed/SwissArmyKnife_Texture,
attachment world
{
offset = 0.0000 0.0900 -0.0100,
rotate = 180.0000 0.0000 180.0000,
}
}
}
aaand I mispelled weapons
Well I fixed that and I'm still lost
Slightly urgent query: Maxwelt added me as a "contributor" on the RV Interior workshop item. I can edit the description etc. Am I able to publish a new version, does anyone know?
no
Ok, makes sense.
I might put something big in the description, but since Workshop items just silently update in the background it will be too late for most people by the time they come looking for an explanation.
does anyone know if it's possible to make a mod for a customizable bite zombification infection chance? ideally i'd like to make one where I could set it so getting bit has... i don't know, like a 70% chance of zombifying the character, and a 100% chance to get the symptoms of zombification whether they're truly zombifying or not. antibodies and cure mods aren't for me or my friends, but having a reason to try and save our characters while still faced with the risk of turning would increase our enjoyment factor a ton
omg. so after bashing my skull against the wall for about a 43200 seconds, I got the attach points looking right. NOOO thanks to Zomboid's Attachment Points built in dev tool for it.
Just needed to share after that slog
Do you know how to hook up a weapon model to an item
You seem knowledgeable there
pfft nope
agony
I just copy-paste and prayed
Was worth a shot!1
the easiest way to do this would probably be to use the OnPlayerGetDamage event to detect when a player has been bitten, and roll to uninfect them and give them fake infection instead (which gives the symptoms of zombification)
thank you
im going to try and make this but it's going to be the first mod i ever do that's not just adjusted values of existing mods for personal use, so.. wish me luck cause i feel like im getting myself into a few days long disaster
[x
I love this idea. Make it so you don't know until its the very end
good luck!
i wouldn't mind a mix of that and antibodies honestly...
or like generally, 'antibodies but there's a chance you're just fucked'
although i've never been able to get antibodies balanced how i'd like it either
maybe this is a bad idea actually... i sort of like yours best
uh
do you know where to find that event?
Events.OnPlayerGetDamage.Add(yourFunction)
Wait, that event isn't there
It's defined in Java though
jeeze coding is scary, i'm on FWolfe's zomboid modding guide on github and i'm struggling to comprehend anything i'm seeing
It really can be at first. But once you try, and fail, and try, and fail, and THEN it works. No better feeling imo
out of curiosity, a mod with really limited scope like i outlined above, how long would it take someone experienced to make it?
because if it's like "someone experienced could do it in 20 minutes" then i feel a bit of confidence in its simplicity, and could try powering through
Do you know the basics?
not a thing ^ ^
Well the game is based on the lua program language
Learn the characters first
Do some algoritm exercises
i think i could do it in twenty minutes, but my guess is something would go wrong and i'd end up actually working on it all day
that's typically how it goes
Ik
the onplayergetdamage event is pretty weird, i'm not sure how perfect it is for this usecase
Rough rough guess, an hour to get it working, then another hour to iron out the bugs. Then some infinite amount of time polishing and adding little features like custom text the char could say as they are getting sicker, and making them sweat more, etc
thank you for the realistic estimates, so for someone with no experience with coding at all, this is at minimum a full day kind of thing, right?
But lets be honest, we always over-estimate our abilities, and under-estimate the task at hand
I just starting trying to mod project zomboid and its slow going, but im making a ton of progress
Like I could spend a whole day on it and not be happy lol
the event is too recent to be mentioned on that wiki, but i made some notes on it here
i can't promise they're perfectly accurate, i'd like to go over it again sometime soon (and maybe compile an overall event guide, as the one on the wiki is slightly outdated and occasionally too vague to be useful)
i misremembered there being specific damage types for specific injuries, so this may be more annoying than i initially thought
May be defined in Java, but not called
anyone know wtf this means
self.character:setMetabolicTarget(Metabolics.HeavyDomestic);
nutrition related?
ah ok thnx
Seems like it changes the Thermoregulator in BodyDamage, never looked what that is, but it includes Nutrition too.
ill just omit it from my code.. im reverse engineering the
ISRefuelFromGasPump
and
ISVehiclePartMenu
basically to do the reverse
What determines if an item shows a condition bar when you hover over it in the UI? Is it just whether the item has a defined ConditionMax?
Java: InventoryItem doTooltip
Thank you!
is there a way to tell whether or not the food you ate was stale or not
preferably also how much hunger it reduced
https://github.com/radx5Blue/ImmersiveSolarArrays/blob/main/Contents/mods/ImmersiveSolarArrays/media/lua/client/SolarUI/ISAUI.lua
Here there's an example of custom tooltip, but you need to patch the metatable.
Otherwise you can hook to lua and draw more things, examples to this are show food freshness and have I found this book.
@finite owl
Thanks! I'm trying to work out why an item with a reduced condition (a bowstring) shows up with a condition bar in the Bow and Arrow Alternate Drawing mod, but not when it has a reduced condition in the Bow and Arrow mod.
ah, check how they call the DoTooltip, if it's vanilla and what item they use.
I might have misunderstood something again, is alternate drawing for UI drawing, or... ?
They seem to override ISToolTipInv:render in one case and ISToolTipInv:prerender in the other, storing the original function and doing a bunch of stuff. Wow, is that really the best way for mods to customise the tooltips on their custom items?
yeah, when java is involved...
or UI...
Its... not great. Oh well, at least I can see why the tooltip might be different between them now, when the item definition of the bowstring itself was pretty much identical.
Thanks for your help!
i wonder what rotator lib does to the debug
loooks very useful
but idk what its for
i think its sorta the same as what chuck did only it was print,. rotators lib is more on debugger?
--- for the job board
local function setupJobBoard(player, context, worldObjects, test)
for i,v in ipairs(worldObjects) do
if v:getSprite() ~= nil and (v:getSprite():getName() == 'trashcontainers_01_18' or v:getSprite():getName() == 'trashcontainers_01_19') then
context:addOption('Check Job Board', player, openboard, params)
break;
end
end
end
local function openboard()
getPlayer():Say("open menu");
JobsUI:open();
end
-- ------------------------------------------------
-- Game hooks
-- ------------------------------------------------
Events.OnFillWorldObjectContextMenu.Add(setupJobBoard);
``` anyone know why it;s not calling my openboard function?
don't think lua hoists
not an expert in lua though, but that's what stands out , maybe put openboard above setupJobBoard
So the alternative bow draw creator replied to me and is alright with us altering the code. I was wondering if maybe I should point him in your direction if you are already in the process of changing things. He says he has some sound effects that can be used.
Any reliable way to grab the last index of body parts? I am aware I can loop from 0 to 16 to hit them all
(I just don't like hardcoding)
BodyPartType.MAX
When I do that it returns MAX
Which... doesn't make any sense to me
print(BodyPartType.MAX) => "MAX"
wtf does that even mean and is it useful?
hmm i seem to remember doing something like that
if that doesn't work then you could just loop until you get nil
oh maybe i looped from 0 to BodyPartType.ToIndex(BodyPartType.MAX)
yep, that's what i did
or well actually i used that to just get the number of parts but you can use it for that
Oh, lit, nice... but I think I would need to loop to that - 1 in Lua.
This is no good print(getPlayer():getBodyDamage():getBodyPart(BodyPartType.FromIndex(17)))
But thanks so much!
probably - as i said i didn't actually use it in a loop, i just used it as a bodypart count
print(BodyPartType.ToIndex(BodyPartType.MAX)) => 17... perfect
can someone explain an error that im getting while using a mod?
what's the error?
the mod is Random Zombies
your sandbox settings for crawlers, shamblers, fast shamblers and sprinters don't add up to 100
i see thanks
Hmmm so I am looking through Lua for any example of pain-setting and coming up with zilch.... is pain handled entirely Javaside? All I seem to be able to do is check my pain levels, not change them... tried setPainReduction, setStandardPainReductionWhenWellโ, setPainReductionFromMeds, setPain itself (in Stats) . . . Nothing seems to change the pain level in my hand...
i wouldn't be surprised if it was set by the java every frame, a lot of health stuff is
a CalculateStats hook might work, not sure if health goes through there or not
it does not :(
Mmmmm makes sense. Weeeeell fair enough then.
Does anyone have a tool they use to open ".pack" files? I'm trying open the game files to find some information regarding textures for the world items.
Hmm so if I use setPain it actually seems to very briefly reduce pain, but it rapidly returns to the value determined by my wounds. @bronze yoke
i think tilezed has a tool for this
awesome thanks.
Just launched the RGB Update for Remote Lights Controller! https://youtu.be/WzAhRPRRHc8
you should make it so you can set lights in a sequence so you can do GAMER RGB RAINBOW LIGHTING.
also, would you like a custom Holding controller animation?
@robust briar
Wouldnt #BodyPartType work?
Ahh i guess not
it's not a lua table
This godly wow
setAdditionalPain is what you use to add new pain. Normal Pain is determined by other factors while AdditionalPain is added on top of that. Directly setting Pain will fail because the game will just recalculate the Pain again.
For example to add a headache:
getPlayer():getBodyDamage():getBodyPart(BodyPartType.Head):setAdditionalPain(20.0)
Though if your goal is reducing Pain, then yeah. That is Java side as its a deterministic value. You'd have to alter how its calculated.
There is sort of "Gamer RGB" with the "Group" show, but I do plan to add more shows in the future.
As far as the animation goes, I would love one! I just told it to use the Flashlight animations cause I have no clue how to even start with that.
get me a picture of how you would like them holding them (imagine they have one in each hand) and i'll set ya up.
if you can only find one arm that's fine, i'll just mirror it to the other side.
For the record, so modders know in advance, we have hardcoded out negative item weights for build 42 in our internal development branch.
It has proven to be problematic and generate bug reports, including sending vehicles into space, to a point where we need to remove that feature.
The game was never designed for negative item weights, and it breaks multiple features of the game.
Surprised that's a thing you can do in the first place.
Figured those would be clamped values at runtime.
what has a negative item weight? A balloon?
RIP vanilla helium balloons.
There's a bunch of mods that use negative weight items as cheat/"magic" items.
interesting
There's a lot of stuff mod wise intended for super looting/hoarding that generates bug reports ๐
Used to be trunk space mods before the save optimization was implemented.
Was a daily issue where people using trunk space mods reported their vehicle/vehicle contents evaporating.
so you can't change the size of a trunk anymore? thats a bummer
i think they just mean you can't do that via negative weight anymore
Mmm wish that nametag text rendering above players was customizable.
Its not a bug, its a feature!
So many things that could be done with having a string property with a force boolean flag for names... like Twitch audience usernames for streaming.
And... if I get in a vehicle, and it glitches to space, does that make me an astronaut?
The Sims: Space Edition
If can determine exactly how the space launch glitch works, maybe we could turn cars into missiles ๐๐
I'd rather get the ability to drive my car through the mall's 2nd story first.
You know what they say, never let a good bug go to waste. Utilize it!
my guess is that it's related to vehicle physics weight including the weight of items in containers
I thought that the MP car glitches were the funniest.
yes, setting cars to weigh nothing has fun effects
Hello! Newbie here, can anyone help me solve this bug with the chunks. I'm currently trying to run a multiplayer server with map mods in it and I keep getting this bug. Can anyone help me solve how to properly fix this.
You could look at this metazonehandler.lua at the lines mentioned and see if you can figure out what its doing. May lead you somewhere. Could even potentially patch it to handle null values properly so it doesn't error out
lol fair enough ๐
it's just seeming to show lines to messages with how it prints the errors lol
has anyone come across the code that converts the items in the composter to fertilizer? I can only see player interactions with it. Looking at making a mod that has a similar function. I'm not sure how to program the event(s) with little server impact on how to change the amount of x item to y item over time with/without a player in the area.
it could be java if you can't find it
the way wgb handles simulating things when players aren't around is to just store the last time it was simulated and when it's loaded, simulate the entire time period until now
oh boy, no time to make and enjoy a wizard of Oz mod with negative weight houses ๐ฆ
or you could use global objects actually... that'd be easier
Yea, that's how I understood the farming system to work
this is what I was thinking as well
come to think of it, that *is* what global objects do ๐
I bet those items are removed when a player comes close
do you have any examples of this so I can take a look at how it's done?