#mod_development
1 messages · Page 243 of 1
Is he allowed to go outside ?
If no then you can simply:
- On spawn, access the building the player is in
- Write in the mod data of that building the player
Then
- Every minutes, access the building the player is in
- If not in a building, then player is not respecting the house arrest
- If building, access mod data and the player assigned to that house
- If player == player assigned to that building, then house arrest is respected
- If not then player is not respecting the house arrest
Anyway that would be a very cool concept and truly not hard to make in fact
I kinda wanted a fuzzy radius, have it give a warning beep if they were getting close to the radius, and then full-on alarm if they leave it. Structure it as either a trait for a start or just as a separate challenge map.
You could use the distance method of Vector3f for example to calculate the distance to the starting point
cool. Thanks for your advice everyone this gives me some direction to start in. Is there a mod manual or wiki to reference as i'm going along? I come from linux so don't want to get hit with a RTFM
Quick question - is there a way to cancel the skill loss/remove skill loss if you die via player/pvp? Is there an existing mod (other than the skill journal) that covers this more specifically?
zomboid-javadoc site has good API documentation
i wanna say there's something called cow's respawn, or something like that. I'm sure you could fidget with it to make it only work on a pvp death
might have the name wrong, been a hot minute
im way off but https://steamcommunity.com/sharedfiles/filedetails/?id=2687842971 would be a decent thing to look at for reference
I am trying to get "worldZRotation" of an InventoryContainer (inherits InventoryItem). It has no getter in InventoryItem, but I can get the value using GetClassField. However the inheritance hides this value for the GetClassField in the InventoryContainer. I also checked the metatable of the container, but it doesn't contain it either.
Does anyone know if there is some way to get the value using lua?
It is a public int, but the class only implements set method for it
Looking to commission an outfit mod for PZ that will be the Hive guys from Kenshi?
go over to the zomboid modding discord for a proper commision forum
Is there's another discord server for modding?
yes
Ah, I didn't realise. I'll check it out
have the link?
Hey, just to make sure i'm doing it right. When you want to patch a file, you just give it the same name, right?
this would in most cases overwrite the file.
what kind of file are you talking about?
A Lua file, I think overwriting the file should be fine though
I would not recommend that for a public workshop upload if you can avoid it
But it can work
If necessary and if you have permission
But if you clarify your goal we might know a better way
I am trying to make an edit to a line in Udderly Evelyn's programming so the code does a consistent removal of xp, rather than making it randomized
What is the file name and mod?
Probably udderly knocked out
Also burryaga i solved the context menu issue. It was exactly what you pointed out.
I made a mistake somewhere and referenced incorrect parent
Glad you solved it
@coral lava not sure you saw my response the other day.
Hey guys,
I'm looking into a method to mess with the zombie population through ingame metrics, like day, month, year and so on.
My first thought was to use sandbox.zombieconfig to adjust the sandbox multipliers, but those can't seem to be edited, nor does it let you lower the zombie.
Manually tracking the zombies and adding/removing them doesn't seem to work, because you can't grab them if they're ouside of the cell.
Would anyone have another method I could do this?
@thick karma hello, have you by any chance done any modifications on Rimworld?
Nope
Why do you ask
need to edit one mod, one aspect, but i cant xD
just one number
heya, not sure whether I'm right in this section or another but...
I'm working on a little something where I made some Keychains that can be attached to Noir's Attachements (Backpacks)
I've asked someone with help on some models since I know nothing about models. They've then modified them and they actually work but there is one problem:
no matter what the person I asked for help does, the models stay right down there and aren't up close to the backpack like the spiffo is
I uh... resolved this
found out that Noir's uses different types of attachement types and depending on which one you take the model is on the backpack differently
why do I always find an answer straight after asking a question 😭
Apologies! I was dealing with server stuff on my end
I forget the file name off the top of my head, i know it's a .lua file related to leveling. It's Udderly Knocked Out!
No rush, get back to me when you have the details about what you want to change and where.
Just overwriting the .lua file by giving your file the same name should probably work but you have to ensure then that your mod is loaded after the mod you want to patch.
In case the function you want to patch in the Udderly Mod is a global function, there might still be alternative (and better ways) to patch it. The basic structure of such a patch could look like this:
local function myPatchedFunction(something, ...)
-- [insert new code here]
backUp_UdderlyFuntion(something, ...) -- execute the original function
-- [insert new code here]
end
UdderlyFunction = myPatchedFunction -- overwrite with your patched function```
For making this work, you should additionally ensure that the Udderly Mod is already active and loaded before your code. And this won't work in case the function from the Udderly mod is not global.
Please share the function. It is not strictly true that it must be global for you to accomplish your goals. There are ways.
I think it can also work if the function is assigned to a local module and the module is returned to make it accessible from other files. Or are there even ways to do this in other cases (i.e. not global, not returned as part of a module)?
There are other ways
If a local unreturned module derives from BaseObject, you can use DOME to get it.
Also, if the local function makes calls to vanilla functions that can be decorated from global space, your goal can often be achieved even if the mod function cannot be decorated.
The file is Recoverable Levels
if hasConfig then
local oldTargetLevel = 0.0 + targetLevel
if chanceToLose ~= 0 and UKO.random(chanceToLose) then --we rolled to lose something
--randomly modify targetLevel up to configured amount for this skill
targetLevel = 0.0 + targetLevel - (10 * targetLevel)
if targetLevel == oldTargetLevel and oldTargetLevel ~= 0 then --if we somehow rolled no change, not even a fractional loss, and we're not at zero..
targetLevel = targetLevel - UKO.randomDecimal(1) --you're not getting away that easily..
end
print("UKO: Randomized loss has left the new target at "..targetLevel)
if (oldTargetLevel - targetLevel > 0) then
if affectedPerks ~= "" then
affectedPerks = affectedPerks..", "
end
affectedPerks = affectedPerks..perkName
end
--elseif chanceToLose == 0 then
-- print("UKO: Skill configured to zero chance, so we don't affect it..")
--else
-- print("UKO: Got lucky, rolled to not affect this skill.")
end
else
print("UKO: Skipped unconfigured skill \""..perkName.."\".")
end
No syntax highlighting? 
Jab is suggesting you do this:
```lua
etc.
```
oh okay got it
Let there be syntax highlighting!
What do you need to edit in this function @coral lava
The actual edit i made is the line
targetLevel = 0.0 + targetLevel - (10 * targetLevel)
Let me grab the original version of the line as well
targetLevel = 0.0 + targetLevel - ((UKO.randomDecimal(maxToLose / 10)) / 10 * targetLevel)
this is the original line
Okay
there are 2 ways that I would consider
Yours is what we would call the nuclear option
Replacing a whole file
That is not necessary here
The first way I would consider might be likened to a missile
You overwrite just that function
That blows up something, but not everything
The third option
You can store the old function and invoke it.
Which is what I would call the assassin
@red tiger did you read the function and their goal?
Nope.
😉
Anyway, the third option
is to decorate UKO.randomDecimal when it's called from this function only
That would be the option I would use
For minimum casualties
But it would be the most complicated to implement mentally in a way
More complicated than copy-pasting a function and changing a number
The final code would actually be shorter
@coral lava You decide
Pick your adventure and I'll give you an example
I think just because I'm a new coder, (and the actual file is small) i'll stick with just replacing the whole file and seeing if that works. Since it seems easier to wrap my head around. haha
I would strongly recommend not that option lol
The missile option is very simple
And much less conflict-prone
If the assassin intimidates you
It's such a funny way to explain it
lol
I'm more wordy with my way of explaining.
I'll leave that wordiness to my documentation project. =)
Okay the missile is this:
- Make your own file with its own name in your own mod called MyNameIsBanana.lua (no other name will work; this is the only filename allowed in Lua).
- In MyNameIsBanana.lua, add the attached lines (which are 31 through 133 of the original file).
- At the top of that file, add the following line:
require("UdderlyKnockedOut/Recoverable/RecoverableLevels")
- Change whatever you want.
In step 2, we're copying the function you want to change and the 2 local functions it will require.
@coral lava Godspeed.
Thank you so much for the help 🙏!
Also in your mod.info add a line that says require=UdderlyKnockedOut
And link back to her page with credit
Does anyone have Information about the Discord Functions? Looking at the Documentation it seems like you can only send messages and there are no functions to Read or Recognize commands
making rdr1 music mod
This is code from superb survivors, it should be what gives ammo to npcs based on the guns they have. i added modded guns but i cant get the mod to give ammo to npcs for guns with new calibers, can someone help me? the ammo that needs to be added are
( bullet itemID - Ammobox itemID ): (Mod id of guns and ammo being added is Guns93 if thats important)
10mmBullets-10mmBox
40Bullets-40Box
25Bullets-25Box
22Bullets-22Box
357Bullets-357Box
792Bullets-792Box
30CarBullets-30CarBox
76239Bullets-76239Box
556Belt-556box
ShotgunSlugs-ShotgunSlugBox
Hi, can someone help me with a script to identify when a player is wearing a specific jacket?
So how can i work with ".tiles" files? Idk if it's necessary but I'm trying to find "changing one item to another" script or something that i can use and for now i have no idea where can i find it. Tried to do it by making new recipes in .txt but the game doesn't even want to open.
guys, I want to add a windup phase to miniguns from Arsenal gunfighter mod
but I have zero knowledge of lua coding and I dont get the mod's structure at all.
I might try ask ChatGPT to write the script for me, but not knowing the mod's structure makes me stuck hahah
any tips will be much appreciated!
(the script written by the AI, just in case)
does anybody know if it's possible to change a specific stat on every item via a script
hey guys, the mod I want to make is a touch unusual but I think it would be very useful for many
I just want to make it so users can combine and uncombine stacked boxes
so three cardboard boxes wouldn't be three separate inventories, it would be one
the thing is, when I look at the code for other mods... I really don't see any hints on how I could achieve this
I guess it wouldn't be that hard for me to make a crafting item that stacks them one on top of the other? but does anyone have any ideas for how it might be possible to just click on the stacked crates and have a "combine" button
Might be a tough one, for instance, one egg is not a stack but a dozen eggs could be put into a carton. If you take one egg from the carton its now a carton with 11 and that could be handled by the Use() and a usage bar. But I think you would need to define what a stack is to make that work for each item type you want to stack. Otherwise you could just make a recipe combine 12 eggs into a carton and another that empties the carton giving the player 12 eggs. Hope that makes sense... I have seen this done with stacks of bowls, etc...
of course if you are trying to do this with a world object then it will get even more complicated, like stacking 100 crates in one square...
if I needed access to each of the 100 crates I think my head would explode.
this mod will show you everything in the area together though. https://steamcommunity.com/sharedfiles/filedetails/?id=2847184718
is there a way to set up """preset cars"""? as in spawning the same car, in an specific car condition and in the same place in every new save
@reef umbra if you mean to change any vanilla or modded item stats like DisplayName, Icon, ConditionMax, MaxDamage, etc. you can use Item Tweaker API OR copy it's functionality inside your mod.
IsoGameCharacter has two functions for this - isEquipped(InventoryItem item) & isEquippedClothing(InventoryItem item)
local function checkForJacker()
local player = getPlayer();
local inventory = player:getInventory();
for _, item in ipairs(inventory:getItems()) do
if item:IsClothing() and player:isEquippedClothing(item) and item:getType() == "Base.Jacket" then
return true
end
end
return false
end
Not tested this code but you got the idea
how would i change it for only people with a specific trait
if getPlayer():HasTrait("Dextrous") then
-- your code is here
end
I just thought of something, with update 42 coming out, having a homemade ammo and gun mod would be pretty cool.
Would it make sense to have a recipe for gunpowder that needs charcoal (or whatever it is forging will require as a carbon element), sugar and fertilizer?
also, homemade rifles, shotties and revolvers that preform slightly worse than normal firearms but can be repaired by metal, wood, etc that can be made in game
hello all !
let's talking about getSquare(X,Y,Z).
If the square is in not loaded chunck, the return will be nil. ok.
But, i see on this post : #mod_development message
that we can manually load, parse, unload the square.
Does someone know how to do that please ?
i tried it didnt work
function isItemWorn(targetItem)
for i=0, getPlayer():getWornItems():size()-1 do
local item = getPlayer():getWornItems():get(i):getItem();
if item:getFullType() == tostring(targetItem) then
return true
end
end
return false
end
print(isItemWorn("Base.Jacket_CoatArmy"))
getCell():getOrCreateGridSquare(x,y,z)
Thanks you very much !
Thanks! I've been trying to do this too. I'm also trying to access the worldObjects of the square (getWorldObjects). It does not seem to work if the chunk is unloaded. Do I need to do something more to load them?
It doesn't work, he's just wasting your time.
For global objects you can use something like getLuaObjectAt. You will need to use this for the specific global system you want to get the object of.
I'm trying to get a WorldInventoryObject of specific type. Is that possible, or should I change the object to global?
like an item? if its not loaded its not there
function CFarmingSystem:newLuaObject(globalObject)
return CPlantGlobalObject:new(self, globalObject)
end
if its global object i think you should create a subclass and register it
Just a normal item on the ground. So there is no reasonable way to force the chunk to load from memory? It would'nt need to happen often or fast
I see a lot of inventory convenience mods but man oh man do I want to do the exact opposite.
whatevers out side of that area is not loaded
not sure if you could find a way to force load it if its not global object
what are you planning to do again?
https://discordapp.com/channels/136501320340209664/1070852229654917180/1249084872694435861
I'd love a more realistic inventory system where players would struggle in tense situations to open zippers in bags and search items with discovery.
I'd love rushed item-searches to be faulty where unclosed bags leak stuff out slowly.
Thanks. I'm trying to do remote control from an "briefcase" item to another item that can be deployed anywhere. They are linked by storing the position and id to moddata. They are currently just items dropped to the ground, but now that I think about it, don't see reason they couldn't be global objects
Broken zippers too.
Either way I'm a modder so this isn't a suggestion. I'd do it myself. =)
but you have specific items inside? with stats and unique id, youcant store that on moddata
You mean that the global object couldn't hold objects in it? Didn't think of that, but maybe the briefcase should be empty to be able to deploy it as global object or something like that
The briefcase and the drone are both items currently (when the drone is not controlled), because that was easiest to do. The "reattachment" of control back to the drone doesn't work if it is outside the loaded area (as expected)
im confused, cuz if you say global objects those are stuff with 2d sprite, liek traps, generator, campfire
if you say WorldInventoryObject then those are items like clothes, bags, guns, food etc
I see. The drone and briefcase are both currently WorldInventoryObjects (and the drone is a swapped into a vehicle when controlled)
i guess you should try to be able to rpint the vehicle first
How could you switch the camera to the drone. Did you do it using Java?
Everything is done with lua. It's just a vehicle the player is controlling. The "player" in the ground is a dummy clone (you can see it still lacks backbag etc). Also some teleporting to make it appear like the player never moved
I was making a robot that can deliver parcels. But I did not find where to compare a copy of the 3d model of the player. I had the same idea as you
And how do you transfer the damage. If other people start shooting at the dummy?
Nice. It was a lot of trial and error, but it is not too difficult to do with IsoPlayer.new
I haven't really considered multiplayer yet, but I made the player eject from the drone, when the dummy is being attacked by a zombie, so they can receive it
I think I'll change both to global objects so they are easier to work with
not sure if thats possible
also you cant actually switch camera, to do this you have to hide you player like wear a transparent textured skin
and teleport to the drone i guess
That's what I'm doing. However when I teleport the player to the position the drone WorldInventoryObject should be (on a previously unloaded chunk) and try to get it from the ground (getWorldObjects). It cannot find anything. Should I make it wait a few ticks to load the objects before searching?
oh yeah theres a delay when you teleport. i guess you can try to do that delay
or maybe put everything on a timed action
if the drone has no important unique data. then just spawn a new one
Have to try that
It has some data to identify it is the one paired to the controller. I would like to find the correct one, so it is certain the drone was actually still there
ok then delete controller and spawn new one
or maybe its possible to just set he id? not sure
ISInventoryPaneContextMenu.OnLinkRemoteController = function(itemToLink, remoteController, player)
local playerObj = getSpecificPlayer(player)
if remoteController:getRemoteControlID() == -1 then
remoteController:setRemoteControlID(ZombRand(100000));
end
itemToLink:setRemoteControlID(remoteController:getRemoteControlID());
ISInventoryPage.dirtyUI();
instead of doing random just set the same id
I have to think about that. I'd like to prevent spawning new drone if the last one was stolen after landing
then everytime you stop using drone despawn it
Well that should work
or
spawn an item with moddata thats equal to the id of the drone
so it looks like youre carrying it?
the when you respawn it ise the moddata to assign the new drone it's id
the remove the item from inventory
I see. By the way do you know how can I get worldZRotation of an InventoryContainer as it has no get method? It is a public int, and it is visible to the getClassField in an InventoryItem, but not in InventoryContainer which inherits it
The cast methods of java API don't seem to be implemented in lua, so I can't just cast it to InventoryItem
Hmm could it be modded so that players need sleep but it can be done by logging out? So that people can't just grind for 10 days straight in multiplayer?
Can you change the position of a held or equipped model in the players hand without changing the models themselves? For example, change where the player holds an item.
Does anyone know what IsoZombie:isUseless() does? I'm writing an extension to Susceptible that makes fresh zombie corpses cause sickness, and the base code for Susceptible calls it, so I'm curious.
Oh, interesting, it looks like it makes them docile?
slr
local item = 'Base.Katana'
local sq = getPlayer():getSquare()
local worlditem = sq:AddWorldInventoryItem(item, 0.0, 0.0, 0.0)
worlditem:setWorldZRotation(90);
try that
Makes it impossible for zombies to get a target and sets their speed to shambler
So yes, docile
Yeah, it makes them not respond to sounds and prevents them from spotting players, it seems
thank goodness BeautifulJava exists
I've got a couple mod ideas I'm working on in order of what I consider their feasibility, so knowing that isUseless exists is nice. I'd love a mod that lets you restrain or otherwise pacify zombies, mostly for roleplay purposes
decompiling it on its own just gives a pile of awful autogenerated variable names, BeautifulJava's postprocessing pass on the decompiled code is great
Thanks. The setting of worldZRotation works fine, but I can't read it back. I would need that information to place the drone (vehicle) correctly after player places the drone (item) on the ground using the place item action
store the time the player logged out on a server file
when player logs in it will check the time difference, recover the amount of stamina based probably from your own observation or maybe less than what you recover from actually sleeping
Hmm I used BeautifulJava but variable names still don't make much sense
Anyway I can help with zombies if you want, I suggest joining the modding Discord if you ever want more specific help on the subject
https://discord.com/channels/136501320340209664/1125248330595848192
I even found something that can be used to restrain zombies around a certain point
oh shoot, I just hit the hundred server limit
Not sure how it handles in MP however but it would require testing
Find some place then lol, if you ever want to do specific zombie stuff you'll need a fuck ton of help on the subject because it's absolutely terrible to do zombie stuff lol
I made a framework called Zomboid Forge and I made TLOU Infected so zombies is my expertise and I can assure you it's really not easy
make it face wherever the player is facing
made some room for it!
so you dont need to get the info
Saw that yea
oooh do share what it is
well, string0 string1 integer0 etc is still much better than variable0 variable1 variable2 :P
I don't have that weirdly enough
var1.put((byte)var7);
for(int var9 = 0; var9 < var7; ++var9) {
AttachedItem var10 = var16.get(var9);
GameWindow.WriteStringUTF(var1, var10.getLocation());
var1.putShort((short)var12.indexOf(var10.getItem()));
}
}
} catch (IOException var11) {
DebugLog.Multiplayer.printException(var11, "WriteInventory error for zombie " + this.getOnlineID(), LogSeverity.Error);
}
} else {
var1.put((byte)0);
}
}
public void Kill(IsoGameCharacter var1, boolean var2) {
if (!this.isOnKillDone()) {
super.Kill(var1);
if (this.shouldDoInventory()) {
this.DoZombieInventory();
}
LuaEventManager.triggerEvent("OnZombieDead", this);
if (var1 == null) {
this.DoDeath((HandWeapon)null, (IsoGameCharacter)null, var2);
} else if (var1.getPrimaryHandItem() instanceof HandWeapon) {
this.DoDeath((HandWeapon)var1.getPrimaryHandItem(), var1, var2);
} else {
this.DoDeath(this.getUseHandWeapon(), var1, var2);
}
}
}
public void Kill(IsoGameCharacter var1) {
this.Kill(var1, true);
}
public boolean shouldDoInventory() {
return !GameClient.bClient || this.getAttackedBy() instanceof IsoPlayer && ((IsoPlayer)this.getAttackedBy()).isLocalPlayer() || this.getAttackedBy() == IsoWorld.instance.CurrentCell.getFakeZombieForHit() && (this.wasLocal() || this.isLocal());
}
public void becomeCorpse() {
if (!this.isOnDeathDone()) {
if (this.shouldBecomeCorpse()) {
super.becomeCorpse();
if (GameClient.bClient && this.shouldDoInventory()) {
GameClient.sendZombieDeath(this);
}
it outputs two folders
Oh ?
Yeah
Damn thanks didn't knew what those other folders were for
it makes my eyes glaze over less when reading large functions, haha
Now that's fucking nice thanks
Anyway yeah if you ever start working on your idea, don't hesitate to ping me. I'm mostly active in the modding Discord (you'll see me there hanging out and going crazy after random ass shit)
wonder how much work it'd be to hook up beautifuljava to the api scrape
api scrape ?
jab scraped the javadocs for candle, that's where it sources parameter names and the rare tiny bits of documentation that exist
hmmm
in-method variable names aren't ever happening but parameter names would really make things easier to read and in theory isn't that much work
Oh I didn't see me mentioned. Reading.
@bright fog Yeah I wrote a scraper for the JavaDocs so that Umbrella & Candle wouldn't have silly variable names.
What I'm working on with Mallet right now actually further-improves these names by human hands.
idk what a scraper is
Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites. Web scraping software may directly access the World Wide Web using the Hypertext Transfer Protocol or a web browser. While web scraping can be done manually by a software user, the term typically refers to automated processes implemented...
I grep'd the hosted JavaDocs by TheIndieStone and then took that local copy and scraped it for all the documentation data and applied it to my PZ-Rosetta JSON format.
If you want an offline copy I have one.
would be really nice if BeautifulJava used that...
Well I plan on writing my own code that takes the decompiled code, applies any patches I do to make it compilable (legally), and then apply forward PZ-Rosetta documentation.
that would be incredibly useful
I was buddies with the kids who originally made MCP, the first competent Minecraft decompiler project.
Would be fun to make my own version of what they did.
It wouldn't be providing the games' code. It'd instead provide a format of sorts that changes characters in the file based on a compiled data source by using the differences between fernflower's decompile and mine.
All it'd provide are fixes in a binary format, nothing else. =)
You'd still need the game to use the tools.
Sarge made his own format with MCP.
does anyone know how to get the current weight of a players inventory? I'm logging out some information about players for admin use and one of the things I want to pull out is the current total weight of all inventory items as shown at the top of the inventory window. I'm probably missing something but i've tried getInventoryWeight() and also getInventory() and getContentsWeight(). No luck so far. Getting various other things without issue.
local playerInv = playerObj:getInventory();
local invOccupiedCapacity = playerInv:getCapacityWeight()
local invMaxCapacity = math.floor(playerObj:getMaxWeight())
testing that out
is there a way to tell the age of an IsoDeadBody?
I don't see a way to directly check, but you might be able to create an estimate using the zombieRotStage on body:getHumanVisual()
thanks, i've given it a shot but still having issues. writer:write(invOccupiedCapacity) or (invMaxCapacity) breaks the logging, if I tostring() those then logging picks up again but returns 0 and 8 respectively no matter how much is in the characters inventory. I'm going to put this down tonight and come back to it tomorrow and see if I can have any more luck.
unfortunately there's no way to access m_zombieRotStageAtDeath
but yeah, that's the closest I can get
You can use reflection
getClassFieldVal(humanVisualObj, "m_zombieRotStageAtDeath")
I just remembered that, thank you
in that case I can just use deathTime
getClassFieldVal(corpse, "deathTime")
getClassFieldVal doesn't need debug mode, right
I think so, I think the writing side of reflection is locked to debug mode.
I'm using those in autoloot
I'll have a look in auto loot code then if that's OK. Could be an issue with the filewriter maybe?
i have one question, is it possible to use Item Tweaker API to change every item in the game at once?
im trying something very stupid and seeing if it works
if player:HasTrait(LeadStomach) then TweakItem("Base","Type","Food") end
didn't work
oh wait i forgot to add item tweaker api to my mods list
I am not great at designing mod posters
It's not that bad, if you want I can tell you the Susceptible font
please do, ha
It's called Stencil
It's what you see on my Susceptible Overhaul mod page
(ik I've already sent it but here ya go lol)
https://steamcommunity.com/sharedfiles/filedetails/?id=3204615438
still didn't work
is there any way to do this @hallow knoll
I don't actually know if the stencil font makes it look better, darn
I wanted to emulate the appearance of the exclamation mark on the icon, but
Gonna give Susceptible some love soon.
I've been sitting on a half finished update for like a year.
Adds "contamination" that builds up inside buildings based on zombies and corpses, requiring masks even once the zombies are gone until the building has time to air out.
I like both, but this second one wins out for me
Feels like something Mr Sunshine would make
maybe I'll make the drop shadow a little larger
Just the shadow or 3d thing you put on top makes it weird
Didn't even realized you made it haha
The red might be too flashy too, try a darker red perhaps
Group effort between Mr Sunshine and myself
Hoping to kick this out the door in the next few months
Just gotta get through all my other mods that need support first
It will be a sandbox option, not default
You can take my list actually if you want
From Susceptible Overhaul
Check it out I've got a fuck ton of new mod compatibilities added
Also update some wrong ones
Like Undead Survivor
Oh, like the masks?
Yeah
That would be great, Mr Sunshine mainly took care of that, but he's busy with life and Insurgent these days.
Yea nvm you weren't talking about it
I mean I could work with you on it but my Overhaul mod is still a thing haha
Idk what your plans are exactly
For Susceptible, I don't either tbh
It's near the bottom of the list
I'll know more in a month or 2
Gotta handle Inventory Tetris 6 first
tried emboss instead of a drop shadow... I think the first one was better
Agreed, the text doesn't read as well when I hold my phone at arms length
It's also worth considering the image will get downscaled when users are viewing it on the workshop
and the ol' classic
seems pretty alright when downscaled
maybe a bit less clear about the thumbs-down pose, but that was pretty silly anyway
That's good
I would make the character look towards the pov
So front view thumb down
Now thay I think about it I wanted to do exactly something like that
For my rework of "Working Gasmasks"
I think this mod should also work with Susceptible Overhaul but I don't use it myself so I can't test
(or rather, I have it installed but am too lazy to start a save with it and test it)
I set a fuck ton of corpses so the floor you see on the image is only corpses and my character in the middle with a thumb up
Yeah it will, I don't rewrite Susceptible files and since you only decorate the functions it's good
I'll link your mod on my mod page once it's out
ah, I made it require the Susceptible mod ID
does Susceptible Overhaul require Susceptible?
oh dear
this mod makes it a lot harder than I thought
I think a large pile of corpses is enough to overpower a gas mask
how on earth do i make custom acessory icons
does anybody know if it's possible to tweak every item in the game at once via item tweaker api
I just figured this out
icons seem to need 'item_' before their name. I don't know how this worked for me honestly, but it did.
i said make but thanks anyway
i need to read a whole lotta shit 💀
You can make them with like ms paint or something
@hallow knoll you helped me find out about Item Tweaker API. do you know anything about this?
It's simple af
i was thinking of using a for loop but i don't know if that would work so im testing it right now
----------------------------------------------Begin File
if getActivatedMods():contains("ItemTweakerAPI") then
require("ItemTweaker_Core");
else return end
TweakItem("Base.Needle","Icon", "Worm");
TweakItem("Base.Needle","Tooltip", "Wearable: Waist");
TweakItem("Base.Needle","DisplayCategory", "Repair");
------------------------------------------------End File
no i was meaning how do i tweak a stat of EVERY item in the game at once
if possible
not how to initiate the mod
aww
this is how i plan on doing it
for _, item in pairs do
inventory = getInventory()
if not item:IsWeapon() then
TweakItem(item,"CantEat",false);
TweakItem(item,"HungerChange",-20);
end
end```
don't know if it'll work though
ah, ItemTweaker tweaks items on startup
ohhhhh
meaning it's chaning stats of all items of type
declaration: package: zombie.inventory, class: InventoryItem
oh ok
you can change a lot, just check this docs
ok
if i want to keep the functionality though
if i were to make a certain weapon the type "food" would it remove the weapon functionality
I think no
ok
gl
ty
local player = getPlayer();
TraitFactory.addTrait("leadstomach", getText("UI_trait_leadstomach"), 12, getText("UI_trait_leadstomach_desc"),false,false);
if player:HasTrait("leadstomach") then
for _, item in pairs do
item:setType("Food")
end
end
end```
this doesn't work
why doesn't it work
why does this code not work
the code in question:
oh wait i forgot to figure out what the item was
mb
you looping nothing
?
on game boot character even is not created
oh good point
check for lua guides how to properly loop arrays
ok
yup, maybe this
is there such event? im not sure abt that
ok
that's what im looking in
oh yeah good point
why does this if statement give an error
for _, item in pairs do
if item:IsInPlayerInventory() then
item:setType("Food");
item.HungerChange = -20;
item.Calories = 0;
item.CantEat = false;
end```
@hallow knoll
i need to send another line hold up
TraitFactory.addTrait("leadstomach", getText("UI_trait_leadstomach"), 12, getText("UI_trait_leadstomach_desc"),false,false);
this is in the initLeadStomach() function
I still have to make the vest icon and then make the actual thing itself
But oh yeah I'm feeling good
for _, item in pairs(of_what?) do
for _, item in pairs(listObject) do is how this should be done
that gives an error
If you literally wrote listObject as your pairs Target, yeah it should give an error
What are you intending to loop over?
You will make progress faster if you communicate in detail. Even if nobody has time to respond, it will clarify your thinking.
yeah mb one sec
im intending to loop over every item in the game
I would say pause on this approach to be honest, I don't know exactly what the goal is, but its immediately incompatible with split screen
You probably want to modify the result of an ISEatFoodAction instead
is there a way to check if the certain bodypart has clothing on it?
like if feet has shoes
Yeah of course you can
Hey guys, someone know where I can a function responsible for interacting with object when pressing E/Shift+E?
I wanna to block certain interactions, but I can't find how to block E interactions...
any ideas? Im struggling to find that way 😄
i think you should hook on the keybond cuz if people change their keys then thats a problem for you
what object dont you want them to interact with
i've worked out my issue (why I wasn't getting any useful information for inventory capacity)
I'm logging only on the server events, not on the client events, when I enabled logging EveryOneMinute for both client and server I got duplicate log entries, except the server log entry had no weight information and the client log had the weight information.
This leads me to... does the server know anything about a players current inventory or is it all clientside and as a result very cheatable?
you should send the details to server if thats your case. i have no experience with logs tho
use OnClientCommand
so in theory I could use OnClientCommand to send getCapacityWeight() but could I then override the serverside value for that player? trying to work out how I get that into my log line with player positions etc
I'm making knocked down mod, so I want to restrict all interacts when knocked
like windows, doors etc
oh yeah i saw that . i also commented good job
hold on
local function disabler(player, bool)
player:setIgnoreInputsForDirection(bool)
player:setAuthorizeMeleeAction(bool)
player:setAuthorizeShoveStomp(bool)
player:setIgnoreMovement(bool)
player:setCanShout(bool)
--player:setZombiesDontAttack(bool)
--player:setAvoidDamage(bool)
player:setBlockMovement(bool)
JoypadState.disableClimbOver = bool
JoypadState.disableSmashWindow = bool
JoypadState.disableReload = bool
JoypadState.disableGrab = bool
JoypadState.disableInvInteraction = bool
JoypadState.disableYInventory = bool
JoypadState.disableControllerPrompt = bool
JoypadState.disableMovement = bool
ISBackButtonWheel.disablePlayerInfo = bool
ISBackButtonWheel.disableCrafting = bool
ISBackButtonWheel.disableTime = bool
ISBackButtonWheel.disableMoveable = bool
ISBackButtonWheel.disableZoomOut = bool
ISBackButtonWheel.disableZoomIn = bool
end
but its better if you use timed action
Thx for inside
Maybe timed action really will help, but I don't know how to hide this action line above character's head
thx xD ❤️
are there any good mod examples of OnClientCommand that you know of?
thanks, i'll have a dig off the back of that
thanks, just trying to find a mod now that implements it
why not just look for logging mod
i've got my own logging mod i'm working on atm, the main issue I have is so much is dealt with clientside and abusable so trying to gather more information, also looking at other preexisting mods that handle some of the issues for me
there is quite a lot of inconsistency in what is actually available clientside and serverside so just trying to trawl through it a bit
Hey guys, Im looking to make my mod multiplayer compatible and am having a hard time finding what I need to make the client and server scripts communicate with each other, my mod effects how calories are burned, got any ideas or knowledge that can be passed to me?
This sounds like something that only needs on the client side and not require any mp compatibility.
There are multiple guides explaining how to communicate things. Here's one for example
https://github.com/MrBounty/PZ-Mod---Doc/blob/main/Use commands.md
i makea the stuff
Thank you VERY much!!!! I agree normally it would, I just broke it into two pieces so that the server does the math side of things and the client just handles updating the player with the info it receives from the server. Maybe that isn’t efficient??? Might look into changing that.
all inventory management iss client side and this should change with B42 if I remember correctly
Hm
I wonder how hard it'd be to make an addon for Tetris inventory that modifies how gravity works
I'd like it if instead of blocking objects it just adds a configurable delay to accessing them, like 0.2 seconds per blocked square above it
probably pretty simple
as a hook that doesn't outright copy and replace the original code?
... also, maybe it'd be good to factor in weight. A single nail shouldn't block something beneath it...
i haven't looked at inventory tetris but notloc has seemed very knowledgeable whenever i've seen them around so i assume it is structured in a sane way that would allow you to do that
That's actaully planned as a vanilla feature for the next IT update, assuming I make it through my todo.
Oh, nice!
how do i upload the clothing and actually make the mod?
what would it take to build a hang glider mod?
Musket mod is proceeding hilariously.
hell how do i even script my clothing to make a new zombie that spawns 💀
@teal slate I'm sure your mod page could get some love 
https://steamcommunity.com/sharedfiles/filedetails/?id=3267306459&searchtext=
Yeah, it's very barebones
how do i even upload it to the workshop
hmm ?
what part of that did you not get
wat
When you created your mod, you put it in the folder /mods ?
well i dont know because i hvent coded it because i havent got a clue what to even do in the first place
i want to create a unique zombie that spawns with my stuff but idk how
So your mod doesn't work, you haven't even created the mod yet
There's nothing to upload, it's your last concern
Have you made your clothing ?
I wanted atleast a precursor a little front I didn't know the mod itself was what was uploaded
I thought I could make a thumbnail and add the content later
And yes I have the textures and everything
I'm not making new clothing like physical meshes I'm doing retextures for a unique zombie
You want to replace an existing clothing ?
yeah
and some of the admin states as well as i've discovered. Thanks for the pointers and thanks to @ancient grail for the sendClientCommand references. I've now got more logs being sent up from the client for better tracking.
Hello friends, just wanted to share that the PZ Modding Community discord server (for 3 Saturdays now) has held an event called Supportive Saturday where modders all share their mod(s) they'd like a bit more support towards in the form of ratings, thumbs up, comments, etc. The time frame is All Day Saturday UTC, so it starts in 2 hours.
The way it works is members can use a /promote command to a mod, and it generates a link to the page in Steam. You just rate it up, and that's it. Thanks to the fact people don't really use the Steam Workshop all that consistently these mods shoot up to the most popular for the day/week and get more eyes on it.
We would be greatly appreciative to anyone willing to help support the mods to the front page. 🙂
I was working on DinoVille, yes very similar to name lol, but I got bored, made a way to load into the tutorial world...not a remake, but the actual world, just gotta figure out the coords now, I heavily modified the tutorial codes
so I made it better lol it only broke because I changed the lots=muldred ky, which it should of stayed lots="media/lua/LastStand/Challenge1.png";
https://steamcommunity.com/sharedfiles/filedetails/?id=3267938638
Finally finished my musket mod. It's definitely a meme weapon, but it does hurt real bad to get hit by.
man i wanted aworking musket for over 3 years and all i got was a spear melee
this is peak
hello, i got this thing for a mod that tweaks some zone spawns, but for some reason it makes "Yaki's Makeshift Clothing" mod not work, can someone help me?
It was made just for you!
:D
however wheres the rusting of the cartridge pouch followed by the ripping >:(
That's actually in the mod
oh the video didnt show it
It's right at the start of the reload
how do i create this
idk how musket sounds but there's a considerable ammount of files if u have age of empires 3
It's not the greatest sound I don't think but it works
mod idea Im thinking of.
adds buildable blocks that turns wood into charcoal + mix with water to create syngas
yeah
what do i do now
wouldnt the mod appear at your local newgame since it's in mod folder
so at that point you'd test by loading it
Pro-tip : Upload your mods during the weekend. I made the mistake of publishing one of mine on a tuesday and it got way less visitors compared to the others (maybe my preview image sucks, that might have played a role tbh)
this doesnt really apply to me since i do commission mods, however it still a good advice and might actually do it when given the chance to delay uploads
Interesting, do you make the mod and hand it over you client for him to upload? Do get credited?
Sorry for the dumb questions, but I never thought about doing this kind of things so I’m curious
depends on the agreement
i do the upload by default
Ok, nice! Thanks for your answer
Who worked with client/server commands?
I'm trying to send specific states from moddata from all players to one when someone joins server.
Is it better to send individual packets for every player to this one player, or it's better to send ONE big packet with every player state?
Never done it but I’d say individual packets over big ones. Large operations can cause stuttering
Sending one packet from one player to one other player seems likely best to me as well. What kind of data is in the packet?
Is there a way of adjusting the position of an item held by the player, without editing the model itself?
knocked state, just small string
so you can directly send packet from one client to another?
Yeah I wouldn't stress that personally.
I thought you could but I could be misremembering. I know you can send data from server back to one player using sendServerCommand(player, module, command, packet) if you supply player object in your sendClientCommand. We do this in True Music Jukebox and you can review it and refactor what you need.
I don't know if you're allowed to send the player object of another player from client to server that way or not.
But you can use a loop on client to get the clientside player object of another player.
You just loop through the ArrayList returned by getOnlinePlayers().
I would imagine you could combine those tactics to send 1 thing to 1 person in theory.
This is how I implemented all my stuff right now
But when you're sending so little data to everyone, I honestly don't think it's gonna matter much
That won't cause any human perceptible lag most likely
One way you can perhaps slow it down is by requiring a random number to pass when the event is flagged as ready if you're already checking on player update or something
But I need to send data of all other players to one player
It'll be on player join to sync states
For some reason even if I store states in moddata on player join server not sending moddata to client
I haven't narrowed down sending the update to one player yet so I can't show you that
But clientside this is how I plan to check whether players need update:
Anyway good luck!
someone ask me a question please , i want to create a closet , in blender i just make the model , i create the UV mapping and export it and the 3d model to create the texture in the right way and in the .txt tell the game what the texture issomeone ask me a question please , I want to create a closet , in blender I just make the model , I create the UV mapping and export it and the 3d model to create the texture in the right way and in the .txt tell the game I say what is the texture ?
Would it be possible to make a mod for server admins that displays all whitelisted characters in a UI that we can utilize like the mini scoreboard whether they are online or offline? Currently there is no way to check stats of someone offline to conduct administrative actions (log and warnings) besides outright banning the user from the database white list
Shameless plug; enjoy your Saturdays.
https://steamcommunity.com/sharedfiles/filedetails/?id=3267954706
Do you guys promote your mods? If so, where?
steam pz discussion (workshop), TIS forums, reddit and here.
I'm wondering... for Susceptible Corpses, I wonder if maybe I could make the infection strength taper to zero as the corpse gets older
or maybe it should just be a cutoff like it is now
Thanks for your answer! I was worried promoting mods here would not be well received or against the rules as there is no showcase room
Edit: My bad, my dumbass just didn't see the #1162438206516645948 room
That's really cool! Thanks, I'll do that
anyon can help me? i created a tiles mod but for some reason i cant find them on the debug menù brush tool
Any info? thanks
Looking for answers on how to create my own loading screen replace text message mod prior to loading into the world?
ya know currently it says "bla bla bla bla" and "this is how you died". i want to change that to something else basically.
hard coded. this links to text from UI_EN.txt (or matching files for other languages). see Floor Is Lava mod as an exemple. ````
-- Main screen (lua)
UI_Intro1 = "THE EARTH ITSELF TURNED ON LIFE",
UI_Intro2 = "LAVA COVERED THE LAND",
UI_Intro3 = "THIS IS HOW YOU BURNT",
hard coded, what do you mean? also ive seen mods like this one that replace these with anime weeaboo texts and whatnot lol
I have not found any way to make it dynamic so I'd be happy to see what mods you are refering to. (I do not understand what 'anime weeaboo' means)
two examples
theres a whole list of them but none of which i am looking for
Maybe this one might help? They include instructions in the mod description. https://steamcommunity.com/sharedfiles/filedetails/?id=2782997073
True. But then, how do I apply the edits onto my dedicated server? o_O
Since IsoGameCharacter is exposed, can I call any function from within it?
I think what you may need to do is make your own mod, basically copy the files from that one (altered for your own intro text) and upload it anew, so that everyone on your server can download it. The mod creator seems to be cool with that.
Bet
Specifically getFootInjuryType
If I only knew how to upload mods 🤣 but i bet I can find some tutorials on that.
It's super super easy, you can do it!!! \o/ I think TIS was kind enough to include instructions in the game itself, if you click 'Workshop' and 'Mods' - I can't check right fast now, though. ; v ;
yeah those changes the text line like I do. it is not dynamic (you cannot change the lines depending on player perk or whatever other variable)
It's easy, yeah. The game will tell you where to put your mod files (in ...user/Zomboid/Workshop/) and there's a Mod Template to serve as an example. You want your directory structure to mimic that one's, with preview.png, poster.png, and mod.info in the same places, and the same basic information in mod.info. If anything's wrong, it'll prompt you with what's wrong and where it expected something.
You don't have to back out of the whole game to refresh, just hit "back" and then the mod folder and "next" and it'll tell you what else is wrong now.
Then it walks you through the process of creating the description, tags, etc, and you hit "Upload to Workshop Now!" and it does it.
I made it work. I simply just copied ModTemplate and replaced with my own stuff. AWESOMEEEEEEEEEEEEEEE.
Thank you @tiny stirrup and @burnt grotto 🥰 🥺👉👈
I'm trying to test out some Lua commands. I have the debug console up, and I have Accessible Fields running.
If I type print(getPlayer().footInjuryTimer) it works just fine, and returns an integer appropriate to that variable.
But if I do print(getPlayer().footInjuryType) it only ever returns 'nil', when I'm expecting "heavyleft" or "heavyright" (or both, which is maybe problematic?)
Does anyone know what's going wrong?
Congrats!
You can't access fields like that
Oh nvm you have accessible fields
Now you'll probably want to move that directory somewhere else, so when you download via "subscribe" it won't be duplicated in your mod selector.
Yeah, I'm wondering if it is maybe returning an array, and I'm not requesting it to print that or something?
No it wouldn't say nil
Are you sure it can give out something ?
Because there's a lot of cases where fields can just be unused yet available
Here's what the code for the method is...
if (!(this instanceof IsoPlayer)) {
return "";
} else {
BodyPart var1 = this.getBodyDamage().getBodyPart(BodyPartType.Foot_L);
BodyPart var2 = this.getBodyDamage().getBodyPart(BodyPartType.Foot_R);
if (!this.bRunning) {
if (var1.haveBullet() || var1.getBurnTime() > 5.0F || var1.bitten() || var1.deepWounded() || var1.isSplint() || var1.getFractureTime() > 0.0F || var1.haveGlass()) {
return "leftheavy";
}
if (var2.haveBullet() || var2.getBurnTime() > 5.0F || var2.bitten() || var2.deepWounded() || var2.isSplint() || var2.getFractureTime() > 0.0F || var2.haveGlass()) {
return "rightheavy";
}
}
if (!(var1.getScratchTime() > 5.0F) && !(var1.getCutTime() > 7.0F) && !(var1.getBurnTime() > 0.0F)) {
if (!(var2.getScratchTime() > 5.0F) && !(var2.getCutTime() > 7.0F) && !(var2.getBurnTime() > 0.0F)) {
return "";
} else {
return "rightlight";
}
} else {
return "leftlight";
}
}
}```
Well, not sure why the formatting didn't work, but yeah.
Oh, maybe it's because of the intermediate temp variables? Maybe Accessible Fields didn't populate through those?
But this method is private and thus not exposed
Ah. How can I tell that (other than by it failing)?
Where did you even get footInjuryType
IsoGameCharacter
Did you understand what Accessible Field is for ?
Bcs there isn't a field for footInjuryType, at all
declaration: package: zombie.characters, class: IsoGameCharacter
Those are only the vanilla exposed fields, though, right?
Yeah and Accessible Fields allows you to access them easily
There's nothing else you can access
You can only access what is shown in the documentation
That's... just not true. footInjuryTimer isn't in the documentation either, but that works just fine, as long as Accessible Fields is working.
It's in IsoPlayer
Hmm you're right actually
Well either way, I didn't find any footInjuryType field in the java
So my guess is your trying to access something that doesn't exist
Like, in the actual code? It's in IsoGameCharacter.java on line 9348
Giving lines for the java doesn't mean anything bcs the decompile doesn't give out the same lines as what the devs actually had so it depends on what decompiled your code I believe
Ah, fair. But... isn't the top one where it defines the variable?
@bronze yoke on the subject, you can access random fields defined for any class ?
No that's the animation variable
Ah. Interesting...
this.setVariable("footInjuryType", this::getFootInjuryType); will set the animation variable "footInjuryType" to this::getFootInjuryType
Check out AnimSets if you wonder what it's used for
Could I just reproduce what their code is doing using like, IsBleeding, IsScratched, etc?
Though they're using ScratchTime...
Hmm I would say yes
You can reproduce a few java methods in lua
I've done it myself to get the hit reaction of zombies based on the attack type
I guess I don't really need scratch time. Just... if it's scratched vs. worse injuries. I just thought using that method would be elegant, as it already has everything defined and worked out, and is about what I'm looking for.
yup
footInjuryTimer won't be on the javadoc because it is private
How do I test, say, "IsBleeding" for a body part, in the lua console, just to see if it's working? I don't know the syntax for that.
the methods accessible fields calls on force access so i don't think access modifiers matter
Heh, hihi albion. I hear you is wizard. xD
Is there any easy way to tell what I can access with Accessible Fields and what I can't?
to my recollection, any field declared directly by the class of the object
fields declared by superclasses can't be accessed
And what is the syntax for something like public boolean isBodyPartBleeding(BodyPartType bodyPartType) in the lua console?
Ah, fields, but not methods?
yeah, it doesn't allow you to access any methods you couldn't without it
public field only right ?
i honestly thought it was public only but they seem to be accessing private fields fine
this may only work when using debug.
Yeah, like I can see FootInjuryTimer just fine.
iirc the method used to get the field calls makeAccessible so access modifiers shouldn't really matter
that's why it used to error on core java objects, zombie package isn't allowed to make those accessible
So you think footInjuryTimer (which is private int) woudl fail in normal gameplay? Or would be okay?
Also, what is a protected variable?
Or... field, I guess?
protected is similar to private but accessible within subclasses
If you used it no problem with accessible fields, you should try by starting the game without debug mode (but with the same mods).
and then you tell us 🙂
But if I don't have debug mode, I also have no console with which to test it. <_<
When the code says this... what exactly does that mean?
Does that mean isWearingNightVisionGoggles is deprecated? Or transactionID? Or everything below it? Or is it a placeholder for something deprecated that's no longer there?
it would mean transactionID is
Ah, so the next thing. Okay, that's... somewhat reassuring. xD My initial assumption was everything from there down but that'd be a lot of deprecated stuff. >_<
Okay, so the reason I can call footInjuryTimer is because it's defined as a field at the top of IsoPlayer, while I can't called getFootInjuryType because it isn't defined as a field, but is a method?
What would be the syntax to get the type of injury to a body part in general?
Also, can I use the && syntax in Lua in an if statement?
local canUse = true;
local isMine = true;
if canUse and isMine then
-- do whatever
end
Thanks!
Do we have anything more up to date than https://theindiestone.com/forums/index.php?/topic/24408-how-to-create-new-vehicle-mods/ ?
The images aren't loading.
Point of reference; I'm looking to make a vehicle, custom ui overlay, custom parts, custom part requirements (like how a door window requires the door), 3d model, and animated when opening closing.
The coding and 3d modeling aren't daunting. My issue is getting integrated in understanding the structure of the mods, especially the vehicles. I'm currently digging around in https://steamcommunity.com/sharedfiles/filedetails/?id=2846036306&searchtext=r32 to look for clues on how to handle these things, as this modder seems to have touched on all of the points that I'm looking for.
I'm already running into issues when looking for part requirements though. I know the spoiler requires the trunk lid, but I can't seem to find where that is referenced, etc., etc. Basically, I need to start a tutorial from scratch so I can have a better understanding but I can't seem to find these topics and don't know where to look. The forum seems pretty antiquated and derelict, and discord search is very hit or miss.
https://theindiestone.com/forums/index.php?/topic/28633-complete-vehicle-modding-tutorial/#comment-292151
Definitely covers the broader subjects in plenty of detail and will definitely be my starting point. But these little things like the requirements and ui that are eluding me. I can use other tutorials for making my own parts, I'm sure those tutorials are abundant.
Summary: vehicle part pre-requiring (like door windows need doors) and animating the vehicle are what I'm really looking for. I can live without the latter, but the part pre-requiring is necessary for my vision.
how do u create learned traits recipe?
i tried this. the traits won't show up when start the char creation.
did i missed something?
not sure if youre syntax is correct but i can see youre not triggering this function
Yes, calling that function
Events.OnGameBoot.Add(initDoomsdayPreppersRecipes);
i'll copy paste that?
Yes, and also changing Doomsday_Preppers to Vintner
yeah but i have thattraits active. the vintner
or change vinter to Doomsday_Preppers
its not gona matter cuz its local var
but yeah just link them
so how's this?
i changed the code
yeah
but your description and icon will be from that mod you got vinter from
if people dont have that mod then nothings gona show there
you need to make your own and create the translate files
or require the mod
i see. it was just reverse engineer. i copy pasted the code..
better to look at vanilla
still not showing up
the file was located in different folder
in the mod from crossbows
i copied the mod code inside from crossbows and make a new NPCs files to store the code there. and copy paste the code from vintner
this is the new one i created new file and still won't show up
for procedural loot tables, does "min" indicate the least that WILL spawn or the least that CAN spawn?
procedural loot distributions i should say
im trying to delete some building and table stories, is that posible?
Math, partially successful
I have rotated a texture
Shout-out to umbrella for making ISUIElement:drawTextureAllPoint make sense
Hello everyone. I am trying to modify the player FoV / view cone (tightening and widening it) and also view distance. Does anyone have any references to how i could go about this?
I'd suggest waiting for Build 42, it's redoing a lot of that stuff so you'd have to go back through it then anyway I would assume
Seems like a reasonable choice then. Thanks 🙂
Hey guys
When player eat a part of a food item, what is the variable modified by that on the item ?
I'm seeing it is not "condition" or "usedelta" of the item 😳 but i'm looking for which one it is
The event itself shouldn't be a function and there is currently no "initDoomsdayPreppersRecipes"
Try something like this instead:
`local function initDoomsdayPreppersRecipes()
-- Your code here
end
Events.OnNewGame.Add(initDoomsdayPreppersRecipes);`
use delta is the consume amount
like for water
reason why you get to pick how much you want drink is because of that
Thank you for your answer
So when you eat half of in game sugar (for example), the use delta of the sugar would be modified after right ?
Because I’ve got a function which test the use delta of this kind of items, but when player eat a part of food, function don’t return a « modified use delta »
And it consider a perfect food or eatten food got the same use delta
tnx but still not showing
And i think useDelta is about Drainable items
About food item, i don't know how to check if the item is into perfect condition 😬
why are you doing you rmod on the actual uploaded mod like that? nothing gona work
what exactly are you looking for
I'm using a trader mod
and i'm creating a function that is conditionning the possibility to sell
If player consume a part of an item, he can't sell it
so i'm trying to check if a food item is into perfect condition or not
local function isItemFull(item)
return item:getUsedDelta() == 1 or item:getScript():getUsedDelta() == 1
end
if not isItemFull("Base.Apple") then return end
not sure which one but yeah
if it errors try just one of em
Gonna check 😉 Thanks Glytch3r
I'm using this
function EFK_ItemNotUsedDelta(sourceItem, result)
if sourceItem:hasTag("EFK_Selling") then
if sourceItem:getUsedDelta() < 1 then
return false
end
end
return true
end
And it always return true for food items
even if i eat half of it
But Drainable items works fine
the way this function mixes tag check and used delta check is suspicious. it may be exactly what you want, but it is design-error prone.
Good point, maybe this one is better 😉
function EFK_ItemNotUsedDelta(sourceItem, result)
if sourceItem:hasTag("EFK_Selling") and sourceItem:getUsedDelta() == 1 then
return true
end
return false
end
implementation and function name have a better match now ;). I do not know why Glitchr refered to item:getScript():getUsedDelta() though. maybe it would be interesting too ```lua
function EFK_ItemNotUsedDelta(sourceItem, result)
if sourceItem:hasTag("EFK_Selling") and (sourceItem:getUsedDelta() == 1 or item:getScript():getUsedDelta() == 1) then
return true
end
return false
end
Thank you very much 😉
Hey guys @mellow frigate @ancient grail
It does not work for example :
ITEM
item EFK_Sugar
{
DisplayName = Pack of sugar,
DisplayCategory = Food,
Type = Food,
Weight = 0.5,
WeightEmpty = 0.1,
Icon = EFK_Sugar,
Spice = true,
UseDelta = 0.16,
UseWhileEquipped = FALSE,
HungerChange = -70,
ThirstChange = 45,
Calories = 387,
Carbohydrates = 100,
Lipids = 0,
Proteins = 0,
WorldStaticModel = Sugar,
Tags = Sugar;EFK_Selling,
FoodType = Sugar,
}
RECIPE
recipe Sell Pack of sugar
{ destroy EFK_Sugar,
keep TancredTrader,
Result: Money=135,
CanBeDoneFromFloor:true,
Category:Money,
OnTest:EFK_ItemNotUsedDelta,
Tooltip:Tooltip_EFK_ConditionReparation,
Time:0,
}
FUNCTION
function EFK_ItemNotUsedDelta(sourceItem, result)
if sourceItem:hasTag("EFK_Selling") and ((sourceItem:getUsedDelta() == 1 or item:getScript():getUsedDelta() == 1)) then
return true
end
return false
end
ERROR :
LOG : General , 1718547253494> Object tried to call nil in EFK_ItemNotUsedDelta
ERROR: General , 1718547253494> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in EFK_ItemNotUsedDelta at KahluaUtil.fail line:82.
ERROR: General , 1718547253494> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: Object tried to call nil in EFK_ItemNotUsedDelta
Any idea about where is the problem ?
Why don't you use the trading plugin for ssr quests ? I saw you asked a question there.
because of inventory tetris
SSR only let player sell items which come from his main inventory, not bags or belts of chest rigs or on the floor
But into my EFK project, player do not have got main inventory
function EFK_ItemNotUsedDelta(sourceItem, result)
return sourceItem:hasTag("EFK_Selling") and (sourceItem.getUsedDelta and sourceItem:getUsedDelta() == 1 or item:getScript():getUsedDelta() == 1)
end
where the lua file located
--server folder
Recipe = Recipe or {}
Recipe.OnTest = Recipe.OnTest or {}
function Recipe.OnTest.IsNotWorn(item)
if instanceof(item, "Clothing") then
return not item:isWorn()
end
return true
end
this is from vanilla
add this to your file
Recipe = Recipe or {}
Recipe.OnTest = Recipe.OnTest or {}
Recipe file ?
oh nevermind arent you making recipe cuz i saw the sourceitem param
i got confused
(sourceItem, result) <--- this is what OnTest use
can you show the actual lua that will use this checker function
Do you think i must use the way to do ?
Recipe = Recipe or {}
Recipe.OnTest = Recipe.OnTest or {}
function Recipe.OnTest.isItemFull(item)
return item:getUsedDelta() == 1 and item:hasTag("EFK_Selling")
end
recipe Sell Pack of sugar
{
destroy EFK_Sugar,
keep TancredTrader,
Result: Money=135,
CanBeDoneFromFloor:true,
Category:Money,
OnTest:Recipe.OnTest.isItemFull,
Tooltip:Tooltip_EFK_ConditionReparation,
Time:0,
}
Yeah ok 🙂 Gonna try this
You're the best guys @ancient grail @mellow frigate ❤️ Thank you very much to you and other big PZ moders
My Escape From Knox County project won't be as sophisticated as it is without all your good work on PZ from the beginning ❤️
You can assume Recipe and Recipe.OnTest exist in lua/server (i.e. skip first two lines here. They do nothing. @tiny wolf
right
If you needed to declare those objects to add your recipe function because there was any chance at all that the vanilla file hadn't yet loaded (which is not the case), then the vanilla file would erase your access to your functions as soon as it said Recipe = {} in the vanilla files.
So it still wouldn't work to try to set them to a new table
OK thanks to you @thick karma
I gonna test this right now
Error again 😬
LOG : General , 1718551650014> Object tried to call nil in EFK_isItemFull
LOG : General , 1718551650112> [INVENTORY_TETRIS] creating new sourcewindow: C:/Users/TancredTerror-Gaming/Zomboid/mods/EFK_CORE/media/lua/server/EFK_ItemGoodCondition.lua
ERROR: General , 1718551702716> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in EFK_isItemFull at KahluaUtil.fail line:82.
ERROR: General , 1718551702716> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: Object tried to call nil in EFK_isItemFull
Strange, Inventory Tetris mod seems to do things here
function: EFK_isItemFull -- file: EFK_ItemGoodCondition.lua line # 12 | MOD: Escape From Knox Project CORE Callframe at: getUniqueRecipeItems function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 274 | MOD: Escape From Knox Project FIX function: createMenu -- file: InventoryTetris_DevTool.lua line # 917 | MOD: Inventory Tetris function: openStackContextMenu -- file: ItemGridUI_events.lua line # 573 | MOD: Inventory Tetris function: onRightMouseUp -- file: ItemGridUI_events.lua line # 109 | MOD: Inventory Tetris java.lang.RuntimeException: Object tried to call nil in EFK_isItemFull
Erf, do you think it could be a Inventory Tetris issue or incompatibility ?
function Recipe.OnTest.EFK_isItemFull(item)
return item:getUsedDelta() == 1 and item:hasTag("EFK_Selling")
end
recipe Sell Pack of sugar
{ destroy EFK_Sugar,
keep TancredTrader,
Result: Money=135,
CanBeDoneFromFloor:true,
Category:Money,
OnTest:Recipe.OnTest.EFK_isItemFull,
Tooltip:Tooltip_EFK_ConditionReparation,
Time:0,
}
I see so u need to create a patch?
might need to check that it is drainable
it is a food type item, not a drainable item
so : do food type items have got a usedelta variable ?
test function tests all items, so you need to check that it's food then
?
because i don't think so
i only do this test on item that i want to test : food item in this case
To give you a list of available recipes when you right click on something every item is being tested so it would not be surprising if not all of them were drainbale or food. But I haven't looked at the specifics of this in a while so it might not apply for your case.
Anyhow, you need a drainable item to use getUsedDelta.
Are food type items drainable ?
Gonna add a test to test only food item into function
I agree with Polt. Is return item:getUsedDelta() == 1 and item:hasTag("EFK_Selling") end line 12?
So maybe with this it could be better ?
function Recipe.OnTest.EFK_isItemFull(item)
if item:getUsedDelta() then
return item:hasTag("EFK_Selling") and item:getUsedDelta() == 1
end
return false
end
but about food, i don't think this will solve my situation
because i want to test food type item that player didn't eat a part
No but did you answer my question somewhere I missed?
I'm sorry, i don't understand your question
Is line 12 of the file identified by your error the line that says return item:getUsedDelta() == 1 and item:hasTag("EFK_Selling") end?
☝️
This error says line 12 is the prob
I'm asking for confirmation about which line is line 12
Oh yes ok
it is always linked to the UsedDelta test of Get
And it seems, after a lot of tests, that food type items do not have got a Drainable variable
So the UseDelta do not work
So there is another variable which save the state of a food type item when a player eat a part of it
but i can't find what it is
so i could test it when i would know
is it weight?
oh yes maybe
because weight evolve when player eat a part
do you know a way to get the "initial" weight of an item ?
sorry to interrupt: i was wondering how much it'd cost to get a main menu mod made? i'd actually fw this really hard as a main menu theme https://youtu.be/2Oq6BraVZgo?si=WM8rZG-k9l2bZpPT
The Soundtrack Album: Track #19
Composer: John Murphy
Movie: 28 Days Later
Year: 2002
that's just In The House In a Heartbeat and East Hastings though
Hello guys, I am trying to do my very first mod, a very simple add of a pistol following a tutorial, just to get the hang of it, unfortunately while the item works in game, I can't get it to appear. It stays invisible, despite having proper nomenclature. Does anyone know what could be the issue ? (note, I used an online fbx to X converter since I don't have a plug-in for that file format)
I'm sure it's something very little but I can't seem to find the problem
Just use FBX model
Game supports FBX models and most of modders use it, but for some strange reason devs do use X files.
I did try to add the fbx in the same folder, with no result as well 
Launch debug mode and restart game, in console if you equip/have gun "visible" if its issue with model script it will tell you
I'm gonna try that, thank you !
... yup 😬 I guess I'm good to check my nomenclature once again
mod idea: i just want to make/have made a more realistic loot tables. grocery stores should be nearly empty except the back storage, and peoples pantries should have more food, etc
would anyone be willing to make it/help me make it? id be willing to pay depending on how much it costs
If you want you can make a commission in the modding Discord
https://discord.com/channels/136501320340209664/1125248330595848192
i think it is a big work because it need to reword all loot table you want to edit
i totally forgot that was a thing
i just finished to rework all loot tables of the game and i needed 3 weeks to finish it with my project ^^
Which is 20k lines of code to go through 
jeez!
Well yeah
On the one hand side it is super easy, since you only need to change numbers. But since it will be hundreds, maybe thousands of numbers, hidden in said 20k lines of code, it will take forever 😂
I see why it hasn't been done then lol
how can i make some custom flags for a zomboid server im in
basically will it require coding or putting custom pictures
you need to create the tiles pack and tile definitions
the actual sprite sheet
and depending on how you want to use the tiles you would have to do bit of code
What version of Lua is Zomboid using again?
5.1ish
Anyone know what font face this could be:
I assume it's not hand drawn
Looks like ravie
guys, I have a really stupid question
I wanna translate in english button, which responds for getting up knocked player
How to properly translate, "Help to get up"?
Or "Help to stand up"?
can I find out when the player clicked the go here button? like for example I can find out player:pressedMovement(false) or player:pressedCancelAction() but can I find out when the player selected the go here button with the mouse?
Can someone tell me how can i change which materials a tile drops when it is disassembled? I want some vanilla tile, for example the military tent walls, to drop some custom item. How can i do that?
There's webwites to check fonts based on an image
progress...
Nice
I ended up just scrolling through them, and found what it was most likely based on. 😅
Update on why I needed the font. These are WIP and changes have since been made.
Basically Spiffo trading cards for Game-Night.
Thank you 🙂
Can't take all the credit, as I had StableDiff generate the foundation, and I just had to do some chops/edits + the graphic design aspect.
There's still a lot of details that stand out and bug me, but the whole point of using SD instead of drawing them all out was so shave off time.
I mean you can just link the stable diffusion model you used in the mod's description
For example the police's gun before was melded into his hand lol, I also had to construct most of their hands, eyes, and tools.
I plan to add a disclaimer with a guide. Maybe people can make their own Spiffo cards lol.
Expension packs lol
That would be amazing
I was thinking of marking them as sets with logos on the back - but I'm concerned with making it harder to expand.
These would be like "Careers of the World" or something - maybe with a little globe
But yeah, it would mean others would need some level of skill lol
I do need to make a guide for card generation - could be useful for others. Anything to make the workflow easier.
wonder if I should retitle my mod's page to say Susceptible Corpses [Sandbox Options] or something
since it's a pretty notable change...
Naah I don't think it's needed
What you can do however is make an announcement in the comments and also make sure to make your patch notes clear
I did make the patch notes clear, comments are probably useful too though
Still waiting on verification...
For example
I'm too lazy to figure out formatting, ha. Is it markdown, BBcode, limited HTML...?
I made a whole guide on what's possible and available
does getServerOptions() work for SP game too?
nvm its probably getSandboxOptions() for SP
@dull moss
those are different things that you access both in SP.
huh
Those are two different sets of settings
oh
so serveroptions are there both in sp and mp?
cuz i've been using this getServerOptions():getBoolean("SleepNeeded")
to check if MP server uses sleep needed
It does
But
Some things get reported oddly
It does not error
It seems possibly that it reflects the most recent way you ran your server
ok thats not good then
I used it in SP just yesterday and expected a nil value
Was surprised
Then I added a feature to make a popup show based on an Anti-Cheat
And that showed in SP when Anti-Cheat was true
Much to my surprise
I haven't further explored the weirdness of it but it suffices to say the function works and returns non nil under some conditions at least, all the ones I tested
i have to decide if i wanna add safeguard vs players not properly setting sandbox settings or if i leave it be and assume they are smart enough

Safeguard will spare you headache long-term
Idk I can send you some very useful code in a minute
only now realized that i check for mp if sleep is forced
I've been moving from mod to mod
but not in sp
For different purposes
ignore sandbox thing i jsut added it without testing yet
But not sure when Internet back
ye its a huge if so i had to decide how do i wanna format it
i dont like it
but i have to format it somehow

ye i tried getServerOptions():getBoolean("SleepNeeded") and getServerOptions():getBoolean("SleepAllowed") in SP where both of those are on, and it returned false twice
Which is I assume from my server where both are off
So how do I check those in SP
How can I open table in f11 to browse it
Like for example I know there's table SandboxVars
how do I open it in here
to view its fields
What are you trying to access exactly ? A sandbox option ?
yes
SandboxVars.MyModName.MyOptionOne in lua
for
option MyModName.MyOptionOne= {
type = integer,
default = 1,
min = 1,
max = 100,
page = MyModName,
translation = MyModName_OptionNameOne,
valueTranslation = MyModName_OptionNameOne,
}
I am aware of how my options work, I need base game
Idk how SleepNeeded is named internally
or where to find it
Oooh
which is my initial question
bruh
Allows you to check every option names
oh
No I'm not fucking with you
At least you can use it to find every option tags I guess
It has a command you can print in-game (or anywhere in lua I guess) to check sandbox options IDs
It's not it's original use but you can use it for that I guess

SleepNeeded and SleepAllowed aren't sandbox options, you can set them only in the .ini
I mean the game somehow knows if in SP those options are enabled
right
So there's gotta be a way to fetch those values
anyone knows this one, it's last place where I can check
how to open specific table

just make it error out and then you can have it in object stack

prints(SandboxVars) works like a charm
also its not in there so I officially give up on trying to fetch from game if sleep is needed

I would put it in a variable
And check the variable as the condition
Just to avoid the aesthetic atrocity
😎
oh ye I actually do that for few things already
local desensitized = function(player) return player:HasTrait("Desensitized") and SBvars.BraverySystemRemovesOtherFearPerks end
no worries, I fix it by deleting whole thing and letting users figure it out since it doesnt work as intended anyway

also is this a new way for options? I've been using
{
type = boolean,
default = true,
page = EvolvingTraitsWorldSystems,
translation = EvolvingTraitsWorld_TraitsLockSystemCanGainPositive,
}```
looks slightly different from yours
or did you not mean to put = sign in there at the start?
or does it work regardless if = there or not
That's a different type of option
Ah right the =
I copied the example from somewhere else
ah k
Gonna report it to the guy who made the option example
Confirmed the = is wrong

Im trying to make a mod that adds some custom buildings into the vanilla map
Project Zomboid Vanilla Map exported to TMX (with a private tools) - Unjammer/PZ_Vanilla_Map
Will this work
I have no
previous experience at all with project zomboid
only LUA
better luck in #mapping if you haven't tried yet. also mapping for the most part, you use external tools such as a painting program, worlded, tilezed, depending on what youa re trying to do. mainly tilezed if you are redoing buildings from vanilla. you then create the mod, and with your editing map using the same locations as in game map you are replacing, will overwrite the map with yours. you have a bit of learning you may need though if your goal is to edit a preexisting vanilla map
if you want to create full custom map over top of vanilla there is some good guides. look at pins in mapping, there is also another discord for mapping with a LOT of resources and guides
yep, you just move through those and ask specific questions as you run into things
Can anyone give me a starting point as to where I can learn more about how to create PvP zones on a server, ideally with higher loot spawns?
asking general question like what you did though will get you not much help
it's too many answers needed at the same time 😄
if you overwrite vanilla map with full custom map, you don't need that github though.
Alree does make some updated tools that make mapping WAY easier though. try to find a link for unofficial mapping discord. thats your best bet imo
trivial but uhh
how do i see a detailed version
this is what the cell looks like
but its only showing in green for some reason
https://theindiestone.com/forums/index.php?/topic/21951-the-one-stop-tilezed-mapping-shop/
you need to have the bmp/png and also have a TMX made
Here you will find a (hopefully) comprehensive guide to map modding using TileZed, from scratch, to uploading to Steam Workshop. Step 1) Installation and setup Spoiler - Download the latest version of TileZed here: https://theindiestone.com/forums/index.php?/forum/64-mapping/ 3 Step 2) Creating a...
this?
you put them all with a veg layer in worlded and drag it all to your cell, it will show all. you can change the view to show
the problem is you aren't obviously using any guide here
I am
you really need to use the guide i posted to at least have some idea