#mod_development

1 messages ยท Page 459 of 1

karmic reef
#

I'm guessing it has to do with the AttachmentType tag?

late hound
#

You are correct

karmic reef
#

Okay, thanks.

nimble spoke
#

actually in the lua file where the attachments are defined, changing an item's attachment type will change all atchments for that item, not ideal

#

most of them will look totally off

karmic reef
#

So, it would be positioned where the new points were defined?

echo leaf
#

Does Hunting Slime frequent this discord?

#

Cant find him/her in the members list, perhaps the have a different discord name

#

@undone heron that's not you is it?

undone heron
#

ye

echo leaf
#

Hey dude

#

I use your awesome trait mod

#

I believe you just updated it?

#

And it's started throwing 100's of errors a second for me

#

I think I've narrowed it down to the SadoMasicistTrait.lua not patching in the masochist trait after it patches in the sadist trait

#
    --add this patch so it can be enabled on existing games.
    local player = getPlayer();
    if  player:hasModData() 
        and player:getModData().currentZombieKills ~= nil
        then return
        else  
        player:getModData().currentZombieKills = player:getZombieKills();
    end 
end 
Events.OnGameStart.Add(sadistTraitData);
Events.OnCreatePlayer.Add(sadistTraitData);```
undone heron
#

it had a typo, it's fixed

echo leaf
#

But no function to do the same for the other trait

#

Ah brilliant thank you sir

#

or maam

#

๐Ÿ˜„

undone heron
#

hasTrait vs HasTrait

echo leaf
#

syntax

#

smh

#

Nice catch, I guess I was way off lol. I'll delete those comments from the mod page

#

Appreciate the quick fix

#

Fix works, thanks!

undone heron
#

masochist also doesn't had ModData() since it just works off pain level. sadist however needs to keep track of your kill count so it needs to be saved

echo leaf
#

I see, makes sense

#

I dig these traits, thanks for the updates. Keep em comin!

undone heron
#

ty, and also to the people giving suggestions. Tho sad some ideas they have are outside my skill level to make.

#

like a greyscale shader for a colorblind trait would be neat but outside my skill level.

#

or like yepthatsmyname suggested: a bad trait that makes the fog of war show up instantly instead of re-appear after you finish sleeping

echo leaf
#

chronic migraines:
fov and hearing is limited, pain increased (happens randomly)

#

@undone heron thanks again for the quick fix; thought i'd lost my save for a few minutes

#

Oh and hey Soul I see you on here too, got a sec to talk about Farming?

nimble spoke
echo leaf
#

@nimble spoke Rad!

undone heron
#

yeah FoV /camera stuff is what's outside my skill limit. can't find variables for it to manipulate it

echo leaf
#

I'm getting the duplicate option for sow seed

#

The upper option works

#

The lower option throws an error

#

And sometimes the wheat is unharvestable even when appearing as "Harvest ready"

#

Not sure what causes that issue though

nimble spoke
#

No other farming mods, right?

echo leaf
#

The only other one I can think of is Green Fire

nimble spoke
#

well.... uhhh I see cannabis in there

echo leaf
#

And I honestly didn't think of that as being a culprit until you asked

#

I can toggle that one off and see if the dupe is still an issue

nimble spoke
#

and lemongrass, which I haven't added in there yet

#

that would help

echo leaf
#

Lemongrass... that's probably from the orphanage

nimble spoke
#

I have it in my mod unfinished, but I didn't add it to the menu

echo leaf
#

Hmm curious, I'll look into that as well

#

Okay well it doesnt appear to be green fire

#

Disabled that and still getting dupes

#

But still see lemongrass

#

So gotta figure out where that's coming from

undone heron
#

hmmm, some clipping on it still, tho how does this look?

nimble spoke
#

So weird, I haven't updated it for some time so I have no idea why it started happening. I will update when I have a fix

undone heron
#

ok yeah that looks better, cleaned up the white part leaking thru the black.

echo leaf
#

Soul, is Lemongrass a vanilla item...?

#

It's listed there

#

No lemongrass or farming related mods

#

I mean the good news is it's not at all game breaking

#

Just... dont use the second option in the dropdown for sow seed ๐Ÿ˜„

#

Okay so lemongrass is a herb you can collect but not a seed you can grow in vanilla

#

So it's gotta be a sneaky mod I have

#

Yeahhhh

#

Okay found it

#

@nimble spoke ^

nimble spoke
#

is it causing the duplications?

echo leaf
#

Its the mod that added lemongrass, at least

#

So, the only other mod affecting farming

#

Testing w/o it now

#

No mods

#

With only Soul Filcher's Farming Time enabled:

#

So I think something's gone amiss with your stuff @nimble spoke ๐Ÿ˜ฆ

#

Happy to help debug more just lmk

nimble spoke
#

I'll check that later today, it is just weird that I haven't changed anything that could cause that

echo leaf
#

๐Ÿคทโ€โ™‚๏ธ

#

Thanks for checking

undone heron
#

for the Librarian profession, what would you expect them to have skill wise?

echo leaf
#

Short eyesight

carmine cosmos
#

That's actually funny ๐Ÿ˜„

echo leaf
#

And low run/sprint but high carry

echo leaf
#

Very nimble and quiet

#

Basically, not very fast or a good runner. Cant see very far/wide. But can hear very well, can move around sneakily and carry a lot (used to carrying books!)

#

That's my two cents

#

Maybe increased vision with glasses lol

#

probably out of scope on that last bit

jovial summit
#

Fast reader too

#

Organized

undone heron
#

I'm talking about for a modding profession. Giving them all that by default would leave the player with little choice like the other professions or I would need to do like -20 point cost lul

echo leaf
#

You dont have to take all of it ๐Ÿ™‚ Just throwing ideas out

drifting ore
#

Hey i have some mods installed and now my context menu won't open

#

Any repeat offenders or likely culprits?

echo leaf
#

Your best bet is to remove them until it comes back

#

in order to deduce which is causing the issue

drifting ore
#

Yeah but i have a lot on and it's kind of a hassle to mess with mods on pz

echo leaf
#

have you checked for any obvious errors in the console log?

drifting ore
#

I guess

#

No

#

Idk how to open it

echo leaf
#

C:\Users\USERNAME\Zomboid\console.txt

#

You can create a preset of all your currently enabled mods

#

And then start disabling them to figure out which is the issue

#

and then use your preset to turn the ones that you had on back on later

#

gl

drifting ore
#

Oh nice

#

Yeah that helps

echo leaf
#

If the problem just started happening recently I'd recommend disabling the most recent mods you've enabled first

drifting ore
#

I just started using mods

#

But i have a problem with adding loads at once

echo leaf
#

haha

#

I can do you a solid if you're open to a quick shill

drifting ore
#

Sure

#

I think i figured it out

echo leaf
#

Nice nice, what was it

drifting ore
#

Nvm

#

It's still not working

echo leaf
#

rip

nimble spoke
#

@echo leaf do the other 2 farming mods require mine?

nimble spoke
#

uhhhhh, I wonder how these are even compatible then

echo leaf
#

I havent tried farming the weed or tobacco yet, but your stuff works fine with those enabled

#

Other than the dupe context options

#

But that issue exists with only your mod enabled anywho

nimble spoke
#

have you ever tried playing with those 2 without mine?

misty iron
#

is there any particular reason 'math.ceil' works and 'math.ceiling' doesn't?

undone heron
#

This looks good? What would you feel the point cost of this should be? atm it's 0.

echo leaf
#

What's literacy do?

undone heron
#

affects reading speed

echo leaf
#

Is that a vanilla thing?

undone heron
#

no

echo leaf
#

ah

#

I dig it

#

Walk while reading is clutch

#

can you read while driving?

#

no that should be for a tween trait

#

Texting and driving skill

undone heron
#

the Librarian is apart of a mod Better Literature: A Literacy skill mod. Adds in a new passive skill called literacy and reworks the reading system a tiny bit.

echo leaf
#

never seen that mod

undone heron
#

it's new

echo leaf
#

not on steam?

undone heron
#

it's so new, you could say it's still in development

echo leaf
#

aha

#

I was like

#

"I want this"

#

But cannot find

undone heron
#

basically more you read, more you level up the skill. higher level skill, faster you read. lower level of the skill from 'average' (5) slower you read.

echo leaf
#

yeah i really like that

#

I like the traits that evolve with you as you do stuff

undone heron
#

Fast reader no longer 'makes you read faster'. it just gives you +2 literacy (which makes you read faster).
Slow reader does the reverse with -2 literacy.

echo leaf
#

thats neat

#

does reading magazines and the like affect literacy as well?

undone heron
#

it reworks magazines, books, comics to have page count and it does affect them.

echo leaf
#

cool cool

#

gonna need some sort of

#

eyestrain balance mechanic

#

otherwise im just gonna read for 12 days straight

undone heron
#

doooo it

echo leaf
#

also never understood how i can read in the pitch black of midnight in a blacked out room

#

or how i can read at the same rate, at least

undone heron
#

ยฏ_(ใƒ„)_/ยฏ

#

you also gain walking and reading by just leveling the skill up to 9. so you don't need the librarian for it. the librarian is just a cheat for it

echo leaf
#

I'd love a trait that lets me equip/unequip a weapon while running

undone heron
#

that could be possible

echo leaf
#

gif too fast

#

much betta

quaint finch
#

lmao i found this always sunny reference on a moving truck

#

assuming its from filibuster rhymes but it absolutely made my day either way

echo leaf
#

Also a craft while moving trait

#

Like lemme sharpen a branch into a spear while I'm running for my life

worldly olive
#

Hi everyone!
Is there any method (I assume not) that works the opposite as: TraitFactory.setMutualExclusive? I mean, if you pick a Trait "A" on the Character creation, it automatically picks "Trait B" too and vice versa

worldly olive
#

Or is there any event that is triggered when a trait is added in the Character selection?

autumn sierra
#

imo I think there should be a glasses wearer trait that gives you skill points, I suggested this earlier this week but sort of jokingly, but I feel like this could actually be doable: basically, the trait would make the player need to wear glasses, otherwise, the player's visibility cone would shrink almost entirely, and will not be restored until the player puts the glasses back on. Maybe even glasses durability that has a chance to go down when glasses are dropped or fall off the player's face

#

not sure how easy it would be

undone heron
#

if i knew how to mess with the FOV then I would but dunno how to

craggy furnace
undone heron
#

ooooo

autumn sierra
#

im not sure, ive never played with it

#

would be a cool standalone mod tho

plucky nova
grizzled grove
#

i know there was a hearing aid to fix hard of hearing

plucky nova
#

like, it doesnt show up on the main menus character creator, but in game it does

plucky nova
#

once again, never used it

grizzled grove
#

free points ๐Ÿ™‚

plucky nova
#

lol

#

idk, maybe they are

echo leaf
#

@undone heron some of the weapons attachments from the brita pack affect fov, maybe take a look there?

undone heron
#

hmmm, good place to look then

faint phoenix
#

when will the Literacy mod release?

undone heron
#

when I'm comfortable enough and get a few cross-mod things working

faint phoenix
#

alright ty, gl!

ember orchid
undone heron
#

having some issues atm. it is okay with overwriting better lockpick's magazine, but not scrap weapon or L&M's

nimble spoke
undone heron
#

so I am doing a small overhaul and giving everything a page count

nimble spoke
undone heron
#

so I finished going thru some popular mods and making overrides for their skill magazines.

#

that I did manually

nimble spoke
#

override the timed action -> check the list of recipes in the item if it doesnt have a number of pages value -> use list of recipe's size to find the desired num ber of pages -> give xp

#

you may also want to do some math for boredom change or something like that too

undone heron
#

theres also books, comic books, and news papers from other mods that don't go by the name "books" "newspapers" "magazines" "comicbooks"

low anvil
#

Does anyone have any mods to suggest that add in anything about farming or cooking content that isnt part of Hydrocraft for B40?

misty iron
#

does anyone know how to use getRandomOutdoorFreeTile()?

undone heron
echo leaf
#

that's actually clever

nimble spoke
quaint finch
#

if thats anything

nimble spoke
#

getTeachedRecipes() <--- returns a table with the recipes, get the size of the table

misty iron
#

Will this work? getPlayer():getCell():getRandomOutdoorFreeTile(). Not sure how to use it.

undone heron
undone heron
#

it's 1am but I don't care I got the recipe counted in a dumb way but it works

#
    local testVariableThree = item:getTeachedRecipes();
    local testVariableFour = 0;

    for i in string.gmatch(tostring(testVariableThree), "[^,]+") do
        print(i)
        testVariableFour = testVariableFour + 1;
    end
undone heron
#

And got the formula for rest of them.

Math.floor(((Unhappiness+stress+boredom)/2)/8) *8

solemn horizon
#

hey guys, is there an easy way to edit/add an existing trait ? i have minimal understanding of modding

#

to be more precise i would like to add a new trait for lucky but with less chance for extra loot and maybe cost less points

drifting ore
#

Hey can someone help me figure out a bug

#

LOG : General , 1618389796779> 1618389796779 znet: ZNetFriends::OnPersonaStateChange
LOG : General , 1618389802140> reloading C:\Users\deadk\Zomboid\joypads\XInputController0.config
LOG : General , 1618389802177> new focus nil table 0x2075241671
LOG : General , 1618389802178> update focus new should be table 0x2075241671

rapid flax
carmine cosmos
signal vigil
#

Hey does anyone know a way of having the electrical grid and water supply never shut off?

carmine cosmos
signal vigil
#

A mod would be helpful as I have no experience in making any mod myself XD

carmine cosmos
lethal sparrow
carmine cosmos
#

However I can add this to the list if you are unable to find a solution

#

Just checked, and Sandbox+ does not offer no-shutoff option

signal vigil
#

thanks for the help guys

sour island
#

np

fallow bridge
undone heron
#

need a save the station style mod but for power and water

undone heron
#

Having issues wrapping my head around lua table lists. if anyone would like to help: that'll be awesome. Here is what I have so far.

local function onInventoryFill(_room, _containerType, _inventoryOfContainer)
    local test1 = _inventoryOfContainer:getItems();
    print("VARIABLE ONE TEST");
    print(tostring(test1));
end
Events.OnFillContainer.Add(onInventoryFill);

So when a container is spawned, the event fires.
I get the items of the container into a variable as a list (test1)
I then need to get and check each item on the list <----- This is what I'm having trouble figuring out
I check the item by using the IsLiterature() boolean
If true, I do my stuff of editing the item (which I know works from a separate function)
if false, continue on the list

#

~~ I cant do what I did yesterday with the cheese of converting the whole list into a string, separating it base of the commas, and counting how many times it got separated. I actually need to access the items~~

undone crag
#

Maybe something like this

for index=0, known:size() -1 do
    print(index, known:get(index))
end
```https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/api/README.md
nimble spoke
undone heron
#

let me take a picture

nimble spoke
undone heron
#

wrong picture

radiant ginkgo
undone heron
#

so by using
Events.OnFillContainer.Add(onInventoryFill);
I can see if anything is (nice car) marked as literature when it is created. If it is, run the page code on it.

#

and I think Mr Anon gave me the piece I needed to finish

willow estuary
#

Uh, just use item tweaker and assign page counts to the literature items that way.
Going off of OnFillContainer has a hit on performance, and is also the insanely over complicated solution to this issue as opposed to just using Item Tweaker.

#

It's a clever solution, but unnecessary.

undone heron
#

what is itemtweaker and will it affect even modded items

#

or will I have to assign every value for modded items individually

radiant ginkgo
undone heron
#

because I was originally going thru mods and making scripts to override book items: then soul was "just use a function to do it automatically". Now if it's back to manual, I might just stick to having it automatically happen.

willow estuary
#

You should be able to, at game start, evaluate all the literature item scripts, and, if they don't have a page count assign them a page count then via item tweaker or your own code.

#

I use OnFillContainer modification of items for one of my WIP, because in my case I have to for the insane bullshit I'm doing, and there is a noticeable hit on performance when entering new areas while using it.

You would be better off assigning the page counts once at game start as opposed to every time an item spawns.
As well,OnFillContainer gets fussy with stuff like containers inside containers and vehicle contents.

undone heron
#

i'll look for a way to get an array of all the items at game start and do it that way. fillcontainer is still a backup plan.
or could just say screw consistency and not worry about the tooltips being inaccurate.

sour island
#

itemtweaker modifies the script values

undone crag
#

itemtweaker uses
ScriptManager.instance:getItem("Base.something");
and
item:DoParam("something = something");

sour island
#

is pages read within those values?

undone heron
#

I would (from what I looked at so far) find each item and know the base.id of the item for item tweaker. I would rather just get a massive array of the items and then sort it out.

sour island
#

you'd only need the base ID yes and the param ID nothing more

undone heron
#

but I would still need to manually input everything, is my point

undone crag
#

You can edit the item type like this

local item = ScriptManager.instance:getItem("Base.Spoon");
item:DoParam("TreeDamage = 10");```
willow estuary
#

You should be able to, at game start, evaluate all the literature item scripts, and, if they don't have a page count assign them a page count then via item tweaker or your own code.

sour island
#

unless books are a separate item structure from the rest- yes

undone heron
#

I would (from what I looked at so far) find each item and know the base.id of the item for item tweaker. I would rather just get a massive array of the items and then sort it out.

sour island
#

I love me some low impact automatic code- but running a process every time seems wasteful too

undone heron
#

talking about Item tweaker.

sour island
#

yes

undone heron
undone crag
#

You could make a table of the item types like {"this","that"}, assuming what you want can be done by changing the item script thing, idk

sour island
#

they're all literature type though

undone heron
#

example: Literature & magazines introduces 1k plus different books. I would need to go through and get the ID for each one and input that manually for hte mods to work together with item tweaker

undone crag
#

What change exactly are you making to the item scripts?

sour island
#

you won't be able to use itemtweaker out of the box but you could modify it to only impact literature typed items and do what you need to

#

IF read pages are a parameter

#

seems odd to place that on the item considering MP

#

but having pages read from books being placed on the player would have solved your issue to begin with

undone heron
#

the amount of pages read is stored on the character. the issue I'm trying to fix is a tooltip issue were a book's pages won't show until you pick up the book if the book did not have pages to start with.

#

which is a value stored on books called :number of pages

sour island
#

then target the tooltip process

undone crag
#
local original_render = ISToolTipInv.render
function ISToolTipInv:render()
    if not CONDITION then
        original_render(self)
    end
    -- ... some custom code ...
end
```Copied from elsewhere, you could do something like that, to automatically add pages to literature of mouse-over.
#

"Literature & magazines introduces 1k plus different books"
One thousand yeah it would take a long time to copy their names into a table for doparam

undone heron
# undone crag What change exactly are you making to the item scripts?

I'm making no changes to the script (anymore).

Before I just added a page value (in the script). Now: when a person picks up and starts the read action - I check to see if it has any pages. If it doesn't have any pages (as in books with no set page count), it will then give it a page count.

The issue in trying to fix is that only the books the player has actively initiated the read action will display the updated values. I would like all books to display the page values.

low yarrow
#

Weird bug of my mod "fluffy hair"

#

Not sure what can cause that. Doesnt happen to often tho

undone crag
#

Maybe this?

local original_render = ISToolTipInv.render
function ISToolTipInv:render()
  --your code for the page number checking
  original_render(self);
end
undone heron
#

i'll try the tooltip fix

solemn horizon
#

i have a mod request, if that is even possible to do and if someone is willing to do it: a target dummy for practicing shooting, basically a crafting recipe that spawns a zombie that doesnt move and have infinite health unless you dissasemble it. is it possible?

desert junco
#

yeah it is

misty iron
#

is there a way to Sort tables or arrays in Lua?

undone crag
#

table.sort

sour island
undone heron
low yarrow
# low yarrow

Figured it out. It happens if you have empty/overlapping or wrongly named vertex group which usually should bind your skinned things on the bones.
Funny tho it then gets attached to the avatar (hair from zombies)

undone heron
#

@undone crag tooltip hover over works

#

it's still most likely not the best solution on doing this automatically (best would be on start if there was a way) but better than OnInventoryFill. I'll still look into a way to get a list of every item OnGameStart so I can switch over to that function

undone crag
#

o:

warm shell
#

Sheeesh ๐Ÿ˜ณ

#

๐Ÿ’ฆ

bleak current
#

any idea how much do silencers from silencers mod silence the guns ??? xD

#

a nvm

#

It reduces the sound the gun makes by 90%

#

xD

undone heron
#

Check list:

  • the skill functions in increasing and decreasing read time
  • reasonable? Exp time. Able to go from 5 to 9 with every vanilla book once
  • functional with books from other mods
  • traits that effect the skill
  • at least one profession that gives it.
    --- should any vanilla professions affect literacy or nah?
    --- still need to select spawn points for the librarian. Need to learn how to do that.

Any suggestions?

nimble spoke
#

I'm not a big fans of modifying vanilla professions, and the skill is niche enough so I'd say leave them

undone heron
#

Kk

random terrace
#

Has anyone else had this problem of textures not being applied correctly to your models? For me it seems something along the lines of them being flipped

random terrace
#

doing it in a dumb way of exporting fbx from blender 2.8 importing it into blender 2.7 and then exporting X from there

#

If that's what you're asking

nimble spoke
#

Don't convert to X, use FBX

random terrace
#

Making weapons, isn't it required for weapons?

nimble spoke
#

No, the game accepts FBX just the same

misty iron
#

If you had a horde spawn on you, what size would scare you but be managable to deal with?

#

@undone heron @nimble spoke maybe you guys could chime in?

random terrace
#

thanks a ton, the texture problem seems resolved already

nimble spoke
undone heron
misty iron
#

if I run this will it delete data in the array? ```lua
zlistClose = ArrayList.new()

#

Meaning, if zlistClose has data in it, and I want set it bank to blank, will that work?

plucky nova
#

i am using superb survivors, and after a raider event happened, i am now getting constant errors. i just want to fix it.

#

wait, no, i think that i know how to fix it

sour island
#

Claustophobic

#

took me like 15 minutes to realize this is misspelled in the vanilla code lol

#

couldn't figure out why the code kept failing

plucky nova
plucky nova
lusty adder
#

Hey guys, is there somewhere a tutorial for adding static items ingame? (for example I want to add a different kind of fridge)

main lion
craggy furnace
#

nice

main lion
main lion
main lion
iron moth
#

Not enough zombie in cod, velikan goes to zomboid

main lion
#

Haโ†—Haโ†˜

iron moth
#

Btw brita is thompson smg not yet added to your mod ?

main lion
#

It will be added in the next update

iron moth
#

Great I'm really waiting for that gun to be added

lyric pike
#

oh cool so NODs will be an actual thing lol

#

or is it purely aesthetic

carmine cosmos
drowsy tusk
#

@main lion That's a FAST Helmet. Holy shit.

#

Any chance of working with Nolan to make SpecOps NPCs that wear that type of gear?

undone crag
undone heron
#

accidentally spawned in too much bleach when testing mods.

RIP

sudden lichen
#

From the latest Thursdoid: https://projectzomboid.com/blog/news/2021/04/8953/
The mapping tools are set to be updated, including all changes made since build 41! This has a few new things that mappers have been craving, new tile sets and the like, as well as support for newer features such as river flow directions, QoL improvements and so on. Weโ€™re aware that weโ€™ve been a little lax on documentation on some of the modding processes, its been very much all knuckles to the grindstone of MP of late, but we do have plans for some additional support for modders, particularly those trying to crack 3d rigged / skinned models, its just weโ€™re wary of diverting some key peopleโ€™s time at the moment!

Hello all! Hereโ€™s a rundown of whatโ€™s been going on this week. But first: For all those not interested in multiplayer progress, since we went so MP heavy last week with our deep dive, we thought it only fair to give you something non-MP related, and a little more than weโ€™d normally tease. Hereโ€™s a [โ€ฆ]

#

๐Ÿ™‚

midnight mirage
#

does someone know how to edit the pan cam function? i'm looking for a way to set the zoom level - like zooming out the further the cursor is away from the char... with autozoom activated, the pan camera function works perfect between the lowest and the highest zoomlvl set in the options, but only when interior... just wanted to know if it would be possible to use it outside a house too. anyone ever edited the cam settings here?

nimble spoke
carmine cosmos
carmine cosmos
#

Are you looking to do a mod that does this?

midnight mirage
#

hi yooks. i dont know, not into modding rly. i thought editing the lua files would do the trick.

#

maybe extracting the autozoom function from the inhouse code above, so it is available everywhere... btw, the autozoom triggers when an zombie is attacking - should be possible to copy the code and paste it as a header or something so its availabel outside stressed

carmine cosmos
#

Everything is possible, it's just a matter of how difficult

ruby urchin
carmine cosmos
#

Would anyone be interested in seeing zombies ambush players by crawling from underneath the cars?

undone heron
#

yeeeee

#

have them sit and wait till a player gets close

#

kind of like zombies who "play dead"

carmine cosmos
#

Have you seen it work perhaps?

#

I've seen them sit against a wall, but never play dead

undone heron
#

i 100% do not know. just something I seen while browsing code and states

carmine cosmos
#

My idea was that we can spawn them under cars when they are procedural generated. The chance to spawn under each car would be random (perhaps 10% or less). And then they would just sit there silently forever until a player approaches near a car at which point they would activate and start crawling towards him

undone heron
#

that is a good idea

carmine cosmos
#

So there would be absolutely no chance to find out if the zombie is there or not

#

You would need to listen carefully once you approached a car since they would still moan

undone heron
#

have it so if it gets a success with the 10% chance, it rolls again till it fails

carmine cosmos
#

What do you mean?

willow estuary
#

Exploding die.

undone heron
#

it rolls the dice and gets the 10% chance, spawns a zombie.
it was a success
so it rolls the dice again and gets a 10% chance, spawns a second zombie
so it rolls again
it was a failure, so it stops

carmine cosmos
#

Oh no, you're evil zombie

#

Have like 10 of them piled up under a car ๐Ÿ‘ป

#

That's absolutely dreadful... we're going with it!

undone heron
#

I mean it's a 1% chance that there will be two, and a 0.1% for three. So the odds of 10 being there is so low it's near impossible.
but man i can't wait till some streamer goes to a car and 10 of them pop out

carmine cosmos
#

Just wanted to see what people around here think about that idea

#

Going to start working on it in a few days to promote Storm

autumn sierra
#

I like that idea, could also tie into vehicle events

#

like a zombie was run over and was stuck under a car or something

#

also these zombies coming out from under the car would only be crawlers right?

#

or would they get up

carmine cosmos
autumn sierra
#

i like the idea of them only being crawlers imo, but that would be cool too

carmine cosmos
#

Although I like the idea of zombies being stuck, does that ever happen in vanilla?

autumn sierra
#

One time i've gone over to a vehicle story and a zombie I thought was dead stood up and came at me, so kinda

#

there was blood around him so i assume thats what happened

#

would also be cool if those crawlers under cars had bandit or police sort of gear

#

like maybe as a joke police zombies spawn under police cars because they're attached to them even as zombies or something lol

jovial summit
#

Police zeds do spawn around cop cars

carmine cosmos
autumn sierra
#

yeah exactly

carmine cosmos
#

I don't know if that ever happens in vanilla, but it would be a nice thing to implement

autumn sierra
#

thats true, it would be cool if zombies could spawn wedged into walls or something via vehicle

carmine cosmos
#

In TWD they show a lot of zeds that are just stuck and unable to move

autumn sierra
#

yo imagine if you could find zombies that previous survivors tied up that are still alive

#

once animzed comes out and you're able to do stuff like that that would be sick

#

like if someone tied a few up instead of killing them

carmine cosmos
#

The only thing I really need to implement what you mentioned is animations

#

Peach can do really good animations, I asked him to teach me so we will see

autumn sierra
#

oh dang well I'll be very interested to see how it turns out!

undone heron
#

even on a clean save with just it

latent orchid
#

these types of mods are likely to break (assuming this one is now broken) further with the change to loot tables coming soon. Unless the items are using Procedural_Distribution loot tables, then the items will simply end up on the 'cutting room floor' so to speak ๐Ÿ˜ฆ

worldly olive
#

Can somebody help me to do a function to test weight? I would need to increase/decrease my weight by pressing a key

I tried by doing this but it didn't work ๐Ÿค”

function increaseWeight(keyPressed)
if keyPressed == 78 then
local player = getPlayer();
local weight = player:getWeight();
weight = weight + 1;
player:setWeight(weight);
end
end

function reduceWeight(keyPressed)
if keyPressed == 74 then
local player = getPlayer();
local weight = player:getWeight();
weight = weight + 1;
player:setWeight(weight);
end
end

Events.OnKeyPressed.Add(increaseWeight);
Events.OnKeyPressed.Add(reduceWeight);

#

Also tried this:

-- Used for testing purpose only
function increaseDecreaseWeight(keyPressed)
if keyPressed == 78 then
local player = getPlayer();
local weight = player:getWeight();
weight = weight + 1;
player:setWeight(weight);
end
if keyPressed == 74 then
local player = getPlayer();
local weight = player:getWeight();
weight = weight + 1;
player:setWeight(weight);
end
end

Events.OnKeyPressed.Add(increaseDecreaseWeight);

nimble spoke
#

you're increasing weight in both cases

worldly olive
#

I just modified that with a -1, but anyway I don't increase or reduce weight :/

nimble spoke
#

are you usre you're pressing the right keys?

worldly olive
#

function increaseDecreaseWeight(keyPressed)
if keyPressed == 78 then
local player = getPlayer();
local weight = player:getWeight();
weight = weight + 1;
player:setWeight(weight);
end
if keyPressed == 74 then
local player = getPlayer();
local weight = player:getWeight();
weight = weight - 1;
player:setWeight(weight);
end
end

#

I used a print to see the keys and the numbers were 74 (minus in the numerical keyword) and 78 (plus in the numerical keyword)

sour island
#

Try looking for the defines for keys instead

worldly olive
#

Do you know where I can find them? I tried but couldn't find it

sour island
#

If you put a print() you can atleast see if it's getting called

#

It's usually 'Keyboard.KEY_' something

#

I usually use the numpad keys for tests

#

Ex: Keyboard.KEY_1 etc

#

KEY_MINUS is for -

#

KEY_ADD is for +

#

This is all assuming you're calling this function with Events.OnCustomUIKey.Add()

#

?

worldly olive
#

๐Ÿคฆโ€โ™€๏ธ

#

I was calling with Events.OnKeyPressed.Add(increaseDecreaseWeight);

sour island
#

That could also work, but I think that one is for long presses?

#

Nvm, that would be keep Pressed

#

Both may work though

worldly olive
#

So, when you say "KEY_MINUS" or "KEY_ADD" that would be what I have to write instead of 74 and 78 in the if?

ruby urchin
#

You tried use debug and check what specifically is not working?

worldly olive
#

Not really, I'm still not used to the debug in-game, I'm new to this ๐Ÿ˜…

worldly olive
#

I found the right keys, and I know the function is being called because the keys are being printed in the console, but I'm not changing my weight so it's probably the code about weight what's wrong

sour island
#

Ah

#

Any errors?

worldly olive
#

No errors, just nothing happens but the print, I changed to numpad1 and numpad2 to check with other keys

#

-- Used for testing purpose only
function increaseDecreaseWeight(keyPressed)
local key = keyPressed;
print(key);
if key == 79 then
local player = getSpecificPlayer(0);
local weight = player:getWeight();
weight = weight + 1;
player:setWeight(weight);
end
if key == 80 then
local player = getPlayer();
local weight = getSpecificPlayer(0);
weight = weight - 1;
player:setWeight(weight);
end
end

Events.OnKeyPressed.Add(increaseDecreaseWeight);

sour island
#

Put prints under the if key ==

#

Just make sure

worldly olive
#

OMW

#

-- Used for testing purpose only
function increaseDecreaseWeight(keyPressed)
local key = keyPressed;
if key == 79 then
print(key);
local player = getPlayer();
local weight = player:getWeight();
weight = weight + 1;
player:setWeight(weight);
end
if key == 80 then
print(key);
local player = getPlayer();
local weight = player:getWeight();
weight = weight - 1;
player:setWeight(weight);
end
end

Events.OnKeyPressed.Add(increaseDecreaseWeight);

#

Yep, It's probably an error related to the setWeight

undone heron
#

damn. For some reason skill books for stuff like passive or combat skills won't work.

nimble spoke
#

I know I have books for maintenance in one of mine

sour island
#

It's from IsoMovingObject and is returning location lmao

worldly olive
#

I'm looking at the Nutrition class and there is a method called getWeight there

undone heron
worldly olive
#

Do you know how to get the player's weight? ๐Ÿค”

sour island
#

Then you need to get the plyers nutrition class

undone heron
#

the book shows up: you can read it, but you won't get anything from it

sour island
worldly olive
#

it worked!!!

#

-- Used for testing purpose only
function increaseDecreaseWeight(keyPressed)
local key = keyPressed;
if key == 79 then
print(key);
local player = getPlayer();
local weight = player:getNutrition():getWeight()
weight = weight + 1;
print(weight);
player:getNutrition():setWeight(weight);
end
if key == 80 then
print(key);
local player = getPlayer();
local weight = player:getNutrition():getWeight()
weight = weight - 1;
print(weight);
player:getNutrition():setWeight(weight);
end
end

#

Thank you a lot!

sour island
#

Np

#

Are you using Fenrir's guide for functions?

worldly olive
#

I don't really know what's that guide ๐Ÿค” But now I'm interested ๐Ÿ˜‚

sour island
#

I use Yook's pz-mod in IntelliJ for live reference

#

But it's the same information

worldly olive
#

oh, to see the method I directly read the code, but I was reading in the wrong place ๐Ÿคฆโ€โ™€๏ธ

sour island
#

Straight from Java?

#

๐Ÿซ‚

worldly olive
#

Yeap! I use Intellij too to read it haha

sour island
#

I would recommend pz-mod

#

It's supposed to be initialized with in your mod's directory but you can just intilize it on itself and use what it builds as a library in intelliJ

sour island
#

Anyone familiar with saving information with ModData?

#

tried saving an object within a table, but the objects seem to get lost

undone heron
#

MAde some progress from my last post. It seems to search thru a skill book table and returns nil of it isn't a crafting or foraging skill it seems.

#

I'm having it print these three things

print(self.item:getSkillTrained())
print(SkillBook[self.item:getSkillTrained()])
print(SkillBook[self.item:getSkillTrained()].perk)

A vanilla carpentry book returns

[15-04-21 23:03:41.163] LOG  : General     , 1618545821163> Carpentry.
[15-04-21 23:03:41.164] LOG  : General     , 1618545821164> table 0x990356555.
[15-04-21 23:03:41.164] LOG  : General     , 1618545821164> Woodwork.

The modded book returns

[15-04-21 23:04:50.057] LOG  : General     , 1618545890057> Nimble.
[15-04-21 23:04:50.057] LOG  : General     , 1618545890057> nil.
[15-04-21 23:04:50.058] LOG  : General     , 1618545890058> -------------------------------------------------------------
attempted index: perk of non-table: null.
sour island
#

try setSkilledTrained() for custom books

undone heron
#

yeah I'm not sure how or where the table SkillBook is formed

sour island
#
---@class SkillBook
SkillBook = {};

SkillBook["Carpentry"] = {};
SkillBook["Carpentry"].perk = Perks.Woodwork;
SkillBook["Carpentry"].maxMultiplier1 = 3;
SkillBook["Carpentry"].maxMultiplier2 = 5;
SkillBook["Carpentry"].maxMultiplier3 = 8;
SkillBook["Carpentry"].maxMultiplier4 = 12;
SkillBook["Carpentry"].maxMultiplier5 = 16;
#

it's a global table

undone heron
#

okay so I need to set that then.

#

were did you find that?

sour island
#

You could modify it on gamestart

#

I used pz-mod to find it but it's here: ProjectZomboid\media\lua\server\XpSystem\XPSystem_SkillBook.lua

#

you can also inject new info at runtime

#

like at OnGameStart, just plug in stuff

#

Idk if you can just declare entries to it in another file

#

and replacing the entire file can lead to compat issues down the road

undone heron
#

I mean it's global so i should be able to, but I'm going to do it on game start like you said. Just making sure to stick it in the server folder just in case

#

ty for the help

sour island
#

np

vale parcel
#

Hello what are the maps that integrate on the vanilla map except these 3. Help is very much appreciated and thank you

misty iron
#

Before I dig into it, does anyone have a simple method to play a sound? Like something I could hook to an event.

nimble spoke
#

@undone heron retrieving perk will always return nil for modded skills, they aren't listed in the perk class

carmine cosmos
undone heron
#

I know that the modded skills won't return anything, but was trying to figure out why stuff like Nimble or Strength wasn't returning anything

#

and chuck helped figure it out, there was a table that was the missing piece.

grave solstice
misty iron
#

@grave solstice yeah, that's what I'm using, it works great

#

@grave solstice i've seen a couple different ways to add them in. your mod is one way

grave solstice
misty iron
#

@grave solstice haha, this is the way. If you don't specify a sound radius, is there a default? Or does it not broadcast to zombies if you don't specify? I'm thinking like "level up" sound

#

I have a zombie spawn event, and I'm think of adding a sound to it. I could either just play a general sound as a notification that it's starting (like a distant zombie scream) or maybe play a specific X,Y sound on the spawn tile

carmine cosmos
grave solstice
misty iron
#

good point, you're probably right about the difference between the two

misty iron
#

@grave solstice So how do you change the radius and volume of the sound?

grave solstice
misty iron
#

but you can change it before, right?

#

just not fade it out

grave solstice
#

Oh, fade out would be cool sometimes. I wish I knew how to do that!

#

All my code does is set it before starting to play it

misty iron
#

you could probably do it if it was looped by dropping the volume on every loop, but probably not a static sound

carmine cosmos
spiral plover
#

What is the equivalent to a delta time update so I can smoothly increment across time?

#

I know weโ€™ve got like every 10 minute ticks and such but those are too slow

misty iron
#

every tick would be my guess

#

but that's just a guess

spiral plover
#

Thatโ€™s probably right, I thought those were a little slow but may be remembered wrong

#

Trying to rapidly move the player directly south east quickly to make fake falling

#

Adding these cliff sides to my map and if you walk into it it โ€œslidesโ€ the player down to the bottom rapidly. Ideally itโ€™ll calculate damage done to clothes, injuries, tripping chances and the like too

#

The cliffs are just floor tiles with a IsCliffside tags so the game will check of the player is on one or not then go till they hit regular ground or a wall or something

echo leaf
#

Has anyone had an issue with Autostar Trailers where it seems like they've got a parking brake enabled?

#

I cant pull any of them today for some reason

#

Which is odd because it was all fine yesterday

#

boot it up today and nothin moves

#

Oh I think it might be filibuster update that did it

#

@ember orchid Hey duder, is there something I have to do on my end to be able to tow trailers effectively with your cars?

#

I'll ping ya on your own discord and figure it out there ๐Ÿ‘

narrow crown
#

Think I have a mod knocking out my skills section, it's just blank with a little square clickable with a an arrow that does nothing. Any thoughts or recommendations to get that back?

nimble spoke
narrow crown
#

@nimble spoke yes! I just found that

#

are there instructions I missed on how to pull them up?

sour island
misty iron
#

good to know

sour island
#

I think it's addsound(), not at the computer to check

#

Also I think players have fixed emitters (things that play sound) - but you can pull emitters as needed too

errant meteor
sour island
#

The heli event I'm working on has an emitter for the rotor sound, announcements, and guns

#

Otherwise they clip each other at times

#

I honestly would wait until after Noise works gets through with the sounds

#

They may change the skeleton of the system and the current one is a bit of a nest

nimble spoke
autumn moss
#

Looking for a mod that gives random spawns in the current build. Anyone know one?

misty iron
#

@sour island that's a good point. I'm really just using this bit of code for simplicity, it doesn't need to do much and isn't fancy ```lua
getPlayer():playSound("sound")

misty iron
#

Maybe this is a silly question, but is there any kind of limit on sound file length or type or quality or anything? Or can I just make whatever I want and stick it in there?

autumn moss
#

@split cipher Thanks man!

split cipher
#

no worries ๐Ÿ˜„

carmine cosmos
grave solstice
shrewd grove
misty iron
#

@grave solstice @shrewd grove the one I just made is a minute. It doesn't need to be that long but I'm going to try it out

#

It's a long wind sound with a low rumbling thats a bit unsettling

#

I keep getting this error. It still plays the sound though: ```lua
getPlayer():playSound("RedFogIntro")
WARN : General , 1618623367064> GameSounds.getOrCreateSound> no GameSound called "RedFogIntro", adding a new one

sour island
#

not an error, it's a "warning" ๐Ÿ˜›

#

since you don't have a script for that sound file it's "creating" an object for you

#

I assume having a script speeds up loading

misty iron
#

F yeah, it totally works

#

and it is creepy as hell

sonic quiver
#

Hey guys, fairly new to modding zomboid, wanting to add a car into the game. Was wondering if you guys knew where I could find the fbx files to get a good idea as to how they're modeled. As far as I'm aware you have to swap z and y coordinates in order to get things in the right orientation but I'm not 100% sure where the car models are located/if I can even get them

radiant ginkgo
#

@sonic quiver ProjectZomboid/media/models_X/vehicles

zealous niche
#

are the modding tools updated?

#

or the steam one doesnt get updated?

sonic quiver
#

@radiant ginkgo thank you so much! I love your cars btw, I own an impala irl so it was really cool to see your mod show up.

#

Which is the reason I'm wanting to make my own

craggy furnace
#

vampires? in my zomboid?

#

its more likely then you think

native linden
#

hey, so I think most of you in this channel are making mods, but I have a hydrocraft related question and I was pointed in this direction... is this the right place?

lethal sparrow
#

This is the channel for anything pertaining to modding/modded.

native linden
#

okay, cool.

#

so, I'm fairly new to the game and very new to hydrocraft. came across a couple Empty ICBs, and turned them into an ICB Tower. problem is I can't figure out how to place it. I found a video where someone placed one and they did it through an "Advanced Building" tab in their context menu, which I don't have. am I missing a skill or some necessary item?

lethal sparrow
#

A skill, or possibly a tool. I don't know what that is, but there's a good chance you can't just slap it down with your bare hands.

#

Hydrocraft has a wiki, doesn't it?

native linden
#

I only found a guide for it on the pzwiki

#

there are some related pages on undeniable.info too, but nothing that addresses what I'm dealing with

native linden
#

I'm still looking for information. I found a video (seemingly from the creator of hydrocraft?) where they are introducing the Advanced Building menu. there is no mention of any skill prerequisites or item requirement to access the menu but it does specifically talk about item requirements for the constructibles themselves and points out that those requirements are displayed as you can see in the case of the welding mask and blowtorch being required, here:

#

by comparison, in this other video, you can see the IBC tower has no item requirements beyond its construction components (though the naming is different so it's probably an earlier version):

#

I guess I'll ask about it on the workshop page for hydrocraft, but if anyone thinks they know what's up, I'd appreciate whatever info you can provide. I don't know how long it will take someone to get back to me on steam workshop.

eager kraken
#

How hard would it be to add a search function to inventory and would anyone consider making one? :p

main sequoia
#

Need a little help with Lockpicking mod ("Lockpicking. Just. Lockpicking" mod). I can't find the option to lockpick the car door.

craggy furnace
sour island
#

I always thought the first heli always came on day 7

#

but it's actually random

main lion
severe ridge
#

tacticool

warped jolt
#

Yo. What would the Lua look like for an Or statment? Trying to diversify my trait mod by adding a range of possibilities rather making each one an individual trait.

charred ridge
#

playlists work with tsarcraft ? - if so, which format should they be in, and should it use relative or absolute path ?

#

i have +60 hours of music albums so that would be quite useful and space saving

iron moth
# main lion

Velikan had enough with ffar on warzone, to throw away some stress he came here to slay zombies

main lion
iron moth
#

Yea that's a good idea

misty iron
#

if anyone could help me with the sound playback, I'm trying to run this code. It usually works fine, but sometimes it just doesn't play. No error codes or warnings given, my guess it it sometimes plays at the same time as another competing sound that is looping or something and gets overwritten or ignored. ```lua
getWorld():getFreeEmitter():playSound("CustomSound")

undone heron
#

hmmmm, this is annoying. Mod works solo. Tried to stick it in a private modpack so I can just activate it instead of 10 different mods. Mods stop working.

sudden elk
#

Morning everyone, been playing the game for awhile but finally switched to B41, is there a list somewhere that has some B41 mod essentials?

sour island
#
module Base {

    sound eHelicopter { 
    category = World, 
    loop = true, 
    is3D = true, 
    clip { 
        file = media/sound/heli_loop.ogg, 
        distanceMax = 1500, 
        volume = 3.0, 
        } 
    }
}
#

if it is scripted the category has to match the type of emitter you're grabbing

undone heron
#

mhm figured out my issue from earlier. two mods edited the same thing. took a while to find. fixed it. mod pack now works again. yay

misty iron
#

@sour island Yes, I scripted it, but will go back in and fix it up to see if that helps.

echo leaf
#

@undone heron Does your literature mod factor in already read books on existing saves?

#

Seems I just start in the middle with some wacky XP numbers:

#

-37k/30k xp doesnt seem right

rare ridge
#

Seems fine to me ๐Ÿ™‚

#

Anyone have some good documentation sources for just starting out with modding? Specifically looking to make a save manager. Is this something I'll have to do with java or is this something the lua api is capable of?

undone heron
#

Gotta go from 0 to hero with that xD -37k

#

that said, I'll work on a fix if it was added mid save to at least bring you to 0

echo leaf
#

Ahh I missed that in the desc, my bad!

#

Imma chad through this 37k, and then the next 30k

#

you just watch

#

Thanks for the mod, I love the idea ๐Ÿ™‚

undone heron
#

at least it thinks you're level 5 so you get the default speed instead of 0 for the -75% speed

echo leaf
#

Yeah, it's not the end of the world that way

#

Thought it'd be interesting to make light a requirement for reading

#

bit odd you can read in the pitch black of a bathroom in the middle of night

split cipher
rose shoal
#

Would anyone happen to know where items would be found in lua
Which class Items such as lighter would be in?

sour island
#

that's in scripts

rose shoal
# sour island that's in scripts

I'm still learning so I am trying to write my first mod on lua but could not find the lighter anywhere. Would I search scripts under class?

#

If anyone can help me that isn't busy right now would be greatly appreciated

grave solstice
rose shoal
grave solstice
#

What are you trying to do with a lighter? Off the top of my head, it is easy to find examples if you want the lighter as part of a recipe, or if you want the lighter to give you a context menu option to do a timed action...

rose shoal
#

i want the lighter to start a fire

#

for example use the lighter anywhere to start a fire

#

if you wanna burn a house down full of zombies for example

#

i am looking under isofiremanager at the startfire line

#

trying to find the lighter and link it with the fire

grave solstice
rose shoal
#

i was even looking into isostove to see how i can set the stove to catch fire faster

#

either would work

grave solstice
rose shoal
grave solstice
rose shoal
#

typing it doesnt show a result

grave solstice
#

where did you type it?

rose shoal
#

classes

#

in lua

#

ctrl -n

grave solstice
#

if you look for the file under /media/lua/client/TimedActions

rose shoal
#

will check right now thanks

rose shoal
faint phoenix
#

@undone heron is being able to read with ur literature mod while climbing/opening windows, and walking on furniture a bug?

undone heron
faint phoenix
#

oh alright, thanks

undone heron
#

tbh I love how sneak reading looks

#

it's so silly

#

I'm surprised the animation system even blinded for that

#

blended*

faint phoenix
#

indeed

rose shoal
#

does anyone know where mods should be place. i placed the lua file and the mod info file in mods in project zomboid folder but they do not show on the mod list in game.

faint phoenix
#

you just have to click download on the mods you wanna install on Steam and they should appear in the mod list in game

rose shoal
#

Is there a command menu to spawn one?

grave solstice
rose shoal
#

I got rid of the corpse requirement

#

I replaced it with isocell idk if that's the right one to use for starting a fire on the floor

#

I need to set something in place of the corpse to set fire

grave solstice
#

Or maybe you can do something similar to how the construction actions work, where just clicking on the ground gives you the option to build something

rose shoal
#

No luck :(

main lion
#

Tactical spiffo

worldly anvil
#

is that the zip gun?

main lion
#

yep

#

Zip gun and Cobray Terminator

main lion
lyric pike
#

will they increase hearing range? or purely cosmetic

#

irl they amplify things like voices but they muffle gunshots

clear lodge
#

@main lion amazing stuff as always

#

You should do some body armor too!

low yarrow
random terrace
#

What's the optimal way of adding items to loot tables? I've looked at a few mods and it seems there's more than one way to do it, although I could be misunderstanding something

willow estuary
#

I consider this to be the "proper" way (although there's fancier proper ways as well).
FYI a lot of mods fuck up the disto tables with how they add items to them, so be careful about copying the methods from other rmods.

    table.insert(SuburbsDistributions["policestorage"]["locker"].items, "CCVest");
    table.insert(SuburbsDistributions["policestorage"]["locker"].items, 1);```
random terrace
#

Thanks, that looks simple enough

#

Curious as to what the wrongly done method looks like

willow estuary
#

There's multiple degrees of "wrong", but the worst one just replaces the distributions files in it's entirety.

#

Also, FYI, the distributions tables are getting completely overhauled, which will break a ton of mods, so be prepared for the possibility of re-doing your distro table stuff after that goes live.

random terrace
#

Ah yeah, I've seen people talk about that, shouldn't be too much of a hassle for me

#

Also the number value for the rarity of the item, how exactly does that work? A bit confused as to the ratio of rare to common and etc, is it a percentage or?

misty iron
#

well I got sound working, but it could be more elegant. Does anyone know how this works? I tried it and it doesn't do anything. ```lua
---Specified by:

---FadeOutMusic in class BaseSoundManager
---@public
---@param name String
---@param milli int
---@return void
function SoundManager:FadeOutMusic(name, milli) end

carmine cosmos
#

Why are you creating the function inside SoundManager table?

willow estuary
# random terrace Also the number value for the rarity of the item, how exactly does that work? A ...

When container loot is spawned a random number is generated, the maximun vakue of which is determined by the loot scarcity settings for it's category (I don't recall the exact values) and if the bunber is ewual to or less than the value, the iten is added to the container.

The rolls value in the distro table determines the nunber of rolls that are made for this check for every item in the container. Incidentally changing the rolls value is how some mods fuck up the distro tables.

But the nunber you want to go for is an art and not a science, you really should test and test and test again the spawns to get them dialed in to what you like. You can use debug mode to wipe the map & necroforge noclip to check spawns.

A lot of mods end up making items "too common", but conversely if a mod item is rare a lot of people will complain or insist the item doesnt spawn.

#
  • using shitty phone thats hard to type with rn, ergo the atrocious spelling.
grizzled grove
#

fuck item rarity feedback btw. people are the worst at telling you what's dropping and what's not

willow estuary
#

But some containers are far more common in the world than other ones, so, probability wise, that number alone won't really determine how often an item spawns. ie "art and not a science"

grave solstice
willow estuary
random terrace
willow estuary
#

It would depend on the loot scarcity settings, in the sandbox settings, but pretty much yes.

Art and not sciencd & extensive testing

#

Also, the zombies present in the area also affects this, the more zombies the less rare things are. Which sorta screws up making itens super rare.

worldly olive
#

Hi guys! does somebody knows how to remove traits from appearing in the character creation menu but not removing them from the game?

undone heron
#

set the trait as a profession trait

#

then it won't show up in the creation screen

worldly olive
#

That's actually an awesome idea ๐Ÿค” if the trait is a profession trait, it has to be attached to a profession? or it can be free? because I need it to be free, exist in the game but not attached to anything

undone heron
worldly olive
#

That's awesome, I will try it! and if it works, kudos to you! ๐Ÿ˜„

grizzled grove
#

hey, jd-gui suddenly won't open zomboid .class files. My only guess right now is a recent windows update, but i'm still on java version 1.8.0_271. Any ideas?

loud pier
#

does anyone know how to use the riot shield in the swat/riot pack?

#

i have it equipped as a secondary... is that right?

hard hull
#

appologize for being a small brain but could anyone explain to me how the immunity mod works? Instead of the vanilla, uh oh you got a scratch, time to wait 4 days for you to die anyway, is this mod supposed to give you a chance to survive the infection?

undone heron
#

depends on wich one you are talking about

#

there is one that makes it so you no longer get real infected and just get fake infected (which causes stress, panic, ect. It's a vanilla thing that happens at times)

#

there is a second one that pretty much does the same thing as that one but slightly different. it's as a trait.

#

there there is a third (and best one in my opinion since you still have a high chance of zombie-fying) the antibodies. every 10 minutes once you've been bitten it increases a stat called "antibodies' based on your moodles. if antibodies ever > infection rate, then you'll live. if not, you'll become a zombie.

#

what's also nice about the antibody one is let's say you get scratched while healing, your infection rate can spike and overtake the antibodies, leading to your zombi-ing or if your conditions worsen enough so infection rate > antibodies again, it'll start to climb

hard hull
#

gotcha, so if i ever get scratched or bitten for the last mod, barricading myself with medical supplies and food would be the safest and most reliable way for the antibodies to overtake the infection rate

undone heron
#

correct

#

you just need to make sure you have enough food and supplies to last 2-4 days recovery

#

traits also affect the last mod. So picking stuff like thin skin or prone to illness will reduce your chance to recover with antibodies, but thick skin and resilient will increase the chance.

#

Off the current topic: fuck I thought I fixed a bug with Literacy but it still happens. gdi

spiral plover
#

@undone heron did you ever figure out how to modify player movement speed?

undone heron
#

not atm

#

stuff like sprintMod(), changeMovementSpeed() and others don't seem to do anything when changed

#

which is sad since I really wanna do speed traits

spiral plover
#

Hmm, that is unfortunate and annoying, oh well

carmine cosmos
undone heron
#

testing now

#

nope. no visble speed change

carmine cosmos
#

Unfortunate

undone heron
#

testing "walkspeed" since that's the name that shows up in game

#

still nope

misty iron
#

First version of mod is up

#

Thanks to everyone who took the time to answer my questions

bronze skiff
#

@eager prairie how do i attach trailer to my car?

gray canyon
#

press V at the back of the car

lethal sparrow
#

Not who you asked, but with a rope in your main inventory, press V to access the radial menu while standing behind the vehicle and in front of the trailer.

#

They need to be about one tile apart but a little closer or a little further will work.

bronze skiff
#

huh

#

let me see

late hound
#

In making a car mod, if we want to retexture the wheels, do you need to make a model of the wheels as well? I can not seem to find the vanilla wheel models.

solemn horizon
#

hey guys any modder maybe willing to take a mod request?

lethal sparrow
#

I'm an open-minded novice. What did you have in mind?

solemn horizon
#

i wonder if it would be possible to make a craftable garage door

lethal sparrow
#

Not I. But I see no reason why a knowledgeable individual could not

indigo hound
#

Dear developers of mods with weapons. I love your mods, but I PLEASE! Create a separate tab for weapons to avoid occupying the main tab.
it is created in the recipe script file !!!! For example:

recipe Use Standard Mag w/XM8LMG
{
    XXXXX,
   XXXX/XXXX,
    Category:Weapons,
    Result:Needle,
    Time:40,
}

Stop cluttering the first tab in the recipe menu!

#

!!!!!!!!!!!!!!!!!!!!!!Category:Weapons,!!!!!!!!!!!!!!!!!!!!!!!!!

#

This way you can create any category / tab for your recipes.

#

I raised the problem not the first day ๐Ÿฅณ

slender lance
#

okay so i just got this game, got a map and hair mod, and now the menu wont load. all i get to look at is the image of the guy hugging the girl

#

do mods just take a while to load, or did i bug the game?

dense sierra
#

depending on the size of it it'll probably take at most 2-3 minutes atleast in my experience

slender lance
#

so

#

i've been loading for an hour

lethal sparrow
#

More helpful would be the log file, it might give you a hint as to what it's held up on.

slender lance
#

log file?

lethal sparrow
#

C:\Users...\Zomboid\Logs

#

The most recent generated log is in there.

#

Previous logs are in folders

#

You could either look through it yourself or give it to me to poke through. Not as good as an expert but the warning signs are usually pretty obvious

#

Ctrl+F : STACK TRACE will send you to any obvious red flags

slender lance
#

i fixed it somehow

#

idk what happened but i turned the mods off and on and it worked

lethal sparrow
#

That honestly would be the motto of this chat channel.

indigo hound
#

@slender lance disable all mods

#

Open:
C:\Users\YOU\Zomboid\mods

#

file default.txt

#

need delete

#

and open game

#

my english greeteain britain :D

#

@slender lance But from now on, be careful. There are mods for the 40th version of the game. And there is for your 41st

slender lance
#

tyvm!

willow estuary
indigo hound
#

I'm waiting for the developers to do the same)

carmine cosmos
marsh cosmos
#

Is there a mod that puts back my fav Item in the inventory I got it from? Like the Screwdriver, I want it back in my fannypack when I performed an action with it.

marsh cosmos
#

not realy but thx

sour island
#

oh misunderstood

main lion
worldly olive
#

Does somebody knows how to get the boredom and unhappyness level of the player?

I'm trying this:
player:getBodyDamage():getBoredomLevel()
player:getBodyDamage():getUnhappynessLevel()

But for some reason I'm not getting it ๐Ÿค”

carmine cosmos
#
player:getStats():getBoredom()
undone heron
worldly olive
#

But yeah I'm pretty sure that's the code, I'm seeing the Java code and they use it as this:

"this.Parent.getBodyDamage().getUnhappynessLevel()"

#

I'm pretty sure that it is from body damage and not from stats, stats is for stress if I don't miss understand

undone heron
#

I mean you can use stats to get boredem level

#

But you can't manipulate it through stats

worldly olive
#

Actually, I just need to get the current boredom and unhappyness level, not increase or decrease it, just get it to compare

sour island
#

stats would get the number value, if you want levels like moodles you have to grab the moodles of the player

worldly olive
#

In the to get the number in values yes, so I should use getStats for that?
I basically need to compare what number of boredom and unhappines the player has and based on that, do things

sour island
#

yes, getStats() grabs the stat object tied to the player

#
@class Stats : zombie.characters.Stats
@field public Anger float
@field public boredom float
@field public endurance float
@field public enduranceRecharging boolean
@field public endurancelast float
@field public endurancedanger float
@field public endurancewarn float
@field public fatigue float
@field public fitness float
@field public hunger float
@field public idleboredom float
@field public morale float
@field public stress float
@field public Fear float
@field public Panic float
@field public Sanity float
@field public Sickness float
@field public Boredom float
@field public Pain float
@field public Drunkenness float
@field public NumVisibleZombies int
@field public LastNumVisibleZombies int
@field public Tripping boolean
@field public TrippingRotAngle float
@field public thirst float
@field public NumChasingZombies int
@field public LastVeryCloseZombies int
@field public NumCloseZombies int
@field public LastNumChasingZombies int
@field public stressFromCigarettes float
@field public ChasingZombiesDanger float
worldly olive
#

There are so many classes that sometimes the confusion is so big ๐Ÿ˜‚
I will try with that one!!

sour island
#

there's a get and set for each of those fields, for the most part

worldly olive
#

I assume getMorale is for happines? ๐Ÿค”

sour island
#

could be, some things were named a long time ago

worldly olive
#

I will try with that, thank you a lot again ๐Ÿ˜„ always helping

sour island
#

np

undone heron
#

Moral is something else

#

You need to use getBodyDamage to get unhappiness

worldly olive
#

Oooh,

#

So, something like this should work

local currentBoredom = player:getStats():getBoredom();
local currentUnhappiness = player:getBodyDamage():getUnhappynessLevel();

undone heron
#

Yeah

#

Don't ask me why unhappiness is separated.

Tho it feels like getStats was an older system they used like in build 11 or so. They then switched to the body damage system and then added unhappiness

worldly olive
#

Ooh, but they added unhappines in the bodydamage but not boredom ๐Ÿค” I will try with getStats and getBodyDamage

grave solstice
#

I don't have any issues with getting boredom from BodyDamage:
local bodyDamage = player:getBodyDamage()
print("Boredom: " .. bodyDamage:getBoredomLevel())

worldly olive
#

Probably the error is in the if then ๐Ÿค” (I don't have the game in this moment so I'm developing without testing (bad idea))

local currentBoredom = player:getStats():getBoredom();
if currentBoredom > 75 then

I don't remeber when but I saw with one of the moods that it was multiplied by 100, boredom and unhappines is the same?
If you know it great, if not I will test it in the night

undone heron
#

It's unhappiness if I remember right. The game uses decimals between 0 and 1 for some stats and then a regular 0 to 100 scale for other

#

So unhappiness will return 0.75 instead of 75

worldly olive
#

Maaaaakes fucking sense now why I'm not entering in the if ๐Ÿคฆโ€โ™€๏ธ

undone heron
#

Always a good idea to get stats and print them to see how they are set up

worldly olive
#

Yeah, I usually do, but I'm not testing right now, I just have the IDE's to code but not the game and I'm using someone else to test for me ๐Ÿ˜‚

#

I will try as soon as I arrive to my house, thank you a lot again Void ๐Ÿ˜„

#

As this point if you want to be mentioned in the credits of the mod, you'll be ๐Ÿ˜„

undone heron
#

Cause if you tried say..
if x > 75 then
When it's a stat that uses a decimal scale, then the if statement won't ever trigger

worldly olive
#

Yeah, once I get the value I have to multiply it by 100 or use a if with > 0.75

worldly olive
#

If you ever feel stupid, please remember that I was using " " when calling my function in the event ๐Ÿ™‚ ๐Ÿ™‚ ๐Ÿ™‚

undone heron
#

it's okay. At times I forget I'm writing stuff in lua and try stuff like +=

#

or else if instead of elseif

worldly olive
#

Everything is working now, I used getBodyDamage for both of them! thank you everyone who answered!

worldly olive
#

Is there any event that is called when a profession or trait is added/removed in the character creation screen? ๐Ÿค”
I tried OnCreateLivingCharacter but it didn't seems to work

#

Or other question, is there any way to make a trait unpickable for certain profession?

undone heron
#

so when someone picks said profession, the other traits are locked out with the dummy trait

worldly olive
#

I tried to do it, but I give the trait to the profession, and that trait is still there to be picked twice ๐Ÿค”

undone heron
#

make sure to mark the dummy trait as profession only

worldly olive
#

Nvm, solved by making the trait mutually exclusive with itself

#

Or maybe not

undone heron
#

like i said, make trait A, then trait B. make sure trait A is marked profession only (so it doesn't show up on the trait list). give it to the profession you don't want having profession B. Make sure to mark A and B as exclusive. Now when they pick the profession, they get trait A and trait B vanishes

worldly olive
#

It worked the first time I picked Burglar ๐Ÿ˜‚ If I keep going from Burglar to other Profession the trait keeps duplicating haha

#

I need to do this with Dextrous and not a new trait, should I create a fake Dextrous2 for example? and give it to the profession? if that's the case, it stills has the same effect? as it is a new trait

undone heron
#

it's a dummy trait, so it won't do anything

#

say I don't want burglar to get dexterous. I would then make Dexterous2, and give that to the burglar. I would then make dexterous and dexterous2 mutually exclusive. Now people who pick the burglar can't get dexterous.

#

dexterous2 will have no effect unless you give it an effect. So if you dont want it to do anything, just make up something like "knows how to steal stuff well"

worldly olive
#

I need the opposite, I need to get Burglar with Dextrous

So I have this:

DTBaseGameCharacterDetails.DoProfessions = function()
local burglar = ProfessionFactory.getProfession("burglar");
burglar:addFreeTrait("FastReader");
burglar:addFreeTrait("Dextrous");
TraitFactory.setMutualExclusive("FastReader","FastReader");
TraitFactory.setMutualExclusive("Dextrous","Dextrous");
end

This works once, if I pick Burglar, then the game gives FastReader and Dextrous and removes those traits from being picked, but if I change to Unemployed for example, then there are two Fast Reader and two Burglar to be picked, that's the strange part, it is being duplicated for some reason

undone heron
#

okay then you do exactly what I said before

#

but then OnCreateLivingCharacter you check to see if they have your dummy trait, and if they do, remove it for the real traits

#

so

local function makeTraits()

TraitFactory.addTrait("DummyBurglar", getText("UI_trait_DummyBurglar"), 0, getText("UI_trait_DummyBurglardesc"), true);

TraitFactory.setMutualExclusive("DummyBurglar", "FastReader");
TraitFactory.setMutualExclusive("DummyBurglar", "Dextrous");

DTBaseGameCharacterDetails.DoProfessions = function()
local burglar = ProfessionFactory.getProfession("burglar");
burglar:addFreeTrait("DummyBurglar");
end
Events.OnGameBoot.Add(makeTraits);

then

#
local function switchTraits ()

local player = getPlayer();

if player:HasTrait("DummyBurglar") then
player:getTraits():remove("DummyBurglar");
player:getTraits():add("FastReader");
player:getTraits():add("Dextrous");
end

Events.OnCreatePlayer.Add(switchTraits)
worldly olive
#

Well, it works! you're a damn genius ๐Ÿ˜‚

lethal sparrow
#

We're slowly approaching my Skyrim modlist that had be frequently question why I do this to myself.

edgy torrent
#

Say, is it possible to export a character you made in solo and apply it into Superb Survivors? I wanna have with my guy a specific follower which I made earlier as a Singleplayer char

nimble spoke
#

@undone heron I can provide Brazilian Portuguese translation for the literacy mod if you want

spiral plover
#

Hmm.. I've put on my boots and am waste deep in figuring this all out, I know you can override lua functions as I am doing that (don't worry, making sure to keep it compatible and call the old function too) but I am looking for a way to add properties to the professions, I assume it is impossible to override java functions such as ProfessionFactory.addProfession? Then to go about this I'd be better off making my own list of professions with said data?

carmine cosmos
#

I assume it is impossible to override java functions...
That is correct, it is not possible to override Java functions with Lua modding

spiral plover
#

Man... I am so used to classes and such that Lua not having any with it's objects hurts my brain

carmine cosmos
#

You can always write your mods in Java

willow estuary
#

My complement to Worse Searching... ...Even Worse Looting which features locked containers that require keys/crowbars/bolt cutters to open.

undone heron
undone heron
nimble spoke
willow estuary
undone heron
#

that's fair but even low tier containers still raises it up on the list of 'best long blunt'

#

people will still generally use spiked baseball bats since with high carpentry and maintenance you can repair them easily and get a longer life spam with more damage, but I prefer weapons that also dual as utility items. more uses = better.

spiral plover
#

So I'm.. trying to make a base object to work from so I can make a simple list.. but I am clearly doing it wrong

#

function ProfExcl:new(prf)
    prf = prf or {}
    setmetatable(prf, self)
    self.__index = self
    return prf
end

ProfWithExclusiveList = {};```
#

that's the set up, trying to have ProfExcl as what I am making a bunch of

#

the list they are held in is ProfWithExclusiveList

#
    tubesubjectProf.profName = "tubesubjectNAME"
    table.insert(tubesubjectProf.exclusiveTraits, 1, "Labgrown2")
    table.insert(ProfWithExclusiveList, 1, tubesubjectProf)```
#

I call that in a (failed) attempt to add a new entry to the list

#

print(ProfWithExclusiveList[0].exclusiveTraits[0])

#

and then that always results in errors

#

wait... lua arrays start at 1

#

fuck I'm an idiot

craggy furnace
#

yeah lua isnt zero indexed

spiral plover
#

notlikebaha learning LUA is a fucking adventure, I have to unlearn practically all I know

craggy furnace
#

fun fact

#

lua was developed on top of a language that was designed for people who didnt know how to code

willow estuary
#

Some lockers are locked, some aren't.

misty iron
#

will zombies spawn on cells you haven't visited?

craggy furnace
#

sorry blair

misty iron
#

even virtual ones?

craggy furnace
#

i am going to steal this mod

spiral plover
#

I complain but it isn't terrible. I just need more practice is all

carmine cosmos
#

No, you were onto to something there, it is terrible

#

I guess it's good for a script language, but it can't compare to OOP

craggy furnace
#

it was developed on a language for petroleum engineers

#

back in the day when engineers in general were expected to be a little more rounded

spiral plover
#

It's like they took python, which I am not a fan of, and threw C/Java or so elements at it until it looked like something

#

As in, their brains rounded, or their skillset?

carmine cosmos
#

I am not a big fan of python either

craggy furnace
#

skillset

#

companies back in the day wanted (and still want) to hire people who know a bunch of shit so they dont have to hire people

spiral plover
#

Thats for fucking sure lol

craggy furnace
#

lua is a great language for people who just need to be taught quickly

#

aaaaand thats about the extent of nice things i can say about lua

#

i dont hate it but i dont love it either

spiral plover
#

Ahaha, yeah I agree wholeheartedly with that

misty iron
#

How do I get a cell from a specific X/Y coordinate?

undone heron
#

what's worse (from what I read about it) Zomboid lua is outdated lua as well, since the lua it uses to interface with java with kulua

craggy furnace
#

kahlua has not been updated in ages and LWJGL was updated for 41 i think

spiral plover
#

Lol I've spent all day on this and am ready to throw in the towel for now. I need to scrap it and approach it different. I'm close but not quite there

willow estuary
sour island
#

With the object you don't need coords

#

Also squares don't exist if the cell their in aren't loaded

#

Also, they don't exist above Z 0 unless created via furniture or something else

#

There is a getOrCreateSquare() that also takes coords

misty iron
#

@sour island Thanks for the tips. I was playing around with the Virtual Zombie Manager and discovered some of these things.

sour island
#

No worries, I've been dealing with them for a bit with expanded heli mod

#

I have a few functions written I think could be useful for others but I'm not sure where I'd even post them

misty iron
#

Are there any tutorials for making a model for something in game that someone could point me to? I'm watching the one by Blackbeard and debating if I want to dive into making an item.

nimble spoke
willow estuary
radiant ginkgo
#

Station Wagon Impala

severe ridge
#

SwatPack updated dudes, make sure to download the OG mod, i deleted my redux, but the content still carries on

loud pier
#

i had a police bag from the swat mod on the ground, closed the game to go do stuff, came back and restarted the game, and my police bag full of stuff was gone. crying

grim perch
#

Do any of the faster read mods work with iwbums?

#

Really dislike the amount of time it takes to read, even with the fast reading perk

undone heron
#

yeah a few of them

grim perch
#

Have tried all of the ones on the workshop and none seem to work

undone heron
#

With this mod some of the containers in the world will be locked. Keys will sometimes spawn for these containers, if you can find them, and, if you have a strength of 5 or greater, you can use a Crowbar, or in some cases Bolt Cutters, to open the container.

Should that be if you can't find them?

loud pier
#

"keys will sometimes spawn for these containers if you can find them"

undone heron
#

"Keys will sometimes spawn for these containers" "if you can't find them, and, if you have a strength of 5 or greater, you can use a Crowbar, or in some cases Bolt Cutters, to open the container"

#

because of the comma between containers. The base is "Keys will sometimes spawn for these containers, you can use a crowbar, or in some cases bolt cutters to open the container.". it can at least loose two commas and be less confusing.

main lion
earnest prairie
#

Nice! Eblestock Operator pack?

main lion
earnest prairie
#

Cool!

#

Looks good!

main lion
honest lion
#

Hi Hi, Anyone know how Lua send data to Java.
Example: When I click the button Tune-in on Walkie-Talkie. How the frequency is send to the java main file.

main lion
polar prairie
#

@main lion both are so awesome! :) when do you plan to release them?

charred hemlock
#

although orgm is getting a bit annoying (i wish in the fine tuning mod you can set weapons and firearms to different spawn rates), ill always find hydrocraft to be the best mod for any playthrough

#

just the long term survivability of it all, making more gas eventually out of bio diesel, hell even making a solar farm that works as an infinite fuel generator

undone heron
#

is there any reason why better sorting would affect drop rate of an item?

#

Without better sorting

#

With better sorting

#

Fresh save both times 100 kills

#

(tho being honest, I like the 1 in 10 drop rate over the 2 in 10 drop rate)

undone heron
#

nvm

#

RNG is just being a bitch

#

did two more tests. got 35 books on one and 20 on another

polar prairie
main lion
#

Gorka Suit

earnest prairie
#

Nice! Awesome Helmet as well!

craggy furnace
#

ah yes

#

a gorka suit

low yarrow
#

@main lion Awesome stuff!
Cant wait to play with your mod ๐Ÿ˜„

severe ridge
#

oh yeah

errant meteor
#

@craggy furnace Any progress on the heli mod, I really want to see the survivor one.

errant meteor
#

nice

echo leaf
#

@main lion that gear looks rad

turbid vigil
#

@main lion Very cool

echo leaf
#

Hopped on today and all my swat gear turned into ?'s, anyone seen something like this before?