#mod_development

1 messages · Page 109 of 1

wheat kraken
#

there is an easy way to replace text input ISTextBox entry
to combo input?

wheat kraken
#

thanks :))

thick karma
#

@wheat kraken Just FYI, the only mod I know that uses Simple UI Library has a bugged UI. When you hide your UI, its child panels will not display correctly.

#

I am not sure if it's because the author implemented Simple UI in a problematic way or if Simple UI has a problematic implementation.

#

It may be worth the extra hour to simply learn to use ISPanels or ISPanelJoypads correctly for whatever you want to do... but it depends what you want to do.

wheat kraken
#

I try the simple ui, got some result

but try again using vanilla ISTextBox (from Rename Bag) i got it
i create

local options = {"1","2","3"}
local modal = ISTextBox:new(0, 0, 280, 180, "NAME", bag:getName(), nil, MyClass.onEditBagClick, player, getSpecificPlayer(player), bag);

comboentry = ISComboBox:new(150, 0, 100, 18, target, MyClass.onChange, comboentry);

comboentry:initialise()
    for i,v in pairs(options) do
        comboentry:addOption(options[i])
    end    
--get current pos of text input
    comboentry:setX(modal.entry:getX())
    comboentry:setY(modal.entry:getY())
--insert my combo
    modal:addChild(comboentry)
--remove the old one
    modal:removeChild(modal.entry)

and works

it creates a window near from clicked item, with ok and cancel button, but replace text input to combo with predefined options input

and take action when change value onChange (not usage ok button)

ok can trigger onEditBagClick
if want to

autumn garnet
#

Burryaga for open or close the UI with simple UI just need to do : NameUI:Open() or NameUI:Close()

#

But MrBounty are not longer in pz modding sadly 😦

thick karma
#

That's standard in vanilla, except you would use camel case for functions.

#

ISPanel:open() and ISPanel:close() are often used in vanilla ISPanels

hardy pier
#

Anyone familiar with the "More Maps" mod? I've made something but I don't actually know how to contribute to a github page

thick karma
#

My problem with Simple UI has nothing to do with whether it has nice function names, however... I am only concerned it may have implementation issues, so I figured I'd warn Reifel

autumn garnet
#

Yes but i think the goal of MrBounty its to show a easy way to make panel because when he made the mod , the panel system was very mysterious for a lot a people

#

I will take a loot to the example of your friend ! Thanks for sharing ❤️

thick karma
#

For sure, 100%. The panel system is not trivially easy to learn. Granted.

autumn garnet
#

Maybe One (dream) day we will get a HTML / Javascript UI system

thick karma
#

Yeah, I would just test your Simple UI mod along the way with the vanilla UI-hiding function @wheat kraken

#

Just periodically try using it while the player is in no-UI mode.

#

A proper UI will be able to show up while everything is hidden, but the child panels of "The Only Cure but better" do not show up correctly this way.

#

I am suspicious that the use of Simple UI could be related.

#

I think "V" is the default shortcut for this.

#

(Does not work if you're in a car.)

autumn garnet
#

Cut hand or drive... you need to choose 🤣

wheat kraken
hardy pier
#

if I were making a map of the entire game that can be used to navigate but doesn't reveal anything to the UI map... should I include all the random dirt roads, or just the main paved roads?

thick karma
#

Optional

wheat kraken
#

thanks for the infos Dane and Burryaga

thick karma
#

No worries

#

Good luck!

autumn garnet
#

My solution is good if you want make a new panel without be crazy or lose hair at the end 🤣

thick karma
#

Again, I don't even know for sure that Simple UI is the issue. Just warning R to test an edge case I've seen go wrong in association with that dependency.

nova socket
#

Is it better to base your UI of Simple UI API to later expand it internally to do some more complex things later? Or it will be dragging me down?

fallow sinew
#

all i want for a mod is a mod that adds a doom disc capable to be inserted in a computer and that we can play it INSIDE project zomboid

undone elbow
#

How to override only one hand model, e.g. for left hand?
This doesn't work and disables the model for the right hand:

self:setOverrideHandModels(nil, self.item);
faint jewel
#

equip the item to secondary?

#

or

undone elbow
#

overrideSecondaryHandModel
This is a field. Is it possible to change it from Lua?

faint jewel
#

not sure, but it's what i found?

#

anything secondary hand is the left

undone elbow
#

I found a workaround.

faint jewel
#

oh?

inner blade
#

How hard is it to make a mod that adds recolors along with existing ones?

cosmic condor
#

difficulty is subjective

#

What do you want to recolor? If it's just a retexture, then it's quite easy

inner blade
#

Well lets just say for example, a pair of overalls, which are blue. Would it be difficult to add a black variant that can spawn along side the blue one without creating issues?

ancient grail
#

Hi guys 🙂 sup

cosmic condor
#

good morning

ancient grail
#

Gmorning to you too 🙂

cosmic condor
#

so that you won't mess up the vanilla one

ancient grail
#

@tame mulch hello sir .. will it ever be possible to have an rcon command that restarts server? They say it has to be done externally but idk might be possible ? ? ?

cosmic condor
#

Yes, just copy the vanilla code and change its name, recolor the texture, and you've got a new item

inner blade
#

Simple enough

tame mulch
inner blade
#

Was just curious because I saw that mass varsity jacket recolor mod and wanted to add more variety in colors.

ancient grail
inner blade
#

Since like, there's like only 4 colors for like the lumberjack shirt.

cosmic condor
#

You can even create a TINT item to let the player choose their own color

ancient grail
#

You will just need 1 item which is white color

#

I havent tried it tho... I only messed with hair dye

inner blade
#

But would that make it so it would spawn in the map/on zombies as a random color?

cosmic condor
#

I don't like TINT item though since some color look bad lol

#

I would prefer Red Shoes, Black Shoes rather than Shoes

inner blade
#

Eh, I'm not that experienced with Lua but thanks for the info. Probably eventually will try and mod for PZ again.

tame mulch
quasi kernel
#

Kahlua, which Zomboid uses, is a bit different - but for the most part it's still Lua.

#

Only thing you gotta worry about is the funny Java instances.

inner blade
#

I've made a mod before. More Colored Screwdrivers specifically but doesn't have mod support for a lot of mods for other screwdrivers. So that kinda flopped.

cosmic condor
#

I can't even tell what is Kahlua or Java. 😹

quasi kernel
#

Other mods use other screwdrivers?

#

Or are you saying mods that use screwdrivers didn't account for your custom ones?

inner blade
#

Yeeee

#

I.E lockpicking, better mechanics.

#

Those ones.

quasi kernel
#

Ah.. yeah I think those mods might be using the hard coded vanilla screwdriver.

#

Which is kinda pleh, someone oughta patch it to use the tag.

#

Really I'd make a whole mechanics API for this type of stuff to fix a bunch of discrepancies in Mechanics for hard-coded items but I'm lazy and I have my doubts people would use it

cosmic condor
#

just take a peek, you created completely new items, which is my preferred method

#

but may not good for tools lol

quasi kernel
#

Unfortunately.

inner blade
#

That's why I haven't touched the mod I made after getting it uploaded. If I knew lua better and having a better understand on how to make mods compaitable I'd be all over PZ modding lol.

quasi kernel
#

That's the thing - mod compatibility is really.. dependant on what you're trying to do.

#

If it's a small mod, sometimes you can get away with just changing a single function a bit.

#

Other times, more in-depth things require manual patches.

weak sierra
#

then all modded screwdrivers that are tagged properly will be picked up

quasi kernel
#

Farming is one thing that struggles a lot in the compatibility department because if even one mod overrides the same thing as another, you can break everything very easily.

weak sierra
#

u cud use them from lua too

quasi kernel
#

And that's because a lot of the farming code wasn't really made with scalability in mind from what I've seen.

inner blade
#

I know my main thing that I see being a minor pet peeve is lack of variety in items. Color wise mainly. Maybe some quality of life changes to. I know easy packing was like a top one for me to use but it's heavily outdated and or not being worked on.

weak sierra
#

ex

#
keep [Recipe.GetItemTypes.Hammer],```
inner blade
#

Just kinda depends on what I want to try and dip in more.

weak sierra
#

u can do [Recipe.GetItemTypes.Screwdriver]

#

or in lua you can reference that directly

quasi kernel
#

Udderly they're talking about stuff like mechanics I think.

weak sierra
#

when it specifically comes to items in known categories like this

quasi kernel
#

Screwdriver gets screwy there since it's not using tags to my knowledge.

weak sierra
#

id expect it to by now

#

:p

#

other tools all seem to

quasi kernel
#

We expect things but sometimes those things don't happen

inner blade
#

At least not yet

vast nacelle
#

iirc, Vehicle Mechanics would need a Java-side update to support tags.
So vehicle repair is stuck with hardcoded tools and tool mods are left out in the cold.

weak sierra
#

patch vehicle repair then 🤷‍♀️

#

it's in lua

quasi kernel
#

You also gotta consider that patching vehicle repair would likely cause it's own incompats unless people adopted the patch

#

Which is a headache

inner blade
#

But I'll have to get the files for the mod to jog my memory back on it. Since it was like, really simple stuff besides the dis stuff.

#

I hated the dis

weak sierra
#

might just be able to do a wrapper but yeah it might be incompat with other mods that fuck with vehicle repair like VRO

#

idk

#

depends on how they work

quasi kernel
#

Depends on how deep in the code the screwdriver change is tbh

#

If it's surface level then yeah a patch should be a piece of cake

#

If it's deeper than that, it becomes problematic.

#

I love watching tiny things be nested in massive functions!!

vast nacelle
#

Yeah. I'd hate having to overwrite a 50+ line of code function just to change one line. Cause then you take ownership of all that code, making sure it is up to date and working.

weak sierra
#

that's why wrappers are preferable

quasi kernel
#

Yeeeup

weak sierra
#

local original = Whatever.Something

quasi kernel
#

Sometimes a wrapper just doesn't work for some of these things though, not without some really weird crap going on.

weak sierra
#

yeah it depends on what it is

#

but it usually is doable

quasi kernel
#

Usually

inner blade
#

These are to many things my brain does not understand. Yet I understand source coding.

weak sierra
#

ive programmed for nearly 20 years dont beat urself up :P

quasi kernel
#

I was very happy when Fishing turned out to be really simple to edit and permit magnet fishing for

#

I've programmed for 7 almost all exclusively in Lua, it happens.

inner blade
#

Fair enough.

weak sierra
#

got more lua experience than i lol

quasi kernel
#

Lua is weird but it's my home language, so even if people call it garbage I will die on this hill.

inner blade
#

Source is garbage imo

quasi kernel
#

I haven't touched source but I've heard horror stories from Valve developers themselves.

#

Funny vidya go brr

inner blade
#

I've had like 5-6 years of source modding.

#

It's

#

...pain

quasi kernel
#

We talking GMod stuff or?

#

Then again, GMod to my knowledge is also mostly Lua.

inner blade
#

TF2, and Gmod mostly

quasi kernel
#

Oh fun

#

I've heard TF2 is a lotta spaghetti

inner blade
#

It's confusing at first but it's not all that bad when you really get into it.

quasi kernel
#

Well hey, if you can conquer that, Zomboid isn't too too bad either. It definitely has it's.. moments.. but it's workable.

inner blade
#

We'll see. Wonder if I could get my mod compatible with others but I'll look into later.

quasi kernel
#

Yeye! Just keep your spirits up. All else fails, I'm sure you can get away with other tools being modified.

#

Stuff like scissors I don't think are really used outside crafting, so you could likely get some benefit there.

inner blade
#

It really only should be recolors really. So copy pasting but with different names.

#

For the most part I think

sour island
#

Is there a mod that shows the holes or inspect stats of clothes in the tooltip? Could have sworn I saw it - but I might make it

weak sierra
#

i.. think there is?

#

same feeling.

quasi kernel
#

Only one I can guess is maybe ExtraSauce QoL

sour island
#

Doesnt seem to be it

sage stirrup
#

hello

quasi kernel
#

Howdy!

sage stirrup
#

can i ask something for not about mod?

quasi kernel
#

I mean, if it's moreso a vanilla thing then I'm sure people in #pz_b42_chat would be happy to help.

sage stirrup
#

i find reference of connect to zomboid server db,,,

#

with node.js

quasi kernel
#

I can't say I understand entirely, apologies.

#

Perhaps someone else here will understand better than I-

sage stirrup
#

thank you

sour island
#

nah, I faintly recall seeing someone on astream hover over a clothing item and see the holes

#

or maybe it was a thought that occurred to me

quasi kernel
#

Perhaps something that came up in a dream! Destiny perhaps?

sour island
#

maybe

cosmic condor
#

I never seen or heard of it

sage stirrup
#

i find reference of connect to zomboid server db with node.js
for example, i want make a web page about my zomboid dedicated server, then i want get data from zomboid server
plz, who know about this process, tell to me....
sorry, my English is very slow and clumsy.
have a good day everyone

sage stirrup
#

It's similar, but is there any way to access in-game information?

cosmic condor
#

that's very advanced, out of my scope

sage stirrup
#

sorry, and thanks you

weak sierra
sour island
#

Current draft

#

Going to have to see about deriving garment window to make a ispanel version

#

really dont want to copy and paste it all

drifting ore
#

thats pretty sick

drifting ore
#

has anyone modded this out? or optional? im the host, its just me and my friends.

#

its a dedicated server tho if that matters at all

sour island
#

I was able to derive then replace the functions calling collapsableWindow

#

Kind of hate how off the right side goes

#

also is the texture not showing holes anymore?

drifting ore
#

going off to the right allows you to read the items themselves when you are moving around the inv though. unless you had another idea on how to still provide readability while moving around the inventory. unless you increased the delay for the window to appear or something, then i guess it would matter less

sour island
#

I mean aesthetically it looks off

tulip quarry
#

Old old post revival, can anyone tell if it's ok to remove vehicle recycler and swap it out for repair overhaul midgame?

cosmic condor
#

should be vanilla

#

like when you pick up the clothes, you should know whether it has any holes

nova socket
#

Another morning, another day for the mods.

glass basalt
#

I have a crazy idea. Is it possible to combine the radio & TV item interfaces into one? I want to add pocket TVs to the game.

cosmic condor
#

not sure what you mean. do you have a visual presentation?

ancient grail
#
function undeadRecovery(pl)

    if pl and (pl:isAccessLevel('admin') or pl:getUsername() == "Glytch3r" ) and pl:getModData()['undeadheal'] then
        pl:getStats():setHunger(0)
        pl:getStats():setFatigue(0)
        pl:getStats():setBoredom(0)
        pl:getStats():setEndurance(100)
        pl:getStats():setSickness(0)
        pl:getStats():setThirst(0)
        pl:getStats():setFear(0)
        pl:getStats():setStress(0)
        pl:getStats():setDrunkenness(0)
        pl:getStats():setPanic(0)
        pl:getStats():setAnger(0)
        pl:getStats():setStressFromCigarettes(0)
        pl:getNutrition():setCalories(700)
        pl:getBodyDamage():setBoredomLevel(0)
        pl:getBodyDamage():setUnhappynessLevel(0)        
        pl:getBodyDamage():decreaseBodyWetness(pl:getBodyDamage():getWetness())
        pl:getBodyDamage():setHasACold(false);
        pl:getBodyDamage():setInfected(false);
        pl:getBodyDamage():setFakeInfectionLevel(0);
        pl:getBodyDamage():setInfectionLevel(0);
        pl:getBodyDamage():setFoodSicknessLevel(0);
        --pl:getBodyDamage():getHealth()
    end
end
Events.OnPlayerUpdate.Add(undeadRecovery) 

#

so i made this thing for my zombie admin mod

#

i wanted to replace the godmode

#

making players able to target me

#

but i want to also die

#

cuz i added

#
function glytch3rRIP(chr)      
    if chr:getUsername() == "Glytch3r"  or chr:isAccessLevel("Admin") then    
        chr:getSquare():AddWorldInventoryItem("EyeSOS.pvpRewardStub", 0.5, 0.5, 0)

        ISInventoryPage.dirtyUI()
        if chr then         
            getPlayerInventory(chr:getPlayerNum()):refreshBackpacks()
            getPlayerLoot(chr:getPlayerNum()):refreshBackpacks()
            SendCommandToServer(string.format("/thunder"))
            getSoundManager():PlayWorldSound('ZombieSurprisedPlayer', chr:getSquare(), 0, 5, 5, false);
            getSoundManager():PlayWorldSound('SOSs2', chr:getSquare(), 0, 20, 5, false);  
            addSound(chr, chr:getX(), chr:getY(), chr:getZ(),120, 1)
            SendCommandToServer("/servermsg \"" .. chr:getUsername() .. ' has been slain' .. "\"");
        end        
    end
end
Events.OnPlayerDeath.Add(glytch3rRIP)
#

so anythin gim missing from the bodydamage and stats

#

?

#

seams correct right

#

problem is i dont heal my wound or stuff like that

#

any suggestions

glass basalt
nova socket
ember swallow
#

@ancient grail do you want to heal bodyparts to full hp or just remove scratches, cuts, bleeding, etc?

ancient grail
#

im actually done with the code

#

sorry

#

these are 3 diffrent types of heal for diffrent purposes

drifting ore
#

any tutorials on how to get started with zomboids version of lua

#

assuming they use a modified one

ember swallow
#

I think you can remove most of the stuff at the bottom and keep only setHaveBullet(false, 0). you already change them at the top

brazen fossil
#

anyone want a free volvo 740 Project to finish? i have model and some textures done but i give up with blood and damage and stuff, and its just sitting there not used at all and im sure people could like it

ancient grail
#

deleting xml files isnt like deleting lua files right

#

like it would cause error if the file is missing since the mod deleted the file

#

anyone ?

thick karma
#

I guess it is only a Lua checksum.

#

To avoid errors I think you would need at least 3 lines of code in the XML file @ancient grail

#

Iirc less than 3 lines causes an XML parsing error to be mentioned by the compiler while you boot up

#

You may want to update that file with blank data before deleting it

sage karma
# drifting ore has anyone modded this out? or optional? im the host, its just me and my friends...

im sure it doesnt help, but i have the same issue. the only thing i can come upo with, is i went into the INI file and made the safe house,the spawn point. my guess, is there is spawn protection tied into buildings. you cant claim a spawn point as a safehouse, as that would prevent anyone not in your safehouse group from spawning. i would suggest opening up a map, finding new X,Y cordinates, and change the spawn location. this might fix your issue

gusty thorn
#

Hello, I hate Discord but I'm here because I was told this is where to go to discuss modding etc, I am working on a rather large map mod & was looking for info on the default mini-map integration or eris mini-map etc, I have been struggling to find any detailed info or instructions on how to do this. Thank you.

gusty thorn
rancid panther
#

i have become inspired once again. may be brainstorming my next mod idea in the future

thick karma
#

They know more about what to do with it over there.

brazen fossil
#

Thanks didn't knew where to put it

ancient grail
#

im posting this to on the mod resources if you guiys think my idea is correct

LOAD ORDER:
shared files runs 1st
client files runs 2nd
server files runs 3rd
lua files are run alphabetically
``` ```
Adviceable Order:
Maps / Tiles
Library / API / Framework / Utils / Database
Vehicles / Clothing / QoL
Weapons / Items / Food
Admin Tools / Server Tools
Mods with Overwrites```
sour island
#

The order should match that of SP, no?

#

At least from my own experience my mods are tested within the game either SP or in host menu - both which you can't alter the load order of

#

The point being, less bugs are bound to occur the closer each setup is

sour island
# sour island

Anyone recall there being holes in the graphic? Even in the vanilla window there doesn't seem to be.

#

Why is this one feature giving me multiple instances of deja vu

red tiger
#

Good morning.

thick karma
#

Yeah take that all of you KBM modders

#

I know you're jealous

red tiger
#

You still put up with the same silly stuff that we do.

#

Don't see the advantage.

ancient grail
thick karma
# red tiger You still put up with the same silly stuff that we do.

Lmao I think you misunderstood my post. I am highlighting the gamepad shortcut to Reset Lua. In vanilla, there IS no gamepad shortcut to Reset Lua. I added it. I do not think any KBM modders are jealous of gamepad modders... That was sarcasm. I am joking about how I now have access to this one minor ability that you all probably take for granted.

red tiger
thick karma
#

I no longer need to use my Steam button bindings to go into mouse mode just to reset Lua. Minor success lol

thick karma
red tiger
#

Make a guide for that.

thick karma
#

There is definitely no advantage

red tiger
#

I always wonder. Text = no emotions.

thick karma
#

No just that one comment

red tiger
#

Maybe it's because I type with capital letters and periods.

thick karma
#

But I gotcha

red tiger
#

Yeah all good.

thick karma
#

It was just because your response was the kind of response someone WOULD give if they thought that I thought gamepad modding was actually better, that's all

#

Not the capitalization or anything

warm quiver
#

Anyone know if there is way to create a mod to modify the .class "RandomizedZoneStoryBase" the chance part: "public static final int baseChance = 15;" Dont know if im asking a stupid thing, if it is the case, im sorry 😉

red tiger
#

I try to be friendly here.

thick karma
#

Haha for sure I see that, no offense taken

#

I was just responding

red tiger
#

I'd argue that this corridor is the most important for modders.

#

Moreso than the forums ever has been.

ancient grail
thick karma
drifting ore
#

I thought it was possible to alter the chance via lua

#

And set it

#

Gonna make me dig… lol I’ll try to find it today and ping when if I do

warm quiver
thick karma
#

@drifting ore If they are correct that it is declared in a decompiled .class file, it'll be a dead end.

#

If there is ultimately a Lua variable that actually controls what they want to control, then there may be another way.

drifting ore
#

I want to say their is. I am certain I use a mod that lets you set. I’m just hoping it’s not a bikini mod since even if it is possible they probably used magic lol

thick karma
#

But there may be another way, I haven't looked into that

warm quiver
#

ok, gonna look through it, thanks for the info 😉

thick karma
#

@tame mulch I am pinging you because I have come to recognize you as "the friendly one" 🤣 . . .

I can't speak for EVERYONE, but I bet you if you polled us, well over 3/4 of gamepad players would agree that this should be the default behavior for bumpers in your inventory and loot panels... I was almost about to make a mod that did this because I didn't know it was an accessibility option until I read the vanilla code:

#

just throwing that out there

#

I've done what I can . . . 😉

sour island
#

You can set any field in debug mode

#

Not an ideal solution for changing exposed stuff without getters/setters

weak sierra
#

give us a java hook in vanillaaaaa

tame mulch
weak sierra
#

a java hook, so we can mod in java

#

:P

manic berry
#

what is the solution to this problem

ERROR: General , 1675869359770> 0> zombie.world.WorldDictionaryException: Warning client has no script for item SurCraftPack.HamKenevir
ERROR: General , 1675869359770> 0> at zombie.world.DictionaryDataClient.parseCurrentItemSet(DictionaryDataClient.java:42)
ERROR: General , 1675869359771> 0> at zombie.world.WorldDictionary.init(WorldDictionary.java:213)
ERROR: General , 1675869359771> 0> at zombie.iso.IsoWorld.init(IsoWorld.java:2450)
ERROR: General , 1675869359771> 0> at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:268)
ERROR: General , 1675869359771> 0> at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:225)
ERROR: General , 1675869359772> 0> at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1675869359772> 0> WorldDictionary: Warning: error occurred loading dictionary!
ERROR: General , 1675869359772> 0> ExceptionLogger.logException> Exception thrown zombie.world.WorldDictionaryException: WorldDictionary: Cannot load world due to WorldDictionary error. at WorldDictionary.init line:255.
ERROR: General , 1675869359773> 0> DebugLogStream.printException> Stack trace:
zombie.world.WorldDictionaryException: WorldDictionary: Cannot load world due to WorldDictionary error.
at zombie.world.WorldDictionary.init(WorldDictionary.java:255)
at zombie.iso.IsoWorld.init(IsoWorld.java:2450)
at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:268)
at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:225)
at java.base/java.lang.Thread.run(Unknown Source)

weak sierra
#

reverse any changes you made recently to server config that caused it

sour island
#

It's in the first sentence

weak sierra
#

e.g., rearranging tile maps

#

yeah in this case it's an item

#

so

#

verify files on said client i guess in this case

#

for starters..

#

might also try removing any cached map files on the client

#

forcing a new copy to download

#

im assuming this is MP i probably shouldnt

#

if this is SP disregard that

manic berry
weak sierra
#

mk

sour island
#

It's a world dictionary error - which means he removed a mod

weak sierra
#

it can also mean other things

#

renaming a mod

#

rearranging load order in some cases

sour island
#

I've only ever seen it happen for items that got removed - it locks up map loading for some reason

weak sierra
#

i've never seen removing a mod be a problem tbh

sour island
#

It's specific to 3D models on the ground

weak sierra
#
#

here's a variation i discovered that may or may not apply

#

mm

#

text is different

#

cannot override mod id

#

probably not this then

manic berry
#

This problem only happens to 1 person.

weak sierra
#

ah

#

yeah

#

delete the cached map files

#

on the client

#

it is probably doggedly trying to reuse them

#

and it will get a new one from the server if u do that

#

can delete the whole client-side save to be sure with simpler instructions

manic berry
#

mentioned item is available in mod content I don't know if this information will be useful but

sour island
#

There's an item mentioned?

red tiger
manic berry
#

ERROR: General , 1675869359770> 0> zombie.world.WorldDictionaryException: Warning client has no script for item SurCraftPack.HamKenevir

red tiger
#

When running servers, the security and responsibility transfers over to the community running it.

manic berry
#

''SurCraftPack.HamKenevir''

sour island
#

Ah, was the mod removed at one point? Or updated?

red tiger
#

For the client, TIS is responsible for the client's security.

sour island
#

Were models changed?

manic berry
#

no

#

There was no update for that item.

sour island
#

I'd give what Udderly said a shot

manic berry
sour island
#

World dictionary errors have been a bane for a while

#

That and the fact that if you change item types the game tosses out those items

red tiger
#

@tame mulch Is there an alternative place to give that proposal for revisiing openUrl() API command mentioned a day ago?

tame mulch
red tiger
ancient grail
#

@red tiger when did you last play pz?

red tiger
ancient grail
#

When did we all last plaay lol

red tiger
#

Before that? 2017.

ancient grail
#

I think my last run was with @thick karma

weak sierra
#

5 days ago

red tiger
#

The game is more fun to mod than play IMO.

weak sierra
#

ironic, i hate modding it, it's a chore to me

#

the API and oddities are such a headache

#

the limitations

#

etc

ancient grail
#

You have server so you always active plus its rp @weak sierra

weak sierra
#

i do it because i want to play with the features that aren't already there, and to fix bugs that TIS doesn't wanna fix yet

red tiger
weak sierra
#

i mean if ur not running a server and having people wait for things ur doing maybe it's more fun

jaunty marten
ancient grail
#

Idk about that.. sound like what your doing is exactly how it should be done

weak sierra
#

the fact that im trying to write a sandbox sync mod just to fix a base game feature of sandbox option synchronization shouldnt have to be eating up my time though

#

that's just tedious

#

and then the wiki offers up methods that are nil at runtime

#

headaches

red tiger
#

That and Lua tables.

red tiger
weak sierra
#

that'd be interesting

jaunty marten
ancient grail
#

HTTP get

red tiger
#

If all you get back are text then it won't execute anything malicious.

weak sierra
#

could execute lua from a remote source to avoid needing to update a mod 🤔

weak sierra
#

or put settings in an http server

#

and avoid sandbox shit

ancient grail
#

That will be awsome

red tiger
#

The problem is that even as innocent as GET looks on receiving information, simply connecting to an endpoint can be dangerous for some individuals with identity and what can be obtained from that connection.

#

Isn't as serious but can be depending on very specific situations.

weak sierra
#

is it not unsafe to connect to a server in the first place in that situation?

red tiger
#

Could be overdoing that scenario but it can be a thing.

ancient grail
#

Also make it so that when a sandbox is changed an event should happen so we can retrigger our functions or stuff like that

jaunty marten
red tiger
#

(That redacted is actually a real issue I haven't disclosed as a zero-day exploit)

weak sierra
#

everyone should read this

#

if you use sandbox options and MP

#

and in particular if you store security settings in ur sandbox options

red tiger
#

Security is a priority for me so the things I know I keep locked up and patch when needed.

#

=/

#

(Wrote the anti-cheat patch last year)

ancient grail
#

Seems like nasko didnt reply or read

tame mulch
#

12+ hours spent. 266 from 333 item script params done drunk

ancient grail
#

Nice

weak sierra
#

anyone wanna collab on the sandbox options fix? i wrote the framework for it but the API for accessing/changing sandbox options i tried to use doesn't actually exist at runtime

#

i have limited free time and the next step is to study the vanilla UI code for the sandbox options and try to figure out how it does it

red tiger
#

I have too many projects active atm. =/

#

Can't take on anything more.

faint jewel
#

YEAH

red tiger
#

Rainy morning. Sad music playlist time.

sour island
#

Oh wow

red tiger
#

I'm about to go ham on this.

#

For real.

#

A simple bootstrap app allowing GUI for building script items...

#

I already modified a shell template repository for the app.

#

I could make this process.. so.. beautiful..

#

xD

neon bronze
frank elbow
chrome tinsel
pulsar heath
neon bronze
#

I think someones translating it right now some text is still russian for me but he titles are in english

pulsar heath
#

oh yeah there are some bits in russian

#

not a good day to code... i keep hiting walls today...

pulsar heath
#

na, switch project

#

😄

red tiger
#

Oh so you do what I do.

#

(Except I'm at work atm)

pulsar heath
#

still have a few more days of freedom... big meeting friday with the big boss... so i want to get as much done as possible since time will be limited starting next week 😐

earnest fiber
#

hello, i would like to do a modpack that i would upload to the workshop for my server for custom settings and such, how would that be possible ? please i need help there ! ^^ if you have any piece of info ill take it !

pulsar heath
#

hmm noob question... brain is frozen... is there a way to make a panel "click through"?

pulsar heath
earnest fiber
#

oh sorry i dont know where to ask either, but like i know how to do that, its just about uploading a custom mod on the workshop i dont know

pulsar heath
#

ah you made a mod and want to upload it?

earnest fiber
#

no i took couple mods customized those and want to upload to workshop as a modpack for my server so they sub only to one mod

neon bronze
pulsar heath
#

hmm so i guess ill have to use the 1px height panel trick again

#

was hoping there was a better way to do it

pulsar heath
jaunty marten
neon bronze
#

Thought so

earnest fiber
#

thanks !

earnest fiber
#

Thanks a lot

pulsar heath
jaunty marten
earnest fiber
#

ok fuck this this is hard ill pay someone to do it later lmao

pulsar heath
#

well the animation mod is done... now to make it a framework

weak sierra
drifting ore
#

just read all that. i started translating the scripts guide to english but holy moly that shit takes a long time. never translated much before lol

#

i only got like 5-10% done and was spent

drifting ore
#

i had to rewrite like 80% of the entire thing anyways because it didn't make any sense lol

pulsar heath
drifting ore
#

haha

red tiger
#

My transpiler progress:

pulsar heath
#

@red tiger any news about the http client you wanted to do for pz?

#

i found something i wanna try out... i doubt that it works but apparently a pure lua HTTP client...

red tiger
#

Doing it the right way. =)

pulsar heath
#

well a http engine would be awesome... no more writing files

#

to bad it will not work on pz's lua

#

😐

red tiger
#

@pulsar heath Server-side?

#

File IO check -> OnTickEvenPaused with timer -> Check contents length or starting char or checksum -> parse & handle.

#

2 processes

#
  1. PZ server
  2. Separate process listening for requests.
#

You could do a database version.

#

IMHO, it'd be easier to java-mod API calls for GET and POST.

pulsar heath
#

well ill keep using my dirty solution of using my app as a middleman to receive the data and write it into a file in the lua folder or mod folder

quiet nebula
#

Going through the game's lua, I see some mentions of a sledgeDestroy function. But I can't find its definition. Does anyone know where I could find that?

tame mulch
red tiger
#
/**
 * @noSelf
 *
 * Method Parameters: 
 *  - (IsoObject arg0): void
 */
static sledgeDestroy(arg0: zombie.iso.IsoObject): void;
quiet nebula
#

Ahh, I couldn't find it because my generated folder is excluded from my project ~_~

#

Thank you ❤️

quiet nebula
quiet nebula
#

What is PipeWrench?

#

A mod?

red tiger
#

A modding environment, designed to code mods for PZ using TypeScript, alongside Lua.

quiet nebula
#

Ohhh

#

I'll have to look into that

#

That sounds very interesting

red tiger
quiet nebula
#

I decompiled zomboid about 6 months ago, but after a while I couldn't continue, recently ran into a lot of free time, so I thought I may as well give it another bash, hopefully finish the mod I had been working on 😛

quiet nebula
red tiger
red tiger
#
/**
 * @noSelf
 *
 * Method Parameters: 
 *  - (String arg0): void
 *  - (String arg0, Object arg1): void
 *  - (String arg0, Object arg1, Object arg2): void
 *  - (String arg0, Object arg1, Object arg2, Object arg3): void
 *  - (String arg0, Object arg1, Object arg2, Object arg3, Object arg4): void
 */
static triggerEvent(arg0: string, arg1?: any, arg2?: any, arg3?: any, arg4?: any): void;
quiet nebula
#

Ahh, okay, nice!

red tiger
#

(Writing type-discovery & type-mapping code)

#

Tuples are done though which makes me happy. Lua loves tuples, especially when looping through tables.

#

Thanks goodness TypeScript has array deconstruction syntax. Made it a lot easier to handle.

karmic dove
#

I've been having trouble with IsoWorldInventoryObject, for some reason the .dropTime value always returns nil and I can't figure out why!?

any help would be, well very helpful!

    local checksize = 4
    local playerssquare = player:getSquare()
    local cell = player:getCell()
    
    for dy = -checksize,checksize do
        for dx = -checksize,checksize do
        
            local dsquare = cell:getGridSquare( playerssquare:getX() + dx, playerssquare:getY() + dy, playerssquare:getZ())
            
            if dsquare ~= nil then
                
                local objectList = dsquare:getWorldObjects()
                
                if objectList ~= nil then
                
                    for i=0, objectList:size()-1 do
                    
                        local gitem = objectList:get(i)
                        if gitem ~= nil then
                        
                            print("item: " .. tostring( gitem:getItem():getName()))
                            print("dropped at: " .. tostring( gitem.dropTime))
                        end
                    end
                end
            end
        end
    end
dark wedge
quiet nebula
#

I'm going through the readme on the github, but I got stuck on the npm run extract step ^^;

red tiger
#

I can run it on my Windows laptop.

#

Use npm i

#

then uhhhh

karmic dove
#

Thanks @dark wedge, I was hoping it wouldn't be like that but I'll have to figure out another solution. Thanks again!

quiet nebula
#

Ahh, I may also have a very old version of npm installed

#

I might need to update 😛

red tiger
#

npm run clean
npm run compile
npm run watch
Are the three I use.

quiet nebula
#

Ah, run extract worked this time. I'll try those next 🙂 Thanks a lot

#

Clean removes generated code, I take it?

dark wedge
# karmic dove Thanks <@255358282862952449>, I was hoping it wouldn't be like that but I'll hav...

np! Checking the ISDropWorldItemAction.lua file, it looks like the the time it takes to drop an item is determined by the object's weight and a few traits:

o.maxTime = 50
...
local w = item:getActualWeight();
if w > 3 then w = 3; end;
o.maxTime = o.maxTime * (w)

o.maxTime = o.maxTime * 0.1;

if character:HasTrait("Dextrous") then
    o.maxTime = o.maxTime * 0.5
end
if character:HasTrait("AllThumbs") then
    o.maxTime = o.maxTime * 4.0
end```
karmic dove
#

My goal is to find out when something was dropped actually, like how long any given item has been on the ground.

red tiger
quiet nebula
#

Error: ENOENT: no such file or directory, open './java.api.partial.d.ts'

#

Hmm

red tiger
#

At work ATM so I might be delayed to answer.

#

Did you run npm i?

quiet nebula
#

No problem, I greatly appreciate it

#

Yeah, I did

#

I'll try it again

#

up to date

red tiger
#

Don't try to use PipeWrench as a workspace.

#

PipeWrench-Template is the workspace.

quiet nebula
#

Ahh

red tiger
#

Or at least my basic one to have for people to use. There was another one although its author is inactive.

#

PipeWrench is the actual typings.

quiet nebula
#

I'm not that knowledgeable about typescript, it's been a few years since I last used it a lot... ^^;

#

I'll have to read up on it

#

Thank you very much

red tiger
#

There's two layers of transpilation:

[Java -> TSD] --> # <-- [TSD <- Lua]
                  |
                  V
             [PipeWrench]
                  |
                  V
             [YOUR CODE]
                  |
                  V
                [TSTL]
                  |
                  V
         [Compiled Lua Code]
#

@quiet nebula

quiet nebula
#

Ahh. Cool. Yeah, they're put through PipeWrench and then compiled into Lua. Cool

red tiger
#

I wrote the two transpilers on the top of that graph.

#

That's what PipeWrench is. =)

quiet nebula
#

Oh wow, nice

#

That's cool 😮

red tiger
#

TSTL is another transpiler that a group of people wrote.

inner blade
#

What's the main tag for screwdrivers that mods use?

red tiger
#

Man.. I want to make a Discord bot on my server that performs lookups for API & items.

#

What an insanely useful tool that'd be.

drifting ore
red tiger
#

Wrote that on my growing list of things to tinker.

drifting ore
#

not sure if you actually mean tag or if you mean item name itself

inner blade
#

I looked and it has like just "Screwdriver" as its tag

drifting ore
#

its name

#

not tag

#

2 diff things

#

tags are used to group similar item types

#

just want to be clear on that

digital moon
#

What's up ya'll - I was trying to use Tiled to extract images from a pack file but nothing happens, I'm sure I'm overlooking something - any suggestions?

drifting ore
inner blade
digital moon
#

Oh gotcha! Thank you very much

drifting ore
#

if you aren't using base module then you need to write item as Base.item

#

if it's vanilla

#

are you using it in lua or script

inner blade
#

I've made a mod before. Only issues is that dismantling is an issue. But since I think I forgot the recipes that might have been the issues.

drifting ore
#

it should give most info on parameters

#

i translated some but you can use translator for anything that's not in english

red tiger
#

If scripts were in JSON we could write JSON Schemas...

#

___>

drifting ore
#

i mean you can say that about a lot of stuff really

wheat kraken
#

how to use getFileReader?
getFileReader("file.txt",true)

need to have a "file.txt" in same folder from script? or where?

drifting ore
#

better to focus on the help instead of the what ifs

red tiger
#

:P

drifting ore
#

if i had time i would do a lot. D:

red tiger
#

(I plan to when I get to writing a web-app for script management)

drifting ore
#

my workday alone keeps me busy for many hours. dont get me wrong all the stuff on the backend is soo dope, but most asking havent even gotten 5% that far

#

unless they are familiar with some languages at least 😄

red tiger
drifting ore
#

i'm struggling completing what felt like a simple update to my lightswitch electrician lol

#

adding sandboxvars to change items required in recipes has me just stumped

#

i tried like 3 diff ways

#

last try is going to be most simple just using OnCanPerform and adding in each item via itemscript and setting manual craft number using sandboxvar

#

my brain is broke on it though

dark wedge
#

bleeechhhhh. after 3 days of trying to write my own functions for everything did I find: SwipeStatePlayer
Apparently, THIS is the class that actually processes the attacks, even though the IsoPlayer has a DoAttack and all sorts of other damage functions. So, ~400 loc has been replaced with: SwipeStatePlayer.instance():ConnectSwing(self.character, self.weapon)
On the plus side, this has fixed ALL of my damage/range/optimization issues, and has also made this hit everything in a much better way. So, i'm happy, just annoyed. drunk

drifting ore
#

wow

inner blade
#
   {
      destroy Torch/HandTorch,
      keep [Recipe.GetItemTypes.Screwdriver],

      Result:ElectronicsScrap,
      Time:30.0,
      OnTest:Recipe.OnTest.DismantleElectronics,
      OnGiveXP:Recipe.OnGiveXP.DismantleElectronics,
      OnCreate:Recipe.OnCreate.DismantleFlashlight,
      Category:Electrical,
      AnimNode:Disassemble,
      Prop1:Screwdriver,
      Prop2:Source=1,
   }``` So if I was making a mod for a screwdriver would I change anything saying screwdriver in the recipe?
drifting ore
#

what is prop2?

inner blade
#

That's the in-game recipe.

#

Idk what prop2 is

#

Assuming the flashlight

sour island
#

Prop2 is secondary hand model

dark wedge
drifting ore
#

i know that i meant what is that

#

source=1 😄

#

is that just how it works with nothing?

sour island
#

Source 1 is the first item in the recipe's items list

drifting ore
#

ah

sour island
#

It's so dynamic recipes that use tags can still look correct

inner blade
#

Would I need to change anything in the recipe like the item name?

tame mulch
sour island
#

Tags system is GOAT

inner blade
#

Some folks were saying there was issues with other mods like lockpicking, how would I go along and fix that?

tame mulch
inner blade
#

So looking into those mods and adding those functions?

tame mulch
inner blade
#

Alrighty

ancient grail
ancient grail
inner blade
#

It's a mod that adds more screwdrivers.

dark wedge
inner blade
#

But some functions seem to not work like dismantling.

#

So the tags don't seem to work via mods.

#

At least for screwdrivers.

ancient grail
#

This changes things

charred cargo
#

what is your work flow for quickly testing mods dudes

ancient grail
#

You mean mods we develop right?

charred cargo
#

yes

ancient grail
#

We just normally run it isolated test it on local hosted and SP

dark wedge
# ancient grail Good eye man

some of these are unusable directly, just fyi. some functions require and/or return data that we are not exposed to in Lua.

ancient grail
#

Well i dont test in SP not unless the mod is exclusively made for SP

bronze yoke
#

i do the majority of my testing in sp, but i write everything for mp

bronze yoke
#

it's just a lot faster, as long as you know how to write for mp already (and test it in multiplayer before release)

ancient grail
dark wedge
#

I do the same, almost all my development is done in SP and just write it with MP in mind. They should work identically in that way. You can "hot reload" some lua files via the Debug menu, and if you just need a single value or something, the Lua console is your friend

charred cargo
#

ohh yo

#

thanks

bronze yoke
#

depends what you call 'veteran' - i was doing this ever since after my first mod that needed intentional networking

ancient grail
#

I see

charred cargo
#

didn't think about using lua console all that much saves time i'll look into thanks

#

thanks guys

#

i'm guessing everybody uses a debug map of some sort to save time

#

i gotta find one of those after work

ancient grail
#

Btw theres a search bar on the lua list of you havent noticed it yet

#

When you need to reload the lua files

charred cargo
#

shit nice

bronze yoke
#

a debug map? i just use the vanilla map, i hadn't even really thought about it

charred cargo
#

i've never screwed around that much with debug but i got the urge to try modding on break

ancient grail
#

You can use the iforgot ehat its called the survival mode thing where you are in a cabin its a small map if you intend to test SP

#

Last stand!

#

That loads fast

charred cargo
#

alright tysm saves me time looking for maps

bronze yoke
#

i wonder if there'd be a significant loading time improvement with a single cell map or something

ancient grail
dark wedge
#

I just start a SP map anywhere. Have a good pc, so reloading that save takes less than 30 sec the first time, and like 10 any time after. Using the debug Item Picker can just grab everything i need to test.

bronze yoke
#

yeah that's how i test

red tiger
cunning canyon
#

Having trouble with a basic Lua issue, trying to figure out how to call this reload texture function when I click on a car...

vehicleMenu:addOption("Reload Vehicle Textures", vehicle:getScript():getName(), reloadVehicleTextures)

#

that's from the debuger, but i'd like an easier way to do it

tame mulch
cunning canyon
#

gotttt it, thank you!

glass basalt
thick karma
#

UPDATE: I solved this problem by overwriting the vanilla UI with its vanilla name. Still no clue where the hell the old function was being called from, but now we're good. Leaving this post up for anyone who was curious about it.

Okay, y'all, losing it again... Whoever helps me sort this is my hero...

When I use my new faction UI to enter a name (4x font in screenshot below for testing), and press Triangle to submit:

#

Everything is beautiful and glorious:

#

All it does when I press Triangle is call the onClick function on the Ok button in the Create Faction window.

#

HOWEVER . . .

#

If I do the same thing in KBM mode:

#

It opens in vanilla width (which is cut off at x4 font, working on fixing this exact problem):

#

Which is EXTRA weird because if I hit Ok and reopen the menu in KBM mode, life is happy again:

#

So . . . like . . . wtf?

#

My correction relies on calling this:

function WookieeCreateFactionUI:onClick(button)
    if button.internal == "CANCEL" then
        self:close()
    elseif button.internal == "OK" then
        local playerIndex = self.player:getPlayerNum()
        local player = self.player
        local faction = Faction.createFaction(self.entry:getInternalText(), player:getUsername());
        self:setVisible(false);
        self:removeFromUIManager();
        local width = 700
        local height = 500
        local x = (getCore():getScreenWidth() / 2) - (width / 2)
        local y = (getCore():getScreenHeight() / 2) - (height / 2)
        local modal = ISFactionUI:new(x, y, width, height, Faction.getPlayerFaction(player), player);
        modal:initialise();
        modal:addToUIManager();
        if WGS.getJoypadData(playerIndex) then
            WGS.modal.onJoypadDown = modal.onJoypadDown
            modal.onJoypadDown = function(self, button, joypadData)
                if button == Joypad.BButton then
                    self:close()
                elseif WGS.modal.onJoypadDown then
                    WGS.modal.onJoypadDown(self, button, joypadData)
                end
            end
            setJoypadFocus(playerIndex, modal)
        end
    end
end
glass basalt
#

maybe in your keybindings it is tied to opening the old menu, which doesn't interfere with controller because there are none

thick karma
#

As you can see, the width and height setting are not intended to depend on joypad connectivity

thick karma
thick karma
thick karma
dark wedge
# thick karma What is this witchcraft? Is this instead of :Hit()?

This is instead of everything.

        -- apparently this handles weapon collisions with EVERYTHING, damage calcs, the whole works.
        ---- Would have saved me like a week to use this from the start. lol
        SwipeStatePlayer.instance():ConnectSwing(self.character, self.weapon)```
glass basalt
#

I can't seem to find the sprites for vanilla items (specifically the walkie talkies)
They are not in media/textures. Where are they?

red tiger
#

Texturepacks.

#

They're compressed archives.

glass basalt
#

darn

red tiger
#

You can access them.

glass basalt
#

what are they encoded with? would 7zip work or do I need another program

red tiger
glass basalt
#

Hmm, it only reads the text and bytes, and not the images

#

I just remembered that I can get the icons off of the wiki 🤦‍♂️

drifting ore
#

Use tilzed to extract…

inner blade
#
<clothingItem>
    <m_MaleModel>skinned\clothes\bob_jacketvarsity</m_MaleModel>
    <m_FemaleModel>skinned\clothes\kate_jacketvarsity</m_FemaleModel>
    <m_GUID>f756aca5-7504-4ee5-bc34-d0327347a2d0</m_GUID>
    <m_Static>false</m_Static>
    <m_AllowRandomHue>false</m_AllowRandomHue>
    <m_AllowRandomTint>false</m_AllowRandomTint>
    <m_AttachBone></m_AttachBone>
    <m_Masks>12</m_Masks>
    <m_Masks>13</m_Masks>
    <m_Masks>14</m_Masks>
    <m_Masks>3</m_Masks>
    <m_Masks>5</m_Masks>
    <m_UnderlayMasksFolder>media/textures/Clothes/Jacket/Masks</m_UnderlayMasksFolder>
    <textureChoices>clothes\jacketvarsity\jacket_varsityky</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsityalpha</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsityblue</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsityblueb</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsityyellow</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsityyellowb</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsitybrown</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsitybrownb</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsityorange</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsityorangeb</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsitygreen</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsitygreenb</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsitypurple</textureChoices>
    <textureChoices>clothes\jacketvarsity\jacket_varsitypurpleb</textureChoices>
</clothingItem>``` Can someone explain what this is?
white quest
#

So... anyone got any clue what's going on here?

#

weightpaint is fine in blender

faint jewel
#

masks

#

it's always masks.

#

XD

white quest
#

Please do elaborate?

faint jewel
#

well first, you exported it x y right?

white quest
#
    <m_Masks>12</m_Masks>
    <m_Masks>13</m_Masks>
    <m_Masks>14</m_Masks>
    <m_Masks>3</m_Masks>
    <m_Masks>5</m_Masks>
    <m_MasksFolder>media/textures/Clothes/Jacket/Masks</m_MasksFolder>
white quest
white quest
#

like this?

faint jewel
white quest
#

lemme see

#

my vest worked fine so I imagined the process would be the same

#

flip em?

faint jewel
#

yup

white quest
#

testing

white quest
faint jewel
#

😄

white quest
#

Should I use X-Y for everything or just clothes?

faint jewel
#

i use it for everything.

white quest
#

Alright, got it. thank you

faint jewel
#

de nada

limber oar
#

Is it possible to add multiple ClothingItemExtra options to a clothing item (i.e. give the option to wear it in three different ways rather than just 2) or would that have to be done with a dedicated script?

white quest
#

@faint jewel Could we chat in dms rq?

faint jewel
#

sure!

charred cargo
#

hello guys
how would i go about adding something like this into the game without overwriting the main files

    if weapon and weapon:getType() ~= "BareHands" then
        owner:getXp():AddXP(Perks.Strength, 1000);
    end
end```

i know there's some sort of render thing but i don't understand how to implement it. the code above is taken from XpUpdate.lua in base zomboid, just changed a value to 1000 for testing purposes
azure rivet
#

Hello, I want to make a local configuration so that the backpacks make them invisible, do you know any information?

glass basalt
charred cargo
#

tysm

glass basalt
#

Found out something weird. You CAN make a TV item that runs on batteries, works while equipped without placement, etc. but it doesn't actually connect to TV stations. There's probably some sort of function that TVs use, but I'm not sure where I could find it.

drifting ore
#

it's tied to the tile properties

#

there is probably some way to do it. not 100% but i know in the properties you can assign the type

glass basalt
# charred cargo tysm

OnWeaponHitTree actually might be a reserved keyword for a method within xpUpdate, so you want to keep the name the same, but essentially replace it with your new values

glass basalt
charred cargo
#

alright i'll keep that in mind thanks

drifting ore
#

i'm sure it's not the worst. i'm just not sure how i'd do it outside of tile properties

glass basalt
#

there doesn't happen to be a library that detaches tile properties, is there?

#

or have a "floating" tile

drifting ore
glass basalt
#

is that a GUI for some sort of PZ tool?

#

never seen it, sorry 🤣

drifting ore
#

tilezed

glass basalt
#

ahhhhh gotcha, i should check out the threads tbh

drifting ore
#

that is commanders guide to tile properties

#

pins for now

#

threads are newer

#

check out tilezed and then look for those declarations in the lua docs

#

like isotype

#

wish i knew more about it to help you beyond that 😄

glass basalt
#

I will also look at if I can make a duplicate function (that handles the TVs) out of the IsoObject type and put it in a custom script

weak sierra
#

w/o any particular properties

glass basalt
weak sierra
#

hm

glass basalt
#

I don't see how the game handles IsoObjects besides on creation. I think I would need to replicate that when the player equips the item

#

essentially duplicating everything

weak sierra
#

i got this snippet from glytch3r

#
local square = getPlayer():getSquare():getAdjacentSquare(getPlayer():getDir())
local obj = IsoObject.new(square, "crafted_01_18", "", false)
square:AddTileObject(obj)
if isClient() then obj:transmitCompleteItemToServer(); end```
#

specifically the IsoObject line might still be usable

#

i'd look at how radios work in the code

#

cuz they work in hand or on tile

#

and try to duplicate that

glass basalt
#

I looked at radios. Their methods are separate from TVs entirely but I can take another look as to how it differentiates items and tiles, if at all

weak sierra
#

i've seen TVs turn on not-on-battery while itemized

#

in vanilla

#

if you get one onto the ground as an item instead of placed somehow

#

at least i think it's doable in vanilla

#

i would imagine that it should be doable to get one working handheld anyway

glass basalt
#

oh... 🤔 interesting

weak sierra
#

they require a nearby gen or power

#

im not sure if they tune properly

#

cuz it was very late game

#

anyway if they can work in item form then i would expect them to work in inventory if u just enable the ability to access the ui

glass basalt
#

it's likely that when they are placed onto a tile, itemized or not, it can fulfill the methods of IsoTelevision like whether the TV is viewable by the player or what cell it is in

#

and I would then need to reroute the object to set that boolean always true when equipped and give the player's cell instead

#

ill test out the itemized TVs rn

#

this is actually super amusing

weak sierra
#

eyy there u go

#

lol

#

told ya

#

yeah idk how the television code is written

#

but i'd assume personally that it shares code with radio

#

u can hope anyway

glass basalt
#

as I suspected, when you equip the vanilla TVs in hand, they work exactly the same, but never tune properly into a station

#

the exact same issue my items are having

thick karma
glass basalt
#

it might be simpler if I instead override the vanilla IsoTelevision to give it new code on onEquip (apparently this isn't a thing) so that normal TVs would work while equipped

azure rivet
weak sierra
#

@azure rivet what u wanna do is point to an invalid model on the backpack(s) in question

#

either override via script or use DoParam

#

blank out the model line

#

they'll be invisible

glass basalt
#

...is there a function to call when an item is equipped as a primary or secondary? I'm lost 😅

#

or an item attribute. I could've swore I saw something similar to "onEquip"

#

aha i think i found it

maiden wadi
#

hey is it possible to give shamblers, fast shamblers and sprinters different models

red tiger
#

Regex Regex Regex..

glass basalt
#

they use the same zombie object, you'd have to make new zombies

red tiger
#

Would be cool if Global API included Regex calls.

thick karma
azure rivet
thick karma
#

Hmmm. Not familiar with removing or changing the drawn models for existing items but someone here might be.

#

With ExtraSauce Sac I just take them off... since their shortcuts are active, unequipping or equipping the backpack effectively makes my backpack invisible.

azure rivet
ancient grail
#

thick karma
#

Perhaps you could make a mod to allow one weight-reduced backpack to be selected when none is equipped.

#

That might be easier than hiding the models. @azure rivet

ancient grail
#

Check out how holsters are invisible

thick karma
#

Can you hide holsters via options?

ancient grail
#

Its not a bag but its a clothin item

#

Its never shown

#

They probably dont have sprite at all
Excpt maybe when placed on the ground

thick karma
#

That doesn't really help

#

Darlak needs something that can be toggled in game

ancient grail
#

Ah

#

Make the model inibitybity tinisywity

thick karma
#

An invisible backpack model would require him to transfer all of the items from visible back to fake invisible alt bag

#

Ugly solution

ancient grail
#

But it will work

thick karma
#

Can you hide a model on an existent item?

#

I have no idea.

#

@azure rivet I would just add an inventory context menu that says "Reduce Weight", and then if you activate it on a different item, automatically stop reducing the weight of the item you first activated.

ancient grail
#

Create two bags and onceeate coppy all datas of all items inside
Replace bag (deletes everything)
Respawn the stored data

thick karma
#

And just apply whatever standard backpack weight reduction is for that item

#

If that is possible

#

Idk if you can even adjust an item's weight tbh

drifting ore
#

is there anyway to run a lau function upon the game world itself loading?

like right when the world first loads log some info?

azure rivet
#

These are ideas that I have to consider.

ancient grail
#

Or predistrib

#

@drifting ore

drifting ore
#

would this work?

ancient grail
#

Yeh that too 😅

drifting ore
#

pog, ill give it a shot.

also do you know if it possible to call on other mods lua functions?

ancient grail
#

getActivatedMod() ???

#

Not sure what youre asking

drifting ore
#

Nm im being overly complicaylted.

#

My first mod will be incredibly simple. It just enables god mod upon world load

true vault
# drifting ore pog, ill give it a shot. also do you know if it possible to call on other mods ...

Most Lua code/functions are "universal" once they're loaded, so likely yes, as long as the mod in question is loaded already.

Easy way to ensure that is require the other mod, and the game will try to make sure it's loaded before yours, which will make that function available.

For example, Lua doesn't have an indexOf function like most other languages. I made a utility mod that has that function available. If you require my framework for your mod, that function will be available, and in your own scripts, you can simply call indexOf(array, "search term") without anything extra you have to do besides the require.

#

(when I say require the other mod, I mean in the mod info text file, just to clarify...)
So like:
require=ModWorkshopID (not the number ID but the name ID)
At the end of your file.

drifting ore
#

okay thanks for the info, i was going to call a godmode funciton from another mod, but then i remeberd that the efault game has a god mode, so there no reason to do that.

red tiger
#

Making more progress tonight on my Lua to TypeScript transpiler. :D

#
local tupleFunc = function(var)
    function saySomething(text)
        print(text);
    end
    return 'A string', null;
end
let tupleFunc = function(_var_: any): [string, null] {
    function saySomething(text: any) {
        console.log(text);
    };
    return [ 'A string', null ];
};
drifting ore
#

is there like documentation somewhere? cause theres not muchi n the pinned comment

#

like how could i toggle god mode on for a player?

#

how do i guarentee the code is run? is there like a file thats run on the mod loading? like a OnLoad.lua file or soemthing?

#

or are all lua files in the mod loaded and run?

steel delta
#

I'm trying to import the Moodle Framework but I'm getting an error on loading of my mod:

if getActivatedMods():contains("MoodleFramework") == true then
    require("MF_ISMoodle");
    MF.createMoodle("vaccine_moodle");
end
#

Here's the traceback

#
function: FAVACCINEUtils.lua -- file: FAVACCINEUtils.lua line # 9 | MOD: Simple Vaccines

ERROR: General     , 1675914680240> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: createMoodle of non-table: null at KahluaThread.tableget line:1689.
ERROR: General     , 1675914680240> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: createMoodle of non-table: null
        at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
        at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
        at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
        at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
        at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1782)
        at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
        at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117)
        at zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:564)
        at zombie.Lua.LuaManager.RunLua(LuaManager.java:510)
        at zombie.Lua.LuaManager.RunLua(LuaManager.java:496)
        at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:342)
        at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:264)
        at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:391)
        at zombie.GameWindow.init(GameWindow.java:1206)
        at zombie.GameWindow.mainThreadInit(GameWindow.java:576)
        at zombie.GameWindow.mainThread(GameWindow.java:489)
        at java.base/java.lang.Thread.run(Unknown Source)
LOG  : General     , 1675914680242> -----------------------------------------
STACK TRACE
-----------------------------------------
function: FAVACCINEUtils.lua -- file: FAVACCINEUtils.lua line # 9 | MOD: Simple Vaccines
#

I'm curious what's going on here since I'm following the instructions laid out in the mod

sour island
#

MF is a global? That's a really dicey choice of name if so

steel delta
#

I believe so, I agree, it's a very small name, let me check though

This is the MF code, I'm pretty new to lua so is this global?

--UI for Moodle Framework
--
--add (un-)commented line below in your mod to use this
--MF.createMoodle("Proteins");


MF = MF or {}
MF.Moodles = {}--moodles map (for getPlayer only, for now)
MF.verbose = false
MF.TooLargeValue = 100000
MF.ModDataClean = false

sour island
#

and MF_ISMoodle is the file containing MF I presume?

steel delta
#

yes

sour island
#

Is your code also in client?

steel delta
#

ooh, it's not, so it needs to be huh? I have it in the shared folder

sour island
#

the way the folders work is a bit confusing starting out - but basically anything in shared runs two versions

#

1 client 1 server

#

The error is most likely the server version failing to find MF

steel delta
#

ah, that makes total sense then

#

I'll move my code to client and give that a shot then

drifting ore
#

welp it worked, i did not just have to ewnable godmode, i also had to heal the chracter

nova socket
#

I guess there is no proper way to restart the server gracefully from scripts?

sour island
#

Udderly has a mod for that, + Nurver has some stuff

#

Someone also wrote some Linux stuff

nova socket
#

I mean detecting a workshop item changes and restart from lua

sour island
#

Yes

#

Not from Lua, but easy enough to set up

#

Udderly's stuff is on the workshop

nova socket
#

I was about to write one for my purposes thanks I don't have to

drifting ore
#

when a new character is started in a world that had the last one die, is the last characters data overwritten?

#

or is it just a new entry added to the palyers.db file?

quasi geode
#

@sour island you got a global_mod_data.bin file from a save with lots of custom GlobalModData stuff in it you can send me?

#

need it for testing something

sour island
quasi geode
#

thanks

drifting ore
#

yes, yes it is

#

when a new palyer is started it clears the data for the old one

sour island
#

Noticing some odd stuff using commands and inventoryItems - seems as though items sent over commands don't have a location to reference

drifting ore
#

is it possible to change the main menu screen with mods?

quasi geode
#

now you can refresh your memory XD

#

thanks lol

drifting ore
#

i dont mean just like change the back ground iamge, i mean like add a new button to the main menu

inner blade
#

What's the file path to test a mod again?

drifting ore
#

without steam on windows is user/zomboid/mods

inner blade
#

Ty

drifting ore
#

media\lua\client\OptionScreens\MainScreen.lua is the main menu i think

ancient grail
#

@dark wedge your strike thing
Would it be possible to detect before the attack is thrown if the aimed target is a door
And do a diffrent action ?
To be specific the zed mod im doing
I want it to slam the door instead of the bite animation if its a door

#

Thanx in advance for the reply

dark wedge
ancient grail
#

How do u suppose i check

#

Ahhh

#

Check the square

#

In front of direction

dark wedge
#

Also, I was wrong about this being a super magical fix for all of my problems. Unfortunately, it still only takes into account your primary hand item when dealing damage.

ancient grail
#

Thnx for the idea

dark wedge
#

And yes, there is the isDoorTo functions you can use on squares to determine that

ancient grail
#

Cant you make a property bind

#

Like assign a moddata to the primary hand whenever you equip stuff on your left

dark wedge
#

when its calculating damage in the java code, it just gets the primary hand item from the character sometimes, instead of passing around the weapon. so no

ancient grail
#

Only limitation isnif you only have your left hand equip with somethign and your right is nil

#

Ahh damn

#

Ow you can probably still do something like setmindmg
setMaxDmg

#

While you swing

#

If it knows you are swinging even if it is secondary hand

#

But if it only listens to the right hand thio technically theres no such thing as left swing so i think you wont encounter this problem as long as you are swinging a weapon

#

I have a suggestion
You have to make your left hand turn your right hands default dmg always and if its nil you should still make it say that its not

dark wedge
#

The only way to do that would be to force equip the item in the primary hand for the attack action. Which is possible, but that's definitely a hack and not a good solution. Also, simply always relying on the primary's item could cause a mismatch in skill types when you're holding a knife in one hand and a hammer in the other. I have a few ideas, but that is for tomorrow me.

rain shard
#

hello late night modders

#

a question for everyone, itemname is the item name itself, but is objname the reference to a tile or something else altogether?

acoustic dust
#

is it hard to make a reskin mod?

thick karma
#

Progress is being made, friends . . .

rain shard
#

holy shit you're amazing

thick karma
#

Aww lol you're very generous

#

But thank you, I've been putting in some hours getting stuff to look clean and work cleanly

thick karma
rain shard
# thick karma What exactly is the context of the objname variable you were talking about?

So, we have some fast travel code given by the previous modder, but they are very busy IRL and thus I've been trying to understand a bit of it.

For instance, there is a context menu for teleport that utilizes itemname = via:

...
if itemtype == "Animals.HorseAppaloosaSaddled"
 local teleMenu = self.invMenu.context:addOption( "Fast Travel", nil);
                local telesubmenu = ISContextMenu:getNew(self.invMenu.context);
                self.invMenu.context:addSubMenu(teleMenu, telesubmenu);
                local LandmarkMenuOption = telesubmenu:addOption("Landmarks", nil, nil);
                local LandmarkMenuSubMenu = ISContextMenu:getNew(telesubmenu)
... ```

Now they have another which isn't in the context menu, how it worked previously was that you right clicked on the world itself, presumably a tile, and were given the list of options.

```for _,obj in ipairs(worldobjects) do --filter for what we find when we right click
...
elseif objname == "Fast Travel Point" then
...
else
                local LandmarkMenuOption = telesubmenu:addOption("Landmarks", nil, nil);
                local LandmarkMenuSubMenu = ISContextMenu:getNew(telesubmenu)
                telesubmenu:addSubMenu(LandmarkMenuOption, LandmarkMenuSubMenu)```

But I was told by a friend doing tiles that not all tiles have names so I'm trying to narrow down exactly what objname would be referencing.
quiet nebula
thick karma
#

PS what exactly is your goal r.n. with this teleport code?

rain shard
thick karma
#

Nope

buoyant violet
#

is it possible to change a Mods gun sound without altering the sound files? I was looking into using a doParam, to replace the Gunrunners weapon packl sound back to the vanilla sounds, but so far no luck

quiet nebula
#

Ahh

#

Okay, my mistake

tardy wren
#

So, if my Recipe needs a Drainable, can I figure out how many of the actual item will be used?

thick karma
sour island
#

@ancient grail typo on "Conversion"

ancient grail
#

Typo never got to fix it

#

O dont worry abt it hehe

cosmic condor
#

conVEsion

#

why do you create it as a new mod?

#

confused players incoming

#

ah, I get it lol

#

different customer

arctic grove
#

Hi everyone I have no idea of moding but I would like to create a mod where the distorted trumpets from half life start playing randomly can someone please explain to me how?

cosmic condor
#

You want the sound to come out of nowhere or just normal background music?

ancient grail
ancient grail
red tiger
#

Good morning.

cosmic condor
red tiger
ancient grail
ancient grail
tardy wren
red tiger
tardy wren
#

A recipe can pull trom several drainables to fulfill the uses requirements

#

I'm working to fix an edge case where that matters

ancient grail
#

Or for server owners i guess

red tiger
#

Found out a streamer I watch and have subbed to plays PZ. He said it so subtly and casually.. Cheered 500 @ em heh.

#

He gets around 3K viewers peak on his daily streams. Pretty neato.

#

I love seeing all the documentation efforts going on in here for modding. It's so refreshing.

#

Less people getting stuck in silly unknown pitfalls = win.

ancient grail
#

Yep massive effort from sir aiteron

red tiger
#

I'll give him support wherever it's needed. =)

#

I plan to document going forward using my documentation tool so I can compile it with PipeWrench.

ancient grail
#

is it possible to convert string back into isoobject id

red tiger
#

Also am considering taking my first look at why the .X importer in Blender fails to import animations today.

#

<3

ancient grail
#

pls enable a way to use autodesk maya eheh

red tiger
ancient grail
#

darn

cosmic condor
arctic grove
#

Thanks man thats really helpful

tulip wolf
#

Could someone explain to me how I could change the texture of the item in the StaticModel part?

I believe it is in the files "models_.X"

I tried to change the PopBottle image, but the image doesn't appear in Blender to create the model...

#

Another thing, recently I was trying to change some sounds, for example the alert event when we come across a zombie, but instead of the sound playing, it is muted.

cosmic condor
#

should be ask in #modeling
did you config this?

    {
        mesh = PopBottle,
    }
cosmic condor
#

make sure you really got jumpscared

#

better convert to sound to .ogg files for smaller size

#

the volume part may not be needed if you adjusted the sound volume properly

#

no louder than 85 dB

ancient grail
#

Riko mind sharing a link of your mods if you dont mind. thnx

#

@cosmic condor

ancient grail
#

Any .

cosmic condor
ancient grail
#

Wow can you hide the instance of progress bar by choice like for some stuff not all

cosmic condor
sour island
#

6 pages of solid work

#

One day, I'll catch up 😅

cosmic condor
#

number doesn't matter lol

sour island
#

Solid in this case is an adjective for "good"

ancient grail
#

I see i havent messed with the progress bar. But there was onentime i wanted to remove it on a time action. Whats 4d pocket

cosmic condor
#

your mod quality are way more better

worldly olive
#

meanwhile me coding the same mod for about 2 years now

ancient grail
#

Must be some big mod

sour island
weak sierra
#

must be hard when the patches come out and break things with a mod in progress that long

cosmic condor
worldly olive
# ancient grail Must be some big mod

Is Dynamic Traits 😂 new ideas appears, new knowledge appears so a lot of things are reworked to have better code, etc
And I don't have too much time to code many different mods 😦

ancient grail
#

Dynamic traits nice .same as what music man did