#mod_development

1 messages · Page 286 of 1

vivid imp
#

Haha yeah replacing the items feels like a bad idea

#

Ok! Ill be away from the computer today but ill throw my hat in the ring soon

ornate sand
#

That last line there is an example of a tooltip.
Vanilla PZ guns don't tell ya what they are or what they do, so I just have tooltips on each new thing I've made that gives a short easy-to-understand tip like that 🙂

vivid imp
#

Oooooo ok great ill use that as reference

ashen ledge
#

okay for some odd reason the mod doesn't pick up on 42's version of MaleZombieCombined and FemaleZombieCombined

foggy iron
#

Hello! Sorry if this is the wrong place but I wanted to make my own custom challenge (like the CDDA one), with custom sandbox rules, spawn point, clothes, and maybe even some injuries. I couldn't find anything on the wiki or online for how to do this, though

hushed harbor
#

Does anyone know how drainable ingredients with type = Drainable (IE baking soda) differ from ingredients with type = food like rice?

#

I'm sure you've noticed that crafting cooking recipes using the crafting panel now consumes whole items of sugar, rice, etc when cooking, which is a big block to cooking unless you debug spawn extra ingredients

#

I noticed the advanced recipe files call for X ITEMS with the tag flour/sugar etc, which seems like why the whole flour or rice bag gets used up in a recipe

#

But I can't see why these weren't given the Drainable type so that they just use X units of the item rather than the whole item when crafting

ancient grail
foggy iron
#

Oh! Thank you, I'll see what I can find

ancient grail
hushed harbor
#

Rice, pasta etc are all missing UseDelta in their scripts

#

Gravy mix, baking soda etc still have it

#

Makes me wonder if just adding UseDelta back to flour etc would work but I'm guessing not

#

Okay I have confirmed that in 41, flour and rice and sugar did indeed have type = Drainable, which has been changed to type = food in 42

#

However, the format of recipes has obviously changed

#

But UseDelta still works for baking soda when crafting say, cookies

#

For example, cookie recipes call for ingredients like this:
inputs
{
item 1 tags[RollingPin] mode:keep flags[MayDegrade],
item 1 tags[MixingUtensil] mode:keep flags[MayDegradeLight],
item 1 [Base.Bowl] mode:keep,
item 1 [Base.BakingTray],
item 2 tags[BakingFat],
item 5 tags[Sugar],
item 2 tags[Egg] flags[IsUncookedFoodItem;InheritFoodAge],
item 1 [Base.BakingSoda],
item 1 [Base.CocoaPowder],
item 1 tags[Flour],
item 1 [*],
-fluid 1.0 [Water],
}
outputs
{
item 1 Base.CookiesChocolateDough,
}

#

If you make choc cookies, you'll use up 1 UNIT of rbaking soda, but 1 ITEM of flour

#

so I wonder if it's a bug with the tags...

#

Just wish I knew why the Devs opted to change Drainable food items to Type = Food instead of Drainable - must be a reason

sterile path
#

how would i go about making an axe destroy a door/tree in 2 swings?

ornate sand
sterile path
#

whats classified as mega high

ornate sand
sterile path
#

i tried 450 first, which had no effect

#

and then 2000 didn't either

#

so now i'm stumped

#

unlike the fuckin tree which is still sitting there staring at me

ornate sand
#

Oh, after changing those damage values you'll have to spawn a new version of the item in.
Otherwise they can retain their old stats.

ornate sand
#

It might be hard limited? Did you try something like 99?

sterile path
#

i'll try that

#

why wouldn't a higher value than a limit just default to the hard limit though

#

doesen't make sense

ornate sand
#

Kinda like a bag of flour going poof with one use

sterile path
ornate sand
#

Yup and like a box of cereal. Make yourself one bowl of cereal, and poof

sterile path
#

99 didn't seem to do it either

sterile path
ornate sand
#

Aurum ^ up there is apparently at least giving it a good look 🙂

sterile path
#

hope he figures it out!

#

think i figured out my issue tho... mod creator had 2 seperate instances of the item in the file, i was editting the wrong one

hushed harbor
#

My best guess is that it's cos they've changed Drainable type items to food

ornate sand
#

Flour for example does have a Tag "MinorIngredient" but idk if that's supposed to have it act like it used to

hushed harbor
#

Yeah I noticed that

#

But with no UseDelta I can't see how the game is meant to know to only take a bit of it

fleet bridge
#

Did you rename the files?

stoic patrol
#

is it possible to load custom classes from lua to pz?

bright fog
stoic patrol
bright fog
#

nop

stoic patrol
#

In Minecraft you can do something similar, but I don't know where

bright fog
#

PZ doesn't allow that

#

you need to manually install the java mod

#

and expose the functions possibly I guess

runic hare
#

Hey yall i have a quick question if anyone might be able to help, i personally have no experience with development or much tinkering but maybe i can shoot it by yall?

#

Im trying to add a mydistribution.lua so items spawn in specific containers,

For anyone who code

On pzwiki it says to use

table.insert(ProceduralDistributions.list["CrateFarming"].items, "TUT.Someitem");

table.insert(ProceduralDistributions.list["CrateFarming"].items, 0.1);

I get that the location name is put where “cratefarming” is, and i know you put what ITEM and its name/code into where “TUT.someitem” is, I.E “Base.baseballbat”

Can someone give me an example of how the finished code should look for say base.bandage at (1), i cant find any examples and feel im making a mistake, like do i keep the “” around the item name or?

As well…..for the life of me….i cannot find the item names for WORKSHOP MODS, such as britas, bushcraft, etc. all i can find is vanilla names that the wiki provided (base.plate, base.pencil, etc.)

ornate sand
#

require 'Items/ProceduralDistributions'

table.insert(ProceduralDistributions["list"]["ArmySurplusTools"].items, "RainsToolsandBlades.SawbackMachete");
table.insert(ProceduralDistributions["list"]["ArmySurplusTools"].items, 2);

^That's straight from the lua file

table.insert(ProceduralDistributions["list"]["ArmySurplusTools"].items, "Base.Bandage");
table.insert(ProceduralDistributions["list"]["ArmySurplusTools"].items, 1);

runic hare
#

so i would keep the "" between the item name!!!!!

#

one last question that will help immensely!

#

Where would i find the names for items (such as we would find Base.bandage) that a mod includes?

#

is there a specific folder/file/lua that will show these per mod?

tacit pebble
#

/media/script/ANY.txt
so recipes, items, models are here

ornate sand
#

lua/server

tacit pebble
#

oh wait i understood wrong maybe

ornate sand
#

Everybody names their proceduraldistributions differently. Mine are usually rainssomethingdistributions but they can be named anything

runic hare
#

so after adding a mydistribution.lua file along where the other lua's are it should shouw up within game as a spawn rate for such item per container?

#

im enierly new to this and only just starting with coding/luas and messing with my own server 🥲

#

yall are freaking amazing

sonic needle
#

moddings Rigged lol

ornate sand
#

WAT

#

Since when can we open PZ animation .x files with Notepad+ 😂

runic hare
runic hare
runic hare
ornate sand
#

Not AttachedWweaponDefinitions though

#

That's a shared lua

runic hare
#

probably cause some an attachable item?

ornate sand
#

You use that one to put weapons in zombies such as machetes in their bellies, or like shotguns on cop zombies' backslots, pistols in holsters, etc

runic hare
#

❤️ ty, so should i just keep the first one for items in containers? im not to worried about on zombies 😛

ornate sand
#

Correctomundo, BushCraftTools has their machetes and hatchets in those attached zombie slots but it's a separate lua file

stoic patrol
#

what is default path of getFileReader()?

runic hare
#

im bouncing around thinking about getting this close to figuring it out 🥹

#

love how some will name the items like "base.item" such as vanilla does, then there is bushcraft and sapphs who name it "sapphscooking.item" "BCG.item"

#

😤

ornate sand
#

That's when a mod only adds new items and in the script.txt files uses the imports Base thingie

#

Like how for example my gun mod has to overwrite the base PZ guns so I don't import Base for that, I use base.Pistol for the M9 overwrite
But then again for my axes & blades mod I use imports Base because my items will be from the module RainsToolsAndBlades instead of Base

runic hare
#

can shared lua files be shared between compleatly different mods/vanilla?

#

such as ------ require 'Items/SuburbsDistributions'

#

nvm i think i answered my own question here

ornate sand
#

Yeah you can use 100 mods that all require SuburbsDistributions because they're just doing table.inserts anyway

runic hare
#

my own worry is mainly adding weapons to certain containers, and upping the chance at food items from sapphs within the world over the vanilla items. not so much looking to change every loot table 😛

#

just tired of constant wipes after hard work and want to start a 10yr (in game run) to start off with

stoic patrol
#

I'm a bit new to Zomboid, but what is the way the server communicates with the client using sendcommand? Or does it have some kind of triggerevent?

#

I've seen a lot of mods that use sendcommand but there are triggerevent functions

bronze yoke
#

they don't take a specific amount of real or in-game time

bronze yoke
cosmic ermine
#

How to reload scripts?

bronze yoke
#

triggerEvent will not affect the server/other clients, if you've seen it around networking code that may be for singleplayer compatibility (as server commands don't work there, even though client commands do)

old ginkgo
old ginkgo
#

Yes.

cosmic ermine
#

Thanks.

old ginkgo
#

And just incase you weren’t aware; you can also reload lua from the f11 menu.

bronze yoke
cosmic ermine
outer crypt
#

I used to make a generator mimic a chosen sprite in 41, it seems this method doesn't work anymore but it does look like the functions still exist. Not sure where to go with it as it is not an item you can carry around.

#

local spr = thisObject:getSprite():getName()

                     local NewSiloGenerator = IsoGenerator.new(nil, square:getCell(), square)  
                NewSiloGenerator:setSprite(spr)
cosmic ermine
#

What metric system does the vehicle mass use?

forest flax
#

is possible make a mod for a server that checks if the files are the same on the server, specific with the following archives LightingJNI$JNILighting.class LightingJNI.class or for all files on iso path

bronze yoke
stoic patrol
bronze yoke
stoic patrol
#

Ah, I understand, but you can create commands, taking the handle of the text I suppose

forest flax
bronze yoke
#

there isn't a way from lua to reach these files so you can't checksum them without having your users install a java mod to do that

cosmic ermine
#

Which metric system does the game use? Does it use mph or kmh; lb or kg; etc.

bronze yoke
#

it would probably still be pretty easy to defeat but unless your server is being targeted by actual hackers (unlikely), nobody who simply installs java mods will be able to get past it

ornate sand
#

It is a UK based dev team so I'd say kg

outer crypt
#

I have always referred to the metrics in the game as project zomboid arbitrary weight units.

ornate sand
#

The weights of items are definitely kg, not lbs

bronze yoke
#

the weights of items aren't in any metric, it's not even called weight

ornate sand
#

Sure but the numbers themselves are much closer to what they would be in kg 😄

bronze yoke
#

it's an arbitrary measure of how hard something would be to carry, so bigger objects take up more even if they'd be very light

#

(except when they don't)

outer crypt
#

makes sense, a combination of weight and volume

ornate sand
#

True true, I've never cooked a bean soup that weighed 10+ kg lol

cosmic ermine
#

I'll just assume the speed is kmh and mass is kg then.

bronze yoke
#

i would expect speed to at least be in metric since tiles are roughly a meter anyway

restive lodge
#

is there a command i can use in debug to turn the power off or on?

forest flax
runic hare
#

used this to test and look into bathrooms cabinets for sporks but found none in any ive searched

#

i have the pathfile as C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua\server

runic hare
#

😮

ornate sand
#

Slap your lua file into Sapph's own media/lua/server folder and try again

runic hare
#

ill get back with ya on that 🙂 one sec

ornate sand
#

And for testing purposes, change that 8 into 80

#

Then you'll know real quick if it works or not 😄

runic hare
#

i figured only went up to 10 lol

#

i had at 60 before XD

runic hare
outer crypt
runic hare
#

haha so if im trying to spawn certain items from a mod its gotta be placed within the server folder of the mod itself ?

#

just figured since pzwiki hadn't said that it was just in the regular game server files

#

then again even excel is challanging for me, so ty for bearing with my questions 🙂

ornate sand
#

Yeah you can do it to your local copy of the mod in the 108600 folder
or
You can give yourself an aneurysm or two and create a mod of your own in users/yourusername/zomboid/workshop 😄

runic hare
#

ill take the ladder and save myself some of that brain rot 😉

#

cause the last two days ive been laugh/crying at figuring this out

#

anyone who codes or develops needs therapy cause why do this to thyself 🥲

ornate sand
#

This is about day 11 of me trying to fix something that the Indie Stone broke with B42

ornate sand
#

Oh noes, you're using it in MP

runic hare
#

not able to huh

ornate sand
#

Yeah you are, BUT it will take you actually developing that mod... 😄

runic hare
#

so all this just to find out ill need to develop the mod 😄

ornate sand
#

Yeah because PZ MP uses mods from the actual Steam Workshop, so not only do the mods you want on your server have to be actual mods, they also have to be set to "public" on the workshop

winter bolt
#

i thought they can be unlisted

runic hare
#

i mean can just add to the LUA thats in vanilla files ive seen, ik that add things to certain locations and tried adding baseballs to cabinets which worked

ornate sand
runic hare
#

but would mod items work technically or does that gotta go through the mod LUA files only

runic hare
#

again im still new to this all

#

welp, guess ill just have to play with the spawn rates how they are and tweak them only in the actual LUA files

pastel thorn
#

Anyone knows how to track custom(whatever) items/objects, after server reloading without brute forcing through the whole stuff on start? I mean, if we have onCreate callback on firsty created item, any chance to have something similiar onLoad? Didnt find some clues in docs, but Im sure it shouldnt be a super seldom problem and some1 could tried to figure this out

runic hare
#

which i can still do, right?

#

can't choose wherever itll spawn but can choose the chance it shows up right?

runic hare
ornate sand
#

I don't know anything about hosting a PZ server, I've only admin'd a few, and the story of why I ever got to modding in the first place was for one of those servers.
We wanted machetes to be worn on belts, and bang - I was suddenly a mod "dev" lmao

runic hare
#

hahaha well ill mess around with seeing if i can add modded items to the vanilla lua and or tweak the modifier for chance to show within the lua of the mod

finite scroll
#

does anyone know how to set a non page-based literature item as read (eg. magazine, generic book, etc)?

#

cant figure it out for the life of me

eager imp
#

anyone know the file name of the big backpack and the military version

runic hare
#

if neither work well least brita overides the base guns and ill still find hella base items for weapons when i do loot runs within the army bases/police

eager imp
#

the fbx i mean

winter bolt
finite scroll
ornate sand
runic hare
eager imp
#

thanks!

runic hare
eager imp
#

its a good chance to learn a little bit of code

runic hare
#

but if that takes making a mod, i think ill just slowly learn and play it with how it is and enjoy it, cause i like computers, ive wanted to learn coding so maybe i should spend a hr each day trying to learn a bit

#

just ive put off playing so i could make my own little server for myself mainly and some friends when they are bored

#

and most servers are wiping after 1-2 months so its hard to wanna put in all that time for multipul proffessions in the game 😛

still lava
#

So uhh I need a little advice so for build 42 (I don’t even know if moding tools are out yet just random spitball) I’m thinking of a mod that would only cause muscle strain after encountering zombies so like once you clear the zombies so many tiles away from you, after 3 or so minutes then the muscle strain kicks in, this would try replicating adrenaline but I have 0 clue about modding and I’m wondering how difficult implementing would be/if it’s even possible since b42 just came out

cosmic ermine
#

May I ask how you guys test your vehicle? Do you guys have a workflow?
Also where is the best place to test a vehicle? Top Speed, Handling, etc.

ornate sand
cosmic ermine
#

How's this intersection?

#

lmao woops

gusty heart
stoic patrol
#

Is there a way to read console inputs? through lua

main pasture
cosmic ermine
#

It tilts a little too much.

bronze yoke
#

oh yeah also the speed shown in the speed dial is not the real speed lol

cosmic ermine
bronze yoke
#

it just lies to keep the 'speed' in a believable range without actually going too fast

cosmic ermine
#

I can't even reach the 5th gear.

bronze yoke
#

i don't know the exact relationship to the real speed though

#

i think it's just a multiplier

cosmic ermine
bronze yoke
main pasture
#
speedValue = math.max(0,math.min(1,math.abs(self.vehicle:getCurrentSpeedKmHour())/120));
- -
self.speedGauge:setValue(speedValue * BaseVehicle.getFakeSpeedModifier())
#
   public static float getFakeSpeedModifier() {
      if (!GameClient.bClient && !GameServer.bServer) {
         return 1.0F;
      } else {
         float var0 = (float)ServerOptions.instance.SpeedLimit.getValue();
         return 120.0F / Math.min(var0, 120.0F);
      }
   }
bronze yoke
#

hm... get 'Fake' SpeedModifier... who can say really...

#

low speed limits must look pretty silly then

#

you could set the limit to 1 and it'd say you're going 120 i guess?

ebon dagger
#

If I use :getModData() to set moddata on a corpse, and that corpse despawns. Does that data get garbage collected and removed? Or am I building an ever growing data leak?

main pasture
#

That is kind of strange. Why should the speed limit affect what the speed gauge shows (unless the speed is supposed to be a percentage and not units?)

finite scroll
#

does anyone know where the image files for the new character creation map are?

hushed harbor
#

On file requests - can anyone find the item files for potatoes or cabbages in the scripts folder? I can't see them in any of the items_food files or in items_agricultural_products or any other item files

#

But I've seen potatoes spawn into my 42 games

#

Got it, it's in farming

ornate sand
#

media/scripts/farming

#

Oh

main pasture
bronze yoke
cosmic ermine
#

How do I reset the mechanics UI?

main pasture
#

Reset the vehicle stats/parts?

cosmic ermine
main pasture
#

I quess they should update if you reload the vehicle script

main pasture
#

How do you reload the script?

cosmic ermine
main pasture
#

Doing "Reload All" in the vehicle editor seems to work

#

At least for me it seems to reload everything from the vehicle script (in b41)

runic hare
#

@ornate sand do you know if your allowed to change spawn chance within the original distribution for MP or is it just not able to be done without mod being made or being on SP

ornate sand
#

I would imagine that a direct edit like that would only work for SP

runic hare
#

figuring cause immediately get a error that the LUA doesnt match whats on file

bronze yoke
#

if you want to just make direct edits to your mods without making a new mod, yeah that won't work in multiplayer

runic hare
#

well dang nabbit

#

so only SP hmmm do i wanna do a 10 yr run by my lil old self

#

just sucks cause i wanna not get 1000 clothing items in military containers when i really need ammo 🥲 damn you brita

ornate sand
#

I remember finding a .50 BMG minigun in the little ol' Riverside PD one time.
Like okay Brita, I see how it is.

runic hare
#

i mean i get it i can really just spawn it in if i REALLY can't find it which wouldn't be to often needed since its really just me and 2 others in a large modded map

#

just prefer NOT to mess with any run with a dev option

#

but between how brita spawns its ammo and how sapphs spawns all its stuff along with vanilla, it takes alot of time to find specifics

#

but mainly its ammo, metalworking materials and the cooking materials i really prefer to find this run

nimble badger
#

Would this work? Im not very experienced with lua code...

module
require "NoodleDefense"
{
sound SOUNDCLIP
{
clip { file = media/sound/SOUNDCLIP.ogg, }
}
}
local player = getPlayer()
function PlaySound()
getSoundManager():PlayWorldSound("SOUNDCLIP", player:getCurrentSquare())
end

if IsNoodleDefense == true
PlaySound()
end

winter bolt
runic hare
#

i personally don't know how to "edit" the mod other then opening the lua in notepad and editing the modifier number, let alone just learned how to make a mydistributions.lua (though unsure if it worked cause was trying it all on MP)

ebon dagger
#

So, I am sure I can look up how to do this, but I can't figure out the terminology to search for what I am looking for.

I want to grab gridsquares around the player, and I have done that successfully, but I want to make the influence, more circular?

I have a set of for loops that get gridsquares cells, for horiz = -x, x, for vert = -y, y.

I want to only target the GREEN SQUARES here (the grey square is 0,0 and the players origin.

what math am I looking for to exclude the red squares? I could make a table that exludes those combos, but that seem... icky? lol

finite scroll
#

you could do it correctly with pythag theorem eg. discard a square if sqrt(x^2+y^2) > radius or for a more performant algorithm with less circular but very similar results, you could discard if x+y > radius

ebon dagger
ebon dagger
nimble badger
#

how can I get current animstrip playing from character?

flat lichen
#

i wanna test some things fo B42 in local but my game doesn't see my mod, i tried Users\{user}\Zomboid\mods

#

i even upload mod to workshop unlisted, subbed and still nothing

bronze yoke
#

check the pinned messages for the b42 mod structure

bright fog
#

But if you want to check for any range and don't care about the distance, that's not necessary

ebon dagger
#

The range will change, based on different circumstances, for sure.

stoic patrol
#

Is there a method to send chat to client or print chat on client?

flat lichen
ebon dagger
#

I used :Burn() to mark out the tiles selected. Works great, thanks again @mellow frigate and @finite scroll

zealous mauve
#

Will mods for b42 unstable work immediately on release for b42

bronze yoke
#

probably

old ginkgo
#

I presume most mods being made on b42 unstable will continue to be developed for any updates throughout b42 so barring major code updates yes.

main swan
#

Hi all, is there any way to get a handle on the data available in the Statistics table from the server admin panel?

I'm looking to write some of that data to file for admin purposes.

#

B41

swift parcel
#

um, Hi I'm New here. I joined to ask a question.
(Not sure if I should post here or mapping)

I was wondering if anyone knows why my water keeps vanishing when I am making a map? I am following Dirk tutorial, for some reason the water won't work. If anyone has any ideas what going on here I am all ears.

finite scroll
#

i would reccomend posting in mapping, but my best guess would be that your rgb value for water is slightly off

#

if that's not it you'll need someone with real experience lol

swift parcel
#

Okay thank you, I'll double check the values. Btw should I move the post there now and delete it from here then?

bronze yoke
#

you don't have to delete it here but more people who actually know the answer will see it in mapping

swift parcel
finite scroll
#

np, glad to be of use

swift parcel
median karma
stoic patrol
#

is it possible to intercept this via lua? some event or something similar

silent zealot
#

Have a look at the vanilla procedural tables to see if that makes it clearer.

#

...nevermind, still confusing.

median karma
#

it seems to go from 0.05-20 i just picked 5.8 to have a high propability spaw nrate 🙂

leaden pelican
#

Quick question is a week before out or is it still in development

leaden pelican
#

Oh.. okay

leaden pelican
#

Oki

teal jay
#

Any reason anyone knows, of why when spawning a zombie with addZombiesInOutfit(...), a zombie will spawn stale and get deleted by the server?
Does adding a ; after do any thing at all to prevent this, as the zombies in the horde spawner within debug mode seem to all spawn fine, but in my script, spawning 1 zombie at different x y z locations within a for loop will cause a random amount to be stale and are deleted by the server.

bright fog
#

The horde manager should have some syncing code

bronze yoke
#

; doesn't do anything in lua, it's equivalent to white space (or a comma in a table initialiser)

bright fog
#

Yes, please stop using it, it just bloats code with useless characters mrincredibleuncanny

vivid imp
#

Ok, so the item Kettle has a tag called SmeltableIronSmall. Say I want to add a tooltip to every item with this tag, how would I go about adding the 'Tooltip' line to those vanilla items?

bronze yoke
#

starlit library has an event for this, but if you don't want to add a dependency it's actually really complicated 😓

vivid imp
#

I don't mind using a dependancy, I'm assuming its updated for 42?

bronze yoke
#

yep!

vivid imp
#

Ok neato

#

I uh, actually dont know how to use dependencies yet but let me try to figure it out lol

teal jay
bronze yoke
#

you have to add to your mod.info require=\StarlitLibrary (and after you upload the mod, add it on the steam page too or people will miss it)

bright fog
vivid imp
#

Would I be using the InventoryUI module or the Reflection module @bronze yoke ?

bright fog
vivid imp
#

Ok yay thanks

#

The loot goblin in me wants to make it obvious what items can be smelted lol

teal jay
bright fog
#

Np 👌

#

One day there'll be a wiki page about commands

teal jay
#

I keep saying to myself, I should put functions together that do things that work, but get caught up testing, checking logs and never remember to put a file together, which could help with a wiki for this. Love figuring it out though, and love how the debug log gives exact line and path to the issue.

vivid imp
#

Sorry for a newbie question, but where do I put LUA files with code in my mod folder?

#

I've only created clothing objects thus far

#

So not sure if the process is similar

bronze yoke
#

they should be in media/lua/ and then either client/ shared/ or server/

#

since you're doing ui it should be in client/

errant bluff
#

is it impossible to create a statistic of total fish caught?

silent zealot
#

If you've in debug mode and turning cheats on/off whiel working on mods you've probably noticed the extra animal info (floating text on animals) is bugged - comment out these lines in media\lua\client\DebugUIs\DebugMenu\General\ISCheatPanelUI.lua to stop the text toggling every time the cheat menu is opened:

#

IsoAnimal.setExtraValues(bool) seems bugged

silent zealot
silent zealot
bronze yoke
#

mostly the latter, but it does have a couple effects

silent zealot
#

hahahahah of course there are some special cases

bronze yoke
#

the client folder doesn't load on the server (but the server folder *does* load on the client) and they load in separate stages

#

all shared files -> all client files -> all server files

silent zealot
#

translation might be special too?

bronze yoke
#

translation is just a hardcoded location, it has to be in shared, it's not even lua

silent zealot
#

Since you use the same filenames there, but it doesn't overwrite existing translation files.

bronze yoke
#

it shouldn't even be in there but i'm guessing from the syntax it used to be lua or something and that was the simplest way to convert it over to their new system

silent zealot
#

nods just a bit more technical debt.

bronze yoke
ebon dagger
#

Aparently, I have done something very wrong.

Everytime I Quit (using the pause menu) a game after testing my mod, the save game has all mods removed.

No stack trace errors. Very fun. Anyone have any ideas?

silent zealot
#

I've seen similar that when something causes the mod loader to give up parsing mods (like a bad mod.info)

#

If it just started easiest firststep is to remove any mods you just added/edited, see if that fixes problem.

bronze yoke
#

what does that save's mods.txt look like? maybe something weird in a mod id is making it unparseable or something? lol

silent zealot
#

Then look at mods.txt for the save and console.txt for clues

#

Also, does this affect all saves?

#

If you make a new test save.

ebon dagger
#

I'll create a new one to see if its messed PRE-Quit

vivid imp
#

So this is the first LUA code I've ever written, I'm sure that the syntax for this for loop is incorrect. (And probably a lot of other things too).

What do I need to change to make it correct?

local onFillItemTooltip= function (tooltip, layout, item)
    local itemTags = item.getTags()
    local isSmallSmeltable = false

    for i = 0, itemTags.size(), 1 --- prob won't work but maybe might? lol
    do
        if itemTags[i] == SmeltableIronSmall --- not sure what the LUA syntax is for this
        then
            isSmallSmeltable = true
        end
    end
        
teal jay
dull moss
ebon dagger
#

\TKE and \LookLibrary are unpublished mods.

bronze yoke
#

hmm yeah, that looks normal, probably something else

bronze yoke
finite scroll
#

yo wsg fellas just asking if anyone knows how to add occupational clothing

bright fog
vivid imp
#

Sorry for the ping @bronze yoke, but can you tell me the difference between these two methods?

layoutItem:setLabel("Grown at:", 1, 1, 0.8, 1)
layoutItem:setValue("Sweet Apple Acres", 1, 1, 1, 1)
bronze yoke
#

setLabel sets the text on the left, setValue sets the text on the right

vivid imp
#

I see, thank you!

tacit pebble
#

uhm... sorry for bumping.
#mod_development message
In this case, Can i think it's a bug or still there is any possibility of me did something wrong?
I just want to get better knowledge, or want to be sure.

#

I don't have enough skill to judge "I'm sure it's a bug so I won't mind" so i can't get rid of curiousity

ebon dagger
#

I'm testing it again, but I think my mod being disabled had something to do with excessive use of print() in Events.OnPlayerUpdate 😄

bright fog
#

Would that be possible ?

#

I'd find it surprising ?

bronze yoke
#

i don't think so...?

#

it'd be new if so

ebon dagger
bronze yoke
#

i've crashed the game with prints on stupid events and it's never cared

bright fog
#

Yeah that'd be a new safeguard devs would have added

#

Which seems like it would cause more problems than fix any imo ?

tacit pebble
# bright fog What's craftRecipe ?

lua\client\Entity\ISUI\CraftRecipe\ISWidgetRecipeListPanel.lua
I was working on this file directly.

and i think it means each craftRecipes on Crafting/Building UI

local craftRecipe = _item and _item.item;
bright fog
#

craftRecipe is the script craftRecipe

tacit pebble
bright fog
#

Are you sure getXPAward is properly giving you the object ?

#

xplist could be nil

#

Also what's the error you were getting ?

tacit pebble
bright fog
#

Sry didn't even notice the screenshot

#

I don't even know how to read that fucking menu, it's so dogshit

ebon dagger
#

I added logging back and its not crashing. I have no idea. I can't get it to mess up again. It was every time too lol.

tacit pebble
#

error type was non-table of getAmount()
like, getPlayer():getAnythingPlease() and you will get non-table of getAnythingPlease()

bright fog
#

Do you not read your errors directly through the console ?

bright fog
#

I'm waiting for that new debug menu they promised tbf

vivid imp
#

Yeah the new one looks so much better

tacit pebble
pastel thorn
#

Sorry for interjecting, but does anybody know how to take all world items / inventory items ? or whatever workarounds for tracking items. I need to build some cache on start, but dont even sure that it is available without some additional ritual dances

ebon dagger
#

Though, this log is WILD all the number should be at 2 decimals.

LOG  : Lua          f:228, t:1736046189026> 0.8
LOG  : Lua          f:229, t:1736046189042> 1
LOG  : Lua          f:230, t:1736046189057> 1.2
LOG  : Lua          f:231, t:1736046189074> 1.4
LOG  : Lua          f:232, t:1736046189091> 1.5999999999999999
LOG  : Lua          f:233, t:1736046189107> 1.7999999999999998
LOG  : Lua          f:234, t:1736046189124> 1.9999999999999998
LOG  : Lua          f:235, t:1736046189140> 2.1999999999999997
LOG  : Lua          f:236, t:1736046189159> 2.4
LOG  : Lua          f:237, t:1736046189173> 2.6
LOG  : Lua          f:238, t:1736046189190> 2.8000000000000003
LOG  : Lua          f:239, t:1736046189207> 3.0000000000000004
LOG  : Lua          f:240, t:1736046189224> 3.2000000000000006
LOG  : Lua          f:241, t:1736046189241> 3.400000000000001
LOG  : Lua          f:242, t:1736046189258> 3.600000000000001
LOG  : Lua          f:243, t:1736046189274> 3.800000000000001
LOG  : Lua          f:244, t:1736046189290> 4.000000000000001
bronze yoke
bright fog
bronze yoke
old ginkgo
#

F11 menu is hella helpful for some issues.

bright fog
#

If it wasn't terrible to read

bronze yoke
#

my debugging process would take at least three times as long without it

old ginkgo
#

it can give you info the console doesn’t.

bronze yoke
#

do you just print everything?

bright fog
#

Please make a guide on how to use it lmao

ebon dagger
bright fog
bronze yoke
tacit pebble
bronze yoke
#

i mean printing is wise and very useful but the debugger lets me check values i didn't even know i needed to check when i wrote the code

bright fog
#

wdym ?

bronze yoke
#

from the debugger you can inspect all local variables

#

particularly including looking inside tables and seeing field values on java objects

old ginkgo
#

It lets me know things I’m fucking up that I didn’t even know I was fucking up in the first place.

bright fog
#

Like I said, do make a guide about it, really, the menu is so dogshit I never figured out how to even use it

#

I mean for me, if it errors, that means I need to check it out, that's it

#

Never had a need to look inside anything else, I already print stuff and shit

ebon dagger
#

The log is for data you know you wanted, the debugger is for what is actually happening.

bright fog
#

Real time tests with reloading lua in-game and done

bright fog
#

I never had a need for this shit, printing always gave me all the info I needed

bronze yoke
#

*if* you knew you had to print that info in the first place

#

half of the time that means you need to add prints to everything to see what's going on, and then re-run the code

bright fog
#

And again, sure do make a guide on how to use this dogshit interface that a gnome would have made better

bronze yoke
#

with the debugger i can quickly just look at everything whenever an error happens

ebon dagger
#

Hell yeah, string.format("%.2f", unformattedDouble)

LOG  : Lua          f:145, t:1736046800965> 170.40
LOG  : Lua          f:146, t:1736046800982> 170.30
LOG  : Lua          f:147, t:1736046800999> 170.20
LOG  : Lua          f:148, t:1736046801015> 170.10
LOG  : Lua          f:149, t:1736046801031> 170.00
LOG  : Lua          f:150, t:1736046801049> 169.90
LOG  : Lua          f:151, t:1736046801065> 169.80
tacit pebble
#

me too when i use debugger mainly, i want to jump to something easily and i can see everything inside of, so i can know what functions i can use next

bronze yoke
#

i'm definitely excited to see a more professional debugger since the current one is a little buggy and has some limitations but it's a massive help already

bright fog
#

I get it, and I will never try to learn this by myself, I tried already and I really can't use it, nothing makes sense to navigate. The door is open for a guide on how to use it tho

tacit pebble
#

shit my typing is so slow... i cant follow you XD

vivid imp
#

The new debugger looks fun to mess around with as well haha

bright fog
#

Sure do make a wiki page about it if you all find it so useful, that'd be amazing

bronze yoke
#

btw, do any of you guys know how to set breakpoints on tables in the debugger? i've seen so much code for it but i've never found where you actually do it

#

it seems like you're supposed to be able to catch whenever a specific table gets read from or written to

bright fog
ebon dagger
#

Now there is a LOT more to debugger. But this is a super quick overview of using it.

bright fog
#

How do you open tables ? What does it look like ?

bronze yoke
#

you double click them in the locals/object stack

tacit pebble
#

double click and you will be able to open.
for example, i clicked xplist to open and see what is inside of xplist
So i was able to figure that xplist is not 'nil' and it has getAmount() function and value of amount is 5 with int

bright fog
#

I'll give it another go once I can, but I swear clicking anything in this menu will send you to the backrooms

#

You just get instantly lost

old ginkgo
#

Lmao it’s incredibly frustrating at first. It took me a long time to parse it especially since I’m not from a programming background.

bright fog
#

My experience has been more than negative with this menu in the past, it's an instant uncheck "Break on Error" and continue button

bronze yoke
#

i had no idea our debugging styles were so different

tacit pebble
# tacit pebble search for ``getAmount of non-table` and it's all about getAmount()

anyway, just want to back to my thing,

java.lang.RuntimeException: attempted index:
getAmount of non-table:
zombie.scripting.entity.components.crafting.CraftRecipe$xp_Award@49dbf3df at KahluaThread.tableget(KahluaThread.java:1667).

so it looks unusual, because it's too long whatever its meaning.
this is usually i've seen for non-table error

java.lang.RuntimeException: attempted index:
hasTag of non-table:
null at KahluaThread.tableget(KahluaThread.java:1667).```
bronze yoke
#

oh no

#

you won't be able to call this because that class is not exposed

tacit pebble
bronze yoke
#

yeah, xp_Award is a nested class that isn't itself exposed

#

if you use my starlit library it can read fields from unexposed objects and you'd be able to get them that way

tacit pebble
#

oh okay now puzzle fits together

#

need to think little bit more because what you said is I've never heard before. :p

cosmic ermine
#

How do I modify script templates? I tried modifying template = GasTank, earlier with

template GasTank,
part GasTank
{
  itemType = Base.NormalGasTank,
  container
  {
    capacity = 31.7,
  }
}
```but it was throwing an error.
bronze yoke
#

it should be exposed, it's weird that we have to do this, it's unlikely unintentional and definitely worth requesting if not reporting

tacit pebble
#

ooh i see clearly. btw that's why I love here. I learned absolutely new thing today again. thank you Albion and sir doggy jvla

bronze yoke
#

field access is probably one major exploit discovery away from being disabled anyway LOL so we shouldn't get complacent with needing to use it

old ginkgo
vivid imp
#

Do you use item:getTypeString() to check for a specific item, or is there a better way?

bronze yoke
#

item:getFullType()

rancid tendon
#
I want to discuss with you an important mental model. It is a means by which we can understand and evaluate risk.                                
It is called the 'Swiss Cheese Model'. In any situation where grave risk is involved, one cannot rely on a single layer of protection and protocol.                                 
A howling storm in the dead of night cloaks the sound of a zombie picking a hole in your perimeter, boards landing quietly into sodden mud and infested boots shortly behind them.                                 
It slips through a hole in one layer of cheese. Each layer of defense will, inevitably, have holes. With a risk as constant and serious as we face, single points of failure are death.                                
But here, you are wise. The infected bumbles about, sifting your fresh scent from the night rain. It has clearly learned to follow the cracks of light, for which it hunts.                                 
A gleam, in the dim. Your lights, pouring out through bars of steel much too thick for it to punch through, but it doesn't care. It sees gaps. Its hands thunder through the gap.                                
Hissing, snarling, pulling, its arms nearly coming apart against the might of the unyielding steel. You stir, and stalk towards your window, slipping a spear off a nearby table.                                
Through the bars, and between its eyes, an effortless and easy kill from behind the safety of the second layer of cheese. Perhaps you could use a third, though.                                 
Four, maybe eight nails the next day--a much lighter cost than your life.                                 
Heed my wisdom, and carefully manage the alignment of your cheese, survivors. [light, warm chuckle...]                                 
Stay safe. That is all. Next up...   ```
#

working on radio dialogue for the upcoming update to mfteotw :3

vivid imp
#

oh ok I thought we had an insane person in chat for a sec lol

#

Looks cool!

rancid tendon
#

LOL nah this is dialogue for a mod

tacit pebble
#

I turned on my gpt

teal nacelle
#

God DAMN there's so many more zombie sounds than I thought

#

I'm trying to add a zombie sound replacer to my mod as an optional thing, but I'm the one doing the voices for it so I'm gonna have to recreate over 400 zombie sounds...

winter bolt
teal nacelle
#

I'm trying to make a mod that basically makes the zombies look/sound like they have tuberculosis on crack so I'm gonna have to do 400 something different variations of coughing and wheezing-

#

My poor throat lmao

tranquil reef
#

Is blood spray or rain puddles in any form recreate-able

#

Or is it all so hardcoded that it's either impossible or not worth it

vivid imp
#

I think i spent too much effort to make this stupid thumbnail lmao

vivid imp
#

It was annoying me how some items were smeltable and others werent and it was a guessing game haha

#

Um, how do you actually publish to the workshop? Can you do it in the game?

cosmic ermine
ornate sand
cosmic ermine
#

preview.png can only be 256x256 (Steam limit), poster.png can be 512x512.

vivid imp
#

How do I add additional images to the page?

ebon dagger
#

I figure screenshot better than typed words lol

vivid imp
#

Hmmm alright I uploaded it but Im not sure how long it takes for it to actually get out there

bronze yoke
crimson ore
#

any1 know how to insert into distributions?

#

proc distro is fine but i cant insert into distributions without nuking the whole list

vivid imp
#

Is it normal for Steam to make a phantom private listing after I uploaded it in the game lol

bronze yoke
#

no

vivid imp
#

Hmmm

crimson ore
#

oh this just is a nothing file nvm tf

rancid tendon
#

word on the street is that it's slightly more feasible to make new 'scenes'/world story events in b42, is that true?

#

a la parties/suicide scenes/etc in houses

silent zealot
#

Someone on the bug report forums figured that UseDelta was actually being stored as number of remaining charges... by a short int. Which can be fixed by adjusting UseDelta so batteries have fewer than 32767 max charges.

crystal canyon
#

I havent touched anything modding related today. Ive just been playing 😄
Thanks for that mod Dr. I kept wondering why my cars battery kept getting drained

tranquil reef
#

How can I add a custom idle animation based on custom variables? Like a character shaking if they have the plague. Would I have to make it a timed action?

ornate sand
# crimson ore any1 know how to insert into distributions?

Yeah, this is how I have one of my gun cases set up. I edited the file to show how it's done for just one for the purpose of this screenshot, but my full GunCases.lua has all of my custom gun cases in it if you want to see the whole thing.

crimson ore
#

im making a few edits and will check. if that doesnt work then im out of luck

ornate sand
#

After you've set up your distributions you'll need the regular table.insert into proceduraldistributions too.
And yeah I probably don't need all of those require lines but I slapped them in there just for the ol' "better safe than sorry" idea

tardy mural
#

Shouldn't a very simple lua code like this be enough to make a crafted item have less than its full uses left? Anyone has any idea why when crafting this, the item still appears with all its uses?

function Recipe.OnCreate.MakeConsumable(craftRecipeData, character)
  local result = craftRecipeData:getAllCreatedItems():get(0);
  result:setUsedDelta(0.5);
end```
#

Also what is an easy way to detect if my function is being called at all while crafting? Can I print to the ingame console or something?

silent zealot
#

print("MyModName: some message")

#

you'll see if in the LUA console, and also in console.txt

#

Don't leave those statements in for the release version - it's fine to print messages for one off things, but you want to avoid log spam in normal operation (or add a debug setting that can be toggled on/off as needed.)

tardy mural
silent zealot
#

Never done that with recipes. I've done it with items that call a function when they are created.

#

OnCreate = NepDIYSpecialLootSpawns.NepDIYOnOnCreateBSToolsSchematic,

crimson ore
silent zealot
#

I also made my own set of functions instead of adding to the existing function table.

crimson ore
#

all = was a test to see if it worked at all

silent zealot
#

Shouldn't need to do that, but might matter.

#

Does lua let you add a table to a table that way?

#

I thought you had to iterate and call insert on each element, or is distributionTable a single top level element being added?

bronze yoke
silent zealot
#

I may be 100% wrong... but I 100% know I hate lua tables. Which is a problem, because lua is 100% made of tables. 🤣

ornate sand
#

Yeah I'm lost as well. I just have cases that have specific stuff in 'em.

tardy mural
silent zealot
#
multiline
comment
]]--``` also works.
tardy mural
#

Awesome, thank you

crimson ore
#

spot the difference lol

ornate sand
#

That's always the best result. I have zero idea why but it works 😄

tranquil reef
#

does stopOnRun mean jogging or sprinting

#

nvm, means both lol

uneven jay
#

yall know where moodle icons are located

ornate sand
uneven jay
ornate sand
#

no but there's a Moodles folder, ya silly sod

uneven jay
#

ya

#

ik

#

i call em files

#

unless im blind i dont really think they there

#

or maybe i am

#

who knows

ornate sand
#

Oh, are you in B41 still? Because then idk

uneven jay
#

b42 moodles are a bit uhhhhhh

#

i mean

#

it looks like this

#

you know

#

it doenst fit in

#

like who thought this one was a good idea honestly

#

i wanna replace em

ornate sand
#

waitaminute, so you did find them

uneven jay
#

no

#

those are b42 ones

#

i need the b41 ones

ornate sand
#

Right

uneven jay
#

only moodle i could find in b41 folders are the windy one

#

i can find the code for moodles in the .class files but the icons seem to hide from me

ornate sand
#

Yeah somebody in here joked that B41 moodles are more hardcoded than anything else in the game. I mean they could be in one of those texturepacks I suppose?

uneven jay
#

nah this shi does not exist bro

warm yacht
#

Is xp gain, java or lua script?

silent zealot
#

It would be stored in the java object but lua can addXP

warm yacht
#

Harvesting plants give no xp

silent zealot
#

What is your goal with XP?

warm yacht
#

I want to find the culprit

#

And this is plants i have planted myself

silent zealot
#

Is it meant to give XP?

warm yacht
#

Yep

crystal canyon
#

yeah farm xp when harvest

warm yacht
#

yeah i just did 3 plots and got no xp

#

60 days i waited D:

ornate sand
#

Yep, I just debug myself some Agriculture levels because not a single blooming crop has given me a point of xp

silent zealot
#

media\lua\shared\Farming\TimedActions\ISHarvestPlantAction.lua

warm yacht
#

Thank you stalker i will delve in now

silent zealot
crystal canyon
#
if plant then
        SFarmingSystem.instance:harvest(plant, self.character)
        -- we successfull harvest our plant, we may gain xp !
        if isPlayerOwn then
            SFarmingSystem.instance:gainXp(self.character, plant)
        end
    end
silent zealot
#

Throw some debug print statemenst in there and see what's going on.

#

It is possible that the java side is borked, but you can at least poke the lua side.

crystal canyon
#

im worried because it says may gain xp

warm yacht
#

@ornate sand

#

I think you only get a chance now

silent zealot
#

ooof

warm yacht
#

That is harsh man xD

silent zealot
#

Farming is utterly terrible now 😂

ornate sand
silent zealot
#

"I think I'll be hungry in late 1994, better get started farming"

crystal canyon
#

I love how all 3 found the code related to it almost at same time

silent zealot
#

Meanwhile the dairy farmer is drowning in butter, the fisherman has huge piles of 30lb rotten fish fillets because he can't eat it all, the scavenger hasn't run out of canned food and dried beans yet...

ornate sand
#

This is how I made unloading magazines give the same xp as loading 'em

        local chance = 5;
        local xp = 1;
        if self.character:getPerkLevel(Perks.Reloading) < 5 then
            chance = 2;
            xp = 4;
        end
        if ZombRand(chance) == 0 then
            addXp(self.character, Perks.Reloading, xp)
warm yacht
#

Where is this line of code

crystal canyon
#

ISHarvestPlantAction.lua

warm yacht
#

No the sfarmingsystem. instance

crystal canyon
#

ah

silent zealot
warm yacht
warm yacht
silent zealot
#

You start to get a feeling for where things will be/what the files will be named.

ornate sand
#

media/lua/server/Farming/SFarmingSystem.lua

warm yacht
#

Nvm i found it 😄 thanks rainmaker

silent zealot
#

And then you find that the pencil isn't in items_literature, or items_office, or items_misc... it's in items_one_handed_stab

crystal canyon
#

-- add xp, depending on the health of the plant
function SFarmingSystem:gainXp(player, luaObject)
    local xp = luaObject.health / 2
    if luaObject.badCare == true then
        xp = xp - 15
    else
        xp = xp + 25
    end
    if xp > 100 then
        xp = 100
    elseif xp < 0 then
        xp = 0
    end

    addXp(player, Perks.Farming, xp);
end
silent zealot
#

WTF who names a variable "luaobject"

warm yacht
silent zealot
#

Might as well name it "variable"

warm yacht
#

So xp gain is tied to the HP of the plant, am i reading that right?

silent zealot
#

yes.

warm yacht
#

Is Elseif Supposed to itself?

crystal canyon
#

xp = xp - 15

MINUS 15 xp?

silent zealot
#

for "bad care"

#

I'd like to know what counts as bad care

ornate sand
#

"Bad care", goddamn things got to blooming without a hitch. Watered 'em every other day too

ebon dagger
#

You screwed up that plant. You learned nothing. Infact, you unlearned stuff.

warm yacht
silent zealot
#

Actually, I don't care... I tried to grow every crop that could be planted in august, the only thing that sprouted was kale and I hate kale.

#

I'm now on a diet of butter for calories and 1/4 a can of softdrink for everything else.

crystal canyon
#

quick question, how can I fix this?
Axe is wrong diraction

warm yacht
#

So it's 100 xp / 2 + 25 = 75? I am so new to this so feel free to laugh 😄

silent zealot
#

I think I'll mod in 50mL shot glasses so I can drink my life sustaining blueberry cola in style. (and also, it would be a shame to be able to mix alcohol and not make shots)

bright fog
ornate sand
bright fog
#

Imo better to do that in Blender

tranquil kindle
#

(i do have my priorities straight)

crystal canyon
#

Wednesday

eternal hound
#

Could anyone tell me how to code checking the players inventory for particular items and then equipping them? Been trying getInventory() and getInventoryitems() but doesn't seem to work

errant bluff
# teal jay getFishes(), may either get fish in inventory or all fish ever caught, not sure,...

I was trying to create it with chatgpt and giving it all the information about fishing, from the client/shared/server files plus all the information that you sent me on the web. also using the simple ui library mod I couldn't detect the interface well either. I have no idea about programming but I already made other codes for other games with chatgpt and it worked for me. It's my fault that I don't know how to give you the prompts correctly.

warm yacht
#

what does elsief mean?

silent zealot
#

else if

warm yacht
#

well that spelt it wrong

ebon dagger
#

if the first if doesn't take, then the else if can check another condition

warm yacht
#

right?

#

Elseif

ornate sand
#

tHaT tHInG No HapPEn ThEN ThiNg hAPPeN

ebon dagger
#
if condition then
    perform the thing
elseif anotherCondition then
    perform the other thing
end
silent zealot
#

optional: an "else" at the end which will trigger if nothing previous matched.

warm yacht
#

Nevermind i can't read hahaha

ebon dagger
#

forgot "do" is keyword lol

#

Omg, I'm bout to screamcry lol.
Been troubleshooting my code for about an hour, only to find out, getWornItems() just doesn't seem to get masks? wtf.

silent zealot
#

Would be even more fun it it returned all equipped items except masks, and all masks with condition low enough to be (worn)

dull moss
#

Hey I'm no longer axe

ebon dagger
#
<log when I put mask on >
LOG  : > Belt2
LOG  : > Tshirt_WhiteLongSleeveTINT
LOG  : > Socks_Long
LOG  : > Shoes_TrainerTINT
LOG  : > Shorts_ShortFormal
LOG  : > PPE score is : 0
< log when I take mask off >
LOG  : > Belt2
LOG  : > Tshirt_WhiteLongSleeveTINT
LOG  : > Socks_Long
LOG  : > Shoes_TrainerTINT
LOG  : > Shorts_ShortFormal
LOG  : > PPE score is : 0
#

and my net connection just hiccuped lol

warm yacht
#

Can line of codes have double =?

dull moss
#

yes

ebon dagger
#

"==" is an evaluation, used to check if one value is another value.

1 == 1 comes out as true
1 == 2 comes out as false.

dull moss
#

might I recommend reading a bit about programming? There are websites that can teach you the very basics in like 30 min, will save you a lot of question in here (because if you ask what's == and how if works you'll be asking another 300 questions)

#

but you do you

warm yacht
#

Can i have a link please as i am eager to learn

dull moss
warm yacht
#

Thank you kind sir

dull moss
#

all of these sections will answer like 60 questions that you might have if you never coded

warm yacht
#

Top man thank you

dull moss
#

and if you need some clarifications feel free to ask here or chatgpt, it's very good for this kind of thing, just start msg with "I'm learning how to code and I'm starting with lua, can you explain XYZ"

#

it shouldn't make any mistakes when it comes to basic concepts of programming

warm yacht
#

Wow i have never used chatgpt before i just put in the code, and has already came up with 4 likely errors, thats insane

dull moss
#

I'd recommend asking it to explain the fixes it makes so you understand why it should be this way and not another

warm yacht
#

Well its the TIS code not mine

dull moss
#

keep in mind that TIS code is meant to be working with other 300 files that chatgpt doesn't have access, and while it can usually understand and explain what's going in inside the file it's pretty much guessing based on context (which it can do good but then again it doesn't have other files)

warm yacht
#

yeah i kind of guess that.

dull moss
#

but ye i sometimes send it code blocks that i want it to explain and it does pretty decent job

#

tldr: chatgpt is a tool, not a solution

warm yacht
#

We also lose fitness xp for being lazy now xD

#

Like come on dudes hahah

ornate sand
#

I threw the lua problem I've had for 12 days now at GhatGPT and it gave me several ideas to try 😄 That is pretty rad

dull moss
#

yep

ebon dagger
#

I found GPT super useful as a tool for accomplishing busy work.

"Hey GPT, Here is a list of items I have, format it in (whatever format)"

Then I don't have to hit CTRL v 150 times to make a lua table

dull moss
#

yep

#

I used to use excel for it

warm yacht
#

Where would i find Perk.farming

dull moss
#

wdym?

#

farming is probably scattered across multiple files

#

its not like there's a file with farming and everything is in it

#

it's not that easy :D

ornate sand
warm yacht
#

Telling me brother 😄

dull moss
#

show the code

#

you can format it in discord by putting it in tripple `

#
like this
warm yacht
#

FUCKKKKKK

#
function SFarmingSystem:gainXp(player, luaObject)
    local xp = luaObject.health / 2
    if luaObject.badCare == true then
        xp = xp - 15
    else
        xp = xp + 25
    end
    if xp > 100 then
        xp = 100
    elseif xp < 0 then
        xp = 0
    end

    addXp(player, Perks.Farming, xp)```
#

Nailed it

ebon dagger
#

So, My base assuption about adding like, a ton of code to execute on the "OnPlayerUpdate" event is gonna cause performance issues isn't it?

dull moss
#

depends on what you doing

#

why you using onplayerupdate and what do you do on it

ebon dagger
#

I've been avoiding it mostly, but checking distance between objects etc.

dull moss
#

for what reason? is it important to have it being 100% updated all the time?

#

you can also have it be on every X playerUpdate by manually skipping X updates

#

i try to avoid anything more frequent than everyOneMinute

#

this is the only code that i have in 4k lines that's OnTick PepeLaugh

---Function responsible for processing Pain Tolerance execution logic
local function painTolerance()
    local player = getPlayer();
    local PainTolerance = player:HasTrait("PainTolerance");
    local stats = player:getStats();
    local pain = stats:getPain();
    if PainTolerance and pain > SBvars.PainToleranceThreshold then
        stats:setPain(SBvars.PainToleranceThreshold);
    end
end```
#

should just be > actually

ebon dagger
#

Yeah, that's kinda what I have been doing.

At this point OnPlayerUpdate is just running math. raising a number by a predetermined amount based on a playerdata variable, or lowering it if the varable is 0.

All the other stuff, checking the distance, setting the variables on the player etc is done in EveryMinutes and EveryTenMinutes

#

Working on my own version of an airborne infection for the expansion to They Knew

dull moss
#

i mean would it be terrible if it's every minute?

#

I'd rather have slightly less accurate math and less performance strain than other way around, but that's just me

ebon dagger
#

probably not lol. I can just mess with the numbers.

#

Pretty much why I asked. I was feeling off about running the data THAT often

dull moss
#
---Function responsible for managing Cat Eyes trait
---@param isKill boolean
local function catEyes(isKill)
    local isKill = isKill or false;
    local player = getPlayer();
    local nightStrength = getClimateManager():getNightStrength()
    if nightStrength > 0 then
        local playerNum = player:getPlayerNum();
        local checkedSquares = 0;
        local squaresVisible = 0;
        local square;
        local plX, plY, plZ = player:getX(), player:getY(), player:getZ();
        local radius = 30;
        local modData = ETWCommonFunctions.getETWModData(player);
        local playerIsInside = player:isInARoom();
        local hasEagleEyed = player:HasTrait("EagleEyed");
        local thisMinuteIncrease = 0;
        for x = -radius, radius do
            for y = -radius, radius do
                square = getCell():getGridSquare(plX + x, plY + y, plZ);
                checkedSquares = checkedSquares + 1;
                if square and square:isCanSee(playerNum) then
                    local squareDarknessLevel = nightStrength * (1 - square:getLightLevel(playerNum)) * 0.01 * (square:isInARoom() and playerIsInside and 2 or 1) * (hasEagleEyed and 2 or 1);
                    squaresVisible = squaresVisible + 1;
                    thisMinuteIncrease = thisMinuteIncrease + squareDarknessLevel;
                end
            end
        end
        modData.CatEyesCounter = modData.CatEyesCounter + thisMinuteIncrease;
        if detailedDebug() then
            if isKill then print("ETW Logger | catEyes(): was triggered by a kill") end;
            print("ETW Logger | catEyes(): Checked squares: " .. checkedSquares .. ", visible squares: " .. squaresVisible .. " with total darkness level of " .. thisMinuteIncrease)
        end;
        if debug() then print("ETW Logger | catEyes(): CatEyesCounter: " .. modData.CatEyesCounter) end;
    end
end
#

i got this every minute

#

checking visible squares

#

it worked fine with on tick but i still opted for every minute cuz math accuracy lost was negligable and checking 900 tiles every tick is not a good idea

warm yacht
#

I am checking the xpupdate.lua

#

And there is nothing about getting xp for farming

dull moss
#

you'll (probably) find farming getting exp in files that manage farming actions

#

like planting or whatever

warm yacht
#

Yeah its that code that i showed you, but it's not working as intented

warm yacht
#

Indeed

dull moss
#

what about it

warm yacht
#

It does not work

dull moss
#

how do you know

warm yacht
#

Because i have planted 4 crops and grown to the last stage, and got nothing when i havested them

#

Rainmaker has planted and harvested atleast 60 and got nothing also @ornate sand are you using uncursed plants?

dull moss
ornate sand
#

Uncursed, tasty and great wabbit bait too

warm yacht
#

😄

warm yacht
ebon dagger
#

Just as another data point, did you all see that farming doesn't give any xp for plants YOU didn't plant?

warm yacht
#

You don't get xp for your own plants 😄

#

I wonder when you plant them its giving that function tho

#

🤔

#

Like all plants are not yours regardless if you plant them or not

dull moss
# warm yacht ```-- add xp, depending on the health of the plant function SFarmingSystem:gainX...

you can always just edit the function and add printouts to check

-- add xp, depending on the health of the plant
function SFarmingSystem:gainXp(player, luaObject)
    local xp = luaObject.health / 2
    print("aaaaaaaaaaaa | xp = "..xp)
    if luaObject.badCare == true then
        xp = xp - 15
    else
        xp = xp + 25
    end
    print("bbbbbbbbbbbb | xp = "..xp)
    if xp > 100 then
        xp = 100
    elseif xp < 0 then
        xp = 0
    end

    addXp(player, Perks.Farming, xp)```
#

then jsut check in console

warm yacht
#

Oh good shout

#
--     local i = self:getLuaObjectCount()
--     while i > 0 do
    for i=1,self:getLuaObjectCount() do
        if not self:getLuaObjectByIndex(i) then break end
        local luaObject = self:getLuaObjectByIndex(i)
        if luaObject then self:checkPlant2(luaObject) end
    end
    local i = self:getLuaObjectCount()
    while i > 0 do
        if not self:getLuaObjectByIndex(i) then break end
        local luaObject = self:getLuaObjectByIndex(i)
        if luaObject then self:plowFadeCheck(luaObject) end
        i = i - 1
    end```
#

Is that the code for planting?

dull moss
#

doesnt look like it but i never looked into farming code

warm yacht
#

bollocks to it just going to give myself 75xp per harvested plant in debug

warm yacht
#

😄 Thank you music

ebon dagger
#

Ok, Harvest happens in ISHarvestPlantAction.lua

Lines 55 - 83

 
function ISHarvestPlantAction:complete()
    local prop = farming_vegetableconf.props[self.plant.typeOfSeed]
    local lootPosition = "Low"
    if prop.harvestPosition then lootPosition = prop.harvestPosition end
    if lootPosition == "Low" then
        local skill = self.character:getPerkLevel(Perks.Farming)
        self.character:addBackMuscleStrain(1 - (skill * 0.05))
    end
    local plant = SFarmingSystem.instance:getLuaObjectAt(self.plant.x, self.plant.y, self.plant.z);

    local isPlayerOwn = false
    if isClient() then
        isPlayerOwn = self.character:getOnlineID() == plant.owner
    else
        isPlayerOwn = self.character:getPlayerNum() == plant.owner
    end

    if plant then
        SFarmingSystem.instance:harvest(plant, self.character)
        -- we successfull harvest our plant, we may gain xp !
        if isPlayerOwn then
            SFarmingSystem.instance:gainXp(self.character, plant)
        end
    end

    return true;
end```
#

You could grant yourself XP there.

vast pier
#

Is there a way for me to change the fluid values of containers without replacing the item?

vast pier
sly monolith
#

WARN : General f:5771, t:1736087013007> AnimatedModel$AnimatedModelInstanceRenderData.initMatrixPalette> skinningData is null, matrixPalette may be invalid

#

what does that mean? xd

vast pier
stoic patrol
#

hello, in serverside doesn't exists Events.EveryOneMinute?

bright fog
warm vector
#

Does anyone know if it possible to create a mod that makes a day length in PZ to 1 hour and 30 minutes?
I hate playing on 1 hour length, but 2 hour length seems too long 😦

random finch
#

Someone help me understand why TIS does this in IsoPlayer? They are comparing the player instance to the player object?

protected boolean playerIsSelf() 
      return IsoPlayer.getInstance() == this;
 end
jovial sequoia
#

Hello guys i'm trying to add my items to conteiners but i got this error B41

kindred frost
#

I got a mod suggestion a way to produce cars with the use of a factory line using a mod called Industrial Revolution

sly monolith
#

could someone tell me how to make custom masks to hide calf part of the legs? I somehow managed to make boots in blender, what's even more surprising to me is they do work in game 😆 The issue is they only reach up to knees, so i can't use the default masks, cuz that would hide the thighs. Here's a screenshot of my issue:

hexed helm
#

Hi, I was trying to fix the Trolleys mod, I have fixed part of the code and used the "KitsuneLib" library (it's Tsar's but updated for 42b) for the moment everything works, but the animations are not applied, I don't know if it has changed, I have tried to contact the original author but I see that he has not given any signs of life for more than a year 😭 tired

stoic patrol
#

Is the cache folder:
[SERVER] LOG : General , 1736097038807> 10.822.431> cachedir set to "C:\Users\Kaori\Zomboid"?

Okay, I place the file in the folder C:\Users\Kaori\Zomboid\Lua\file.lua, but it is not loaded when the server starts.
If I place it in C:\pzserver\media\lua\server, it gets loaded, but it is detected by the checksum. For local testing, this isn't a problem, and it works fine, but if someone else connects, they'll get kicked due to the checksum.
However, there are still some things that don't work. For example, if I try to call the getFileWriter function, it is not invoked; it doesn't exist in this file's context. Am I doing something wrong?
Also, the EveryMinute event function doesn't work when the file is placed there, but I can handle the OnClientCommand function.

I want to load a server-side script without using a Workshop mod and load the client-side script with a Workshop mod. Is this the only way to do it?
Is what I’m trying to do too far-fetched, or is it simply not possible? Or am I doing it wrong?
Am I supposed to make a mod that uses loadstring() to load this from the cache folder?

Sorry for the long message, but I’m increasingly confused. The documentation for Project Zomboid is basically nonexistent. 😦

bronze yoke
#

you'd use getFileReader to read the file in the cache directory and then use loadstring() to execute it

bronze yoke
# random finch Someone help me understand why TIS does this in `IsoPlayer`? They are comparing ...

i don't know what specifically this is being used for but there are four players in splitscreen and only one is the instance - i don't know exactly how much of the code this affects but i have seen areas where they just loop through all players and set each to the instance before calling some functions, presumably to patch around old code that just targets player instance instead of e.g. passing a specific player as an argument

bronze yoke
restive lodge
# random finch Someone help me understand why TIS does this in `IsoPlayer`? They are comparing ...

I believe its because that's called from IsoCharacter so its checking if character object is the player or not would be my best guess. For example IsoCharacter could be used for a npc or animal or something, in which case IsoPlayer.getInstance() == this(IsoCharacter) would return false. Also i think IsoPlayer.getInstance() == this would return false if IsoPlayer.getInstance() was null or has not been created yet.

restive lodge
restive lodge
# random finch Someone help me understand why TIS does this in `IsoPlayer`? They are comparing ...
protected void initTextObjects() {
        this.hasInitTextObjects = true;
        if (this instanceof IsoPlayer) {
            this.chatElement.setMaxChatLines(5);
            if (IsoPlayer.getInstance() != null && !(this instanceof IsoAnimal)) {
                DebugLog.DetailedInfo.trace("FirstNAME:" + IsoPlayer.getInstance().username);
            }

for example this instance of IsoGameCharacter is checking whether it currently represents a player or an animal

random finch
reef cairn
#

if I want to override and existing base recipe with once I want to us can i just use

Override:true, ?

hybrid tiger
#

from what I know it doesnt exist anymore for b42

#

was also looking to override a vanilla recipe aswell

ornate sand
#

Yup same here, couldn't override them anymore. 😦

reef cairn
#

for example

#

I want to used this base one because it is half the time to do as the MCH one is way too long

ornate sand
#

For B41 yeah, override:true, should do it

finite scroll
#

does anyone know how to mark a literature item as read?

reef cairn
ebon dagger
#

anyone know of a method to determine if two isoobjects are in the same room?

tranquil kindle
#

thats for b42*

ornate sand
#

Same for B41

#

Except that repices isn't a folder but a txt

tranquil kindle
#

exacly

bronze yoke
ebon dagger
#

Ah! Ok that makes sense, I saw that in java IsoObject has some room methods, but they don't seem to be usable in lua

sacred matrix
#

Not sure whom to ask here - it's an Indie Stone question I think. I'm updating a somewhat popular mod (furry mod, about 100K users) to b42. That's going well enough.

However I was also investigating if it was possible to get rid of the clothing approach now that b42 has animals with custom models.

But (in Java - I'm a professional Java developer) the method ModelManager#getBodyModel(IsoGameCharacter) still ignores HumanVisual#setForcedModel and just uses the default player models.

Given b42 is in development, I wonder whom I could ask to see if we could have a backdoor to allow for player characters to honour HumanVisual#setForcedModel?

ornate sand
old ginkgo
#

I looked into it myself quite a few times to little luck.

reef cairn
#

if I want to be able to use any combination of items for a recipe that requires 5 garlic

#

could i just do

WildGarlic2/WildGarlic=5,

#

so if i have either comination of these two items it should work?

tranquil kindle
reef cairn
#

will try this if it doesn't work can always adjust

cosmic ermine
#

Is it possible to add custom vehicle sounds?

icy night
#

Hi, is there anyone here who understands b42 recipe scripts? I'm having trouble with mine. 8 recipes and I could only get 1 to work.

ornate sand
#

Ehh, I know how to turn item A into item B, or items A, B, C, and D into item E, or 50 item A into 1 item B but that's about it 😄

icy night
#

Well all im trying to do is craft alcohol out of yeast, sugar, water, etc

#

along with a few extra recipes that let me craft those ingredients. I was able to turn canned corn into "take Corn out of can" lol

ornate sand
#

Ahh yes, the new liquid system causing issues like Liquid Snake himself

icy night
#

Is it the water thats the problem?

ornate sand
#

Try to take a look at vanilla recipes that use water?

main pasture
# cosmic ermine Is it possible to add custom vehicle sounds?
sound
{
    engine = VehicleEngineSportsCar,
    engineStart = VehicleEngineSportsCar,
    engineTurnOff = VehicleEngineSportsCar,
    horn = VehicleHornSportsCar,
    ignitionFail = VehicleIgnitionFailSportsCar,
}
``` just add something like this in the vehicle config and put the custom sound files in the media/sound as .ogg
cosmic ermine
ornate sand
#

After you finish your super car throw together something that sounds like this majestic thing

icy night
#

found some issues with the wine base code

#

still cant get the recipes to work tho lol

wheat blade
#

is there a way to import vanilla animation into blender? or at least a pose of first frame

ornate sand
#

Why did this work for a few attempts and suddenly not anymore?
if weapon:getFullType() == "Base.M60" then
😦

sly monolith
cosmic ermine
#

Anyone know what this is?

ornate sand
#

Engine? For when the hood is open (if animated) or uninstalled?

cosmic ermine
#

How do I make that appear in my model? Do I have to model a separate hood lid?

ornate sand
#

No idea but I know that KI5 had animated parts so it was possible in B41 at least

icy night
#

Can I share a recipe script for someone to look at? is that possible

#

just wondering what Im doing wrong

hallow kayak
#

Dunno why I made this, but I did. God bless the guy who created animation guide.

woeful root
#

How would I be able to make some sort of vehicle armor?

jovial basin
#

So I'm noticing there's no longer highlighted targeting with firearms in B42. While I understand there is a new reticle system for mouse and keyboard, for controller players atm there is no way to figure out which Zed you are targeting with a firearm. Would this be an easy mod to make, to bring back highlight targeting for firearms/ranged weapons? Or am i overlooking a setting they have changed 🤔

#

seems like its only for mele now

cold radish
#

Why does that error message appear after I set wpn:setAttachedSlot(1); ?

bright fog
cold radish
finite scroll
#

yoo how do i add occupational clothing?

cold radish
finite scroll
#

ty

bright fog
#

The red popup is an error

#

It appears in the console

#

Inside %UserProfile%/Zomboid

#

Check console.txt

finite scroll
#

you can also view it by hitting F11 then errors i believe

cold radish
bright fog
#

Yeah but don't start with that menu imo

#

You'll just have trouble navigating it

cold radish
#

I think it's something related to getAttachedItem.

bright fog
#

The exact line

cold radish
#

🤔

dull moss
random finch
#

Not quite sure what is going on here.

  • We know player is not nil.
  • We know self.chatElement is not nil.
  • We know self.chatElement has an object.
  • We know update() is a valid method.
java.lang.RuntimeException: attempted index: update of non-table: zombie.chat.ChatElement@11870995 at KahluaThread.tableget line:1689..
if not self.chatElement then
  self.chatElement = player:getChatElement()
end
self.chatElement:update()

https://projectzomboid.com/modding/zombie/characters/IsoGameCharacter.html#getChatElement()

bronze yoke
#

chat element is not an exposed class

random finch
#

Then why do we get access to the object via getter?

#

Weird

bright fog
#

drugs

#

Yes

#

That must be it

bronze yoke
#

not all getters are for lua

random finch
bronze yoke
#

i just check my decompile, LuaManager.Exposer#exposeAll() lists every exposed class

#

also if you have umbrella it doesn't create class definitions for unexposed classes

random finch
#

I feel like I need to to pickup Umbrella but I keep telling myself, "After I finish this project."

grizzled fulcrum
#

it's not something that would interfere with any projects, since it's an ide extension, so you can install it no problem

bright fog
#

@icy night don't use the report channel to ask for help on craftings

#

Ask here

random finch
icy night
#

I thought food recipes were the simplest scripts to make. Even with b42

finite scroll
#

what fucking piece of shit

#

made the capitalization

#

completely inconsistent

#

why is this an issue that is throughout the entire game

#

just choose one case format

#

and stick with it

#

it's really not that hard

icy night
#

Lol

random finch
bronze yoke
#

they have the entire game decompiled on github? that's not legal 😅

#

in b41 it can be 1 if the player has double sized textures disabled

#

in b42 they removed the option entirely

random finch
#

Interesting, that explains why its not exposed

nimble badger
#

how can I solve attempted index: playSound of non-table: null

lua code I used

require 'ISUI/ISEmoteRadialMenu'
require 'SFsound.txt'

player:playSound(soundname)

bronze yoke
#

i've genuinely never seen a mod that supports non-double size textures and people accidentally turning it off causes a lot of bug reports

random finch
old ginkgo
#

Won’t hurt anything. But it’s pointless.

modern plaza
#

heyoo, I'm looking to code the groundwork for a server economy, useable ATMs.
I checked out an ATM in game in debugger mode, but its parameters seem totally empty, and the item itself seems to be cosmetic.

Does anyone happen to know where I could find the script entailing the ATM entity, or the tile spawn on the map for it?

dapper furnace
#

archivements to project zomboid

nimble badger
modern plaza
#

might anyone know where the ATM is located in the base game files?

finite scroll
#

can packed textures replace ones that are pngs by default?

finite scroll
modern plaza
#

I think the ATM is just fully cosmetic right now lmao

#

hardly any parameters, and they're mostly blank

#

I couldn't find it mentioned in any entities

finite scroll
#

yep its entirely cosmetic tmk

modern plaza
#

but I'm hoping to find the object in the game files, and add an interact button for my own ATM interface

#

I'd just need to find where the ATM is in the game files

#

like the tile entity

#

or even if I could just find the cosmetic skin, I could introduce my own entity and texture it with that ATM

#

might anyone know where the ATM is located in the game files?

bronze yoke
#

it's just a tile yeah

#

the text after tile report is the name of the tile

modern plaza
#

I took that screenshot for the parameters of it

#

but the steam screenshot came out low quality Xd

old ginkgo
#

You can view tilesheets ingame with the brush tool and you can unpack them in tilezed

#

You can also pull its tilesheet info with the brush tool by right clicking it and viewing which tilesheet it’s on.

modern plaza
#

its a 3rd party mod right?

old ginkgo
#

It’s in zomboid modding tools

modern plaza
#

sorry I'm new to project zomboid

#

where can I find the modding tools?

tardy mural
#

How does one add the workshop ID to the mod.info so it shows up in the B42 Modmanager?

random finch
icy night
#

Anyone here know anything about b42's recipes? I got a script I need help with. Its a tool to take food out of cans

tacit pebble
modern plaza
tardy mural
#

Ah I see thank you guys

icy night
#

Only the first recipe works

modern plaza
#

I've got another noob question lol

#

I'm in game in debug mode

#

how do I use modding tools like tilezed?

random finch
modern plaza
#

nevermind I'm goofed

#

yeah I'm installing them now lmao

random finch
icy night
#

Is this the right place to ask for help with scripts?

tacit pebble
icy night
#

Nope, only the first one appear in the crafting table

random finch
tacit pebble
icy night
#

Yes, I was in debug and only the corn showed

tacit pebble
#

😬 stressed

icy night
#

Ive been getting errors all day in between editing the file. Sometimes it prevents me from starting the game because the file is messed up

#

I'll just keep working on it

modern plaza
#

I'm watching a youtube tutorial about tilezed, but it seems to be speaking only about custom made maps made by the user in the map editor.
Does anyone know if I can just load a default map like Muldraugh?

tardy mural
#

Is there a way to allow all books as an ingredient in a crafting recipe? Just like "SharpKnife" accounts for like 20 different knifes without mentioning them all. Is there something similar with book? Because there are like 50 different books or more.

tranquil reef
#

My mod apparently causes thousands of errors on steamdeck but not PC. Anyone know why this could be the case?

quaint cairn
#

Ive been trying to upload my mod to the workshop but it says it doesnt have a mod.info file when it does.

fiery locust
#

Also are the modding tools from steam good or do i need to look on fourms?

quaint cairn
hazy ferry
hazy ferry
fiery locust
#

I am unsure on b42 as ill be waiting

hazy ferry
#

so just create a "common" and a "42" folder and move those files

#

but ideally you'll make copies instead of just moving, that way it works on b41 and b42

#

because what you have is the b41 format

quaint cairn
#

yes i have done that

hazy ferry
#

not B42, just 42

quaint cairn
#

oh fuck

#

im an idiot

#

hahaha

hazy ferry
#

lol, no worries

quaint cairn
#

thank you

cosmic ermine
#

Guys, which parameters do I modify so that the suspension doesn't go so low when braking or stopping?

mass = 1490,
        brakingForce = 120,
        stoppingMovementForce = 4.0f,
        rollInfluence = 0.25f,
        centerOfMassOffset = 0.0000 0.3000 0.1583,
        extents = 2.1167 0.8833 4.1500,
        extentsOffset = 0.5 0.5,
        physicsChassisShape = 2.1000 0.8833 4.1500,
        shadowExtents = 1.6172 4.1464,
        shadowOffset = 0.0000 0.1524,
        maxSpeed = 295f,
        engineForce = 4550,
        engineLoudness = 90,
        engineQuality = 75,
        gearRatioCount = 5,
        gearRatioR = 4.7,
        gearRatio1 = 3.6,
        gearRatio2 = 2.2,
        gearRatio3 = 1.3,
        gearRatio4 = 1.0,
        gearRatio5 = 0.73,
        steeringIncrement = 0.03,
        steeringClamp = 0.3,
        suspensionStiffness = 100,
        suspensionCompression = 1.83,
        suspensionDamping = 1.88,
        maxSuspensionTravelCm = 10,
        suspensionRestLength = 0.20f,
        wheelFriction = 3.0f,
        frontEndHealth = 150,
        rearEndHealth = 150,
        seats = 2,
hazy ferry
#

I havent actually messed with it, but I would guess suspensionCompression

cosmic ermine
hazy ferry
#

what about maxSuspensionTravelCm

cosmic ermine
hazy ferry
#

maybe its just too much mass for that brake force? have you tried lowering both of those a bit?

cosmic ermine
#

Yes.

hazy ferry
#

yeah you've probably tried just about anything I can suggest then tbh

#

one day I'll play with these a bit more, I know these systems need some work

undone elbow
#

Otherwise you are trying to use player that does not exist yet (at the very beginning of the game).

silent zealot
#

Apparently I spent too much time modding and not enough time maintaining my generator.

ornate sand
#

Anyone know what's wrong with this?

if weapon:getFullType() == "Base.M60" then
vivid imp
#

Is the M60 your custom gun?

ornate sand
#

Sure is

vivid imp
#

Hmmm just looks like a simple string check, thats weird

ornate sand
#

The really weird part is that my function got waaaaaay past that one before, until it randomly decided not to

vivid imp
#

Null instance?

tacit pebble
#

Can you print weapon and weapon:getFullType()?

#
if weapon:getFullType() ~= "Base.M60" then
  print(weapon)
  print(weapon:getFullType())
end```
severe jay
#

made this moo... this is my first time using blender. howd i do?

ornate sand
ornate sand
severe jay
#

workin with a buddy of mine to mk a mod pack. it will be out soon. ill keep yall posted

vivid imp
#

Can you make it so the player gets damaged on eating a hot hot pocket

misty horizon
#

im wanting to make the sound of doing something like openeing a door or eating food a meme sound for me and my friends and im wondering how hard it would be to do that for someone who has no experience with modding or scripting

vivid imp
#

Id reccomend looking for sound replacer mods and trying to see how they did it

misty horizon
#

ah thats smart

vivid imp
#

Study the file structure of the base game and also the mods

ornate sand
#

So it's not getType, it's not getFullType so how in the fuuu~ do I make this silly game check the weapon's gosh darn name 😄