#mod_development

1 messages · Page 352 of 1

shy mantle
#

Found what I removed

    if not ISInventoryPaneContextMenu.getContainers(self.character):contains(self.destContainer) then
        return false;
    end
willow tulip
#

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.

shy mantle
#

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

willow tulip
#

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

shy mantle
willow tulip
#

though you CAN just use V to open the door and access the inventory to empty it

shy mantle
willow tulip
willow tulip
shy mantle
#

Especially now that smash window and vehicle mechanics isn't right click anymore

willow tulip
#

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'

shy mantle
willow tulip
#

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)

trim quartz
#

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?

bronze yoke
#

not all zombies are spawned when the square loads

trim quartz
#

ah, thats annoying. Thanks. am I best catching them in onZombieUpdate?

bright fog
bronze yoke
#

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

trim quartz
#

appreciate the responses btw 🙂

shy mantle
#

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

topaz tangle
#

Not to be that guy but you are missing the motorcycles
Though actually idk if they are in b42 yet

bright fog
#

It's fine for the most part

delicate solar
#

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

delicate solar
#

ı'ɯ ʇoʇɐllʎ ʍɹonɓ ¿

willow tulip
#

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)

bronze yoke
#

are you naming variables things like int0? 😅

willow tulip
#

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. )

delicate solar
#

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

bronze yoke
#

<@&671452400221159444>

willow tulip
#

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)

bright fog
#

<@&671452400221159444>

delicate solar
#

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...

small osprey
#

kindly use
3 backticks followed by "lua"
<your code>
3 more backticks

print("Hello world")
willow tulip
#

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 
delicate solar
#

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

bronze yoke
#

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

willow tulip
delicate solar
#

I admit using AI, but I'm trying to understand it... Right now, the joystick is up my ass.

shy mantle
#

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

bright fog
thin swan
# shy mantle Does anyone have any experience in converting an action animation into a simple ...

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

shy mantle
#

@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.

livid haven
#

@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.

livid haven
#

how do i reset loot without resetting anything else in b42?

bright fog
#

Respawn loot but keep old loot in the container ?

livid haven
# bright fog Wdym ?

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.

livid haven
bright fog
#

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)

thin swan
thin swan
#

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

shy mantle
#

@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.

thin swan
# shy mantle <@156534691283992587> I forgot to include I already have that other keypressed l...

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...

shy mantle
#

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

errant elk
#

hello! its my first time creating a mod for project zomboid, can someone help me with that?

thin swan
shy mantle
#

I see 42\media\AnimSets\player\idle in the first screenshot and 42\media\AnimSets\player in the second

thin swan
shy mantle
#

oh ffs

thin swan
#

Haha yeah it's a very silly and annoying bug

shy mantle
#

@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!

thin swan
shy mantle
#

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

icy night
#

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.

thin swan
# shy mantle and it's looping

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

shy mantle
#

I thought so

shy mantle
#

@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

thin swan
# shy mantle <@156534691283992587> Character does this little awkward push down animation for...

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

shy mantle
#
<?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

thin swan
# shy mantle Still has the same issue, and here's the xmls again:

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

shy mantle
#

I don't need the player falling, but it's attached to the end of the success animation

thin swan
# shy mantle This was finally it actually, it stopped the previous issue and played the remai...

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)

shy mantle
thin swan
shy mantle
thin swan
# shy mantle Yeah, there's not too much information about this anywhere. Also, I assumed you...

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

shy mantle
#

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

thin swan
# shy mantle I have it working fine now, I just wish I could offset the physical character bo...

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

shy mantle
#

Getting into making an animation would probably be way too much for me

thin swan
#

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

shy mantle
#

it really is just this last thing to tackle

thin swan
shy mantle
#

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

thin swan
thin swan
shy mantle
# thin swan Yeah I bet that took a sweet minute, but I can see a lot of people wanting that ...

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

thin swan
# shy mantle Also, I'm definitely adding you to contributors lol

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

shy mantle
#

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

quasi jewel
#

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

drifting ore
quasi jewel
drifting ore
quasi jewel
#

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)

drifting ore
#

Let me see your item script for fur trim

quasi jewel
#

Haven't made a custm icon for it just yet

bronze yoke
#

the error sounds like it doesn't like your BloodLocation but i don't really see why not

drifting ore
#

Yeah...

quasi jewel
#

is it maybe

quasi jewel
bronze yoke
#

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 😅

drifting ore
# quasi jewel Ja

Get rid of hat category? It isn't in the vanilla scarf xml so maybe?

quasi jewel
#

Body location?

#

or diff thing

drifting ore
#

In your xml, just remove the entire m_HatCategory line and try again

quasi jewel
#

Dankeschön. it be the most random stuff fr 💀

topaz tangle
#

VW thing progress
havent figured out how to only get one model to show up at a time

small osprey
shy mantle
#

oh, and fall damage

small osprey
#

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. ;).

cursive veldt
#

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.

bright fog
#

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

cursive veldt
bronze yoke
#

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

bright fog
#

A character that plays without human interaction is a NPC

cursive veldt
bright fog
#

I think you missed the whole point of Project Zomboid ?

cursive veldt
cursive veldt
#

He went from rosewood to louiseville

#

Guy went from npc to main character

sour island
#

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

cursive veldt
crystal idol
#

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,
}

crystal idol
#

Nevermind, I solve the problem adding a copy of the 3d model whit another name

willow tulip
mellow frigate
#

Unverified hypothesis: by opposition to lua, models are not reloaded without restarting the game.

tranquil kindle
# mellow frigate Unverified hypothesis: by opposition to lua, models are not reloaded without res...

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.

bright fog
drifting ore
#

Now teach me how to read the game code

#

Mr tough guy

frank elbow
#

The rest will come to you

#

🙏

drifting ore
#

Don’t hold your breath

icy night
#

You assume he has eyes 👎

bright fog
livid haven
#

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

willow tulip
#

'media' can be in 'common' or '42' if you want it 42 specific.

#

(Not that 41 can load from common, but 43 will? *shrugs)

proud fox
#

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.

livid haven
# willow tulip And common needs to be undercase or linux throws a fit

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.

willow tulip
#

And yes, Excessively long logs have been known to cause lag when further writing to the log

drifting ore
#

I saw a mod today that only prints if debug mode is enabled

willow tulip
#

Iv known some games that had downright massive lag issues until you set their log file to read only 😛

drifting ore
#

Seems so simple but yeah I always just delete mine

willow tulip
#

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?

bright fog
#

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

willow tulip
bright fog
#

I had to go in their mod and delete every print statements bcs of it

willow tulip
#

You can uncomment them later, or tell users to if you ever need debug info back from an end user

drifting ore
#

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

bright fog
willow tulip
bright fog
#

Adds a useless option

#

I will repeat myself

#

NO ONE NEEDS YOUR PRINTS

willow tulip
bright fog
#

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

willow tulip
#

And generally when you have too many prints, you end up scrolling stuff outta the log

livid haven
bright fog
#

If you print errors, yes sure, but nothing else

willow tulip
#

so all you'll get is a log from the end user with 15 minutes AFTER the error occured.

drifting ore
#

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

willow tulip
#

But a UI window would prob be better.

#

(though way more work to add)

bright fog
drifting ore
#

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

bright fog
#

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

drifting ore
#

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

willow tulip
bright fog
#

The mod that I mentioned before was printing the increase in radioactivity of the player: literally no one gives a shit

willow tulip
#

"Woah man, im so stoned right now" = 100% THC
"Got a small case of the munchies" = 25% THC, etc.

livid haven
bright fog
drifting ore
#

Are custom sandbox options able to take advantage of the advanced tick box that shows you the exact value and lets you set it?

willow tulip
#

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)

livid haven
#

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```
willow tulip
#

.... please tell me TIS doesn't just do that on the regular.

drifting ore
#

Ofc not

willow tulip
livid haven
willow tulip
livid haven
#

its driving me mad

willow tulip
#

@bright fog I can't recall one having any reasonable awnser why they left so many prints in -_-;

willow tulip
drifting ore
#

Too many debugs to comment out maybe lol

willow tulip
#

F11, debug settings, turn LUA down to disabled.

#

or error log? something

bronze yoke
#

even during development you should not permanently have 'everything is okay' prints

livid haven
willow tulip
livid haven
#

since that runs every tick

knotty stone
#

with notepad++ that takes 1-2 seconds to comment out all xD

willow tulip
#

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.

livid haven
willow tulip
#

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)

bronze yoke
#

don't forget print "lol" 🙃

willow tulip
bronze yoke
willow tulip
#

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.

willow tulip
# bronze yoke

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.

bronze yoke
#

probably just for very short term debugging

#

don't act like you've never done print("here") to work out what's actually executing

willow tulip
#

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!

livid haven
willow tulip
#

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

livid haven
willow tulip
#

oh so its an error for every mod iv subscribed to?

livid haven
livid haven
willow tulip
#

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

bronze yoke
#

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

livid haven
bronze yoke
#

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

willow tulip
bronze yoke
#

probably both

bronze yoke
#

it's pretty clear that the mod manager was made before they actually changed the mod structure

willow tulip
#

If anyone wants me i'll be hiding where its safe from TIS code.

bronze yoke
#

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

willow tulip
#

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)

willow tulip
willow tulip
#

K

queen oasis
#
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
willow tulip
#

(or sandbox options? dunno. Bugzappers options are all in the sandbox settings so..)

queen oasis
#

I'm not fixing my og/original typo. idc

#

add a 100ms lag to the new print so it's really obnoxious

willow tulip
#

with random spawn location

queen oasis
#

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

willow tulip
#

"Have you ever wished prints where even more obnoxious?"
"No?"
"ignores reply Well then, we have the mod for you!"

queen oasis
#

player:Say()

rigid forge
#

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

willow tulip
#

@fathom kestrel If your phxntom1213 from steam, if you could just DM me the translation files instead that'd be great 🙂

bright fog
bright fog
#

0.0 == 0

#

And 0.01 instead will just be a different default value

bronze yoke
#

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

bright fog
#

That too

rigid forge
bright fog
#

Or if it properly updates

rigid forge
bronze yoke
#

you may have to send the correct value from the client

bright fog
#

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

rigid forge
#

Oh okay that's a weird hacky way to do this but if it works
I will check it tomorrow, thanks!

frank elbow
knotty stone
#

@willow tulip are you planning to add fixing recipes for the parts in summer car?

noble summit
#

where can i find the values for hotbar/belt/holster slot weight reduction? i looked through txt and lua files but couldnt find anything

knotty stone
#

thats not somethin you can change, item:getEquippedWeight() is all you have

mellow frigate
#
   public float getEquippedWeight() {
      return (this.getActualWeight() + this.getContentsWeight()) * 0.3F;
   }

   public float getUnequippedWeight() {
      return this.getActualWeight() + this.getContentsWeight();
   }
knotty stone
#

🧐 the pro has spoken 👍

willow tulip
knotty stone
#

so many buttons, did that rly hiding there xD

#

found it 😄

knotty stone
#

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 🤪

willow tulip
stiff fiber
#

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?

bright fog
bronze yoke
#

now that i look closer at it, the entire thing is kinda fucked 😅

bronze yoke
#

remember that the functions and events are named after the sender, not the recipient -- the diagram shows most things the wrong way around

bright fog
bright fog
bright fog
#

Server receives onServerCommand

#

Is that what you mean ?

bronze yoke
bright fog
#

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

bronze yoke
#

it's one of the easiest things to trip up on

bright fog
#

Definitely haha

frank elbow
#

I mark “server -> client” or “client -> server” in code comments related to commands because it's so easy to mix them up

willow tulip
# bright fog

Oh thank god, the first one made me think I had a stroke.

willow tulip
frank elbow
willow tulip
#

ah, yea.

rigid forge
bright fog
#

Eh I doubt that'll happen but sure

#

Doesn't cost anything

fathom mauve
#

Hello! Does anyone know if including a .bat file breaks any TOS's for the PZ workshop?

bronze yoke
#

as long as it's not malware it's not against tos, and there isn't really anything that checks what you upload

fathom mauve
#

oh that's good to know, executables seemed like they could've been problematic so was covering my bases. maidheadnod

bronze yoke
#

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 😅)

fathom mauve
#

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.

silent zealot
#

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.

bronze stone
#

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?

bronze stone
#

Thank you.

bronze stone
#

I guess I missed that you had to download the "Tiles" folder

#

seems simple enough with the options that it gives you...

livid haven
# bronze yoke check the pins in <#279303619277488128>

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.

bright fog
#

I don't remember the exact name but check out the item scripts wiki page and the parameter names

silent zealot
#

AcceptItemFunction

#

There are some examples in media/lua/server/Items/AcceptItemFunction.lua

livid haven
drifting loom
#

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?

wise needle
#

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.

mellow frigate
wise needle
#

@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*

thin swan
# wise needle <@414575359468765216> thanks for the heads up, but i was hoping to find a way do...

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

bright fog
#

@sour island has experience drawing on maps

wise needle
#

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.

thin swan
# wise needle oh!! <@156534691283992587> thank you a ton. So it **is** all under AnimSets t...

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

wise needle
#

going to try it immediately

#

@thin swan where should I put ConditionPriority, anywhere within AnimNode or outside above/below it?

thin swan
wise needle
#

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

wise needle
#

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.

thin swan
# wise needle i'mma have to try the over-write method as it's not working

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

wise needle
#

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.

thin swan
#

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

wise needle
#

that is perfect

thin swan
wise needle
#

but yeah the goal is : every hour the speed of the player increases. with the end goal of "until the game breaks"

thin swan
#

Sounds fun!

wise needle
#

so it'll automatically know it's refering to global?

thin swan
#

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

thin swan
wise needle
#

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?

thin swan
#

Hopefully one day TIS will expose the AdvancedAnimator to Lua and make it moddable, I would weep with joy

wise needle
#

So i am curious about something

#

when I look into the run

#

it's set to a variable

#

but where doth it come from 🤔

bright fog
#

So you can control the speed of the animation with Lua

wise needle
#

What's the lua for printing to the console?

bronze yoke
#

print("message")

bright fog
willow tulip
bright fog
#

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

willow tulip
#

Ah.

thin swan
bright fog
# thin swan Wait really? I use : all the time in prints and don't think I've ever had an iss...
bright fog
#

Pretty sure the space does nothing

willow tulip
#

Do note, It shows up in console correctrly

bright fog
#

It doesn't

willow tulip
#

but echos to the log (and shows the log in the console) incorrectly.

bright fog
#

😅

willow tulip
# bright fog It doesn't

It echos correctly on the 'print' itself to console, it doesn't echo correctly on the LOG LUA 35423623623263 echo

thin swan
#

Huh, interesting. I guess maybe I haven't printed something with two : in the same print maybe

willow tulip
#

(yes, prints show up TWICE in console with default settings.. because.. reasons)

bright fog
#

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

bright fog
#

The first one will nuke things in front

thin swan
#

Ooooh, then it's simply because I always put it at the end of the print

willow tulip
thin swan
#

Wait in front

willow tulip
#

(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)

thin swan
#

Or after?

willow tulip
#

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)

thin swan
#

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?

willow tulip
#

You?

bright fog
#

Problem is for both Linux and Windows 10

bright fog
thin swan
#

I'm on windows as well

#

Hmm

bright fog
#

print(first_part, second_part)

#

You do that

#

This could be the reason

willow tulip
thin swan
#

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 :

willow tulip
#

and its trying to interpet : as something to format

bright fog
#

I seriously hope they will fix this

willow tulip
#

ie, whatever they are using to parse the time/etc

bright fog
#

Bcs this is literally a new issue

willow tulip
bright fog
#

And literally told us to go fuck ourselves

#

💀

willow tulip
#

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.

bright fog
#

Definitely wasn't there in the early B42 versions

willow tulip
#

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

bright fog
#

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

willow tulip
bright fog
#

Like textures suffer from that

bright fog
willow tulip
#

Yes.

#

of course it does.

bright fog
#

Did you notice vanilla prints being broken ?

willow tulip
#

no, my own.

#

print("Cannot add label: "..tostring(_labelID)); Heres one here lol

#

statisticchart.lua

bright fog
#

I assume it breaks too ?

willow tulip
#

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.

bronze yoke
#

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

willow tulip
#

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)

bronze yoke
#

i doubt it, i've always used a separate cache for b42 and i experienced the issue from the start

willow tulip
#

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

willow tulip
bright fog
#

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

willow tulip
#

yea but when you do that, you get the log prints

bright fog
#

Wdym ?

willow tulip
#

I swear, when I first started modding I got the nice clean initial prints and only the initial prints.

bronze yoke
#

it's a build 41 issue for sure, i and many others here have experienced it for years

willow tulip
#

clean print = GlobalModData.init() start

#

(your console gets both unless LUA logging is set to disabled)

bright fog
#

What console ?

#

You need to be clear, I just told you above

willow tulip
#

Ingame console in debug mode

bright fog
#

If you disable Lua logging it doesn't print at all ?

willow tulip
#

Of course console.txt never gets clean prints -_-;

willow tulip
wise needle
#

@bright fog @bronze yoke thanks for the tip

bright fog
#

np

tropic tide
#

making a load screen vector art from the poster to mess around and learn

noble summit
#

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

tranquil kindle
noble summit
#

yeah, was looking for B42 info
thanks

cursive veldt
#

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?

bright fog
willow tulip
#

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)

frank elbow
#

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 😤

north rain
noble summit
#

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
bronze yoke
#

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

brittle dock
willow tulip
#

I really love the new pinned post feature btw.

brittle dock
#

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 🙏

willow tulip
brittle dock
#

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.

willow tulip
brittle dock
#

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.

willow tulip
#

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)

bronze yoke
#

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?

willow tulip
#

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.

brittle dock
willow tulip
#

(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)

brittle dock
#

Worth looking into to prevent duplicate posts & communicate the basics at a glance — I’ll see what we can do 👌

willow tulip
#

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'

noble summit
#

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

bronze yoke
#

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

willow tulip
#

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)

bronze yoke
#

who's adding half a broccoli to their soup anyway

willow tulip
#

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.

bronze yoke
#

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

bright fog
# brittle dock I asked an innocuous question — apologies if it was interpreted as “your concern...

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

willow tulip
#

I have code fixes for both those issues btw.

bright fog
#

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

willow tulip
#

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

bright fog
#

To have a precise selection entry box for this kind of selector

willow tulip
#
bright fog
willow tulip
#

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.

willow tulip
#

basically just bring it to parity with sandbox options

silent zealot
#

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.

jaunty star
#

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

drifting ore
#

Why do you keep posting your questions in both the mod support and development channels?

burnt quartz
#

How do I make an door temporarily invulnerable to zombie damage in Build 42?

#

is it possible?

bright fog
#

Yea

#

Set its health to an insanely high value then set it back to the default value after X time

burnt quartz
#

thanks

jaunty star
#

B42 porting broke a lot of mods im trying to fix it myself

bright fog
#

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

willow tulip
#

B42 updates break B42 mods.

#

Anything last updated before B42.12 likely has script issues, especially if it has repair scripts.

bronze yoke
#

it's a b41 issue is the thing 😅

sour wave
#

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",
}```
drifting ore
#
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",```
sour wave
#

thanks

#

Is indentation explicitly needed for options?

bright fog
bright fog
sour wave
#
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?
sour wave
#

I read the entire wiki entry regarding it

bright fog
#

I guess the page might appreciate a bit of love, it's one of the earliest iteration of wiki page I made

sour wave
#

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

bright fog
#

You can't do that natively

sour wave
#

Oh, so its all or nothing

bright fog
#

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

sour wave
#

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

bright fog
#

You can also format the text in the tooltip by using rich text panel tags

bronze yoke
bright fog
#

Rip

bronze yoke
#

they have not changed anything about mod sandbox options whatsoever

bright fog
#

It'd probably have to modded in then

sour wave
#

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?

bright fog
#

Show your translation entry

sour wave
#

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",```
bright fog
#

Show your sandbox option entry

sour wave
#

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,
}```
willow tulip
#

I was kinda sad how much better its options menu was then we get with mod options -_-;

bright fog
#

I did something similar to add custom buttons to do specific stuff

#

Unreleased mod tho

bright fog
sour wave
#

yep

bright fog
#

Then it's wrong

willow tulip
sour wave
#

Sounds about as I expected

bright fog
sour wave
#

oh, wait, I see

bright fog
#

@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

sour wave
#

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

bright fog
#

np the channel is here for that

willow tulip
bright fog
#

Yea

willow tulip
#

so if I accidently put an empty line and THEN ContextMenu_EN = {, kaboom?

bright fog
#

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

willow tulip
#

ah

bronze yoke
#

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?

bright fog
#

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

rich dagger
#

(outdated tho my newest update makes the stripe looks better)

bright fog
#

The runner screenshot ? These were made without any mods activated but my mod

pearl prism
#

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.

bright fog
rich dagger
#

Post Soviet Clothes

#

im not upset or anything like that whatsoever just thought it was mine and that made me happy

bright fog
#

I guess the vanilla game has an exact one 😅

mellow frigate
#

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

pearl prism
lethal steppe
#

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?

mellow frigate
#

PZ throwing is not relyable (for impact position)

sour wave
#

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

lethal steppe
# mellow frigate PZ throwing is not relyable (for impact position)

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

mellow frigate
lethal steppe
#

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

upbeat turtle
sour wave
#

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

mellow frigate
upbeat turtle
sour wave
#

its currently in \mods\DaemonsArchery\42\media\lua\shared\client

upbeat turtle
lethal steppe
# mellow frigate I'd say go for it :). if you are using B42, any vanilla item with the following ...

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?

sour wave
#

I wonder if I've screwed up the var names somewhere

lethal steppe
sour wave
upbeat turtle
# sour wave I wonder if I've screwed up the var names somewhere

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

sour wave
# upbeat turtle hmm… yeah so it looks like this rules out pathing being the issue. looking at yo...

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.

upbeat turtle
#

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 😆

upbeat turtle
sour wave
#

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

upbeat turtle
#

that’s absolutely understandable xd

sour wave
#

wait a min...

upbeat turtle
#

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

sour wave
#

I had inventory.blahblahblah instead of inv lets see

#

I fixed it

#

Am dumb

upbeat turtle
#

oh xd

#

that could’ve been it

sour wave
#

Definitely was

upbeat turtle
#

hell ye

sour wave
#

Knew it was something stupid I did. Usually is, especially with LUA

upbeat turtle
#

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

mellow frigate
# lethal steppe thanks! yea so i got that far at least, that i can use a thrown bomb as a templa...

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.

upbeat turtle
#

once you start getting it down though, it seems to become less and less annoying with time xd

sour wave
#

Its always a syntax thing

upbeat turtle
#

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

upbeat turtle
#

having prev experience is a legitimate game changer

sour wave
#

only thing that ever really changes is the functions from game to game

#

Syntax is generally the same

upbeat turtle
#

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💯

sour wave
#

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

lethal steppe
mellow frigate
#

UseSelf = true, => UseSelf = false, (sorry it will not be destroyed but it will be thrown)

sour wave
#

now just gotta make my own crossbow model/textures(instead of using someone elses), recipes, and should be it outside balancing damage and whatnot

upbeat turtle
#

awesome! 😄

#

i was about to suggest the same thing xd

sour wave
#

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

upbeat turtle
#

tldr you need to define the mesh, texture, and scale in a models.txt script

upbeat turtle
#

tbh, i’ve been considering expanding on the stealth system some more too

sour wave
#

I wanna RP as daryl dixon from TWD damnit

sour wave
upbeat turtle
#

throwable bottles are the pipeline 💯
i wanna distract zeds like in tlou 😆

upbeat turtle
#

i made a twd-inspired stealth mod a few weeks ago. still early development, but created the system to be fairly dynamic

lethal steppe
# mellow frigate UseSelf = true, => UseSelf = false, (sorry it will not be destroyed but it will ...

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

willow tulip
#

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.

sour wave
#

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

bright fog
#

You can definitely add text but it depends how much control you want on the text format

#

You can use addLineChatElement

sour wave
#

dont care a super ammount about control tbh

#

kinda just doing it to debug

#

might use it later on for damage numbers or something

willow tulip
#

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)

sour wave
#

I got it to work, was erroring because I had some syntax wrong

willow tulip
#

ie 0~1920, 0~1080)

#

nice.

bright fog
bright fog
willow tulip
bright fog
#

But you can show nametags yes, that's something I often use to write text at a specific point on the map

wise needle
thin swan
sour wave
#

I don't really do model work at all either, but something low poly I can manage

sour wave
wise needle
#

Bows and Arrows have been missing for a pretty long while.
Used to be a fancy crossbow and arrow mod way back.

thin swan
sour wave
#

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

thin swan
#

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

wise needle
#

Would be best to go with a Hip-Quiver and not a back-quiver as well.
Then again a partially zipped backpack could work 🤔

sour wave
sour wave
#

but that'd require multiple anims, soooo eh

thin swan
sour wave
#

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)

wise needle
mellow frigate
sour wave
#

So that makes 3 anims in itself.

tranquil kindle
tranquil kindle
#

But its also quite old and my understanding of XML files wasn't that great...

thin swan
sour wave
#

Placeholder models will be the same general size/shape as what I end up with, yeah

sour wave
thin swan
sour wave
#

textures as well, or just model will suffice?

thin swan
#

Just the models is fine

sour wave
#

alrighty, incoming dm

sour wave
#

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

sour wave
#

Thats it yep

#

Am dumb

sour wave
bright fog
#

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

sour wave
#

Maybe if I figure it out, I'll see about making a wiki edit or something

bright fog
#

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

bronze yoke
#

there's a script type for skills

sour wave
#

For sure, it's been quite a long time since I've done anything wiki related lol

bright fog
#

Wait it's a script ?

bronze yoke
#

actually granting xp and applying effects from it will entirely be lua though

bright fog
#

I didn't even knew that

sour wave
#

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

bronze yoke
#

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

bright fog
#

Interesting

#

I will add this on the main script page as a future page to implement

sour wave
bronze yoke
#

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 😅

sour wave
#

I.... mmk lol

sour wave
bright fog
#

Hell yea

sour island
#

Yeah perk categories are parents

#

Really leans into some sort of tangential skill system allowing for transferable skills

small osprey
#

Is it cough cough easy to expand the perk system with custom categories and, what, sub-perks?

bronze yoke
#

custom categories are easy, sub-perks aren't really supported even if the structure would imply they are

sour island
#

I think it would help the game alot though lol

bronze yoke
#

well it is their explicit plan for b42

sour island
#

Like get enough idk carpentry and you raise the craft skill and now your other craft skills are easier to raise - etc

bronze yoke
#

i think it's one of those things that got held back because of crafting

sour island
#

The mod that lets people "teach" others is cool too

bronze yoke
#

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

shy mantle
sour wave
#

How do translation for perk?

#

@bronze yokesince you game me the tidbit about how to make it, where/how do I do translation?

drifting ore
# sour wave

It's probably an IG_UI translation but you could look at another mod

drifting ore
#

Make your IG_UI file, with IGUI_perks_Archery

buoyant violet
willow tulip
#

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.

buoyant violet
#

dammit cat step on the keyboard mid messagee lol

#

lol love you @willow tulip . always pushing my insanity forward hahaha

regal zealot
#

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?

delicate solar
wise needle
regal zealot
#

furry anthro works on b42

#

almost the same way tbh

wise needle
#

Wait

#

It got a .42 release??

#

I thought it wasn't worked on anymore.

regal zealot
#

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?

wise needle
#

Fair and thanke

sour wave
thin swan
#

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

sour wave
#

I don't have a VPN cause am poor broke bitch

buoyant violet
delicate solar
#

(YES!)

drifting ore
#

Yeah pretty much everything I’ve tried to look at this morning hasn’t let me lol

sour wave
#

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

thin swan
topaz tangle
regal zealot
#

i made a proper sort and its working fine

topaz tangle
#

I really hope the more anthro survivors mod gets updated to 42 soon, I need my proto boy back!!!!

regal zealot
#

ignore the blood, im on mid-gameplay rn

topaz tangle
sonic needle
#

nice