#mod_development

1 messages · Page 140 of 1

sour island
#

ah

#

yeah XP logic gets complicated fast - when you start dealing with xpMaps and multipliers

#

So what this does is let you get lost bonus XP from skill books that you leveled out of being able to use?

jaunty marten
jaunty marten
sour island
#

I dont remember when I rewrote SRJ to handle bonus XP / TVXP but what it does is use a modData list of XP

#

the write function just grabs that list and segments it into little bits and manually loops the action to add little by little

#

speaking of which I plan to remove isReadBook and the craft action I'm using

#

it only causes issues seemingly lol

jaunty marten
brave ruin
#

What do you add to your mod pack to add items to zombie loot?

#

Cause it's not in the distributions.lua right?

sour island
#

my mod is a bit of a house of cards cause of it lol

#

I went all in, and made my entire mod work off a decoration to the exposed addXP

#

but it doesn't catch calls made in java - so I use an event for those calls

#

as for the source - I pull the coroutines

#

same way you can get the file name for errors

frank elbow
#

Related to this: decided to write a type stub for the extra Kahlua standard lib stuff. May be of interest to y'all @frank lintel @fast galleon
edit: just noticed the return value is missing from random, oops—returns a number. same for bytecodeloader, which returns function|string?

#

I don't recommend actually using some of these, though (namely: serialize, deserialize, and especially bytecodeloader because package.classpath doesn't exist in PZ)

#

Didn't bother writing an explanation of what they do bc I am lazy 😇

frank lintel
#

swear ya watching me I was just going thru the whole zdoc-lua and replacing all the int/integer/long/doubles for number

frank elbow
#

Oh golly, I just used the alias annotation

frank lintel
#

its all mixed and matched some were Integer some integer etc...

#

but it did get rid of a tons of mismatch warnings though so wasnt pointless

#

I didnt touch any of the fun() args0: <type> though figured they were java calls or something

frank elbow
#

The overload annotations?

frank lintel
#

yeah

frank elbow
#

Gotcha, those are just for overloads of functions

frank lintel
#

I just changed the normal args and returns

#

kinda talked to Nolan also slightly asking about any issues with putting that git page up.

frank elbow
#

Wym?

frank lintel
#

well (e) mighta had one private already..., I dunno just making sure not step on toes

#

plus if there was work already done rather go off that also...

#

Nolan was the last person believe that pushed updates for SS but there was no git page anywhere and SSR way outdated/depreciated

frank elbow
#

Good that you're making sure they're okay w it

frank lintel
#

well trying too atleast... why I just did the git forked off SSR only having the lua stuff not the whole mod but if there was an issue easily just make it private for myself. I like the mod main reason trying to work on it

sour island
#

SSR has a discord server

#

I dont know if there's a github associated with the project

#

nvm, missed that you've talked to him

frank lintel
#

yeah there a SSR git got the wiki on it, SS references back to that but the code is old and not up to date. (plus the name change to SS etc so I just forked under the new name.)

sour island
#

wouldn't it be better to use the current code base?

frank lintel
#

you got a link for the SSR discord Im in the SS one Nolan I think got started

#

well thats why first thing I did was pushed all the new code :)

sour island
#

ah hehe

#

the one I'm in is SS sorry

frank lintel
#

yeah Im in there also if its the same one

sour island
#

Did you rip out all the prints he does?

frank lintel
#

not yet...

#

was thinking putting them on debug...

sour island
#

if they're useful

#

I think he has/had "1" printed

frank lintel
#

yep... I havent done much seriously with it.just cleaning up somewhat, and it might be the hard way learning the whole PZ/lua IDE enivro, language etc so not a bad thing cuz I been muddling thru it

sour island
#

You should tell him to update his repo - would make collabing easier

#

I don't know how he's doing it with the guy that kept working on SS

frank lintel
#

me either why I asked let'm know I forked and updated to current and asked if there any issue with that cuz anyone can look at what Ive done and implement it and also work on it. (that is if nothing new past what was published hasnt been done) one of the reasons not trying anything major just general code cleanup, formatting.... then look all them prints going bybye or toggleable

#

other major reason would be v42...

#

but there been a few things I seen and I was just like 'no' changing this...

#

nolan was the latest addition to the group right? ryuu and others were before that (dunno honestly if anyone working on anything atm)

sour island
#

Nah, other way round

#

Nolan made SS waaaay back when

#

it's undergone a few rolls down the hill as major updates went out

#

at one point he became busy IRL, and Ryuu started releasing updates

#

I believe he's the one that released an update as it's own mod every few weeks?

#

in any case, I think Nolan came back and the two agreed to collab

frank lintel
#

dunno we'll see I guess.

brave ruin
#

I am trying to make custom item, but I cannot spawn them in or can't find them. I don't see any errors in the F11 window. What can I do to see what's wrong?

drifting ore
#

function TEST() for playerIndex = 0, getNumActivePlayers()-1 do local player = getSpecificPlayer(playerIndex); local roll = ZombRand(1,100); if roll == 1 then getPlayer():Say("*TEST GOOD*"); else getPlayer():Say("*TEST BAD*"); end end end Events.EveryDays.Add(TEST);

Does this event trigger in MP for every player with different roll?

frank lintel
#

if its running client side would think so.

drifting ore
#

thanks, seems logical when I think of it now

weak sierra
#

question: does IsVehicleIntersecting not work properly if called on the server? like.. are BaseVehicle instances not loaded on the server as cells are loaded, only on clients?

bronze yoke
#

vehicles definitely exist on the server

weak sierra
#

then why, when called on the load grid square event, does the server seem to never detect vehicles intersecting the square

#

perhaps it is pre-empting the vehicle loading?

clever spruce
#

does anyone know how to contact Brita or Arsenal[26]?
I can not leave a comment on the arsenal mod workshop page to inquire about a missing feature that is available in SP but not in the server sandbox settings. I do not have the option to send spent brass directly to a players inventory in MP. the option is not present in the sandbox settings in MP. >_<

drifting ore
#

yo is it possible to change the zombie models?

glass basalt
clever spruce
#

.>

#

I mean..

#

I love both arsenal and Brita's work, and usualy throw money at mod makers who's content I like....

#

but....

#

<.<

#

eh, who am I kidding, I was guna sub to their patreon the other day anyway.

#

w<

rancid panther
#

probably cuz their mods r so high profile

clever spruce
#

Well, I subbed. 😄

keen silo
drifting ore
clever spruce
drifting ore
#

the survivor one exists, but not the zombie one

#

wait it does exist

#

aw but it needs the fuckin survivor one

rancid panther
#

u can still do it without it. that mod just doesnt

#

there's also a mod that makes special zombies

frank lintel
#

aw drunk

red tiger
#

Hi.

frank lintel
#

lol

red tiger
#

Actually drunk

frank lintel
#

same... burble burble

#

listening to the spring peepers going nuts in the marshland/creek and thinking on where to go on survivor...

red tiger
#

Was just watching a streamer react to the newest Jubilee video.

frank lintel
#

I cant do them.

red tiger
#

I spent like 18 hours coding this weekend.

frank lintel
#

Im gonna watch someone reacting to something it will be myself at myself later all drunk and just 🤣 at myself

#

thats okay you know what I been teeeding thru

keen beacon
fading horizon
#

i have returned 😈

#

back to working on my new mod

rancid panther
#

what's it gonna be

fading horizon
#

vapes

#

gnome ||//elf//|| bars

#

i am really struggling making this 3d model with all the curves lol

frank lintel
#

a²+b²=c²

clever spruce
#

I tried wiping chunks that were in the black area off the map, whee, in my game, there actually IS map, and instead it wuped the same amount but from the edge of what map it shows DOWN> I wiped the entire base my friends and I had built and ended roling the servr back like, 9 hours. :/

ancient grail
#

shout out @wet sandal congrats man

#

i just saw your mod

rancid panther
#

insane mod

drifting ore
#

yea very nice. very popular

rancid panther
#

i saw the grid based inventory thing in progress too

#

gonna be crazy paired with the weapon modifiers mod

fervent raven
#

has anyone recreated hogwarts yet?

#

cause if not im gonna be the first to do it

old crescent
#

any recommendation for lua compilers?

bronze yoke
#

what do you mean? lua isn't a compiled language

frank lintel
#

you mean like a test compiler?

fading horizon
#

can I make a recipe use the eat animation?

#
item GnomeBar
    {
        DisplayCategory               =     Junk,
        Weight                        =     0.05,
        CantBeConsolided              =     true,
        UseWhileEquipped              =     FALSE,
        Type                          =     Drainable,
        DisplayName                   =     Gnome Bar,
        Icon                          =     defaultIcon,
        StaticModel                   =     defaultIcon,
        WorldStaticModel              =     defaultIcon,
        ReplaceOnDeplete              =     GBEmpty,
        UseDelta                      =     0.25,
    }```
#

I have this item

#

I want it to be a drainable that can be used that doesn't produce another item

#

so i made a recipe as so

#
recipe smoke gnome Bar
    {
        keep GnomeBar,

        Result:             GnomeBar,
        onCreate:           OnEat_Cigarettes,
        Time:               50,
        RemoveResultItem:   true,
    }```
#

i thought setting oncreate might make it use the eat animation but it didn't

#

i'm kinda lost and don't know if i'm approaching the entire structure correctly, though

#

I wanted to try to look at how pills function in the game since theyre a drainable that can essentially be eaten, but I cannot find the functions and searches here say theyre in the java code instaed

keen beacon
old crescent
frank lintel
#

if ya dont need it in the ide could just use an online one.

dark wedge
fading horizon
#

that worked

#

thank you

clever spruce
modern hamlet
fading horizon
#

it appears there's no sound at all when the recipe is made

ancient grail
#

was there any road blocks on your vanilla vehicle armor project ? @bronze yoke also was it anonymous that also attempted this

rancid panther
bronze yoke
#

i haven't heard from the modeller in a while so the project is basically dead

dark wedge
#

"Saw Logs" has:
Sound:Sawing
So something like that

bronze yoke
#

codewise it was in a pretty good state, i never got around to implementing some of the fancy new stuff we came up with but the main stuff was near complete and polished

fading horizon
#

so then i would just drop a .ogg file in the /sounds folder

#

and I can just reference that?

dark wedge
#

i believe so, yes

fast galleon
bronze yoke
#

maybe i'll talk to him about releasing what we did have done

#

i'd still have a lot of work to do before release but it'd be a waste to leave it to rot

fading horizon
#

is there a way to remove the "all" option

#

AllowOnlyOne : true,
in the recipe definition did not work

ancient grail
#

was it manual tho

#

or you had a way to automate it

#

and did it involve modelling?

bronze yoke
#

i don't really know what you mean by was it manual

#

but it definitely involved modelling

small topaz
#

Hi! I am thinking about working on a mod of mine an adding new sprites. Does anyone knows a web resource for this which maybe a good starting point?

fast galleon
small topaz
cursive coral
#
table.insert(VehicleDistributions.GloveBox.items, "1_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 50)

I want it to come out with 50% probability, I'm not sure if it's true?

bronze yoke
#

it's not exactly 1:1 like that because of the loot rarity sandbox option stuff

#

you can see how common something will be as a percentage in lootzed

cursive coral
#

Ohh thanks my friend

ancient grail
#

@sour island

#

idk what to do with this guy hahah

ancient grail
rancid panther
fading horizon
rancid panther
#

what does the script for ur item look like rn

fading horizon
#
item GnomeBar
    {
        DisplayCategory               =   Junk,
        Weight                        =   0.05,
        CantBeConsolided              =   true,
        UseWhileEquipped              =   FALSE,
        Type                          =   Drainable,
        DisplayName                   =   Gnome Bar,
        Icon                          =   defaultIcon,
        StaticModel                   =   defaultIcon,
        WorldStaticModel              =   defaultIcon,
        ReplaceOnDeplete              =   GBEmpty,
        UseDelta                      =   0.25,
        EatType                       =   Cigarettes,
        CustomEatSound                =   ecig,
    }
#
recipe Smoke
    {
        GnomeBar,

        Result                  :     GnomeBar,
        Time                    :     125,
        RemoveResultItem        :     true,
        MaxItems                :     1,
        AnimNode                :     Eat,
        Sound                   :     ecig,
        AllowOnlyOne            :     true,
    }
rancid panther
#

whay does MaxItems do

fading horizon
#

nothing

#

code that i was testing that didn't work

#

just hadnt removed it yet lol

rancid panther
#

do u need it if u have allowonlyone?

fading horizon
#

neither of those parameters do anything

rancid panther
#

it could still be read

#

i didnt see maxitems in the script guide

#

too bad im not on my pc or i'd be skimming through things rn

fading horizon
#

ill try without maxitems

#

nope, didn't work

#

still has an "all" option

fast galleon
#

I think you want to make a context option instead of a recipe.

fading horizon
#

can i link animNode and custom sound to a lua callback function that a new custom context menu would create?

#

because I was using it as a recipe so I could use those parameters

fast galleon
#

You should be able to do all of that in a timed action.

#

I look at cigarette now and it has CustomContextMenu in script.

#

not sure I've seen that before

fading horizon
#

that parameter only works on food items unfortunately

fast galleon
#

I mean, you could make it food and add poison value.

fading horizon
#

i want it to be a drainable item so it can't be a food :/

#

needs to have more than one use

fast galleon
#

food have more than one use, eat percent

viral notch
#

how to make option to hide pants to shoes and on shoes?

fading horizon
#

theres an eat percent parameter?

#

i haven't seen that

fast galleon
#

I saw that in the eat action, might not be what is used in the script.

chrome egret
#

Whoever you are... I just wanna talk...

wheat kraken
chrome egret
#

Yeah, I don't have real hard feelings about it

sour island
#

Only one action for you to take. Delete and republish.

chrome egret
#

lol

sour island
#

Also if it doesn't break 5% I wouldn't worry

chrome egret
#

I'm really not. Back in the day when I had no star rating I was a little more miffed

#

Now it's just funny that only one person disliked it enough to give it a negative rating

sour island
#

I've had people curse me out and swear this mod off

#

Still at 2%

#

The loudest group is always the minority

chrome egret
#

lmao

#

"These 4,845 people are just wrong"

sour island
#

I usually don't check these stats -- was there another player bump?

#

The sub counts are super different within a couple months

chrome egret
fresh ice
#

Hello! I'd like to take a look at making a small mod with some retextured (though separate) items. The retexturing part I can figure out, but I'm a little more confused about how to implement the mod. Would it be possible to get a little help in that regard?

fading horizon
#

i'm so confused

#

why is it putting my arms up instead of the eat animation

#
function hitVape:start() -- Trigger when the action start
    print("Action start");
    self.character:getEmitter():playSound("ecig")
    self:setActionAnim("CharacterActionAnims.Eat")
end```
misty pecan
# fading horizon

Hm…maybe check see if the code is checking a different line instead or maybe check see if a conflicting mod has the same sort of code and it’s causing a bit of a bug

fading horizon
#

no other mods active

misty pecan
fading horizon
#

so no animations seem to be working actually

#

i tried to replace it with the dig animation and that doesn't work either

#

i'm lost

hot patrol
#
    {    
        Tissue/ToiletPaper/PaperNapkins,
        HottieZ/OppaiZ/177013,
        MapleSyrup/Pie/Toothpaste/Soap/Butter/Sausage/Grapefruit/Banana/Eggplant/Zucchini/MayonnaiseFull,

        Result:Tissue,
        Time:10,
        IsHidden:true,
        OnCreate:Recipe.OnCreate.FapTime,
        AnimNode:BuildLow,
        NeedToBeLearn:false,
        CanBeDoneFromFloor:true,
        Sound:PageFlipMagazine,
        Prop1:Source=1,
        Prop2:Source=2,
    }
        
    recipe Rub one out
    {    
        Socks_Long,
        HottieZ/OppaiZ/177013,
        MapleSyrup/Pie/Toothpaste/Soap/Butter/Sausage/Grapefruit/Banana/Eggplant/Zucchini/MayonnaiseFull,

        Result:Socks_Long,
        Time:10,
        IsHidden:true,
        OnCreate:Recipe.OnCreate.FapTime,
        AnimNode:BuildLow,
        NeedToBeLearn:false,
        CanBeDoneFromFloor:true,
        Sound:PageFlipMagazine,
        Prop1:Source=1,
        Prop2:Source=2,
    }```
#

don't judge me

#

every day I stray further from gods light

misty pecan
misty pecan
hot patrol
misty pecan
hot patrol
#
    local stats = player:getStats();
    local bodyDamage = player:getBodyDamage();

    stats:setStress(stats:getStress() - 0.5);
    if stats:getStress() < 0 then
        stats:setStress(0);
    end

    stats:setFatigue(stats:getFatigue() + 0.33);
    if stats:getFatigue() > 100 then
        stats:setFatigue(100);
    end

    bodyDamage:setBoredomLevel(0);

    stats:setThirst(stats:getThirst() + 0.15);
    if stats:getThirst() > 100 then
        stats:setThirst(100);
    end

    stats:setHunger(stats:getHunger() + 0.09);
    if stats:getHunger() > 100 then
        stats:setHunger(100);
    end

    bodyDamage:setUnhappynessLevel(bodyDamage:getUnhappynessLevel() - 75);
    if bodyDamage:getUnhappynessLevel() < 0 then
        bodyDamage:setUnhappynessLevel(0);
    end

    stats:setEndurance(stats:getEndurance() - 0.25);
    if stats:getEndurance() < 0 then
        stats:setEndurance(0);
    end

    player:getXp():AddXP(Perks.Strength, 100);
    player:getXp():AddXP(Perks.Fitness, 100);
end```
misty pecan
#

Hm

hot patrol
misty pecan
hot patrol
#

I'm not even getting the cotext menu actuon for it with all the recipe options in my inventory

misty pecan
#

Probably has a function that relies on something in the mod

misty pecan
#

Seems like you’re missing pieces there

hot patrol
#

I am. And I don't think anything else from the mod is needed. From what I can tell it's a bog standard crafting recipe that uses that oncreate for all the stat changes

#

eveything else is just for their book added

#

and distribution

#

and this is their recipies recipe

misty pecan
neon bronze
#

Do you require recipecode?

hot patrol
#

the crafting menu itself does

#

but the context menu option when right clicking isn't giving the option

hot patrol
neon bronze
#

I mean do you have require „recipecode“ in your file?

wet sandal
#

scrolls up and reads code

#

This is an important QoL feature

#

And that gif is too visually loud

hot patrol
misty pecan
ancient grail
#

Restorable powergrid

misty pecan
neon bronze
misty pecan
#

I want to work on it myself but

#

I use a MacBook ded

hot patrol
#

or is that just me

misty pecan
#

And the tools for modding don’t work on there

misty pecan
wet sandal
#

The Last of Us is almost out on PC

#

Got a Susceptible update lined up to celebrate

hot patrol
ancient grail
#

Long time ago. One of my first commission projects
Back when i was still solo

hot patrol
#

I suggested this!

misty pecan
#

You sir or ma’am

fading horizon
hot patrol
#

That will up my TLOU save so much

misty pecan
#

Have my respect

fading horizon
#

that's an hour down the drain

ancient grail
#

Thnx
Join our discord

#

Links on my profile

hot patrol
#

like is it just random per house or do corpses in houses cause it like in the game?

ancient grail
#

Thnx notloc bro

#

Saw you hopped in

wet sandal
#

Zombies contribute to contaminating a room, skeletons contribute to holding the current contamination level

#

Buildings slowly diffuse the contamination throughout themselves

#

Only loaded buildings are updated

#

Updates are time weighted based on last update time

ancient grail
#

Oops

wet sandal
#

lol

misty pecan
wet sandal
#

Contamination slowly goes down when there is nothing in a room contaminating it

hot patrol
wet sandal
#

Oh, zombie corpses also cause contamination as well

open drum
#

ello guys~! could someone help me with OOP problem Im having??

misty pecan
#

Dude I’m just happy I can finally fix the fucking power grid now

#

I literally have something to do late game besides just burn Louisville to the ground

open drum
#
function MyUI:create()
local btnWid = 175
    local btnHgt = FONT_HGT_SMALL + 2 * 4
    local padBottom = 10
    local texture = {}
    
    self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture("media/ui/mag/pic1.png"));
    -- self.image.scaledWidth = self:getWidth()
    --self.image.scaledHeight = self:getHeight()
    self:addChild(self.image);
    


    self.cancel = ISButton:new(self:getWidth() - btnWid + 55 , self:getHeight() - padBottom - btnHgt, btnWid*0.5, btnHgt, "cancel", self, MyUI.onOptionMouseDown);
    self.cancel.internal = "cancel";
    self.cancel:initialise();
    self.cancel:instantiate();
    self.cancel.borderColor = self.buttonBorderColor;
    self:addChild(self.cancel);


end```
#

i made this to run when a player open a magazine

ancient grail
#

Ahhh UI im out

open drum
#

XD

ancient grail
#

Not my forte

open drum
#

im trying to make that "getTexture" to varie

#

depend on the item

#

a player open

#

what will be the best way to do that..

hot patrol
fading horizon
#

how do I make a lua function reduce the number of uses an item has?

I'm making a custom timed action.

I assume it would be under

function hitVape:perform() -- Trigger when the action is complete
    --print("Action perform");
    ISBaseTimedAction.perform(self);
end```

I just don't know the code to actually reduce the number of uses
wet sandal
#

The first update of the house will treat that as several days and it will be contaminated as a result

fading horizon
#

self.item something something

hot patrol
#

gotcha

fading horizon
ancient grail
#

You could on the update()

wet sandal
ancient grail
#

Gradually reduce the thing and have a check if its empty

wet sandal
#

That way you can use it to determine what texture you want.

open drum
#

yea i thought about it

#

but how would i do that?

#

can i just do

fading horizon
open drum
#

function MyUI:create(result)?

fading horizon
#

i'm still pretty new to this

wet sandal
#

assuming result is the item, yea

open drum
#

it just inherites it?

wet sandal
#

lua has no restrictions on parameters

open drum
#
function OpenmagZ_OnCreate(items, result, player)

    local myUI = MyUI:new()
    myUI:initialise();
    myUI:addToUIManager();

end```
#

so parameter of "result" from that function

#

can b called

#

right away at

#

function MyUI:create(result)?

#

is it cuz they are in the same lua file?

wet sandal
#

Uh, not really

#

I was thinking like:

ancient grail
# fading horizon i don't know how to reduce it in general is the issue
-- Fill entirely the blowtorch with the remaining propane
function Recipe.OnCreate.RefillBlowTorch(items, result, player)
    local previousBT = nil;
    local propaneTank = nil;
    for i=0, items:size()-1 do
       if items:get(i):getType() == "BlowTorch" then
           previousBT = items:get(i);
       elseif items:get(i):getType() == "PropaneTank" then
           propaneTank = items:get(i);
       end
    end
    result:setUsedDelta(previousBT:getUsedDelta() + result:getUseDelta() * 30);

    while result:getUsedDelta() < 1 and propaneTank:getUsedDelta() > 0 do
        result:setUsedDelta(result:getUsedDelta() + result:getUseDelta() * 10);
        propaneTank:Use();
    end

    if result:getUsedDelta() > 1 then
        result:setUsedDelta(1);
    end
end
#

heres a vanilla reference

wet sandal
#
function OpenmagZ_OnCreate(items, result, player)

    local myUI = MyUI:new()
    myUI:initialise();
    myUI:create(result);
    myUI:addToUIManager();

end
ancient grail
#

just do the reverse

#

if you want it to last longer then add decimal places

open drum
#

hmm

#

so myUI:create(result) don't need to go under myUI:initialise(() ?

#

but even if I do create(result)

#

ill have multiple lines of ```lua
function MyUI:create()
local btnWid = 175
local btnHgt = FONT_HGT_SMALL + 2 * 4
local padBottom = 10
local texture = {}

self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture("media/ui/mag/pic1.png"));
-- self.image.scaledWidth = self:getWidth()
--self.image.scaledHeight = self:getHeight()
self:addChild(self.image);



self.cancel = ISButton:new(self:getWidth() - btnWid + 55 , self:getHeight() - padBottom - btnHgt, btnWid*0.5, btnHgt, "cancel", self, MyUI.onOptionMouseDown);
self.cancel.internal = "cancel";
self.cancel:initialise();
self.cancel:instantiate();
self.cancel.borderColor = self.buttonBorderColor;
self:addChild(self.cancel);

end```

#

for each texture / item i want to show?

hot patrol
#

I'm not proud of the abomination I have created

#

I plan on it

#

the only issue is it doesn't seem to drain contents of stuff like the mayo

#

not sure how to do that

#

so I guess you put back in the jar when you are done

#

also I actually called it crunchy long sock

open drum
#

does any one know what type if data is returned in function OpenmagZ_OnCreate(items, result, player)
"result"

#

is it a string of recipe result item? or display name? item name"""

neon bronze
#

I think its the item which is the result of your recipe so maybe IsoItem if it exists?

open drum
#

i guess best way to find out is to use print(result)

#

oh

neon bronze
#

Maybe typeof(result)?

open drum
#

so item name right? not displayname

#

yea, ill try typeof(result). sigh...coding is so hard...

fast galleon
#

recipe result on create should be an InventoryItem

open drum
#

so for instance

#

Base.Apple

#

that's item name

#

Apple is displayname

#

then result will be... which one?

#

or neither?

neon bronze
#

It will be an instance of InventoryItem as its type

#

You could then access its names through :getType and :getDisplayName

open drum
#

ah so neither.. that will b like one of those lua table code

#

yea, getDisplayName will b a way to do it

#

thanks

fast galleon
#

InventoryItem is a java class, userdata in Lua.

#

display name should change with language setting?

#

maybe you want getType

open drum
#

i see

#

haven't tried using getType

#

so ill see how it works

#

is return value of getType be diff. for each item a player has?

#

or will it work like.. kitchen knife, butter knife, and hunting knife all are type knife

neon bronze
#

It returns the items name as is defined in its .txt file

#

So if you have Base.Knife it will return Knife

sour island
#

Result is the resulting iventoryItem yes

#

Items should also be an array of inventoryItems if I'm not mistaken

#

Some of the Lua functions tied to recipes use the Item (script object) in reference to items.

#

Also get type only returns the item type -- which is fine but you may want to take module.type into consideration.

#

Depending on what you need this for.

drifting ore
#

player:playSound(sound); only plays sounds for the player an others can't hear it, right? But how can I make so sounds play for everyone?

neon bronze
#

You need to get the emitter

#

I think its through player:getEmitter() i don remember exactly

#

But you need the emitter

drifting ore
open drum
open drum
open drum
#

so ill need to use maybe display name of the item

sour island
#

Ah, yeah displayname is what you'd need

neon bronze
#

Use rather getType or getFullType

#

Display names could be changed by players or by translation

open drum
#

that's also true

#

good point

sour island
#

I assumed you wanted to display the items name

#

If you need to get the items texture or a texture consistent to the type then yes- module type or type is better.

red tiger
#

Good afternoon.

fast galleon
red tiger
#

For 15 minutes.

#

Been feeling sick.

#

Completely forgot about my work here.

fast galleon
#

get better 👍

open drum
# sour island I assumed you wanted to display the items name

what i wanted to do is

  1. make a recipe that allow player to pull out a page from a magazine (easily done)
  2. Each page that is pulled out has it's own UI when opened (oncreate recipe) it shows up a UI with a .png picture , hence "Texture"
  3. since making "if"statements for all pages would make the code redundant, i wanted to make a function that would check the name of the "page" and designate "texture" that matches the "page" item which will show up the UI picture I set.
#

but since i suck at oop hierarchy my head is getting dizzy and starting to feel sad XD

neon bronze
#

Do you make every page unique in its name?

#

You probably do tbh

open drum
#

yea

#

like "item page1 , item page2 , etc... "

neon bronze
#

You could put them in a lua key value table and then just call the texture you need for each page

open drum
#

then in recipe i made "recipe rip a page out"

#

which do a zombierand

#

and additem() to the player inventory

neon bronze
#

Tbf it could be even easier if you name the textures something like page1, page2 etc

open drum
#

a random page

neon bronze
#

Just get the pages type and parse it into the ISImage:new

open drum
#

hmm?

#
function MyUI:create(result)
local btnWid = 175
    local btnHgt = FONT_HGT_SMALL + 2 * 4
    local padBottom = 10
    local texture = {}
    
    self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture("media/ui/mag/pic1.png"));
    -- self.image.scaledWidth = self:getWidth()
    --self.image.scaledHeight = self:getHeight()
    self:addChild(self.image);
    


    self.cancel = ISButton:new(self:getWidth() - btnWid + 55 , self:getHeight() - padBottom - btnHgt, btnWid*0.5, btnHgt, "cancel", self, MyUI.onOptionMouseDown);
    self.cancel.internal = "cancel";
    self.cancel:initialise();
    self.cancel:instantiate();
    self.cancel.borderColor = self.buttonBorderColor;
    self:addChild(self.cancel);


end```
#

self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture("media/ui/mag/pic1.png"));

#

is this what u mean?

#

i have pic1, pic2, pic3 etc

#

saved in a folder

#

just need to find a simple way to replace that pic1.png pic2.png

#

depending on the page item a player has

sour island
#

You can concat a random number to a string of the textures are named accordingly

#

"page" .. n .. ".png"

open drum
#

right

neon bronze
#

So you would call item:getType() + „.png“

open drum
#

oh ...

#

wait..

#

yea...

neon bronze
#

Obviously you still need the path but you just add that before the call

open drum
#

are u guys geniuses?

neon bronze
#

Too much free time and too socially inept

open drum
#

i wonder if something like self.image = ISImage:new(self:getWidth()0.001, self:getHeight()0.001, 0, 0, getTexture(""media/ui/mag/" ... n ... ".png""));

#

would work..

sour island
#

It would, I don't think you need the items type unless the page is specific

open drum
#

and "n" being item name

neon bronze
#

Just put .. instead of …

open drum
#

yea haha

sour island
#

I was thinking n was a random number 😅, but yes you can do it that way

#

You can concat both

#

As long as the texture is found

open drum
#

true true

sour island
#

You can also include a default texture if the other isn't found

#

Also I don't know if this is possible but you should try to store the textures when able

#

In a keyed table

open drum
#

im still learning about table

#

i really am bad at it

neon bronze
#

Are there actual lists in lua? Or is it all tables?

open drum
#

i think they are all tables

#

ok now.. check this out

#
function OpenmagZ_OnCreate(items, result, player)

    local myUI = MyUI:new()
    myUI:initialise();
    myUI:addToUIManager();
    MyUI:create(result);

end```
#
function MyUI:create(result)
local btnWid = 175
    local btnHgt = FONT_HGT_SMALL + 2 * 4
    local padBottom = 10
    local texture = result
    
    self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture(""media/ui/mag/"..texture..".png""));
    -- self.image.scaledWidth = self:getWidth()
    --self.image.scaledHeight = self:getHeight()
    self:addChild(self.image);```
sour island
#

They're tables, keyed or not(*)

#

By default the keys are 1,2,3,etc

neon bronze
sour island
#

But you can ascribe other stuff as keys even other tables

open drum
#

local texture = result:getType() ?

#

like that?

neon bronze
#

Yea probably

#

I dont know how you named your textures doe

open drum
#

ill have to find out ... depends on the return value of getType()

neon bronze
#

You can print the texture to get the idea

open drum
#

good idea

fresh ice
open drum
#

self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture(""media/ui/mag/"..texture..".png""));

#

i don't think ) is needed

#

don't u guys agree?

fast galleon
#

too many quotations?

misty pecan
fresh ice
#

ah

misty pecan
#

I want to put in more than just code I need models

#

Cause I wanna make like an entire hydro plant

red tiger
#

You can use ' for strings in Lua too.

open drum
#

well.. problem ...

#

function MyUI:create(result)

#

the "result" is returning nil

#

so.. caused error in Texture variable

humble oriole
#

hmmm, can you not DoParam on multiple fields for an item?

#
adjustments["Base.Honey"] = "Calories = 220"
adjustments["Base.Honey"] = "Carbohydrates = 63"```
#

only the Carbohydrates line is being applied

#

oh, I'm stupid, nvm

#

adjustments["Base.Honey"] = { "HungerChange = -18","Calories = 220","Carbohydrates = 63" }

sour island
red tiger
#

Might spent an hour or so on writing a third attempt on a solid formatter for ZedScript.

hot patrol
#

what is the time in recipe measured in? i'm trying to match it to a 10 second sound

fervent raven
#

im gonna make a themepark resort thing

red tiger
#

I wonder how big of a mod it would be to fully implement rollercoasters in PZ.

fervent raven
#

probably big as hell

#

like bending car physics beyond what they need

red tiger
#

It'd be fun to watch people play RCT in PZ.

#

Would be funnier to override zed AI and turn them into park guests.

keen silo
#

Hey everyone, Im working on my voiced radio and tvs mod, and I want some guidance. Im not from the US, and not know many radio hosts. Im trying to voice the lines of LBMW host Jackie Jaye. Does anybody know of a famous, easily recognizible female radio host to use for voice cloning in ElevenLabs ? I'd like to use real people for certain repeat characters.

#

It doesn't necesarilly have to be a radio host, but try to keep it in that field of expertise (reporter, show host, etc.), and easily recognizable.

fleet geode
#

How do edit a bags capacity? I like the look of the duffel bag more than the military bag and would like to swap em.

ancient grail
ancient grail
ancient grail
#

Should iterate if you plan to do alot of it

fleet geode
ancient grail
ancient grail
fleet geode
#

Thanks! I feel like I’ve looked all over and couldn’t find anything. So I came to the discord in hopes to figure it out.

ancient grail
#

Here

fast galleon
ancient grail
#

Basically do param rewrites the item script
So every other item that will spawn ingame will inherit the changes you made

fast galleon
#

just make a new bag

ancient grail
#

Lol or thaat

fleet geode
queen sail
#

Can you change the number of points that a skill gives or costs in something like the INI or config?

ancient grail
queen sail
#

Is it as simple as changing a single value somewhere?

ancient grail
#

Can you clarify
What points and whats skill? Perks?

#

There arr no skills in the game
We have trait perks profession

#

And whats points
Experience? Level?

#

Or the one u use for adding traits

#

That one i think u can modify

red tiger
#

Chose to write a shallow, decoupled recursive de-serializer solution for my formatter alongside my deep de-serializer API.

ancient grail
red tiger
#

Probably somewhat like Fenris_Wolf's Python 3.0 one. Not referencing it.

#

My tokenizer preserves comments and empty lines.

#

Going to also write configurable settings for the formatter, such as inline vs next-line brackets.

#
module foo {
}

vs

module foo
{
}
#

Also trying to keep the API open to selection formatting. Not sure how to do that yet. =(

fervent bay
#

is there a good tutorial anywhere about making mods for b41? i want to ATTEMPT to make an npc mod

red tiger
#

ooooooooo

#

Found another logic bug in my tokenizer.

#

I add inline comments as a token prior to the bit that comes before it. >_>

frank elbow
fervent bay
#

ah thanks

wheat kraken
#

i did a new analysis and 2 new sheet from the data i gathered this month
here the results

per person top 50:
"how many
participations
in mods 5-stars" modder
39 KI5
26 iBrRus
24 HelloWorld
20 MrDanny
20 soulfilcher
18 star
17 fhqwhgads
17 planetalgol
15 cyt
14 NoctisFalco
14 shark
14 布偶旧猫
13 Chuckleberry Finn
13 nolanritchie
13 Tchernobill
12 Authentic Peach
12 Blackbeard
12 Oh God Spiders No
11 Alec
11 Erin Azakaela Redfire
10 Eggon
10 Monkey
9 eris
9 Johnny Dollar
9 Orc
9 Woldren
8 Aiteron
8 Yeah
7 AuD
7 BitBraven
7 Champygnakx
7 djvirus
7 Gabester
7 Notloc
7 PePePePePeil
7 Skizot
6 (PlentyT)
6 co`
6 Fedia
6 KONIJIMA
6 Madman_Andre (GNU Rick May)
6 Mx
6 Myloo
6 PseudonymousEd
6 RH4DB4
6 spoon
6 Troy Mc'Clure
5 [TECT$ECore] Olipro
5 Afterworlds

big view:
aparisons amount of modders
1 482
2 117
3 36
4 26
5 22
6 11
7 8
9 4
12 3
13 3
14 3
8 2
10 2
11 2
17 2
20 2
15 1
18 1
24 1
26 1
39 1

red tiger
#

As always, my "1 hour session" turns into a 5 hour session.

red tiger
#

Upload it as a file. You can convert your copied text to a file somewhere near the text input.

wheat kraken
#

aah nice! the expand option, well noticed, i forget about this discord feature

#

is that content text input searchable/indexed by discord search?

red tiger
#

Getting there with the formatter. =/

#

Lots of fun things to fix / improve.

open drum
#

@sour island I also found a bug in your shops and traders mod by the way. Wrote a comment explaining the situation for you to reproduce

sour island
#

There's no resulting item if that param is true

#

Oh? thanks

open drum
#

yea the cash dissappears

#

let me know if the explination isn't clear

sour island
#

That's on the top of my list - I'm working out an outline for an update to the mod

open drum
open drum
#

luv the shop and traders mod so much

#

has a huge potential

sour island
#

You can help by telling me how it can be easier to use 😅

#

Being I wrote it, it all makes sense to me

#

If you want to put it here - it will be easier for me to look over

open drum
#

easier to use? i think the mod is pretty much straight forward. didn't have trouble finding out how to work with it

open drum
fading horizon
#

created my first custom timed action

open drum
#

oh dang!

open drum
fading horizon
#

tyty

#

it has a custom sound too

open drum
#

oh dang

fading horizon
#

finishing up the 3d model and texture right now

#

i'm excited

open drum
#

does it also heard from other players??

fading horizon
#

i have no idea actually

#

i don't play multiplayer

open drum
#

i tried to add a sound that would also b heard to other players

#

but failed XD

#

ah i see i see

fading horizon
#

you're welcome to try it when it comes out if you'd like

#

i would but i don't have ppl to play multi with lol

open drum
#

haah

fading horizon
#

i think it should work tho?

open drum
#

i would gladly try it

fading horizon
#
function hitVape:start() -- Trigger when the action start
    --print("Action start");
    --self.character:getEmitter():playSound(self.smokeSound)
    if self.smokeSound ~= '' then
        self.soundChannel = self.character:getEmitter():playSound(self.smokeSound);
        addSound(self.character, self.character:getX(), self.character:getY(), self.character:getZ(), 7, 1)
    end

    self:setAnimVariable("FoodType", "Cigarettes")
    self:setActionAnim(CharacterActionAnims.Eat)
    
end```
#

self.character:getY(), self.character:getZ(), 7, 1)

open drum
#

yea i think using emitter

fading horizon
#

this sets a sound radius

open drum
#

it suppose to work

fading horizon
#

so i would assume others would hear that

open drum
#

yea

fading horizon
#

its all coming together yea

open drum
#

electronic smoke?

fading horizon
#

yess

open drum
#

nice

red tiger
#

I feel so close to getting my formatter working on a basic capacity but..

#

2 hours of wrestling with an unknown artifact in a couple spots prevented me from getting it done tonight.

frank lintel
#

there can be only one...

red tiger
#

Going to take a look at possibly building a tokenizer for the formatter specifically..

#

... Another day.

fading horizon
#

it workssssssssssss

glass basalt
#

Are you planning on implementing every kind of nic stick out there? Lol

cosmic condor
#

lives up to his name drunk

fading horizon
#

Just these

#

Now I'm trying to figure out how to assign random names and textures when they are spawned in

ancient grail
#

@tepid edge
Wow congrats on your new found skill
Was it you who was trying to figure out the item consumption thing? How did that go for you?

ancient grail
rancid panther
#

@/maemento mori congrats on front page!

rancid panther
#

is there a function that tells you when a player shoots at/hits a window? or one that defines a window as shootable/breakable?

small topaz
#

really funny. there are quite a few mods related to food preservation which have been published during the last week. seems to be the case that some modders had similar ideas independent of each other.

fast galleon
#

will the render depth factor allow for vehicles you can walk inside of?

fast galleon
#

or it's like mobile games, somebody makes one and then there are a dozen clones

small topaz
#

ya... I think that food preservation and more interesting long term survival is something which is really necessary for the game. In current vanilla, you could simply try to settle somewhere in wilderness and then spam cabbages via farming. Would be nice to have different ways for long-term survival and ideally, without being able to farm during winter. So it's a good think that modders start addressing this issue imo.

old crescent
#

is there anyway to remove specific item in the world ??

#

like existing world

fast galleon
#

Do you have the item already?

#

I think people have been mentioning the ISRemoveItemTool removeItem

#

you could check that function

red tiger
#

Good morning.

chrome egret
#

Mornin' Jab

frank lintel
#

btw cant you just keep food fresh/frozen by using a gen and a fridge/freezer?

fast galleon
#

Do media lines only apply effects once? Is there an easy way to have lines that coold be used in a loop for small buffs?

wheat kraken
#

more data sharing
PZ getting bigger and bigger waves of growth since 2021 [B41 multiplayer release]

sullen thicket
wet sandal
#

Invest heavily in Spanish mod translations

sullen thicket
#

KEKW

#

Much spanish players dont even know that pz have mods XD

sullen thicket
red tiger
#

Heheh..

#

Could make a tool that scrapes public portals for popular translators to have "fill-in" translations.

frank lintel
#

It is what it is, trust me you get what you give.... yeah. you gotta come to my side and see how we live.. yeah.

red tiger
#

I experimented with using Google's API to translate to set locales for players on a server.. I can't begin to say how awesome it was to watch people who could never have a conversation in their languages play full on sessions and join factions because of translator support.

#

I still think that was one of my top-three experiments in PZ.

#

So cool to see people being a community because of tools and this includes translators for mods.

frank lintel
#

thats okay I translated all the chinese --comments for the EmmyLua

#

eg. -- 按符号分割字符串 -- Split strings by symbol

red tiger
#

Oh nice.

frank lintel
#

not that I even got a clue how to use EmmyLua.lua ...

red tiger
#

How useful would it be to have a machine-translator tool for mods without official translation support? The tool would generate translated dialog files for the mod.

frank lintel
#

cuz I dont have a lua compiler....

kind fossil
#

How is it possible to access all body parts please?
bodyDamage:getBodyPart()
I would like to have this condition check for any damage on any body part (no damage from hauling too much items for example)

frank lintel
#

heh that was odd that first line was disappearing on me untill I " "'d it then it showed up but apparently was there the whole time

kind fossil
fading horizon
#

thank you for the heads up

fading horizon
#

just had to keep messing with it until I got it right

#

now when its depleted of uses, it turns into an empty gnome bar

tawdry solar
#

anyone got the github

#

i forgot it

fading horizon
#

which i plan to also make able to be used but you will audibly cough and attract zombies because itts dry lol

ancient grail
fading horizon
#

damn making it to the front page shot up my visitor count

tawdry solar
#

modding a gun is scary

fading horizon
#

i wouldn't even know what gun to add since brita has like everything at this point

fading horizon
#

You know what project zomboid needs

#

A hello kitty mod

#

I'm making it

full halo
#

Realistic functional crossbows and bows would be dope

drifting ore
#

Why does this not work through OnCreate on recipes :
player:getFreeRecipes():add("Craft Something");

fast galleon
#

you want to add to known recipes probably

drifting ore
#

Oh, let me try.

#

Thanks.

drifting ore
fading horizon
#

Bleh. I want to make other stuff but I need to finish this mod first

#

I'm not looking forward to making textures for all these different flavors lol

reef karma
#

hey guys! any tricks to start modding? software, guides etc?

fading horizon
#

Biggest tip is reading Lua documentation then picking apart other mods' code

#

That's how I learned

#

Or just looking at how the base game functions work in general

#

All depends on what you wanna make really

#

Blender for modeling, vscode for coding

fast galleon
#

pzwiki is a good start, get an idea of the most common things

sour island
#

Also depends on any prior experience messing with games, or programming

#

It may be overkill for modding but I use intelliJ + the library tool PZ-Libraries

fast galleon
sour island
#

I would have to check the system again -- the radio scripts and guiid system implied certain lines give the XP

#

Listened to lines are stored on the player and prevent XP gains from what I know -- idk about mood buffs

reef karma
fading horizon
#

this is where i learned all about lua

fast galleon
reef karma
#

oh let me rephrase. i know what doubles are, i just dont know what these doubles are since i cant find it anywhere.

fading horizon
#

you would need to go find where that function is called and handled in the source files

#

and find out how it works and what those variables are doing

reef karma
#

gross lol

fading horizon
#

yeah

sour island
#

The javaDoc has been getting updated

reef karma
#

documentation is a blessing i guess not a given

sour island
#

It could tell you more there

#

X Y R G B A?

#

Pixel X/Y, rgba for color

#

Those are variable names

reef karma
#

that makes a lot of sense. they could have added a single line saying that though no?

fast galleon
sour island
#

I mean... The "perfect" code is legible without documentation

#

And I'd say xy rgba is pretty self explanatory

#

The java doc does include more break down though - is that where your screenshot is from?

reef karma
reef karma
sour island
#

Once you get the hang of tables it's pretty easy

#

Then the challenge is thinking about how to leverage your Lua into the game

reef karma
#

sounds good. i think for now i am just gonna make a simple thing and try to show a text in a corner or something. then make it floaty and etc

fading horizon
# reef karma sounds good. i think for now i am just gonna make a simple thing and try to show...

This tutorial video will show you how to make a simple drink in Project Zomboid. I will go into the steps involved from start to finish. Read more below.

0:00 intro
1:08 Start
1:44 Searching for images to use in game
2:30 Searching for the Sound Effect
3:06 Creating mod file directory
3:54 Creating mod.info
4:34 Creating a poster
7:14 Adding ne...

▶ Play video
#

Also this

#

It's a little outdated and a few things are different but this is what I used when I very first started to understand file structure and such

reef karma
#

how long have you been at this?

fading horizon
#

About a week

#

Made two mods so far

#

Third is almost finished

#

It's not that bad once you get a little bit of a feel for things

reef karma
#

Lack of motivation is gonna be the killer here for me, code at work and at home. I look at it enough.
With the current of things if it took you a week, it will take me a month
I saw your vape mod already and looks cool, does it replace smokes or just for fun?

fading horizon
#

Nope it's an entirely new item with a custom timed action so it doesn't touch vanilla stuff at all

weary knoll
#

when things start to finally "click", that's a great feeling

fading horizon
fading horizon
#

I have some varied experience but it's mostly in css/html/js

#

So this was all a bit new to me

reef karma
#

I do it for 8 hours 5 days a week 🥹 (most of that time is meeting tbh)

fading horizon
#

I wish I could get a coding job

#

😩

#

One day

reef karma
#

i looked at lua in college but never actually did anything with it

fading horizon
#

Only other time I used Lua was to hack payday 2

#

So long ago lmao

reef karma
#

you will find one, it took me a while. if you are making mods this quickly you seem like you know what you are doing 😄

weary knoll
#

there's no problem with modding for yourself

reef karma
#

Making useless mod is my goal right now. My lunch break has changed to looking at lua for PZ now

weary knoll
#

You don't have to justify it to anyone, even if it's useless like making the rubber ducks make a squeak noise or something

#

that's in the works

#

so you won't have to wait for too long haha

fading horizon
#

Me too. I'm decent at photoshop and stuff but completely new to modeling. Making the models is easier than fucking with textures

reef karma
#

I make some models for 3d printing. I am gonna make models with no textures, black and white style. i dont think that is gonna come in handy anytime soon if i can display a simple test in game yet xD

fading horizon
#

i have two choices on how i want to approach this item im making i could use some opinions

#
  1. Have one item which when spawned, gets assigned a random display name (the vape flavor) and based on that display name, gets assigned the relevant texture file

  2. create individual items for each flavor

#

is 1 even possible

cursive coral
#
require 'Items/SuburbsDistributions'
require 'Items/Distributions'
require "Vehicles/VehicleDistributions"
table.insert(SuburbsDistributions.cashregister.items, "1_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 50)
table.insert(SuburbsDistributions.cashregister.items, "2_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 25)
table.insert(SuburbsDistributions.cashregister.items, "5_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 12.5)
table.insert(SuburbsDistributions.cashregister.items, "10_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 6.25)
table.insert(SuburbsDistributions.cashregister.items, "20_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 3.12)
table.insert(SuburbsDistributions.cashregister.items, "50_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 1.56)
table.insert(SuburbsDistributions.cashregister.items, "100_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 0.78)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "1_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 50)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "2_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 25)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "5_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 12.5)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "10_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 6.25)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "20_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 3.12)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "50_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 1.56)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "100_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 0.78)
#
table.insert(VehicleDistributions.GloveBox.items, "1_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 50)
table.insert(VehicleDistributions.GloveBox.items, "2_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 25)
table.insert(VehicleDistributions.GloveBox.items, "5_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 12.5)
table.insert(VehicleDistributions.GloveBox.items, "10_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 6.25)
table.insert(VehicleDistributions.GloveBox.items, "20_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 3.12)
table.insert(VehicleDistributions.GloveBox.items, "50_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 1.56)
table.insert(VehicleDistributions.GloveBox.items, "100_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 0.78)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "1_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 50)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "2_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 25)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "5_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 12.5)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "10_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 6.25)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "20_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 3.12)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "50_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 1.56)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "100_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.78)
#

What is problem???

fast galleon
#

lol

reef karma
#

option 1 is more dynamic and allows you to add more future textures without changing the code>
Depending on how you implement option two, if you do add more textures or even models, you might have to do more (still minimal) code changes.
Option 1 is fancier and should be smaller package since you are re-using the same model or re-skinning no?

I vote for option 1 even though I have no idea if it is possible ( I don't see why not)

cursive coral
fast galleon
#

but what is the problem, have you tried turning it on and off again

frank elbow
#

For future reference, it would be better to put those values in a table and loop over the table to do those insert calls

#

"better" meaning more readable in this case

fast galleon
cursive coral
fast galleon
#

try searching for 100_dollar_bill

#

do you know about LootZed?

cursive coral
cursive coral
#

Is there a site I can look at?

fast galleon
# cursive coral Is there a site I can look at?
cursive coral
#

Hmm thanks

#

then it's time to research

frank lintel
#

how about a guide or code on how they are loaded and read

fast galleon
frank lintel
#

well more like need to look at exactly how its read/formatting etc so maybe have a way to read/access it in the IDE?

fast galleon
#

lua table -> java parse, there's a lot of spread info

frank lintel
#

I mean technically all that stuff is just lua tables without the code right?

#

just wondering any way to get the code those txt files actually represent.

fast galleon
#

distributions don't have txt

abstract carbon
#

can someone please direct me to a mod making article or forum. I am totally lost, I have copied the mod template to the dime and yet it will not show up in game

fading horizon
#

Does anyone else get an odd sense of satisfaction in making your code / comments look pretty

red tiger
#

Distros are Lua tables, right?

reef karma
#

I wish the code I work with had comments. Biggest pet peeve are bad/ugly comments xD LOL

frank lintel
#

okay just brainstorming but you get where Im going cuz IDE loves to say unknown cuz its getting a ?object?table? built out of those txt files which then carry methods it can use..

fading horizon
#

i have ocd so documentation is v important to me lol

fast galleon
red tiger
reef karma
#

i made my co worker do another commit because he had extra spaces and lines where there should have not being. I refused to approve his PR

frank lintel
#

jab why I wish there was a kinda working javadoc gen for lua

fading horizon
red tiger
fading horizon
#

just because i was mad it didn't have one

red tiger
#

Well sort of.. PipeWrench has a WIP Lua transpiler.

fading horizon
#

plus i've learned a ton from just picking apart other people's code, so I want people to be able to easily understand and use mine

red tiger
#

=(

abstract carbon
red tiger
#

Sorry bout that.

fast galleon
frank lintel
#

game install folder (projectzomboid), $home/zomboid, then the mod folder workshop/content/108600

#

and !steam user might be different...

rancid panther
#

on a second thought dont read my code. it might give u an aneurysm

reef karma
#

what is the theme for vc for lua to make it look like that? or is that default

frank lintel
#

your game folder and home folder both have a /mod folder dont mix them up.

abstract carbon
rancid panther
#

do not

fast galleon
#

if not your mod then don't reupload

abstract carbon
#

it is my mod

rancid panther
#

any time someone gives u a name placeholder, give it a real name

#

they r just telling u how to do it without holding ur hand

frank lintel
#

~\Zomboid\mods\Superb-Survivors-4178 for example is where I work on a copy of Superb to fix stuff...

abstract carbon
#

I have the mod folder, where do I put it. I have already tried Users/Zomboid/Workshop and Mods

#

I am even able to upload it to the steam workshop yet when I subscribe to it, it does not show up

frank lintel
#

just put it in your home zomboid/mods folder

abstract carbon
#

ok

#

my mod is there

frank lintel
#

I did this only temporary but I renamed as you see the folder to a new name but also mod.info I change the name there so when loading the mods ingame you know exactly what you loading. esp if you already published a version of it on steam.

fast galleon
#

the next step is to check the mod.info file

rancid panther
#

yea if they copied mod template then the mod will be the same id as the mod template and thus not work

frank lintel
#

^

rancid panther
#

get an icon file too. replace the sample with a relevant image

frank lintel
#

poster.png

fading horizon
#

This better comments plugin for vscode is GOAT

#

you can add custom tags and formats however you like

#

I highly recommend it

rancid panther
#

i should get some plugins for vscode

#

mine doesnt even highlight "not" "and" or "or"

frank lintel
#

o.O

#

which one you using then looks fine for me. same as == etc

bronze yoke
#

do you even have a lua plugin 😨

rancid panther
#

i do not

#

🤣

frank lintel
rancid panther
#

i'll get a plugin tho. for my own and everyone's sanity

frank lintel
#

thats what I got installed, if Im missing any other popular ones dunno

reef karma
frank lintel
#

ah just set them for yourself... :P themes...

red tiger
reef karma
#

Much better than what she had ^

red tiger
#

I use this when I'm around people so it's annoying enough not to stare at.

reef karma
#

I just use light theme when I am coding with people

frank lintel
#

I dont even use vsc cept for quick looking at code and compare it to IJ

red tiger
#

I'm about to change that. =P

frank lintel
#

no you wont unless you rebuilding the whole UI of vsc

fading horizon
fading horizon
frank lintel
#

this is what I normally look at..

fading horizon
reef karma
#

i am scrolling through the theme for that colors but i cant find it. my shit is all washed out

#

give me that neon pink function tags please

red tiger
#

Everything must look like TypeScript highlighting.

#

Or else..

frank lintel
#

how about this. kick my Vi arse. :P

#

or notepad.exe

fading horizon
#

still my fav coding theme

frank lintel
#

eww

fading horizon
#

back before vscode

red tiger
reef karma
#

Sakura theme

fading horizon
#

pastel theme for sublime

red tiger
#

I used to use Sublime.

reef karma
#

good old sublime

frank lintel
#

kill the BG I wouldnt care

#

no f'n thank you on burning in my display...

reef karma
#

best linux editor

fading horizon
#

isn't bright or burning on my display tbh. looks fine

#

but my monitor is angled a certain way

red tiger
#

I use chalk on the pavement. I program in runes..

fading horizon
#

i had to stop using it though because i needed clearer syntax highlighting

#

when i wrote 50k lines of code in autohotkey though? That sublime theme was through it all with me

red tiger
#

The theme of my editor keeps changing though.

frank lintel
#

hold on time to pull out the magnifier and see if we get a color code

red tiger
#

Like what if I only want dark theme?

#

Only lasts like 11 hours.

reef karma
#

dracula theme for dark only

frank lintel
#

R:252 G:224 B:241 yes as I say burn in bruh..

glass basalt
#

Pfffft, using VSCode for making mods that you can't even run, test, or compile 🤣

frank lintel
#

same issue with IJ

glass basalt
#

I used Notepad++ and recently switched to Kate to have more control over UI

fading horizon
#

Oh you're talking technical stuff idk anything about that lmao

#

Vscode is nice for the ui

#

Syntax highlighting and plug-ins are great too

#

If you're not using the zedscript plug in you're really missing out

glass basalt
#

Imagine VSCode but it only shows the things you need: that's Kate >:^)

frank lintel
#

IJ works fine for me now that I know Im back in the C compiler setup days. all I need is a loader for .txt files as lua objects/tables/whatever and Im set

#

how to set up your IDE. open the command line game launcher bat file... that gives you a good idea.

reef karma
#

both VSCode and studio are great for bigger projects. for basic stuff i just use notepad++

glass basalt
frank lintel
#

if it just lua code stuff Im testing I go right for the online compiler

#

do wish there was a 5.1 specific one still alive.

glass basalt
#

Most of my Lua implementations use Java methods or tables so native Lua testing doesn't work

frank lintel
#

java I got no issues either

glass basalt
#

I have to raw-dog it using print statements and relaunching the game

frank lintel
#

Im set on both lua and java now its that loaded stuff so the IDE knows what its dealing with stuff

bronze yoke
#

i just test things with the in-game console when i have to

reef karma
#

what kind of goodies can you run with the in game console?

glass basalt
#

The same as lua scripts, its just a terminal

frank lintel
#

anything really if you can do one line lua code :)

reef karma
#

that would prob be a great start for me to just mess around with functions and stuff to figure out what they are

#

anything specific to run it or just -debug at launch?

frank lintel
#

just that and you can explore it all in the F11 menu.

glass basalt
#

-debug as executable properties, or the other one for the java launcher bat

reef karma
#

sounds great. thank you for that, i was hoping something like that existed. my motivation is back

glass basalt
#

Was like -Ddebug or something

frank lintel
#

think if you hold shift or something there was a trigger to launch debug mode too

#

that def wouldnt care for cmd line

glass basalt
reef karma
glass basalt
#

A placeable version of the digital watch?

reef karma
#

kinda like the the clothing inv mod with the floating button but it just shows the time lmao

frank lintel
#

hides...

#

who needs a library we'll just take it direct.

#

need to make a template out of this so I dont gotta do it over and over by hand

reef karma
#

@ maemento I downloaded your mod first mod almost as it came out, I just realized it was you xD

rancid panther
#

untapped vape market

#

i think some map mods have spawn definitions for their smoke shops so make sure u use the same tags other smoker mods use

hot patrol
#

Any texture artists that can give me some advice? How would you go about texturing an item like this? I'm trying to get it done without stretching the image but a lot of them come in different width and heights. I've tried content aware stretching and filling but it has varied results and I'm not a good enough artists to just redraw the edges.

#

the texure on the model is the stretched one

#

this is one of the better results

#

some are not great

clever spruce
#

@rustic garnet Sorry to ping you here instead of leaving a message in Workshop page for Nested Containers, but I needed to do so hee so that I can show you what's hapening with said mod.

#

The double entries are from the only two containers I have in my main inventory. it doesn't do this in vehicle, stationary containers, or inside bags I have equipped on my person.

reef karma
#

Alright so what are the limitations of the F11 menu for the debug mode?
If I make a mod and install it, load into a save. While in game, change the lua and reload from the debug mode in game -- does this work?

red tiger
#

Animate a player sleeping and holding onto that thing for dear life.

hot patrol
#

great idea tho

#

now I need it

red tiger
#

Hahaha

#

Yes.

#

Next thing you know someone will add an occupation "Anime Enthusiast".

hot patrol
#

already diid

#

There is a weeb proffesion. When you take it you spawn wearing a trench coat and fedora and get a random dakimakura and nearly broken mall katana. you also get and exclusive "studied the blade" trait that ups long blade

red tiger
#

Nope

hot patrol
#

creativity truly can go too far

rancid panther
#

wtf

sour island
#

steam down?

#

boards windows to mod_development

fading horizon
#

add clove cigs from my mod for extra edginess

rancid panther
#

the face i made when i turned on the audio

fading horizon
#

seems to be working for me

#

game launch as well as workshop pages

rancid panther
#

oh yeah it isnt working for me either

sour island
#

not completely down but definitely having issues

jaunty marten
#

iirc steam doing planned shut down every tuesday but not sure about exactly time

rancid panther
#

good thing i wasnt planning on playing

#

spent a good half hour looking for a theme that works for my eyes tho

fading horizon
#

got sidetracked and made a vscode theme

#

lol

fading horizon
#
    {
        DisplayName                    =     Gnome Bar,
        OnCreate                       =     onVapeSpawn,
    }```
#
function onVapeSpawn(_item)
    if not _item then return; end;

    local item = _item;

    local flavorsList = {
        "Tropical Rainbow Blast",
        "Blue Razz",
        "Watermelon Ice",
        "Pink Lemonade",
        "Black Ice",
    }

    random = ZombRand(10)+1;
    local displayName = "GnomeBar (" .. flavorsList[random] .. ")";
    print(displayName);
    print("Printed display name");

    item:setDisplayName(displayName);
end```
#

I'm only getting errors when trying to set the display name on the last line

#

even when just setting it to a string of "test"

#

im not sure what i'm doing incorrectly. Any ideas?

jaunty marten
#

what's the item?

fading horizon
#

its a vape, defined in the first code block

jaunty marten
#

and why r u using _item as argument and on next line doing item = _item instead just use item as arg lul

sour island
#

do item scripts have an onCreate?

fading horizon
jaunty marten