#mod_development
1 messages ยท Page 519 of 1
vs code is way too overkill
its the only editor I have that has Copilot
my issue with vs code is how heavy it is
its in between a text editor and a real ide
True, but its mostly just text editor. I have VS2022 for applications development, I wish that app wasnt so heavy
same but it do be a real ide with a lot of features
Even if it doesn't install with the correct dependencies sometimes...
I had an issue with it where it didnt know where to get packages from on a clean install
so to utilize getPlayer:
local PID = player:getPlayer("username").."."..player:getPlayer("OnlineID")
nope
I don't really know what getPlayer returns >.>
so, it just returns the object
it gets the player from the client right?
is ISOPlayer.SaveFileName unique per player character?
its client side code so yes
my mod keeps breaking on SugarValue = SugarValue - (ISF*10) (which is meant to decrease SugarValue) and i don't know why. any help would be appreciated!
function Diabetes.ISF()
ISF = 25 -- a placeholder until I can figure out how to randomize ISF per run
end
function Diabetes.OnEat_OneUnit(food, player, percent)
local script = food:getScriptItem() -- i assume this grabs the syringe (and everything else) from the script items.txt
SugarValue = SugarValue - (ISF*1)
-- One unit syringe
end
function Diabetes.OnEat_FiveUnit(food, player, percent)
local script = food:getScriptItem()
SugarValue = SugarValue - (ISF*10)
-- Five unit syringe --temportarily 10 units
end
i dont see an ISF variable declared
assuming its declared outside of this snippet
@bitter frigate is it declared somewhere else or is Diabetes.ISF() it
Diabetes.ISF() is it. i thought that WAS declaring it. orz
well it is
but within that scope
though it shouldnt matter since its not a local if it ran once it should be left as a global
which you should be careful not to bloat the global name space
yes yes! i was planning on going through and fixing things after i got the functions working more readily. is that a bad idea?
i mean yes obviously it'll be a pain and labor-intensive to sort out LATER but like. that's the grind
just get in the habit of declaring everything as local
and think do i need this globally
which is almost always no
im guessing the error its throwing is something to do with nil so i think you didnt run Diabetes.ISF() to set the global
but in a case like ISF and SugarValue where i'm using it ALL OVER THE GODDAMN PLACE is it an acceptable amount of bloat?
more or less, that's exactly what the problem was. i got it working by installing another global variable at the very very beginning of the code, similar to how i initialized blood sugar
probably not. i hadn't realized global was for inter-file variables.
...i apparently already made it local. i don't remember doing that but HEY
This look correct?
local playerObject = player:getPlayer()
if !modData.exists(playerObject.SaveFileName()) then
modData.create(playerObject.SaveFileName())
end
local PlayerNetWorth = modData.get(playerObject.SaveFileName())
edit: Why did I try to c# this....
ZombRand() only generates integers correct?
How do I generate a double?
Or... it looks like it is double actually...
Weird, i've never seen it generate numbers with decimals... am i missing something?
Take local getMoney = ZombRand(1,2) This only gives me a 1 or 2, no decimals from what I've seen
Has anyone asked for the posters removal yet?
why even use her
i've moved on to trying to get carbohydrates to work for me and come to the troubling conclusion that there's no simple way to tie a function to carb counts without going Deeper. so. my solution to not being able to get carb counts on their own is to take the difference between the carb count of a player before and after they eat, divide that by their insulin:carb ratio, then multiply that by their ISF and finally add that to their SugarValue. i know i'll be using nut:getCarbohydrates to make those caluclations. trouble is, i don't actually know how to grab the data before eating OR the data after eating FOR calculations. any help?
Can you guys make a mod where your health bar slowly goes down until 60 years have passed and you die of old age?
Sounds easy, if I could figure out how modData tables work
someone use skill recovery journal mod?
What about it?
thank you
Well, "Can" is different from "Will" - No promises lol
Yeah I have no idea how moddata works. The only documentation only ever has things like Function is Function without any examples so
Would anyone be willing to do a one on one with me so I can figure out the nuances and were to get the information I need?
WAIT THAT WAS YOU XDDD?
You'll be fine with the content as it's changed for artistic purposes - I meant any complaints.
Ye
this is fine
What posters?
no XD
:o
lmao XD
I find it hilarious you "South Park Canadian"d it
makes it more expressive
Someone tell me if this is structurally sound, I'm very lost:
function Recipe.OnCreate.CountMoney(items, result, player)
local luck = ZombRand(0,55)
if player:HasTrait("Lucky") then
luck = luck + 4
if luck > 55 then
luck = 55
end
end
local getMoney = 0.00
local OldPlayerNetWorth = player:getModData().Networth
if luck == 55 then
getMoney = ZombRand(2500,7500)*0.01
player:Say("Awesome! $"..tostring(getMoney).."!")
end
if luck <= 10 then
getMoney = ZombRand(1,80)*0.01
player:Say("$"..tostring(getMoney)..".")
end
if luck <= 30 and luck >= 11 then
getMoney = ZombRand(100,200)*0.01
player:Say("$"..tostring(getMoney)..".")
end
if luck <= 45 and luck >= 31 then
getMoney = ZombRand(400,800)*0.01
player:Say("$"..tostring(getMoney)..", cool.")
end
if luck <= 50 and luck >= 46 then
getMoney = ZombRand(1000,1500)*0.01
player:Say("$"..tostring(getMoney)..", nice.")
end
if luck <= 54 and luck >= 51 then
getMoney = ZombRand(1800,2500)*0.01
player:Say("$"..tostring(getMoney).." sweet!")
end
local NewPlayerNetWorth = OldPlayerNetWorth + getMoney
player:getModData().NetWorth = NewPlayerNetWorth
end
What is luck?
a randomly generated int from 1 - 55
somehow that didnt make it into my snippit
The main thing i'm trying to figure out is if player:getModData().NetWorth works
Is it a global variable?
That was a lot of lag.
My old message suddenly appeared for some reason after not appearing.
Above question was about luck correct? i've edited the original code block
Its local
Yes it was. I entered it before you answered.
You use of getModData seems fine to me.
Oh
You use differing capitalisation.
Oh, i see that. Good catch
But is that seriously how that works?
What defines "NetWorth"? I understand lua isnt really object oriented but java is. Does this information just get created on the fly?
OldPlayerNetWorth will be nil if player:getModData().Networth is not defined.
you could do
local OldPlayerNetWorth = player:getModData().Networth or 0
So effectively player:getModData().NetWorth = someValue defines it.
Its not limited to some exclusive type somewhere?
if so, player:getModData().NetWorth is global, and keeps the data until logout? Sorry, there's alot of things I'm not so sure about.
The data is kept saved in the save files, except for java object references, I think.
If that's the case, even better!
oh man the next update is exciting
i wish they add a bow & arrow before npcs ๐
its the hunting system and reworked ranged weapons including bows
which will feature animals
they admitted people might be able to use it to reverse engineer the npc human system
they are adding the hunting system on the next update too?
the hunting system IS the next update
"t may be the initial build still contains hunting and wild animals, they ARE NPCs after all. It may be they drop into a subsequent build or later on in the unstable beta cycle, its not clear yet for reasons weโll discuss in a bit. But the next BIG thing will be NPCs and weโll have a dedicated team working toward this goal going forward."
Howdy survivors! Another crazy week for us, weโre still in a bit of a daze! Just a few more days until the entire team are back together after the various international holiday periods have all come to an end, and weโre looking exceedingly forward to fixing up a few of the big issues that have [โฆ]
ok i've done more thinking and i can now articulate that i want to write a function that stores a dynamic number's value (in this case nut:getCarbohydrate) and then checks that same dynamic number some period of time later without dumping the previously stored value, but i'm still at a loss for how to accomplish this. if anybody has any advice or relevant tutorials i'd devour them
Is there any mods that allows building or fixing the vanilla windows/doors on houses?
@bitter frigate From my conversation above I've figured out how to store data in objects - use that to accomplish your needs.
Unless I'm misunderstanding
anger what do you want to do that for?
i'll take another look and see if that helps!!
I just tested it, persists through logouts and is attached to the player
So you could do something like:
player:getModData().BloodSugar = value
there's not a good way to identify how many carbs were in a food that was just eaten, so i'm trying to calculate the difference between the carb value before you eat and after you eat, to get the actual carb count of what you ate. i think i need to use nut:getCarbohydrates to accomplish this, but i dont know how to store the value and then, some period of time later, check it against the new value of the same variable
Anyway to go into creative mode to check all the items are working?
this'll definitely help with ANOTHER problem im having, which is the blood sugar not persisting through saves
download Cheat Menu. anything that appears in the spawn list works
are you looking for debug mode?? if so thats -debug in ur steam properties for the game
Does the cheat menu work in mp Im just trying to check if all the modded items are working on my mp server
Yes
Javadoc Project Zomboid Modding API declaration: package: zombie.inventory.types, class: Food
although, why not just use admin
Well how do I enter creative mode with admin?
setuseraccess \your username\ admin
your server console
how do i open it?
Your server dedicated or hosted?
hosted
So in that case, you need to add yourself as admin for your local server
should be in C:\Users[username]\Zomboid
its somewhere in there
yea yea! i have getCarbohydrates already, that's not the problem. it's actually making a code that will check the difference between what getCarbhydrates returns from two separate times.
Depending on your mods maybe... could be checking for other mods existing and not catching the error when it doesnt
maybe check your console.txt
see if its important
Is it because of it depending on how much of the food the player ate?
Oh for some reason I thought you did not have a function to get the carbohydrate for anything D:
can you check the percentage of how much was eaten? then you can just do math
no, no. it's how many carbs they ate, which comes from the food itself, yes
how much was eaten would determine how many carbs there are, but by using getCarbohydtrates i'm hoping the actual food element of the equation will be ignored, because i really don't need to know ANYTHING beside the player's initial carbs and the *carbs after they ate
does player: have a value that stores current carbs?
I'm not sure on the reason but this should tell the carbohydrate change.
do
local ISEatFoodAction_perform = ISEatFoodAction.perform
function ISEatFoodAction:perform()
local carbohydrate_before = self.character:getCarbohydrates()
ISEatFoodAction_perform (self);
local carbohydrate_after = self.character:getCarbohydrates()
end
end
ps fixed spelling mistake and another thing
thank you SO much hooking it to the actual eat food action makes perfect sense in retrospect
do i need to add an event for this or will do take care of it?
do
--stuff
end
There is just to avoid that local variable ISEatFoodAction_perform being visible in functions defined below it.
What that code does is make a variable ISEatFoodAction_perform referring to the original function, then it makes a new function of the same name as the original, replacing the contents of that name, with a new function. The new function runs the original function.
(Farewell)
no need to get cheat menu just go in admin or debug and theres an item list menu
The grenade launcher in the paw mod isnt working anyone know why?
i'd try #mod_support!
Is there a math.floor function in kahlua?
i've seen math.floor in mods i'm looking through, so i think so!
Hmm....
its my first time modding
anyone has a collection to share?
something in the last section of my mod is throwing everything off, YET AGAIN. if i have to play more comma whac a mole i'm gonna CRY i thought i was SAFE
-------------------------------------------------------------------------------------------------
-- raises blood sugar on carbohydrates ----------------------------------------------------------
function Diabetes.EatCarbs()
do
local ISEatFoodAction_perform = ISEatFoodAction.perform
function ISEatFoodAction:perform()
local carbohydrate_before = self.character:getCarbohydrates()
ISEatFoodAction_perform (self);
local carbohydrate_after = self.character:getCarbohydrates()
end
end
local carbs = carbohydrate_after - carbohydrate_before
local SugarValue = SugarValue + (carbs / RATIO * ISF)
end
Events.EveryTenMinutes.Add(Diabetes.EatCarbs)
What do you mean by collection?
I am so VERY confused by ZombRand()
95% of the time it outputs a integer (eg 9, 25, 60)
but that other 5% the output is 22.000000000000000000000012
Anyone have a spawn file template?
4K+ subscribers in 48hours + a few hours, guess people are happy with the new mod ๐
try something like this maybe? string.format("%.2f", amount) or something
not 100% sure pz kahlua has string.format though
it has math.floor and math.ceil
i've tried methods with those with no luck
but lets try the string.format
hey guys i made a radio as an attachment, i wonder if there is a way to keep the radio ON when its not equiped on primary?
item Wiz_SentaiHelmet_Chip_Radio
{
DisplayCategory = Communications,
Type = Radio,
Icon = Wiz_Chip2,
Weight = 0.1,
DisplayName = Sentai Helmet Chip Attachment (Radio),
UseDelta = 0.005,
DisappearOnUse = FALSE,
TwoWay = FALSE,
UseWhileEquipped = FALSE,
IsPortable = TRUE,
IsTelevision = FALSE,
BaseVolumeRange = 10,
MinChannel = 88000,
MaxChannel = 108000,
TransmitRange = 0,
MicRange = 0,
UsesBattery = TRUE,
IsHighTier = FALSE,
AttachmentType = Wiz_AttachRadio,
WorldStaticModel = Wiz_chip_ground_radio,
Tooltip = Tooltip_item_Radio,
}```
string.format("%.2f", amount) works. I just have to tonumber() when i want to do math.
a bit frustrating but at least it works
just do the math and then convert the result?
- As of the last time I looked at the java, and I have no reason to expect this to have changed, Inventory Item radios currently do no receive or broadcast transmissions unless they are equipped in one of the hands; this is dictated java-side, and not modifiable with lua.
You can disable radios turning off when not held in-hand via lua, but they won't transmit or receive when not-in-hand, even if they are on.
Well, the result is said aloud, then its added to the total, then stored
so i'd have to convert twice
this is dictate by type = radio i assume? isnt there a way to create a new type= ?
Changing the type wouldn't enable it. It's a deliberate hard coding in the java files for PZ that inventory items cannot receive or transmit radio messages unless equipped in a hand.
Might be possible to create a whole new system in lua to piggyback the radio system, and peek the contents etc, and use that to communicate messages to not-proper radios. But it wouldn't be a simple newbie project by far?
I don't like that state of affairs, but that's just it's how it is?
Also, new item types, akin to "Food", "Weapon", "Container", "Radio" aren't something that can be made without modifying the PZ java.
I believe so, I saw a screenshot recently that had "kills # / kills (fire) / kills (vehicle)", but i don't know what mod that comes from
\media\lua\client\ISUI\ISInfoContainer.lua maybe?
Ehh, this file is pretty cryptic to me
@tribal marsh @grizzled grove https://steamcommunity.com/workshop/filedetails/?id=2553809727
i think this is it
Sure seems like it
seems like a good example to work from
From radio/devices/DeviceData.class, "why inventory item radios will not work for broadcasting or receiving transmissions unless they are held in a hand"
if (isoPlayer.getPrimaryHandItem() == radio) {
byteBufferWriter.putByte((byte)1);
} else if (isoPlayer.getSecondaryHandItem() == radio) {
byteBufferWriter.putByte((byte)2);
} else {
byteBufferWriter.putByte((byte)0);
}
Every ten minutes the code is hooking code onto ISEatFoodAction:perform. This code creates two local variables and does nothing with them. Also in the ten minutes thing it tries to do something with carbohydrate_after and carbohydrate_before, neither of which exist in that context.
It also referrs to the variables RATIO and ISF which you may or may not have made global variables elsewhere. Finally, even if the final line in the function worked, it is just creating a local variable called SugarValue which will not overwrite a global variable by the same name.
no no i AM learning - i made RATIO and ISF local variables that run at the very beginning of the code
local variables are just variables visible within the scope. If you just put local hello = 1337 at the top line of your lua file, each function in the file will be able to do print(hello) and it will print 1337. Other lua files can not access that variable (unless you do something). If you instead put local hello = 1337 in the middle of your code, only the functions below it will be able to use the variable, because the local variable only existed after that point. If you create a local variable in a function, then after the function finished running it deletes the local variable (Unless there is a way of getting around that but I will ignore that).
Instead of hooking that code onto ISEatFoodAction:perform every time the ten minutes event runs, which will make that function gradually bigger and bigger with each ten minutes thing, you could do it just like all the other functions and only have it run that code when the lua is loaded by the game.
Something like this would do something (with RATIO and ISF added).
-------------------------------------------------------------------------------------------------
-- raises blood sugar on carbohydrates ----------------------------------------------------------
do
local ISEatFoodAction_perform = ISEatFoodAction.perform
function ISEatFoodAction:perform()
local carbohydrate_before = self.character:getCarbohydrates()
ISEatFoodAction_perform (self)
local carbohydrate_after = self.character:getCarbohydrates()
local carbs = carbohydrate_after - carbohydrate_before
SugarValue = SugarValue + (carbs / RATIO * ISF)
print("SugarValue", SugarValue)
self.character:Say("SugarValue" .. tostring(SugarValue))
end
end
function Diabetes.EatCarbs()
end
Events.EveryTenMinutes.Add(Diabetes.EatCarbs)
so if i move everything under the IsEatFoodAction:perform() function i eliminate the need to have function Diabetes.EatCarbs(), right? since the function is already getting called when i want it to (IsEatFoodAction) and DOING what i want it to (increasing SugarValue by carbs/ RATIO * ISF. adding in Diabetes.EatCarbs() would only serve to create a NEW function, right?
i mean i'll find out when i next run the game but i'm hopeful my understanding is sound
Maybe.
hi! is it possible to define custom lua events? so far, i tried adding the command 'triggerEvent("MyCustomEvent", self.character)' to the code where the event should be triggered. This works without throwing an error. However, when I try to call a function during this new event via 'Events.MyCustomEvent.Add(myTestFunction)' I get an error essentially stating sth like 'Exception thrown java.lang.RuntimeException: attempted index: Add of non-table: null at KahluaThread.tableget'. thanks for any help! (to give more context: i try to do stuff when the character starts the situp animation as well as when the character does "sit on ground" but didn't find any predefined events for this.)
Anyone know what this corresponds to:
LuaEventManager.AddEvent("MyCustomEvent")
many thanks!!!! you always seem to know what's going on very fast!! any hints where i should add your line of code "LuaEventManager.AddEvent..."? can i just do this in the same function where i use the "triggerEvent(...)" command?
i tried my own version of the code and that threw an error. i tried your version and got the same error. do i need to define something that i'm not defining?
before Events.MyCustomEvent.Add(myTestFunction)
should be self.character:getNutrition():getCarbohydrates()
thank u you're a hero
D:
dont worry anon, you are also a hero
is there also a way to assign parameters to the event? for example, if i trigger it via "triggerEvent" and i have a variable "data" there. can i tell the function "myTestFuntion" when it is called via "Events.MyCustomEvent.Add(myTestFunction)" that it should use "data"?
Definitely more knowledgeable than me xD
its not called via Events.*.Add, thats simply adding a pointer to the function. you define data as a the arg to the function ie:
local function myTestFunction(data)
print(data)
end
LuaEventManager.AddEvent("MyCustomEvent") -- add the event
Events.MyCustomEvent.Add(myTestFunction) -- register the callback function
-- snip
triggerEvent("MyCustomEvent", "this is my data!")
many thanks! just tried it and found out by myself that you can append some (up to 5 i think) objects in the triggerEvent command. makes things so much easier!
Pretty simple question. Is IsoPlayer it's object that returns while we calling getPlayer()?
I just trying to learn how to use that library with methods.
ya it supports a few args
(it was D: about me not checking if getCarbohydrates could be run on an isoplayer)
YOU'RE MY HERO TOO ANON in a major way i just didn't want to make you uncomfortable iwhrqwiorhq
Looking for a Chatbox mod to add titles and colors into my servers chat! Does anyone have any suggestions? I have tried looking into making one but im no code writer lol
fallout mod when
sooo
my mod isnt working
and i cant figure out why
require "Definitions/SLEO_AttachedWeaponDefinitions"
print ("AttachedWeaponDefinitions:"..tostring(AttachedWeaponDefinitions))
print("AttachedWeaponDefinitions.LongGunOnBack:"..tostring(LongGunOnBack))
if AttachedWeaponDefinitions.LongGunOnBack then AttachedWeaponDefinitions.LongGunOnBack.weapons = {} end
if AttachedWeaponDefinitions.PoliceHandGun then AttachedWeaponDefinitions.PoliceHandGun.weapons = {} end
its just this line of code
and it doesnt activate
for whatever reason
im trying to remove this weapon table
-- For Specific Outfits --
-- assault rifle on back
AttachedWeaponDefinitions.LongGunOnBack = {
id = "LongGunOnBack",
chance = 30,
outfit = {"SharkBlueSWAT","SharkBlueSWATBelt","SharkGreenSWAT","SharkGreenSWATBelt","SharkGreenSWATRiot","SharkGreenSWATGasMask,","SharkGreenSWATBelt","SharkBlueSWATWebbing","SharkBlueSWATRiot","SharkBlueSWATGasMask"},
weaponLocation = {"Rifle On Back"},
bloodLocations = nil,
addHoles = false,
daySurvived = 0,
weapons = {
"Base.AssaultRifle",
"Base.AssaultRifle2",
"Base.Shotgun",
},
}```
weapons
it should remove it
iunno why it isnt
is there a good way to artificially delay the execution of a specific lua funtion for a few seconds? i am trying to "synchronize" the execution of a certain function i wrote with a certain vanilla animation. the function in question is called via an event trigger (ie "triggerEvent("MyCustomEvent")" and Events.MyCustomEvent.Add(myFunction)").
i know that there is a certain lua function called os.clock() but i am not sure if it is a good idea to use it in a mod...
or is it safe to use stuff like os.clock() or luasocket in a mod?
Only workaround which only uses pz stuff I found so far would be using Event.OnTick somehow but not sure if that is a good idea.
ok... luasocket doesn't seem to work in pz code...
how do people mod the java coding on PZ? is there a compiler/decompiler software like Mcreator for minecraft?
os.* isnt implemented in kahlua afaik
I don't know anything about the matter, aside from, AFAIK, there's no working examples on the workshop itself?
It's not something I've investigated, in that I have concerns about it's easy utility in MP + the workshop.
yes. just found out that those typical lua tricks for adding delay don't seem to work in pz.
a related question: is there a way to get the current game "tick"? i mean those "ticks" which are used in the lua event Events.OnTick.
what about colored lights? is there a way to make a custom flashlight with it?
Should this be the correct way to load in a new value for an existing distribution table? I'm not getting an error but it doesn't feel like it's being overwritten
SuburbsDistributions["all"]["inventorymale"].items["Base.Cigarettes"] = 3
Hello, I have a few problems with my mod. First, I am able to spawn my modded firearm, but unable to find it in its supposed natural spawns like police armories, gun shops etc.
Next is the fact that it still shows the vanilla shotgun model whenever I have it equipped.
Lastly, is with the audio, all of it became muted when I added some new audio files to it.
Do you know how to fix this?
are they .wav?
Yes, they all are.
hey guys, i notice i set this on my robocop gun to fire 3 shots at 1 time, but its not working, nor the clip is spending 3 at time, it spend only one, what im missing here?
ProjectileCount = 3,
Anyone figured a way to prevent opening door with the keyboard shortcut >?
The keyboard shortcut "E" doesnt use the TimedAction as it seem to be hardcoded into the java.
So basically we can prevent opening door/window from clickhandler, joypad and context menu, but all this is useless cause the E key will just open it anyway.
Temp solution disabling the keybind for interact when i need to.
Maybe try:
FireMode = Auto,
FireModePossibilities = Auto/Single,
?
so anyone figured it out?
i cant remove this table for the life of me
require "Definitions/SLEO_AttachedWeaponDefinitions"
print ("AttachedWeaponDefinitions:"..tostring(AttachedWeaponDefinitions))
print("AttachedWeaponDefinitions.LongGunOnBack:"..tostring(LongGunOnBack))
if AttachedWeaponDefinitions.LongGunOnBack then AttachedWeaponDefinitions.LongGunOnBack.weapons = {} end
if AttachedWeaponDefinitions.PoliceHandGun then AttachedWeaponDefinitions.PoliceHandGun.weapons = {} end
current code
i want to remove this code
-- For Specific Outfits --
-- assault rifle on back
AttachedWeaponDefinitions.LongGunOnBack = {
id = "LongGunOnBack",
chance = 30,
outfit = {"SharkBlueSWAT","SharkBlueSWATBelt","SharkGreenSWAT","SharkGreenSWATBelt","SharkGreenSWATRiot","SharkGreenSWATGasMask,","SharkGreenSWATBelt","SharkBlueSWATWebbing","SharkBlueSWATRiot","SharkBlueSWATGasMask"},
weaponLocation = {"Rifle On Back"},
bloodLocations = nil,
addHoles = false,
daySurvived = 0,
weapons = {
"Base.AssaultRifle",
"Base.AssaultRifle2",
"Base.Shotgun",
},
}```
the weapons part
i thought of trying this ```table.remove(AttachedWeaponDefinitions["LongGunOnBack"].weapons,1);
table.remove(AttachedWeaponDefinitions["LongGunOnBack"].weapons,1);
table.remove(AttachedWeaponDefinitions["LongGunOnBack"].weapons,1);
table.remove(AttachedWeaponDefinitions["PoliceHandGun"].weapons,1);
table.remove(AttachedWeaponDefinitions["PoliceHandGun"].weapons,1); ```
just remove the first part of the table 3 times over
help?
what's the mod called that integrates with the twitch chat?
is there a simple way to get the variables an item has? e.g. MaxRange, etc
as in, the variable names
gimme a sec and ill dump them here
@odd notch
fixed some values i forgot to remove a java keyword which doesnt matter for this purpose
ahhh thanks
i'm trying to find the generator's range variable
assuming it exists
and isnt hardcoded java
from what i know generators are mostly hardcoded

let me look at generators
Hey ya'll, any guides out there for updating a mod to make item placeable? Or where in teh game's files I can look for the logic to figure it out myself? TIA
@odd notch
private static final int GENERATOR_RADIUS = 20;
and final means it cant be changed
is that in the IsoGenerator class?
yes
np
how can I get which item the player is using? after searching in the isoPlayer fields, I found nothing
player:getPrimaryHandItem()
player:getSecondaryHandItem()
thanks
item Book
{
DisplayCategory = Literature,
Weight = 0.5,
Type = Literature,
UnhappyChange = -40,
DisplayName = Book,
StressChange = -40,
Icon = Book,
BoredomChange = -50,
StaticModel = Book,
WorldStaticModel = BookClosedGround,
}
Anyone know what folder I can find for example "book" icon?
I can find the model and texture but the icon isn't apparent
probably in the pack files
thanks
how can I find a function by its name? Manually search for it in the lua folder or is there some way faster and easier?
my text editor lets me search a whole folder
Which text editor do you use?
Did TIS release documentation on how to implement the new "Place item" feature ?
I want to be able to update my mod to place things
atom
if I overwrite the basic items, will they spawn as usual
is this correct syntax?
table.insert(Distributions.motelroom.sidetable.items"Item,500")
loads of examples online of procedural table syntax but I'm trying to add items to the regular distributions file
table.insert(Distributions.motelroom.sidetable.items, "Item")
table.insert(Distributions.motelroom.sidetable.items, 500)
Tried this and it threw an error on start
sidetable of non-table: Null
The error means that Distributions.motelroom was nil; not at my computer to check at the moment, did you mean to use the procedural distributions table?
Which one of you has loaded cjosn
@frank elbow motelroom sidetable does not have proc dist = yes
motelroom = {
--removed nonsense
sidetable = {
rolls = 1,
items = {
"Book", 200,
},
so do I have to use that new distribution merge system?
Which one of you has loaded cjosn๏ผ
I have no idea what you're talking about
But that looks like it's in the ProceduralDistributions file, yeah?
Is the table still Distributions? Again, not at my computer to check so sorry if this is unhelpful
no, it's in Distributions.lua
Is how to load the josn file
Oh, gotcha
Which is what I'm trying to solve, I don't know how to alter loot tables for NON procdist lists in the distributions.lua
Hopefully someone else can help you, I won't be at my PC for a minute
@no worries mate thanks for checkin in anyways
is it possible to make a battery last forever (or at least practically forever)? I tried to change the delta use value, but it seems that there is a minimum consumption regardless.
its cause each item has it's own use value for the battery
so you would need to change each item
I also changed the delta of the electronic items, but not matter how small I make it it seems there is a minimum consumption rate
I am currently searching for a command which returns information about fitness animations the player is performing. There is the command getAnimationStateName() and this works very good for various animations like running or sitting. However, during a fitness animation, this function only returns "fitness" but not which specific exercise is performed (for example situps, squats etc.). Any ideas how to get more detailed info about the specific type of the exercise performed by the player?
does anybody know where to find where ClockAssets or any of the files it contains are referenced in the code? it's a folder in media\ui obviously, but that doesn't help me figure out how the clock actually displays numbers
Player:getBodyDamage():getBodyPart()
is there a way to make getbodypart get everything?
without having to input all the data into a table
lol
Can anyone link me to how to make an item placeable as a 3d model in the world?
I have no idea what the difference between staticmodel and worldstaticmodel
if there is the mod i'm referencing that handles full body damage doesn't use it
All you need is worldstaticmodel. staticmodel is used for items in hand
is the woldstaticmodel thing you can place ? like a bed ?
@nimble spoke it's for a book, so if I only have worldstatic model then will the read animation still play?
even still the book is invisible while I read and when I try to place item it uses the 2d icon on the ground
No, beds are tiles, worldstaticmodel is a 3d model that replaces the icon when the item is on the ground
the read animation will play, I don't remember what the latest version of the read action is doing, at some point it selected the model to be used in hand by itself, I think now it uses the staticmodel in the item script
so physical object there block you patch is still isoobject aka tiles ? ^^ i see except for cars :p
If it is still using 2d icon on the ground you did not give it a proper worldstaticmodel, the most common result is it being invisible on the ground
@nimble spoke I copy/pasted the Book.X file from the main game files into my mods modelsX folder
then referenced it from tehre
I also have the tecture for it in WorldItems in textures
I'm pretty much copying another mod off the workshop but theirs is for soda cans
not the X file, you want the FBX file, and you need to create the model script for it. Check media/scripts/models_items.txt
if you even need it to have a unique world model
the item script does not reference a model file directly, it references a model script, and that script references a model file and texture
@nimble spoke I think I got it, I mixed something up somewhere
thanks a lot mate
is there official documentation to figure this stuff out or is it just the blind leading the even more blind?
yo wtf
BIG BOOK
that's with the FBX model
and reading it, it's still invisible
Something wrong with scale. Is that vanilla book model .fbx file?
@cold burrow literally copy/pasted the vanilla model from WorldItems folder
just reading
you probably forgot the scale value used by the original entry
Scale seems fine for me. Idk how to change texture now. :D
I don't know if there's documentation about it. You just got lucky to be lead by not-blind ๐
you need to give it staticmodel then, which is usually a different model from worldstaticmodel
isoplayer:setMaxWeightBase(value) doesn't seem to actually set maxWeight.
LOG : General , 1643991739777> Updated weight to: 8.092015
LOG : General , 1643991739992> Rolling 2 for luck
LOG : General , 1643991739992> Player's NetWorth: 184.20 -- PlayerMaxWeight: 8 Adding Weight: 0.0921
LOG : General , 1643991739992> Updated weight to: 8.0921
LOG : General , 1643991740210> Rolling 15 for luck
LOG : General , 1643991740210> Player's NetWorth: 186.03 -- PlayerMaxWeight: 8 Adding Weight: 0.093015
LOG : General , 1643991740210> Updated weight to: 8.093015
LOG : General , 1643991740252> Player's NetWorth: 186.03 -- PlayerMaxWeight: 8
LOG : General , 1643991740429> Rolling 50 for luck
LOG : General , 1643991740431> Player's NetWorth: 198.48 -- PlayerMaxWeight: 8 Adding Weight: 0.09924
LOG : General , 1643991740432> Updated weight to: 8.09924
I have a value NetWorth * 0.0005 to get the weight to add, but BaseWeight isnt changing
you don't really need your own mesh if you simply retextured the existing model
so I can take out mesh = bookbible
yeah, you can use the original model in there
bookbible is just a renamed Book.fbx
so I don't need that line at all?
fair enough
you need the line, but you point to Book
Still define the mesh
probably inside the WorldItems folder
Anyone have any insight on isoplayer.setMaxWeightBase()?
I appreciate the help, unfortunately the book is still massive on the ground and in my hands
you mentioned something about scale value?
i want to have making an item trigger something - is there no way to do that until OnCreate is implemented?
would you mind sharing how you usually do that?
function Recipe.OnCreate.<someFunct>(items, result, player)
(your code)
end```
module <moduleName>
{
imports
{
Base
}
recipe <recipename>
{
Wallet/Wallet2/Wallet3/Wallet4,
Result:EmptyWallet,
RemoveResultItem:true,
OnCreate:Recipe.OnCreate.<someFunct>,
}
}
yes, check the txt with model scripts, you just need to use the same scale file used by the book script
so OnCreate IS implemented?
Its been working for me, so I guess yes
alright cool! i saw it was a planned thing in the upcoming patch so i assumed it wasn't working yet. thank you!!
@nimble spoke I see what you mean now, thanks again for you time
you're talking about item OnCreate, recipe OnCreate has existed for a long time
@nimble spoke Any idea why suddenly when reading other books besides my mod book, the thing is giant as fuck
Also the book, when being read, is facing straight up, i assume as PZ swaps Z and Y coords
but surely that shouldn't be happening with stock mesh?
If you just added your model script it should not cause any issues with the vanilla models. About coords being swapped: that's why each model has an intended use, don't use a world model for hands and vice versa
@nimble spoke Do you recommend any way of testing to see if a custom item has distributed into the world
other than walking about and checking containers
If you added it correctly to the spawn tables it is spawning, you can always give it a high spawn chance for testing and lower it later
if i wanted to modify or swap out the zombie and scare sounds, how would i go about that?
ProjectZomboid\media\sound
then: C:\Users[username]\Zomboid\Workshop[modname]\ - set up your workshop mod here
make sure your mod structure matches the original game folder structure
your mod will overwrite filenames
(this is all a guess, someone correct me if i'm wrong)
i'll keep this in mind. it sounds similar to kenshi modding
i need a weapon that is a squirt bottle of holy water.
Hi, I published a mod two days ago, and I'm very happy with the acceptance so far, my expectation has been exceeded.
It was my first mod, something very simple, but I loved the feeling of seeing people subscribing to it.
Thanks to everyone who helped me, especially @drifting ore, who helped me when I got stuck, and was about to give up the task.
anyone have any ideas why my custom book isn't spawning anywhere? I can cheat it into my inventory no problem
100?
no idea how to help, but i absolutely adore the roll to add it to motel bedside tables
I want to replace the default "book" spawn with bibles
but idk how to remove things from the spawn lists, only add them
isn't 100 the highest
Isn't it 0 to 1?
no it goes above 1
please remove third and fourth lines
and where did that function by the end came from?
Came from the forums, frrom one of the devs
ohhhh really?
all that could be done just like you did for the previous lines
with the lines removed your item should spawn
Last bit is kinda no bueno, in that it would completely overwrite the motel room side table distro entry so it would just spawn the bibles and nothing else, but I gather it's the intent.
You would do it just like all the entries above it to have it spawn there w/o wiping the motel room occupied sidetable entry
@willow estuary the only thing that spawns in those side tables is books so I want to replace them totally
Can you give me an example of how to write a line like that?
Because I can't figure out how to do it for object that aren't procedural
require 'Items/SuburbsDistributions'
table.insert(SuburbsDistributions.motelroomoccupied.sidetable.items, "CokeBaggie")
table.insert(SuburbsDistributions.motelroomoccupied.sidetable.items, 1)
table.insert(SuburbsDistributions.motelroomoccupied.sidetable.items, "pa_CokeBrick2")
table.insert(SuburbsDistributions.motelroomoccupied.sidetable.items, 0.01)
im probably missing something really simple but how exactly would you use multiple units of a drainable in a recipe? i assume it's possible because the crafting menu specifies "1 unit" is being used
recipe Lay Out Four Lines
{
CokeBaggie=8,
Mirror,
keep CreditCard/HuntingKnife,
Result:MirrorWith4Lines,
Time:250,
Sound:AddItemInRecipe,
Prop1:Source=3,
Prop2:Source=2,
}
CokeBaggie is the drainable in this, right?
I'll give that a go later Blair thanks
Yep
you should avoid replacing totally because other mods may want to add to it and your replace nullifies it if its loaded after
@drifting stump I'm guessing then I should use it to "merge" the original loot pool and the new one I introduce yeah?
is there a way to have access to the list of all spawned zombies on the full map, not just the current map chunk?
I'd like to get an idea about number of zombies per map chunk or something like that
I just got a DMCA takedown on one of my workshop published items
you're own mod? ๐ฎ
did you ask permission?
What an ass
well no? ๐
giving credit in the description does not allow you to steal code?
steal code
well that's what you did
Itโs literally two fucking lines that add recipes
And I added two more
And kept everything else the same
but then you distributed code that is not yours?
It was on the steam workshop itโs not like heโs going to loose money
Manz wasnโt selling it
think of it as a book, you take a book, add two lines and publish it under your name, does that feel OK?
Thatโs dumb
does not matter if he was selling it or not
no it's not dumb
it's very similar to what you did
So if I took napoleons autobiography
And added extensive commentary to it and publish it
Napoleon can sue me?
well that's dumb, because napoleon is dead
if my understanding of copyright is correct, yes
Whatever I have his personal address now because of the email I got lmao
you should learn about copyright I guess
What's the intent of this statement?
A point
Would you really want some random person on the internet to have your address?
Over a workshop item that isnโt even six lines of code
That you arenโt even selling
There's a threatening tone to your statements that is probably contrary to the intent of this discord's rules.
I just hope you're not going to do anything stupid with that information...
If I wanted to be malicious Iโd just dox him
But weโre not here doing that are we?
hopefully not
Dunno, you even mentioning that gives off weird vibes for sure, though.
Whatever copywrite law in the United States needs a nerf
Even outside of that you're not even covered by Steam's Subscriber Agreement
There's obviously an aspect of how realistic a claim is. If something is two lines of code and you add to more to it, I don't know, not much of a case there though it depends on the lines of code. Not many ways to add a recipe, for example.
Up to Steam to decide in any case.
Just saying that giving credit does not give anyone carte blanche to modify the UGC of other users.
Obviously the correct choice was to create a mod that requires the original, not edit the original.
Aye
Quite easy to do as well, require=PlayerTraps is the key part in mod.info
name=Nolan's Traps Updates
poster=poster.png
id=NolansTrapsUpdates
require=PlayerTraps
description=
url=
Whatever he canโt dmca me if I upload it privately right?
Itโs only for my friends and I anyways
oh my
... just write it the correct way
Donโt even know the correct way, just picked a random mod and used itโs text pad full of code goodies because it was easier than setting up the files
Itโs a miracle I figured out how to make it itโs own Thing
Modifying text pads is my specialty
Recipes are very easy to add into this game. There's no Lua involved if the recipe is simple
no offense, but that kind of ignorance is what gets people in all sorts of trouble
you said the author was an ass but I really have big doubts about who's the ass in this story
The Steam Subscriber Agreement doesn't differentiate there, for what it is worth.
Sorry that you kind of walked into a lions den in here, but modders are bound to care about the things they have created.
Hope nothing here gets personal.
And no need for insults.
Whatever I donโt think he can strike me if I make it private, this guy is going to have to live with three people using a modified version of his mod that adds like two recipes
๐คทโโ๏ธ
In that case I wouldn't be too loud about it at a place where a bunch of mod authors reside, who would have every right to be upset about people copying their work without permission.
Sure, most might not care about some randos using a modified version, but it didn't sound like you had it set to private from the get go?
Wouldn't mouth off about it, for sure ๐
Kinda just picked the worst possible place to complain about it 
and you're OK with that?
It's not about if I'm personally ok with that, it's about if there is anything an author can feasibly do that would prevent anyone from modifying their work and using that modified work among their group of friends, like people have been doing forever.
I see
Uploading that modified work to the workshop privately? The author would likely never find out and I don't see why they'd really care in that case.
If that mod is uploaded publicly for everyone, and the author did not give permission? Doesn't really matter if there's credit given or not. That shouldn't fly.
Code copyright is basically a gray area anyways in US copyright law.
Even changing the names of functions is enough to void any copyright protections
But speaking plainly: why would a modder be forced to send a person his full personal data because that person took his code and put it in a modpack, for example? There's packs out there with 50+ mods in it and nobody reports it via DMCA because they don't want to get doxxed. They clearly violate TIS rules for mods and steam subscriber agreement, yet stay up for months.
But steam itself has their own rules in the EULA
And EULAs/TOS are technically a contractual agreement
Well, if someone doesn't want to go the DMCA route they can also report a mod and include their explanation regarding it being an unauthorized re-upload of their material in the report field.
You have to in order to file a dmca
Yes, and those reports are what stays active for months. Not DMCA.
You can't fight a DMCA without using your own personal info anyways lol
Exactly. Why send a person ammunition to shit on you even more then?
Literally
Heโs lucky Iโm not a malicious person
I mean
I am going to call him a dork in steam though
You can't really do much with a name
That's an interesting perspective. Just for my own information, is that the general view of TIS about copyright infringement on the work of the people modding your game or just your own?
I'd refrain from doing so as well.
I don't think you're going to get much sympathies with that kind of attitude here, really.
Why do I feel like this is some sort of gotcha question?
Is it a controversial take?
I think a better question is did the dude go through the effort of downloading your mod edit and checking the code?
Didnโt come here for sympathy, not what I used the internet for
Came here for advice
And with my advice I am going to upload it privately
Thanks to said advice
Or did he just see it was an edit in the description and then DMCA
Anyways thanks boys
Toodles
Because realistically its probably the latter
just a simple question
Feel like mine was too
I mean, modification of material for personal usage is protected by most creative commons licenses
No idea what steam ensures their workshop content under
feels like your question was just to avoid answering mine
I think if anyone is modifying a mod for private usage they should send it to their friends as raw .zip files and not reupload it to the workshop lol
This some weird sort of game we're playing?
I just feel like it's a gotcha question when what I said was not controversial at all, so why dance in a circle?
Intend is hard to interpret through text, but getting weird vibes here lol
well it feels to me you just gave your approval when @drifting ore suggested he should continue stealing the code but publishing it privately. Which in my opinion is not OK. Hence my question, nothing personal I just want to know if this is TIS general perspective on the subject or just yours
If someone modifies another modders work and never uploads it to the workshop or does so privately, and never makes it publicly accessible, it's certainly a different situation than uploading modified work with credit but without permission?
Same thing with people learning how to make video games. They might flatout copy another game use assets that aren't theirs, but not distribute it except in order to use it with some few friends.
Respectfully I donโt care about your opinion, please donโt ping me
@drifting ore feel free to block me I honestly don't care
I'm not saying the situation are not different, but I think both are not acceptable?
I think it has to be accepted that one scenario is entirely unpreventable though, which is my point. There is nothing that can be done to prevent someone from downloading a mod and modifying it for their own personal use.
so you won't even ban @drifting ore from this discord for stealing code knowingly from people modding your game and not feeling bad about it in any way?
Well, thats stepping into out of scope territory
Thats not nasKo's job really, to enforce law on someone elses intellectual property
How about you take it down a notch. We don't even know the mod in question.
And no, I am not going to ban someone from the Discord for making a mod that is a modification of someone elses, after saying they will cease distributing that mod without the authors permission AND after the author made it clear they do not want it distributed. Despite them being a bit of an asshole about it and coming here to complain about it and post something that could be taken as a thinly veiled threat.
My opinion:
Take someone else's code, and make small tweaks to release something very similar and compete with the original, NOT COOL!
Copy parts of code, and solutions from different authors, to do something totally different, and that won't compete in the same segment, COOL.
โฆโฆ
I came here, monitored the situation and intervened how I saw fit. If you have an issue with how this was handled, you're entitled to that opinion and if you find ways to come off less confrontational I'm certainly willing to learn how this situation can be handled better.
If you think this was already worth a ban, I don't agree right now but I'm open to find out how someone admitting to modify someone elses work for personal use should be a bannable offense.
Man I didnโt know this was okay in this discord?
Good points @weary matrix crazy the guys even hinting at using his address against him
Modders shouldnโt have to worry about their personal details for doing what is right
I agree, which why I intervened after seeing that line.
Just block and move on then, he clearly won't stop
And you're better off putting distance between you and this convo as well because you're on thin ice already after the thinly veiled threat.
(on further thought nvm (:d also typos))
I just want to ask for a rundown or if there was a tutorial somewhere on how to merge mods for personal use lol
It looks like part of it is not putting in public on steam workshop :d
Kek. Nw it'd just be unlisted I just want me and my friends not to lose another server we put a few hours in because one of our 50 mods updated
It's getting heated in here
That's why I took off my jacket
Since I've been doing that with my own mods, my advice is, have all file names be easily identifiable, because any issue or update you need to be sure what is what
name prefixes that tell you where they come from whenever possible
Thank you for the advice I'll be sure to do that
I would suggest, on your dedicated server, removing the workshop IDs so the mods dont update. for each client, move the workshop mods to the local mods folder and unsubscribe from everything. No versions will change and you dont have to worry about updates.
Or be radical and ask for permission first.
That's the part most people seem to forget.
Yeah, when in doubt ask first, and be prepared since the answer can be a big no
You can always write your own mod launcher that downloads from the host site
That assumes I know how to code
Powershell is pretty easy! maybe its time to learn how to script haha
I think what most people have a problem with is the helplessness. If somebody reuploads your stuff without your consent you can't do anything without leaving yourself open for attacks. Either go with DCMA and risk getting doxxed or use the useless report feature on steam.
So ask for permission at least, before repacking the work of others.
For personal use?
Always. Have respect for the work modders put into their work.
no because that's entirely unreasonable and if the guy above hadnt stupidly uploaded his mod as public he would have not done anything wrong
this is not different from me downloading blairs or peachs or sharks mods to learn what he did and then adapt that shit for my own personal use that I never shared with a single soul
Maybe the morality could depend on who made the mod. It seems some people want people not to use their code for personal use or with friends. Some people also are fine with it even if they are not asked. Oh maybe that is why people say to ask.
A modpack is a repack, not change or adaptation.
That I am doing for my own server that's not public
exactly as long as you don't have the modpack set to public it is still personal use and none of the mod authors would find out
as soon as you start to put your server public your an asshole though and should certainly have permission first
I had one mod years ago and people would constantly ask for support on it using an outdated as fuck version
have not uploaded a mod for public use since then because idk how you people deal with that lol
your going insane i cant imagine anything different
Mostly with a preemptively placed statement on repacking and stuff.
like the usual minecraft modpacks
but this was years ago mind and the game was not as popular
tbh if the game had a proper modding api with support for patching in a simple format for both script an lua as well as a java api and a mod versioning system then i would be like sure, takedown everything. but when you go to something rimworld, at least there you don't have an excuse of it being hard or sometimes not possible because the total lack of mod support on the dev's end.
once a system for patching scripts is added that can allow multiple mods to modify the same thing then I would say you should take a hardline approach on this.
also regarding repacking, well if the mod support mp and a modder updates 6 times a day well, in rimworld if i update 2 times i get backlash and unsubs let alone what happens here where with a decent list a server can have to restart every 20 minutes. It's not entirely the modder fault since that should be handled by both steam and indiestone but they don't so give people an alternative to packing if you update too often or tbh in any other community you would lose all your subs.
with the numbers of some popular mods these days no way i wouldn't of packed my shit and never looked back if I imagine getting x100 as many support questions from people using outdated versions
lol anyone have any idea what could cause this? that is the new car wheel i made and its also somehow spinning???
Its so wierd people are willing to disrespect mod authors and at the same time use their mods
Oh my
I'll just go figure it out myself thanks anyway
it is entirely on steam because i cannot think of any game having it any other way
my car is normal size and the wheel next to the car is proportional in blender
my ark server suffered from the same issue
patching is already a thing. problem is most people dont bother to take the time to learn lua properly to know how to do it, so they blindly copy or overwrite/replace stfuf
just dont publish anything publically and you'll be golden my dude. what you do privately is ur own business
it is not. that is not patching, that is a hack at best.
I know and that's what I wasn't going to do anyway but I still got an ethics lecture for some reason
its literally spinning like a tornado though
a proper patching system allows you to order patches by giving priorities, check for possible patches on something so you can warn the user and even do inline patching
I literally just wanted to play with my friends
let alone the fact that scripts can be patched that easily by multiple mods
check that you applied transforms in blender before exporting?
also there is a solution for the update issue and it is rather simple, a simple button that create a local copy of mods but tbh the game can't even handle 2 folders with the same name so it's not going to happen
for function Recipe.OnCreate.myFunction(items, result, player) what is "items"? Can I make a recipe require a corpse and use that as targeting for eg items:getModData().someData?
If no, how would I target a corpse and add modData to it?
In the client or shared folder somewhere
function corpse_Context (player, context, worldobjects, test)
local corpse = IsoObjectPicker.Instance:PickCorpse(context.x, context.y)
local mData = corpse:getModData()
end
Events.OnPreFillWorldObjectContextMenu.Add(corpse_Context)
tbh the fact that people don't realize how modding in pz is kinda unfriendly because the lack of api and tools to do stuff like patch ordering, checking for patches, inline patching and more. until then i think the barrier to entry is higher than what it is said to be.
the mouse position on screen I believe?
So (player, mouse coords where context menu was open, the Object in the world to interact with, test(?))
still not sure why it was spinning ๐ค
It is a low rider, take the rims off lol
lmao
Player, context menu instance, list of objects connected to the click
Yeah, player number but not player object in this case. You can always use print(tostring(VARIABLE_HERE)) to better evaluate what the values being fed to these sort of functions are?
I feel dumb. thats the best thing I've ever heard today.
It's a game changer alright ๐
you said the wheel model is of proper size for the vehicle, but are these 2 the sme file format? do you apply a scale for the vehicle or wheel model scripts?
the list of ingredients
yeah that was the problem actually, the car script i copied had a scale that the wheel didnt have
(my first pz mod so excuse the noobity)
hi
i made a helmet mod
but
sth like this happened
what might be a cause?
on the ground it looks ok, face down but ok
w8, got an idea
Your helmet spaghetti'd
Does anybody know how to apply changes to sandbox settings while in-game? I need something similar to how the zombies, when using the day/night active setting, change their behavior in real-time.
Metaverse
local gTime = getGameTime()
local hour = gTime:getTimeOfDay()
local night = gTime:getNight()
local climate = getClimateManager()
local sun = climate:getDayLightStrength()
local light = climate:getGlobalLightIntensity()
local fog = climate:getFogIntensity()
if night == 1 or fog > 0.5 then
getSandboxOptions():set("ZombieLore.Memory",1)
getSandboxOptions():set("ZombieLore.Sight",1)
getSandboxOptions():set("ZombieLore.Hearing",1)
elseif night > 0 or fog > 0 or light < 0.5 then
getSandboxOptions():set("ZombieLore.Memory",1)
getSandboxOptions():set("ZombieLore.Sight",1)
getSandboxOptions():set("ZombieLore.Hearing",2)
elseif (hour < 12 and hour > 15) or light < 0.6 or sun < 0.85 then
getSandboxOptions():set("ZombieLore.Memory",2)
getSandboxOptions():set("ZombieLore.Sight",2)
getSandboxOptions():set("ZombieLore.Hearing",2)
else
getSandboxOptions():set("ZombieLore.Memory",3)
getSandboxOptions():set("ZombieLore.Sight",3)
getSandboxOptions():set("ZombieLore.Hearing",3)
end
Does editing the _Ground clothing models work dynamically like the regular models? Can I overwrite the fbx for the ground model, tab back to PZ, then make adjustments in blender without reloading PZ?
yes
im doing this rn
Hmm, for some reason my ground model isn't changing anything even when I scale it up super high ๐ค
thank you so much. i could not find this at all lol
๐
I don't think i'm using OnCreate correctly. would anyone mind explaining what i'm doing wrong here? the creation of TeststripDRY is meant to trigger the player saying their current SugarValue, but it's throwing an error. if it's (items, result, player), how would i go about fixing it?
function Diabetes.OnCreate_TeststripDRY(items, result, player)
self.character:Say("My blood sugar is " .. tostring(SugarValue))
-- read blood sugar
end
does anyone know the name of the mod that gives you a drivable wheelchair and mobility scooter?
we are getting there
im rooting for you my dude
wheelz 2 i think, the same that adds motorcycles
thank you!
1 cm at the time
is there a way to easily change origin point in blender?
aka the little orange dot
function Recipe.OnCreate.TeststripDRY(items, result, player)
player:Say("My blood sugar is " .. tostring(SugarValue))
-- read blood sugar
end
Note the OnCreate.TeststripDRY instead of _
Also, Recipe instead of diabetes
in an earlier instance (OnEat though it is) I use a bunch of _s - is that not acceptable?
Yeah, I'll post a screenshot to where it is
I deleted the ground model & the game is still using it, so I have no idea what's going on at this point @_@
lol
why, in Gods name, are you using .x to make a helmet?:
dude really
use .fbx
and the avatar as reference
stop torturing u self lol
this is .fbx???
why not?
yeah
then you are doing wrong
๐คท
you dont mesh hat/helmet .fbx like that, its position is all wrong
you are doing wrong dude
ok buddy
i mean that picture is def not a .fbx
you actually have to enter the game and look the position, i bet you are doing not only one but 2 things wrong, and i dont see the point of you posting it here, get an advice and act smart about it
I'm confused
yes and you are modeling a .fbx as .x
again, doing wrong, thats why u keep having to correct the position
is this picture here, this is not how you mesh a Skinned .fbx, unless you are doing a Static .fbx, witch i dont even know why
is your helmet static?
ugh
well than my first argument stay; why torture u self lol
static is outdated
for cloth
just make skinned, you can use the avatar as reference
your work will be x10 times faster and better
give us quick guide on making the skinned one pls
this was me trying to do it skinned
grab the avatars here
then just put the helmet on thier heads, seletec the mesh and attach 1.0 to Bip_Head01
thats it
k
export the .fbx
you guys know how to give the head weight?
its pretty easy
grab your helmet mesh, select the vertices, unselect it then join the meshes with the avatar; separate again (this will give any mesh/model the vertex groups), in your case delete all them except for the Bip_Head, then select the helmet mesh on edit mode, click on the Bip_Head and select 'attach'
believe me, its totally worth to learn this guys, you will thank me on the next helmet you make
I'll do my best ๐
I will return with the results, pinkie promise :pinkieshouldbeanemote:
stealing must be deal with zero tolerance, or people will steal again, this is my opinion
is this was my server he would get BAN + criminal charge if possible too
but since its not... mving on...
stealing
the guy gave credit he just didn't have permission and once the author dmcad he came here to shit on the author but eventually made his version private for personal use which was what he should have done to begin with
he also said the mod was just two lines of code
if that's all it takes to rustle your jimmies boy am i glad your not in charge
Perhaps someone could make a mod like that. "Mod Loader API". Something like
Hooked_Functions = {}
function PatchFunction_After(function_to_patch, function_to_add, priority)
Hooked_Functions[function_to_patch] = Hooked_Functions[function_to_patch] or {}
table.insert(Hooked_Functions[function_to_patch], {function_to_add, priority})
-- some other things
end
And also hook this mod's function onto each function being patched, and when the patched function is run, run the hooked functions in a certain order. One set of functions before the function and one set after it.
we don't know if the mod author contacted him first. from the story we can doubt that though.
if it relly was just two lines of code to add a recipe as he claimed yall are getting riled up over nothing its embarassing to see
im not 'riled', i just said what i think.. you on the other hand might be defending a thief without know.. ๐
he didnt really DMCA him though right?
Alright, we should drop it honestly
It's a java array
https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/api/README.md
Unlike a Lua table list, our the first entry in the Java List is index 0 (not 1), and ipairs will no longer work, nor will # to get the size, or [] to get the value at a specified index. For this we need to use the methods in Java's List class :size() and :get()
for index=0, known:size() -1 do
print(index, known:get(index))
end
he was dmcad according to him yes
i dont believe him
weird take but ok
? lol
by DMCA i mean DMCA takedown notice
aka a legal notice
for a zomboid mod
yeah right
not sure if you misinterpret what it takes to send a dmca but several people have gotten dmca takedown noticed from zomboid modders
who sends it?
it is essentially the only recourse they have to combat people stealing mods or using them in modpacks etc
the individual?
your just filling out a form that is literally all
it takes 5 minutes
steam has a form for it not sure why youd doubt that part of the story
never heard of DMCAing workshop items
this is new to me
so does steam take down the item?
not new plenty of people complained on steam about getting dmcad by modders recently too
I've recieved a DMCA notice for a minor mod that was all original code on steam. Nothing ever came of it, and I have no idea what the deal was? But DMCA takedowns of zomboid mods does happen.
oh so steam doesn't actually enforce it then?
and in my opinion i think many of those cases were legit since it was essentially reuploading someone elses mod
well then yeah its just smoke
I DMCA'd someone who uploaded their own version of Defecation without any permission and it was gone within 2 days.
steam does take action against those
In my case, I believe no action was taken as the complaint had no merit?
But mods have been taken down by DMCA action and people have been quite upset about it happening to them.
not always but they do evidently
oh ok
so to be clear the discussion on here was about someone at first uploading a mod for everyone to download that added "two lines" to a mod that was already just "two lines" and just recipes
if that is truthful then making that mod private was really all it took
bs stop defending thieves Temi
from that point on and from the persons description there were going to only use it for them personally
are you being dumb on purpose stop trying to claim i defend a thief
Gobless
nice kappi
its fucking personal use as soon as they stop publishing the mod
This skeleton thingy works
watch your mouth here, there are kids
modders make use of "personal use" all the time learning how to mod
you being one of them
you are not polite
i dont care about you or you sorrying or your defending criminals, just watch your mouth here
dont curse
lol
someone should make a vscode plugin for the pz scripting language whatever it is called
some autocompletes and snippets would be cool
(not talking about lua)
You two are such childs
what rule i broke here??
wow it's like there are moderators here
No rule against cursing and that can't really be your idea of defusing a situation ๐
Riling someone up even more like nobody is allowed to curse, come on.
this server is a disgrace nasko, you dont even punish thieves
That intended as a helmet? xD
u just need to select the mesh on edit mode and the attach to Bip_Head
my friends son is 10 yo and he visit this server dude, this is not cool at all
breaking Discord ToS then
again, rude as hell
Neither the game nor the server are for 10 year olds and we have never banned people for cursing, so you're off base there.
i helped a lot of people since i got here, dont give me this BS just because i complain about cursing
i dotn want you to ban anybody
I wanted to stop you from carrying on a petty argument
sorry
seemed like it to me
i want just a SMALL piece of respect from you, since i didnt do shit
I got a wrong impression then, in the heat of the moment
u did!
i was just defending people and trying to help
To me it seemed like a petty argument with two people riling up each other unnecessarily, derailing the channel.
I just wanted that to stop, that's all.
So rock on
no reason to call me 'kid' and tell me to get off just because i made 1 simple cursing complain, its my right
ok then
you can DM me anytime you want i can guide you with more details if you want let me know
in case you need

Sup big J
dude that picture on your avatar, is that the necronomicon?
@rain pumicepokes
o_o
Does anyone know of a mod that adds an item to every zombie that can be collected such as a Sample?
no but that is not hard to do, if its just an item i mean
define not hard?
well like, you can create the item, and make it spawn on 100% on zombies, i did not get into spawning yet but its not hard from what i saw
what this 'sample' would do?
its for an Rp server, Players would hand them to the Gov faction for a reward
Yeah, we have an economy build around Currency Variety as materials would be more relavant then fiat currency, just need a way to circulate some more cash in the economy
im glad your server is working fine..
aye, i do enough fire fighting to keep it together sometimes
doing either or both of these causes the whole mod to break spectacularly, so i don't think they're quite the problem? i have plenty of _s in function names and i've never had a problem before - i think it just matters that the function in the Recipe file matches the function called in the other stuff in the client folder, and it's constant in my work. if that isn't the case i have a much bigger problem on my hands ๐ฌ
Let me know if there are other mods I should support with that currency mod ๐
im in debug mode, what does the "FakeDead" flag for zombies mean
I knock them over once and they die instantly but its not like they get back up
So I've implemented the getSandboxOptions():set() function, but it doesn't update the zombies without reloading the save. Is there an update function I can use to forcibly update the zombie behavior?
I dunno? The code that mode comes from predates the most recent update, so yeah, it might now work anymore?
Also, my code example only modifies the global zombie parameters? If you're trying to affect stuff like sprinting or door opening, it's not gonna be applicable?
I'm not sure what you mean. The code works (as intended?) but just doesn't update the live game.
How can I add a model to the game? I mean what folders do I create? and all that
@white hatch watch this https://www.youtube.com/watch?v=N6tZujOPnDw&ab_channel=Blackbeard
check the ModTemplate on the workshop folder, its a example mod, you can see where some folders go
Here, I'm gonna provide the code that I use in it's entirety in case it's any help? It sounds like you might not have your code in a function?
function NightZeds()
local gTime = getGameTime()
local hour = gTime:getTimeOfDay()
local night = gTime:getNight()
local climate = getClimateManager()
local sun = climate:getDayLightStrength()
local light = climate:getGlobalLightIntensity()
local fog = climate:getFogIntensity()
if night == 1 or fog > 0.5 then
getSandboxOptions():set("ZombieLore.Memory",1)
getSandboxOptions():set("ZombieLore.Sight",1)
getSandboxOptions():set("ZombieLore.Hearing",1)
elseif night > 0 or fog > 0 or light < 0.5 then
getSandboxOptions():set("ZombieLore.Memory",1)
getSandboxOptions():set("ZombieLore.Sight",1)
getSandboxOptions():set("ZombieLore.Hearing",2)
elseif (hour < 12 and hour > 15) or light < 0.6 or sun < 0.85 then
getSandboxOptions():set("ZombieLore.Memory",2)
getSandboxOptions():set("ZombieLore.Sight",2)
getSandboxOptions():set("ZombieLore.Hearing",2)
else
getSandboxOptions():set("ZombieLore.Memory",3)
getSandboxOptions():set("ZombieLore.Sight",3)
getSandboxOptions():set("ZombieLore.Hearing",3)
end
end
Events.EveryTenMinutes.Add(NightZeds)
Thanks!
newbie here
I do have my code in a function that is called using the EveryHours event to determine whether to change the sandbox settings or not. I have print statements that showed me that the sandbox settings were being updated. The code works fine, but I need a way to reload the sandbox settings while the player is still playing the game. Your code updates the sandbox settings while the player is playing the game, yes, but it has no effect on zombie behavior because the sandbox settings are not reloaded, if that makes sense. Those sandbox setting changes would only appear after the save is reloaded.
is it hard or no support to make mod with java
i know how to code in java
lua makes my mind not good ?
Yeah, I'm sorry, like I said the code may have become obsolete? But even with the current build I'm able to successfully modify zombie behavior in real time using that technique, to make individual zombies sprinters and such, so I'm at a loss at why it's not working for you?
That is strange. Would you be willing to take a look at my code through github?
the game doesn't support java in mods, some people around have been trying to support that unofficially
oh man i am realy plesed to see you
one of you mod car mechanics and paint it black
both written in lua
the thing is i cant read the all things lua
my idea before make a drifting mod using ur Vehicle Tweaker API
Ah, I'm sorry, I try to help people in an admittedly casual fashion, sharing code and advice where I think it might help when I check the discord and see an "easy opening?" But I'm juggling other matters, and don't have the time + attention to be able to do something like that?
how do i find any documantion on lua api or such things
That's perfectly understandable
i can read java documentions. lua isnt my best yet
https://pzwiki.net/wiki/Modding is a good place to start for resources related to PZ modding.
any how thanky you for making mods
a drifting mod?
all of you
in my head it is like when on hand break determine the face of the car and remove the tire
the game does wonderfull gripping already
idk i t just an idea
One thing that occurs to me is that how zombies are handled, code wise, changed a fair bit with 41.65 because of changes they made to the zombie code to optimize them for MP? I mean, I'm basically making excuses here but it's a hypothesis ๐
Its all good lol ill take a look at server settings and the like to see if that has a different effect. Thanks for the help :)
Have I done this correctly? I can't tell if things are attached/parented properly
I don't think that would be possible, but I'm not up to date with vehicles stuff. If possible I doubt my api would help anyway
Ur api was goingto help with removing speed limit
change on the top left from Edit View to Weight Paint then u can see
the hole helmet needs to be red on it
Yeah, it's all red. I'm not sure why it's not appearing when I equip/drop it
here u can have mine for reference
also when you drop you need a ground model or it will just display the icon texture on the ground
Alright, I can finally see it. For some reason it wouldn't update the model anymore when I overwrote the fbx until I restarted the game
Do you need to set up your axis in a weird way for the export for it to face the right way up?
the ground model?
No, that's the equipped version lol
ah lol
yeah i just DM you what u need to do, if you still have this problem, open my helmet model and take a look
but the model you sent me have correct positions, did you fix that 'static' entry on the .xml?
Aww yeah :D!
has AnimZed come out yet?
B41's stable..
..and the editor that people use now is absolutely not beginner friendly
There's a good chance it will never come out since something serious happened to the person making that program, unfortunately.
hey guys i notice the game already have a gun flashlight, but i dont think it works does it? i mean it turn On?
Is there a line similar to <m_HatCategory>nohair</m_HatCategory>
that hides feet? Also, are boots that go above the ankles viable?
yes
u can hide feets with masks
<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel>media\models_X\Skinned\Clothes\Wiz_GokuBoots.fbx</m_MaleModel>
<m_FemaleModel>media\models_X\Skinned\Clothes\Wiz_GokuBoots.fbx</m_FemaleModel>
<m_GUID>bca25d8f-5d3f-4082-ab57-45822dad4672</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<m_Masks>8</m_Masks> --- / Hide Feet
<m_Masks>10</m_Masks>
<textureChoices>Clothes\shoes_socks_textres\Wiz_GokuBoots</textureChoices>
</clothingItem>
Ah, I see! Thank you so much ๐
np ๐
im trying to make a light attachment to guns here (flashlight) but its much more difficult than make a light attachment for clothing ๐ฎ
Aw man that sounds sweet!
I wonder if you could turn it on/off with the radial menu
yeah you can with shortcuts
keys
i was able to make it attach to the gun i wanted but the model of the flashlight is not showing
plus only work on my hand not attached, i prb did many wrong things i was just messing around
I completely forgot I could select faces in blender. I'm assigning vertex groups to the feet and calves and was trying to pinpoint every little vertex 
lmao
i use faces a lot, but i never worked with edges
faces are good to select parts of the avatar and duplicate them to make some clothing
A useful tip for doing weird selections
You can use UV Maps
For selecting islands
IE cntrl+L select 1 vert and it selects every connected vert until it finds a seam
Its pretty useful if you're lazy lol
anyone know the /additem commands for brita armour stuff?
In DEBUG mode, I can see the value ("codes" in attached screenshot), but I get an error when retrieving the value.
I tries "line:getCodes()" then ...
-> Exception thrown java.lang.RuntimeException: attempted index: getCodes of non-table: zombie.radio.media.MediaData$MediaLineData@587617c5 at KahluaThread.tableget line:1689...
I tried "line.codes" then ...
-> Exception thrown java.lang.RuntimeException: attempted index: codes of non-table: zombie.radio.media.MediaData$MediaLineData@688e060 at KahluaThread.tableget line:1689...
Does anyone have any ideas?
Since MediaLineData is an inner class of MediaData, is there a special statement that needs to be made in such a case?
Hey. I've been having problems with my first car mod.
After jumping through all the hoops a have this ingame:
No visible ingame model (wheels are fine tho)
and wrong scale (i will eventually figure this one out)
F7 debug menu shows black outline of the vehicle. Is this a texture or a model problem?
I've seen this exact issue in the guide i'm using but it wasnt solved there.
Any help please?
You could find List of Armor.txt in .../media/scripts
where are those folders located at
Is there a global mod data that sits on the server side rather then a client ?
Steam\steamapps\workshop\content\108600\2460154811\mods\Brita's Armor Pack\media\scripts
