#mod_development
1 messages · Page 352 of 1
this would make it extreme pain to try and tow a big ass van with your puny car (realistic), but visa versa would be like.. not even nowing the car.
Weird.
It definitely caused people to overload their own vehicle seat lol
sssh don't tell them it was me
I've seen people on reddit actually talking about putting more shit in their car than possible, in theory, because they didn't know how to open the car door... now it all makes sense
But I'm not sure how that blocks NOT being inside the seat
Nah, other people have done it without mods
turns out you can place a super heavy container on a seat your IN, if the weight is fluids
Oh so it's really that broken lol
though you CAN just use V to open the door and access the inventory to empty it
The V menu needs to be in the tutorial lol
Its broken without whatever you did, yea
"For when everything else we taught you fails. try holding V instead"
Especially now that smash window and vehicle mechanics isn't right click anymore
oh man
Servo anti-slam doors
car mechanic in me is like 'sexy...' also 'man that is gonna be an expensive door to close after a few 1000 cycles'
I feel like a very strong electro magnet would be better
Im pretty sure i could do it better with a simple fluid dampener but thats just me.
And by 'simple' I mean 'something that resembles a modern cartridge fork'
(basically the same kinda stuff they use on automatic closing doors everywhere I guess)
Hey all, would there be any reason that a function I've got catching the "LoadGridSquare" event, would not be finding all the zeds?
This is B41 btw
I'm basically trying to grab the zeds as they load in and move (teleport) them, I'm getting the movingObjects list as the gridSquare loads and testing to see if that object is a zombie, but it is 100% not catching them all
Am I missing something?
not all zombies are spawned when the square loads
ah, thats annoying. Thanks. am I best catching them in onZombieUpdate?
I'd suggest doing OnZombieUpdate, then mark the zombie as teleported by using setVariable
it would usually be ideal to use the zombie list to update only a few zombies per tick but that's not as simple to implement
Is the zombie list only spawned zeds? and does it have a server and client context?
appreciate the responses btw 🙂
Filled a yard with every "lore friendly" (and the addons to them) KI5 vehicle and timed actions stopped working in the area lol. I need to find a new yard to test climbable vehicles, I guess. Does anyone know why this happens?
discussed in another chat
Wow! Thats so awesome!!
Not to be that guy but you are missing the motorcycles
Though actually idk if they are in b42 yet
That's a single operation
It's fine for the most part
Greetings, I'm desperately trying to use the joypad/joystick for a mod without success.
There's a "capture" function that I can use for the joypad buttons, but I can't control joysticks.
something like :
open : ISTimedActionQueue.add(ZomboShooterPlayAction:new(playerObj, arcadeObj, joypadData))
timeaction : function ZomboShooterPlayAction:new(player, arcadeObj, joypadData) .... o.joypadData = joypadData
start/perform : local ui = ZomboShooterUI:new(x, y, w, h, player, self.joypadData)
ui : if self.joypad then self._savedJoypadPlayer = self.joypad.player, self.joypad.player = nil, self.joypad.focus = self, self.joypad.activeWhilePaused = true
if updateJoypadFocus then updateJoypadFocus(self.joypad) end
end
ı'ɯ ʇoʇɐllʎ ʍɹonɓ ¿
Did you just want to capture joystick input?
In my car mod, I do it via:
int int0 = this.vehicleObject.getJoypad();
if (int0 != -1) {
flaot Y = JoypadManager.instance.getMovementAxisY(int0)
}
(Java, mind you)
Im assuming your joypadData or something contains the players joypad index
(int0)
are you naming variables things like int0? 😅
No I just haven't renamed all the decompiled variables -_-
Only added analog joystick/trigger throttle to that section of code.
(throttle and braking.. independant throttle and braking, so you can do both at once! for uh, reasons. )
From inside my ISPanelJoypad UI (full-screen, alwaysOnTop, not modal), I want to read joystick left-stick movement (continuous analog axes)
Using Fire onJoypadDown for A/B/Y correctly and keep the player frozen in world behind the panel (already works)
I'm struggling and this part isn't clear to me... if you can help me out, I'll put you in Credits ;D
<@&671452400221159444>
Yea, you'll want getMovementAxisY and getMovementAxisX
I believe they are exposed in LUA
I dunno how you'll keep the player from moving but yea.
(I think theres some kinda function call for that that some timed actions use)
<@&671452400221159444>
local jid = -1
--find id joypad
if self.joypad and (self.joypad.id or self.joypad.controller) then
jid = self.joypad.id or self.joypad.controller
elseif self.player and self.player:getPlayerNum() ~= nil and JoypadState and JoypadState.players then
local jp = JoypadState.players[self.player:getPlayerNum() + 1]
if jp then
jid = jp.id or jp.controller or -1
end
end
and :
if jid ~= -1 and JoypadManager and JoypadManager.instance then
local jm = JoypadManager.instance
local mx = jm:getMovementAxisX(jid) or 0
local my = jm:getMovementAxisY(jid) or 0
Since I'm pretty bad at modding, this might be a stupid way to do it...
kindly use
3 backticks followed by "lua"
<your code>
3 more backticks
print("Hello world")
A: I don't see where you define jm or anything, and you really don't need to test of joypadmanager and joypadmanager.instance exist... if they don't exist you have.. bigger problems, especially because your not even using JoypadManager.instance but jm
Like if your gonna test for stuff you should at least test for the variables your using.
if jid ~= -1 and jm then
local mx = jm:getMovementAxisX(jid) or 0
local my = jm:getMovementAxisY(jid) or 0
my check was half-paranoid and half-lazy, the real issue for me is that getMovementAxisX/Y always returns 0 from Lua, but I’ll clean up the guards meanwhile.
if jid ~= -1 then
local jm = JoypadManager.instance
local mx = jm:getMovementAxisX(jid) or 0
local my = jm:getMovementAxisY(jid) or 0
end
the or 0s here don't serve a purpose, those methods would never return something other than a number
i personally don't recommend writing 'defensively' like this, as it'll usually just hide the problem when something is actually wrong
Yea iv seen a lot, especially in AI code that goes local X = somefunction and somefunction() or 10; and then the person wonders why it always is equal to 10 (because somefunction doesn't even exist)
I admit using AI, but I'm trying to understand it... Right now, the joystick is up my ass.
Does anyone have any experience in converting an action animation into a simple emote? Specifically climbing a wall, which requires a hoppable tagged wall... but I don't have a wall, I have a car lol
The whole animation is in 4 distinctly seperate parts and I don't know where to start
@thin swan might know better than me
I can maybe help yeah, depends a bit on what you're trying to achieve.
If you just want to trigger the wall climbing animation then you just need to make a copy of the AnimSets\player\climbwall\start.xml, change the name of it so you don't override the vanilla, put it in a different folder like player\idle, player\movement and player\run if you want it to be possible to trigger either while standing still or while walking/running. Then remove the existing conditions, add <conditionPriority>10</conditionPriority> and add a new condition like
<m_Conditions x_name="a688c4a5-d995-4985-8dee-70317f28a974">
<m_Name>ClimbCar</m_Name>
<m_Type>BOOL</m_Type>
<m_Value>true</m_Value>
</m_Conditions>
Which you then trigger however you want using Lua by calling player:setVariable("ClimbCar", true)
If you want it to go through all parts of the wall climb animation then you have to copy the other files from the climbwall animset folder as well and repeat the process, but also making sure you trigger them in succession using the events like this in the start xml
<m_Events>
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbCarStarted=true</m_ParameterValue>
</m_Events>
And then in your success/fail xml you check for that variable like
<m_Conditions x_name="996f7b3f-abf1-49f2-bbb3-0f82053d519d">
<m_Name>ClimbCarStarted</m_Name>
<m_Type>BOOL</m_Type>
<m_Value>true</m_Value>
</m_Conditions>
And also reset the climbcarstarted by setting the parameterValue to false in the success/fail xml
@thin swan I didn't expect it to work first try, but I don't know where to go from here. Are you sure I just need to set the variable to true to trigger it? I don't think anything actually happens, but that could be because I set up the xmls wrong
<?xml version="1.0" encoding="utf-8"?>
<animNode>
<m_Name>startVehicle</m_Name>
<m_AnimName>Bob_ClimbFence_Start</m_AnimName>
<m_Looped>false</m_Looped>
<m_BlendTime>0.20</m_BlendTime>
<m_SpeedScale>1.20</m_SpeedScale>
<conditionPriority>10</conditionPriority>
<m_Conditions x_name="a688c4a5-d995-4985-8dee-70317f28a974">
<m_Name>ClimbVehicle</m_Name>
<m_Type>BOOL</m_Type>
<m_Value>true</m_Value>
</m_Conditions>
<m_Events x_name="048109ab-93c3-4ccb-989d-c7e9604895d5">
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicleStarted=true</m_ParameterValue>
</m_Events>
</animNode>
<?xml version="1.0" encoding="utf-8"?>
<animNode>
<m_Name>struggleVehicle</m_Name>
<m_AnimName>Bob_ClimbFence_Loop</m_AnimName>
<m_deferredBoneAxis>Y</m_deferredBoneAxis>
<m_Looped>false</m_Looped>
<m_SpeedScale>1.20</m_SpeedScale>
<m_BlendTime>0.20</m_BlendTime>
<m_Conditions x_name="996f7b3f-abf1-49f2-bbb3-0f82053d519d">
<m_Name>ClimbVehicleStarted</m_Name>
<m_Type>BOOL</m_Type>
<m_Value>true</m_Value>
</m_Conditions>
<m_Events x_name="ef162fb6-0de1-423b-9098-6f154c3f0af3">
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicleStarted=false</m_ParameterValue>
</m_Events>
<m_Events x_name="e4f2aa13-8985-42d9-aa13-3f96f4845efb">
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicleStruggle=true</m_ParameterValue>
</m_Events>
</animNode>
<?xml version="1.0" encoding="utf-8"?>
<animNode>
<m_Name>successVehicle</m_Name>
<m_AnimName>Bob_ClimbFence_Success</m_AnimName>
<m_Looped>false</m_Looped>
<m_BlendTime>0.20</m_BlendTime>
<m_SpeedScale>1.20</m_SpeedScale>
<m_Conditions x_name="845cf142-8e74-4b50-b2b1-002345c8175d">
<m_Name>ClimbVehicleStruggle</m_Name>
<m_Type>BOOL</m_Type>
<m_Value>true</m_Value>
</m_Conditions>
<m_Events x_name="368e0fe2-0508-4296-b0c1-3f6fa2ddddda">
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicleStruggle=false</m_ParameterValue>
</m_Events>
<m_Events x_name="3eecbe0e-7e70-4a27-aad8-8baf38db11fa">
<m_EventName>PlayerVoiceSound</m_EventName>
<m_Time>Start</m_Time>
<m_ParameterValue>JumpHigh</m_ParameterValue>
</m_Events>
</animNode>
90% chance I did the xmls wrong, thank you for the help with this.
@shy mantlejust solved a long running issue after many day of testing. i had all the fluid containers from summer car, and a few other mods always spawning empty. after many many days testing me and blackmoons have narrowed this down to the mod "energy drinks" after i found this line on the fourms.
When a mod errors during the distribution phase, PZ stops executing the rest of the spawn table. Anything after that point—including fluid container filling—can end up skipped and default to an empty state.
how do i reset loot without resetting anything else in b42?
Wdym ?
Respawn loot but keep old loot in the container ?
as in purge all the known locations on the map OTHER then my base to force reset all those locations.
since they still have the bugged loot ive now fixed.
So reset parts of the map ?
yes!
I believe in B41 there was a way via an external tool, but idk if that works for B42, nor am I sure where to find that tool (you can probably find it with a simple internet search)
You need to also trigger the ClimbVehicle using Lua, so for example doing this will make that variable be set to true if you press G:
local function onKeyPressed(key)
local player = getSpecificPlayer(0)
if key == Keyboard.KEY_G then
player:setVariable("ClimbVehicle", true)
end
end
Events.OnKeyPressed.Add(onKeyPressed)
Also I gave you the wrong conditionpriority, I accidentally copied the one from actiongroups and was in a rush when typing the message so I didn't catch it, you need to replace <conditionPriority>10</conditionPriority> with <m_ConditionPriority>10</m_ConditionPriority>
For there to be different outcomes, like fail vs success you'll need to use Lua to decide which outcome should happen and set the related variable
@thin swan I forgot to include I already have that other keypressed lua stuff done, I've finished everything except for the animation part. I've also decided to just use start ---> struggle ---> success.
After changing the condition priority, I'm still finding that nothing happens. I can confirm that the LUA part of the code that would trigger it does in fact work.
Where did you place your custom XML files? You'll need to make sure they're in the folder for each possible state you want them to trigger in. So for example if you only want it to trigger when you're standing still, then you put the file in AnimSets\player\idle\yourfile.xml if you want it to work while walking and running as well, then copy the file and put in AnimSets\player\movement and AnimSets\player\run.
I forgot to mention that if you're playing on B42 then there's a bug causing the custom xml files to not be read unless you also copy them to ...\media\AnimSets\player, they need to be named the same as the files you have in ...\42\media\AnimSets\player but the files can be empty.
It basically just tries to verify the files are in ...\media\AnimSets... but the actual files that are read are the ones in ...\42\media\AnimSets...
Yeah I'm on B42 so that could be it
@thin swan Still having the same issue. I'll post 2 screenshots on how it looks if that helps.
I did empty them in AnimSets\player
hello! its my first time creating a mod for project zomboid, can someone help me with that?
What about the ...\ModName\media\AnimSets\player\idle? Does it have those same xml files present? Both your screenshots show the ...\ModName\42\media\...
Are the images cropped? They show both.
I see 42\media\AnimSets\player\idle in the first screenshot and 42\media\AnimSets\player in the second
They both start with 42, that's the problem, you need one media folder like this
oh ffs
Haha yeah it's a very silly and annoying bug
@thin swan The never ending train of issues keeps pushing lol (the files in just player are the empty ones)
mmmm specific folder structuring, my favorite!
they also have to be in player\idle not just player, basically nothing should ever be loose files in the player they gotta be in folders corresponding to teh state they should trigger in
gah
alright
hopefully this is the last thing
PROGRESS
but now I'm forever idling (not stuck if I move) in the start animation lol
and it's looping
Anyone know how I can find the connecting tile of the same object that I'm clicking on? I need to set it's condition to the same amount.
You can stop the loop by adding <m_Looped>false</m_Looped>
You should also add
<m_Events>
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicle=false</m_ParameterValue>
</m_Events>
So that it flips the start animation off at the end of it
I thought so
Pinned messages
@thin swan Character does this little awkward push down animation for a second when pressing wasd lol. Not sure what's causing this at all actually. Also, :P still can't get it to play the struggle and success bits
Ah that's likely because the idle animation still controls the bottom half of the rig, should be solved by adding this to your custom XMLs:
<m_SubStateBoneWeights>
<boneName>Bip01</boneName>
<weight>1.00</weight>
<includeDescendants>true</includeDescendants>
</m_SubStateBoneWeights>
That basically tells the animation engine that all bones should be animated.
For the struggle and success, show me all three of your xml files so I can see what might be off
Still has the same issue, and here's the xmls again:
<?xml version="1.0" encoding="utf-8"?>
<animNode>
<m_Name>startVehicle</m_Name>
<m_AnimName>Bob_ClimbFence_Start</m_AnimName>
<m_Looped>false</m_Looped>
<m_BlendTime>0.20</m_BlendTime>
<m_SpeedScale>1.20</m_SpeedScale>
<m_ConditionPriority>10</m_ConditionPriority>
<m_Conditions x_name="a688c4a5-d995-4985-8dee-70317f28a974">
<m_Name>ClimbVehicle</m_Name>
<m_Type>BOOL</m_Type>
<m_Value>true</m_Value>
</m_Conditions>
<m_Events x_name="048109ab-93c3-4ccb-989d-c7e9604895d5">
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicleStarted=true</m_ParameterValue>
</m_Events>
<m_Events>
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicle=false</m_ParameterValue>
</m_Events>
<m_SubStateBoneWeights>
<boneName>Bip01</boneName>
<weight>1.00</weight>
<includeDescendants>true</includeDescendants>
</m_SubStateBoneWeights>
</animNode>
<?xml version="1.0" encoding="utf-8"?>
<animNode>
<m_Name>struggleVehicle</m_Name>
<m_AnimName>Bob_ClimbFence_Loop</m_AnimName>
<m_deferredBoneAxis>Y</m_deferredBoneAxis>
<m_Looped>false</m_Looped>
<m_SpeedScale>1.20</m_SpeedScale>
<m_BlendTime>0.20</m_BlendTime>
<m_Conditions x_name="996f7b3f-abf1-49f2-bbb3-0f82053d519d">
<m_Name>ClimbVehicleStarted</m_Name>
<m_Type>BOOL</m_Type>
<m_Value>true</m_Value>
</m_Conditions>
<m_Events>
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicleStarted=false</m_ParameterValue>
</m_Events>
<m_Events x_name="e4f2aa13-8985-42d9-aa13-3f96f4845efb">
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicleStruggled=true</m_ParameterValue>
</m_Events>
<m_SubStateBoneWeights>
<boneName>Bip01</boneName>
<weight>1.00</weight>
<includeDescendants>true</includeDescendants>
</m_SubStateBoneWeights>
</animNode>
<?xml version="1.0" encoding="utf-8"?>
<animNode>
<m_Name>successVehicle</m_Name>
<m_AnimName>Bob_ClimbFence_Success</m_AnimName>
<m_Looped>false</m_Looped>
<m_BlendTime>0.20</m_BlendTime>
<m_SpeedScale>1.20</m_SpeedScale>
<m_Conditions x_name="845cf142-8e74-4b50-b2b1-002345c8175d">
<m_Name>ClimbVehicleStruggled</m_Name>
<m_Type>BOOL</m_Type>
<m_Value>true</m_Value>
</m_Conditions>
<m_Events>
<m_EventName>SetVariable</m_EventName>
<m_Time>End</m_Time>
<m_ParameterValue>ClimbVehicleStruggled=false</m_ParameterValue>
</m_Events>
<m_Events x_name="3eecbe0e-7e70-4a27-aad8-8baf38db11fa">
<m_EventName>PlayerVoiceSound</m_EventName>
<m_Time>Start</m_Time>
<m_ParameterValue>JumpHigh</m_ParameterValue>
</m_Events>
<m_SubStateBoneWeights>
<boneName>Bip01</boneName>
<weight>1.00</weight>
<includeDescendants>true</includeDescendants>
</m_SubStateBoneWeights>
</animNode>
Thanks for the help with all this, I would not be able to figure this out on my own
Try adding <m_ConditionPriority>10</m_ConditionPriority> to the struggleVehicle and successVehicle as well
It's technically not necessary in all cases, but I still add it to every single one of my custom xmls, just to be sure that I can eliminate that as a cause for issues
This was finally it actually, it stopped the previous issue and played the remaining animations. The only thing I ask now is... can I cut the animation short? Or maybe speed it up to basically instant at a specific time?
I don't need the player falling, but it's attached to the end of the success animation
Awesome! Yeah you can use
<m_Events>
<m_EventName>SetVariable</m_EventName>
<m_TimePc>0.5</m_Time>
<m_ParameterValue>ClimbVehicleStruggled=false</m_ParameterValue>
</m_Events>
Adding the Pc to the m_Time makes it so you can specify a float value where it should trigger, 0 being at the start of the animation, and 1 being the end of the animation. So setting it to false at 0.5 cuts it off in the middle.
You might also need to add <m_EarlyTransitionOut>true</m_EarlyTransitionOut> (I don't really know which values are used by default, so I always just specify what I want)
Yep, this looks great, and for the like fourth time, thanks for all the help with this. The hand-holding was needed!
Happy to help! Glad it worked out 😄👍 There's definitely a look of info regarding animations. I've been meaning to write an in-depth guide for months, just been too swamped with stuff, but one day soon I will do it
Yeah, there's not too much information about this anywhere.
Also, I assumed you can't just set a custom Y levels with this, but I'm asking now just in case.
Unfortunately not, all the movement is handled in the translation data, so you'd have to make a custom animation and import.
Not sure if you meant Y or Z, but Z is the "up" direction, like the ground is Z=0, the second floor in a house is on Z+1, so if you want the player to be above ground level you'd basically have to teleport them using Lua to Z+1 right after the animation ends
oh I for sure meant Z
I have it working fine now, I just wish I could offset the physical character body while keeping the camera in a different position, which is probably just not possible
It looks near perfect on vehicles like the step van though lol
Technically you can, with the translation data you can make the character move in any way you want, even though the camera remains on ground level, but you'd have to make custom animations and animate the translation data that way, and the zombies would still consider you to be on the ground even if it looks like you're on the top of a car, and if you walk off you'd be hovering in the air unless you add code to detect when you walk off and transition to another animation
Oh that part is completely figured out with just LUA alone because... 2d environment trickery lol
Just the climbing up part is tricky since I just wanted to reuse the existing climbing animation.
Getting into making an animation would probably be way too much for me
Like here for example, I just make the player be animated in a way so they look like they're above ground, but technically they're still on the ground
pre-animation climbable vehicles https://www.youtube.com/watch?v=aQzd2hmDEkM
A Project Zomboid Mod on the Steam Workshop for B42 only.
More Car Features + Spawn Zones Expansion
https://steamcommunity.com/sharedfiles/filedetails/?id=3520758551
9/9/2025 Update Date
it really is just this last thing to tackle
Oh sick! The animation will definitely be a nice addition!
If I get some extra time some day I can make the animation for you, just not sure when that would be so don't hold your breath 😅
Oh hell yeah what? I don't care how long it takes at all! Years for all I care! That would be a lot of help!
I've spend a couple hundred hours alone on just specifying the size of the vehicle roof and making it easier for myself to add more down the road. I've done so many and I feel like I'm gonna get burnt out soon, but there are so many modded cars to go lol
No problem man! Making animations is my favorite part of modding, implementing them is the annoying part 😂
I might have some extra time towards the end of the month to do it, I'll let you know!
Yeah I bet that took a sweet minute, but I can see a lot of people wanting that mod, myself included
It's technically already out, it's just combined into another mod with a list of new misc vehicle features. Currently, it's just a timed action (not an instant teleport like it used to be in that video) and now I have a good enough animation to leave it alone for a while. I think it would gain a big boost in popularity if I made a post about it with your animations, so definitely looking forward to it.
Also, I'm definitely adding you to contributors lol
Er... however I do that
Haha appreciate it, but no worries, just a small note at the bottom of the description or something is good enough 😄 I think if you make me a contributor I'd gain more access than I should have, like being able to change description and stuff, so no need for that
Oh
I wish steam made a simpler contributor list
But yeah, I'll definitely mention you because you've been a big help and if you actually make an animation for it that's crazy
trying to make a fur-trim hood accessory for coats.
so far it appears in the list but selecting it reverts it back to 'None' and there are no changes on the character
Does the clothing item work normally when you try to equip it in-world?
nope does nothing right click also just looks like this with.. nothing in it
Your game isn't erroring either?
Caused by: java.lang.NullPointerException: Cannot read field "coveredParts" because "<local3>" is null
zombie.characterTextures.BloodClothingType.getCoveredParts(BloodClothingType.java:96)
zombie.characterTextures.BloodClothingType.getCoveredParts(BloodClothingType.java:88)
zombie.inventory.types.Clothing.getCoveredParts(Clothing.java:1256)
Let me see your item script for fur trim
Did you follow a guide like https://steamcommunity.com/sharedfiles/filedetails/?id=3444877391 or https://steamcommunity.com/sharedfiles/filedetails/?id=3025955520 ? May also be helpful to you
the error sounds like it doesn't like your BloodLocation but i don't really see why not
Yeah...
nahh i don't think its bodylocation or else it wouldn't show up in this menu
body location: equipment slot, determines what items are allowed to be worn together, does nothing else
blood location: literally everything else
it's a really annoying name because blood is the least important thing it does 😅
Get rid of hat category? It isn't in the vanilla scarf xml so maybe?
In your xml, just remove the entire m_HatCategory line and try again
That fixed it

Dankeschön. it be the most random stuff fr 💀
VW thing progress
havent figured out how to only get one model to show up at a time
He super nice! Burn for it but don't burn up!
and about climbing on cars, I don't have a stutter b.. b.. b.. but balance? 😅
Eventually the zombines gotta overwhelm the car huh? push it around ..
Somebody else raised this already I guess. If that is so then sorry for not reading better.
This is also the same game where you can park a car alongside another and be invincible. You can still get trapped up there if you're unprepared for a horde building up around you.
oh, and fall damage
Hehe yes yes. Just some feedback and wish for addition. Zs should also be able to break into a car from the non-driver side etc. etc. ;).
Hope theres a mod where in solo mode
When you make a new caracter
You get to team up with your previous character from where you left it.
So a NPC mod that allows your previous character to still exist ?
That's not a thing to my knowledge
But that'd be a cool thing to implement
Tho that would for sure be unfair, with your character dying by itself without you controlling it
Its not just another npc
Its for roleplay like meeting a new comrade that you made🤣
there is a menu a lot of people miss that lets you play as multiple characters in one save, but obviously they don't turn into an npc when you're not playing as them
It's a NPC
A character that plays without human interaction is a NPC
Equip them with the best gear to sruvive
Do YOU survive when you have the "best gear to survive" ?
I think you missed the whole point of Project Zomboid ?
Yeah but with roleplay
And good gear
My npc follower did
I didnt made him
But i did gave him a fostech orign 12 with 3x eotech magnify and a shotgun suppresure
Wth full on vanduard military gear
I get to meet it again after a ingame week🤣
He went from rosewood to louiseville
Guy went from npc to main character
I have a feeling thats where things are headed, ala State of Decay
although I could easily see it being you only play 1 character and the NPCs are 'tamable' / can be befriended not directly controled
There's pros/cons to either
I just feel empty everytme i make a new char on the same solo map my previous character vanishes
Would be nice to see it surviving on its own while im not in control🤣
Hello, I've been trying to solve this for two weeks, but I can't. I humbly ask for your help. (My native language is not English, please excuse my spelling.)
It's a plush toy; the "normal" size is 0.3 and the large one is 0.6. When I go to place them, they look the size I want, but when I put the model on the floor, they both look the same. How can I fix this?
item axolotl_peluche_amarillo
{
Weight = 0.2,
Type = Normal,
DisplayName = Peluche Axolotl Amarillo,
Icon = axolotl_peluche_amarillo,
WorldStaticModel = axolotl_peluche_amarillo,
}
item axolotl_peluche_amarillo_grande
{
Weight = 0.4,
Type = Normal,
DisplayName = Peluche Axolotl Amarillo Grande,
Icon = axolotl_peluche_amarillo,
WorldStaticModel = axolotl_peluche_amarillo_grande,
}
model axolotl_peluche_amarillo
{
mesh = axolotl_peluche,
texture = axolotl_peluche_amarillo,
scale = 0.3,
}
model axolotl_peluche_amarillo_grande
{
mesh = axolotl_peluche,
texture = axolotl_peluche_amarillo,
scale = 0.6,
}
Nevermind, I solve the problem adding a copy of the 3d model whit another name
Wow weird, so for some reason in some instances it links to the model name and the first scale it was imported as I guess?
Unverified hypothesis: by opposition to lua, models are not reloaded without restarting the game.
They are, if the amount of mods used in that save isn't high or the load of the game isn't high. If you had model working, but then replacet said fbx file with new one you will hotswap it as game runs as long as said model doesn't get any error (like you export clothing, but let's say you forgot transaltion data, now it will cause error). Placed Models aren't refreshed, the preview of placement will be "New" but once you actually place it, the old one most likely will appear.
Decompiling the game code
This guide goes in detail on how to decompile the Project Zomboid game code to more easy navigate the game files and systems, and more easily understand how the game works in depth. This is a process often necessary when Lua modding to better understand what classes and functions do.
Relevant Wiki pages:
https://pzwiki.net/wiki/Decompiling_game...
Use your eyeballs
The rest will come to you
🙏
Don’t hold your breath
You assume he has eyes 👎
I do at the end of the video in a way lol
what do i have to do here again?
media moves into common.
mod info moves into 42.0
need to remember that. since most guides dont use the new structure and the game wont load the old one
And common needs to be undercase or linux throws a fit
'media' can be in 'common' or '42' if you want it 42 specific.
(Not that 41 can load from common, but 43 will? *shrugs)
I’ve made the Inventory Reinvented mod fully compatible with Build 42.12.3.
I’d really appreciate it if you could test it!
https://steamcommunity.com/sharedfiles/filedetails/?id=3592326489
My advice for fellow modders: instead of directly overriding vanilla files, try to extend them using a monkey patch. It’s safer and keeps your mod more compatible with updates.
im part way through patching out the excessive pointless logspam from tsar and rv life as i believe that should solve the crafting lag.
ive finished patching the rvlife log spam. and that cut ~60% of the crafting lag instantly. and about 1.1 million lines from the log per hour.
I don't get why mod authors leave logspam in -_-
And yes, Excessively long logs have been known to cause lag when further writing to the log
I saw a mod today that only prints if debug mode is enabled
Iv known some games that had downright massive lag issues until you set their log file to read only 😛
Seems so simple but yeah I always just delete mine
The logger then silently fails to open it, the error is sent back to the logger, that can't log anything, and the game continues as if nothing ever happened because wut is error handling?
Check the Mod structure page
You still shouldn't do that
The statement I made on the wiki about prints a while ago still stands: no one needs your prints but yourself. It bloats the console and anytime a modder needs to patch your mod it bloats their console
I am legit traumatized by making an addon for a mod that prints literally everything constantly
Yep, Comment them all out for release, especially if there anything that occurs automatically and not on user-action
I had to go in their mod and delete every print statements bcs of it
You can uncomment them later, or tell users to if you ever need debug info back from an end user
True. Maybe a sandbox option you can enable if debug is on that will enable prints, if you don’t want to comment/uncomment them I guess
Straight up delete them, they are useless even later if you probably mod stuff in
Still, don't do that
Iv seen that before. checkbox or dropdown for 'debug info'
Yea iv never had a bug rare enough that users couldn't give accruate repo instructions instead.
Prints are for yourself bcs no one gives a shit that you print X Y Z info. Users don't care, modders don't care, YOU only care
And generally when you have too many prints, you end up scrolling stuff outta the log
i personally loveeee when they hook to on ui update so it spams many many many times a second /s and lags crafting to hell
If you print errors, yes sure, but nothing else
so all you'll get is a log from the end user with 15 minutes AFTER the error occured.
My mod is very customizable, like players can customize how fast the THC levels in their blood drops. Having an option like that could help them fine tune it exactly how they want.
So I don’t know if I agree with prints being 100% useless to users 100% of the time
Yea iv vaugely considered adding a mode where every 1 second, important car info of the vehicle your driving is logged for car makers to know wtf is actually going on with my car physics
But a UI window would prob be better.
(though way more work to add)
But that's terrible design for the user end
True, you could just not use prints but still follow the sandbox and debug logic. Like true smoking has their debug stuff attached to their moodle
If you expect users to read prints: you are doing it wrong
That's just bad game design and the console should not be used for that
I don’t. I expect people to use the mod as it is.
I still have the option to customize pretty much every value in the mod
You could use the Say() command and have some kinda frequency setting.
The mod that I mentioned before was printing the increase in radioactivity of the player: literally no one gives a shit
"Woah man, im so stoned right now" = 100% THC
"Got a small case of the munchies" = 25% THC, etc.
you already do something similar in the debug builds. so it may be an idea to add a mod option toggle to enable displaying the additional info? for devs?
This
Are custom sandbox options able to take advantage of the advanced tick box that shows you the exact value and lets you set it?
Or only have them say() when it crosses threshhold (with a % chance sandbox setting to not say anything, because it gets annoying when mods say() too often)
need to narrow this down
LOG : General f:382, t:1762971944668> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944681> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944686> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944695> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944710> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944719> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944725> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944734> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944745> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944754> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944767> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944778> IsoChunk.Save: BufferOverflowException, growing ByteBuffer
LOG : General f:382, t:1762971944793> IsoChunk.Save: BufferOverflowException, growing ByteBuffer```
no 🙃
.... please tell me TIS doesn't just do that on the regular.
Ofc not
But yea.. likely something has created infinite spam in isochunk or something -_-
TSAR is soooo bad. im about tocomment out the entire function lol
Iv mentioned it to a few devs before...
this is after removing several 1000 "part not found" calls too.
its driving me mad
@bright fog I can't recall one having any reasonable awnser why they left so many prints in -_-;
btw you can disable print from showing up in logs
Too many debugs to comment out maybe lol
even during development you should not permanently have 'everything is okay' prints
nor should you be using onuiupdate to call the check.
Yea those you only put in to make sure stuff is executing, then its generally best to remove so its not flooding your console and obsuring all the 'everything is bad' prints.
since that runs every tick
with notepad++ that takes 1-2 seconds to comment out all xD
replace all "print(" "--print("
or you can just
function print(...) end
(Don't actually do that lol)
Oh god, I wonder how many peoples games would actually be improved by that.
like this?
Yea
Small chance it might screw stuff up if they for example have SomeImportantprint( as a function but yea
(also might miss print ( but most people don't add a space there)
don't forget print "lol" 🙃
Nobody does that, that is cursed. you take that back.
I wonder how cursed it would be to just add a (defaulty disabled?) option in bugzapper 9000 that just overwrites print with a dead function.
Ok but we already knew TIS where aliens so my point stands.
also wtf at one word prints.
I just hate looking through my log and seeing random "stop" "perform" "instant" as lines.. like.. .perform WHAT?!? who ever was gleeming useful information from this and why didn't they remember to remove it later?
And so you search up 'perform' and find 9542 results in the codebase. cool.
probably just for very short term debugging
don't act like you've never done print("here") to work out what's actually executing
Hell no, Im not gonna search for 'here' in the logs
Im'a search for BEEFCAKE Did the thing
Because I damn well know im only getting 1 or 2 results for beefcake in the console log!
is it a bad idea to strip the workshop ids? do those errors even impact performance?
I keep seeing workshop ID errors but I have no idea why lol.
at some point I was like "I should look into whats causing those!"
And then after seeing them... over and over and over... and seemingly getting longer and longer... I stopped caring at some point
oh so its an error for every mod iv subscribed to?
some of them literally used "mods" as the workshop id 
every one with an invalid id yes
neat.
I care even less about that error now. lol.
Shouldn't cause any problems/slowdowns really. its just the constant per-frame logspam you really wanna stop
no, that error happens to all mods always
it has nothing to do with anything the mod does, it is a problem with the game
you can't even choose your workshop id, that's not how it works
for some reason, the way the game determines a mod's workshop id is to look at the name of the folder two folders up from the mod.info
but in build 42, mod.info is in common/a version folder, so it should actually be looking three folders up
so it always lands on the mods directory and gives that error
hopefully that gets fixed in time
from what i've gathered it's been intentionally not fixed because of modder concerns with the new workshop id mod ids
i don't know why they haven't muted the error though
facepalm so they have just... missed the error spam in their logs all this time? (or do they just truely not play with mods...)
probably both
but... bu.... sighs
it's pretty clear that the mod manager was made before they actually changed the mod structure
there is no public build of build 42 where the workshop id thing has worked, but we did see screenshots of it working before release
... yea.. i still need to release my new mod autosort.
Do I expect people to use loadBefore now that my mod supports it? Nope.
But at least it sorts itself to the top of the load order without using loadBefore and bugging itself when you don't use bugzapper on the main menu.
Hm, I could prob also just change the workshopID to make that behavior (generally) vanilla.
(due to the number of hard overrides that bugzapper does, Iv found it works best if other mods load after and get to do their work patching its methods)
yay crafting lag is GONE
Sooo.. your saying I should add an option to nuke all prints to bugzapper 9000?
yes
K
local ogPrint = print
function printForReals(...)
return originalPrint(...)
end
print = function() end```
I can't tell you how many times I've uploaded and forgot to remove some goofy print or forget to set my debug flag to false. It's embarrassing really
That was basically the plan, except using modoptions to determin if its overridden or not
(or sandbox options? dunno. Bugzappers options are all in the sandbox settings so..)
I'm not fixing my og/original typo. idc
add a 100ms lag to the new print so it's really obnoxious
Mod that changes all prints to dialog boxes.
with random spawn location
that would be phenomenal really
I wouldn't forget to remove those prints, that's for sure
I feel like there's a PZ update coming really soon. I feel it in mah bones
"Have you ever wished prints where even more obnoxious?"
"No?"
"ignores reply Well then, we have the mod for you!"
player:Say()
Hi I have small problem with modding
local list = getOnlinePlayers()
for i = 0, list:size() - 1 do
local p = list:get(i)
local hrs = p:getHoursSurvived() or 0.0 -- problem
local zombieKills = p:getZombieKills() or 0
local survivorKills = p:getSurvivorKills() or 0
[...]
It works fine when only one player is in server
But when someone joins getHoursSurvived() stops counting and returns value that was when second player joined
getZombieKills() and getSurvivorKills() works fine, returns actual kill count
@fathom kestrel If your phxntom1213 from steam, if you could just DM me the translation files instead that'd be great 🙂
Which side do you run this ?
try 0.0 to 0.01 or 0
That literally won't do anything
0.0 == 0
And 0.01 instead will just be a different default value
if anything don't use or statements like this in the first place, it's impossible for any of these methods to not return a number
That too
Server
But I want to make it clear
Other get...() Works perfectly
Only this one pauses and returns not updated value
Try checking client side if the client also returns a different value ?
Or if it properly updates
I mean I need this on server side not client so even if client side is correct it will not help me
you may have to send the correct value from the client
What albion said, you can simply manually retrieve the information from clients
I highly advise in fact that you get used to that bcs a lot of the time this is how you should handle it, and it's likely you will have to do it that way anyway
You can check this guide on Networking:
https://pzwiki.net/wiki/Networking
If you need to implement manual client-server data transmission
Oh okay that's a weird hacky way to do this but if it works
I will check it tomorrow, thanks!
If it were text I'd just fix it myself, but the diagram image that shows the flow between client and server has sendClientCommand where it should have sendServerCommand
@willow tulip are you planning to add fixing recipes for the parts in summer car?
where can i find the values for hotbar/belt/holster slot weight reduction? i looked through txt and lua files but couldnt find anything
thats not somethin you can change, item:getEquippedWeight() is all you have
declaration: package: zombie.inventory, class: InventoryItem
public float getEquippedWeight() {
return (this.getActualWeight() + this.getContentsWeight()) * 0.3F;
}
public float getUnequippedWeight() {
return this.getActualWeight() + this.getContentsWeight();
}
🧐 the pro has spoken 👍
Turn on the repair system in sandbox options
that car trailer and zomboid are trying to break me 😵💫
load unload works like it should, just when you reload the game, it decides to use the max capacity of the trunk item and not whats declared in the script, so ki5 container goes 1000 -> 25 🤪
Report it to whoever made your script?
Hey guys! I made some vehicle mods for the game in the past and more and more people are asking me to make it compatible with vehicle armor mods. I already thought about making it compatible with the standardized vehicle upgrades mod but I don't really know how to go about it. Does any of you have any experience with it?
Indeed you're right, I'll fix that thank you for pointing it out
now that i look closer at it, the entire thing is kinda fucked 😅
https://steamcommunity.com/sharedfiles/filedetails/?id=3304582757, there was a small read me there if iam not wrong, i started out with that.
You can take a look at that
remember that the functions and events are named after the sender, not the recipient -- the diagram shows most things the wrong way around
If you have suggestions don't hesitate haha, was a concept I had put out together for the page
Wdym they are named after the sender ?
Thank you!
Pretty sure I had made the correct order and checked some code examples of networking that I had made
Sec
Hmm yea indeed, it's all mixed up
Idk what I smoked when I made that shit lol
Fixed
Idk how I made it this wrong considering I made it at the same time I wrote that whole page and I got it write in the sections of Commands
it's one of the easiest things to trip up on
Definitely haha
I mark “server -> client” or “client -> server” in code comments related to commands because it's so easy to mix them up
Oh thank god, the first one made me think I had a stroke.
All the java comments disappear before we get to see them 🙁
? I was referring to comments in Lua
ah, yea.
Yeah so it seems that this stupid workaround worked xDD
I tested it with 2 players and works fine, hope it will not break with more players xD
ty for help 👍🏻
Hello! Does anyone know if including a .bat file breaks any TOS's for the PZ workshop?
not as far as i can tell
some mods include exes, you're fine
as long as it's not malware it's not against tos, and there isn't really anything that checks what you upload
oh that's good to know, executables seemed like they could've been problematic so was covering my bases. 
steam workshop is basically just a file host, they don't check anything, it's on users to not run dodgy stuff (or developers to not make their game run dodgy stuff from the workshop automatically 😅)
I'm actually surprised it's been operating on an honor code this whole time lol. I've never had any issues with files downloaded on workshop, though I guess I've heard stories.
I just made a bat file copy over a music bank file so my users no longer need to manually install the mod themselves. I don't think PZ devs are going to be exposing those files to us anytime soon traditionally.
I assume Steam runs a virus/malware scan, but it's not going to detect if you write a bitcoinminer in lua or something
Games should all be using the "run with less access" (low-integrity permissions) and storing their data in %appdata%\LocalLow so if they are compromised they can't do much... but most seem to ignore that.
My goal is to build a fortress-like building with the intention of overwriting a small portion of forest on the primary B41 map, editing only a few/one chunk(s) and I had a few questions if anyone didn't mind enlightening me.
1: I was mildly concerned at the date shared on the WorldEd/TileZed applications of Sep 08, 2022. Is this the appropriate, most recent build, and does it still function properly?
2: Upon running the PZWorldEd executable, the software prompts configuration. Should I be pointing this at the base game folders or is this something I should be reading more on?
check the pins in #mapping
Thank you.
I guess I missed that you had to download the "Tiles" folder
seems simple enough with the options that it gives you...
need to poke your brain for a second. how do i limit a container to a set item type? eg if i want to add a space to a trunk that only holds gas canisters, how do i do this? i encountered a mod that did that (added a space that only fits a single flashlight in the container) but it did some weird anmial food container stuff.
Item containers defined in scripts can have a function to verify conditions to be able to put an item in the container
I don't remember the exact name but check out the item scripts wiki page and the parameter names
AcceptItemFunction
There are some examples in media/lua/server/Items/AcceptItemFunction.lua
yeah thats what im looking for!
Hi guys! First of all, thanks for all the useful information. I have to say that, with the lack of documentation for modding, it's a miracle you manage to produce anything that works... But I digress, here is my doubt: I'm trying to draw in the map some data I am storing, but I can't find any event related to the player opening the map. Am I looking in the wrong place?
Hey anyone got experience altering/tweaking Player Speed?
Is there a variable or something I can directly change to increase it, or do I have to mess with animation, or what?
Basically I'm poking and prodding at the game and want to incrementally increase player Walk, Run, and Combat Stance speeds.
TchernoLib gives an interface for movement control (walk run).
@mellow frigate thanks for the heads up, but i was hoping to find a way doing it myself directly. Ive been disecting and prodding at WorkingRunModifier.
But I'll give a poke at TchernoLib if i cant produce the results I want.
Maybe have to anyways.
Making a mod that didnt require other mods*
The absolute simplest way to do it is to make a new set of xml files that are exact copies of the xml files from all the different movement folders and then change the SpeedScale values and use <m_ConditionPriority> to make sure that your files run instead of the vanilla ones.
So for example if you want to make the regular walk faster, you would take the file AnimSets\player\movement\defaultWalk.xml and make a copy of it and place in a folder with the same name in your mod, and then just change the name to have a prefix like AnimSets\player\movement\VonBon_defaultWalk.xml
Then in that file you have this <m_SpeedScale>1.04</m_SpeedScale> which is what controls the movement speed (along with the <m_Scalar>/<m_Scalar2> but leave those as is so you don't mess up the stuff that slows you down when injured/frozen/overheated etc).
So to make it faster you would just bump up the SpeedScale, to make it slower just lower it.
Just note that this will not just speed up the movement speed, but also the animation itself (movement speed is determined by a bone in the armature called translation_data, so it's exported with the animation), so at high values it looks a bit wonky.
If you want to adjust the movement speed without changing the animation speed you have to basically recreate the animation in blender and then just make the translation_data bone travel faster in the same amount of frames compared to the vanilla animation
Yes it's not linked to an event directly
@sour island has experience drawing on maps
oh!! @thin swan thank you a ton. So it is all under AnimSets then? I 100% missed that part. I'll go ahead and try giving it a shot.
Yeah all the animations are in the AnimSets folder, and if you copy a file exactly as is, add a prefix (if you don't it will fully overwrite the vanilla file which can cause conflicts with other mods), and put <m_ConditionPriority>10</m_ConditionPriority> in your file it will play instead of the vanilla one in the same conditions.
Just note you have to do it for the sneak, run, sprint, etc. if you want all of them to have different movement speeds than vanilla
going to try it immediately
@thin swan where should I put ConditionPriority, anywhere within AnimNode or outside above/below it?
Anywhere within AnimNode will work, I usually put it as the last thing before the conditions/2dblends etc, but it can be literally anywhere as long as it's inside AnimNode
hhmm didn't work, maybe I did something wrong
ah. i typed in movements instead of movement
i'mma have to try the over-write method as it's not working
alright thanks a ton, got it working now.
now to figure out how to call for the in-game time system.
There wouldn't happen to be a convenient method for knowing when an hour pass in-game? Don't know if that's in the LUA api or not.
I forgot to mention that in b42 there's a bug that requires you to basically make a copy of the AnimSets folder and put in the root of you mod folder.
So for example if you have \MyMod\42\media\AnimSets you have to copy that with all the files and put it in \MyMod\media\AnimSets as well. It basically checks the root media folder to see if the files exist, but then actually reads the files from the 42\media folder, it's super silly
There is yeah, https://pzwiki.net/wiki/EveryHours triggers every in-game hour
yeah what I ended up doing was copying the entire movement folder but also the run.xml and walk.xml.
Now the plan is to check every in-game hour and incrementally increase player speeds.
Btw, you can pass a variable as the SpeedScale and change it in lua if you want to increase/decrease the movement speed based on input/events/anything else
ah thank you a ton ❤️
that is perfect
you would do <m_SpeedScale>MyVariable</m_SpeedScale> and then in Lua you call player:setVariable("MyVariable", value)
but yeah the goal is : every hour the speed of the player increases. with the end goal of "until the game breaks"
Sounds fun!
so it'll automatically know it's refering to global?
Do note that changing the speedscale variable while the animation runs won't make it update, it will apply the next time the animation is started
Yeah the xml will know automatically which object is calling the animation and look for variables that match. It's not even case sensitive
So : player has to stop current walk/run animation into some other animation, and then back into walk/run animation to accept a new change?
Exactly yeah
Hopefully one day TIS will expose the AdvancedAnimator to Lua and make it moddable, I would weep with joy
So i am curious about something
when I look into the run
it's set to a variable
but where doth it come from 🤔
It can be set with setVariable
declaration: package: zombie.characters, class: IsoGameCharacter
So you can control the speed of the animation with Lua
What's the lua for printing to the console?
print("message")
DebugLog.log also exists in the case where you have a : character in your print, which tends to break prints
Also useful for early code as print()'s won't show up IIRC(?) before the game loads more
They do
DebugLog.log is basically a print
It runs when the code runs, so when the file loads, if you have a print in the core of your file, it'll print
The main problem is that those prints will be lost in the middle of a lot of other prints
And so you need to add keywords to search in the console
Ah.
Wait really? I use : all the time in prints and don't think I've ever had an issue. Could it be because I always add space after? I do print("Thing I want to check: ", thing)
Version: [42.11] Mode: [Singleplayer] Mods: [None] Save: [New Save] the following LUA: print("EATING IS NOW LESS BORING!") print("Hiding the secrets with a :EATING IS NOW LESS BORING! : cantseeme nothing to see here move along") Results in this echo to the log file: LOG : Lua f:449, t:17546075787...
Maybe? dunno.
Pretty sure the space does nothing
Do note, It shows up in console correctrly
It doesn't
but echos to the log (and shows the log in the console) incorrectly.
😅
It echos correctly on the 'print' itself to console, it doesn't echo correctly on the LOG LUA 35423623623263 echo
Huh, interesting. I guess maybe I haven't printed something with two : in the same print maybe
(yes, prints show up TWICE in console with default settings.. because.. reasons)
They don't, they show up twice in the in-game console only
Need to differenciate the in-game console from the console.txt file here
Two isn't needed either
The first one will nuke things in front
Ooooh, then it's simply because I always put it at the end of the print
yes thats what I mean, it shows up twice (once correct with no prefix, once incorrect with the log 325423235 prefix BS) on ingame console, and shows up once, incorrectly in the console.txt
Wait in front
(Note, updating from B41 or even past B42.x versions can change this behavior as I think they have changed the defaults, but older installs will migrate some of those defaults with them)
Or after?
print("ThisGetsHidden:This Will show up")
Results in something like:
ThisGetsHidden:This Will show up
LOG 2435423562blahblah :This Will show up
and your console.txt will contain
LOG 2435423562blahblah :This Will show up
(something like that, anyway)
That's weird as fuck because I use ("print this: ", this) all the time, it's like my default and it always prints the "print this:"
Sounds unlikely but could it be a windows vs Linux thing?
Maybe, Im on windows 10
You?
Problem is for both Linux and Windows 10
Maybe it's the two part print
Yea, I think they put some weird formatting thing into print
Yeah I use it when I want to print something I'm checking, that's probably it because if I want to just add a print to see if some code is triggered I wouldn't add the :
and its trying to interpet : as something to format
I seriously hope they will fix this
ie, whatever they are using to parse the time/etc
Bcs this is literally a new issue
from the reaction of 'Why not just use debug.log?' im expecting not.
Yea thats kinda how I read the reply too.
Maybe my corperate speak decoders need more tuning but...
I was kinda expecting more of a "Woah, thats a serious bug affecting basically every mod maker out there and is likely due to a single line of code we changed in the last version and would take 5 minutes to fix, we'll get right on that!"
Im pretty sure it started in B42.11 too.
Definitely wasn't there in the early B42 versions
Like im pretty sure I had a number of print statements that just broke when I got B42.11.. Sure they where working in B42.9
It is particularly flagrant when you print specific objects with custom tostrings that have : symbols in them by default, and they basically automatically break themselves
Vanilla also has print statements with : in them
Like textures suffer from that
Does it lol ?
Did you notice vanilla prints being broken ?
no, my own.
print("Cannot add label: "..tostring(_labelID)); Heres one here lol
statisticchart.lua
I assume it breaks too ?
unrelated but lol:
if nbr > 500 then
print("No more than 500 zombies can be spawned at a time to prevent crashing servers etc.")
nbr = 500;
end
yes
bunch more:
if ISEntityUI.enableLog then print("created player: "..currentPlayer) end
if ISEntityUI.enableLog then print("created windowKey: "..currentWindowKey.." for player: "..currentPlayer) end
if ISEntityUI.enableLog then print("created entry: "..values[1].."="..values[2].." under windowKey: "..currentWindowKey.." for player: "..currentPlayer) end
function priv.printPos()
print("# Tick: ", priv.tick);
print("# BoxMove, center: ",priv.p_chunkDirCenter);
print("- ChunkMove: ",priv.p_chunkCurrent," last: ",priv.p_chunkLast);
print("- DirChange: ",priv.p_chunkMoveDir);
print("-Garbage: ", collectgarbage("count"));
end
cool function bro
sure would be a shame if someone where to... Break every single function call in it!
Also, it didn't used to echo prints to your log and back to console a 2nd time back in B42.9
you'd only get the one clear print (but I think that can be also reproduced by changing LUA logging level to disabled)
but then your missing.. all LUA logging, so enjoy that.
that's just not true
it's done that since the day i started modding
i've heard from others that it probably happened at some point early in b41
... Weird, im SURE it didn't in B42.10ish but maybe that was just due to default logging settings that got perserved through versions or something?
Maybe its caused by switching to B41 itself?
hence I didn't see it because my B42 install was the first ever on this PC (Never ran B41)
i doubt it, i've always used a separate cache for b42 and i experienced the issue from the start
Cause im sure my prints used to only print once to console
its why I made that bug report, I was so annoyed when the behavior changed
And I know you can get the 'prints once to console' behavior by adjusting the error logging settings
It did, I can confirm it
shrugs maybe my logging settings where somehow different but im pretty sure I never even discovered that menu till months later.
In some cases you can not notice it
Mostly when you print so much that the double prints get pushed too far for you to notice it
It's weird
yea but when you do that, you get the log prints
Wdym ?
I swear, when I first started modding I got the nice clean initial prints and only the initial prints.
it's a build 41 issue for sure, i and many others here have experienced it for years
Log prints = LOG : General f:0, t:1763017860953> GlobalModData.init() start
clean print = GlobalModData.init() start
(your console gets both unless LUA logging is set to disabled)
Ingame console in debug mode
If you disable Lua logging it doesn't print at all ?
Of course console.txt never gets clean prints -_-;
No, it only shows clean prints in the ingame console (I dunno if it makes it to console.txt)
@bright fog @bronze yoke thanks for the tip
np
making a load screen vector art from the poster to mess around and learn
does max and min damage for shotguns mean total damage or per pellet damage? it looks way too low for total but way too big for per-projectile, so im not sure
B41 its min/max damage per target (there is no such things as pellets, shotgun simply hit certain amount of target for between min and max damage), B42 as far as i know introduced actual projectiles for each pellets where each one has its own damage and one zombie can (or at least should be able to) get hit by multiple pelets, resulting in extra damage
yeah, was looking for B42 info
thanks
Nice that's cool
Can someone make a mod in b41 about in
Solo mode where you get to meet your previous created character on same solo campaign and team up with it?
Didn't you already ask that ? You need to stop asking modders to do things for you, this isn't the place for it, it's a place to learn how to mod. Go learn how to mod, commission a modder to do it or leave already please
Okie🥲
I still wanna make a mod at some point that lets you save/load characters/crates of goodies.
(Mainly for when you wanna move from one save to another, due to mod changes, updates screwing with world, or just a fresh start)
The next step would be some kinda online market place for items..
(Like rimworlds phinex mod)
Officially lost my mind and pulled an all-nighter to add support for project fluent translation files (https://projectfluent.org, for the curious)
Worth it 😤
Any idea why this is happening with the decals? It was working just fine a year ago when I developed the mod, now hood function is also not working.
greets
i want to try and make a small mod for myself that doubles the consumed item hunger reduction while cooking so the final dish would have more calories
will doing so through lua like this work?
local item = ScriptManager.instance:getItem("Base.Potato")
if item then
item:DoParam("EvolvedRecipe = Omelette:18;Soup:36;Stew:36;Pie:36;Stir fry:36;Salad:18|Cooked")
end
most likely
wait maybe not
you can add items to recipes this way, i don't know what happens if you try to add an item that's already part of the recipe
it's a 'try it and see what happens' either way
I asked an innocuous question — apologies if it was interpreted as “your concerns aren’t valid, and go fuck yourself”.
It’s been looked into and resolved.
Sorry then. Apparently my detectors really do need further adjusting. I may have been overly hostile on a few occasions because I have assumed lack of an explicit inclusion of "Filed as bug report" means it wasn't.
I really love the new pinned post feature btw.
Maybe I need to be more “formal & corporate” in my responses. I’m sorry things got off on the wrong foot.
On the semi-related note of calories, just know that it hasn’t been brushed to the side, it’s just something that we’d like to address “once and for all”, rather than having multiple iterative passes based on whichever dev is handling it at the time.
The design director has A LOT on his plate in terms of balancing & decisions to make — so whether or not it’s addressed in one of the nearest upcoming patches, it’s absolutely on his finely tuned radar, as I’ve relayed numerous times the community’s response on the matter 🙏
A set of copy paste responces (or even just tagging the post?) could go a long way to clearer communication.
Peple are often left wondering: Is this bug reported? do I need to post clearer repo instructions? Was it just missed?
Lastly, there’s been a step-up in handling mod-related issues & compatibilities, but I assure you that when asked for examples of negative impact we’re not looking to gatekeep anything, just attempting to better relay to the devs who’d handle the fix why we’re filing something as medium priority or higher so it doesn’t get lost in a low-prio limbo.
I feel like 'once and for all' is going to cause issues because once you balance the calories you may need to rebalance the distribution or consider rebalancing the portion size (and hunger as well) based on further community feedback.
That’s part of the “once and for all” approach for this particular issue, instead of handling it by piecemeal, which would take up a much larger amount of dev / testing hours.
I’m sure there’ll still be minor adjustments to be made, as PZ is ever evolving — you’re right, the metabolics could get a rewrite which throws everything out of whack again.
Christian knocked it out of the park with Halo Reach, and is working wonders with PZ so far — I trust his ability to organize & implement.
I think you'll find 'testers' and 'players' tend to play a little differently, and many of the issues with food don't occur till you hit 2+month long playthroughs.. you practically have to outsource that kinda testing to the player base because its just not practical to pay someone to play that long. Food is often 'fine' in the standard looting playstyle that occurs in the first month.. but after that, the renewable food sources are borked.
(Also, we don't even have a sandbox option for butchery? But do for every other animal aspect)
do you know if this thread is still being checked actively? i know it's not the most official channel but it was where mod related issues were directed for a time https://discord.com/channels/136501320340209664/1318920979581501502
there's a couple bugs i've reported in there that i was unsure was actually seen or not, would it be best to also report them on the forums or elsewhere?
Yea, I misunderstood that as well. Again maybe standardized replies of something like "Bug report filed. Can I get additional info on how this is causing issues to add to the bug report?"
Or if post tags where used if you think clearly stating every time is a little robotic in nature.
"Bug logged" "Needs more info" "Reproduction instructions required" tags or something to that effect, just to show a post has been seen and save time on trying to make unique replies to every post.
Wasn’t on my personal radar tbh, though Aiteron might be able to speak more on that as it looks like that was “his thread”.
I’ll check what the status is, and if it’s preferable to direct reports to the forum these days 🙏
(If that’s the case, I’ll do what I can to migrate existing reports from the thread to the forum)
(Could also save time when scrolling to remember what posts someone on the Q/A team has looked at to tag them)
By tags I mean these things:
that nobody really uses
(Im pretty sure moderators can edit them on a post? the bug and melee tags)
Worth looking into to prevent duplicate posts & communicate the basics at a glance — I’ll see what we can do 👌
Might need to use acronyms or short words like 'info' means 'needs more info', 'bug' = 'reported to internal bug system', 'fixed' = 'already fixed internally for next version' but you could fit that tag translation guide into the 'bug reporting guide'
regarding my prev attempt, it doesnt work. Does anyone here know how to override the EvolvedRecipe code line? Im really not a fan of how small per-ingredient impact is
i am pleased to announce that simply overwriting the line with txt file seems to work even if you only override a single item stat like this
module Base
{
item PorkChop {
EvolvedRecipe = Soup:60;Stew:60;Pie:60;Stir fry:60;Sandwich:60|Cooked;Burger:60|Cooked;Salad:60|Cooked;Rice:60;Pasta:60,
}
}
though id like to know if there are any better ways to do so
it's weird that that way worked and the other way didn't (they should do the same thing internally), but if it works then that is the best way
Thank you for saying what iv been saying for eons 🙂
I lowered meat hunger to have a similar effect as I also found meat restored too much hunger to ever let you get fat even if it was all you ever ate.
Iv also considered just changing how items are added to evolved recipes: add the entire item.
(Except for like spices)
who's adding half a broccoli to their soup anyway
Right? If you really wanted, you could have an add->full, 3/4, 1/2, 1/4, but even thats unnessecary clicks atm
as is, it can take hitting 'add ingredient' 20+ times on meats to produce enough calories for the day
thats more physical work then it is to cook that much meat in real life.
i joke though, i'm pretty sure the vegetable items are supposed to represent more than one single vegetable, the nutrition doesn't really indicate that but the nutrition for every item is too low
Thank you for the clarification. I think everything else that Black Moons and Albion said basically sums up the current position the modding community feels to be in, where we basically report issues, sometimes some critical ones and we feel like we are either getting ignored, or just being sent to low priority
I have personally been reporting the same issue over and over about mod options string entries bricking user's games if they set an empty string. I consider this quite a critical problem which can happen very easily from the users and that basically impacts only modders. Another constant one has been the auto sorter of the new mod manager basically nuking the current active mod list and disabling randomly mods because it didn't manage to properly sort itself. This notably happens due to new parameters for the mod.info files which are loadBefore loadAfter (@willow tulip knows a bit more than me on the details of it I believe)
The #1318920979581501502 thread is probably one of the worst one where we tell modders that there's no point asking anything there because most of the time this is getting ignored
It definitely feels like a proper acknowledgement of issues that are taken note of would be great. Basically something like Minecraft has, where bugs are given status by the Mojang employes that handle the bug reporting stuff
I have code fixes for both those issues btw.
That way we can have clear indications of what will be fixed, what won't be fixed, what needs more detail etc and I believe they can even easily handle duplicate bug reports like Stack overflow does
a complete rewrite of the autosorter, and a patch to fix that modoptions because else it would break my mod project summer car if you ever left a text mod entry empty...
the mod options scrollbar for value selection is also comically narrow at like, 30 pixels
Yea, I had made a request/suggestion in #1318920979581501502 for that
To have a precise selection entry box for this kind of selector
Version: [42.10.0] Mode: [main menu] Server settings: [N/A] Mods: [Controlled example mod to reproduce bug] Save: [doesn't matter] Reproduction steps: 1. Launch the game with a mod which adds a text entry in ModOptions of PZAPI 2. Go in options > mods 3. Replace the string in any text entry op...
I had even made a proper video showcase for that to show that this was in fact a thing
Its very frustrating when a bug like this gets ignored for multiple versions when it bricks games from loading and can be fixed by adding a null check to one line.
Id also be fine with just allowing it to be normal width (as per sandbox options version), and having 'double' modoption fields like sandbox option has.
basically just bring it to parity with sandbox options
If I was hopelessly optimistic I'd say they are ignoring bugs in the various parsing systems because they are about to be completely replaced with something using standard file formats and parsing libraries.
But I'm too cynical, so I'll join in with everyone sad about the number of bugs reports with trivial fixes that are just ignored.
Not a single horde or structure damage zombie mod is working for me can Anyone please verify it works for their server B41? Please I’m trying tooo hard to see if I can work it
Why do you keep posting your questions in both the mod support and development channels?
How do I make an door temporarily invulnerable to zombie damage in Build 42?
is it possible?
Yea
Set its health to an insanely high value then set it back to the default value after X time
thanks
Why do you not understand I’m trying figure something out? DA
B42 porting broke a lot of mods im trying to fix it myself
You're schizo dude
It's not B42 that broke B41 mods, worst case its the mod devs themselves that broke those mods by not properly porting them to B42
The B41 and B42 mods can't clash together, the files are completely isolated
B42 updates break B42 mods.
Anything last updated before B42.12 likely has script issues, especially if it has repair scripts.
it's a b41 issue is the thing 😅
Someone able to further explain enum sandbox options for me real quick? I read through the doc page regarding sandbox options, but I'm unsure about translation field?
option DaemonsArchery.StarterItem = {
type = enum,
default = 1,
numValues = 6,
page = DAE,
translation = DaemonsArchery_,
}```
is translation simply a singular static definer, and then follow
Sandbox_<ModName>_<OptionName>_option1 = "First value",
Sandbox_<ModName>_<OptionName>_option2 = "Second value",
}```
option ReeferMadness.SpawnRates
{
type = enum,
numValues = 3,
default = 1,
page = ReeferMadness,
translation = ReeferMadness_SpawnRates,
valueTranslation = ReeferMadness_SpawnRate_Values,
}```
Sandbox_ReeferMadness_SpawnRates = "Spawn Rates",
Sandbox_ReeferMadness_SpawnRates_tooltip = "Affects how frequently you will find Reefer Madness items in the world<br>Each option is 10x higher than the last",
Sandbox_ReeferMadness_SpawnRate_Values_option1 = "Low",
Sandbox_ReeferMadness_SpawnRate_Values_option2 = "Medium",
Sandbox_ReeferMadness_SpawnRate_Values_option3 = "High",```
No, it's for visual organization of stuff
Doesn't the wiki page explain it ?
Sandbox_DaemonsArchery_StarterItem_tooltip = "If enabled, new characters start with a selected item, as well as ammunition for the selected item.",
Sandbox_DaemonsArchery_StarterItem_Values_option1 = "Wooden Bow"
Sandbox_DaemonsArchery_StarterItem_Values_option2 = "Long Bow"
Sandbox_DaemonsArchery_StarterItem_Values_option3 = "Compound Bow"
Sandbox_DaemonsArchery_StarterItem_Values_option4 = "Wooden Crossbow"
Sandbox_DaemonsArchery_StarterItem_Values_option5 = "Iron Crossbow"
Sandbox_DaemonsArchery_StarterItem_Values_option6 = "Tactical Crossbow"```so this will work?
it's a bit convoluted and not super clear
I read the entire wiki entry regarding it
I guess the page might appreciate a bit of love, it's one of the earliest iteration of wiki page I made
You forgot your commas
ope, yep thanks
Well, I'm closer I guess
I'm assuming I need to use lua to show/hide options dynamically based on a bool selection?
For example, the dropdown
You can't do that natively
Oh, so its all or nothing
You could do that but it involves UI modding
The advanced boolean is unknown currently if we can do anything with it
Bcs the vanilla game options are not implemented with a sandbox option script file
They are Lua / Java sided
Gotcha
No biggy, as long as the bool isn't ticked, the dropdowns selection is useless
So even if it shows its not a big deal
You can add a simple warning in the option tooltip
You can also format the text in the tooltip by using rich text panel tags
we can't do anything with advanced options
Rip
they have not changed anything about mod sandbox options whatsoever
It'd probably have to modded in then
I think Im having a dumb. I can't rename the option on the left lsit just sticks at "Sandbox_DaemonsArchery" even though I defined it in the translation?
Show your translation entry
Sandbox_DaemonsArchery_GetStarterItem = "Start with Custom Item?",
Sandbox_DaemonsArchery_GetStarterItem_tooltip = "If enabled, allows the selection below to be your default starting weapon.",
Sandbox_DaemonsArchery_StarterItem = "Start with Equipment",
Sandbox_DaemonsArchery_StarterItem_tooltip = "If enabled, new characters start with a selected item, as well as ammunition for the selected item.",
Sandbox_DaemonsArchery_StarterItem_Values_option1 = "Wooden Bow",
Sandbox_DaemonsArchery_StarterItem_Values_option2 = "Long Bow",
Sandbox_DaemonsArchery_StarterItem_Values_option3 = "Compound Bow",
Sandbox_DaemonsArchery_StarterItem_Values_option4 = "Wooden Crossbow",
Sandbox_DaemonsArchery_StarterItem_Values_option5 = "Iron Crossbow",
Sandbox_DaemonsArchery_StarterItem_Values_option6 = "Tactical Crossbow",```
Show your sandbox option entry
option DaemonsArchery.GetStarterItem = {
type = boolean,
default = false,
page = DaemonsArchery,
translation = DaemonsArchery_GetStarterItem,
}
option DaemonsArchery.StarterItem = {
type = enum,
default = 1,
numValues = 6,
page = DaemonsArchery,
translation = DaemonsArchery_StarterItem,
valueTranslation = DaemonsArchery_StarterItem_Values,
}```
Iv seen a mod go as far as put an entire new options panel into the game lol.
I was kinda sad how much better its options menu was then we get with mod options -_-;
It's so underutilized
I did something similar to add custom buttons to do specific stuff
Unreleased mod tho
Is that your entire translation file ?
yep
Then it's wrong
Right I wish we could just get some render callbacks or something genericish we could hook into for mod options
Sounds about as I expected
oh, wait, I see
@bronze yoke should we ditch the whole "table" thing of translation files in the Translations wiki page ?
And just have people put nothing in the first line
Sounds like a bad idea
But it's impressive how much of a lie it is to modders lol
Fixed it, am dumb
@bright fogthanks for entertaining my ignorance, I'll ask less questions once I actually get to lua scripting, but the translations and definitions portions always different game to game
np the channel is here for that
The translation parser skips the first line gezus
Yea
so if I accidently put an empty line and THEN ContextMenu_EN = {, kaboom?
No
That line will be ignored
I think bcs it doesn't follow the right format a translation anyway
And ContextMenu_EN isn't a translation key used anywhere I'd assume anyway
ah
it might actually go kaboom i'm not sure
ContextMenu_EN = { isn't correctly formatted for a translation line so it might not like it, but it does seem to ignore things it doesn't recognise usually?
Yea that's my guess
That it isn't formatted the right way and so it'll get ignored
I don't remember any errors ever happening from translation files
Worst case the translation key just doesn't work
huh pretty cool pretty sure I did the texture on that tracksuit
(outdated tho my newest update makes the stripe looks better)
What are you talking about ?
The runner screenshot ? These were made without any mods activated but my mod
Trying to make an aiming system for my tanks, wow, it's so difficult. It simply works with some angles and not with others.
The circular cursor is the player's mouse, and the triangular one should follow the direction of the cannon, but it simply does not obey me. I have to come up with some formula to compensate for these deviations.
oh nvm then lmao
What mod has it ?
Post Soviet Clothes
im not upset or anything like that whatsoever just thought it was mine and that made me happy
I guess the vanilla game has an exact one 😅
Show your math and what are your data sources and data output for the angles / positions. I am moderately confident you got mislead by Isometric Vs World representation.
Here is how I got a "good circle", but you will likely need something else depending on your i/o (probably you will need screenToIsoX &screenToIsoY) : ```lua
function ShowAttackDistance:renderIsoCircleLocal(playerNum, posX, posY, posZ, ray, r, g, b, a)--my inputs are in world coordinates
local angularStep = 0.1163552834662886D;--you don't car about that, it is the precision of my circle. you do not want a circle.
local northingOffsetCorrection = 1.0471975511965977D;--this may be of use to you Papa_Chad
for angularIter = 0, 6.283185307179586D, angularStep do--from 0 to 2 PI
local xStart = posX + ray * Math.cos(angularIter - northingOffsetCorrection);--here is my x offset in world coord
local yStart = posY + ray * Math.sin(angularIter - northingOffsetCorrection);--here is my y offset in world coord
local xEnd = posX + ray * Math.cos(angularIter - northingOffsetCorrection + angularStep);--you don't car about that
local yEnd = posY + ray * Math.sin(angularIter - northingOffsetCorrection + angularStep);--you don't car about that
local xScreen1 = isoToScreenX(playerNum, xStart, yStart, posZ);--convert a world coordinate in screen position x
local yScreen1 = isoToScreenY(playerNum, xStart, yStart, posZ);--convert a world coordinate in screen position y
local xScreen2 = isoToScreenX(playerNum, xEnd , yEnd , posZ);--you don't car about that
local yScreen2 = isoToScreenY(playerNum, xEnd , yEnd , posZ);--you don't car about that
self:drawLine2( xScreen1, yScreen1, xScreen2, yScreen2, a, r, g, b)--my outputs are in "screen position" because I want to draw lines on screen.
end
end
Man, that looks really useful, thanks a lot.
Hey im new to modding pz but I wanted to make a mod that created a fireball and was wondering if anyone had any suggestions on an already existing mod that had examples of “thrown objects” so I could see how they were implementing the object models / logic - or just in general if anyone had suggestions on guides that went into a little more depth than the wiki did (which mostly seemed to be based around setup)
I noticed plenty of mods on the workshop that add guns, but none that had thrown/projectiles that were listed as being compatible b42. Or may be that im just missing them?
PZ throwing is not relyable (for impact position)
I'm trying to understand how file structure setup should be within PZ, I've read through the available pages within the wiki, and it's not quite making senseto me, I've look at a few mods to see file structure as well, and they seem to be all voer the palce in how folders and subfolders are setup. As such, I can't seem to get my lua script to be fired properly(at all).
It could very easily be a syntax issue since I'm not fully versed in the available core functions that can be called
hey sorry could you clarify what you mean that its not reliable for impact position? You mean that I cant accurately tell it where it should be landing? my general idea was that the fireball would hit an area based off the cursor, like a normal fire bomb, and then explode. The big differences in waht im trying to do are really just swapping the item texure from bomb->book and then altering the thrown model as well as the stats
I guess what i was looking for more was to get a better idea of what is handling the object sprite that is shown while being thrown, as I found the script that handles the weapon stats for fire bomb which i figured id copy over and edit
yep same as vanilla pipebomb and other throwing objects, it is very unprecise.
I see, well that may explain why no one makes grenades or thrown objects. since the idea is to make it explosive i think that it could be ok at least for that much. I am just trying to use this to get a handle on how mods are made in pz before i move on to expanding the 'spellbook' concept and want to start with something i figured would be simpler
like for instance what is effectively a reskinned fire bomb - with the exception that it will look like a book and use a 'fire' sprite in motion, i suppose
generally speaking ~ the client folder is for UIs, core systems, stuff in that realm. Shared is mostly for files which interact with other lua files, or other framework mods, etc. 🙂
what exactly are you trying to do in your lua file?
Im simply at this point attempting to remove the base starter items and replace them with my own if a sandbox option is checked. at the moment
local function DaemonsArchery_GiveStartingCrossbow(playerObj)
-- Check if the checkbox is enabled and is new game
if SandboxVars.DaemonsArchery.GetStarterItem and playerObj:getHoursSurvived() == 0 then
local inv = playerObj:getInventory()
local BaseStartingItems = {"Base.Pistol", "Base.9mmClip", "Base.Bullets9mmBox"}
local item
for i = 1, #BaseStartingItems do
for j = 1, inv:getCountTypeRecurse(BaseStartingItems[i]) do
item = inv:getItemFromType(BaseStartingItems[i])
if item then
inv:DoRemoveItem(item);
end
end
end
inv:AddItem("DaemonsArchery.wooden_crossbow")
inv:AddItems("DaemonsArchery.throwing_rock", 10)
inv:AddItems("DaemonsArchery.crossbow_bolt", 30)
end
end
Events.OnNewGame.Add(DaemonsArchery_GiveStartingCrossbow)
oh wait
noticed syntax problem
I'd say go for it :). if you are using B42, any vanilla item with the following parameter will do SwingAnim = Throw, those are in media\scripts\generated\items\weapon.txt. I do not remember for B41.
i’m fairly certain this would need to be under client, since you’re modding the player character. I wrote a trait which gives items when the player spawns (placed that lua in client)
hold up though, i’ll check out some reference mods for you to verify 100% 🙂
its currently in \mods\DaemonsArchery\42\media\lua\shared\client
ohh, that could be it. try moving it to 42\media\lua\client
thanks! yea so i got that far at least, that i can use a thrown bomb as a template. But would you be able to point me in where in the code I could look for how the game handles the 'thrown' object? My idea was to hopefully just find a pre-existing 'fire' object of some sort and then apply that as the 'thrown' object that you see after you throw it. I'm assuming i will have to use the decompiler?
nope, that didn't do it
I wonder if I've screwed up the var names somewhere
or, alterantively i was looking for something that had that sort of scripting already done so I could see how someone else implemented a custom throwable. But I was really struggling to find a b42 thrown weapon, doesnt seem they're that popular to mod
I wouldn't think that's the issue though, considering my translations file names everything properly?
hmm… yeah so it looks like this rules out pathing being the issue.
looking at your code some more, do you have a sandbox-options.txt file for setting the sandbox vars?
looking at the code, if the sandbox file is borked, in theory it wouldn’t fire your code at all
option DaemonsArchery.GetStarterItem = {
type = boolean,
default = true,
page = DaemonsArchery,
translation = DaemonsArchery_GetStarterItem,
}
option DaemonsArchery.StarterItem = {
type = enum,
default = 1,
numValues = 6,
page = DaemonsArchery,
translation = DaemonsArchery_StarterItem,
valueTranslation = DaemonsArchery_StarterItem_Values,
}```Yessir, and my translations file names everything properly in the world settings
unless maybe I put my sandbox-options.txt in the wrong folder?
Like I said, folder and subfolders seem to be all over the place for modds I've looked at to understand file structure
So that's maybe a possibility.
Currently the sandbox-options.txt is within my media folder.
that’s a possibility for sure! how i see dev stuff like this, it’s all about ruling out possibilities until you find the culprit lol 😆
that looks to be correct
Once I figure it out the first time, it'll be a non-issue after, this is the kind of tedious stuff that annoys me lol
that’s absolutely understandable xd
wait a min...
okay, so a couple ideas here. after looking at some more mods that handle starter gear ~ it looks like they keep the code very simplistic. for example, changing your code to simply remove the items (wait a couple ticks) then add the items. in theory your code should work, but Ik pz can be janky at times
hell ye
Knew it was something stupid I did. Usually is, especially with LUA
now that this is working, one idea could be creating a new item called “StarterKitBox” or something - then have opening/using it give the items
afaik, there is no such thing as a fire object. You can create your own that is a duplicate of e.g. "Molotov" and then replace the right parameter for the in hand / sent object. I do not know much about it. I'd suggest to test it (maybe changing "WeaponSprite = Molotov," or "PhysicsObject = MolotovCocktail,") and then add accordingly your model (I guess in model_items.txt). If you do not find an exemple of a thrown object in B42, look for added weapon in B42, those may be close enough.
yeah tbh, lua is one of those languages that has its quirks 😆
once you start getting it down though, it seems to become less and less annoying with time xd
I've used lua a lot in the past in WoW, War3, and factorio
Its always a syntax thing
i’ve invested a solid 300-400 hrs in modding pz so far and still learning to this day. it’s gotten easier in a sense, but i still make dumb mistakes occasionally lol
hell yeah!!
having prev experience is a legitimate game changer
only thing that ever really changes is the functions from game to game
Syntax is generally the same
the documentation on pz’s functions is fairly decent, but in all honesty, the ol reliable is looking at the java files themselves
especially with areas that don’t have much documentation yet💯
Yeah I'm sure Ill start having to dive into it at some point
@upbeat turtleif you don't mind, what do you know about adding a weapon model?
I've got it to where it equips, but can't seem to find the wiki page pertaining to specifically adding gear related stuff
and right now, my dropped item uses the icon as its dropped item when on the floor
do you know how i could get the item to stay in my hand after i 'throw' it? the idea being its not consumable. Is that ConditionMax = 1?
UseSelf = true, => UseSelf = false, (sorry it will not be destroyed but it will be thrown)
Nvm, figured it out 😄
now just gotta make my own crossbow model/textures(instead of using someone elses), recipes, and should be it outside balancing damage and whatnot
I just want to make a "stealth" pack for things like bows, crossbows, and maybe see if I can hack something together for throwable objects that can distract zombies
tldr you need to define the mesh, texture, and scale in a models.txt script
absolute cinema 🙌
tbh, i’ve been considering expanding on the stealth system some more too
I wanna RP as daryl dixon from TWD damnit
maybe we can bounce ideas about it off one another sometime
throwable bottles are the pipeline 💯
i wanna distract zeds like in tlou 😆
oh totally! feel free to shoot me a dm 😊
i made a twd-inspired stealth mod a few weeks ago. still early development, but created the system to be fairly dynamic
hmm, yea so i did manage to get it up and running but its definitely not what i had in mind. I have changed the weaponsprite to the book model, but ofc that just means that i throw the book lol. I think i might have to figure out a different way to implement an object that uses throw anim but still holds onto the object, and also doesnt 'use' the item, b/c when you have useSelf = false that basically just uses it then spawns a new one into inventory.
i think i could look for someone who has made like a grenade launcher or something and then see how then implemented that? might be better as a launcher of some sort. just wish it was easy enough to keep the throw anim and visible thrown object without releasing the held object too
Does anyone here recall the mod that adds a 'per mod' selection dialog to mod options, and adds some new mod option features?
nm found it.
gj 😄
How does one access and make a floating text? I want to make floating text similar to the radios/tv in the way it acts, but at the point of a zombie on hit. I already have the ondamage event sorted, but can't find anything related to the text. googling it says that's controlled java side and not in LUA?
if its a hardcoded thing, I'll forego the idea I had
It's not
You can definitely add text but it depends how much control you want on the text format
You can use addLineChatElement
dont care a super ammount about control tbh
kinda just doing it to debug
might use it later on for damage numbers or something
I believe most mods basically is the worldtoiso coordinates(?) functions, and then render it on the GUI layer
if you have a UI element(?), you can do
--self:drawText(currentGear, self.dash.gearIndicator.x, self.dash.gearIndicator.y, 0, 1, 0, 0.8, self.dash.gearIndicator.font);
etc
the magic numbers in the middle are RGB alpha
And im pretty sure the X/Y can be anywhere on the screen
(in screen coords)
I got it to work, was erroring because I had some syntax wrong
Then addLineChatElement
Or Say
No need for a debug thing like that
Ah k
But you can show nametags yes, that's something I often use to write text at a specific point on the map
Looks sick! Let me know if you want some guidance for how to make custom animations for it
I'm not an animator at all, so that'll likely be something I try to find someone else to do
I don't really do model work at all either, but something low poly I can manage
tanks
Bows and Arrows have been missing for a pretty long while.
Used to be a fancy crossbow and arrow mod way back.
If all you need is a reload animation I could whip that up for you if you want
I think it'd only be reload for both a crossbow, as well as a bow, which will be what I work on next
I can recycle the reloads for both into multiple tiers of the same weapon class
Crossbow animation would be quick, I can do that, but the bow I'm not sure I'll have time right now or in the coming days, depending on how many you'd need. I assume one for nockin the arrow, one for draw, and one for release?
I guess that would be pretty quick too
Would be best to go with a Hip-Quiver and not a back-quiver as well.
Then again a partially zipped backpack could work 🤔
yeah pretty much it, and it wouldn't ahve to be anything fast, you being willing to do its more than enough, I don't set timeframes ona nyone ever unless it's because of monetary gain
I'm planning a leg quiver
but that'd require multiple anims, soooo eh
Alright I can do that, no problem.
I'd just need you to send me the model for the crossbow and bow so I can use it to line up the animations properly
I'll have to make them, currently I'm using placeholders made by someone else as modeling has absolutely never been my forte in anyway
And it'd take me hours to do them lol
It's the reason I generally don't release mods often, because 3d modeling and textures have always been my downfall
Textures, mostly because I have achromatopsia (gray scale colorblindness)
Well Reload Animation would be drawing from Quiver and placing arrow, and then Aiming for drawing back. Two should be plenty enough for early development, no?
Also, your cursor is superimposed on the ground that has a different vertical position from the canon. Even if your vehicle has perfect 0 pitch and 0 roll (and if your ballistic is straight / not curved, meaning your line of fire is your line of sight), that "vertical parallax error" must be handled somehow.
Yeah, depending on how in depth I want quivers to be, there's atleast 3 plausible locations for quiver attachment. Back Sling, lower back/belt, and leg
So that makes 3 anims in itself.
I've been trying to do bow and crossbow in b41, but i just couldn't for some reason change the idle and aiming animations, so i just ended up using 1handed pistol animation, with just some kind of "pull the arrow" quick animation and then reload and that was it. https://i.gyazo.com/15f78c34be34c2db59d4bac728be6719.mp4
I think you pretty much have to do idle/walk/aiming animation too. I tried using Vanila pistol idles with my "fancier" anim and .... the video speaks for itself https://i.gyazo.com/bb647b5439d5acc6b244eb61384b88e5.mp4
But its also quite old and my understanding of XML files wasn't that great...
Ah okay, if you think the placeholder models are close enough to at least the size of the final models then it's no problem, but if you're gonna make significant changes then it's best to wait since I'll be using the models as a guide to line up the animations properly
Placeholder models will be the same general size/shape as what I end up with, yeah
I could send them to you if you want
Yeah send em over and I'll get the animations done either today or tomorrow
oh, hell, thanks man
textures as well, or just model will suffice?
Just the models is fine
alrighty, incoming dm
Any documentation on how to potentially add a custom profession that can be leveled similar to aiming/reload? I'd like to maybe add an "Archery" Profession
You mean a skill ?
seems theres nect to nothing from googling it
Yea there's no doc about it
I suggest finding a mod that adds a new skill to see how they do it
Documentation will come in the future, but yea that's not a subject that's covered in guides rn
Maybe if I figure it out, I'll see about making a wiki edit or something
Sure you can make a guide in its own wiki page if you want once you've figured it out
If you have questions regarding the modding wiki, to work on your own stuff there, don't hesitate to ask me
there's a script type for skills
For sure, it's been quite a long time since I've done anything wiki related lol
Wait it's a script ?
actually granting xp and applying effects from it will entirely be lua though
I didn't even knew that
Yeah, I found the adding xp and effects stuff, it was the actual skill creation I couldnt find
I found one post that used purely lua, but it was hacky and I dont wanna
lua was the old method yeah
media/perks.txt (must be this exact path)```
VERSION = 1,
perk Reading {
parent = Mind,
translation = Reading,
passive = false,
xp1 = 50,
xp2 = 100,
xp3 = 200,
xp4 = 500,
xp5 = 1000,
xp6 = 2000,
xp7 = 3000,
xp8 = 4000,
xp9 = 5000,
xp10 = 6000,
}
the xp values get multiplied by 1.5 for some reason so these match vanilla
thanks friend
quick question about "parent" is there a list somewhere that shows the anme of the categories? would it simply be "Firearm" if I want the new skill to be categorized with aiming/reloading?
the structure for this is probably the most baffling thing in the entire codebase
perk categories are also perks
you just can't get xp for them
i can't guess at all how this was the easiest way to do it 😅
I.... mmk lol
Good ol' spaghetti
noice
Hell yea
Yeah perk categories are parents
Really leans into some sort of tangential skill system allowing for transferable skills
Is it cough cough easy to expand the perk system with custom categories and, what, sub-perks?
custom categories are easy, sub-perks aren't really supported even if the structure would imply they are
I think it would help the game alot though lol
well it is their explicit plan for b42
Like get enough idk carpentry and you raise the craft skill and now your other craft skills are easier to raise - etc
i think it's one of those things that got held back because of crafting
Is it? I didn't catch that
The mod that lets people "teach" others is cool too
presumably it's what 'expanded skills' refers to on this roadmap but honestly who knows 😅
it was something they talked about in one of the earlier 42 thursdoids
skills would have relationships with other skills that would boost your xp gain to represent transferrable experience, and i think the existing skills were going to be split up a bit
which i guess has already happened with carpentry/carving
eh... i went looking for it and to be honest, the only mentions i could find of it were a lot more vague and non-committal than i remembered
Reminds me, they still haven't made raccoons climb fences again, have they?
How do translation for perk?
@bronze yokesince you game me the tidbit about how to make it, where/how do I do translation?
Uh yeah I would say definitely
Make your IG_UI file, with IGUI_perks_Archery
Working on a small addon to see bullet cases being spent when firing
VERY nice!
You could see if having them roll a bit along whatever axis they land on looks good, or maybe random height bounce or two. As is it already looks amazing.
dammit cat step on the keyboard mid messagee lol
lol love you @willow tulip . always pushing my insanity forward hahaha
elo!
a time ago i made my sona mod to anthro survivors, but on B42, it has some invisible spots on the face and the foot, is there any way to fix it?
Another unnecessary stuff comin soon !
For sure keep me on the loop for this one lol
Hadnt seen a furry mod since... .40 or .41
wym
furry anthro works on b42
almost the same way tbh
yeah
it also got some other things like a better version of anthro zeds, with custom furries from workshop and stuff
its a bit..buggy, but what isnt in b42?
Fair and thanke
I'd read that, if half the internet wasn't down pziki included, cause of cloudfare lol
Yeah it's fucking wild, I'm using VPN to route through the UK, seems to work better
Well not anymore lmao
goes up and down
I don't have a VPN cause am poor broke bitch
yooo laser tag?
(YES!)
Yeah pretty much everything I’ve tried to look at this morning hasn’t let me lol
Cloudfare getting DDOS'd closes half the internet lol
It's a global outage
If these were the only things, I see it as a win
@sour wave Your crossbow reload is done 😄 I'll export it and send it over
Fuck yeah man, you're awesome!
Check your normals on the model they could be wrong in that area
it was something related to sorting
i made a proper sort and its working fine
I really hope the more anthro survivors mod gets updated to 42 soon, I need my proto boy back!!!!
ignore the blood, im on mid-gameplay rn
That’s so cool
hope in the future we have proper physcis on items
but for now. bullet casings simulated
nice
