#mod_development

1 messages Β· Page 532 of 1

hidden estuary
#

the concept being that you will run out of the resource

smoky meadow
#

-18 traits is ok if you make the drug rare.

#

can you make those drugs?

hidden estuary
#

nop

#

does the game have female horse urine?

#

sorry, pregnant mare urine to be exact

#

LMAO

smoky meadow
#

maybe you can add a distribution table so that zombies drop that drug.

hidden estuary
#

I'd probably make that rare, in the "extensive list of hopes and dreams" the idea is that you grow soy to slowly start building up something called pellets

#

so you start the game mainly being sustained by looting and stocking up syringe shots and tablets and slowly shift to pellets

#

but the first update of the mod is probably NOT going to have all that soy fancy stuff

#

I'll obviously have to shift power when I do add that in, but right now my concern is mostly on how much should this trait give

smoky meadow
#

maybe you can make a new skill set like chemistry to make a drug.

#

if you level chemistry you can make certain drugs.

hidden estuary
#

blind gives +18 but it doesnt outright try to kill you, schizophrenia is a +7 but a lot less problematic in multiplayer, cause no sleep, and opioid addiction is a +10 but its a much harsher system than the one I'm going for

#

when looking over at the vanilla traits, deaf gives +12 and smoker, which would be considered similar to this trait, gives +4

smoky meadow
#

maybe 16 trait points

hidden estuary
#

I was thinking of +16 but considering some mechanics it could be considered unbalanced

#

main one being syringe, a syringe shot lets you live for (realistically) a month, in the game i'm trying to balance to be a week or 2

#

but thats still huge

smoky meadow
#

is you set the drugs to rare but not extremely rare 18 traits points is right choice.

hidden estuary
#

a single shot makes you not worry about this trait's drawbacks for 14 days? thats big for a +16

smoky meadow
hidden estuary
#

even if I make syringes rare?

#

that was my main thought

smoky meadow
#

make syringes rare and can be found in hospital. but very rare in medical house and pharmacies

hidden estuary
#

its been hard to design this with all that needs to be kept in mind, specially a multiplayer environment

#

cause the more people with this trait means scarcity can be a much tougher punishment

#

I've been trying to balance with loot respawn turned off in mind

smoky meadow
#

hospitals is challenging since there's more zombies, high risk high reward

hidden estuary
#

true

smoky meadow
#

make the pills 1 day maintenance.

hidden estuary
#

that was already the point, but I really wanted to go for realism and accuracy

#

realistically, you can go up to like, days or even weeks depending on the individual without facing chemical imbalance from lack of hormones

smoky meadow
#

loot respawn is on in multiplayer so make the item rare make sense.

hidden estuary
#

the body needs hormones but it takes its sweet time before it starts requiring it or becoming detrimental to health

#

it wouldnt match its counterpart

#

realistically any person above age of 50 might require hormonal supply

#

u know, menopause and all that

smoky meadow
#

but age doesn;t exist in zomboid

hidden estuary
#

so if every human being needs it, its actually quite a common thing to have in pharmacies, clinics, just about anywhere

#

I'm talking more about context as to how rare should this resource be

#

and irl its quite common actually

#

injections arent common, but tablets are

smoky meadow
#

in 21st century but the game settings is 1990s so these item are rare to find

junior raven
#

So just to be clear, there is no way to add a new player sprite that looks like a farm animal, stick it on an NPC, and make an animal mod? That seems like it should be straight forward. Why is that not possible with the current modding tools?

hidden estuary
#

it was common in 1993

#

its been a common treatment for menopause and other hormonal problems for a good while now

#

I'll probably stick to +10 and evaluate how detrimental the perk really is

#

through playtesting

#

I've been mostly sticking to smoker logic, and smoker shows up quite often, its not quite detrimental but it is something you have to constantly manage

junior raven
#

Pregnant mare urine? Menopause treatment? You're trying to add estrogen hormone replacement to the game so you can create transgender characters

hidden estuary
junior raven
#

Called it

hidden estuary
#

I did post that earlier when I started the convo

#

ty for feedback btw

junior raven
#

Why would you die without them? You would just detransition

hidden estuary
#

its a lil' more complicated than that

junior raven
#

should only have like a 40% chance of that

hidden estuary
#

but with the context I'm going with, this trait has the context of post-operation trans, already long into the transition

#

haha funny suicide joke, so funny..

#

cant say I didnt expect this but I'm still disappointed

junior raven
#

If you can't laugh, you can't live.

hidden estuary
#

you made a transphobic joke lad, there's nothing funny about it, its in fact 1 of the only 4 jokes that transphobes can come up with, its like the "i hate my wife" jokes

#

anyways, in that context the body does not supply with hormones naturally anymore, and thus a supply is required

#

which is actually not different from women in menopause

#

if it helps understanding

junior raven
#

Well, you're fun at parties. I'll just go talk to someone else.

hidden estuary
#

thanks for not contributing anything to the modding feedback

junior raven
#

My feedback is that mods that go into too much detail of every aspect of reality aren't fun. You should stick to the slogan of keep it simple.

hidden estuary
#

or is based on difficulty?

#

been playing for too long on custom settings

junior raven
#

Is it possible to stick a sprite that looks like a farm animal on an NPC from something like the Superb Survivors mod, and make an animal mod out of it? That seems like it should be straight forward.

celest crane
#

How do I check how many pages a skill book has?

#

oh wait there's getNumberOfPages() smh

analog hedge
#

I’m looking for the file that determines getting ill from being near a dead body, but can’t seem to find it. Any ideas?

pulsar oxide
#

Quick question, does anyone remember Golf Carts ever being in apocalypse machines 2?

#

Its because I remember finding golf carts in my saves, but now the only traces of them I have are from its mod files, but the textures are missing as is the script, so I am not sure if I am remembering the AM2 golf carts or another golf cart

willow estuary
celest crane
#

I don't get it. The original IsReadABook.lua has 3 things going on:

  1. You're too stupid to read it
  2. You're too smart to read it
  3. It's right up your alley

Exhiliratingly Organized Skill Book mod hooks to the first and uses setAlreadyReadPage command to read the first page. As far as I understand it, they simply copy the exact same code, but changes the integer at the end from 0 to 1. At the end of it, they specify that for scenarios 2 and 3 refer back to the original script

I added an elseif to it that basically hooks to scenario 2, and uses the exact same setAlreadyReadPage code , only replacing the integer at the end with self.item:getNumberOfPages() but it doesn't work. Somehow the game sets the read page back to 0 so the reading process never progresses
The idea is to skip reading the book entirely if it's obsolete, but I can't seem to get it to work

#

I tried:

  1. supplying the getter directly as the second argument
    self.character:setAlreadyReadPages(self.item:getFullType(), self.item:getNumberOfPages())
  2. Using a local variable to store the number of pages, then supplying that variable as second argument
  3. Using the vanilla code that skips reading if you've already read it before
#

It simply doesn't work and I'm really frustrated. The console says nothing

pulsar oxide
tame mulch
celest crane
#

No, I'm an idiot, that's not it. The original scenario 2 code has if pageTimer >= 200, I don't know what the pageTimer is, but the pageTimer seems to be under 200. Since I need the action to be instant anyway, I removed it and go directly to pageTimer = 0, it works now

#

Kinda weird in that if my code fails then the original code should also fail considering they're identical copies but thonk_sun

analog hedge
#

Am I in the wrong line of thinking, maybe? That there is no value for how close to the body/how fast the value ticks up or down on the player?

#

Yes, I'm a novice.

errant grove
#

We need a mod for planting grass. I want to have a super nice roof garden

lusty nebula
#

Guys I have a question about which I would like to know your opinions/ideas...
Have you ever take a look at the weights system in PZ? Taking in mind that, for example, 1.0 corresponds to 1 kg, I can't understand why an item equipped becomes lighter of the same one unequipped.
I make an example ( Always considering 1.0 corrisponding to 1kg of weight ):
My fingerless gloves equipped weights 0.06 ( or rather 6 decagrams --> 60 grams ), unequipped they weights 0.2 ( or rather 2 hectograms --> 200 grams )
Wow, 140 grams of difference in weight???
I know that their " weight system " use the weight also as a sort of " volume measure " ( Thing that I consider an error IMHO ) but...
Do you think is there a way to fix this or do you know if there is an editable file that controls the weight behavior in game?

crimson spindle
#

did they ever specify that 1 weight = 1 kg? I've always taken their weight units to represent encumbrance rather than a literal weight.. like a bed frame doesnt normally weigh like 40kg or whatever, but i can believe it being super cumbersome to carry/move regardless of the weight. Any object that is cumbersome is going to "weigh" more in PZ terms

#

anyway for my items ive based weight around that concept rather than being a literal weight

weary crypt
#

I think the volume/encumbrance is kinda rolled into the same number

crimson spindle
#

also in that sense, something "weighs" less because if toure holding it directly, its easier to carry than say.. trying to stick a bedframe in my backpack

lusty nebula
#

@crimson spindle I've used the 1kg reference just to have a starting reference parameter ( That somehow seems to correspond pretty well to what a person can carry IRL without getting overtired when making some kindof activities

weary crypt
#

But if everything was realistic weight some things wouldn't make sense at all, take the barbell for example, the bar alone is ~20kg not to mention with 2 plates on it. But no character would be able to even pick it up otherwise

lusty nebula
#

@weary crypt Exactly...and IMHo this has not a lot of sense...

crimson spindle
#

thats why it makes more sense ot me that it represents how easy something is to carry rather than an actual weight/volume... if you really wanted to separate out weight/volume then they would have to switch to a system shock style inventory system, which admittedly woudl be pretty cool lol

weary crypt
#

The unfortunate answer in my opinion is to either completely recreate the system as Rokem suggests, or redo the weight of every single item to bring them in line. But at a certain point you have to ask if it's really worth it

lusty nebula
#

@crimson spindle Agreed. I just wanted to test the ground a bit before embarking on a similar project ... who knows if it's feasible ... mmm ...

#

@weary crypt Yes sure it's not a matter of life and dead but if feasible....why not....

crimson spindle
#

i think the best thing you can do right now as a modder is just look at the weights of the vanilla items, and look at what you are trying to add, and try to match it to something similar

#

again, i use the weights more as a concept of how portable something is. For example in my mod, my microscope weights 15.. if that kg, thats an insane weight, but i justify it in my mind because a microscope is that is somewhat fragile and not designed to be carried around in a backpack all teh time, so its not very portable

lusty nebula
#

@crimson spindle ...and that's exactly the problem because matching the weight is pretty easy to be done with some maths, the problem comes when you equip it ( as said becomes lighter ) so to match the real weight I have to increase the unequipped weight and this brings the problem that doing so you'll end up with a very limited inventory weight capacity

#

What I was guessing was if there is a file to edit to increase the max weight a character can carry...

#

( Maybe not ideal but surely the easiest fix )

weary crypt
#

I asked a while back about changing the amount weight is reduced when something is equipped and I was told effectively that it's hard coded but still possible with some wizardry that's beyond my level.

crimson spindle
#

there probably is.. tho i dont think it would be max weight a character can carry, but a variable in a formula, since the max carry weight is determined by strength

#

so its str x carryCap and you want to change that carryCap

#

something liek that im guessing

weary crypt
lusty nebula
#

@weary crypt You have to use JAVA for that. There's a JAVA unpacker around ( ...but in theory if hardcoded you should be not permitted to edit the code.... )

#

@weary crypt Thanks mate I'll take a look at it...At least maybe is a starting point...

weary crypt
#

np, like I said it's beyond my level so I left it there.

lusty nebula
#

@weary crypt Got a quick check at it but it plays only with the weight reduction bonus ( basically it increases it reducing the weight of the item )

shadow geyser
#

does any know if the body parts that are given insulation and and protection can be modified or are they locked to the clothing slot. Ive got a clothing that go into the gloves slot, but I would like them to give protection to also the lower arms because they are very long leather gloves that cover the lower arm. Is it possible to still have them in the gloves slot, but let them give protection and insulation to other body parts?

lusty nebula
#

Maybe it could be achieved doing so ( Just brainstorming a bit ) Current weight --> Weight reduction bonus --> Script that activate an arbitrary weight value when the weight reduction bonus is apllied ( Dedicated parameters for each item of interest )...

hidden estuary
#

now its accurate

main surge
#

Is there anyway to make and mod a backpack to spawn with certain items already in it?

lusty nebula
#

@main surge Sure mate. Take a look in the workshop there are many mods doing exactly that from which you can take inspiration if you want to make your own one

main surge
#

I havent found any that have items already in them though

hidden estuary
#

maybe More Traits has some of that?

#

some of the traits make you start with inventory

#

maybe one of them has a backpack with stuff inside

azure rivet
#

Hello, I want to add a better workshop description to my mod, but I don't know how I can put images and change the text style.

stiff nest
#

Hello all, I have recently modeled something, I wrote a script for it, made a distribution, but when I wear the item in game its invisible. Can anyone help?

crimson spindle
#

@azure rivet you can edit the description and add more imaged directly in steam after it has been uploaded

willow estuary
#

Don't see images on there but [img]https://YOURIMAGEURL.png[/img] should work

lusty nebula
#

( It adds the inmate coverall and a key for example )

azure rivet
willow estuary
#

πŸ‘

chrome egret
#

Slimmed down my UI

warm fjord
#

Does the server send both steam and local mods to the client?

chrome egret
#

When iterating over the containers provided by getPlayerLoot(playerNum), is there a good way to get the square/cell of those containers?

#

For example, when I search the fridge with the "Search Nearby" option as shown in my gif, what is the correct way to get its location?

#

I attempted accessing .parent as well as calling getParent(), and both avenues seem to result in "attempted index: getSquare of non-table null"

willow estuary
chrome egret
#

Where "localInventory" is each of the members of inventory.inventoryPane.inventoryPage.backpacks, the debug/crash window even seems to show that .parent is populated:

main surge
#

@lusty nebula that helps a lot! Now i just have to figure out how to connect it to my action.

#

Trying to cause the item to enter players inventory when they perform a certain action as oppsed to when they spawn

round zenith
#

thanks this worked out, now expanding the function to support many items with the same type but different names!

round zenith
#

Is there a way to add more types for item?

drifting ore
#

I need someone to update NecroForge to make it work in 41.66 :( dev abandoned the project

drifting ore
#

That allow cloning tiles?

south vortex
#

is there an alternative mod for fashion montage?

worldly stone
#

afaik in sand box settings check the box that unlocks all clothing

chrome egret
drifting ore
#

If that don't work, check the type of the container

chrome egret
#

I swear to god I tried that last night, but this morning it seems to be the magic combination

hearty herald
#

But if other mods edit it you'd probably have to get the maxweightbase instead of using 8, and remember how much you personally added onto ti

#

would likely cause conflicts either way πŸ˜‚

ashen karma
#

Hello everyone! I've been debugging an issue that apparently only I have when playing with the mod "Soul Filcher's Dressing Time" (https://steamcommunity.com/sharedfiles/filedetails/?id=2296517419), potentially because I'm on Linux?

The biggest problem here is that most of my zombies simply spawn without any clothes, or barely any. Because this only affects me, in multiplayer things become even weirder:

  • If I kill a zombie, the zombie on another person's screen suddenly loses all its clothing it previously had.
  • If someone else kills a zombie that to me appeared to not wear much, it suddenly gains a bunch of clothing.

Additionally, items from the mod error when on the floor, worn, or when it's trying to display the tooltip. Seems like I managed to get down to getClothingItem() return null, which appears to have to do with asset loading.

I've written down my findings in this Steam Community thread:
https://steamcommunity.com/workshop/filedetails/discussion/2296517419/3191366986200121738/

I haven't yet found another mod that causes this issue. (Or at least not this severely.) Still trying to find something that might point to a platform-dependent issue. (Such as filename case-sensitivity.)

ashen karma
#

@fleet snow At this point I'm basically modding the mod so are you sure that would be the right place?

fleet snow
#

true, but you still just trying to create a fix for mod and get it working properly, so i recommend going there and ping Soul himself

ashen karma
#

Is pinging people directly without their consent allowed on this Discord server? It's usually frowned upon.

fleet snow
#

FeelsWeirdMan well i usually do it anyways and im not getting angry being pinged.

Anyways, even then - isn't it better to ask a person who directly made this mod instead of asking around for people to figure it out for themself

if you dont wanna ping - you can copy this explanation above and put it in comment section of broken mod

#

so author will get notified

#

and look into problem

ashen karma
#

It's been a month without a response, though I created a discussion, not a comment - unsure if there's a difference. I will do as you recommend and ping them, though. I.. think it's reasonable. Thank you.

frosty falcon
#

not sure where to put this question but is it possible to located a stolen vehicle on an MP server, perhaps view a list of vehicles active on the server save or similar? just curious if something exists to assist, thanks!

round zenith
#

Is there a way to add more types for item?

willow estuary
gilded hawk
willow estuary
#

Well, in context, I assume they're asking about the "Type" parameter used in item scripts. Normal, Clothing, Weapon, Food, Radio, Movable, Container, etc.

gilded hawk
#

Oh okay thanks

round zenith
#

ya that. thats annoying I am trying to use getType to identify a type of items to add a contextmenu option to. Any other ideas how I could do this?

faint jewel
#

only two of those are released.

shadow geyser
#

is there a way to make recipes that only get loaded if another mod is activated. Id like to make some recipes to add functionality with other popular mods, but don't want them to appear if the person doesnt have the other mod, to reduce clutter.

lusty nebula
#

@willow estuary Are you still around mate? If yes I would like to gently request you if I can contact you privately here via PM because there is a thing I would like to ask you privately ( Nothing major just a 2 mins thing I guess. Thanks in advance.

lusty nebula
#

@hearty herald Yesterday evening I have evoked one of the LUA Gurus from his ancient and eternal sleep ( πŸ˜„ ) but he says that, even if in theory the way in which the weight system works is modifiable ( ..and even considering it as a feasible thing, it will be a very hard tasks due to the current weight system/Java core code used ) somehow to achieve it , the game JAVA core code must be decompiled so something not feasible respecting the rules imposed by the Devs. The best hope is that the devs in the future will separate the item weight from the equipped weight having them as individual item proprierties or let us adjust the weight reduction for equipped items....Until then we will have to live with the 70% weight reduction the game applies when you equip an item, unfortunatey....

shadow geyser
# lusty nebula <@!128822827003412480> Yesterday evening I have evoked one of the LUA Gurus from...

maybe you could modify the actual weight of the time with a function in OnClothingUpdated? so when you equip an item, it would check if you have a certain item equip, and then modify the weight of that item using setWeight. Then also the to check if you have the item in nearby inventories, ground, player inv if the item is there, and reset the weight back to normal. A bit hacky, but it will let you get the behaviour you want

lusty nebula
#

@shadow geyser Basically what we have done yesterday for all the evening but no joy unfortunately...

#

whatever you'll do one of the 2 values when equipped/unloaded will be always wrong

shadow geyser
#

oh I see, in the java the get equipped weight is actual weight(which seems to be based on the item definition) plus getContentsWeight. Maybe you could do it by turning the item into a magazine, but you can only directly unload/load the magazine with the OnClothingUpdated function

#

maybe its possibler to make the ammo give negative weight

lusty nebula
#

We tried pretty much all that is humanly possible ( we even take a look at the core code ) but if you don't touch it no way to achieve the desired result

#

the big issue is that the item weight and the item equipped weight are linked...You set the correct weight of a clothing item? Soon as you equip it it will apply the 70% weight reduction...and that's hardcoded ( or better said we can't touch it )

#

plus the same code is used for many other things.....

cerulean wedge
ashen karma
shadow geyser
# lusty nebula the big issue is that the item weight and the item equipped weight are linked......

right but what I mean is that if you want to say get a 90% reduction on an item with 1 weight. When equipping it, you would modify the weight of the item instance to be 0.333. then 0.333*0.7 = 0.1 weight. Maybe you would have to do the thing with making the item a custom magazine to actually modify the weight if setCustomWeight or setWeight doesnt work. Then when you unequip it you would do the reverse. you modify the 0.333 weight item to be 1 weight

shadow geyser
#

@lusty nebula here is a sledge hammer that i've given 90% reduction when equipped. Then all you would need to do it modify the checktooltip function to properly display the "weight: 0.6 (2.0 when unequipted)" to show a different string when hovering over one of your items with custom weight reduction percentage, to show the correct numbers it will behave with since this behavior was kinda hacked in.

lusty nebula
#

@shadow geyser One of the problems is exactly the tooltip.....

#

( Somehow I've passed your suggestions to the expert )

daring palm
#

Hey guys. When I use addZombiesInOutFit() from the server-side, the zombies are created but despawn after 1 second, leaving this message in the log: "removing stale zombie 5000" ...

I've searched here and I found out that @sour island faced the same problem. I'm not sure how he solved that, but it seems to me that the only solution is to "poke" an available client to issue the command as it is done in ISSpawnHordeUI.

does anyone have a better solution?

faint jewel
#

and how the HELL do i get rid of that.

vivid flare
#

remove seat? :>

faint jewel
#

did that. still there

vivid flare
#

some template still inheriting maybe?

late hound
faint jewel
#

ibrrus did it with the motoclub 😦

#

but i dont wanna have to make his required if i dont have to.

chrome egret
#

Can't you steal the way it was done?

faint jewel
#

i just went to the horse.

main surge
#

Im trying to create a script that adds an item to players inventory.

Should the function be 'local' as well?

chrome egret
#

Usually you do want to scope things down and not create things in the global scope

gilded hawk
undone crag
faint jewel
#

AHHHHHHHHHH why wont you load my o h my god i am a dumbass nevermind me.

willow estuary
#

Offhand, it should be
item:getCategory() returns the item's type.
item:getType() returns the script item name.
item:getFullType() returns the full module + script item name.
item:getDisplayCategory() returns the item's display category.
item:getDisplayName() returns the item's name.
Yeah, confusing as fuck.

drifting ore
#

Is there any mod to remove or lower the stunlock from being shot? It makes pvp not fun imo.

#

Also, I'm looking for a mod that shows faction players only on the map

faint jewel
#

you can set the show players on map mod to do that.

chrome egret
#

@willow estuary do you know what the "Java Scripting Guide" modding tutorial is supposed to link to/download? It seems to do nothing when I click on it.

willow estuary
chrome egret
#

Right, I see the RTF link but it's not downloading, at least through Chrome

drifting ore
willow estuary
#

Works on my end with Firefox. Beats me?

chrome egret
#

huh, yeah, it did work in FF

#

what the heck Chrome

willow estuary
#

It's also 7 years out of date, looking over it I don't think it's very applicable to current PZ.

#

Some of the information is still valid, but stuff like

Container Item Distribution

These objects are a set of rules governing how items are distributed around the map. An example follows:

containeritemdistribution
{
    Room            =            shopGeneral,
    Containers        =            counter,
    Bread            =            10-20,
    WhiskeyFull        =            5-10,
}

is wildly out of date.

chrome egret
#

With a funky title anyway

willow estuary
#

I wouldn't bother with it TBH?

chrome egret
#

Yep, that's where I'm at with it. Is it even worth keeping the link up?

willow estuary
#

For the most part, I don't make those calls?
There's people who want out of date information for past builds archived, although I believe that does more harm than good in muddying the waters.
I put a notation regarding it being out of date, but also, just like mods on the workshop, people need to be discriminating about evaluating how old some of these resources are?

chrome egret
#

For sure. It's already got a date on it.

willow estuary
#

There's a few people who fuck around with those antiquated builds, and they're very into them πŸ˜„

chrome egret
#

Interesting. I wonder what's the most popular "legacy" build.

willow estuary
#

Well there's the potato bunch who are stuck with b40 however, dunno how many of them are active/playing the game.
Aside from that, with the older builds, all I've seen is that every now and then someone randomly gets obsessed with them.

chrome egret
#

Oh, did the minimum system reqs increase for b41? I didn't start until 41.65

willow estuary
#

Significantly.
There's also the "superior pixel graphics" bunch, but I dunno how much of that is actually "superior pixel graphics" and how much of that is potato computer copium?

chrome egret
#

As in, b40 graphics are supposed to be "superior"? Hard to believe...

willow estuary
#

Well, as they say, it takes all kinds?

#

But yeah, none of those guides, especially the crowdsourced stuff, should be considered "the flawless word of gawd"?

chrome egret
#

Yeah, no shade from me. People can play what they wanna.

faint jewel
drifting ore
#

What file is it? And how do I upload it?

faint jewel
#

is it possible to set a vehicle trunk to be a dumpster?

chrome egret
#

What do you mean, be a dumpster?

faint jewel
#

like how, if the server allows it, you can put stuff in a dumpster and just DELETE it all.

#

i want my trucks trunk to do that.

chrome egret
#

ahh

#

Have never done that, but that would be nice

hidden estuary
#

can corpses go in it too?

faint jewel
#

technically anything can.

#

but unless i can get it to delete them it's just another vehicle.

#

lol

round zenith
honest lynx
#

Is there a mod where i can ride choppers?

fleet snow
honest lynx
fleet snow
#

Did you read a description

#

To learn controls?

chrome egret
#

Does mod file loading have anything to do with directory/file naming within your mod dir?

#

Aka if I make a 0_utility folder, will that load before a 1_impl dir?

faint jewel
#

no.

chrome egret
#

Is there another way to ensure certain files load before others?

faint jewel
#

can i ask why?

drifting stump
#

not folders but files

#

so a 0_name file will load before a 1_name

twin ginkgo
#

uh

#

i had problem

#

did someone know this problem?

drifting stump
#

likely missing a dependency

chrome egret
#

Instead of defining them globally or re-defining in each file

drifting stump
#

if you require a file it will load it so you dont need to mess around with load order

chrome egret
#

So drop the naming schema and just require it by name

drifting stump
#

let me link the example

#

here

chrome egret
#

Simple enough, thank you

twin ginkgo
#

uh

#

i-

#

had a problem-

chrome egret
#

Didn't you already post this here?

drifting stump
#

missing dependency

twin ginkgo
#

ah ok didnt ping so i dont know you reply me

#

how to fix?

chilly beacon
#

check the dependency by clicking the mod and read on on the right panel

twin ginkgo
#

oh thanks

#

damn it needs profession framework 41 patch

hearty herald
# faint jewel

Have you looked at the code for trashbins? since they can delete stuff, even has a button for it in the inventory management

faint jewel
#

that's what i'm looking for.

#

all the trashbins i know of are tiles.

hearty herald
#

Hmm, guess furniture are tiles

#

Next guess would be looking at the inventory ui then? since it adds a button to delete for trashbins

#

Like in same row as "pick all" or "put in all"

faint jewel
#

nah ui is too much. the refrigerated mod made the trunk a fridge. there has to be a way to make one a garbage bin

#

part:getItemContainer():setType("fridge")

#

i need that list of types.

hearty herald
#

Well you should still look into the code is all I'm saying

faint jewel
#

that list of types and i can do a ton of fun things lol.

hearty herald
#

To see how it detects it, or does it

faint jewel
#

well there's a good start lol.

#

it's from ibrrus of course.

chrome egret
#

@faint jewel

#

Seems you could set that "IsTrashCan" property

smoky meadow
#

Guys do you Know how to Make a Simple GUI in Project zomboid?

chrome egret
shut storm
#

hey, i'm considering to make some mods for this game, but i have no experience at all (the only mod i made was for total war games with the pfm program, editing something here and there). I want to know... how hard is to make idle animations? I wanna try to make a bunch of sit or lie in ground/couch/chair/bed poses...

faint jewel
#

lol you have fun.

#

we need an animator but it runs a lot of people off.

shut storm
#

i'm sorry i think i didn't understand what do you mean but i am no animator, but i'm prone to learn how to

faint jewel
#

well the #modeling channel would probably be a better bet. but i warn you. it's rough adding anims.

twin ginkgo
#

is there has mod increase hotbar to use more weapon?

twin ginkgo
#

oh

#

wait

#

a second is old

blazing radish
#

maybe it would be better if you look up for hotbar in the search panel in the workshop

twin ginkgo
#

still work now?

blazing radish
#

becauyse there are a lot

#

but planetalgol have some and a core that updates frequently

twin ginkgo
#

ok i will try

blazing radish
#

2 extra slot was enough for me

twin ginkgo
#

is your can use more wepon at once?

blazing radish
#

no, only to have mroe in belts

#

there is one for 2 weapons at once

twin ginkgo
#

i want to use more weapon at once

#

lazy to swtich in inventory

#

i mean switch to hotbar

blazing radish
#

more belts will depend on the weapon, because it only adds 2 extra slots to carr stuff like a radio or a watter bottle

#

if a w eapon can be equiped on the belt slot you'll have 2 extra slots to attachthem

#

with the double holster you get 2 extra for firearmsand is enough imo

twin ginkgo
#

i mean this

#

did you know?

blazing radish
#

I'm not getting what you want, you want extra slots or more info on the slots?

twin ginkgo
#

extra slots

#

rj πŸ‘

blazing radish
#

more belts and looking for hotbar will show some mods that adds extra slots

twin ginkgo
#

okok thanks so much

blazing radish
#

np mate

shadow geyser
#

has anyone had success mixing item types together? Im trying to create a piece of clothing that is also drainable. Its meant to be a strapped on canteen that you would have in the ammostraps slot. And from what I can tell, I need the item to be drainable, so it can be drunk from, but also type clothing, so it can be equipped

willow estuary
# shadow geyser has anyone had success mixing item types together? Im trying to create a piece o...

No, item types are not "mixable" and are very inflexible.
Now you could use custom lua code to make what you want, but it would require time and effort with custom lua code.
This mod, for example, has the night vision goggles that are clothing items, but are also "drainable" in the sense that the battery charge is tracked and such.
But there's no shortcuts for mixing item types.
https://steamcommunity.com/sharedfiles/filedetails/?id=1793461606

shadow geyser
frosty falcon
#

reckon its currently possible to make a vehicle shop? trade items for a vehicle spawn

hybrid badge
#

does anyone know of any mods that add medieval weapons? I am specifically looking for a flail

#

alternatively can anyone speak to a ballpark figure what it would cost to commission a mod like that?

faint jewel
#

well a mace could be possible.

#

but a flail would look weird. as it would not animate.

nimble spoke
#

There is a mod with medieval weapons on the workshop

faint jewel
#

hey soul!

#

any chance you might know the item container type for a dumpster?

nimble spoke
#

The same for any garbage bin, possibly Bin, I don't know

cosmic glen
#

So I saw in a stream yesterday a guy was wearing some trousers that gave him an extra pocket in his inventory. Does anybody know what mod that is?

#

or is it a vanilla thing that I might be missing like tailoring?

opaque citrus
#

Does anyone know, if I add a mod that adds new items to the game and the save is already in-progress, will those items not appear in the world?

chrome egret
#

It depends entirely on how far you go with your implementation. If you define the new items and only add them to the sets available for initial generation, then yeah totally. But you have the freedom to hook into other events/parts of the game to generate some of your items if needed.

#

^ Very general answer, I'm not someone who's specifically added new items, changed distributions, etc. Just my impression from looking outside-in

opaque citrus
#

Great, thanks πŸ™‚

faint jewel
nimble spoke
faint jewel
#

if i edit a base file (to add a new function) will it load over the original file?

#

i mean it sucks, i just wanna add ONE freaking like to it.

faint jewel
#

part:getItemContainer():setProperties(IsTrashCan) was setProperties removed?

trail lotus
#

Is there any way in game to set up a trader thing that players can buy items or sell items to for money? Or is there any mods that allow that (store would be owner controlled)

faint jewel
#

I CALL UPON THE TRASH POWERS OF @hearty herald !

faint jewel
#

hobobobo!

#

function GarbageTruckTrunk.Create.GarbageTrunk(vehicle, part) i need do get the sprite of the vehicle. HOW DO

#

local sprite = vehicle:getSprite() does not work.

shadow geyser
#

has anyone seen this kind of error before?
STACK TRACE

function: @stdlib.lua -- file: null line # 10
function: setVisible -- file: ISCraftingUI.lua line # 30
function: toggleCraftingUI -- file: ISCraftingUI.lua line # 1337
function: onOptionMouseDown -- file: ISEquippedItem.lua line # 473
function: onMouseUp -- file: ISButton.lua line # 56

#

I have no idea what to make of the null line # 10

chrome egret
#

The file is null because the function comes from the Lua standard library

#

If I have the right line, it borked out calling ipairs on self.categories:
for i,v in ipairs(self.categories) do

willow estuary
#

My guess something further upstream is sending invalid or null data to a function that gets passed through a series of functions before it causes an issue.

hidden estuary
#

do I need to assign loot to a specific zombie "outfit"? I cant just assign to zombies in general?

#

I wanna make a somewhat rare find that can happen on zombies but if I just add this "rare chance" to 30 different zombie types then its gonna end up a lot less rarer than intended

#

I'm referring to ZombiesZoneDefinition.lua under NPCs, forgot context

chrome egret
#

Can you make your rare chance 1/30th as probable?

hidden estuary
#

unpredictable

#

cause zombie types are assigned to zones, or thats what i took from it

#

so depending on where players live they might run into 2 or 4 types at best

chrome egret
#

So it'd need to be specific to the area, which is finicky

hidden estuary
#

is there not a "general" group for zombie loot?

willow estuary
hidden estuary
#

whats cokebaggie

#

is it a common zombie that winds up everywhere?

willow estuary
#

Oh that's not important, that's just where you put the script name of the item.
Yeah, corpses and zombies when they get killed.

maiden spindle
#

Hi, is it possible to create an item that mimics the effect of "multi-part" placed items? By that I mean building items that when picked up put the parts on the ground (e.g. Picnic Bench (1/4), Picnic Bench (2/4), ...)
and if so, please can someone point me to a mod that does this so I can take a look at how it works?

hidden estuary
#

oh I missread that code, I see

#

ty

faint jewel
#

AHHHHHHHHHHHHHHHHHHHHH
FFS WHY

#

how much more "trashcanny" can i get?!

chrome egret
#

What did you try?

#

I mean yeah, it looks like one πŸ˜„

chrome egret
#

Also @faint jewel have you emptied a regular trash container to see if it logs anything helpful?

faint jewel
#

It doesnt

chrome egret
#

How did you build the args for sendClientCommand?

faint jewel
#

It wants a TILE not a vehicle

#

Gotta make a new command

maiden spindle
wet osprey
#

has anybody saw a mod related to temperature inside buildings? like a heater mod or how to raise the temperature

faint jewel
#

@chrome egret lua Commands.object.emptyTrash = function(player, args) local object = _getTrashCan(args.x, args.y, args.z, args.index) if object then object:getContainer():clear() if object:getOverlaySprite() then ItemPicker.updateOverlaySprite(object) end object:sendObjectChange('emptyTrash'); else print('expected trash can') end end
that;'s the client command.

#

so i gotta write a whole ass new one.

faint jewel
#

omfg. i';ll make a model for someone who can make me a duplicate of the empty trash button in it';s own script.

azure rivet
#

Hello, is there a command that when a clothing is broken it is not sent to inventory?

chrome egret
faint jewel
#

Can't just add commands?

chrome egret
#

not into this Commands table that already exists

#

buuuut

#

At the end of the file it does call Events.OnClientCommand.Add(ClientCommands.OnClientCommand)

#

maybe an alternative would be to intercept the command in an event handler you add for OnClientCOmmand

#

you know it won't work for the base handler, but that's fine, cause you only want to invoke your own code

faint jewel
#

i had to change so damned much JUST to get the stupid buitton to show up

chrome egret
#

object:getContainer():clear(); object:sendObjectChange('emptyTrash');?

#

oh no, you can't

#

because this has to run on the server, and if you call it on the client then it won't be accepted

harsh prairie
#

What’s the proper way to add an override field for a recipe?

chrome egret
#

@faint jewel something like this in a \server sub-dir would be my guess. This is just off the cuff:

EXTRA_CLIENT_COMMANDS = {};

EXTRA_CLIENT_COMMANDS.GetTrashContainer = function(x, y, z, index)
  local square = getCell():getGridSquare(x, y, z);

  if square and index >= 0 and and index < square:getObjects():size() then
    return square:getObjects():get(index);
  end
end

EXTRA_CLIENT_COMMANDS.IsEmptyTrashCommand = function(module, command)
  -- However you know it's your command
end

EXTRA_CLIENT_COMMANDS.OnEmptyTrashCommand = function(module, command, player, args)
  if self.IsEmptyTrashCommand(module, command) then
    local x = args.x;
    local y = args.y;
    local z = args.z;
    local obj = self.GetTrashContainer(x, y, z, index);

    if object then
      object:getContainer():clear();
      object:sendObjectChange('emptyTrash');
    else
      -- Couldn't get an object with a container to clear
    end
  else
    -- Do nothing, not our command
  end
end

Events.OnClientCommand.Add(EXTRA_CLIENT_COMMANDS.OnEmptyTrashCommand);
analog hedge
#

Would SensorRange = 3 mean something that is up to 3 squares away?

faint jewel
#

how do i check if a vehicles trunk is empty?

winged nest
#

Hello, I would like to slightly increase Adrenaline Junkie's speed bonus, but I can't find the trait code in any lua folder, in MainCreationMethods only adding the trait itself, where is this code hidden or how to change the trait?☹️

smoky meadow
#

guys how to create a Custom Animation in Project Zomboid. does they use blender to animate?

chrome egret
#

Lots of people have definitely mentioned blender

daring palm
marsh beacon
#

Bruh now they are sending the file

#

Amazing

#

<@&671452400221159444>

inland crater
#

I accidentally enabled "view thread.something" in the F11 lua debugger and now the game is frozen

#

stays that way, any ideas on fixing this

lusty nebula
low yarrow
wheat junco
#

Is this a place to ask for mod recommendations? I'm looking to see what the most stable trait expansion mod is, my friends just want additional traits to mess around with

lusty nebula
#

Got rid of the bubble thing..You need to edit the png file mask_circledithernew in the media folder...

low yarrow
flat quail
#

On a scale of β€œMash shit together in a .txt file” to β€œShould probably get a software engineering degree first” How modding friendly is PZ?

low yarrow
flat quail
#

Vehicles. I’ve modded a bit before as well

#

I want to make a killdozer

low yarrow
#

Oh, i never have made vehicles so i am not sure about that. πŸ˜„

flat quail
#

What kind of mods do you do?

low yarrow
#

But i am pretty sure modelling is not everything as well in vehicle modding.
In my current outfit i spend like 30% of the time in modelling, and 70% to make the stuff around it work πŸ˜„

low yarrow
flat quail
#

Ah

low yarrow
#

Next problem to solve:
Why does my character surrender at attaching a gun. πŸ˜„

#

Happens when i select a animset

craggy furnace
faint jacinth
#

Heyo, can you guys point me to good resources/documentation to start modding on project zomboid?

#

I already have Lua down to an art I just need to find some good tutorials to get my grounds

#

Already got the modding wiki

#

Just a question, how often will I be encountering Java data in Lua?

#

since I noticed in the documentation I can't treat the tables returned from certain functions as normal lua tables

harsh prairie
#

How do I remove a vanilla recipe for a mod?

nimble trail
#

I'm looking to make a hopefully simple modification to this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2287977869
I want to make it so all it's AddWeightOption.lua does is provide a context menu "add weight void" option which gives you the WCWeightVoid item (I have already edited WeightVoid.txt in media\scripts\ to my liking, so it's less of an infinite weight void and more of a 100 weight reducer), here's the base file for reference:


WCWeightVoid.isEnabled = function(player)
  return player:getInventory():contains("WCWeightVoid")
end

WCWeightVoid.createMenuEntries = function(playerIndex, context, items)
  local player = getSpecificPlayer(playerIndex)

  if not WCWeightVoid.isAdmin(player) then
    return
  end

  local isEnabled = WCWeightVoid.isEnabled(player)
  local optionText

  if isEnabled then
    optionText = isEnabled and "Disable" or "Enable"
  else
    optionText = "Enable"
  end

  context:addOption(optionText .. " infinite carrying capacity", items, WCWeightVoid.toggleInfiniteCarryWeight, player)
end

WCWeightVoid.toggleInfiniteCarryWeight = function(_items, player)
  local isEnabled = WCWeightVoid.isEnabled(player)

  if isEnabled then
    player:getInventory():RemoveOneOf("WCWeightVoid")
    player:setMaxWeightBase(8)
    player:Say("Disabled infinite carrying capacity.")
  else
    player:getInventory():AddItem("Base.WCWeightVoid")
    player:setMaxWeightBase(999999)
    player:Say("Enabled infinite carrying capacity")
  end
end

WCWeightVoid.isAdmin = function(player)
  return not isClient() or isAdmin() or isCoopHost()
end

Events.OnPreFillInventoryObjectContextMenu.Add(WCWeightVoid.createMenuEntries)```
willow estuary
faint jacinth
#

Oh my bad

#

the naming for the channels was confusing

willow estuary
#

Basically mod_support was added because this channel was getting flooded with people with "why does mod not work for my server" when MP dropped.

faint jacinth
#

ooh

#

If you have the time, could you direct me to any beginner tutorials for Project Zomboid modding so I can get a grasp on how to navigate the game files?

nimble trail
#

also I have some experience coding other stuff but barely any experience messing with the insides of mods so they do what I want a little closer to how I want it

willow estuary
faint jacinth
#

Yeah, I'm just figuring out how the mod is organized

willow estuary
#

There are no shortcuts

faint jacinth
#

well no I'm not looking for shortcuts

#

the documentation is brief on how the files are organized

#

It just tells you this goes here and this goes here

#

without explaining if there were any potential things I would need to know before going into there

#

I don't know if there are any specific naming schemes I have to follow with folder names etc

manic portal
#

anyone got a furniture spawner mod? like necroforge but updated?

faint jacinth
#

that might break zomboid

willow estuary
manic portal
faint jacinth
willow estuary
#

Possibly? I'm just a stoned idiot caveman that played with the lego pieces until they worked?
I'm not a technical smart coder guy.

faint jacinth
#

ooh

#

alright

#

because I have a mod idea that I wanna try

#

and I'm just getting my grounds first

#

basically a new item that would act as a central access point for multiple storage containers.

nimble trail
#

I'm gonna grossly obrez this code and hope it works

faint jacinth
#

it's worth a shot tho

willow estuary
#

I believe the way inventories are handled in MP might be reworked at some point as well.

drifting stump
#

as far as i know folders are purely for organization

#

the game doesnt care about the folders when loading

faint jacinth
#

this is basically my goal

#

it's the same concept as your regular inventory

#

but it can be annoying trying to switch between containers

#

so having a single access point would make life easier

nimble trail
# nimble trail I'm looking to make a hopefully simple modification to this mod: https://steamco...

let's hope this works


WCWeightVoid.createMenuEntries = function(playerIndex, context, items)
  local player = getSpecificPlayer(playerIndex)

  if not WCWeightVoid.isAdmin(player) then
    return
  end

  context:addOption("Add weight void", items, WCWeightVoid.addWeightVoid, player)
end

WCWeightVoid.addWeightVoid = function(_items, player)
   player:getInventory():AddItem("Base.WCWeightVoid")
end

WCWeightVoid.isAdmin = function(player)
  return not isClient() or isAdmin() or isCoopHost()
end

Events.OnPreFillInventoryObjectContextMenu.Add(WCWeightVoid.createMenuEntries)```
willow estuary
# faint jacinth this is basically my goal

Oh sorry, I thought you mean some sort of case where there was a magic storage box somewhere in the world that you could access in other areas of the world?
So nevermind my "might not be possible", it was in regards to that concept, not yours.

willow estuary
#

πŸ˜„

faint jacinth
#

for now i'm just gonna have it work "wirelessly" as a prototype

#

then add items you would need to hook up storage containers to the access point

#

you could theory have a long distance access point

#

but it would take alot of materials

#

and i'll experiment with the AC situation aswell so see if I can make that a possibility

#

but short range is still very good

#

I think the best way to get around the AC would be to have a infinite storage space of the access point that players can't access that is solely used for the server to move items from one storage container to another

#

so when the player grabs the item out of the inventory it's grabbing it from the access point and not the storage container from far away

#

is the player object already implemented into the client environment of a new script?

#

I can do this right off the bat?

#

Is there anything I do to the game itself to setup for creating mods?

faint jewel
#

how do i check if a vehicles trunk is empty in lua?

faint jacinth
# willow estuary πŸ˜„

Sorry for the ping but there is nothing in documentation telling me this.
Is there any settings/customization I do to my zomboid client to get debug info?
Mainly need to figure out how to get the console opened

faint jacinth
#

Thank you very much

willow estuary
#

Also, make sure and check stuff in not-debug mode, as there are corner cases where some stuff behaves inconsistently between the two modes.

faint jacinth
#

is just rejoining the project zomboid world plenty for a update to the mod to pass?

willow estuary
#

As I recall, the lua files should reload when you quit to main menu and then return to the saves if the mod is only activated in that save, and is not activated in the main menu general mod activation screen.

#

ie when developing a mod, don't activate it in the main screen mod interface, but instead activate it when creating a new game like so

faint jacinth
#

should print be visible in the debug console?

willow estuary
#

Yep!

faint jacinth
#

awesome some weird behavior going on where I don't see the print in the console

#

prob doing it too early for the print to be added

willow estuary
#

You can also check console.txt in C:\Users\YOUR_USER_NAME\Zomboid or wherever said directory is.

faint jacinth
#

can't find console.txt in the directory

#

atm just trying to get a sign that any of the stuff I'm writing is loading

#

not getting anything

#

is OnContainerUpdate a server only event?

#

I gotta use the bathroom real quick I'll be back

late hound
last ridge
#

should i play modded starting off new?

faint jacinth
#

only info I can find

#

atm I just want to figure out what I'm doing wrong here for print to not work

faint jacinth
#

I'm following this mod tutorial and what the heck

#

Do I seriously have to sift through almost 10,000 lines and remove shit for the distribution file?

#

nevermind the tutorial guy failed to mention you can remove 99% of the stuff

craggy furnace
faint jewel
#

in what way?

faint jacinth
#

man, if only youtube didn't remove the dislike counter i would of known the tutorial i was following was crap.

craggy furnace
faint jacinth
#

I gotta go eat, if someone knows a good youtube tutorial I can follow that is actually informative and can help me with basics it would be epic. Thanks.

harsh prairie
harsh prairie
#

I know I’ve asked this before, but how do you remove a vanilla recipe?

drifting stump
#

@faint jewel what did you need

faint jewel
#

oh... i was working with the radial api, and cannot for the life of me figure out how to get it to open when you are at the trunk only.

#

soooooo... i just made it a "near the car" thing.

nimble spoke
faint jewel
#

I mean v is disabled when in the trunk zone

harsh prairie
drifting stump
#

i can use v near the trunk

faint jewel
#

It just turns off the ui for me. Like I'm too far from any thing

drifting stump
#

yeah might have to do with the size of the vehicle

faint jewel
#

Hmm

#

The trunk works though

harsh prairie
#

I still can't remove the recipe. Here is the script. What am I doing wrong?

module Base
{
recipe Create Spear
{
Plank/TreeBranch,
keep HuntingKnife/KitchenKnife/SharpedStone/FlintKnife/MeatCleaver/Machete,

    Result:SpearCrafted,
    Time:100.0,
    OnCreate:Recipe.OnCreate.CreateSpear,
    Category:Survivalist,
    OnGiveXP:Recipe.OnGiveXP.WoodWork5,
    Override:true,
    Obsolete:true,
}

}

raw vault
faint jewel
#

Yes

raw vault
#

oh sweet what do they cut up to

strange geyser
#

Anyone know if you need to add all the mod ID names from the slow sprinters/joggers and runners mod? Having issues with it

faint jewel
#

up to? it cuts long grass and shrubs the hedges saplings and trees are safe.

#

it also does not do anything to crops (that i know of)

main surge
#

How would I script a simple "add item to player inventory"?

viscid drum
#

is there a way to make a pistol have weapon attachments on spawn?

#

Base.Pistol spawns an empty pistol, is there a way to make that have a magazine and weapon attachments on it already?

fallow bridge
#

i found 2 M9's both with magazines and one has a laser on it

faint jewel
#

how do i check if a vehicles trunk is empty in lua?

viscid drum
fallow bridge
#

Base.9mmclip

viscid drum
#

yeah, thats kinda obnoxious, was hoping there was a work around

fallow bridge
#

don't think there is

viscid drum
#

cause I was having to spawn them with the pistol, a magazine, and bullets

fallow bridge
#

i mean that's pretty easy

viscid drum
#

it is, was just hoping there was something simpler

fallow bridge
#

just base.pistol,base.9mmclip,base.9mmbox

strange geyser
#

Anyone have issues with map mops like rosewood expansion being half okay and the rest looking like this

#

the buildings are just black spaces until you look at them and then its just empty space with nothing there, just grass

#

im having this issue with every map mod

strange geyser
#

I did

winged pebble
#

then you didn't need to ask in this channel

raw vault
faint jewel
#

well that's where i hit a problem. being able to run over saplings turned it into a full on DEFORESTER. trees were no challenge.

shrewd nymph
#

How would one go about making a trait mod?

faint jewel
#

might be prudent to look at one of the existing ones?

chrome egret
#

Yeah, one of the standard example tutorials on the wiki under Modding is about adding a custom trait + profession

fair frost
chrome egret
#

Those look fantastic!

drifting ore
#

Anyone know the name or can give the link for a vehicle claiming mod for a server?

fair frost
inland crater
#

What size should item icons be so they don't look enormous on the floor

#

I wonder iiff photoshop is changing the sizes of these actually

faint jacinth
#

Does anyone know any good tutorials just for basics of modding. Literally as simple as adding a single item to project zomboid. The last tutorial I tried to follow was an hour long and apparently didn't work.

inland crater
#

this guy ended up making an actual model for it

#

how would I scale the icon itself, and not a FBX item

chrome egret
#

If that scale property doesn't do what you want, I'm afraid I don't know the answer.

#

My mod is concerned with finding items, not adding new ones, so it's not something I've done. Just thought that ref might help ya.

inland crater
#

it gave me a good idea

#

appreciate the link

celest crane
#

Alright, I need help. I'm trying to make an invisible fanny pack. I could make an invisible bag, but somehow fanny packs throw an error when worn:
Exception thrown java.lang.RuntimeException: attempted index: setTint of non-table: null at KahluaThread.tableget line:1689.

#

They're literally just the vanilla fannypacks, but with baseTexture of an empty texture. I'm not sure what that setTint is and why it fails

harsh prairie
#

I figured out one issue with my mod, but now I have one more. My mod has support for another mod, and I want to remove a recipe from it. I have tried copying that script file and putting in an obsolete, an override, and both, but none do the trick.

crimson spindle
#

How do I completely overwrite a lua file from another mod, like if i wanted to make a patch for that mod?

celest crane
#

Well this is real stupid

#

I found out I missed </fileGuideTable> but now the error is somewhere else: when I'm right clicking on the fanny pack an error shows up about it trying to get clothing data RuntimeException: attempted index: IsClothing of non-table: null at KahluaThread.tableget

#

I think this is specific to fanny pack because the custom backpack runs just fine

drowsy needle
#

How do I make a poster for a mod, again?

#

The little preview images when oen views them in the "Mods" section of the Main Menu?

celest crane
#

change the poster.png I assume

spare sun
#

Is there a way to get/set extra data (properties not already existing in vanilla) on a player/character? In a way which is saved when the client/server saves?

drowsy needle
#

So, uh... hate to ask for help again, but... I can't seem to get the stuff in this mod to load properly. I'm hoping to create a new pair of scissors but can't.

#

I have the mod in my mods folder, but when I tried to add it to a save, then open up a the cheat menu to see if I could spawn the special mod scissors, I couldn't find it.

willow estuary
spare sun
drowsy needle
#

there isn't anything wrong with this recipe, is there? Maybe there is, but I don't know...

    {
        Scissors,
        Salt,

        Result:LowrysScissors,
        Time:60.0,
        Category:Survivalist,
    }```
crimson spindle
#

looks fine to me, only thing to double check is if survivalist is a category ingame, if it is then youre golden

willow estuary
crimson spindle
#

oh wait

#

there is a problem

#

LowrysScissors is your custom item right?

drowsy needle
#

Yes.

crimson spindle
#

you probably have to put the module name first

#

so module.LowrysScissors,

willow estuary
#

Result:WHATEVER_YOUR_MODULE_IS.LowrysScissors,

drowsy needle
#

So, if there's only Module_Base, it'd be Base.LowrysScissors?

willow estuary
#

Then it would be unecessary.

#

But again
Try having the recipe produce a vanilla item instead to evaluate whether your issue is the recipe, or your item.

#

Just as a basic troubleshooting measure.

drowsy needle
#

Got it.

willow estuary
#

Basic, tedious, step-by-step troubleshooting is a wonderful tool for solving such mysteries.

harsh prairie
#

Hey @willow estuary, do you by chance know how to remove a recipe from a separate mod if your mod also uses items from that recipe?

drowsy needle
#

Ugh. Even after removing the recipe entirely, I still can't seem to get the LowrysScissors item to be spawned.

#

And it isn't showing up in the item spawner either

willow estuary
willow estuary
drowsy needle
#

Ugh. At this stage it might be easier to just create something from scratch, add items one by one and then check to see if they work.

willow estuary
#

Honestly, sometimes that saves plenty of time and headaches.

drowsy needle
#

Starting from scratch?

willow estuary
#

But yeah, if your having issues with scripts add items one by one and then check to see if they work is absolutely the right way to go about things, with you checking after every item you add.

drowsy needle
#

I'll give that a try, then. Though I might make the same mistake I did last time, or something.

#

Thanks for the advice.

harsh prairie
drowsy needle
#

It's happening.

harsh prairie
#

where can I find the icons for the weapons?

undone crag
#

In a file with a lot of them in a big image and with also another file saying which bits of the image are which icon.

harsh prairie
#

where is that file?

undone crag
#

Β­ Β―_(ツ)_/Β―

drowsy needle
#

So, when making distributions for an item

#

Does replacing the .items thing with .junk mean it spawns as junk?

#

Also, how do I give a pair of scissors the ability to cut clothing?

#

Do I just give it the same recipes as regular scissors and make the appropriate substitutions?

misty raptor
#

Is there documentation for the Tsar's mods? We're on an old world and want to spawn in one of the cars manually since they're not spawning.

chrome egret
misty raptor
#

Thanks!

drowsy needle
#

How do I get items to spawn impaled in zombies?

willow estuary
#

Look in shared/Definitions/AttachedWeaponDefinitions or such.

willow estuary
#

Throwing together a vehicular explosion system (not blowing up the car right now as I need it to test injuries)

wise spire
#

Does anyone here have a good way to edit gui? I'm not a programmer, but want to do an overhaul of windows, radials, and icons. Is there a graphical plugin for something that everyone uses or do I have to learn to read code...

raw vault
#

was anyone ever looking to make a train mod?

peak raven
#

@willow estuary I was thinking about making a mod that cuts the player when the windshield breaks on cars. But I suppose you're kinda already going a step above that lol

dense lodge
#

hey where did you find the vhs tapes in the base game?

twin ginkgo
#

is there have mod speed up reading book?

rancid barn
worldly olive
#

Hello!

Does somebody knows what could it be that if I'm printing the item:getWetnes everything is normal and suddenly the value goes to NaN? πŸ€”

wintry crown
#

rate this thumbnail

hidden estuary
#

pretty straight to the point

faint jewel
#

the angle is all wrong.

#

always up and towards.

wintry crown
#

my bad

faint jewel
#

stab stab

hidden estuary
#

I keep getting "NormalTermination" when trying to start a server that has a friends only mod

#

do I HAVE to release the mod to public to be able to playtest it in multiplayer?

faint jewel
#

that's what "unlisted" is for.

#

only your server can have it if you want

hidden estuary
#

I'll try that

faint jewel
hidden estuary
#

pretty consistent

#

yep nothing

#

I guess I'll have to release a beta... that really sucks

#

logs just tell me that the server is unable to download the mod

#

also YOO go karts

wintry crown
#

improved, definitely

hidden estuary
#

rate mine

wintry crown
#

nice/10

open lintel
#

Anyone know if its possible to add preset map markers/symbols?

low yarrow
#

Its really visible when stopping motions quickly

#

Now the backpack bone is tied to the spine. Would be great to have a wiggle-bone tied to the head for hairs

#

Or a wiggle bone for long jackets

#

Ops, was supposed to post it in modelling.

celest crane
#

is there a way to force texture reload without exiting the game completely?

#

It's really annoying having to restart the game just to check a texture update

timid plume
#

Hey guys, someone know the name of that mod that the the player say somethings for context?

#

Conditional Speech

#

thanks guys

#

❀️

faint jewel
low yarrow
faint jewel
#

no seriouslyt. edit the female model to attach the chest verts to that backpack bone. tada boob physics.

low yarrow
#

Yep, pretty much πŸ˜„

ember junco
#

heyy im trying to host a game with a lot of mods but when i host theres no credits only black screen

#

is there someone who can help me with this problem

faint jewel
#

anyone around?

#

i neeed to know how to tell if a vehicles trunk is empty

smoky meadow
#

help! Gun is Invisible when equip

faint jewel
tight tulip
drifting stump
#

It is indeed this

#

Find the trunk part and get the container

nimble spoke
willow estuary
#
        local cont = part:getItemContainer()
        if not cont:isEmpty() then
            cont:emptyIt()
        end
faint jewel
#

??

faint jacinth
#

hey boys, can someone help me out. I been asking the past few days and it's absolutely mindbreaking me because it doesn't seem that anything I do works

#

I'm just trying to get a MINIMUM of a script to make a print just so I know it runs properly but even that won't work

#

I tried following different mod tutorials

#

that didn't work

#

I was able to get pz to load the lua file but the file never ran

#

I couldn't find any of the prints I put in it in the console.txt

uneven vault
#

Okay I’m more than likely going to sound like a big dumby, or very ignorant at the least. However, is it possible to create a mod that sends data: Player Join/Leave info, Player’s Deaths (maybe to include who killed who), and server commands entered. Into an API that a discord bot could use to send said information into a discord channel? I understand about the default one that’s available. I would just like something more detailed. Again, me no understand the fancy modding ways. Forgive me if reading this hurts your brain. As I’m typing this with my last 2 brain cells.

faint jacinth
#

Well most of that rides on the fact if there is a lua file for http stuff or not

#

I can try to check if there is anything already in pz

#

there doesn't seem to be an already existing file for it. Not sure if downloading one off github and adding it will work

#

I can't check because of my current issues.

faint jewel
faint jacinth
faint jewel
#

but... he didn't. i still don't have the trunk. that checks EVERY part. including seats, glovebox, etc.

faint jacinth
#

I see

#

man I wish there was an actual API list for functions

#

and not a extension of a guide called Zomboid API

faint jacinth
#

not sure if it works but worth testing

#

actual code of the function if you want to look at it

#

media > lua > server > Vehicles > Vehicles.lua

faint jewel
#

that opens and closes the trunk it looks like.

faint jacinth
#

hmm, it's closer to getting it to work tho

#

i'll keep looking

faint jewel
#

and it just gets the trunk lid.

#

i am "ctrl shift f"ing the lua folder for stuff and coming up with nada.

faint jacinth
#

which folder are you in when you search?

faint jewel
#

\media and \media\lua

faint jacinth
#

huh

#

just navigate the folders without searching

#

it'll take a sec to find it

faint jewel
#

C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\

#

C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua

#

those folders

faint jacinth
faint jewel
#

in notepad++ you can "ctril shift f" and do a search in files in those folders.

#

is this not a well known thing to do?

oak summit
#

I knew about it and I'm a fucking idiot.

#

wait holy shit CONTROL SHIFT F DOES FOLDERS?!

#

I only knew control f.

chrome egret
#

@faint jewel did you search for "trunk"?

#

If you have to iterate over the parts, you can identify which one it is

faint jewel
#

"self.vehicle:getPartById("TruckBed")"

#

look what i found.

#

so THEORHETICALLY this should work

if vehicle:getPartById("TruckBed"):isEmpty() then return false end
tight tulip
#

I would imagine that won't work.

faint jewel
#

and why do you say that?

tight tulip
#

You need to access the ItemContainer on the part. As I said like 30 messages up. πŸ˜„

faint jewel
#

oh ffs. the container.

tight tulip
#

getPartById("TruckBed"):getItemContainer():getItems():isEmpty()

lusty nebula
#

hello modders what's your creative mind is giving birth tonight? πŸ˜„

faint jewel
#

crashing zomboid for NO reason.

#

VehicleMenuAPI.registerSliceOutside("EmptyTrash", function(menu, player, vehicle)
    if vehicle:getScript() and vehicle:getScriptName() == "Base.GarbageTruck" then
        if not vehicle:getPartById("TruckBed"):getItemContainer():getItems():isEmpty()  then
            menu:addSlice("Destroy Trash", getTexture("media/ui/icons/emptytruck.png"), onDumpTruck, player) 
        end
    end
end)```
#

this crashes zomboid on launch lol.

faint jacinth
#

you know where the console.txt file is right?

faint jewel
#

really?

faint jacinth
#

C:\Users\your_computer_user_here\Zomboid

faint jewel
#

omg.

#

YES I KNOW

umbral echo
#

Is there a command i can use in the lua console to set values of a nearby vehicle?

faint jacinth
faint jewel
#

there's no error.

faint jacinth
#

hmm

faint jewel
#

that's the fun part.

faint jacinth
#

Maybe is the issue is that it loads immediately?

#

when you open the game

faint jewel
#

there's the best you'll get.

faint jacinth
#

Do you know where VehicleMenuAPI file is?

faint jewel
#

WARN : Script , 1647895286715> VehicleScript.Loaded> vehicle "GoKart" extents != physicsChassisShape WARN : Script , 1647895286716> VehicleScript.Loaded> vehicle "MonsterVan" extents != physicsChassisShape last two lines of console.txt

faint jacinth
#

Can't find it in my files to read over

faint jewel
#
ERROR: General     , 1647895667759> GameWindow.uncaughtException> Unhandled java.lang.OutOfMemoryError thrown by thread MainThread.
ERROR: General     , 1647895667760> ExceptionLogger.logException> Exception thrown java.lang.OutOfMemoryError: Java heap space at Arrays.copyOf. Message: Unhandled java.lang.OutOfMemoryError thrown by thread MainThread.
ERROR: General     , 1647895667760> DebugLogStream.printException> Stack trace:
java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.Arrays.copyOf(Unknown Source)
    at java.base/java.util.ArrayList.grow(Unknown Source)
    at java.base/java.util.ArrayList.grow(Unknown Source)
    at java.base/java.util.ArrayList.add(Unknown Source)
    at java.base/java.util.ArrayList.add(Unknown Source)
    at zombie.scripting.ScriptParser.parseTokens(ScriptParser.java:303)
    at zombie.scripting.ScriptManager.ParseScript(ScriptManager.java:68)
    at zombie.scripting.ScriptManager.LoadFile(ScriptManager.java:144)
    at zombie.scripting.ScriptManager.Load(ScriptManager.java:666)
    at zombie.GameWindow.initShared(GameWindow.java:147)
    at zombie.GameWindow.init(GameWindow.java:1171)
    at zombie.GameWindow.mainThreadInit(GameWindow.java:555)
    at zombie.GameWindow.mainThread(GameWindow.java:468)
    at zombie.GameWindow$$Lambda$80/0x0000000800ca7738.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
LOG  : General     , 1647895667761> GameThread exited.
#

hey it just closed on its own and finally an error

faint jacinth
#

hmm, random shot in the dark maybe because you do :getItems():isEmpty() instead of :getItemContainer():isEmpty()?

#

because I saw in the example code that didn't do what you want they used getItemContainer then checked for isEmpty

faint jewel
#

nope i removed the lua and am still getting that.

faint jacinth
#

can you add prints for each stage of the if statement to see if it's even running?

lusty nebula
#

Is there any mod around to have Rick Astley music in game? πŸ˜„

faint jacinth
#
VehicleMenuAPI.registerSliceOutside("EmptyTrash", function(menu, player, vehicle)
    print("registerSliceOuside worked!")
    if vehicle:getScript() and vehicle:getScriptName() == "Base.GarbageTruck" then
        print("has script, it's base.garbagetruck")
        if not vehicle:getPartById("TruckBed"):getItemContainer():getItems():isEmpty()  then
            print("container is empty! we can add a menu slice!")
            menu:addSlice("Destroy Trash", getTexture("media/ui/icons/emptytruck.png"), onDumpTruck, player) 
        end
    end
end)```
#

kinda like that skizot

#

if it doesn't print any of them, then it might have to do with the initial VehicleMenuAPI.registerSliceOutside call

#

because I do have a theory on why it doesn't work but I wanna confirm it first

faint jewel
#

i can't get there,

#

i open game the inistal loading stuff page comes up

#

it freezes there

faint jacinth
#

you said you let it close on its own right

#

and then you got more info

#

idea

faint jewel
#

it ook until my memory was full.

faint jacinth
#

lets wrap it in a game event so you can at a minimum get to your menu

faint jewel
#

to close.

#

i..... i cant with you.

faint jacinth
#

well, sorry my guy. I'm trying to help while I can't do any coding myself

#

because for some reason everything I try to do to get code to run doesn't work

#

and no one here has even tried to lend a hand

faint jewel
#

i know i know. but I CANNOT launch the game.

#

much less get into a game to test.

faint jacinth
#

I know, because the code is running as soon as the script is loading

#

that's why I'm saying you can wrap that into a game event so it doesn't run until you're loaded into a save

faint jewel
#

no i removed that whole ass lua.

faint jacinth
#

oh

faint jewel
#

same thing.

faint jacinth
#

How the hell was I suppose to read your mind that you emptied the lua file

#

I was still under the impression you had it loaded

faint jewel
faint jacinth
#

I misunderstood it as you saying you took out the getItems() part

faint jewel
#

brb

chrome egret
#

Kevinn, you wanted a minimal piece of code to run?

#
local testPrint = function ()
  print("I am testing a print at game boot");
end

Events.OnGameBoot.Add(testPrint);
faint jacinth
#

So, is that what I had to do for it to print?
Initially I had a .lua file in client with only this

print("I finally loaded")
#

gonna try it rn

faint jewel
#

shit a rebooted didn't fix it either.

faint jacinth
#

It was yesterday I was having the issue

#

Guess it fixed itself

chrome egret
#

There could've been some other weirdness. If there's even one syntax issue in the file, it won't be executed

#

That can lead you to weird errors later-- if you're calling :new on a function from another file, it will act like you called :new on "non-table null" because the file was discarded in the load process

faint jacinth
#

I see, I'll workout all the weirdness down the road. My only issue was that code literally wouldn't execute no matter what I did

chrome egret
#

At least now you have a start!

faint jewel
#

it was my mower?!?!

#

oh well it's fixed, AND the code from seve worked.

#

now to make it empty that shit out

drifting stump
faint jewel
#

and it rocks bowser lol

#

any chance it can make dialog boxes?

drifting stump
#

that wouldnt be radial now would it XD

faint jewel
#

well it's gonna delete ALL thier shit with NO confirmation. lol

drifting stump
#

you can make a simple window you display on click

drifting ore
#

Idk how possible it is

#

Could you "split" the button?

#

Like when you click the delete trash button

#

Split it into 2 other buttons

#

1 to confim and 1 to cancel?

drifting stump
#

tru you can make it create a sub menu to confirm

faint jewel
#

Got an example?

grizzled grove
faint jewel
#

Lol

drifting stump
#
local function onSubmenu(menu, player)
    menu:addSlice("Voice: Basic Commands", getTexture("media/ui/emotes/basics.png"), ISRadialMenu.createSubMenu, menu, onSubmenuBasic)
    menu:addSlice("Voice: Status and Alerts", getTexture("media/ui/emotes/status.png"), ISRadialMenu.createSubMenu, menu, onSubmenuStatus)
    menu:addSlice("Voice: Extra", getTexture("media/ui/emotes/extra.png"), ISRadialMenu.createSubMenu, menu, onSubmenuExtra)
    menu:addSlice("Voice: Loot", getTexture("media/ui/emotes/loot.png"), ISRadialMenu.createSubMenu, menu, onSubmenuLoot)
end


-- Main Voice Emote Menu

local function exampleFunction(menu, player)
    menu:addSlice("Voice Emotes", getTexture("media/ui/emotes/voice.png"), ISRadialMenu.createSubMenu, menu, onSubmenu)
end
#

yoinked from project voice

faint jewel
#

That works

craggy furnace
#

weeeeee

stiff nest
#

Im trying to get a lousy helmet imported and im stumped, it shows up in game mods list, shows up in items list, has category errors, player does animation to put helmet on head but its invisable. Can anyone help!

chrome egret
craggy furnace
#

its not entirely done

#

still needs to be animated later and some stuff may get added later on

drifting ore
#

How are you handling animations?

#

Bone manipulation like Tsar?

faint jewel
#

We cheesed

hidden estuary
#

do I just do this to add more "rolls"? sometimes an item is repeated multiple times in Distributions, do I just do the same?

#

I assume its to allow stacks to be spawned in the same container

faint jewel
drifting stump
#

menu:undisplay() iirc

#

theres always the back button automatically created

faint jewel
#

menu:addSlice("No", getTexture("media/ui/emotes/status.png"), menu:undisplay())

#

?

drifting stump
#

should do it yep

faint jewel
#

lol nope.

drifting stump
#

was about to type

#

it needs to be a function

faint jewel
#

hmmmmmm

#
local function onDumpTruck(player, vehicle)
    player:Say("This is where i empty the trunk!!", vehicle:getScriptName())
end

local function DumpTruckFunction(menu, player, vehicle)
    menu:addSlice("Destroy Trash", getTexture("media/ui/icons/emptytruck.png"), onDumpTruck, player, vehicle)
end

local function onSubmenu(menu, player, vehicle)
    menu:addSlice("Yes", getTexture("media/ui/emotes/thumbup_green.png"), onDumpTruck, player, vehicle) 
end

VehicleMenuAPI.registerSliceOutside("EmptyTrash", function(menu, player, vehicle)
    if vehicle:getScript() and vehicle:getScriptName() == "Base.GarbageTruck" then
        if not vehicle:getPartById("TruckBed"):getItemContainer():getItems():isEmpty()  then
            menu:addSlice("Destroy Trash", getTexture("media/ui/icons/emptytruck.png"), ISRadialMenu.createSubMenu, menu, onSubmenu, player, vehicle) 
        end
    end
end)```
#

oh hell... and i need to pass the vehicle the whole ass way.,

#

FFFFFFF

#

y7eah it's getting the non-table everytime now. any idea where i goofed?

#

@drifting stump ?

hollow shadow
# faint jewel

Make it so it creates trash blocks that you can use as barricades or walls

faint jewel
#

WHY YOU DO DIS?

#

oh snap i made the most popular page... with the sprinter.

scenic mulch
#

Aye there folks. I'm running into a same problem that is happening on that guy earlier, where modded weapon models don't appear ingame. But in the attachment editor it does appear properly. Don't know why is this happening, I double checked the script and I don't seem spot anything wrong with it..

Edit: Nvm i fixed it by going back to the 41.65 build

main surge
#

Can I buy someone a coffee for a simple lua script?

fallow bridge
#

It was mentioned in one of the latest thursdoids

scenic mulch
#

Yep I saw it

fallow bridge
#

Alright, just didn’t want you to work really hard for everything to break on ya

faint jewel
#

local pos = player:getPosition() how do i get the players position?

#

all this stuff is like NO.

drifting stump
#

the square coordinates?

faint jewel
#

well that would work i guess? i wanna spawn a tile there.

drifting stump
#

player:getGridSquare():getX()
player:getGridSquare():getY()
player:getGridSquare():getZ()

faint jewel
#
    local sq = getCell():getGridSquare(player:getGridSquare():getX(), player:getGridSquare():getY(), 0);
    sq:AddTileObject(IsoObject.new(sq, "location_business_office_generic_01_57"));```
#

?

drifting stump
#

ah you just want the square

#

player:getGridSquare()

faint jewel
#

local sq = player:getGridSquare()

tame mulch
faint jewel
#

YAY!

#

but i can't pick up what it spawns 😦

#

sq:AddTileObject(IsoObject.new(sq, "location_business_office_generic_01_57"));

#

is all buggy lol.

#

it almost looks like it was spray painted on the ground lol.

drifting stump
#

ah yeah that i had been reading isogridsquare code and for some reason have it in my mind that its always called gridsquare

#

@tame mulch do you know of a way to sync IsoObject properties?

tame mulch
willow estuary
#
    local square = YOUR_SQUARE_HERE or getPlayer():getSquare()
    local sprite_type ="YOUR SPRITE NAME HERE AS IT APPEARS ON THE TILESHEET"       
    local newSprite = (IsoObject.new(getCell(), square, sprite_type))    
    if not newSprite then
        print("NO NEW SPRITE!")
        return false
    end    
    if newSprite and newSprite:getProperties() then 
        if newSprite:getProperties():Val("ContainerType") or newSprite:getProperties():Val("container") then
             newSprite:createContainersFromSpriteProperties()                
        end
    end
    square:getObjects():add(newSprite)
    square:RecalcProperties()
faint jewel
#

thank you!

#

that is awesome.

#

now i just gotta make my cubes.

trail lotus
#

Any vehicle modders that would like to make custom vehicles for a life rp server hmu we can discuss pay!

dense lodge
#

add

wintry crown
#

can anyone link me to a source where i can learn how to use custom models for my mod?

faint jewel
#

ANYWHERE.

#

they are just regular 3d fbx models.

wintry crown
#

yes

faint jewel
#

how to make them WORK.

#

that's another story.

wintry crown
#

sorry for being foreign

#

i meant make them work

faint jewel
#

what kind of models are they? weapons? vehicles?

wintry crown
#

weapons

#

the butterfly knives i made yesterday

faint jewel
wintry crown
faint jewel
#

the wiki is ded!

wintry crown
#

true

#

also unhappy

drifting ore
#

does anybody know where are the factions and safehouses data is stored?

faint jewel
#

is it possible to get the weight of all items in a container?

tight tulip
#

If it's an ItemContainer, there should be a property called getContentsWeight(). I don't know if that would work for you or not. πŸ€·β€β™‚οΈ

#

Assuming that property works anyhow. πŸ˜„

chrome egret
#

I'll say that's not how ISInventoryPage does it

faint jewel
#

tf is the difference with those two?

tight tulip
#
 public float getCapacityWeight() {
      if (this.parent instanceof IsoPlayer) {
         if (Core.bDebug && ((IsoPlayer)this.parent).isGhostMode() || !((IsoPlayer)this.parent).getAccessLevel().equals("None") && ((IsoPlayer)this.parent).isUnlimitedCarry()) {
            return 0.0F;
         }

         if (((IsoPlayer)this.parent).isUnlimitedCarry()) {
            return 0.0F;
         }
      }

      return this.parent instanceof IsoGameCharacter ? ((IsoGameCharacter)this.parent).getInventoryWeight() : this.getContentsWeight();
   }


   public float getContentsWeight() {
      float var1 = 0.0F;

      for(int var2 = 0; var2 < this.Items.size(); ++var2) {
         InventoryItem var3 = (InventoryItem)this.Items.get(var2);
         var1 += var3.getUnequippedWeight();
      }

      return var1;
   }
hidden estuary
#

how can I add random condition to an item when it spawns in the world?

faint jewel
#

okay how about this... i want to know if the current amount in a container is more than half, if so return true.

hidden estuary
#

like, instead of spawning a medicine that always has 100% condition it can have 1 use remaining, or half, etc

#

is it in the Item configuration itself?

tight tulip
#

@hidden estuary - If you're using AddItem, you can use AddItem(String key, float useDelta)

#

So if you give a .5 useDelta, it would be half used.

hidden estuary
#

I'm using distributions

#

not familiar with AddItem

tight tulip
#

Ah, didn't read your message all the way through. I am not sure, I've never done any dynamic item spawning like that yet. πŸ˜„

hidden estuary
#

I absolutely hate balancing something based on arbitrary luck

#

XD

fast galleon
#

Everyday at 7:00 getwoldagehours is calculated lower by a day, is this an old or new issue?

faint jewel
tight tulip
# faint jewel i'll reiterate this. it got lost i guess.

Seemingly, you would want to compare the getCapacityWeight/getContentsWeight()(pending if you want to account for character's or not) to half of the getMaxWeight(). This is assuming getMaxWeight() returns the entire capacity that say a crate/something could hold.

faint jewel
#

i would only want the containers holding weight.

#

so if it's 160 , if it's 80.1 or higher then it returns true.

tight tulip
#

I imagine getMaxWeight()/2 would return you half of the containers holding weight. Then comparing that to the getCapacityWeight()/getContentsWeight() would tell you if what is currently in the container is more than half or not.

faint jewel
#

does get maxweight count in damage?

#
    local TrashBox = vehicle:getPartById("TruckBed"):getItemContainer()
    local hasZed = TrashBox:contains("Base.Corpse")```
would that work?
arctic saddle
#

what's the argument for a tall wall to not be climbable? "wall.isHoppable = false"? something tells me that's only for small fences

umbral echo
#

Hey peeps, i'm trying to find a way to update car values through functions while in game, specifically the following.
-EngineForce
-EngineRPM / gearRatio
-wheelFriction
-steeringIncrement
-steeringClamp

I've tried using "vehicle:setenginePower = ()," which updates the value in the mechanic screen, but as soon as the ignition is turned the vehicle will revert back to whatever is in the script. Am I missing something obvious? I'm pretty new to LUA and I'm still trying to figure it out, but I do understand the fundamentals of coding. A solution I've been thinking of, but not sure how to implement, is loading a different seperate template all together, without changing the overall condition and installed parts.

faint jewel
#
            local TrashBox = vehicle:getPartById("TruckBed"):getItemContainer()
            local hasZed = TrashBox:contains("Corpse")
            print(hasZed)
``` this always prints false :/
faint jewel
#

almost done! just gotta add the weight check.

junior raven
#

How do you cancel an event after you've caught it?

junior raven
#

Also, where is any API documentation?

smoky meadow
#

@sinful vessel hey man. do you know how to fix the muzzle flash not align to the gun?

nimble spoke
faint jewel
#

only corpsemale.