#mod_development

1 messages · Page 146 of 1

frosty estuary
#

Yeah, I'm using the outfit name.

#

Already using it to avoid critical damage and one hit kill to him... just need to increase health now

rancid panther
#

woah so one could hypothetically make a mod that lets you see your old zombie on the map

tardy wren
#

Zambies has special zombie variants, maybe you can find some inspiration there

rancid panther
#

would be cool to let your former self roam free and see where it goes on the map

bronze yoke
#

it still unloads, it just keeps moddata

sour island
#

Yeah, stuff that's not close to a player will unload

#

And I don't think you can spoof the game to keep multiple chunks loaded

#

For good reason

#

Although that'd be a fun experiment for a mod

empty flame
#

Is anybody here working on like an updated bicycle mod

uncut umbra
#

Does the game really load lua scripts alphabetically? I'm trying to override some DoParams that another mod does in one of its shared lua scripts with a custom mod, and if I name the lua script something higher alphabetically, it doesn't work, but if I name it something lower alphabetically, it works fine...

#

Completely unaffected by mod loading order

frank elbow
#

It does

uncut umbra
#

Is there a better practice for trying to do what I'm doing, then? I can't just rip the mod, change it, and reupload it to the workshop for the sake of adding some compatibility with another mod

frank lintel
#

More than alphabetic...

#

At work or I'd type them all out

frank elbow
uncut umbra
#

The mod in question changes the MountOn param for some weapons' attachments, and I'm trying to expand it to include those weapons + some additional ones from another mod

frank elbow
#

So if it runs after your code, it's problematic? It sounds like you'd just need to do the same thing for the additional ones

uncut umbra
#

Well when it runs after my code, it completely overwrites the MountOn param

#

so if for example it were doing DoParam:("MountOn = Pistol; Pistol2") and I were doing DoParam:("MountOn = Pistol; Pistol2; Pistol3"), just as an example

frank elbow
#

Gotcha. In that case yeah, a require should do it

uncut umbra
#

Awesome, thank you

#

was here thinking I could just get away with loading it further down the list

frank elbow
#

I think a common method for patches is prepending the tilde character, ~, since that sorts after the letters. I'd prefer a require, but then again if the original mod changes the filename it could cause the patch to not work

#

So perhaps doing that as well would be wise

uncut umbra
#

makes sense

fast galleon
#

ideas how to prevent errors and remove event safely? I thought coroutines were already using protected calls.
*I'll add dead status check.

#

@jaunty marten

#

@rancid panther

frank elbow
#

Has anyone made a bug report for that? It would be a trivial fix but I don't think we can really do anything about it since the Event class isn't exposed (but I'd be happy to be proven wrong)

fast galleon
#

no, it removes fine when no errors are in the coroutine

frank elbow
#

You can use pcall to capture errors

#

I see what you mean now, but I still think that bug ought to be reported

rancid panther
#

yea sorry i wish i knew

fast galleon
#

This is from https://www.lua.org/pil/9.1.html, so I thought it would be fine.

Note that resume runs in protected mode. Therefore, if there is any error inside a coroutine, Lua will not show the error message, but instead will return it to the resume call. 
frank elbow
#

It should be, but this is Kahlua so that may be inaccurate

red tiger
#

Been too tired and unmotivated to work on the vscode extension..

#

Still a lot of work ahead.

jaunty marten
#

say me at least one reason to use hash tables Pepe_cry

frank elbow
#

I don't think there's anything inherently wrong with the way it's set up, but I find it odd that the remove bug would stick around so long

#

The UIManager has similar add/remove (i.e. addToUIManager, removeFromUIManager on ISUIElements) but handles them in the way you'd expect, by not removing them until after iteration is done

jaunty marten
#

what cannot be said about events

frank elbow
#

I just happened to see it while looking at other stuff in there

drifting ore
#

Has the mod that allows you to create missions been released yet?

cunning haven
#

Is there a line of code i can use in .lua to check if the character is encumbred?
Just like you can use "getScratchedTime()" for how long a scratch will last for

frank elbow
frank elbow
cunning haven
#

Damn, thank you very much

#

Do you happen to know something about walking animations?

frank elbow
#

That's a very vague question, so... yes, in that I know that they exist

cunning haven
#

Im making a mod with a custom walking animation, but for some reason the animation will always be extremely slow no matter how many frames i use, which is very weird

frank elbow
#

I haven't messed around with animations too much yet, so couldn't tell ya

cunning haven
#

No problem, thank you very much

#

This already helps a lot, i was checking for the encumbrance thing under the inventory section and couldnt find a value for it, only "getWeight"

frank lintel
#

if you need the load order lemme know Im home now.

cunning haven
#

Are you talkin to me by chance?

frank lintel
#

whomever I was at work so dunno who it was.

cunning haven
#

Ah them probably not me, just got here

#

then*

frank lintel
#

but thats the order of loading, shared, client, server as above.

cunning haven
frank elbow
#

The code within the if statement? Yeah (I phrase this as a question because if is missing there)

cunning haven
#

Yes, i havent sent the code here cause it looks like this

#

Ah

#

i cant send, over 2000 characters

frank elbow
#

Oh my

#

Do you mind if I offer some code review

cunning haven
#

Not at all

#

Im really bad at this, codding is not my deal

frank elbow
#

That's okay, everyone's learning at some point

cunning haven
#

The entire get[NegativePenalty] section for the legs is so the animations wont play if you have your legs injured, cause right now, since i cant get my animation to play faster naturally, i have to alter its speed in the XML file, which alters every Limp animation speed along with it, making it look goofy

frank elbow
#

An if statement of that size is a hint that something can be improved—in my opinion it should very rarely if ever span multiple lines

#

Since you're doing the same checks for every body part (that you're concerned with), it's a good candidate for a loop

cunning haven
#

How do i use that?

frank elbow
#

I think if you can figure a way to do this without running this on player update it'd be ideal

cunning haven
#

Im not sure, because the way it was supposed to work, originally without all the workarounds, was that if your health goes below 80 the animations would take place

frank elbow
#

Gotcha

cunning haven
#

Essentially the vital part would be this ↓

if player:getBodyDamage():getHealth() < 80 then

frank elbow
#

Another bit of advice is that you don't need to explicitly check for true and false in if statement conditions, in most cases. Just x or not x would suffice

cunning haven
#

The rest is a workaround for not figuring the animations

cunning haven
frank elbow
#

x stands for some expression, such as player:getVariableBoolean('IDD')

#

Also, indentation. The code doesn't care, but being consistent with your indentation is a good practice that will make your code more readable (I hope my sending these in bits and pieces isn't too suspenseful, I keep getting distracted)

cunning haven
#

Its just that i dont really understand how i would apply these things

frank elbow
#

What's confusing?

cunning haven
#

I suck at codding, like the

for var=exp1,exp2,exp3 do
something

i assume i would do var=FootL,FootR,[...] Right?

#

Sorry. → for var=FootL,FootR,[...]

#

but the "do something" part is what i dont get

frank elbow
#

I would create a table with the body parts and loop over that. See the second link I sent

#

To be clear, though, exp1, exp2, and exp3 in that example are numbers, like in the other examples on that page

cunning haven
#

Yeah i think i would have to study codding from the start, i never really learned anything about it, im dragging myself throught trial and error here

frank elbow
#

Learning by doing is fine (you still should learn by learning eventually though 😄 ) 🤠 Just some things to think about

cunning haven
#

Codding seems really interesting and fun, what bugs me is how these things het implemented in practice, like the "getVariable" from PZ that took me a long time to undestand that this was a thing of the game, not the language necessarily, i even thought before that the game was codded in .lua, which is stupid i know

frosty estuary
#

So, I was able to set the zombie health. But now he's disappearing even if I don't hit him

#

Anyone knows why this is happening? I'm increasing a zombie (with custom outfit) health on onZombieUpdate, it works but after a few seconds it dissappears. If I don't change the health, works fine

bronze yoke
#

i think chuck had that issue before? he probably knows something about it

frosty estuary
#

@sour island

#

Know anything about ? Thanks.

rancid panther
bronze yoke
#

it's not all body parts

craggy hearth
#

does anyone know how i can mod tv's to create custom channels or if there is already a mod for that? I would like to create a little cinematic short and in the intro i want a broadcast playing with custom audio and text from a tv.

rancid panther
#

oh i see

cunning haven
fading horizon
#

is there a way to make the play do the stomp animation?

young granite
#

what is the best way to create an explosion effect? (or just creating animated particles, effects)

red tiger
visual island
#

hi~ i want to make a mod. it adds an option to the context menu when you right click the backpack icon on the right of the inventory page.

#

I could realize this by modifying the vanilla 'ISInventoryPage.lua'

#

But how to do this without editing vanilla lua scripts or functions?

#

it seems that the related function 'ISInventoryPage:onBackpackRightMouseDown' is binded to the button, not triggered by events🤔

ancient grail
#

Event hook
Fillinventory

#

Not actual syntax

fading horizon
#

someone thought my mod was legit advertising from elfbar

#

😭

olive condor
#

is it possible to declare a fixing recipe using more than two items?

tardy wren
#

Oh wait, for two items, no

ancient grail
#

Anyone here knows how to do googlesheet formula and what not

#

Looking to hire someone for a job

young granite
#

How can i create a sprite on a tile

fast galleon
young granite
cosmic condor
fading horizon
#

doubt it

cosmic condor
#

I have to rethink about publishing local beer mod because it's illegal here

#

won't risk it

rancid panther
fading horizon
#

ive used it for spreadsheet functions before

cosmic condor
#

I heard chatgpt is good at that too

rancid panther
fast galleon
cosmic condor
rancid panther
#

it's more fun (imo) to create fun parody logos than to put the original one in for a game

ancient grail
cosmic condor
#

not sure if it's still count as alcohol promotion

ancient grail
#

second explosion

fading horizon
rancid panther
#

what u trying to do in spreadsheet?

fading horizon
#

say literally its not alcohol

#

but it gets you drunk

#

how?

#

who cares

#

but that would avoid it

#

lol

rancid panther
#

actually u said u plan on hiring so maybe it is a lot-lot

#

my to-do list for my mod:
-make lights flicker
-make light sources weaker
-balance sounds better
-remove scuff

those stuff related to the atmosphere might be better as a separate upload

young granite
rancid panther
#

i still need to learn how to turn a square into a sound emitter so i can use isPlaying() boolean check

#

are emitters specifically used for sounds that other players and zombies can hear? or they can be client-sided as well?

fast galleon
#

Emitters are mostly for playing the sounds, it involves fmod and I'm not sure on all details.

Then a separate function adds "sound" for zombie attraction.

fading horizon
#

someone made an interesting note on my mod that if the item is used from a bag rather than the inventory on its last use, it wont replace the item in the bag

#
if newDelta == 0 then 
        character:getInventory():Remove(item);     
#

this is how i was replacing the item so I see the problem

#

how can I instead check the players items + items in bags?

rancid panther
#

ah

#

i remember seeing a way but i am not on pc

#

i think it is something simple enough that u can just look at the vanilla function for that

rancid panther
frank elbow
#

It might be getContainer, not at my computer atm

fading horizon
#

turns out i didn't have to

#

i was using drainables completely wrong

#

i was taking the useDelta down to 0

#

but replaceOnDeplete wasn't working

#

so I was manually replacing the item

#

turns out if I just called self.item:Use(), it registers the custom timed action as a use and will let replaceOnDeplete function

little kraken
#

1

sour island
#

2

little kraken
#
item Glue (module Base)
    {
        DisplayCategory = Material,
        Weight    =    0.1,
        Type    =    Drainable,
        UseDelta    =    0.2,
        UseWhileEquipped    =    FALSE,
        DisplayName    =    Glue,
        Icon    =    Glue,
        Tooltip = Tooltip_FixItems,
        SurvivalGear = TRUE,
        WorldStaticModel = Glue,
        Tags = Glue,
    }

item 5pkGlue (module Packing)
    {
        Weight            = 0.35,
        Type            = Normal,
        DisplayName        = 5 x Glue,
        Icon            = PGlue,
    }

recipe Pack 5 Glue (module Packing)
    {
        Glue=25,
        
        Result:5pkGlue,
        Time:50.0,
        Category:Storage,
    }

And here's my pseudo code

local weight = Base.Glue.getActualWeight();
local delta = Base.Glue.getUseDelta();

Packing.5pkGlue.setActualWeight(weight * 5 * 0.7);
Packing.Pack 5 Glue.Glue.setUseDelta(1/delta * 5);

What I want to do for is mod's compatibility. If other modes override weight and usedelta of glue, I want my mode still to work perfectly. Sorry for asking without knowing lua language but I'm desperate for this. Is it possible to code like that? (Changing weight of 5pkGlue and requirement of recipe)

faint jewel
#

anyone know how to select the overlays of a certain square by name?

ancient grail
# faint jewel anyone know how to select the overlays of a certain square by name?
function getTopSprite() 
    local objs = getPlayer():getSquare():getObjects()
    local sprite = objs:get(objs:size()-1):getTextureName()
    local target =  nil
    if luautils.stringStarts(sprite, "blends_streetoverlays") then
        target = objs:get(objs:size()-1)
    end
    return target or nil
end

if getTopSprite() then
    print(getTopSprite():getTextureName())
    getPlayer():Say(tostring(getTopSprite():getTextureName())) 
end
faint jewel
#

the errors if you go over a gas can lol

tardy wren
#

Then you must iterate over its source to change how much glue it takes

#
recipe:getSource():get(0):setCount(amount)
#

Well, you can find it by just indexing it

formal arrow
#

how do i fix the missing mod.info file when it's literally right there

tardy wren
formal arrow
#

idk what that means this is my first time modding

#

i followed this guide

#

i followed the structure but when i put my mod outside the mod folder i just get "There are unrecognized folders in your Contents/ folder."

#

ok nvm

#

idk what happened but it works now

frank lintel
#

yes .info is the entension

#

just like a .jar file is nothing but technically a zip file. rename it poof no more java running open with windows....

frosty estuary
# sour island 2

Hey man... maybe you can help me again? I did the setHealth to increase the zombie health, but now it disappear after a few seconds... any clue why this happens ?

nimble spoke
frosty estuary
#

On server

#

But already notice that if I spawn the zombie too close to me the event onZombieUpdate run on client side... so I think I should put it on shared

#

But its the increased health that is making him dissapear

nimble spoke
#

This is an MP issue so I do think it is caused by the system detecting a desync in zombie health

frosty estuary
#

anything I can do to make it work ?

faint jewel
#

this is going to drive me INSANE.

#

it is only getting the BASE TILE in a square rather than the overlays which is what i need to remove.

nimble spoke
fast galleon
#

@faint jewel
I think it should be getAttachedAnimSprite, if aas then iterate through them and check the sprite name (textureName)

faint jewel
#

still no :/

frank lintel
#

you talking overall health of all of them?

faint jewel
#
        --Road Repair
        for i=1,sqSize do
            local obj = sqObjs:get(i-1);
            print(obj:getTextureName()) -- this never prints anything but the BASE tile name.
            if luautils.stringStarts(obj:getTextureName(), "blends_streetoverlays") then
                if isClient() then
                    sledgeDestroy(obj)
                else
                    obj:getSquare():transmitRemoveItemFromSquare(obj)
                end
                break
            end
        end
#

i need it to find the crack in the blue circle. but instead i only get the ROAD tiles.

frank lintel
#

sure its a crack not a physical shadow on the model?

faint jewel
#

i promise they are.

#

they are the cracks you see in the road.

#

they are all on one sheet.

frank lintel
#

well if you need the list of files in all the packs shout. I extracted them all

frosty estuary
faint jewel
#

i know the sheet i need.

#

blends_streetoverlays_01

#

but it does not DETECT them. it only detects blends_street_01

frank lintel
#

ah.. following now

#

event trigger you can hook into?

#

as for the zombie health thing I was thinking anti-cheat but MP wise I got no clue if they even deployed anything like that.

#

that or its hard coded?

#

I had my own body become immortal one time after I died I couldnt kill my own self for nothing till I used a car.

#

guns melee didnt matter

drifting ore
#

how do i make a occupation mod?

gaunt meteor
drifting ore
#

idk how to use anything

drifting ore
#

ik thats a thing i use for mods

#

idk how to make one

gaunt meteor
drifting ore
#

so where do i start if i want to make a proffesion

gaunt meteor
gaunt meteor
drifting ore
rancid panther
#

copy the profession framework example for a vanilla occupation and adjust the values first. that's the easiest place to start

drifting ore
#

wym vannila occupation

rancid panther
#

the ones in the real game

faint jewel
#

sigh

rancid panther
#

profession framework has examples for them

ancient grail
#

Code*

faint jewel
#

it dopes not work with what i am doing.

drifting ore
#

where do i find

faint jewel
#

that's the problem.

#

it works in YOUR case but not in MINE.

ancient grail
#

I dont get why not
You just need to replace the dekete function for the attach sprite
Or delete parent and respawn

#

Ok so instead of having it go to waste then ill just share it here incase anyone needs a similar function

#
streetcracks = {}
streetcracks.tiles = {}


for i = 0, 23 do
    streetcracks.tiles["d_streetcracks_1_" .. i] = true
end


function isStreetCracks(spr)
    return streetcracks.tiles[spr] or false
end


function getTopCrackSprite() 
    local player = getPlayer()
    local square = player:getSquare():getAdjacentSquare(player:getDir())
    local objs = square:getObjects()
    local sprite = objs:get(objs:size()-1):getTextureName()
    local target =  nil
    if luautils.stringStarts(sprite, "blends_streetoverlays") or isStreetCracks(sprite)  then
        target = objs:get(objs:size()-1)

    end
    return target or nil
end
-- function getTopAttachedCrackSprite() 
    -- local player = getPlayer()
    -- local square = player:getSquare()--:getAdjacentSquare(player:getDir())
    -- local objs = square:getObjects()
    -- local attachedSprites = objs:get(0):getAttachedAnimSprite()
    -- for i = 0, attachedSprites:size()-1 do
        -- local sprite = attachedSprites:get(i)
        -- if sprite and sprite:getName() ~= nil then
            -- if sprite and (luautils.stringStarts(sprite:getSprite(), "blends_streetoverlays") or isStreetCracks(sprite:getSprite()))  then            
                -- target = attachedSprites:get(i):getParentSprite()                
            -- end
        -- end
    -- end
    -- return target or nil
-- end



function destroyTile(obj)
    if isClient() then
        sledgeDestroy(obj)
    else
        obj:getSquare():transmitRemoveItemFromSquare(obj)
    end
end
      
Events.OnPlayerUpdate.Add(function(player) 

    --if not player:isDriving() then return end
    --TODO add moddata to your vehicle and change the if condition above this line with the commented line below
    --if not player:getVehicle():getModData().Skizot then return end
        if getTopCrackSprite() then
            print(getTopCrackSprite():getTextureName())
            player:Say(tostring(getTopCrackSprite():getTextureName())) 
            destroyTile(getTopCrackSprite())    
        end
        
        -- if  getTopAttachedCrackSprite() then
            -- print(getTopAttachedCrackSprite():getTextureName())
            -- player:Say(tostring(getTopAttachedCrackSprite():getTextureName())) 
            -- destroyTile(getTopAttachedCrackSprite())    
        -- end
end)



sour fern
#

been poking around the decompiled java files since I want to get into modding
wow there's a lot of (presumably) left over code from things like old npcs/blacksmithing

faint jewel
#

yes your thing does a thing. congratulations. but it is not the thing I am in need of. I have been trying to tell you i need it to work with MY code. not a whole new code base. as that breaks ALL THE OTHER THINGS I AM DOING.

#

i just need to know what is different in our selections., that is stopping it from selecting the overlays

rancid panther
gaunt meteor
#

anyone have any pointers for me? im trying to find how the game makes the radio chat use random "..." and "<wzzt>" strings during a storm, when using a walkie talkie to talk to your multiplayer friends

#

or which folder, rather

ancient grail
ancient grail
#

Not sure but check it out it might just be what you are looking for

sour fern
gaunt meteor
#

thank you both!

young granite
#

How do i use attachedsprites? i can't understand this thing

sour island
#

It involved moving part of the attack code to clientside and part of it on server

#

If the zombies are vanishing when you go to attack them

frosty estuary
#

I will do some testing later, but he vanish even if I don't attack him. In fact, the attack part of the code its not even active, just de set health. I will check moving into shared asap

nova dome
#

can i print some things from the game api in debug console with some command? straight up lua? sth else?

frank elbow
#

If you print something with print via Lua it will show up in the debug console

#

print('this will show up in the debug console')

nova dome
#

👍 👌 🙏

frank elbow
#

Wish I knew how to link to threads—there's a thread within this channel for mod ideas

fervent bay
#

thanks

tawdry copper
#

there will be any npc mod for multiplayer

#

?

fast galleon
#

npc will be in main game, so can't avoid them

frosty estuary
tawdry copper
red tiger
#

Out of curiosity are there certain categories of ZedScript that are deprecated & not used anymore?

#

Like animation or animationsMesh..

#

runtimeanimation was one I found in the engine.

#

I might be asking questions that are way too technical here..

frosty estuary
#

Anyone else know why this happens on MP and how to solve it? I'm setting a specific zombie health to 50 calling in onZombieUpdate. But after a few seconds the server removes the zombie.

frank lintel
#

if you looking good you can see they kinda already in there just not implemented yet? ie npc's

sour island
#

I do the damage directly in client for EHE @frosty estuary

#

I also set their health there too

#

I would pull out the other stuff and test each feature solo

#

Are the zombies disappearing all the time or just when hit?

frosty estuary
#

I'm not hitting him. I spawn a zombie, it runs the update call, set the health to 50 once, then few seconds later the server revome him. All this inside onZombieUpdate call

#

I'll try ir on client side and test some different approaches to see if work and identify where's the problem

#

The damage part I already do in client, but I'm not hitting him yet, it's the increasing health that makes it disappear.

nimble spoke
#

If you dont find anything useful I may try to take a look tomorrow

ancient grail
#

Hi guys 🙂

harsh yew
#

Hi everyone, I just created my first mod, but im not finding a way to get it into the mods list once I open the game, can anyone give me a helping hand with that ?

the mod is in the username/Zomboid/mods and it has the media folder and the mod.info file inside and inside that media folder I have the lua folder and the sound one.
inside the lua forlder I have the client folder, and inside that one the code itself
and in the source folder the wav files

#

thanks in advance 🙏

ancient grail
#

Whatcha building ? @frosty estuary
If you dont mind me asking

bronze yoke
#

if it's not on the list it probably isn't finding the mod.info or there's an error in it

ancient grail
harsh yew
#

ill try to take a look at that again @bronze yoke

ancient grail
#

Can you share like screenshots of folder structure

bronze yoke
#

the description of it sounds correct (sounds should be in sound not source but that shouldn't stop your mod from showing on the list)

ancient grail
#

Directory
If theres nothing wrong there then perhap theres a mising folder
Or file

bronze yoke
#

only mod.info should really matter for it showing up on the list

ancient grail
#

Fair enough. Can you show your mod info

harsh yew
#

duuuude im so dumb it was the version in the info file

#

thanks both you helped me realize that !!

ancient grail
#

So its now showing?

frosty estuary
ancient grail
#

Albion if you heal zed woudnt that cause them to vanish

#

Idont know why ehenever i played with their hp they just despawn

bronze yoke
#

there's some specific rules on how you need to do it, chuck ran into a similar issue with changing zombie health but doesn't remember the specifics of how he solved it

ancient grail
#

What about the tutorial function

#

Immortalmom or immortalzed something

#

On the mom scenario

#

I tried it it didnt work
Idk why maybe im not using it right

#

Let me oook for it

bronze yoke
#

it was a networking issue i think

nimble spoke
ancient grail
bronze yoke
#

yeah i wouldn't expect anything from the tutorial to work in mp

frosty estuary
#

I'm using mods that increase damage in specific cases and plays with the zombie health but to decrease it. But in this one trying to increase it's making them to disappear

ancient grail
bronze yoke
#

some of it might work but nothing tutorial specific will have been designed to be networked

#

if something from it works in mp it's a happy coincidence

ancient grail
#

Is there a way to capture whatever the player is aiming at? Maybe if that is possible
Then before the actual "hit happen"
Do some stuff to prevent the player from actually shooting

For reals and make it look like he did
By triggering the shoot animation and then muzzle flare reduce the guns ammo etc

bronze yoke
#

if you hook attack

ancient grail
#

But you have to check if the zed you are targeting is the special zed

bronze yoke
#

maybe weaponhitcharacter actually

ancient grail
#

Yeah but that already hits the thing

bronze yoke
#

it hooks all the consequences of the hit

#

so if you don't do anything the target won't really be hit

ancient grail
#

You might not be able to nil the damage param

#

Or even if u do its already too late?

bronze yoke
#

you might not be familiar with hooks

#

when you hook it replaces vanilla java code

#

weaponhitcharacter hooks all the calculations to do with the character being hit

ancient grail
#

I think i am but if you dont think i am then i must not be
Pls educate me..
Ive seen your guide tho

frosty estuary
ancient grail
#

So yeah just hook it then

ancient grail
#

Comment out the damage

ancient grail
#

You could base it on the weapons damage maybe
If the counter reaches a certain number
Then do the damage

bronze yoke
#

pretty much giving them a shield

ancient grail
#

Reset the counter
Then repeat?

frosty estuary
#

Yeah.. I will try different approaches like that if the increase health don't work

ancient grail
#

Im pretty certain the zed will despawn if you do stuff to its health

frosty estuary
#

Mitigate the damage deal and etc... the higher health would be a more simple approach, but it's not working for now

ancient grail
#

Not Unless chucks remembers his solution for doing so

ancient grail
frosty estuary
tiny wolf
#

Hello everybody 🙂
I would know more about modding into Project Zomboid and would create a simple mod :
Only let the administrators from a server to fill graves with zombie and don't let players to do it.
Do you know a mod which change function like my project where I could follow the way to do it ?
Or maybe somebody would be so nice that he gonna help me a little 😮
Thank you to you guys 😉

tiny wolf
frank elbow
# tiny wolf Hello everybody 🙂 I would know more about modding into Project Zomboid and woul...

I don't know of any mods, but the vanilla code for doing that is in ISWorldObjectContextMenu. You could override ISWorldObjectContextMenu.onFillGrave, but that would still show the option to players. I think your best bet would be adding an event listener for OnFillWorldObjectContextMenu, checking for that option, and removing it if they aren't an admin (which you can check with isAdmin())

tiny wolf
kind fossil
#

Hey by the way i'm trying to find the reason behind this error but can't find any more information about it like which file/line...

[04-04-23 20:28:23.062] ERROR: General     , 1680632903062> 0> ExceptionLogger.logException> Exception thrown java.util.UnknownFormatConversionException: Conversion = ' ' at Formatter.parse..
[04-04-23 20:28:23.062] ERROR: General     , 1680632903062> 0> DebugLogStream.printException> Stack trace:.

I can't reproduce the issue when i'm alone on the server, it happens when we are a high quantity (more than 20 players) to play on the server

#

stability is great, but these errors happen when people are joining the server, making their client unresponsive for a minute before being able to join the server

tiny wolf
frank elbow
kind fossil
#

yup

#

thats very infuriating because i can't find where it's coming from

frank elbow
#

A quick search suggests that there's a faulty format string somewhere. Are you using mods?

kind fossil
#

yes we do use mods

#

the thing is that right now i'm connected on the server, and i don't get any error

#

however when we have a high population they all get this error

#

multiple times

frank elbow
#

I think this may be a better candidate for #1019767076094758924, but since you're using mods the answer may be "it's potentially a mod", because it's potentially a mod

kind fossil
#

It's 100% a mod

#

the question is which one, where and why

frank elbow
#

Could always do the tried-and-true removing them in halves. Not ideal for something that relies on a bunch of people

kind fossil
#

exactly

#

i don't understand why there is no specific information for this error

#

usually you have more precisions

harsh yew
#

so im back because its not working 😛

im trying to do the following mod

when press Q shout custom text followed by custom sound

but I want to have n different texts and sounds where text 1 corresponds with sound 1 and text n with sound n

I have the sound playing but I cant find a way to override the default text for the player shout

any ideas ?

frank elbow
#

Override IsoPlayer.Callout by modifying __classmetatables[IsoPlayer.class].__index

harsh yew
#

omar you speak spanish by any chance ? 😛

frank elbow
#
local _IsoPlayer = __classmetatables[IsoPlayer.class].__index
local _Callout = _IsoPlayer.Callout

---Override to enable custom callouts.
---@param playEmote boolean
function _IsoPlayer:Callout(playEmote)
    if getCore():getGameMode() == 'Tutorial' then
        return _Callout(self, playEmote)
    end

    -- your custom shout code here (make sure to handle the case where the player is sneaking)

    if playEmote then
        self:playEmote('shout')
    end
end
frank elbow
#

But that should help

#

Whoops, forgot to include the part I just said lol

harsh yew
#

lol thats fine, I asked because of the name, that actually helps a lot, its my first mod so not really familiar with the code or lua, but I do get what you did there 😛

#

thanks 😄 ill keep working on it 😄

ancient grail
#

oh man i was too slow hes gone

#

Anyone knows of an imagehosting that you can get like a fixed url even if you replace the image

#

It would be useful for workshop descriptions
If you update the image all of your mod posts changes

faint jewel
#

okay so the stu7pid cracks aree attached great

little kraken
sour fern
#

Man I can't wait to max my MAXness perk

#

lol

faint jewel
#
                if attachedSprites ~= nil then
                    for i = 0, attachedSprites:size()-1 do
                        local sprite = attachedSprites:get(i):getParentSprite()```
#

how is this throwing errors.

#

and oof. obj:RemoveAttachedAnims() that removes EVERYTHING but not the one i need to remove.

ancient grail
ancient grail
faint jewel
#

are we able to control the reverse speed of vehicles yet?

weak sierra
#

u can't simply address them directly

little kraken
weak sierra
#

as a rule of thumb, everything you do while modding PZ will take 7 times longer than you think it will

bronze yoke
#

ScriptManager.instance:getItem("Base.Glue")

weak sierra
#

store that in a local, then check if it's nil before doing something to it to avoid error

#

do the same for the other item

#

also to do item manipulation

#

u wanna run that in shared at load time

little kraken
weak sierra
#

yes

#

it has to run before anything else instantiates an instance of it

#

or it won't work

#

so while u can do it in another folder or at runtime it's not wise

#

as it's much more likely to have had an instance made

#

and may work sometimes and not others

#

or with some mods and not others

little kraken
#

that thing

#

I need that after other mods' instantiation

#

I mean if other mod changes glue's weight, I need to get it's weight

faint jewel
#

how the F%%K does the harvester animate it's thresher?

bronze yoke
#

mods probably won't instantiate items before the world actually loads

#

so it should be fine to attach it to that

little kraken
#

@bronze yoke ahhh Thank you

#

@weak sierra Thank you too!

ancient grail
#

local weight = Base.Glue.getActualWeight();
local delta = Base.Glue.getUseDelta();

Packing.5pkGlue.setActualWeight(weight * 5 * 0.7);
Packing.Pack 5 Glue.Glue.setUseDelta(1/delta * 5);

faint jewel
#

this makes NO SENSE.

ancient grail
#

you set the weight?

#

you want to set the weight by a recipe

#

like right click and set the weight

faint jewel
#

there are NO animations for this... yet it animates

ancient grail
#

im willing to help if you want to go vc just say so @little kraken

bronze yoke
faint jewel
#

OOOOOOHHHHHHHHHHHH... i see it now.

#

that is a LOT.

faint jewel
#

they are just replacing the heads over and over.

ancient grail
#

its his

ancient grail
bronze yoke
#

they want the weight of their item to mimick the weight of vanilla glue for mod compatibility

ancient grail
#

then why not just copy the vanilla glue?

#

i think i get it now

#

his making a pack of glue

#

in which when you remove one glue

#

the weight of the pack is reduced

#

easier to just create version s of the item

#

you can also use lua and the weight of the pack detemines how many times you can take a glue

#

assuming a glue is weight 10 (just for example)
and a pack is 50
when you take 1 glue your pack shouldnow only be 40 weight
and when you take a glue from a pack thats 20 then you produce 2 glues and deletes the glue pack

#

i think

#

im not sure tho

rancid panther
#

it would be easier to have a specific size pack of glue recipe like pantry packing or organized storage.
but if you really want a drainable pack, sapph's cooking has stuff like that

cunning haven
#

Can XML hold more than 2 Boolean?

#

By that i mean, do more than 2 checks, in this case i have 2 boolean variables, but one seem to be breaking the other

#

Oh no, it mixes the Bool values right?

cunning haven
#

My problem here is that im creating 2 XML files, i have to insert a Boll variable in each

        <m_Conditions>
            <m_Name>IDD</m_Name>
            <m_Type>BOOL</m_Type>
            <m_BoolValue>false</m_BoolValue>
        </m_Conditions>

The problem is that the BOOL apparently is conflicting with the floor attack that is done by a bool value as well


    <m_Conditions>
        <m_Name>AimFloorAnim</m_Name>
        <m_Type>BOOL</m_Type>
        <m_BoolValue>false</m_BoolValue>
    </m_Conditions>

#

So essentially with one of the files my character can just do a standing attack, for the other he can only do a ground attack, because of the distinction on true - false

#

Any way to circumvent this?

#

In case you're wondering im doing an atk speed mod, for that i need 2 XML files for the 1HDefault, at least i think i do, unless there is a way for me to use the .lua to choose which file the game will use, aside from using BOOL

rancid panther
faint jewel
hot geode
#

Random question, is it possible to make a custom true music addon all off of a mac laptop?

rancid panther
#

it's extremely simple i bet you could even make in in your phone's notes app if you really wanted

#

enjoy your comfy bus and theater seats

cunning haven
#

damn it was not possible before?

little kraken
#

@ancient grail sorry for late response. I published easy packing mod and it allows to pack some stacks of items for less weight and lagging. for example, 5 books to one bundle. What I want to do is that if people changes weight of book, my mod's book package also changes it's weight as intended.

#

Along those same lines, if a user is using soap mod which changes usedelta of soap, I want the requirement of recipe for packing soap to be changed.

rancid panther
#

enabling this patch automatically enables 5 mods. true actions, rv interiors, autotsar bus, and dependencies

little kraken
rancid panther
#

ah

rancid panther
tardy wren
#

Best to do it on OnInitGlobalModData I think... Maybe even later, though not sure what would be an optimal event

#

Also, recommendation: Set your packing recipes to destroy the item when packing. It will avoid the item being "used up"

fading horizon
rancid panther
#

tf r u doing to this poor little guy

fading horizon
#

poor little guy

#

excuse me

rancid panther
#

make it so you can use him to plumb a sink

fading horizon
#

Do you also have a never-ending hatred towards that disgusting rodent who plagued both our eyes and our minds as he presented his unparalleled evil to us in its rawest and most disgusting form?

Don't believe me? Go ask him where he was on November 22nd, 1963...

I've head he even facetimes the orphans back at the orphanage just to rub salt in the wound.

He’s got a smug face and I don’t understand how he tried to get into a relationship with a bird (completely different species) and also the fact that the little family adopted him instead of orphaned children who obviously needed it a lot more than Stuart.

I have terabytes of accumulated hate speech against Stuart Little but I will spare you the details.

#

the description so far

rancid panther
#

lmfao

#

in the original books stuart little was just a mouselike boy

fading horizon
#

i also did some research

#

FAQ
Is this animal abuse? No, actually! Stuart Little is neither man, nor creature, but an abomination and therefore has no human rights. The US Animal Welfare act, introduced in 1966, only regulates the treatment of Guinea pigs & Hamsters, while Stuart Little is a rat. Therefore, he also has no rights as an animal.

#

🙂

ancient grail
#

But you gona smoke em?

fading horizon
#

currently you can slice him, grind him into meatballs, make spaghetti and rat meatballs, roll him into a cigarette, grind him into a spice

#

and if I can ever figure out how to make the player do the stomp animation

#

you will be able to stomp him

#

that's my most wanted feature

#

but i can't figure out the stomp lol

ancient grail
#

What do you mean like force stomp?

fading horizon
#

yes

ancient grail
#

Its an item on the ground right?

fading horizon
#

in inventory

#

but i guess you could have to put it on the ground first

ancient grail
#

Maybe on player update
Then check if player is stomping(not sure if its a thing)

If you can find this on vanilla
Maybe you can just check for controls
But take note you have to use the binded keys to that thing
Which is what you press then add atck to force stomp

So check that if its pressed
Then check if player is attacking

Once you have the stomp checker
Check for the player current square if theres an inventory item which is stuart
You could also check the inventory panel floor if theres a stuart but that might increase the radius making the player be able to stomp stuart even if his a bit out range

#

Then after both checks return true just do whatever to him

#

Hope this help

Im sure i could have explained better
Sorry

primal vapor
#

Hello, I have a question about health system, is there a way to freeze player damage?

rancid panther
#

there's a mod called no healin that doesnt let health regenerate, so probably

fading horizon
#

that's one way of doing it that i hadnt thought of

#

my thought process was more of just a timed action with stomp as the action animation

ancient grail
fading horizon
#

or some way to trigger a stomp from a context menu item

ancient grail
#

That works too

#

Theres a doshove
Not sure if there a dostomp

#

If there none you need to create an xml for that and out it on emote or action

#

I. Which you can then trigger the animation

primal vapor
#

with addHealth I suppose?

rancid panther
#

will stomping stuart little make him disappear and splash blood everywhere?

fading horizon
#

that's the goal

ancient grail
#

The pz animation is structured like

All the animation files are just raw data
The xml are the ones that gives it function

Sorta like models to scripts

fading horizon
#

what other features would you like stuart little to be able to enjoy in this mod?

#

🙂

ancient grail
rancid panther
#

you use him as bait for bird traps

primal vapor
#

Ok, thanks

fading horizon
#

lmfao

#

that would be good

ancient grail
rancid panther
#

dissect him

ancient grail
#

Make some events that you heard squeaking noises so it prevented you from going back to sleep

#

To make the player need to kill em

#

If youre aiming at it when you shoot it does same as stomp

rancid panther
#

what kind of sadistic upbringing did you have to come up with these on the fly

#

are there blenders in the game?

ancient grail
#

Loool

#

You ssk me this then ask about blenders

rancid panther
#

unrelated question

ancient grail
#

Idk maybe its just a skill i have
Or a trait
If only we have player stats ui thing irl

rancid panther
#

while not working on my mod atm, i am once again humbly requesting how to get a sound emitter from a square or building

fading horizon
#

theres also custom rat scream sound effect

#

🙂

rancid panther
#

lmao

ancient grail
#

Maybe its cuz i did alot of branding related projects that requires me to come up with concepts
Its not necessary sadistic themed
I can give humane thoughts too

Like set a trap and release it to the wild
(Or use it to lure zed)

rancid panther
#

after i get emitters down, that is p much it for optimization and de-scuffifying my mod

fading horizon
#

damn theres doshove but no dostomp

rancid panther
#

but then i'll move on to atmospheric stuff like light flickering and light source dimness

fading horizon
#

there is this though

#

but i doubt that will do it

rancid panther
#

i was changing the default sound effects, but i think i might actually just lower my base sound so ambiance is louder in comparison

#

ended up realizing i'd like most ambiance to be louder. main issue is that the most important sound: refrigerator humming, is not ambiance

#

maybe i'll just include the overwrite for fridges in my script

rancid panther
# fading horizon

this sounds like it is used specifically for when a zombie is lying down

fading horizon
#

most likely

ancient grail
#

Thats just to set if a player fan do stomp or not

#

By default that is set to true

#

It should be doStomp
Or something if theres such a thing

And
IsStomping
If theres also such a thing

little kraken
little kraken
#

what IDE do you guys use?

#

I could use autocompletion for convenience

fading horizon
tardy wren
#

For Lua, IntelliJ, there's a guide on the wiki for setting it up

#

IF you need help, hit me up

fast galleon
#

does getNearestBodyworkPart influence what part of vehicle will be hit. Would making protection parts with lower index work.

fast galleon
#

I just wish Albion had a guide with his messages here, so much useful information in them. Using Load on a Loaded script never occurred to me as something that can be used.

Also what happens to people making vehicle mods, is somebody kidnapping them? Because they all seem to vanish for extended periods of time.

sour island
#

@frosty estuary Idk if you fixed it yet but almost all changes to zombies should be client side

#

This is probably something that will change as inventory will be more server-side soon

#

The trick is you have to start the changes server side

#

And send a command to all clients

#

You should only have to set the health once fortunately

frosty estuary
sour island
#

Maybe there's a max health check

#

I set my nemesis spiffos to 1000hp though and I don't think they despawn

sour island
#

Something may have changed tho

#

Last time I checked, yes

#

I wonder how hard it would be to create some sort of test suite 🤔

frosty estuary
#

Can I check how you did it? whats the name of the mod?

sour island
#

It is "super weird helicopter events"

#

You'd need "easy config chucked" and "expanded helicopter events"

fading horizon
#

new update: now you can force sturat little to smoke cigarettes

frosty estuary
sour island
#

Oh then, I probably accidentally unsubbed to the comments

#

And that'd be a new issue 😅

#

Wait where are those comments?

frosty estuary
#

1 sec

#

second page

#

(RW)Rinzik 20/ago./2022 às 18:43
we had the spiffo event happen today, but he spawned and just stood there then disappeared. Now we have seen him in the same spot a few times but once we get close he disappears again. No clue whats happening.

#

third page
[M E O W N Y X] 8/ago./2022 às 23:50
I imagine Spiffo isn't suppose to suddenly "vanish" after a few seconds of viewing him, because that seems to be the problem me and a friend are having. Spiffo dropped recently in our game but every time we approached him he didn't walk towards us and vanished moments after viewing.

sour island
#

Yeah that was fixed -- it's from August -- but I can check again

#

Also I was unsubbed oops

frosty estuary
#

Ah... so maybe it's not the same, there's no report of the same proplem with nemesis

#

You do the setHealth on server side too... I'm doing basicaly the same thing... I you test something here

frank elbow
# fading horizon

Confused and alarmed, but mainly wondering how you're zoomed in that much—is there a zoom mod I don't know about that I desperately need

#

I have all the vanilla options enabled & the closest one still feels rather far

neon bronze
#

Maybe screen resolution?

frank elbow
#

Ya I figure it has to do with having a larger screen, but hoped there's a mod for it rather than having to change that

#

Thank you

ancient grail
#

Haha instead promoting best mod
Ill post my worst mod

#

Its 1/2 mods that i made that isnt commission
And i just did to test and learn
I never bothered looking for good audio and never will
Instead of feeling bad about the negative comments it makes me lol hahaha

#

I mean i wouldnt recommed this mod it is pretty terrible

Just sharing

frosty estuary
#

Maybe the new versions of the game have some kind of check on MP to see if some zombies have some different stats from the default or sandbox config

visual island
#

hi~ i am a new modder. is there any material about the hook system?spiffo

zinc pilot
visual island
sour island
#

Hooks and Events are different in that hooks bypass java, where as events run alongside, before/after java

#

Just a heads up

red tiger
#

Good morning.

faint jewel
#

liar

#

lol

#

good morning

fast galleon
#

Is it possible to use ZedScript extension with Intellij?

red tiger
#

It becomes a function of time, however.

#

I'm worried that this work will become more demanding than someone simply working on personal projects in their free-time. The project is set up in a way that is open to improvements from third-parties.

faint jewel
#
            if luautils.stringStarts(obj:getTextureName(), "blends_street_") then
                local attachedSprites = obj:getAttachedAnimSprite()
                if attachedSprites ~= nil then
                    for a = 0, attachedSprites:size()-1 do
                        local sprite = attachedSprites:get(a):getParentSprite()
                        player:Say(tostring(sprite:getName())) 
                        if sprite and sprite:getName() ~= nil and luautils.stringStarts(sprite:getName(), "overlay_grime_floor_01") then
                            if isClient() then
                                sledgeDestroy(sprite)
                            else
                                obj:RemoveAttachedAnim(a)
                                obj:transmitUpdatedSpriteToClients() 
                            end
                            vehicle:playSound("UseMatch")                        
                        end
                        break
                    end
                end
            end
``` shouldn't that interate through all the attached sprites? and if so why is it not getting the grime there?
red tiger
#

Otherwise you are iterating over the ArrayList<Sprite> properly in Lua.

faint jewel
#

using print for other sutff, this just made it easier.

weak sierra
#

this gets a list of tiles in a context menu with image for deletion, seems similar to what ur making

#

if it goes about things another way may help u figure out why yours doesn't show certain things

faint jewel
red tiger
faint jewel
red tiger
#

Either that or the grime is a part of the map.

faint jewel
#

it's attached just like the other grimes are, but the others are the ONLY grime.

#

these ones have a street line before hte grime and that breaks it.

faint jewel
#

RemoveAttachedAnims THIS will clear them ALL.

#

but there's no obj:getAttachedAnimSprites()

red tiger
faint jewel
#

i'm saying it only grabs

red tiger
#

Hmmm

faint jewel
#

the FIRST attached.. sorry

#

it will only grba 1, 2+ are not grabbed

#

if i could find a square that has a line, a crack and grime it'd be the grail for testing

tribal shuttle
#

I'm trying to add an item from a mod to a custom loot table, but have hit an issue. anyone know what's going on?

-- Glowstick Packs
AuthenticZ.tab_addMagProcedural_GlowstickPack  = function(x,count)
  ProceduralDistributions = ProceduralDistributions or {};
  ProceduralDistributions.list = ProceduralDistributions.list or {};
  ProceduralDistributions.list[x] = ProceduralDistributions.list[x] or {};
  ProceduralDistributions.list[x].items = ProceduralDistributions.list[x].items or {};
  table.insert(ProceduralDistributions.list[x].items,"AuthenticZLite.AuthenticGlowstick_Pack");
  table.insert(ProceduralDistributions.list[x].items, count);
end

AuthenticZ.tab_addMagProcedural_GlowstickPack("MyNewList",1.0); --procedural list exists in game, but does not have the item added
AuthenticZ.tab_addMagProcedural_GlowstickPack("ArmyStorageElectronics",1.5);  --works fine
tardy wren
#

Can I overwrite stuff from the shared/Library folder? Like... I want my mod to react to a specific function getting called

bronze yoke
#

shared/Library? isn't that generated by capsid?

#

you can do this with metatables though

tardy wren
#

MetaTables?

tardy wren
bronze yoke
#

here's a cleaned up example of using metatables from some of my code

local metatable = __classmetatables[IsoPlayer.class].__index
local old_ReadLiterature = metatable.ReadLiterature
function metatable.ReadLiterature(self, item)
    -- your code
    old_ReadLiterature(self, item)
end
#

metatables are basically how kahlua stores references to the java classes in lua, so messing with them won't affect anything when it's called from java, only when it's called from lua

tardy wren
#

thank you

#

If not for this, I'd have to patch just about every mod that changes sandbox settings at runtime

#

This lets me write a conditional behavior

#

Do I just write the class name?

bronze yoke
#

yep!

#

__classmetatables[ClassName.class].__index

tardy wren
#

thank you

#

I don't know in which folder to put it tho

#

Like... My code is a bit of a mess admittedly, spread along 6 files

#

I wanted to do it in Shared, but then I can't run the Client commands via the Client engine

#

iI think Server will be the place...

faint jewel
red tiger
fast galleon
#

so to protect a basic vehicle part all you need is, add protection part that has a lower index. That's nice.

modern hamlet
#

How can i add a trait to magazine like The Herbalist mag?

bronze yoke
#

herbalist does not give you the trait in vanilla

#

it just gives you a recipe that the game checks for instead

modern hamlet
#

hmm okay interesting lol

pale sigil
#

Does anyone know if there is any mod that inhibits sleep in single player? and if this type of mod does not exist, could someone create this type of mod to inhibit sleep in single player?

unborn scaffold
#

Hey guys, here's a mod idea if anyone is interested in taking it up as I don't have enough time to figure out the LUA side of things

#

Simple card games in PZ

#

So if you find a deck of cards, you can play solitaire or something in a GUI window

#

Gave it a quick look a few months back but couldn't see a way to animate the GUIs so I gave up

indigo hemlock
#

Is there a comprehensive change-log of what changes in modding procedures and requirements happen from sep 2021? 😅

faint jewel
#

ARGH it's always something.

ancient grail
faint jewel
#

not done yet.

#

but getting there

ancient grail
#

@sour island has a project like this

faint jewel
#

two issues left to solve

sour island
#

?

ancient grail
#

take the small wins and rest man

ancient grail
# sour island ?

o man sorry i really didnt mean to tag i was just going to type ur name my bad

#

imean the deck of card his saying

sour island
#

Oh

#

Yeah I'm working on a gameboard and cards mod

#

It's taken a back burner for a bit

fast galleon
faint jewel
#

part of better tile picker

#
local TrashItems={"Base.newpaper","Base.paperbag","Base.paperbag_Jays","Base.paperbag_Spiffos","Base.PaperNapkins","Base.SheetPaper2","Base.PlasticCup","Base.BeerCanEmpty","Base.PopEmpty","Base.WineEmpty","Base.WhiskeyEmpty","Base.BleachEmpty","Base.TinCanEmpty"}
                local TrashNumba = 0
                for i=1 ,#TrashItems do
                    TrashNumba = TrashNumba + 1
                end
                local item = truckbedcontainer:AddItem(TrashItems(TrashNumba))
``` I know this is wrong but my brain is pudding atm. how do i do this right?
bronze yoke
#

what are you trying to do?

faint jewel
#

select a ranomd item from the array and put it int he truckbedcontainer

bronze yoke
#

local item = truckbedcontainer:AddItem(TrashItems[ZombRand(#TrashItems)+1])

faint jewel
#

i love you.

#

lol

#

if luautils.stringStarts(obj:getTextureName(), "trash_") then any idea how to make that stop freaking out when i run over a model?

#

❤️

fast galleon
#

I guess you have nils there?

faint jewel
#

it nils out yes

fast galleon
#

ok, do you know if it's the obj or the result of getTextureName

#

I think it's N.2, just add a check if there's a textureName before calling the function. Same for N.1.

faint jewel
#

get texturename i THINK is the issue.

#

but that is a good idea.

#

and !luautils.stringStarts(GrassBush:getSprite():getName(), "blends_natural") then can lua not do NOTS in ifs?

bronze yoke
#

use not

#

! is not lua

fast galleon
#
local name = obj:getTextureName()
if name and luautils.stringStarts(name, "trash_") then
faint jewel
#
if GrassBush:getSprite() and GrassBush:getSprite():getProperties() and (GrassBush:getSprite():getProperties():Is(IsoFlagType.canBeRemoved) or GrassBush:getSprite():getProperties():s(IsoFlagType.canBeCut)) not luautils.stringStarts(GrassBush:getSprite():getName(), "blends_natural") then
``` if i do that it bitches saying the not should be a then
fast galleon
#

and not

#

is there an update to this?

bronze yoke
#

no

#

i was lucky that i could avoid editing the part at all in my usecase

fast galleon
#

Can we add protection and stay compatible with other mods? I feel like just making my own script is the best solution.

bronze yoke
#

i didn't run into any specific issues with it

#

i just didn't edit the existing parts, there wasn't really a need to

#

a mod that significant is likely to be incompatible with something though

fast galleon
#

I can already hear people complaining of not finding the vehicle when they have remove vanilla vehicles enabled

bronze yoke
#

¯_(ツ)_/¯

faint jewel
#

Skizot: steeringIncrement = 0.4,
steeringClamp = 0.1,
[5:23 PM]Skizot: how do these work?
[5:23 PM]Skizot: i want tighter turning on a car.

sour island
#

Alot of car stuff isn't all that accessible - not to say these are not

fast galleon
#
       /* How quickly the front wheels change facing direction. */

       steeringIncrement = 0.02,


       /* Maximum steering angle. */

       steeringClamp = 0.3, 
pulsar falcon
#

This may be a stupid question, but how hard would it be to give particular zombies nametags, like players have? (IIRC players have nametags in multiplayer)

#

I mean is there already a system that could be used, or would it require jumping through hoops and hacking to get it to work, like somehow hooking into the UI and rendering your own nametags.

ancient grail
#

Albion said zeds dont retain moddata
Unless your saying name tags as items

bronze yoke
#

didn't somebody already do that?

#

i don't know if it was nametags specifically but there's a mod that gives zombies names in some form

ancient grail
#

Toetags

#

Iirc it only adds an item?

bronze yoke
#

i can't find the mod i was thinking of so it might have been taken down/just bad memory

sour island
#

isoZombies dont save modData unless bReanimated is true afaik

frank elbow
#

I don't know about adding the overhead nametags, but I think zombies already have names—Like by virtue of them being IsoGameCharacters you can set a name for them, so that part wouldn't be a challenge to implement

sour island
#

true - but depends if that information is saved or not

frank elbow
#

It should be, since it's a part of IsoGameCharacter. Presumably saved in its save method (double checked and yeah, saved in SurvivorDesc which it saves)

#

Looks like the code for setting the nametag specifically checks for if they're a player & the field is protected and doesn't appear to have any accessors unfortunately @pulsar falcon, so I think you'd have to go another route. Dunno if halo text would work (for your use case, I mean; setHaloText is available so you could theoretically just add one with a large number, I think. Haven't tried it to be sure)

iron juniper
#

Heyo, I'm trying to make a mod that turns the leather jackets into a black/red look but it's my first time messing with textures. Can somebody tell me where to look for the leather jacket textures?

pure temple
#

can anyone give me the best list for mods in a multiplayer server PLEASE
(if link to a steam community mod list for it)

frank elbow
rancid panther
#

tfw got my first possibly legitimate bug report on one of my mods and now i need to investigate it

rancid panther
#

seems like a possible incompatibility with my own mod that i didnt account for even though i thought i did

rancid panther
#

im hoping it is just a problem with the one mod tho so i dont have to look for problems in 2 things

#

i think i found the problem, but i dont know yet how to fix it

#

when you take the bitten trait, even if your bite heals, it still is technically toggled as "bitten"

#

so when you get bitten again, it just acts as if you have been bitten the whole time and sets ur hp to whatever it would have been if you never healed the injury

fading horizon
#

i hit front page again

rancid panther
#

and even healing the body to full, then toggling bite and toggling it off again

#

when you remove the bandage, it is bitten again

#

interestingly enough... even toggling a bite on a body part that i didnt add as bitten through the trait seems to return a bite again

#

it must be an issue on the vanilla bite toggle then.

strange sequoia
rancid panther
#

yeah this sucks

#

the vanilla bite toggle is broken

#

which means my mod is broken

#

i really dont want to add a patch to fix the whole vanilla system to fix my mod

#

oh god... it's the entire injury system

#

okay i have an idea. now to test it

#

nope

rancid panther
#

yep, it's a vanilla issue

fading horizon
#
recipe Make Rat Meatballs
    {
        BreadSlices,
        StuartLittle,
        [Recipe.GetItemTypes.Egg],
        keep [Recipe.GetItemTypes.SharpKnife]/[Recipe.GetItemTypes.Saw]/Axe/HandAxe/AxeStone/WoodAxe/MeatCleaver,

        Result:RatMeatballs=6,
        Time:100,
        Category:Cooking,
        OnGiveXP:Recipe.OnGiveXP.Cooking3,
        AllowRottenItem:false,
        Sound:ratscream,
        CanBeDoneFromFloor: true,
    }```
#

is there a way to specify it to where it can only use the uncooked version of an item

#

in a recipe

#

like here i want something like StuartLittle:Uncooked

rancid panther
#

you can turn stuart little into a starting recipe ingredient maybe, where you cannot cook him, but you can use him as an ingredient

#

kinda like beef jerky

ancient grail
primal vapor
#

Hello again, yesterday I was asking about freezing character hp and I cancel my question for now. I have a new one, I'm new to modding and I'm willing to make a mod where you can revive your friends, I have an idea how it can work but I don't know how to realise it properly. Is someone willing to help me with this idea?

#

or maybe you can share resources where I can find information about how can I do it

rancid panther
#

recovery journal, save character mod, etc can help with that

#

if you want to make it so they cannot respawn except after their corpse is retrieved, then i got nothing

#

there's also that mod about player markers

primal vapor
#

I saw a mod like that but I wanna do it a lil different, for example when your overall health is 5 percent then you forced in animation like lay on the ground then your character gets a near-death moodlet if moodlet gets in its final state you die or someone with like epipen or some item like that can heal you, if they do that you recover with full health, near-death moodlet is gone but your wounds are present

#

I can describe how I see some parts more precisely if you need

#

like in l4d or payday maybe

rancid panther
#

being swarmed by zombies creates an instant-death scenario. you have to account for that

#

i like how ur response to dying is an epi pen

primal vapor
#

yeah, when you get in a near-death state you are invisible and invincible maybe?

frank elbow
#

To avoid fatal damage you would probably need to listen for the event for receiving damage and exempt the player from the damage—and only apply the amount that would make it so that they're at 5 hp—if it would kill them (I think via setAvoidDamage, unsure off the top of my head)

#

Unsure whether that accounts for dragdown, though

rancid panther
#

you need the death animation and a way to turn players invisible/godmode

#

then context option for revive with timed action

#

i think you'd have to disable drag down urself. it can be triggered even at near full hp, and cannot by overridden even if you activate god mode or full heal mid animation

#

how? idk, maybe set a custom zombie strength so it requires more zombies than perceivable to kill a player

primal vapor
#

We usually disable drag down so drag down situation is impossible in my case

rancid panther
#

i see

primal vapor
#

and cheatmenu can make you invisible and invincible

#

I mean it can do it somehow

#

maybe I can check how this mod do it

rancid panther
#

there are commands for it

#

i think setGodMod and setInvisible or smth

frank elbow
#

If you intend to upload this mod it would probably still be ideal to consider drag down, even if that's just a section of the description that clarifies death from dragdown is still possible

#

If it's only for you that's not a concern, of course

rancid panther
#

consider the applications of other users

#

and either tell them how to do it themselves or make it work in ur mod too

primal vapor
#

I thought about uploading it and about dragdown, to be honest I don't know if it's gonna be just a warning or how i'm gonna deal with it

#

but I keeping this in mind

rancid panther
#

i'd still add an option to disable revival for infected corpses

primal vapor
#

for this case maybe if player is infected you just die without near-death state

rancid panther
#

that would work

primal vapor
#

so my biggest problem for now is what should i do with character health

rancid panther
#

u also need to consider a few other things:
signifier for death countdown
revival time
option to "give up" or die if u arent gonna be saved

primal vapor
#

that is why i was asking about freezing health

#

give up it's a good reminder

#

i forgot about it

rancid panther
#

start with whatever you think is most important to you

primal vapor
#

Okay, thank you for now guys, i'm gonna think about it again and read the documentation more, maybe some guides

#

I'll ask again if I'm gonna need more help

rancid panther
#

we all start somewhere!

#

i still have tons of problems i need to address before i can finish my current mod

ancient grail
#

let me look for the code for you

#

function antiFallDmg(player, damager, dmg)
    if damager == "FALLDOWN" then 
        player:setHaloNote(tostring(dmg)) 
        local bodydmg = player:getBodyDamage()
        local health = bodydmg:getOverallBodyHealth()
        bodydmg:AddGeneralHealth(health+dmg);
        print(health)
    end
end
Events.OnPlayerGetDamage.Add(antiFallDmg)
#

let me convert it to something that suits your need

rancid panther
#

i'd start by making a very simple trigger to get players in a "near ded" state

#

then add the requirements and functionality to that

ancient grail
#
yourmodname = {}
function yourmodname.dosomeaction()
    getPlayer():playEmote("aCustomAnimation")    
 --TODO add your zedignore code here 
 --TODO add disable movement codes. im not going to look for it for you cuz i need to do something else now
end



function yourmodname.dontdie(player, damager, dmg)
    local bodydmg = player:getBodyDamage()
    local health = bodydmg:getOverallBodyHealth()
    if dmg > health then
        bodydmg:AddGeneralHealth(health+dmg);
        if isDebugEnabled() then print(health); player:setHaloNote(tostring(dmg))  end 
        yourmodname.dosomeaction()
    end
end


Events.OnPlayerGetDamage.Add(yourmodname.dontdie)      


#

@primal vapor

primal vapor
#

Yeah I see

#

Thank you, I will try to work with that

ancient grail
eager grotto
#

Hey guys, I have a question about “Superv Survivors” mod, don’t know if I’m in the right place but here’s the thing, i want make the random survivor spawn via key press to always spawn a survivors with level 5+ aiming, which file in Superv Survivors mod should i edit?

hollow lodge
#

Hi guys, texture issue here, can I use a cloth texture higher than the usual 256x256px? without masks conflicting

#

I'm working on new gloves models

#

and having details it's quite impossible with that resolution

#

blender gives me an uv map of 1024x1024px, which is great for good patterns and design

ancient grail
ancient grail
#

You could however ask for permission

#

Require the mod then hook on its functions

#

Or find a different workaround

eager grotto
#

Oh sorry about that, I’m newbie in modding, tho I’m not going to release that as a mod I’m going to some experimenting so maybe i would be able to make my own and simple survivors mod

hollow current
#

Trying to update a mod. Didn't change anything apart from few lines of code. Now I am getting this error, any idea why?

weak sierra
#

i presume u create it on the client based on those symptoms

weak sierra
hollow current
weak sierra
#

apparently it can be a connectivity issue, or "steam family sharing" enabled per a google

#

should poke around until u find the steam API docs for workshop uploads

#

probably will have a list of actual error codes

hollow current
#

hmm will try to disable my VPN and see if it does anything

frank lintel
#

https://theindiestone.com/forums/index.php?/topic/37047-unable-to-upload-new-mod-to-steam-workshop-failed-to-update-workshop-item-result2/ check your spelling on the file names. btw Blah == blah ie. uppper/lower case dont matter.

hollow current
#

ye i did that. My mod has literally only one file of code, rest of files are translations and poster/preview, etc

#

checked everyone of them, they seem fine

#

It shouldn't be the issue since I didn't even play with files names, but only the code within the file itself

frank lintel
#

well could try yanking files, maybe steam sees something inside one and dont like it dunno.

#

ofc steam in their awesome documentation explain any of this...

hollow current
#

ye idk I tried everything, removed files, changed code to a simple print("test"), change file names, nothing

#

lemme see if I can even work with other mods

#

Nope getting same issue on all mods, so I can probably guess its a system/steam related issue

frank lintel
#

could be very well...

hollow current
#

sighs

#

imma just give it time and hope its solved on its own.. magically

frank lintel
#

its prob on steams end wouldnt surprise me

hollow current
#

haha maybe

old crescent
#

how to add player name on specific item

red tiger
#

Huh.. I'm at a library that drops https requests for discord media such as profile pictures.. nice.

real moss
#

i want to retexture a shirt, i have the texture but i dont know how to upload it to the workshop

fast galleon
#

if you make the SpawnHordeUI attract Zombies on render it will freeze at high sound setting 😅

ancient grail
#

Anyone wants to collab on reanimation mod
Its open to public

#

Basically original mod idea is that you play as zed after you die.but we are working on branch to turn an arcade pz genre

red tiger
#

Hello.

fast galleon
#

@sour island the debug mod needs a way to access the functions fast from console

sour island
#

hm? like commands?

fast galleon
#

like ce.aTable.command()

sour island
#

I'll be honest I don't really use the console

#

What changes would be needed / what would they look like?

fast galleon
#

just an idea, because I do things from console all the time.

#

Easies way is to have one global table

sour island
#

hmm

#

Most of the commands were vanilla - like the cheat menu

fast galleon
#

I added a lure button to the ISSpawnHordeUI, it uses addSound, should I send that?

#

it's the one that spawns a zombie on a selected square

sour island
#

Sure, anything is useful

#

I'm off for the week so maybe I'll have a chance to sit down and start adding useful functions and such

#

I also want to add a more friendly debug panel API

#

I made one for loading in EHE's test functions

wise tulip
#

Hello, I'm pretty new to mod development and this is my first project. It should send a POST request to a webhook url every hour to display the player count of a server if it changed.

local https = require('http')
local lastCheck = os.time()
local interval = 3600
local webhookUrl = "https://discord.com/api/webhooks/a/b"
local lastPlayerCount = 0

function CountPlayers()
    local numPlayers = getNumActivePlayers()
    
    if numPlayers ~= lastPlayerCount then
        local message = "There are currently " .. numPlayers .. " players online."
        
        local encodedParams = '{"username":"PZ PlayerCount","avatar_url":"path/to/img.jpg","content":"' .. message .. '"}'
        
        http.request('POST', webhookUrl, {
            {'content-type', 'application/json'}
        }, encodedParams)
        
        lastPlayerCount = numPlayers
    end
end

Events.OnTick.Add(function()
    local currentTime = os.time()
    local timeDiff = currentTime - lastCheck
    if timeDiff >= interval then
        CountPlayers()
        lastCheck = currentTime
    end
end)

However, I'm getting:
ERROR: General , 1680908543489> 8,689,381> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: request of non-table: null at KahluaThread.tableget line:1689.

Can anyone help me figure this out? Documentation hasn't been of much help.

#

also side note: I've removed the json library implementation because it too was giving me errors when I tried to include it.

fast galleon
#

The error is from

local https
http.require
wise tulip
#

🤦‍♂️

#

had a previous ssl.https implementation and didn't change my variable names... thanks

sour island
#

http might need to be https to match the local variable?

wise tulip
#

yeah I've just changed the original definition

#

going to run it now and see

sour island
#

what is the 'http' file?

wise tulip
#

iirc

#

I'm new to lua but isnt it just a part of the native functions

wise tulip
#

honestly im willing to completely rewrite if someone just has a working implementation of HTTP POST request

#

i just want to communicate with a webhook

red tiger
#

Good evening.

#

You can't get http requests to work through PZ's Lua environment.

wise tulip
#

so I would need to move to Java

#

I assume

red tiger
#

This is neither normal Lua or normal API.

#

You used to be able to use openUrl(..) however it was disabled by means a presumably security concerns.

#

HTTP POST would've been the only option back then.

#

I've discussed reimplementing something like this at length with recent discussions between the community and the devs.

#

Personally I'm wanting my discord invite button mod back.

wise tulip
#

I can see it being okay if it were just a serverside script and maybe a server setting to enable POST requests before launching the server

red tiger
#

You can use a separate process with a file watcher to bounce requests but this would require the client to do it.

#

If this is a server-specific operation, modify the Java bytecode.

#

Install Gson to the dedicated server, mod it in to suit whatever JSON needs to be parsed / serialized and wala. =)

wise tulip
#

I'll see what I can do. I'm only just getting started with zomboid so this has been very insightful, thanks

red tiger
#

No problem. I've modified the server and client java code for over ten years. Let me know if you have any questions.

weak sierra
#

@wise tulip recommend dumping the info to a file in a location accessible to a bot and having the bot read it

#

was planning to do that for a bot for my server but it's on the backburner

wise tulip
#

I just figured it'd be a nice introduction to modding lol but I obviously chose the wrong project

frosty estuary
#

What can I set to make a zombie always move like he is about to attack a player (Arms up, faster move speed etc.) instead of his regular move speed.

ancient grail
bronze yoke
#

yeah, you can open files with it

#

which concerns me a little but you couldn't run executables at least

ancient grail
fading horizon
#

he just spawns in bins very rarely

ancient grail
frosty estuary
#

Thanks

late hound
#

💋

ancient grail
#

Oh no haha maemento s gona go all out rant mode.

fading horizon
#

I could make a mod toggle option that turns him into rattatouie instead if that's more to your liking

ancient grail
#

Wait ehats the difference between them? You dont hate rattatouie only stuart?

#

Cuz of the back story?

fading horizon
#

Yes

#

I hate stuart little and by extension the entire Little family

#

Except the kid he had nothing to do with it rly

#

But his parents adopting a literal rat instead of those poor orphaned children who needed it more?

#

Like go to the dang pet store instead wtf don't taunt the other kids like that?

#

And he tries to get with a bird (completely different species) and that's like a major plotline in the story????

#

How would that even work? he's a RAT

#

At least ratatouille is doing some good in the world by making some fire food

#

But stuart little?

#

Useless.

#

Nuisance, even

#

Just our there doing stupid boat races

late hound
#

Mori still salty that Stuart Little won the miniature boat race and not him.

faint jewel
#

anyone here mess with trailers?

#

i have a weird bug.

ancient grail
#

Passion from hate i love how you made a working mod from your hate
Usually hate is destructive you used it for creativity

fading horizon
#

Dang

#

I forgot to set it where you can use him as a fishing lure

bronze yoke
ancient grail
#

U talking about baro?

bronze yoke
#

baro is one of them yeah

ancient grail
#

Dang . Shouldnt have invested

fading horizon
ancient grail
#

I havent modded anyother game tbh. I bought 3 other games just cuz they have workshops

fading horizon
#

Cities skylines has an amazing workshop if you like city builders

ancient grail
#

If it allows commission then sure

fading horizon
#

No idea on that one actually

#

I think I've seen patreons for it

bronze yoke
#

i just mod the games i play

fading horizon
#

This is the first game I've ever made mods for

#

I've been modding the heck out of games forever though

faint jewel
#

aight lets change this up.
this is my trailer in the vehicle editor.

#

this is what happens ingame, and it IS attached

ancient grail
#

I was going to say nice . I thought this was a feature you did

faint jewel
#

what?

frank lintel
#

does it catch back up when you stop?

faint jewel
#

no it's like an anchor.

#

it stops you dead at that distance always

bronze yoke
#

looks roughly like the size of the default trailer

#

so maybe something isn't configured (or something is hardcoded stressed)

#

as for it stopping you, the lawnmower might not actually be strong enough to move the trailer

torn igloo
#

Do you have to and no choice to put file in same structure as the mod's to override it
For example, media/scripts/abcd.txt
Or you can put it like this
media/scripts/modid/abcd.txt?

faint jewel
#

i redid the file and got it working.

#

now my question is... can i make a update function that checks a vehicles trunk and updates it?