#mod_development
1 messages · Page 353 of 1
one afternoon
I was taking different approach but decided with a simple spawn and despawn items until they are on the floor basically
my biggest scare was performance but no hit on it
I will try to get this out by the weekend as a mod and modder resources
teach me master
Anyone know how to use translations to specifically rename perk categories? because having Firearms as the category name when I throw archery int here, doesn't make a lot of ense
Or is this something I gotta do via lua
IG_UI_Firearms in my translations maybe?
welp, this didn't do it.
The vanilla translation is in IG_UI_EN.txt
IGUI_perks_CombatFirearms = "Combat - Firearms",
Idk how you are going to change it though, without editing the vanilla file or overriding it entirely which is not a good solution
mod translations should take priority
Ah very nice
I'm gonna get help from a buddy of mine to make a rig that doesn't have the rotation issue that the current one has, once I get that I'll make a full tutorial for how to make animations and implement them, from start to finish with the XMLs and everything
Yep, it overwrites it.
Also reorders it automatically apparently.
How does one go about saving a temporary local variable to be used at a later time between sessions?
Do I gotta save it to a txt doc and then on load read the txt for it?
Or could I attach a variable to the player's save file?
use mod data
mod data?
thanke
Its a LUA table yes, it exists in the global scope and on each object (thought does not persist on zombies)
aight
What's the difference between OnGameStart and OnLoad?
Is OnGameStart after "Click Here To Start" and OnLoad prior?
or is GameStart at main menu 🤔
clarify something for me, whats the difference between using modData and simply creating a global variable?
Mod data gets stored on save/loaded
modData is NOT mod specific, please name your moddata variables unique enough to not clash with others.
So not convoluted save/load of vars, slap em into modData and they auto save load?
Yes.
I always prefix every var outside locals with something mod/name specific
Also get synced between client/server
Been a habit of mine since creating addons for WoW, cause people just slap hundreds-thousands of em in
And hate naming conflicts.
Now, I'm assuming things like xp:AddXP(Perks.Archery, xpGain) auto save as they are synced?
And don't need slammed into a modData var?
That won't happen for a long while for "environment" stuff I believe. If you feel adventurous you could look into sprite property "surface" which for some sprites contains the pixel-height (Z). That alone of course won't tell you which part of that sprite is considered a "placable" surface in terms of X and Z. Oval tables would be an extreme example haha.
I built a polyfill for Champy's base work on that issue but I believe we cannot be the only ones who looked into that.
It would make for a nice community "meta project" though.
A scene composition framework for Project Zomboid (Build 42), Single Player - christophstrasen/SceneBuilder
That raises a point though, why doesn't zomboid have the ability to recycle brass.
I wanna be able to make my own ammunition from like, tire weights or something.
I seem to be using it incorrectly.
Even using just the example it fails.
Like no matter what I do I just crash by line two even with the example code snippet.
you crash? what error are you getting?
Im gonna look over at this
player will be nil in this situation because there is no player when the file first runs
that makes so much sense
wait until OnGameStart or something
yisss, soon as you said it it clicked
well this time it loaded. I can poke and troubleshoot.
player.getModData() should be player:getModData()
Welp, that ain't right lol
Bow-Rifle
Nah, alex ain't done nothing with aim anim for me, this is 100% my fuckup lol
player:foo() means 'call foo with player passed in as the first argument', ie 'member' functions.
player.foo() means 'call foo'
hmmm okay maybe it didn't click. what's the propery way of calling, say, myString from modData?
do I just...
modData.myString() ?
post your current code.
ideally as text
not as a screenshot..
workin with the example from the wiki for testing/poking
I'm... not sure how to use custom anims, I read the animations page on the wiki and it doesn't explain how to have specific anims paly at specific points in time.
ah
local function Hello()
local player = getPlayer()
local modData = player:getModData()
modData.myString = "Hello World"
modData.myNumber = 42
modData.myTable = {1, 2, 3}
modData.myBoolean = true
print(modData.myString)
end
Events.OnGameStart.Add(Hello)
that should be valid
you might not see it in the console, but should be able to find it in console.txt
post your console.txt then...
error checker IIRC caches previous errors so you have to clear it before it will tell you if errors are still occuring..
This one is from Error checker aaand let me find the console log somewhere
attempted index: getModData of non-table: null
function: SpeedWagon.lua -- file: SpeedWagon.lua line # 2 | MOD: SpeedWagon Foundation
java.lang.RuntimeException: attempted index: getModData of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1462)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:458)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:166)
(too long had to cut it )
yea just post the console.txt file itself by dropping it into discord.
well it did work
There you go, you need to clear error checker.
that error is outdated, the line numbers don't even match your code anymore
its telling you what happened previously, not whats happening.
oooohhhh. you're right i didn't clear it.
right you both right
okay now
if I wanted to change it and keep the change I can jsut freely change the variable?
liiike... let me edit my code...
Yes its automatically saved for you.
alright thanke i'll do some tests
Can I use lua to prevent a player from crafting certain vanilla recipes so that they disappear from their crafting menu?
okay I think this should work but I ran out of time to work on it for the moment.
local currentHours = 0
local newCharacter = false
local function NewModData()
print("New Game - newCharacter = true")
newCharacter = true
end
local function StartModaData()
print("Starting Game - Get Mod Data")
player = getPlayer()
modData = player:getModData()
if newCharacter == true or modData.SumOfHours == nil then
modData.SumOfHours = 0
end
currentHours = modData.SumOfHours
print(modData.SumOfHours)
print(currentHours)
end
local function OnTheHour()
currentHours = currentHours + 1
print("EVERY HOUR ON THE HOUR, EVERY HOUR ON THE HOUR")
modData.SumOfHours = currentHours
print(modData.SumOfHours)
print(currentHours)
end
Events.OnNewGame.Add(NewModData)
Events.OnGameStart.Add(StartModaData)
Events.EveryHours.Add(OnTheHour)
as a rule of thumb, you'll save time by testing all func/method return parameters being different from nil and logging the nil cases if you think they should be errors. yes it will bloat your code. but it will free your mind.
also in B41, there are strange cases of getPlayer() being nil in first cycle of a started game. I think it's not the case anymore with B42.
myString is a variable in the modData table, so just modData.myString
That function counting the hours is not necessary
In fact, it seems the majority of this code i just straight up not needed and really not the way to do it, whatever you're trying to do
You can directly access how much time the character survived
i actually don't agree with using too many unnecessary nil checks, they are bloat that makes your code difficult to read -- if you use a type checker you will not accidentally pass nil often, and when it does happen, the resulting error is usually very explicit that this is the case
you should only check for nil when you expect nil, or as a temporary debugging step
as lua is untyped technically to create 'safe' code you need to check every function argument and result like this:```lua
local function pow(a, b)
assert(type(a) == "number")
assert(type(b) == "number")
local result = math.pow(a, b)
assert(type(result) == "number"))
return result
end
Oh wait assert is a thing in the lua ?
yeah
So it throws an error ?
yeah
if you still want to do nil checks, go crazy, just please god do not do this:```lua
if not somethingImportant then
return
end
Can I use lua to prevent a player from crafting certain vanilla recipes so that they disappear from their crafting menu?
always assert or error or at least print
Yea
Can you pls tell me how exactly?
The crafting timed action
Sry I can't tell you more I'm not too mentally present rn lol
My personal truth is somewhere in the middle.
- Type checking as default 100% of the time
- A few asserts to fail fast on clear development mistakes "you should never pass this" -> often these are my own mistakes but never say never on somebody else using your general functions some day
- Warnings for tolerable stuff that just shouldn't happen too often
They are unnecessary intentionally as their primary purpose is not yet implemented. This was just me experimenting with the frame work of my idea. Primarily because i never modded Zomboid before.
As in : im just making sure the foundation of the code works before adding more to it.
Ah, you mean interrupting the crafting process after it starts? If so, I need something a little different, specifically so the player doesn't see the crafting recipe.
The hour counting isnfor counting how many hours has gone by since start of game and intended to add to a ModData to be totalled and saved there for a planned feature. But not been working out yet.
Modify the UI
Start of a game or start of a whole world ?
And i checked for nill cause...I dont know if it would return one or not if the data isnt there yet.
Hmm, then maybe it's better to just change the crafting script?
Start of a game as in when everything and player is loaded in.
So anytime the same save is relaunched
And not when it's a fresh new world
I believe you can't
You'll have to pass through Lua either way at least
The goal is to make it compatible for both new and old saves
We just trust functions do what they say they do—unless it's Java (I agree with everything said here, this is mostly in jest)
but!
checking for a new save may not be needed at all
but i am doing so because I don't know how it fully works yet.
yeah i am being a little extreme here, some amount of nil checking is fine if your code is getting complex and you want some sanity checks, you just don't need to pepper simple code with them especially in cases where it just doesn't make sense for nil to appear
my nil check wont stay there forever.
I'm being extreme in the opposite direction because half of the bugs found in my mods would have never occurred or would have been analysed faster if those "nil cases" were handled. So in the end that's risk management: Yes, only few of the nil checks will ever have an effect, but the ones that will have an effect will have huge effects. And we cannot know a priori the ones that will have an effect.
Actually you can
hmm, so the only way is to disable the display in the UI?
I think so
You should know what your code even does in the first place, if you don't know the cases where you can have nils returned in X Y Z code running then you literally don't know what your code even does in the first place
getPlayer() is not my code
Of course there's cases where you need to nil check, that's completely normal, but saying that you don't know when those nils can happen is kind of a terrifying thought
getPlayer can return nil in a lot of cases, like the player being literally dead
getPlayer returning nil when the game launches, you should get this error and then realize that this is a possible situation and add a nil check, and not add nil checks to everything because then you miss X Y Z situations where your code should error out because you made a mistake in some logic
Doing nil checks everywhere basically means you're completely stopping any error from happening with your code
Got it, thank you
So you will never get those errors and so you will never know something is wrong or you will have a hard time knowing where the problem is because you intercept situations where you should get an error
You presume of the way I handle the check.
You tell us that you nil check everything and I argument around that
was prob an exageration
If that's not the case, then ok but we're discussing the why and what of nil checking everything
though i usually don't, getPlayer() is a reasonable thing to nil check, because nil is a valid value it can return, but not usually one we expect
Yea
yeah like trying to call for player before it's loaded
Soooo many mods don't consider the fact that OnTick will run when the player is dead and so if they don't nil check it then it throws errors
which is what I had issues iwth prior
just don't check it silently, ideally assert or print something, because it is very weird and indicates some kind of bug in your code -- but the main reason i don't nil check is because something being nil will usually cause an error later on which just says (in one way or another) 'this is nil'
hello everyone
is there a commission channel her?
In the modding Discord
how can i join
The link is at the top of the page under the picture
you can still fetch it that way even if its dead you get the corpse or the zed
started a basic 'realistic car stats' mod...
{name = "Base.StepVan",HorsePower = 157, Weight = 3175, Cargo = 1360},
{name = "Base.ModernCar",HorsePower = 101, Weight = 1264, Cargo = 200}, -- Dodge spirit 1993. 3 speed auto, FWD. 101 hp @ 4,400 rpm
{name = "Base.ModernCar02",HorsePower = 140, Weight = 1312, Cargo = 200}, -- Chevrolet Celebrity, 140 hp (104 kW) at 4800 rpm
{name = "Base.PickUpTruck",HorsePower = 171, Weight = 2267, Cargo = 680}, -- Chevrolet C/K (third generation)
this is gonna be interesting to balance lol.
I was thinking of starting by 3x'ing.. maybe 4x'ing HP, since overall weights are going way up from vanilla.
(ie, a vehicle that says 101hp under my 'real stats' mod, will drive the same as one with 404hp under vanilla)
that's not possible, getPlayer returns IsoPlayer, those are not compatible types
The other issue is there is dozens of variants of cars... And id rather not have to repeat those entries for every variant
But wildcards/short matching are also.. kinda.. meh, because theres like variants of ModernCar but ModernCar02 is a seperate one -_-;
I forgot to share, I did some rushed research that needs checking, you should look over all of it lol. I didn't single out specific engines as you can see, hadn't gone there yet, but I hope that helps, somehow, I dunno
nice.
Yea, its kinda questionable what engine to go with for a lot of these, might require some play testing/etc.
All the regulations irl are not helping lol
And also just realizing: some vehicles are better then others and thats OK
True
we really need more shitty vehicles in the game. and good ones.
Now when do we get to the rebalancing by quantity lol
right now, they all just sorta feel.... meh.
the biggest cargo cap vehicles in the game hardly feel any different fully loaded then the lightest sports cars.
Not enough variety to make any one car feel better, they kinda all just exist compared to modded
I forgot to put a weight for that last vehicle
At least you know none of them are diesel lol
crosses off 1 of 8 engines from list
1878 kg
Yea im trying to make the vehicles actually act differently and have different uses lol
that’s going to be absolute fire! lol
I agree that cars right now kinda just exist — a mod like this is a legit game changer xd
I mean doesn't help that vanilla car physics results in vehicles sinking into the road at >1300kg
the amount of b41 car physics shenanigans back in the day… lmao😭
cars flying off into the stratosphere
one neat idea for this mod could be playing with the injury factors from car accidents…
… say for example, having a subcategory for cars based on “safety level” or smth
There is an occupant protection factor on cars..
oh neato!
i’ve yet to do any modding with car stuffs. should definitely play with it one of these days 🙂
Anyone able to direct me to a page that explains how to play/use custom anims?
there's a patch for this already
storage limits are enforced by lua, you can get away with anything if you patch enough functions
Yea but that's no longer the same class and that can cause problems
it doesn't just cause problems, it's not possible in the java language 😅
if a method says it returns IsoPlayer, it does, no exceptions, if anything else is possible then the method cannot be compiled
Then idk what he's smoking
Interesting, so I tried JB max capacity overriide, and I noticed a few differences between my mod
One: with jb max capacity override, even with debug mode/etc, I can't pickup items over 50kg, but with mine I could.
Two: Moving insanely heavy items with jb max capacity override takes a very long time, while in mine it seems capped?
that may be true
but the point is its still referenced to an object and not nil
I fixed that up in my (unreleased) no limits mod.
I mean, im not even sure if its a bug since 500kg items don't generally exist in the game outside of useful barrels mod 😛
It's not a bug, as such, it's caused by the code that gives you a speed boost when a bag has more empty space not accounting for "what if the bag is at 4500% capacity?"
ah.
that's my fix (feel free to use it if you want, or make a better fix lol)
I mean, I don't really have an issue with how it behaves in my version lol
How much can you put in one bag? When you remove the limit altogether things get wierd.
Oh, you also want this: https://steamcommunity.com/sharedfiles/filedetails/?id=3457038023
Otherwise if you go to crazy levels of overfilling bags you can barely walk
Again, not really a bug but the the bag slowdown stat (which is not shown in game!) takes the weight of the bag into account.
So if you have 61897/30 in a bag it is weird.
Also fun: putting several tonnes into a car really messes up the physics, and putting enough negative weight into a car reverses the steering.
Oh, I already fixed overweight car physics
Nah, im only trying to adjust trunks
(and maybe later stationary containers, lol)
But I will prob just use JB capacity override
oh..... Mod data override not yet compatible with trunks (WIP)
well, thats problematic.
I'd have to check the decompiled code
But on second though, maybe i'll get this for my other loot goblining.
makes mod where you just wear a W900 box truck as a backpack
There's an API to increase the capacity limit
It doesn't support per-vehicle capacity, only per 'trunk' type...
It already does all the patching you're doing rn, I think it does it for vehicles too in fact
Ah nvm then
(kinda weird as there is only like 2 or 3 trunk types in the game?)
Why would you need per vehicle instead of per truck ?
What's the diff ?
All vehicles use one of like 2 trunk types, but they override it per-vehicle
Here's the whole mod, there may be other bits you can pull out
It lets you configure what will allow endless items and what wont
Also maybe something to ask @queen oasis to add
Thanks.
I left a comment on his mod yes :0
I honestly expected to just make my own shitty patch and then add compatability for JB capacity override to take over instread.
that's the "if it's a vehicle container" check
since people hate mod requirements so much...
(though this is already gonna require realistic car physics soo)
yea, I assumed id need getParent and instanceof to figure out if im modifying for the right thing
Probably best to implement it in his mod, also he might have a git repo so you can go and do pull requests to it
Lua API modding video guide
Introduction guide to making Lua mods for Project Zomboid, it doesn't explain the language itself but the Lua-Java interface Project Zomboid uses and shows how this applies code wise and how to use it in your mod. It explains various documentations like the JavaDocs, LuaDocs, Lua events and how to search the game files for things.
https://youtu.be/FGbyLGLmxes
This guide explains how the Lua is able to communicate with the Java, how to use this behavior for your mods, and how to set up a basic Lua mod structure. It will also teach you how to use the JavaDocs, LuaDocs, how to search the game files and decompiled code to find what you're looking for, and also searching Lua events to implement specific b...
Sweet guide, I'll try and find some time to give it a watch incase iv missed things.
I haven't used git in years lol.
I think the last time was to commit some code to factorio.
(And then get yelled at because I did something improper, like had too many commits to my branch or something? I don't even remember)
now I just post fixes on forums as it takes me far too long to remember how to use git.
There's a github desktop app that trivialize it, and it's a good way to get used to the process of pull>commit>push, as well as the pull request flow and stuff so if you have to use the CLI you already know the order of things and what to do when
still more work when im trying to do this all for fun 😛
Fair enough 😄
But wait, you're not using any version control even for your solo mods then? That's brave
Only took one fuck up for me to start using git
I remember a decade ago when I thought making timestamped backup folders of projects was sufficient 😅
How can I force a zombie to fall forward
You can use setVariable to start the animation of a zombie so that might do it
theyre freezing
There's sometimes setters available, check the JavaDocs
Sharing here too:
I am working on custom params to be pass down per weapon so modders can adjust where the bullet case will come off
also fix a bug that happen on some edge cases when you were so close to a worldsquare so the bullet would go crazy left and right lol
also did some casing using vanilla models and my amazing shitty blender skills haha
okay so my code is half-working.
BUt the strange part is one of these numbers should 8 but the other should ahve been zero, but isn't
I suspect was because the script was still loaded even after leaving the game and going back to menu. Will see if resetting lua will change it
nope something is broken or I am misunderstanding. should def be a zero.
ah I found the issue.
Okay now I can actually work on the mod now.
I'll have a look. I honestly forgot about the trunk mod data thing. and there is a transferTimeModifier you can use to adjust the slow ass transfer speed.
Is there a method for getting the player's current animation?
someone already did this, I think. I remember seeing a mod for "1000 capacity for backpacks"
mod data seems to work for me on trunks. maybe I was trying the wrong way when I assumed it didn't work
or maybe I fixed it and don't remember doing it
okay i got a curious thought for those that know how the map/map chunks are loaded/done.
Is a building/POI loaded in by a chunk in it's entirety, or "partially"? By that i mean.. if I wanted to add an underground area/base under an already existing building on the map that makes no changes to the upper building... would that over-write the surface upper building?
they're loaded chunk by chunk
Per vehicle?
I kinda need it per-vehicle (type), since there are only like, 2 or 3 'trunks' in the game so overriding them overrides every vehicle
if vehicletype then trunk:getModData["JB_MaxCapacityOverride"] = { capacity = 42069 } end
per-vehicle sounds awful for my side
or maybe I'm dense. you're talking like setting caps for "Base.NormalCar" or "Base.PickUpTruck" right?
Yes
Im working on doing this:
local VehicleValues = {
-- Todo: add estimated CD? maybe base it off frontal width/height?
-- Need to support some kind of postfix system?
["Base.StepVan"] = {horsePower = 157, weight = 3175, cargo = 1360},
["Base.ModernCar"] = {horsePower = 101, weight = 1264, cargo = 200}, -- Dodge spirit 1993. 3 speed auto, FWD. 101 hp @ 4,400 rpm
["Base.ModernCar02"] = {horsePower = 140, weight = 1312, cargo = 200}, -- Chevrolet Celebrity, 140 hp (104 kW) at 4800 rpm
["Base.PickUpTruck"] = {horsePower = 171, weight = 2267, cargo = 680}, -- Chevrolet C/K (third generation), 4x4 or RWD
}
code thus far is simple enough:
local originalgetEffectiveCapacity = index.getEffectiveCapacity;
function index:getEffectiveCapacity(chr)
if self:getParent() and instanceof(self:getParent(),"BaseVehicle") then
if string.find(self:getType(),"TruckBed") then
--print (self:getParent():getScript():getFullType());
local vehicleData = VehicleValues[self:getParent():getScript():getFullType()];
if vehicleData ~= nil then
return vehicleData.cargo;
end
end
end
return originalgetEffectiveCapacity(self,chr);
end
If this works its fine too I guess.
(oh, I also override hasRoomFor to account for the new max capacity, of course)
I need to change some shit around so capacity shows the effective capacity in the inventorypane. I'll whip something up for ya
It does?
Overriding both those functions makes trunks work
and show capacity in the inventory pain
justification of 'trunk' overlaping 2000/2000 because.... sigh. dumb code.
right now it shows like 500 on the inventory pane but the effective capacity on the mechanics screen
vehiclepart.getContainerCapacity checks isConditionAffectsCapacity
and does math stuff. organized is in ItemContainer.getEffectiveCapacity
I think I saw something about thissucks lol
but organized has never shown the true capacity, it would just show like 650/500
local function sickOfThis(maxCap, cond, min) lol
I submitted my autosorting code to one of the devs
I wonder if hes going to rename my 'AcceptLifeSucks()' button callback.
yea every time you think you're done with something, there's another function getting called
ha
(Its called when you click the messagebox that tells you your mod list is unsortable)
who sorts their mod list?
Dunno, definately not auto-sort unless you want it to delete most of your mod list if you have 1 single 'loadbefore'
(And then it doesn't even put it in the right place either)
that's how it's supposed to work. that way you don't use it
hahaha.
i have never put any serious thought into load order ever
me either, or not since I had like 300 mods and thought I was cool af
most of the belief in it is misinformation carried over from other games where it's more impactful
It seems to mainly just matter when: Your both doing hard function overrides, and when experiecing the containers your mod spawns are all empty of fluid. shrugs deeply
if you're both doing hard overrides your mods aren't compatible, load order just picks which one is broken
I still have NO CLUE how the propane torch mod (two of them) AND energy drinks are somehow bricking my games oil containers
I just do a late load in max cap and defer to other mods like CC, TrueSmoking or SOTO
Next video subject ? 
btw have you considered an option for (altering?) player carry limit?
tho idk why people run CC with max cap
also back in b41 load order didn't even effect the order in which lua files ran and people were still as superstitious about it back then
absolutely but it's so ingrained in to the javas
max cap doesn't change regular storage thingys, I kinda want dressers and stuff to have hundreds of capacity.
Im sick and tired of a base filled with crates.
statsapi did manage to override player carry limit
honestly I use max cap for the backpack features most of all, since the update to making the big crates so much harder to get Iv not built a single ple.
i don't really remember how that worked though, it's definitely not getting ported to 42
at best i'll fold some of the more useful stuff into starlit
Nah, you just gotta wreck hasroom and effectivecapacity and you can pickup 500kg objects no problem
my mod allowed it before I started adding tests for cars lol
I saw you talk about that and that's somethin I thought about but wasn't really interested in. I'm more of a "realistic" player
was moving 500kg tires in/out of trunks to test stuff (though was in debug mode...)
if I could "drag" heavy stuff, I'm all in
Yea, Im only considering it so I can lift full barrels in/out of trunks from useful barrels
OR A FURNITURE DOLLY!
ferk ya
that'd be so nice
that's easily doable
or just set weight to .01 before you pick it up
yea something.
honestly im ok with it being stupidly heavy and slowing your character down and wrecking his back/etc 😛
but yea.
I was kind of OK with the heavy moodle not being possible to "be gone" in lua
that and picking up stupidly heavy backpacks is a pain in like every stupidly heavy backpack mod
same
it shouldn't be a good thing to try and move giant barrel, but possible.
Then just need to patch pickup so that they can actually be picked up past 50kg -_-;
(furniture 'pickup')
though I guess useful barrels guy could also just add a right click to 'put on dolly' or something.
since that mod is like 95%+ of the reason why you'd want to pickup a single >50kg item
(Put on dolly basically just force picking up the barrel and turning it into an item? or just spawning it in your inventory bypassing capacity checks like harvesting from the farm does?)
... I guess overweight backpacks are the other 5%
though honestly... a dolly for any furniture would be sick... (Furnace/etc)
InventoryContainer.getUnequippedWeight doesn't work for picking up?
(maybe pops it back into deployed mode so you don't need a tile)
I didn't override that one at all when I got my pickup code working
just hasroom and effectivecapacity.
Wouldn't that just be the weight of the entire container? (ie the weight of your backpack?)
local totalWeight = self:getActualWeight() + self:getContentsWeight()
local returnWeight = math.min(1, totalWeight)```
min for the win
Yea I don't get why thats a thing.
so you can drop 5000 stuff on to the floor
Ah.
I thought it worked for pickup too but I wasn't specifically looking for that so I'm probably wrong
Yea, I tried with your mod and couldn't move my 500kg tires around anymore]
(testing tires)
ah thank you for the info.
you'd have to hook in hasRoomFor to stay out of the java func
Yea, thats what I did.
I believe you do already too
you just likely test for player and pass it back to the generic function atm
(or test for no override)
Basically just hooked hasRoomFor and effectivecapacity and I could pickup/place huge items in trunks. (Didn't try ground)
(Was in debug mode, with inf carry weight cheat.. but damnit, inf carry weight should mean INF CARRY WEIGHT!)
@willow tulip it needs more testing but it should be good to go
it prefers modData first, then vehicle script name and last container type
Nice.
PS did you want a (ugly, full function override) for the 'truKJ#%%.32 / 1000' bug?
It will likely become part of bugzapper 9000
absolutely. I was going to look in to that in a bit
sent a DM
What kind of convoluted bullshit is it to use custom anims, Alex broke it down for me lol
Hey everyone
does anyone know what's causing my Steam mod to have such a huge amount of space in the description? There's no space at all in the workshop.txt file.
theres a couple of weird desc issues ive noticed recently, it doesnt have this much space on my end
ive been having this issue lately
I literally didn't skip a single line in my workshop.txt.
thats so odd
At least I'm not the only one. 😅
yeah i think its a steam side thing
also, the bulldog? so freaking cool, cannot wait to see what you cook up next
Thank you very much
But I mean I removed the specific header that was causing it in my description and it didn't move it to the next one, so your mileage may vary lol
id love to make a vehicle using your toolkit for treads one of these days, but that would be far down the line lol
I tried to update the mod by just changing workshop.txt, I tried to update the description correctly through Steam and nothing happened. My suspicion is that the first paragraph is too long, but that's just a guess.
If you only knew how difficult it is to rig that, it's pure torture, there are so many tricks and workarounds, but we can talk about it when you're ready.
yeah ive seen you talk about it and post about it before, im defiantly not ready for allat lol
Zomboid is so realistic it simulates the huge amount of extra complexity in a building the suspension system of a tracked vehicle! /s
Oh man, that is amazing getting anything remotely resembling tracks to work!
I wonder how it interacts with my mods? lol.
Yea it's a fairly complex system and tbf I don't know what it's worth
It's a Steam bug
Okay now asking in the right spot
How hard is to make a pre-made building?
Cause I’ve got an idea for a unique one, but I wanna know how much effort I’ll need to put in first before diving into it
I’ve seen a few screenshots of it and it looks like some of the sandbox modes from like classic starcraft and some other 90s RTS games
Almost the right spot. 😛
Try #mapping , that channel knows more about making maps.
Check the stickies out, that should get you started. If you're on B42 look for notes on how to get tools working with that; it can be done (as evidenced by people making maps) but I think it's a fan-made hack job of the B41 tools.
Unless you want to construct a building with a lua mod, which is... not impossible.
Complexity and what ever this is are two different things. If it is indeed required for the anim to be in two different folders like it's been explained to me, while the game ignores one and uses the other, that's stupid. Why does the game require it to even be there if it's not using it at all, but if its not there, it errors out.
That's a bit of a convoluted mess.
I also don't understand if its a limitation of Kahlua, or something devs chose to do, but why is there even a need for a file structure with LUA when you can simply require a file, or make direct reference via the filepath? Instead, we have to be sure to follow this very strict file structure, which isn't extremely well documented in some(perhaps a lot) of the cases, and hope that we've put it in the correct place. Then to top it off, we have certain circumstances where a file is required to exist, but never actually gets used, otherwise everything breaks. Why two locations for the same anims in a \media\AnimSets\player\actions folder and in \42\media\AnimSets\player\actions, when the ladder doesn't even get read/used and could simply not exist?
I'd understand to a certain extent on things that you'd be trying to overwrite, but not when adding new. Are the methods required simply to force some uniform file structure for modding as a whole, instead of letting modders decide on their own filestructure/pathing? I assure you that if I had the choice, the way file structure is required to be is absolutely not the way I would lay it out, as this isn't a structure path system that makes things easier for me while working. It requires me to memorize where I put something even if it's something I simply want to tweak... Subfolders upon subfolders just to access a singular file, sometimes as simple as a .txt. Outside forced file structure for uniformity sakes, theres only one other plausible reason, and that'd be hardcoded limitations to Kahlua, which I wouldn't imagine is the case considering everything I've found regarding it, states that it maintains typical LUA functionality, as it's a full implementation of LUA and it's Libraries.
Furthermore, I've modded games which have LUA as their primary scripting language, I've modded java games that use a scuffed offbranch of lua created by community members, and none of them have EVER require something so directly specific in the way it needs to be structured. The further I get into modding, even just something as small as what I am trying to add, I realize how absolutely scuffed the requirements for modding PZ are.
As someone that's modded using LUA for the better part of 20 years, I've never dealt with a game that requires so much unnecessary fluff just to get something to work. I can't seem to find any other Java game easily searchable that uses Kahlua as it's modification scripting language, and I wonder if points I've made may be the reason why? Sorry, I'm done with my ramble.
After further looking into Kahlua, I can confirm that the file structure requirements are 100% an implemented limitation by the Devs. There's nothing anywhere within Kahlua documentation that states explicit file structure. There are limitations as far as what is accessible, functions dealing with adding/removing/modifying files onto ones computer in any sense are disabled, which explains why modData is used to save information rather than the typical route of using io.* functions.
As well, most of the garbage collection is handled by Javas garbage collection.
Anyone that doesn't do their due diligence isn't going to realize that Kahlua(not changed much since 2009) is LUA 5.0 instead of current 5.4 Stable release(released in 2020), unless it's explicitly stated somewhere within the wiki's/modding docs. Which further complicates modding, as generally a lot of modders are first time users, and finding the proper information is difficult when you don't know what you're searching for.
TL:DR Kahlua isn't the cause of any of the limitations, it's something decided by the devs, and Kahlua is extremely outdated compared to the easily accessible information provided to new modders using LUA.
There are a lot of dirty tricks, I won't spoil the magic. hehehe. But your mods are very good, these custom dashboards are something I'm keeping an eye on, a shame it's only possible with Java changes.
The dashboards don't need java
for real?
Yes, project summer car is 100% LUA
Realistic Car Physics is the java mod
Technically the dashboards support per-car dashboards atm. Need to make a few tweaks to let mod authors spec what should load by default in their car but yea.
Also the dashboard mod should support custom dashboards with custom features
ie, like a towtruck with tow controls, or siren buttons for a cop car, etc.
@willow tulipcan I ask for a feature on your next update of Project Summre car?
Can you display the engine percent on hover xD
So I aint gotta have a whole other mod
maybe you should uninstall that mod already...
I did.
and?
it is.
Well... tits.
Some of the behavior might depend on 'smart oil indicator' enabled
Alright time to find why then
but all gauges have mouseover info on the icon
Wonder if KI5 did something to it with his vehicles that might be causing it not to show, because everything else does
Doubt? I often test with KI5 vehicles.
Damn, another weekend I'll spend analyzing Zomboid's code.
Also designed to be extendable with additional dashboards easily enough.
I'll see if I can figure out what the deal is then. The only thing I had that altered cars in any way (unless something else completely unrelated to cars does for some dumb reason without stating it) was the mod thats already removed, Project Summer car, and KI5 vehicles
also note vanilla dash uses different mouseover code then new dashes
That's a bug
That's a bug, also idk what you mean with the require
I invite you to read about B41 and B42 mod structure difference
Basically the devs have yet to fix this
Also should be mouseovers on the volt and oil indicator.
and temp
Hello, I'm looking for someone who can help with the development of a mod. There are a lot of bugs and no one to draw the textures. The development is stagnating. Please...
require and doFile essentially are one and the same, but it allows you to set a directed path to a var, and call functions from within that file without having to have them globally accessable something like,
local my_module = require("my_module")
my_module.hello() -- Prints "Hello from my_module!"```essentially, removing the requirement to have hardset file paths and simply referencing the files when needed. Theoretically could be done to remove the need of set files paths and simply `require()` a base game file to access the needed functionality.
I'll take a look at them and see what the diffrences are between the two.
I'm aware of what this is yes
See the Mod structure wiki page
But I still don't see what this has to do with animations ?
yeah i agree that the folder structure is a little irritating, i would probably prefer if each mod just had an init.lua or something that was expected to require the files it wants to run
we have to be sure to follow this very strict file structure
TIS don't use modules whatsoever and only use require for load order so i assume it was just what was convenient for them
How would we even access other mods files ?
It'd also allow you to direct to an anim file/model file and run said animations or set models, instead of requiring them to be within a specific path
But you can already do that, tho it's not the most straightforward thing
instead of requiring them to be within a specific path
Animations ? Animations should be stored in their own files they are not Lua
The answer to your woes about why things are the way they are is the word sandbox
@ this
option a would be exactly the same way we do now, expect file paths to be unique across all mods (except from init.lua presumably, but it would be poor form to put something actually useful in there anyway), option b would be require expecting a mod id
I imagine that's why things are done this way instead of the ideal way, anyway
Replacing other mods files would be impossible then
I'm aware, but typically when using animations you reference said animation, and fire those animations when needed, rather than requiring them to be within a set file structure. The way that zopmboid does it is essentially, if it doesn't exist in the file structure where the animation player system expect it, it doesn't work.
And sometimes it's straight up necessary and mandatory
It's necessary and mandatory because everyone pollutes the global scope instead of using modules (although I suppose w/ local functions that'd be a concern too)
No it wouldn't, you could overwrite other mod files with it.
You mean basically not having states anymore
No you wouldn't lol, since now each Lua files from mods would be in their own environment
You could still access root mods folders and defined paths.
That's if modders are forced to use modules in the first place
It'd simply require a direct reference to the file
I don't see the point of limiting the system so much when the point is teaching modders to use the proper way in the first place
The proper way intended by TiS*
I don't even mind the current system myself, but I would like it if the Lua path worked like it did normally
Not the proper way that 99% of other modable games that use LUA do it
You can probably nuke your PC by doing things the wrong way in other languages, doesn't mean you should do limit people from doing things, just teach people to do it the right way
No, we're not teaching users from using globals
We're actively teaching them to use modules in fact
Some semblance of safety I guess, but java mods exist so 🤷♂️
TIS however has kind of shit Lua code but nothing new with that
in my opinion that's not that big of a deal, modders spend far more time working around file overrides than they do actually using them, if we're going to make changes this big (which, to be clear, will never happen) then i would want file overrides to be done through something more deliberate and intentional than matching file paths
Plenty of games that allow mods to do web requests & yet b42 had to remove it 😔 I remain disappointed (loosely related, topic of sandboxing)
that's all fine and dandy, but completely neglecting a core aspect of the LUA scripting base is not really teaching proper scripting.
Globals are an important aspect and naming conventions exist for a reason
Nitpick: Lua, not LUA
Shh lol
(No one cares other than me, but it's on the about section of the Lua website)
no don't worry, it bugs me too 😅
As I said before, I've modded numerous games across the last two decades that use Lua, from Indie to AAA games, and this is the most random iteration and structure requirement I've ever seen
That's also a point I made earlier
I don't understand what you mean by structure requirement considering there's no limitations pratically ?
Lua files not loading unless they are in a specified path within a media folder? That's a bit of a limitation.
I mean besides file name clashes, which has its uses for overrides, there's really no limitations ?
Forced file structure in any aspect is limiting
Jesus thank god it does that ?????
And just something else not needed for a modder to remember
Imagine the mess modders would leave 😭
Their files are already a fucking mess in the Lua folder, I don't want to imagine that anywhere in media 😭
i have the opposite issue actually, i don't like that lua files are run automatically so long as they're in the right place
If it didn't do that then modders would be used to it; it does do that & modders are used to it
That too
So your suggestion would be to be able to put Lua files basically anywhere ? @sour wave
The point I'm attempting to make is that, this is the only moddable game I've ever seen that forces someone to follow a specific path as far as file/folder structures are concerned.
I mean those other games you have to put your scripts somewhere for the game to detect them anyway ?
At some point, somewhere you have to put something the game can find ?
If we put lua scripts inside a folder with textures, what would that bring to us ?
Only nested at most 2 folders deep, past that you decide where you want your files, how to organize them, and so on
In most situations, I choose to keep files pertaining to one specific thing in one location, and seperate them based on functionality and interraction with other files of different types that pertain to it
The game organized its files around the media folder for the most part, I find that to make sense overall, also you can technically load textures for anywhere in the media folder if I remember right
That's what the game does tho ?
So lets say I add an item, I put lua, xml, txt, textures, and model file inside one folder, organizing them in a way that makes everything easily accessible for me, the modder.
Instead of being limited to a required folder structure like zomboid does.
WoW, War 3, Rimworld, Factorio, anything else as far as minecraft even doesn't have a set structure past a specific singular folder.
Bcs the scripts that modders use handle everything around these files in those other games, but PZ has a majority of things handled in the Java which modders don't have access to, without doing Java modding at least
If things that are defined in zed scripts would be handled in the Lua, I'd see a point to getting access to all of these folders from the Lua, definitely
Bcs then it'd be our job to point to the correct texture file here, model there etc
Even if its handled Java side, there's nothing that can't simply be referenced within where ever a modder wants the file.
It should be.
This is the only game I've ever modded that it isn't.
Here it's mostly a point of how limiting PZ modding is and not how Lua works in itself then
Yes, and that's what I said up there as well, that it's not a limitation of Kahlua
It's a limitation put in place by the devs
And unfortunately, it's a limitation that really urks me as a long time modder.
Doesn't mean I'm not going to deal with it, because I will, but I'm still gonna be annoyed.
And likely complain a little every time something doesn't work when logically I think it should, but then I find out its because of whatever the file structure requirement is.
Modding PZ in a nutshell.
Man, look at this guy, thinks the folder structure is the worst part about modding PZ.
No, its the psychic damage you take from reading the source code.
Yeaaaah ima stay away from source code for a while, if this is the type of headache I get simply from the Lua structure lol
Today it was "Lets measure the string "9999.99 / 9999" to get the max possible length an containers weight could be"... Except then they divide it by 1.5 and subtract 30 leading to overlap whenever a container has over 100 in it.
forced folder structures just unreasonably annoys me.
I have a specific way I like to organize my mod information that makes it easily accessible to me once I hit a large amount of files.
(Yaknow, instead of actually measuring the string of what the actualy weight capacity currently was.. and using that value instead of dividing it by 1.5 because of.. too much whitespace when displaying 10.00 / 10?
Why.... is that not simply something that's done UI side instead of within the actual weight system... what
What kind of shenanigans has TIS done within their source files....
I'm scurred
I'm going to avoid source like someones with the rona virus.
no I was just editing it so it didn't have mouseover marks
as much as i dislike the Item_ prefix i feel like this isn't as confusing as people make it out to be
it just adds Item_ to the start of whatever you give it
But then it isn't used within the actual script .txt files.
So, for someone that has no fucking idea, it is confusing
yes but like, WHY, and why not Icon_ if your gonna add something
well sure but that's not the directory interaction that people complain about, that's the prefix itself which i acknowledged was dumb
Oh the directory interaction is just there to annoy DaemonDeathAngel explicitly, I had always wondered why it existed but now I know.
if Icon = directory/file, resulted in directory/Item_file.png, i would say that's far more unexpected
I'll take that as a W lol
But..... I've never seen another case where that's not actually how its used
Yea, ever other time iv seen it used, they go through the extra effort to split off the directory and not apply it to the folder too lol
has anyone tried relative paths? /../icon -> Item_/../icon to get icon.png would be funny
I hate this ever so much.
No, dun do dat
i'm not saying for sure it works, they guard against relative paths in most places, but it seems like it might and it's pretty funny
Not having access to relative paths also... mildly annoys me
It's an almost unnoticeable annoyance, kinda like a butt zit.
it's mostly a security thing
I get that, and that falls back to how zomboid file structures done. typically, Modable games stop relative paths from altering base game files or external PC files by limiting relative path usage to simply the mods folder.
i actually wrote some malware using an exploit where they forgot to protect against them in a specific method -- reported and fixed now of course
Ah so thats why my game kept asking for 0.2BTC if I wanted the zombie bite cure. /s
hey, i never unleashed it 😅
Reminds me of my printotron idea. Convert all prints into message popup dialogs that you have to click to close. Will cure mod authors of leaving prints in their code real quick.
i think it'll cure your subscribers of using your mods 😅
I dunno, I have at least 10,000 subscribers using summer car who arnt using realistic car physics, meaning all that project summer car is doing for them is giving them new ways to make their car not start.
(ok, so its an incredibly complicated simulation that determins when their car won't start but still... I feel like they are missing out on all the other fun parts, like loss of HP)
i'm just saying that if you did actually do this, they wouldn't blame the mods making the prints, nor would they stop using them if they did, they would blame the mod making it their problem
Oh no, I was thinking of making this just a seperate mod that we'd somehow force mod authors to use. 😛
"This is your mod.. THIS IS YOUR MOD ON PRINTOTRON!!!" mod author strapped to chair watching thousands of popups appear and get in the way while they run from zombies
"that'll teach em to leave prints in for release..."
Basically like the worlds lamest jigsaw movie.
"Would you like to play a game?"
"Sure"
"Ok, but every time your mod prints something... a popup appears on the screen"
"You monster"
because altering core files, people say
Ironically, I don't really use print at all in my codes lol
You sure it's the core files?
Sure you don't just feel bad in general?
a lot of pz modders are allergic to debuggers for some reason
Yes but less bad now that the files are replaced and my car properly revs to the redline before shifting when you floor it.
so everything that could possibly be needing for debugging needs a print statement that for some reason will not be removed later
Well, to be fair, I've written like 2k long lua files before, and last thing I want is to dick with removing every single debug print
so... I only put a print if I need to find where something breaks
And immediately remove it
yeah that's the way i'd expect people to use them
there's an epidemic of 'everything is okay' prints
Especially if using AI to write it
PZ's green check engine light lol.
thats not how check engine lights work damnit!
Funnily enough, I generally throw together a debug window to throw all my prints into
a favourite pattern of new modders, and especially ai, is to check for error conditions and then return
which is just taping over the check engine light
Im considering that for realistic car physics, especially as I give mod authors alternate controls over drag and horsepower/mass for my mod.
that'd be smart
Don't you dis on me taping over check engine lights
if I remove my O2 sensor, its gonna throw it
so fuck dat light
my fav AI pattern is: local x = mcfunctiondoesntexist and mcfunctiondoesntexist() or 10;
And new coder, not knowing coding patterns has no idea what that function does, or why x is always 10 now.
but yes, if (!vitalthing) return; at the top of code is another... Id honestly rather my code crash horribly then leave me wondering where execution got up to.
Yeah, I wanna track down the exact reason lol
it's because they tell the ai 'it's throwing this error, fix it', so it... fixes the error, which is literally what it was told to do
plus, if it errors, you can ask a user for his error log... if its silent, you get the wonderful "Hey your mod doesn't work" bug report.
it just doesn't fix the reason for the error
AI works well for people that already know how to code/script, if you can prompt it on specifics
Otherwise, tis a shitshow
"Write me some code. And make sure no errors occur!"
if you don't know diddly dick about code/script though, you're not going to know what to tell it to fix.
I'll stick to autocomplete for variable names lol.
yeah, i don't use it myself but i know of some modders who do who have genuine skills and they seem to get good usage out of ai
I've used AI in the past to write general code for me, and then I make manual changes to implement a more complex feature, but not to write the entirety of a system
and i've seen plenty of newbie modders who have no skills of their own post their ai nonsense in here 😅
Usually I'll use AI to throw in a bunch of vars into a table or something so I save myself a few keystrokes
It saves me a massive amount of time in my thesis for quick codes on the go, which basically all we need for the most part
Or simple add/remove functions that I just really don't feel like typing out myself
But that's only bcs I already know how to do all of these and know what I want
Exactly.
AI is a good tool for programmers, but a shitty programmer.
There it is. thats the one
ai is shit for every use
nah
ai is ruining the world, its taking water away from peoples homes, its lazy, its making people stupid, its taking away jobs for human being, its taking the life out of art and ai datacenters have already kill someone
We're not going to argue this, you have your opinion I have mine.
If you say so.
I'll respectfully tell you to go fuck yourself.
People who block for something as simple as saying "You have your opinion and I have mine", then insult someone's intelligence and block, are the ones lacking intelligence.
i don't like ai either, but the water thing is a complete myth and i don't want to encourage misinformation when the climate is in the largest crisis it's ever been
Careful, he will block you.
I wasn't going to point out how he's wrong, I intended to let him remain ignorant.
okay so the water thing is literally not a myth
Curious about that too
(also i would never block albion they are nice)
Municipalities force data centers to implement a near lossless system when using local water sources to cool data centers.
Our county is doing the same
https://steamcommunity.com/sharedfiles/filedetails/?id=3609311749
Hey folks, hope it’s okay to share a small project here.
I’m working on a mod called “theySEE YOU | Sprinter Screams”. The idea is to turn sprinters into “living sirens” that use voice lines recorded by the community itself.
My plan is:
- players record themselves as if they were turning into a sprinter (screams, breaths, panic, etc.);
- I clean and balance the audio;
- the clips go into a pool so each sprinter can have its own unique “voice”.
Does this concept make sense to you for PZ?
What kind of cursed mod preview is that lmao
🙈
idk lol
It would be hilarious, to say the least, to get streamers to embody a screaming zombie on the live stream and for us to record it and play it in the mod
HAHAHA
I guess 
Can always go and contact them individually
Exactly, let me make a donation to them and ask for this historic moment. Then I'll cut everything out and put the reactions in a video 😂
Hey all, anyone interested in modding for hire? I have an idea for a mod but no time/energy to get into modding right now......I think it would be relatively simple. Willing to pay a fair price because I just want to play it lol
The PZ Mod community has a tab just for orders.
i became curious about the idea
You can request mod commissions in the modding discord :3
did not know there was a separate discord. thanks!
If it was 'near lossless' they would be using distilled water, not city water.
Source: every other water cooling system on the face of the planet, except trains because they just piss so much coolant everywhere they don't even bother putting antifreeze in them (Because it would mean they would need to fix all the damn leaks), they just run them all night long in the winter.
people can watch something happen in real time and deny its happening
Cuts like 30% off their power bill to cool with evaporative water cooling vs air conditioning systems/heat pumps.
(To say nothing of the cost of all the heat pumps)
So its totally possible to have a closed loop cooling system in a datacenter that uses 0 liters of water, except maybe when you install/remove equipment a few liters leak out. But that would cost 30% more... so you can see why no rich person would ever do that if they could just buy water cheaper (And lobby for laws that allow them to buy water cheaper)
There is however a few data centers built in colder climiates that depend entirely on ambient cooling (basically, they just have giant fans blowing air through the building instead of AC), or heat exchangers to local lakes (see heat pollution) or ocean (See: expensive ass saltwater heat exchanger constantly corroding)
the real cause of water shortages and all climate concerns is lack of environmental regulation, the ceaseless growth of the technology industry, and the refusal to convert to actually efficient methods of power generation
and pretty much all of that comes down to plutocracy
Yea, If we could funnel say... I dunno, a year of the worlds defense spending into fusion we'd likely be paying a penny per KWh and the concept of wasting water to cool something when you could have a heat pump do it instead would be outlandish.
when it comes to water, agriculture and especially livestock are far more egregious and haven't seen nearly the same level of (environmentalist) outrage
(or even just into fission)
yeah but food is more important then ai
i feel like thats common knowledge
At least I can eat (some of) the argricultural output. AI's output just makes me wanna barf.
you cant eat data
while i think ai is garbage, you don't have to eat meat, at least ai does something only ai does
ai does not do something only ai does
infact EVERYTHING generative ai does is done to replace people
also, grown crops and meat are the only two real food sources
Think of all the hentai artists its freed to become productive members of society! /s
lol
Yea I can't exactly switch to eating cars or gpus this week. (Not that I could afford to if I could). Hell, you can't even switch to living off brondo because we'd need sugercane to make the sugar to produce it.
id say you could print out ai generated photos and eat that but, trees are a crop
Also, id say the biggest arguement against AI is: Do we really need more data on this planet? More shitty cat videos? More poorly written stories that are literally just rehashing other books plotlines + RNG generator? More porn with 6 fingers as being the least wrong thing with whats going on?
I already can find literal lifetimes worth of video content about indivual subjects, do we really need more garbage flooding the sea of information?
also the fact alot of it is just plain incorrect information
Like, im watching a 2 hour long video on how to do the timing belt on my particular make and model of car, where every single bolt, nut and washer is gone over in detail.... Why the hell would I need AI trying to compete with that by autogenerating some shitty description out of a badly OCR'ed tech manual?
(and likely obscuring the video of someone doing it right that im trying to find in the process)
i love when people show the whole process in videos
ai is just not necessary or good in any way shape or form
It even has clips where not only do they SAY the torque, but they show the torque in the manual so you know they aint just bullshiting you from memory like SOME people do.
(Kinda important to get that shit right or your 4 hour job is now 8+ hours)
Or worse, a bolt comes out and absolutely wrecks everything.
i could never work on anything that has specific torque rerquirements, i ant spending my money on a fancy ratchet!!
they are $20
oh shit really
Iv spent more money on 'fancy ratchets' then I have torque wrenches actually.
yep.
offbrand ones that work JUST as well as name brand, start at $20~, maybe $60 for the 1/4" because they cost more for some reason, but prob can find one for $40
torque screwdrivers still kinda spenty last I looked at >$60 but generally screws falling out matter a lot less.
(also today I just put a hex bit in my 3/8" drive torque wrench so)
theres an old loadstar behind my house i wanna get running, looking like that would be more possible now.....
(hasnt ran in 20+ years, military owned)
Yea. Main thing about torque wrenches is even a bad one, is going to be way more accurate then 'get it tight'
And it will also help you develop feel for what each size bolts torque should be, so you don't need it 'every time' (though I like to on engines and anything I consider life critical)
"is this bolt failing gonna ruin someone's day?" if so, its your job to do it right.
To be a little more ontopic 😛 its one of the nice things about making mods. No matter how badly you screw up nobody dies or gets stranded in the middle of nowhere.
i have been doing svu support for my mod and wow am i so much worse at doing everything correctly then i thought previously
In real life! In game however...
feel free to DM me if you have mechanic questions about getting that truck running blob.
Shove bug was amazing.
perhaps at somepoint!
i need to go out there and figure out whats wrong exactly eventually
After 20 years? Carb needs cleaning if it has one, take all the sparkplugs out, pour a spoonful of motor oil into each cylinder and see if you can turn it over by hand by using a ratchet on the crank pulley bolt.
Then if that works, $20 sparkplug tester to check for spark, and see if the fuel pump is pumping fuel by seeing if the fuel line you disconnected while cleaning the carb pisses fuel (Make sure to not have any stray sparkplug wires laying around when you do this)
it generally will start or show you the part you need to replace at this point, because the next tool is a $20 compression tester that will tell you if its something else minor, or something very expensive.
if i remember right its a diesel so im not too sure what goes on in it lol
i know very little about diesels
Ah, yea, I don't have much experience with those, and the parts are much more expensive.
at 20 years you'll have to drop the fuel tank, drain it and refill it too.
my plan is to one day FULLY restore it, but it will be alot of work
and hope it can puke out whatevers in there.
oh yea absaloutly
the entire time my grandpa has owned it its hasny ran, but i know more has d=gone wrong since then
i found this photo of half the enginebay
hood had sat half open like that for at least 5 years :D
... sigh, I don't get why people do that.
there are at least 5 trucks on my grandpas propertys with open hoods
close them -_- all that water has ruined the rocker cover and all the fuel lines. And prob the injectors because you won't get the fuel lines off anymore..
So long as he has cats to keep the rats at bay...
but anything that old, it has far less wiring then metal to worry about.
Sun ruins all the rubber hoses and wiring insulation too.
Iv gotten all kinds of stuff from 1970~1990 running... but those had been kept outta the rain and such. in 3 years of my brothers newish lawnmower being left outside in the rain it looked worse then my 1985 roper.
yeah its not in great shape lol
the other trucks are either fully stuck or torn to bits
surprisingly, ive not seen any sign of mice on the loadstar
Likely all the DDT in the everything.
mouse bites 1980's milspec wiring: dies of 3 kinds of heavy metal poisoning.
Need to get one of those california cancer labels and just slap it on the truck hood.
alot of the wiring the military did doesnt look great sadly
its a crane truck, so it needed extra switches and stuff in the cab
they are a mess
But yea, mice like tight spaces that cats/predators can't get into... 1980's era engines with no modern accessories don't exactly fit that description.
all the hydraulics in the crane need re-packed, and the hoses replaced, and the control module needs replaced, and the bed needs re-built and uh alot more
frame is good tho
there used to be big cats and bears living around there lol
and the cab is only a little caved in
If your in canada, Princess auto sells hydraulic hoses, fittings, cylinders, controls, etc and will cut the hose, clean it and put fittings on for free (IIRC)
im in the US
my grandpa does own a hydraulics shop though
ahh nice.
he does, alot of stuff
yea, its not too expensive, its just the crimper is $$$$$ 🙂
mining company, sod farm, and a hydraulic shop
nice.
Wouldn't worry too much about it.
combat in general near stairs is soooo cursed anyway
Then it's on the municipality that allowed the data center to be built without considering the possible negative effects it may have. the Data center that's attempting to be built here is constantly being stopped until they make the necessary changes to have little to no impact on the systems of the surrounding cities. To the extent that the cities are requiring the company to upgrade their systems(the cities) and maintain them to support the needs. The current projected expectations are 1.1m gallons per hour input, and the purification and return system puts 1.05 million gallons back, that's near 96% return amount.
But I'm done with this conversation entirely now, as I don't care to be called an idiot again by someone that I don't really care about.
the stairs I actually manage to fix it
its the cases only when you are near a ledge that the casing will stay laying on the air
its what im trying to fix today
Nice
Nice edits after saying your done with the conversation. PS people stopped caring about that conversation 6 hours ago.
Moving on... as we had already done hours ago.
stairs are all the rage now. And escalators.
Escalators temporarily stairs. Sorry for the convenience.
Well, those edits were necessary. Also, some of us were asleep 6 hours ago.
This explains it very in-depth, taking all the common arguments into account and uses factual and well-sourced information
https://andymasley.substack.com/p/the-ai-water-issue-is-fake
Oh, I was still catching up on the convo since last night lol, didn't know there was drama and people were trying to just put the conversation to rest, my bad 😅
Immedrthere are two issues with this article
1 it’s downplaying just how much 200 million gallons (or even just the 50 million it says is used directly) actually is, since a lot of the data centers are being built in small towns that IS a lot
- Water and electricity usage on a local level IS a problem and it’s a problem that’s getting worse and worse, people ARE losing water access in their homes, there HAVE been small power outages because of these centers
Also there are zero sources or references for this whole article which kinda makes it void imo
Also there DO release two types of pollution directly
Heat pollution
And noise pollution
Hi everyone, I'm encountering a weird visual glitch with the rust texture on my vehicle mod. Instead of a proper overlay, it looks like a repeating pattern. I'm using the vehicle_multiuv shader. Does anyone know if this is a UV mapping issue or a script error? I've also attached a reference image of how it is supposed to look.
I'd urge you to read the whole thing, it puts it into perspective, and there are plenty of sources and references used in the article.
The gist of it is that comparatively to other industries, it really is a non-issue (*non-issue was the wrong choice of words, I should have said not impactful enough to make a difference when put into perspective of our climate crisis as a whole and the industries that have caused it), except for some very specific edge-cases like the meta data center that was built and caused some pollution, but that was due to an issue with the construction process itself, not something that came from the AI usage. For example it uses 3% of the water that US golf industry uses, 3% of the water that the US steel industry uses.
It's also literally less than a drop in the bucket when compared to agriculture, and in many of the counties where the data centers operate, there are massive waterparks, but no one is upset about the water usage by those.
It looks like you only have one UV map on your model maybe?
That’s what it’s looked like for me when I have that issue
There's another article that goes more in-depth about the local level water usage
https://andymasley.substack.com/p/i-cant-find-any-instances-of-data
I do not have the time to read then entire thing because it’s 10000 words but I didn’t see and references lost at the bottom of the page (which is good practice to include) and I didn’t see any in the parts I skimmed
You can recognize how much water other places use while also acknowledging that another thing is bad
It’s like saying “homophobia is bad but racism is worse so homophobia doesn’t matter” (yes I know that’s a straw man I just could not figure out an example that was better)
Comparing agriculture to AI is shitty people have gotta stop doing that
You're drawing a false comparison though, and if you're not willing to read then there's no point in us discussing it at all.
It would be more like saying "The methane released from my fart is bad, but ExxonMobil's fossil fuel usage is worse, so my fart doesn't matter".
In the grand scheme of industries that affect the environment, AI usage is a much smaller factor by an insane magnitude than it's been made out to seem.
Immediately in the first bolded sentence this article is using a poor way to see if ai is effecting water usage, you should look for water outages near data centers and not more expensive water
He also then immediately recognizes that it is rising electricity costs
The claim that nobody has lost water at and time from data centers is so wrong it’s laughable
I suspect that’s because this arrival is many months old so it doesn’t have current data to support it
People focus more on sí usage because it’s less necessary, causes other harm and is taking jobs from people
It's okay dude, we don't have to talk about it if you're just gonna read the first paragraph of what I send rather than the whole article.
There are valid arguments against AI, but the environmental impact from the water usage is not one of them from what I can tell.
I will happily change my thoughts on that if presented with more accurate information
Siiick! Looking good man!
If the information presented in the opening paragraphs is wrong I see no point in reading all of it tbh
And that's your right, but it's not "wrong", the claim is that water prices have not increased, which they haven't according to the data presented in the article. You're saying that water price is not accurate to gauge the local impact that data centers have on the available water.
That is something that is covered in the article as well, and more so in the first article I sent, with the reason for water prices not increasing being that AI doesn't use as much water as has been claimed in other articles by bigger news outlets.
If you have credible articles that refute these I'd be more than happy to read them, I want to be fully informed
Thanks a lot for the assistance!! It's working now.
Hey, guys. I'm just wondering: is there any mod, that speeds up all actions in multiplayer? We want to play with friends, but I remember how much time did I spent even playing with in-game time changer, so it would be great to have such a thing.
I saw this news the other day: "When Google installed its first data center in Chile, north of the capital, the Quilicura wetland, the second largest in the country, was a diverse ecosystem. Ten years later, it is threatened, at risk of disappearing."
In case you want to read it with the translator: https://www.3cat.cat/3catinfo/els-centres-de-dades-i-la-ia-ja-son-una-amenaca-per-al-canvi-climatic/noticia/3379963/
I will read it, and I won't dispute that being the case as I can see that being very likely, but the argument is that AI use specifically is causing massive environmental problems from water usage, not data centers operating in general (*which considering AI was not around to the extent it is now 10 years ago, is likely not what that specific data center is mainly used for). Data centers, like many other industries, absolutely have environmental impacts and they should be regulated.
The issue I personally have with the "AI uses so much water that we're all gonna die" is that it's blown out of proportion and has become a major focus point when discussing environmental politics, which results in other more impactful industries being downplayed.
If you can read this (not you specifically Carles, just making a general point), whether you use AI or not, you're contributing to the environmental damage from data centers.
Yes, the news talks about data centers, which are used for AI and other things I suppose. Then it also mentions another thing that is worrying and that is the energy consumption of AI.
Yeah the broader issue is with data centers and our reliance on them in general. Is AI helping with these issues? No and I'm not arguing that, but their impact is not as great as made out to seem, at least not from what I know based on the things I've read, so making that the focal point (rather than a point, as it rightly should be) of environmental discussions is just not great and distracts from other much more harmful industries.
The bigger story is that they're setting up these locations in places with less regulation and costs - so I can also see the dumping of chemicals and exploitative work being carried out
It certainly isn't a better location than any other - outside of the centers specially built into mountains in cold regions
Companies move in, destroy the local ecosystem and economy, pay people less and less, and then move away when it's no longer convinent - happened with fruit, lumber, rubber, oil, you name it
We’re all just drops in the bucket. If you could somehow convince every single person in this discord and every one you are a part of to stop using AI entirely forever it wouldn’t make a lick of difference.
If you really want change to happen, I would start looking outside of the mod_development channel of the PZ discord
Yeah definitely true, it's unfortunately a turd being thrown on a pile of shit the size of mt everest. We should stop the pile from growing, but it will require more than just removing AI.
I would argue that the bigger detriment of AI is the harm it does to the art community, how easy it is to use for propaganda and disinformation campaigns, and how it seems to be harming the educational systems we have (although these have needed a reform for a long time anyways).
Our education system (at least within the US) has been shit for a loooong time. the 70s/80s and maybe even into the 90s, the US education system was on par with some of the best in the world, but post 9/11 it's went drastically down hill.
in my view, the environmental angle on ai is similar to previous pushes of environmental panic: it serves to shift the narrative from the corporations that produce the vast majority of waste and pollution and lack of environmental regulations to prevent this, onto specific scapegoats so that the real issue can conveniently be ignored for another few years
You can consider it small minded, but I've always looked at issues like this; if the long term affects are too long term to the extent that I will never live to meet any of those it does affect, I have minimal care.
If the pollution and affects on the environment aren't going to have drastic impacts for the next 100+ years, I'll be dead and gone, my kids will be dead and gone, and likely most, if not all of my potential grandkids will be dead and gone.
I've hit a point that previous generations have done so much irrepairable damage to the planet that I really have little care for humanities sustainable future past my children, grandchildren, and myself.
It's amazing that humanity as we know it has survived this long.
Exactly how I see it as well, nicely put
okay so I'm confused on something here. How do I find out what variables there are for the player and their paremeters?
Like... for animations... I know that outside of lua I can do something like changing SpeedScale of defaultWalk.
But inside lua... how do i set that? where and what would it be exactly within getPlayer()?
I'm trying to look at other's code to find the answer my inexperience with lua and project zomboid modding hit a wall
if you mean only animation variables specifically, these aren't really documented anywhere, you'll just have to go through the animations and see
if you mean lua variables, you can use the javadocs https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/Lua/LuaManager.GlobalObject.html
oh, wait, i reread, i see what you're asking specifically
to set an animation variable you'd use something like getPlayer():setVariable("SpeedScale", 1.1)
i have to warn though, i'm pretty sure this is a weird case where the java sets player speed every tick so it might undo any changes you make here
On top of what Albion said, a lot of vanilla animations don't use variables for the speedscale either, they're constants so you can't change them with Lua at all. You're best off setting up a custom xml that copies the vanilla one exactly (with a different name so you don't override the vanilla file), add the <m_ConditionPriority>10 </m_ConditionPriority> to it, and then change the speedscale to a variable so you can change it with your code.
Just note that the speedscale specifically only reads the variable's value when starting an animation, so if you change it while it's looping it won't apply until you break the loop by interrupting the animation and then start it again.
@bronze yoke thanks for the info
Okay but thats the part I was trying to ask
So i make my own animset/copy and over-write the original
But I'd still need to use lua to dynamically change that specific xml copy and i dont know how to connect it.
How does it know which speedscale though?
That would be by doing what Albion said.
So in your XML you'd change the speedscale to something like:
<m_SpeedScale>CustomWalkSpeed</m_SpeedScale>
And in your code you call getPlayer():setVariable("CustomWalkSpeed", 1.1) now any XML that has the speedscale set to a variable named CustomWalkSpeed will be set to 1.1
Oooooooooooooo
yeah sorry i was assuming you were trying to change the value of a variable *called* SpeedScale, not the variable that is in m_SpeedScale
Ooooooooooo... set the variable name un the xml... i forgot that was an option
Yes thank you. Ill give that a try.
Though, hmm...
Long term that wont work for me.
My goal is to ramp up all animation speeds
Maybe too much 🤔
Yeah that would take quite a bit of work since you'd have to copy and change all the files. Not impossible, but tedious as fuck.
You could write a python script to do it though
you'd probably also have to dedicate to updating this mod every time the game does
Yeah there's that as well
That's why i was hoping to find a way to
Get the all current animations
in a dynamic way but that might not be an option, i got no clue
Efficiency Skill mod offers a different way of achieving a similar result so ive been trying to figure that one out.
That one changes TimeActions instead.
By all current animations do you mean all animation files or all possible anim nodes ?
I was thinking "whichever the current animation the player is in"
You can most likely do that but I'm not too sure, I think you should look in the animation debug tools available in the debug mode
@thin swan might know too ?
Yeah but still a bit weird. All of em with bob in the name lol.
Im slowly learning.
The end goal : all animation/timed actions progressively getting faster.
Until the engine breaks.
i wanna see this with the minigun just spraying casings everywhere hahaha
I will increase the cyclingrate of a gun and post the video hahahaha
If you just need to see which animation is playing for your own purposes and not actually use the animation names programmatically, then yeah what SimKDT said, just pressing F6 in debug and it'll show you, or right clicking the square you're on and then selecting [DEBUG] > Animation Text to open a window that you can place wherever you want.
If you need to actually find which animation is playing and then use that in your code, you can do getPlayer():getAnimationDebug() which returns the same strings as [DEBUG] > Animation Text so you just parse it to find the string between Anim: and Weight
For example you should be able to find a string like Anim: Bob_Idle Weight: 1.0 in the result from getAnimationDebug()
All animations have to be prefixed with a value set in the model script's animationsMesh block in order to work, so for the player that's indeed Bob_
Oh, thanks for the info again
No problemo!
I'm honestly confused on why you would be trying to change the speed scale of animations instead of speeding up the timed actions like the efficiency mod you were talking about
Does changing the animation speed make the timed action end sooner?
No my idea also includes walk-run-sprint and other movements. And it'll also including speeding up the metabolism stats too.
Also i dont even knownif efficiency mod still works in latest b42 version, i have to pooe and see
Hey, guys. Can you tell me how to change, for example, requirements for the existing recipes? Like I want change that carving the Bat would need just level 5 of carving, not 9th. And how to make it like a mod, not just change .txt file in the game directory
So you should be able to override specific existing recipe parameters by simply defining a new craftRecipe with only the parameter you want to change from my understanding
For you hahaha
the sound doesnt play right cuz im using vnailla sounds and they are not design to go that fast lol
Hahahah nice. The urge to recreate the minigun scene from terminator 2 is rising
I've also thought so
So, for example, I need to create my own recipes_carving.txt, and instead of having
craftRecipe CarveShortBat { time = 300, SkillRequired = Carving:7, .... }
I just need create the same CarveShortBat, but only with one line with me wanted number?
No you don't create the same
You just have your recipe with the entries you want to change
So in your case, just SkillRequired
Welp...
Okay
I just don't understand where should I change that and how to share that with my friends when MP for 42 will come out
Define a new script file
There's a way to extract all clothes/beards from the game? Not sure how
Extract the models you mean ?
K, thnks, think, I will figure it out)
Yes. I tried to figured out bc im doing statics NPCs to interact with em
You can use mannequins for that
They usually act great as NPCs
Tho I guess they might not be able to have beards ? Idk
Eitherway you can import in Blender the beard models
Thanks, i will check this
Just playing around a bit editing some mods from workshop
Btw thanks, I've figured out)
All what is left - just check for the every recipe in the game...
Don’t ask to ask. Just ask.
huh?
Guess someone typed something then deleted it since I had a ping but no message with a tag. Alright, carry on
this is so awesome
opinions on this little cage i added to my firetruck for my svu support?
Amigos
something is driving me insane
I am trying to get the self.character:getEmitter():playSound(self.gun:getShellFallSound())
which is what plays the shell sould but regardless when I fire it always sound
i was looking at the
ISReloadWeaponAction.onShoot = function(player, weapon)
if weapon:getShellFallSound() then
player:getEmitter():playSound(weapon:getShellFallSound()) -- letting the sound play at the casing falling
end
over at this condition
but nada
now I get double sound cuz it plays when my casing is hitting the ground
Check and see if maybe the vanilla shell sound plays from the animation xml, a lot of sounds do that
Smart
From the firing I will assume
I gonna take a look
Hey guys
When I'm trying to upload a mod through PZ I get the message that I don't have preview.png. I have one and I can't figure out how to handle it. My folders are Workshop\MyModTitle\Contents\mods\MyModTitle\(and there all my files, including mod.info, preview.png and etc)
preview.png should be in Workshop/MyModTitle
Hello! It's because the preview.png has to be in the same folder as Contents, so in your first MyModTitle folder
Ohh, thanks)
didnt find it 🙁
Ah dang... I looked around a bit and the only reference I can find for it is the same as you found in the ISReloadWeaponAction
Or well there is one in the rack action as well, but it seems to just be related to that, not when shooting
Yeah. I think it's in Java side 🙁
Are you trying to disable the vanilla shell sound and then have your own sound playing when firing?
I was going to use the vanilla sound
Rather than disable it
I want the mod to be exclusive lua. I know I can param de script but oh well
I need help making my first mod, i have zero knowledge of lua, i need it to be explain it to me like a child, You have to be patient with me, i also suffer with learning difficulties, it will take me longer for me to understand what your saying.. thanks
I suggest you go read the wiki page, you can easily test some stuff out
What kind of mod are you looking to create? The advice given will differ depending on what you're trying to do, and you might have too big of a scope for a first mod which we can let you know if that's the case.
My first advice would be to read this wiki page: https://pzwiki.net/wiki/Getting_started_with_modding
Then this one: https://pzwiki.net/wiki/Lua_(language)
I'm afraid that it can't really be fully explained to you like if you were a child, because it takes an exceptionally gifted child to make a Lua mod with no prior knowledge.
If you need to learn Lua in a more slow-paced environment with a more pedagogical approach, then maybe looking for a guide series on youtube, or hiring a tutor would work better
Agreed
Bcs overall here no one will take the time to teach you things like you're a child
A tutor would do it
And I've yet to make a video guide on the Lua language itself
I have only made a video explaining the Lua API of PZ
game devs didn't think about people wanting to do a survival out in the woods, but there is no Zs around to get rags / ripped sheets. So that's the mod i would love to make, so.. 10 Twin to craft rags / ripped sheets, or 5 Thread or 1 yarn to make it instead, now there is mod that allows you to get Twin from cut grass, but that's as far as it goes.
Just clicked on those links, read both and still don't understand, i just have to hope someone will be willing to make that mod, i'll guess i have to wait. lol
Oh that wouldn't even require Lua, you just need to make some new craftRecipes, take a look here at how they are made:
https://pzwiki.net/wiki/CraftRecipe
yea i still don't know what i'm looking at lol
the only thing that i did, and even then it was by pure luck just by reading the mod in notepad++ that was already made.. and i could see what i needed to change to my liking... by changing a modders recipe, level off when... to unlock the skill, but when it comes to making it from scratch and i have zero clue what any of it means, my head hurts.
I can't read and understand lua, and i can't read and understand recipe format putting together, if its already done for me.. and i'm looking at the finished product in notepad++ that i can understand.. but not completely 100% tho but i can see what i need to change for my liking, but even then.. i'm in and out of the game testing, i've spent 9 hours just finding the right things to change in the lua file..lol, some people are built to for this, i wasn't.. and didn't help me having learning difficulties and going to a special school, and if had of passed my GCSEs they would of been level 1, just enough getting a job stacking shelves... but i didn't pass that, because we moved house moved school, and my mom didn't have the school send them down to my new one.
holy fuck shit
ive been trying to understand item mapping by looking at other mods and other basic recipes
thank you so much
didnt even know this existed
i'm glad you got it lol
i dont fully but this will definitely help
im in the process of building a patch for multiple recipes on sapphs cooking
and ill upload it when i feel its complete (i have permission)
got 3 recipes down
?
doubt until i get more comfortable with the code on zomboid
getting there but im still trying to learn it
but ive already fixed 3 recipes on sapphs mod
i sent it to your dms lol
game devs didn't think about people wanting to do a survival out in the woods, but there is no Zs around to get rags / ripped sheets. So that's the mod i would love to make, so.. 10 Twin to craft rags / ripped sheets, or 5 Thread or 1 yarn to make it instead, now there is mod that allows you to get Twin from cut grass, but that's as far as it goes
huh
read
a mod to make rags / ripped sheets.
10 Twin to craft rags / ripped sheets, or 5 Thread or 1 yarn
i mean from what i can tell it should be possible
getting it to work is another story
yea
no worries
if you get time awesome
but yea game devs didn't think about people wanting to do a survival out in the woods, but there is no Zs around to get rags
nah they dont for sure
so with that mod you can make rags and with the mod that allows you to cut grass and turn into to twin
bang you can make rags
anyway i'll check you later
Anyone familiar with UV maps on 3d world items? 
i might be all good i found a weaving mod yea.. so i can make full sheets yea!!
Should I learn lua or javascript if I would want to get into pz modding?
you can't make mods in javascript, so definitely lua 😅
Thank you slime 🙏
slime ?
Slime is crazy haha
fun fact: if you setCondition on a bag, the condition bar will show up all by itself. I had no idea
Interesting