#mod_development

1 messages · Page 172 of 1

deft plaza
#

whole line?

crystal oar
#

ya get rid of usedelta if it's not a drainable

deft plaza
#

here is what it looks like now

crystal oar
#

also if it's not a drainable you won;t have partial stacks and can't consolidate it, axe the consolodate line

deft plaza
#

what

crystal oar
#

ConsolidateOption

deft plaza
#

delete it?>

crystal oar
#

ya, that's also for drainables

deft plaza
#

okay

#

update

crystal oar
#

can you try booting up now and looking for it? my fingers are crossed that this was the only problem

#

even if there was an issue with the model or the icon or the texture it should still show up in item picker right anyone?

deft plaza
#

lets see

#

nope

#

just sending it again

crystal oar
#

and the icon is in the right folder and named Item_RedDuctTape? and is the right size and everything?

deft plaza
crystal oar
#

item_redducttape != Item_RedDuctTape

#

change either the filename or the line in the item so the two match

deft plaza
#

yea okay

#

wait I think icon does not need item_

crystal oar
#

i don't think it needs it, but make sure it matches

bronze yoke
crystal oar
bronze yoke
#

no

crystal oar
#

sigh i wish i could figure it out

bronze yoke
#

i think the file isn't being read at all but i've already suggested every cause i know of that

deft plaza
#

updated code

#

hold on why doesnt redducttape have those lines like the other txts

crystal oar
#

unclear, what IDE is that you are using?

bronze yoke
#

looks like vscode

deft plaza
#

IDE

#

???

deft plaza
crystal oar
#

i use notepad++ like a scrub lol

#

what on earth do the little lines mean?

deft plaza
#

thats my question

bronze yoke
#

that is weird, it should just be the icon for the file type

#

but it shows .txt so ???

#

could you send me the item_redducttape.txt?

deft plaza
#

sent

bronze yoke
#

works for me with no changes

deft plaza
#

are my scripts right?

bronze yoke
#

yeah

deft plaza
bronze yoke
#

all i did was put your file into one of my mods

deft plaza
#

there all in my scripts folder

#

I saw somewhere where someone puts there mod id after module instead of base

bronze yoke
#

can you change something in one of your other files and see if it changes ingame?

#

i think what is happening is it is loading another copy of your mod from another folder

deft plaza
#

like what

bronze yoke
#

if you worked in both mods and workshop folders it might load the other one, if your mod is on steam and you're subscribed it might load the steam version instead

deft plaza
#

like should I delete the machete

#

and see if it does anything

bronze yoke
#

make a backup or something but yeah, if you delete the machete and it's still in the game then you know for sure

deft plaza
#

alright loading up the game

#

good news or something

#

it did not change anything

#

so what shall I do

crystal oar
#

albion you the best

bronze yoke
#

check Zomboid/Workshop/ and Zomboid/mods/ to make sure the copy you are working on is the only copy of your mod

deft plaza
#

for sure

#

its empty

#

what do I do

#

where should I work

#

I like working in mods make sure everything works

#

before updating

bronze yoke
#

you can work in either one as long as there's only one copy, but it's probably easier to work from workshop once you've first uploaded it (otherwise you'll have to keep moving it around every time you want to push an update)

#

that's what i usually do, develop from mods and then move to workshop when it's ready for its first release

deft plaza
#

what does that mean as long as there's only one copy

bronze yoke
#

if you have your mod in mods, and then you copy it into workshop to publish it, then your mod exists twice, and changes you make to one might not show up, it just messes everything up

deft plaza
#

so what do I do in the future?

bronze yoke
#

just make sure if you move your mod to workshop to delete the one in mods

deft plaza
#

oh okay

#

I guess I should move everything now

#

wait so

#

if I move the workshop one somewhere else will it still be on the workshop?

bronze yoke
#

yeah, that folder is just an area for you to upload it, steam has whatever you uploaded

deft plaza
#

okay

#

so I can delete it?

#

for now I backed it up

tawdry solar
#

did it wrok

deft plaza
#

okay now recipe

#

this right?

tawdry solar
#

@deft plaza what was issue

deft plaza
#

I was using workshop folder

#

but one sec

crystal oar
#

heyy so now it shows up in item picker?

deft plaza
#

scale is bad

#

this is the scale

near chasm
#

Would be cool if these could be used as sheets

tawdry solar
#

show

deft plaza
tawdry solar
tawdry solar
deft plaza
#

yup

tawdry solar
#

set it to 0.01

#

0.1 i mean

deft plaza
#

wait

#

no no way

#

for the machere its 0.06

#

right so

tawdry solar
#

its 0.06?

deft plaza
#

wait no hold on

#

0.01

#

thats

tawdry solar
#

ah

deft plaza
#

it

tawdry solar
#

0.01 then

deft plaza
#

lets see one sec

tawdry solar
#

@deft plaza

#

it works?

deft plaza
#

the scale is still messed up

tawdry solar
#

is it scaled in blender

#

thats teh only reason why

near chasm
#

Anyone happen to know the name of the funny flag

#

cant find it on the wiki

deft plaza
tawdry solar
deft plaza
near chasm
#

ctrl A to apply transforms

deft plaza
#

what

near chasm
#

er, scale as well

deft plaza
#

wait how do I transform

near chasm
deft plaza
#

what does it do

near chasm
#

basically you usually want scale in blender to be 1

bronze yoke
# near chasm Anyone happen to know the name of the funny flag

if you stand on the square with it and copy-paste this into the lua console it'll spit out the names of all the objects on that square, hopefully should be easy to recognise which one is the flag
local objects = getPlayer():getSquare():getObjects(); for i=0, objects:size()-1 do print(objects:get(i):getSprite() and objects:get(i):getSprite():getName()) end

near chasm
bronze yoke
#

launch the game with -debug

near chasm
#

🙏

near chasm
bronze yoke
#

huh...

#

it's not part of the wall is it 😨

#

check the bit of wall next to it, if the wall there has a different sprite that's bad news

near chasm
#

uh oh

#

the plain wall is 02_50

deft plaza
#

this is the scale

#

but it is still showing up in game

#

big

#

hey seperate question

#

what do you guys thinkj

#

should add the option to make the machete

#

or should make it optional make a seperate mod within the mod

#

also this is how big the duct tape roll is

#

I made it

#

help

bronze yoke
#

just reduce the scale in the script

deft plaza
#

look

tawdry solar
#

Try tl

deft plaza
#

nows its very small I'm going to try 0.0010

#

how would I make two seperate mod versions in 1

#

as in one I have everything on one I have something removed

bronze yoke
#

two mod folders with different ids in their mod.infos

deft plaza
#

ahh

#

okayt

#

item distribution is this right

#

two different items in this

deft plaza
#

if its different ids

bronze yoke
#

it should be in the same Workshop/myMod/Contents/mods/ folder

tawdry solar
#

@deft plaza

bronze yoke
#

so when you upload it it uploads both as one workshop item

deft plaza
tawdry solar
#

Can I see it?

deft plaza
tawdry solar
#

Ingame

#

Alright

tawdry solar
deft plaza
#

iirc?

tawdry solar
#

If I recall correctly

bronze yoke
#

you basically want your structure to be like
Workshop/myMod/Contents/mods/Mod1/mod.info
Workshop/myMod/Contents/mods/Mod2/mod.info

tawdry solar
bronze yoke
#

two mods

tawdry solar
#

Why is there 2 mods??

bronze yoke
#

because they wanted a version without something

tawdry solar
#

Makes senss

deft plaza
tawdry solar
deft plaza
ancient grail
#

Can objects that are dropped on the ground
Be moved using lua?

#

Like z axis

bronze yoke
#

what kind of objects

ancient grail
#

Like guns or swrods

bronze yoke
#

inventory items?

ancient grail
#

Or whatver dropped on the ground

#

Yes

#

Cuz they obey the tile right
Like certain elevation

bronze yoke
#

i think you have to remove it and recreate it in new location

ancient grail
#

But can it be placed like

For example under the table

bronze yoke
#

not possible with current renderer

ancient grail
#

Or cuz the tile will make it go on top of it

#

Right...
What about like upwards

#

Cuz im assuming the render thing is cuz under the table means theres cropping

#

Like it was suppose to be that tile is below
And you cant put it under the table cuz ot will mean the gun is below

bronze yoke
#

constructor has zoff parameter, probably means z offset?

ancient grail
#

Thnx ill check it out

#

I think addworldobject has x y z

bronze yoke
#

ya i think so

ancient grail
#

I thought it was an offset like code based place on ground

#

But now im curious if z works

thin hornet
#

it does

ancient grail
#

Nice so you can add the item as if its floating

thin hornet
#

without shadow it will never look like its floating

bronze yoke
#

you probably can force it to be 'under' a table but i don't think it'll render correctly

#
  • ya there's no way to tell depth in pz's style
deft plaza
#

I can use someones sound right

#

not another mod creator though right

ancient grail
#

Yeh ive seen alot of illusions
Like if you have a deadbody floatin on z1 but without floor tiles
It will still look like its on z0

compact shale
#

Anyone knows what the SuburbsDistributions[“laboratory”] is Broken error indicates?

deft plaza
#

hey does likes show on steam workshop stuff

compact shale
#

It happens in fresh install vanilla 41.78 along with a mannequin zone error i’m sure someone is familiar with those

bronze yoke
#

it indicates nothing

#

you can ignore it

deft plaza
#

recipe right?

#

better ss

#

is it good guys?

formal oasis
#

Quick question (not to overshadow Rightwayup) Do you all reckon its possible to change weather for specific players but not the whole server? I strongly suspect the answer is no from my own searches, but figured it can't hurt to ask people with more experience .

bronze yoke
#

i looked at it briefly when i was writing up the events data, and maybe...?

deft plaza
bronze yoke
#

missing module

deft plaza
#

its there I added it

#

anything else

formal oasis
#

thanks

deft plaza
bronze yoke
#

need commas after each item name

deft plaza
#

everything

deft plaza
deft plaza
#

does anyone know why this is not spawning?

deft plaza
#

anything wrong

sinful scaffold
deft plaza
#

what

#

so what does that mean

mellow frigate
#

Is there already a mod that shows player 0 mod data, like Debug shows global mod data ? If not I'll make one.

sinful scaffold
# deft plaza so what does that mean

I mean, I am being very literal. You gave your red duct tape an incredibly low chance of spawning. Increase that and you will see it spawning more often.

deft plaza
#

alright how much should I do then

deft plaza
#

I want crate tools to be the most and garage tool to be the second most

sinful scaffold
deft plaza
#

I used the abundant option

#

so I'm pretty sure spawns dont work

bronze yoke
#

this is still a very very low chance

#

you can check if your spawns work and see an actual spawn chance for your settings with lootzed

deft plaza
#

reallyy

#

wait

#

hold on

#

how is it low 50%

sinful scaffold
#

They do work, you are off by 2 decimals.

deft plaza
#

thats not low

sinful scaffold
#

50% is 50, not 0.50

#

0.50 is 0.50%

bronze yoke
#

they aren't raw percentages but yes it's much closer to 0.5%

deft plaza
#

I guess

#

better?

sinful scaffold
#

Yeah, that should work.

deft plaza
#

probably totally un related

#

but its not in the spawn menu anymore

#

code again

#

if someone can dm me the problems

#

I'm too tired and I got a headache

#

thank you guys

deft plaza
#

alright

#

im good

#

whats wrong?

mellow frigate
#

Is there already something to manage the fact that players flags must be spread on the network to work in MP ? (e.g. zombiesDontAttack)

slow graniteBOT
#
zojot has been warned

Reason: Bad word usage

novel barn
#

Is there a recommended way to link to things in the workshop.txt or mod.info files? I was hoping markdown would work but seems like Steam is too smart to let people XSS attack each other. I just want to mention another steam user as thanks.

bronze yoke
#

for workshop.txt [url=url]text[/url] iirc

tawny depot
#

If I want to access a java class from LUA that doesn't have a LUA interface (Lets say for example, FliesSound), is there any way I can do this quick & simple, or will I have to create some additional files to emulate the java class in LUA?

bronze yoke
#

wdym lua interface?

#

if you're talking about class exposure, a class is either exposed or it isn't, nothing you can do to change that from lua

tawny depot
#

Right, I meant like for example there's Clock.lua, and Clock.java. I take from what you're saying is I'm SOL?

bronze yoke
#

yeah, that's not really how zomboid's lua works

tawny depot
#

Thanks for clearing that up

#

I'll have to find another way to count corpses 🥲

deft plaza
#

can I dm someone a question

thin hornet
#

ah the headache of translation file encoding

raven briar
#

Hi ! Quick question, I'd like to make a re-texture for some of the basegame vehicles. I have read the tutorial on the forums, but as I understand it that would overwrite the base game vanilla texture?? If I wanted to have it be standalone then would i just take the 3D model from the Zomboid folder, then rename it to myawesomecar blah blah blah whatever the Namin convention would have to be and put it in the mod folder??

tame mulch
#

Or you can modify vanilla script (and overwrite it) and some cars will spawn with new textures + vanilla textures

jaunty marten
#

u can just do

for k,v in pairs(tbl) do
  if v == value_to_remove then
    tbl[k] = nil
  end
end

about sequential table

local tbl = {}
for i = 1, 100 do tbl[i] = true end
-- with it u can use ipairs and #
for k,v in ipairs(tbl) do print(k, v) end -- output: 100 lines
print(#tbl) -- output: 100

-- if use ur func for this `tbl` then:
for k,v in pairs(tbl) do if v == some_value then tbl[k] end end
-- for example we removed 35 index
-- then ipairs and # won't work correctly
for k,v in ipairs(tbl) do print(k, v) end -- output: 34 lines
print(#tbl) -- output: 34
-- problem is ipairs and # going from 1 to N where's N it's last index of sequence
-- for sequential tables u should use table.remove
-- for example: table.remove(tbl, 24) and after it lua will remove 24 index and shift all keys after 24
N = 24
tbl[N] = nil
tbl[N] = tbl[N + 1]
tbl[N + 1] = tbl[N + 2]
...
tbl[#tbl] = nil
deft plaza
#

Redducttape is custom

red tiger
deft plaza
red tiger
#

Also if you think I'm attacking you, that's on you.

cosmic arrow
#

hello, how can i check if the player has 1 or more nail item in their inventory (excluding nearby containers/floor)

cosmic arrow
#

mp

red tiger
#
local player = ..;
local inventory = player:getInventory();
-- I can't remember how to get items specifically but should be in this object
#

Should be in there.

#

I'll double-check. Grabbing my Umbrella environment.

cosmic arrow
#

so something similar to this?

red tiger
#

Hope that helps.

cosmic arrow
red tiger
#

@jaunty marten Hey.

cosmic arrow
#

would it be necessary to go for a function with Count or is it fine to just getItemFromType

red tiger
#

Oh. You could try getting the item with the ID.

jaunty marten
red tiger
#
local item = inventory:getItemById('Base.Nails');
if item not nil then
  -- ...
end
cosmic arrow
#

ah i see

#

tyvm

red tiger
jaunty marten
#

pretty good, and u?

red tiger
#

I brushed up on Webpack this weekend and worked on a mock interface for writing 3rd party documentation for Umbrella.

#

Not final. No functionality. Just a set of panes and some filler text.

jaunty marten
deft plaza
#

can someone tell me what the number means at the end of the lines

#

=2
=15

red tiger
#

I already have a functional API on npmjs for PZ-Rosetta, my dataset solution for extracting data from the JavaDocs and Lua docs stuff too.

jaunty marten
deft plaza
#

needed?

jaunty marten
deft plaza
#

okay cool thank you

jaunty marten
deft plaza
#

is this recipe code right

neon bronze
#

Did you define Recipe.GetItemTypes.RedDuctTape?

deft plaza
#

define?

neon bronze
#

I mean wrote it

#

Its a function call in lua

#

You have to define what it does

deft plaza
#

its suppposed to be txt

neon bronze
#

Take a look at recipecode.lua in server folder

#

There are all the vanilla functions called for recipes and what kinda recipe items are allowed

deft plaza
#

I don't understand a single thing

neon bronze
#

If you have something like [Recipe.GetItemTypes.DuctTape] in your txt file its actually referencing a lua function that will be executed when creating the recipe

#

So instead of painstakingly referencing for example all the knives in the base game you can just write a lua function that gets all sharp weapons and says that those are needed for the recipe to work

deft plaza
#

I still don't get it man

neon bronze
#

Do you have only redducttape as the modded item?

deft plaza
#

yes

#

the redhandled machete is the first modded item I want to be crafted

neon bronze
#

Then just write how its called in the file instead of Recipe.GetItemType.RedDuctTapr

#

So RedDuctTape=1

deft plaza
#

okay

neon bronze
#

Also missing the closing bracket

deft plaza
#

where does that go

neon bronze
#

In the end

deft plaza
#

like this? you sure?

neon bronze
#

Yes

deft plaza
#

alright

#

is it good

neon bronze
#

Yep looks good

deft plaza
#

where is the crafting recipe.txt supposed be

neon bronze
#

In your client/scripts folder

#

Also enable your mod when starting

deft plaza
#

ahh okay

neon bronze
#

Ye

regal roost
#

so apparently
group:setHideModel
on my custom bodylocation under /shared/NPC/ doesn't seem to work on multiplayer. I've been reading about ClientCommand and ServerCommand but currently struggling to understand how can I work with these.
Other things such as
group:setExclusive on the same bodylocation.lua works fine.

deft plaza
#

its giving me errors everytime I try and open the recipe

#

menu

neon bronze
#

Then your recipe is broken

tawdry solar
deft plaza
neon bronze
#

Then figure it out on your own lol

red tiger
#

You're asking without trying first.

#

Nobody will help you if you're going to talk down to people.

deft plaza
#

that's what you said

red tiger
#

I can call a moderator if that's what you'd like.

deft plaza
#

for what dude I have been asking for help and there is no point of it

neon bronze
#

You could look through the f11 menu in the error log what exactly the error is

deft plaza
neon bronze
#

How about we just calm down and look what the error log says

deft plaza
#

Sure thing

#

what am I looking for?

neon bronze
#

There is an error button up left

deft plaza
#

this is it

#

there is more

#

alot more

neon bronze
#

Yea im aure it just repeats that all the time

deft plaza
#

oh okay

neon bronze
#

Im not currently at pc but you would be wise to look through some of the vanilla recipes and see how they do it

deft plaza
#

sure

neon bronze
#

And mostly its just syntax problems really

deft plaza
#

which file is that again

orchid notch
#

extremely early dev, started on this last night

deft plaza
#

this is what it looks like currently the recipe

orchid notch
#

once the basics are in and it's functional, I'll be adding features of convinence

ancient grail
#

I have this on my item recipe script
``
Result:someDrainableItem=5,

``
This will produce
5 items and are all full

Question
Ks there a way to get that number 5
Onto the lua as variable

neon bronze
#

OnCreate with moddata?

ancient grail
#

Its suppose to be usedDelta

#

But since its more than 1 it becomes quantity instead of amount

#

I want
To convert it into
0.05
But theres alot of em

neon bronze
#

There is a usedDelta call for drainable items that you could call in OnCreate

ancient grail
#

I was able to do q table and refer from that
But it would be so much easier if i can just get the result's = var
Which idk what its called

#

Yeah but
It produces 5 items
Im guessing it will give me
1 per item

#

I need the var 5

#

Not 5 x 1

#

If that makes sense?

#

Thnx btw

deft plaza
#

so what does this mean

neon bronze
#

It refers a lua function in recipecode.lua

deft plaza
#

so do I need it?

neon bronze
#

If you want all the base ducttapes types as a required item

deft plaza
#

what

ancient grail
#

The param for oncreate and ontest doesnt make sense for me

Like result is singular but uou can add quantity

deft plaza
#

oh wait do you mean the amount of it

ancient grail
#

Isnt it suppose to be table instead

deft plaza
#

like how much duct tape?

#

amount?

ancient grail
#

No those are tags i believe

Like sharpknives

#

So all the vanilla knives are there

#

Excpt for crafted one i think
Stone knife? Not sure

mellow frigate
deft plaza
#

so would this work?

neon bronze
#

You need the commas after the items

#

Also your category is outside the brackets

deft plaza
#

Should result be Display name?

granite ginkgo
#

Is this the right channelfor asking questions ,or should i stick to mod support?

deft plaza
#

what kind of question

granite ginkgo
#

about one of my 3d models

mellow frigate
deft plaza
#

probably

regal roost
# deft plaza so would this work?
    recipe Attach Bread Knife to Spear
    {
        SpearCrafted,
        BreadKnife,
        DuctTape=2,

        Result:SpearBreadKnife,
        Time:100.0,
        OnCreate:Recipe.OnCreate.UpgradeSpear,
        Category:Survivalist,
    }

take a look at this Attach Bread Knife to Spear, from base game I think its similar to what you are trying to do.

granite ginkgo
#

well since i want to make a mod with it then it shoudl be the right channel

deft plaza
#

What is OnCreate

mellow frigate
#

Hello there, Does any of you know why the IsoGameCharacter flag m_invisible makes you invisible from zombies in vanilla but makes you invisible to yourself when using NPC mods ? (NPCmods I tested being superb survivors, continued and Dogs)

granite ginkgo
#

So,my vehicle body model is invisible in the debug editor,any ideas why???

tawdry solar
tawdry solar
deft plaza
#

I want it like that

tawdry solar
#

fair

#

but then whats the point in the red duct tape

deft plaza
tawdry solar
#

wym

deft plaza
#

the duct tape is only there for a little bit of a challenge

tawdry solar
#

alright

deft plaza
tawdry solar
#

ig

deft plaza
#

because it will be easy to make the red handle machete with duct tape

#

so its like whats the point

tawdry solar
#

no i mean it says you can with normal duct tape

deft plaza
#

oh why is it there?

tawdry solar
#

yeah

deft plaza
#

Just because I guess

tawdry solar
#

alr

deft plaza
#

so does anyone know what should I put for OnCreate

tawdry solar
#

i think its OnCreate then add the machete

jaunty marten
mellow frigate
jaunty marten
mellow frigate
#

I'll look for one of my failed experiments

deft plaza
#

wait when you say add the machete you mean the red?

tawdry solar
#

yuh

#

never fucked w it

#

just know ab it

deft plaza
#

bet

deft plaza
tawdry solar
#

i would assume item nae,m

deft plaza
tawdry solar
#

prolly

#

im gonna hop on vr so i wont be able to reply

deft plaza
tawdry solar
#

ghosts of tabor with a friend

deft plaza
mellow frigate
# jaunty marten <:hehe:1115350083806961744> <a:flex:1117970864042950676>

So, I got 2 use cases. One with non sequential table (key,value) where key are used for retrieval, periodic cleaning occures (parses the whole table on pairs) on the whole table and I need the table to not grow over time. with table[key]=nil the key remains valid in the table and my cleaning process time takes more and more time.

deft plaza
#

is this right guys?

jaunty marten
#

lua won't remove objects if they have any reference

mellow frigate
fast galleon
#

table.isempty(t)

deft plaza
fast galleon
#

wonder if you still have the keys 🤔

mellow frigate
jaunty marten
jaunty marten
deft plaza
#

can someone help please.

tawny depot
#

have you tried asking ChatGPT?

deft plaza
tawny depot
#

real

fast galleon
# mellow frigate lol

can you replicate the problem persistently? Does using pairs then give you nil values?

deft plaza
#

also I have a question for those people who have those donate links on there mod

fast galleon
#

What is your table, is it some kind of modData?

deft plaza
jaunty marten
#
tawny depot
#

@deft plaza

fast galleon
deft plaza
#

dude just forget it alright

tawny depot
#

🤨

deft plaza
#

I'll give it a break

tawny depot
#

lmao

deft plaza
#

god sorry for asking for help

granite ginkgo
#

Guys, what causes black models in the editor but also invisible in the game??

mellow frigate
mellow frigate
fast galleon
mellow frigate
jaunty marten
fast galleon
#

I see, well now and then you discover weird facts about kahlua.

jaunty marten
#

as input table ~= output table

mellow frigate
jaunty marten
#

it can cause some issues

mellow frigate
jaunty marten
# mellow frigate it solves mine, feel free to not use it if you keep memory of iterators of your ...

for sequential tables it's fine I think but ur lib is public so it can confuse someone who will use it

-- ur version
function luautils.removeFromTable(tab, elem)
    local newTab = {}
    local found = 0
    for it,val in pairs (tab) do
        if val ~= elem then
            newTab[it] = val
            found = found + 1
        end
    end
    if luautils.Verbose and found ~= 1 then
        print ('luautils.removeFromTable removed '..found..' elements from '..tab2str(tab))
    end
    return newTab
end
-- correct version
function luautils.removeFromTable(tab, elem)
    local found = 0
    for it,val in pairs (tab) do
        if val == elem then
            tab[it] = nil
            found = found + 1
        end
    end
    if luautils.Verbose and found ~= 1 then
        print ('luautils.removeFromTable removed '..found..' elements from '..tab2str(tab))
    end
    return tab -- tbh no need to return it cos it's same table but for backward compatibility it's fine
end
mellow frigate
tawdry solar
bronze yoke
#

if you loop through pairs you will not find keys that point to nil, otherwise every possible key would be in every table because all undefined keys point to nil

#

nil is not a value

fast galleon
#

Shouldn't they stay until garbage collection though?

bronze yoke
#

it depends what you mean by that

#

if the key was an object reference then the object will still exist until it's garbage collected, as would the value it pointed to if that was an object, but the key is immediately not 'part of the table' afaik

jaunty marten
red tiger
#

Convenient video to share here.

fast galleon
ancient grail
#

@hollow current
just saw thi s on vanilla and remembered your problem, might need to set both name and custom name? idk
hope this helps you out


function Recipe.OnCreate.GetMuffin(items, result, player, selectedItem)
    result:setBaseHunger(selectedItem:getBaseHunger() / 6);
    result:setHungChange(selectedItem:getHungChange() / 6);
    result:setCalories(selectedItem:getCalories() / 6);
    result:setProteins(selectedItem:getProteins() / 6);
    result:setLipids(selectedItem:getLipids() / 6);
    result:setCarbohydrates(selectedItem:getCarbohydrates() / 6);

    -- This gives a bonus. See Food.getHungerChange().
    result:setCooked(true);

    result:setName(selectedItem:getDisplayName());
    result:setCustomName(true);

    player:getInventory():AddItem("Base.MuffinTray");
    player:getInventory():Remove(selectedItem);
end
fast galleon
fast galleon
#

Anyhow.

lone nest
#

Does someone know or have an example of the API to call and spawn a zombie in the world?

I'm trying to create a function to spawns a zombie at the targetSquare in the world for testing my mod.

fast galleon
#

addZombiesInOutfit is the one I usually use.

lone nest
#

now I'm curious about what the default string outfits are

#

do you have a list or reference to outfits?

fast galleon
#

It should be the same as the list when you try to spawn the zombies with debug ui.

lone nest
#

... actually screw it, i'll just pass in a nil value and see what happens

bronze yoke
#

nil means random outfit

lone nest
#

yep, thanks, it'll do, i'm just testing some interactions between zombies and world objects

mellow frigate
granite ginkgo
#

Guys, why is the car's body texture offset in game but not in blender? What values should I thinker with?

wet sandal
late hound
#

Is there a guide somewhere that states which encodings are used by certain languages for the translation files?

wet sandal
#

I use VS code to open the game's built in translation for a langauge these days

bronze yoke
#

there's a table in the modding page on the wiki

wet sandal
#

You can click the encoding at the bottom right of the window and it offers to reopen with a different encoding

#

And it tells you what it probably is

#

Did not know about this table, nice

trim mist
#

I'm hoping to get someone's opinion on how to tackle an issue i'm facing. I'm gonna try to keep this really concise:

  • Working on furry trait mod
  • a small set of traits increase the nutrition, unhappiness, boredom bonus of a type of food (most often plants/meat)
  • I've hooked into oneat.perform to have it run the function that handles the increase
  • it works by detecting a tag on the food items that I set on game start.

Problem: Meals are created during runtime (soup, stew, roasts, etc). How do I apply item tags or otherwise give a bonus to these items? Thoughts:

  • See if one or two ingredient meals can be resolved into meat/plant based on their name (tomato and onion roast, for example, or Vegetable soup)
  • Access the ingredients somehow and determine if that a majority of the ingredients have the correct tag, apply the bonus
  • ???your solution or thoughts???
mild venture
#

Hi! What's a difference between vehicleObj:getId() and vehicleObj:getID() ?

bronze yoke
#

getID() returns an IsoObject id, getId() returns a vehicle id

wet sandal
#

Any of these good as keys for mod data?

#

Im testing trying to test sqlId across clients right now

bronze yoke
#

didn't test it myself but someone was in here earlier who found neither to be persistent

#

it would be absolutely crazy if sqlid isn't

mild venture
mild venture
wet sandal
#

Oh

#

lmao I see

#

Its the item id of the key item

#

that makes sense

#

Yup, sqlId is not persistent

#

I guess its my local dbs sqlId

tawdry solar
#

is it possible for custom vhs

bronze yoke
#

yes

tawdry solar
#

how?

#

im doing an inside joke for a friend

#

with one of his yt vids

tawdry solar
#
   module Base
{
    item VHS_Bananaman
    {
        DisplayCategory = Entertainment,
        Type                = Normal,
        DisplayName            = 7 PAVLOV SHACK! Facts, YOU already knew!,
        icon                = Cassette3,
        Weight                = 0.1,
        MediaCategory       = Home-VHS,
        WorldStaticModel = VHSBox3,
    } 


     model VHS_Bananaman
        {
        mesh=WorldItems/VHS_Banana,
        texture=WorldItems/VHS_Banana,
                scale=0.005,
            attachment world
        {
        offset = 0.0000 0.1500 0.1500
          rotate = 0.0000 0.0000 0.0000
        }
           }

}

this code is valid right?

wet sandal
#

Fastest way to check is probably to just boot the game in debug mode and give yourself the item

#

vehicle:getKeyId()

#

is working great

mellow frigate
tawdry solar
#

this shit is still chalanging

tawdry solar
# wet sandal

the discord server im in is doing an event with this mod and the extraction one

tawdry solar
#

there we are

#

just finished my pipe bomb mod

mellow frigate
#

Is there some sort of direct connection from Client to client or all com must go through server in dedicated MP ?

prisma wren
#

how easy would it be theoretically to replace weapon models

#

but not stats

#

would i just need to make a model and put it in the appropriate location with the name of the vanilla weapon

tawdry solar
#

just use base game code

#

and change model

mellow frigate
#

maybe change their associated 2D icon too

trim mist
thin hornet
trim mist
#

I'm going with solution #2 and i'm trying to access an index of a ?table? called ingredients that I get from an EvolvedRecipe class's getItemsList() function. Even though it's returning something for size() trying to access it as ingredients[i] is returning a nil

bronze yoke
#

it's not a table so indexing with [i] is not valid

thin hornet
#

ArrayList?
list:get(i)

trim mist
#

🤔 is it even possible to do this then?

for i = 0, ingredients:size() -1
    do
        for tag, count in pairs(tags)
        do
            local ingredient = ingredients[i]
            if ingredient:hasTag(tag)
            then
                count = count + 1
            end
        end
    end
bronze yoke
#

it's a map

trim mist
bronze yoke
#

the keys might not be numeric or continuous

trim mist
#

oh qwq

#

that's annoying

#

so then how am I supposed to know the difference between an item that's valid for this recipe vs. the items actually in the recipe?

#

there must be a way to get at them

bronze yoke
#

i'm trying to work out what this map even is

#

the keys are item types

crystal oar
#

before i start going down this rabbit hole, is it possible to add a button to the admin panel?

bronze yoke
#

yes

crystal oar
#

okay, and i hesitate to ask but is it difficult?

bronze yoke
#

well actually it's type : itemrecipe which doesn't seem to be the same thing as a recipe at all

trim mist
bronze yoke
#

i think itemrecipe just describes some of the properties of that item in the recipe?

trim mist
#

oh, let me see

trim mist
#

stressed this documentation isn't very helpful at all

bronze yoke
#

no this is basically all the class is as far as i can tell

#

it just stores some details of an item and how it's used in that recipe

#

i don't think this is what you're looking for

#

since you're hooking the add item to recipe action you should either add tags to the result every time an item gets added, or recalculate tags after items get added (depending on how much exactly you want a single item to influence the tags)

trim mist
bronze yoke
#

does the timed action not already know what item you're adding?

trim mist
#
local OriginalEvolvedRecipeAdd = ISAddItemInRecipe.perform
ISAddItemInRecipe.perform = function(self)

    OriginalEvolvedRecipeAdd(self);
    --get items in the recipe
    local ingredients = self.recipe:getItemsList();
    local tags = {}

    --get all tags relating to food, and init table with string keys so their count can be added to
    for _, tag in pairs(AnthroTraitsGlobals.EvolvedRecipeFoodTags)
    do
        tags[tag] = 0;
    end

    local tagWithLargestCount = "";
    local tagWithLargestCountCount = 0;

    --for each ingredient...
    for i = 0, ingredients:size() -1
    do
        -- for each tag...
        for tag, count in pairs(tags)
        do
            --if the ingredient has this tag, up the count for that key in tags
            local ingredient = ingredients[i]
            if ingredient:hasTag(tag)
            then
                count = count + 1
            end
        end
    end

    --for each tag...
    for tag, count in pairs(tags)
    do
        --record if the count is larger than the previous
        if count > tagWithLargestCountCount
        then
            tagWithLargestCount = tag;
            tagWithLargestCountCount = count;
        end
        --and remove the tag from the recipe to reset what food-tags it may already have
        if self.item:hasTag(tag)
        then
            self.item:removeTag(tag);
        end
    end

    --if the largest count tag is present on greater than 50% of the recipe's items...
    if tagWithLargestCountCount / ingredients:size() > .5
    then
        --add the tag to the item, so it can be handled appropriately when eaten.
        self.item:addTag(tagWithLargestCount);
    end
end
```lua
bronze yoke
#

try looking through the result item's getExtraItems() instead

trim mist
#

"self" has this:

bronze yoke
#

it's an arraylist of strings, i think you'll need to check their tags with the scriptmanager or something

trim mist
#

who knew this would get this complicated

#

i'll give it a try. For now i'm gonna comment my code above

mild venture
#

Hello again, everyone. How can I change the coordinates of BaseVehicle? setX, setY don't work for unknown reason. Does not raise errors

bronze yoke
#

that's because the vehicle's position is controlled by the physics engine

mild venture
#

Hm, what method can I use?

#

I tried

        local oX = vehicle:getX()
        local oY = vehicle:getY()
        vehicle:setPhysicsActive(false)
        vehicle:setX(oX - xDif)
        vehicle:setY(oX - yDif)
        vehicle:setPhysicsActive(true)

don't work

bronze yoke
#

try setBulletActive

#

not really sure why those are different methods, they sound like they should do the same thing, but i'm not able to check right now so maybe this one works better

mild venture
# bronze yoke try setBulletActive

Unfortunately there is no effect.

        local oX = vehicle:getX()
        local oY = vehicle:getY()
        vehicle:setActiveInBullet(false)
        vehicle:setX(oX - xDif)
        vehicle:setY(oX - yDif)
        vehicle:setActiveInBullet(true)
bronze yoke
#

you could try setWorldTransform if transforms are exposed and like, manipulable

sinful scaffold
#

Now I just gotta figure out how to make it work properly in MP.

ornate grotto
#

guys how do i make like a Wait() function?

mild venture
bronze yoke
#

nowhere, i've never seen anyone do this before

mild venture
#

oh

tawny depot
#

Hey! Anyone here know if there's any way to get a chunk's corpse data in LUA? I know it's not exposed but maybe there's a roundabout way to do this?

bronze yoke
#

that's why i included the 'if transforms are exposed and manipulable' lol, i have no clue

ornate grotto
#

also guys how do i make so character fully heals on a function ig

bronze yoke
tawny depot
#

I want to get the number of corpses in a given chunk

#

in Java this is easy as the IsoChunk has a FliesSound.ChunkData field which has a ChunkLevelData data object with a corpseCount variable

#

however this is not exposed on LUA as far as I can see

bronze yoke
#

yeah, i don't see any way to get that

#

you can loop through all of the squares in the chunk and count the corpses you find in their getStaticMovingObjects

tawny depot
#

are corpses a specific type?

#

that was a bad question one sec let me rephrase

#

if I have a reference to a given square, I am able to get all instances of corpses on that square?

#

I haven't read through a IsoGridSquare, but I just want to know if that's even something I can access

bronze yoke
#

you can loop through getStaticMovingObjects and check how many of the objects in that array are IsoDeadBody objects

#

oh actually

#

there's just a getDeadBodys

ornate grotto
#

guys pls how do i make a thing where caharacter heals fully

#

like no sickness

bronze yoke
#

you can just add up the size of every square's getDeadBodys array

ornate grotto
#

no pain

trim mist
#

You don't think i'll be missing the just-added item this way, do you?

bronze yoke
#

i don't see how it could be missing after the action would have normally completed

tawny depot
#

Is that on the gridsquare class?

bronze yoke
#

ya!

trim mist
bronze yoke
#

that probably will be kind of slow, so i hope it's not something you need to call often

#

you might be able to cache it without too much trouble...?

tawny depot
#

Right, I mean if it's a small radius I could also just do that , a 3x3 grid is only 9 calls

#

plus I can just append them all to one list and have the loop just be accessing the list

#

and adding it to another bigger list

wet sandal
#

Anyone here the dev of one of those:
"Put an icon on things you've found, checkmark on books you've read, etc" mods?

Want to use one if possible as a backend for inventory tetris so I only have to read the data and handle rendering instead of remaking my own implementation.

tawny depot
#

I'll need to look into LUA performance though, are loops typically resource expensive?

mild venture
#

I think java api calls more expensive

tawny depot
#

Ah that makes sense

#

I imagine it's mostly the controller layer between the two that causes the slowdown?

bronze yoke
tawny depot
#

right of course

#

N^2 is bad

bronze yoke
#

most performance issues in mods i've seen have been from irresponsible loops

ornate grotto
#

guys pls tell me how do i do like "wait" function

bronze yoke
#

there is no wait equivalent in pz, you can find an implementation or create your own

#

i think vishnya has a timer api on the workshop

tawny depot
#

from my understanding the LUA scripts are not asynchronous and if you called a wait function it will halt the entire game

#

but I could be way off base

bronze yoke
#

ya

#

we usually just check every tick if it's time to call the function

tawny depot
#

Quick question albion, in the decompiled lua, do I have access to all the @field public ... fields directly in the LUA?

#

eg: here's the top of IsoChunk

---@class IsoChunk : zombie.iso.IsoChunk
---@field public bDoServerRequests boolean
---@field public wx int
---@field public wy int
---@field public squares IsoGridSquare[][]
---@field public corpseData FliesSound.ChunkData

do I have direct access to wx, wy, squares, corpsedata... ?

bronze yoke
#

not quite

#

there's some weird method to grab fields but usually you just use a getter method

#

to grab a field that doesn't have a getter you need a whole bunch of api calls

wary dust
tawny depot
#

I hate this

#

this.squares[var3][var2 * 10 + var1]

red tiger
tawny depot
#

hahahaha

red tiger
#

That's not a common theme here

tawny depot
#

this is straight from the java code LMAO

red tiger
#

Yes.

wary dust
#

my bad didn't realize there was a convo going on lol didn't mean to butt in

tawny depot
#

why no 3d array 😭

red tiger
#

I've spent almost 2000 hours inside the core engine

mild venture
#

I can't find a solution for moving cars. Is it really impossible? A lot of work for nothing 😦

tawny depot
#

because reading this is really...

#

painful 😭

red tiger
bronze yoke
#

try beautiful java

red tiger
#

Sounds good not as much as you think

bronze yoke
#

it won't fix the logic but it makes things a bit easier to follow

mild venture
#

@red tiger Do you happen to know a way to change the coordinates of the car?

tawny depot
#

2d 3d array isn't real it cannot hurt you

mild venture
#

uh

red tiger
#

Okay now do 1D array of 2D coordinates

tawny depot
#

Me when 1d array tree

#

it's over

#

OO save me

tawny depot
red tiger
#

I'm a code goblin.

#

It's far more thrilling to core mod

wet sandal
#

I prefer the challange of backflipping between the cracks of 18 other mods in lua, in a hopeless quest for compatibility

red tiger
#

Can't fix cracks in the floor when the foundation is compromised.

tawny depot
#

simply ignore compatibility

#

if it breaks, it was not meant to be

#

que cera cera

wet sandal
#

You'd be surprised what you can fix with:

-- your entire file
end)```
deft plaza
#

alright I know someone is gonna get a butthurt because I asked for help

#

What is wrong with my code

#

also the other mod I made works

crystal oar
#

glad to hear you got the other mod working, does commenting out the days fresh and days rotten work like that?

deft plaza
#

I just copied and pasted the cookie code into the txt made it mine basically

crystal oar
#

still looking over it but had to lol at this. Why you eating me bro? lol

deft plaza
#

my fault lol

crystal oar
#

trying to dig up cookie in my game's code now, i don't see anything wrong with it

wet sandal
#

The display name perhaps

#

has a '

crystal oar
#

the apostrophe?

#

ah word

wet sandal
#

Just jumps out as a special character

crystal oar
#

Jack'o'lantern works tho

deft plaza
#

can that be a problem

crystal oar
#
    {
        DisplayName = Jack'o'lantern,
        DisplayCategory = Food,
        Type = Food,
        Weight = 1,
        Icon = Jackolantern,
        DaysFresh = 5,
        DaysTotallyRotten = 8,
        HungerChange = -40,
        Calories = 404,
        Carbohydrates = 20.45,
        Lipids = 20.61,
        Proteins = 34.53,
        WorldStaticModel = Jackolantern_Ground,
    }```
deft plaza
#

???

wet sandal
#

Probably not the issue then

#

Someone earlier had a comma in their displayname which was their issue

crystal oar
#

i sometimes see commas on offset and rotate, sometimes i don't. does anyone know which is right?

wet sandal
#

I think either is fine. ZScript is really forgiving.

#

But that makes it kind of confusing imo

crystal oar
#

oh that would explain why i see both

#

could it be the issue you were having the other day where you had two copies of the mod and the wrong one was loading?

deft plaza
#

just workshop

crystal oar
#

well shoot, i'm looking at this cookie and seeing nothing wrong with it. so it's just not showing up in itempicker?

deft plaza
#

nope

#

not showing up

crystal oar
#

okay so the problem has to be with the item block not the model block (i think)

deft plaza
#

item block?

crystal oar
#

ya the block of code that starts with item

deft plaza
#

wait if I update the folder do I have to update the workshop item?

#

its hidden btw

crystal oar
#

i'm not 100% on what you are asking but just because you change stuff with the files in your workshop folder does not meran you need to update the workshop item.

deft plaza
#

okay

#

this look right?

crystal oar
#

you will run into errors trying to join servers running the workshop version of your mod if you have a newer version on your computer tho

#

looks to me like cookiebox doesn't have a filetype

#

should be .txt right?

deft plaza
#

but one thing at a time I guess

crystal oar
#

can you show me the folders with the icon and worlditems if you don't mind?

deft plaza
#

sure thing

crystal oar
#

i mean that looks right

#

anyone smarter than me able to help?

heavy steeple
#

can anyone post me a guide on how to make an item forageable?

crystal oar
#

does NearItem= reference a tile or any tile or item?

deft plaza
#

anyone can answer my question anytime just means more time for me to relax lol

heavy steeple
#

do an imports {base}

deft plaza
#

alright

heavy steeple
#

imports {
base
}

#

same indexation as the item

deft plaza
#

like this?

heavy steeple
#

where is the module base with the {} emcompassing all?

deft plaza
#

what

heavy steeple
#

like this

deft plaza
#

oh I removed lol I thought you wanted me to remove it

heavy steeple
#

ya

deft plaza
#

okay thanks let's see if it works

heavy steeple
#

imports means you are importing the base library to your mod

deft plaza
heavy steeple
#

more or less

deft plaza
#

oh okay

heavy steeple
#

its more techy stuff but yeah

deft plaza
#

nice

heavy steeple
#

in a nutshell it means your code uses the base code to run

#

think of it as using action.eat
without the import action.eat means nothing, but its defined elsewhere what action is and eat is a derivative of action

#

so any code that expands the base game needs to import the base code for it to properly work

deft plaza
#

I keep making a backup and only editing that and forgetting to add it to the workshop folder

heavy steeple
#

did it work?

deft plaza
heavy steeple
deft plaza
#

Hey sorry again guys

#

I just need to know If I'm doing this right

trim mist
#

This might be a silly question. but. Is it possible I could do this?

SandboxVars.ModName[partialString.."_cost"]
wet sandal
#

yes

bronze yoke
#

yeah

trim mist
#

oh poggers let's goooo

deft plaza
#

okay good news the item is there but no model

novel barn
#

👋 good evening/morning/afternoon everyone! I'm trying to write a temporary function that checks the player's inventory to determine if they have a bag eligible to hold dirt. I've dug into ISShovelGroundCursor.GetEmptyItem which I believe is where the game starts to determine if the player has an eligible fillable item. The function I'm currently studying in the game files is as follows:

local function predicateEmpty(item)
    return item:hasTag("HoldDirt") and item:getInventory():isEmpty();
end

function ISShovelGroundCursor.GetEmptyItem(playerObj, groundType)
    local playerInv = playerObj:getInventory()
    local fullType
    if groundType == "dirt" then
        fullType = "Base.Dirtbag"
    elseif groundType == "gravel" then
        fullType = "Base.Gravelbag"
    elseif groundType == "sand" then
        fullType = "Base.Sandbag"
    end
    local item = playerInv:getBestEvalArgRecurse(predicateTypeNotFull, comparatorMostFull, fullType)
    if not item then
        item = playerInv:getFirstEvalRecurse(predicateEmpty)
    end
    return fullType,item
end

I'm writing my own function to determine empty items so I'm not worried about returning fullType at the moment. I'm only interested in understanding item = playerInv:getFirstEvalRecurse(predicateEmpty) I don't understand what's going on here. getFirstEvalRecurse must be a method that isn't exposed to lua because I only find places where it's called, never where it's declared. predicateEmpty is declared locally at the top of the file but when it's called it doesn't send an item parameter, yet the local definition expects one?

**Can anyone clarify where getFirstEvalRecurse is coming from and how predicateEmpty is defined expecting a parameter but isn't called with one? **

bronze yoke
#

getFirstEvalRecurse is an ItemContainer method, it returns the first item in the container or any subcontainers that the function passed to it returns true for

#

predicateEmpty's usage there isn't a call, it's passing the reference to the function to the java so that it can be called by it later (similar to adding a function to an event), so the parameters aren't passed from this side of the code

#

iirc it just passes the item and nothing else

novel barn
#

I'm trying to wrap my tiny little brain around what you just said. Is the following statement true or false? "The local definition of predicateEmpty is not called or referenced in any way by playerInv:getFirstEvalRecurse(predicateEmpty)"

bronze yoke
#

it passes that function to the java method, which then calls the function

#

it basically just loops through its item list, calls the function you gave it for each item with the item as a parameter, and returns the first item that the given function returns true with

novel barn
#

okay that's starting to make sense. Thanks! I still can't find the definition for getFirstEvalRecurse anywhere. I started looking for ItemContainer too. Are either of them exposed to lua in a way that I can read the definition? Is my local workspace just hosed and is that why I can't find them?

bronze yoke
#

it sounds like it, are you using umbrella?

novel barn
#

I am

#

I'm going to remove my PZ workspace folder and re-add it.

bronze yoke
#

all these Eval methods basically just let you use a function to filter what items they return

novel barn
#

I'm just getting more frustrated and I should be in bed anyway. I'm going to tackle this in the morning. Thanks for the help as always Albion! You rock!

rancid panther
#

uploaded my abandoned blackouts mod, since the main feature of the mod was finished and just sitting for months

rancid panther
#

crap i forgot to add required mod 🤦

rancid panther
#

thanks for your help on the mod! i have trouble following advice so i only applied what worked and what i could understand

#

it's in the same state as it was however many months ago, but it seems to work just fine

#

im sure someone will be able to make a better one in the future, but at least now we have one

rocky zephyr
#

Can anyone point me to a "Getting started" guide for modding in PZ? can't really seem to find one

ornate grotto
#

guys how do i use the lua timer thing

#

on workshop

#

for addon

fast galleon
# rocky zephyr Can anyone point me to a "Getting started" guide for modding in PZ? can't really...

Hello, welcome to PZ mod development!
Here are some links with resources to get familiar with making mods for Project Zomboid.
https://pzwiki.net/wiki/Modding
https://github.com/FWolfe/Zomboid-Modding-Guide

GitHub

Guide to modding various aspects of Project Zomboid - GitHub - FWolfe/Zomboid-Modding-Guide: Guide to modding various aspects of Project Zomboid

ornate grotto
#

guys how do i change player texture?

#

like not clothes

#

but the player itself

#

i wnat to make player look like a zombie

ornate grotto
#

no

#

(im actually editing it to be better and to upgrade my skills but i wont publish cuz i aint got permission to do so) im making it better so player looks like a zombie by a texture cuz there is no this thing rn

fast galleon
#

Sorry, I'm not familiar with this.

ornate grotto
#

ok

ornate grotto
#

so will anyone help

red tiger
#

Good morning.

red tiger
# ornate grotto so will anyone help

The best thing to do in this situation is wait a bit and then kindly ask again. Make sure not to be spammy when doing it and you should eventually get help.

ancient grail
ornate grotto
#

so what is the name of zombie texture or where do i get it?

ancient grail
#

You need to create zed looking assets . Or just require authentic z
As it does have a bunch of zed skins

ornate grotto
#

i found :SetTexture()

ancient grail
#

Thats if the clothing has multi textures

#

Like tshirts has bunch of texture
So it has index

#

SetTexture(1)

#

You will see this on the clothing xml

#

Goodluck

mild venture
#

Guys, I already asked yesterday, at night. Maybe someone knows how to change the coordinates of the car? Maybe there is some way? Ordinary setX and setY don't work

mild venture
#

i need it on mp

ancient grail
#

Not that i know of ..sorry

#

I know how to rotate it but not teleport it

#

Goodluck

bronze yoke
#

it depends what you're trying to do but i know some mods have a way of storing vehicles and respawning them elsewhere, that could be a hack for it

fading horizon
#

not exactlymod related but i figured some of y'all would think its cool

red tiger
#

IMO Valve doesn't care about improving the workshop tools / setup.

bronze yoke
#

it definitely seems that way

tame mulch
ornate grotto
#

guys how to play animations for player?

mellow frigate
#

Hello,
I'm trying to put my player on its knees to eat a corpse.
My player is eating the corpse but does not drop on its knees

<?xml version="1.0" encoding="utf-8"?>
<animNode>
    <m_Name>IdleToEatInfected</m_Name>
    <m_AnimName>Zombie_IdleTo_OnKnees</m_AnimName><!--Zombie_IdleToEating-->
    <m_Looped>false</m_Looped>
    <m_SyncTrackingEnabled>false</m_SyncTrackingEnabled>
    <m_EarlyBlendOut>false</m_EarlyBlendOut>
    <m_SpeedScale>0.56</m_SpeedScale>
    <m_BlendTime>0.50</m_BlendTime>
    <m_Scalar></m_Scalar>
    <m_Scalar2></m_Scalar2>
    <m_Conditions>
        <m_Name>PerformingAction</m_Name>
        <m_Type>STRING</m_Type>
        <m_StringValue>FeastOnCorpse</m_StringValue><!--action activation-->
    </m_Conditions>
    <m_Conditions>
        <m_Name>isInfected</m_Name>
        <m_Type>BOOL</m_Type>
        <m_BoolValue>true</m_BoolValue>
    </m_Conditions>
    <m_Events>
        <m_EventName>SetVariable</m_EventName>
        <m_Time>End</m_Time>
        <m_ParameterValue>EatingStarted=true</m_ParameterValue>
    </m_Events>
</animNode>```

```<!--player/actions/eatingInfected.xml new file: loop animation-->
<?xml version="1.0" encoding="utf-8"?>
<animNode>
    <m_Name>eatingInfected</m_Name>
    <m_AnimName>Zombie_IdleEating_OnKnees</m_AnimName><!--Zombie_IdleEating-->
    <m_deferredBoneAxis>Y</m_deferredBoneAxis>
    <m_SyncTrackingEnabled>false</m_SyncTrackingEnabled>
    <m_SpeedScale>EatSpeed</m_SpeedScale>
    <m_BlendTime>0.50</m_BlendTime>
    <m_Conditions>
        <m_Name>EatingStarted</m_Name>
        <m_Type>BOOL</m_Type>
        <m_BoolValue>true</m_BoolValue>
    </m_Conditions>
    <m_Conditions>
        <m_Name>isInfected</m_Name>
        <m_Type>BOOL</m_Type>
        <m_BoolValue>true</m_BoolValue>
    </m_Conditions>
</animNode>```
#

We can see on the log below that both animations are started together.
I also wonder if there is something from Zombie_Idle that is still maintaining the character standing.
Anyone has cues on what I'm doing wrong ?

ornate grotto
#

i think

#

infected players right?

red tiger
mellow frigate
ornate grotto
red tiger
mild venture
# bronze yoke it depends what you're trying to do but i know some mods have a way of storing v...

like this? https://github.com/xyberviri/CarWanna/
Im doing admin tool for mass car moving. And if you use this method, then, for example, items inside cars will be lost. And the key id will also change

GitHub

Multiplayer car spawning library for Project Zomboid. - GitHub - xyberviri/CarWanna: Multiplayer car spawning library for Project Zomboid.

ornate grotto
#

and do ya know that your mod is on the front page?

mild venture
bronze yoke
tame mulch
mild venture
mild venture
red tiger
mild venture
tame mulch
red tiger
tame mulch
#

no)

#

only for first part

red tiger
#

That's class reflection API.

#

Okay.

#

Yeah I was about to say.

mild venture
tame mulch
#

mp vehicle sync

red tiger
#

Yeah. desync is a bitch.

#

The server would have to pause the simulation and sync the physics clocks.

#

:D

mild venture
#

Maybe we can send some kind of synchronization command?

red tiger
#

(Speaking vaguely on purpose)

deft plaza
#

is there anything I'm doing wrong here

tawdry solar
deft plaza
tawdry solar
#
module MM_Roundmeal
{
    model ROUNDMEAL_1
    {
        mesh = WorldItems/ROUNDMEAL,
        texture = WorldItems/ROUNDMEAL,
        scale = 0.01,
    }
}
#

this is one of mine

#

the least i could do for the help

deft plaza
#

alright cool

tawdry solar
#

just did this too

deft plaza
tawdry solar
#

im gonna upload

deft plaza
tawdry solar
#

i added a custom item with it too

deft plaza
tawdry solar
#

who was that guy who wanted somone to model?

#

he didnt dm

deft plaza
#

he is not up yet I guess

tawdry solar
#

yeah i didnt get a friend req or dm

#

what does he did it for?

#

ooh

#

he was the tribal mod guy wasnt he

deft plaza
#

not sure

tawdry solar
#

stone age or wtv

#

yeah

verbal yew
#

Guys, need your help with joypad keys.
getCore():getKey("Left") - it's for keyboard, whats key should be on joypad?

#

or it's same?

verbal yew
deft plaza
#

any clue why its not showing the model?

tawny depot
#

Broooo

#

the whitespace 😭

deft plaza
tawny depot
#

I know we've said this and it's been sort of a meme but you really need to organize the layout of that better. Mainly because with spacing like that it's hard to read

#

You can use prettier to have it automatically make your code look better

deft plaza
#

alright thanks

#

I guess I'

#

I'll use it

tawny depot
#

Also, do you have any references for how other models are made?

deft plaza
#

what do mean?

tawny depot
#

like

#

okay, I'll go through how I would think of this problem