#mod_development

1 messages · Page 94 of 1

jaunty marten
#

doing code already for a long time but my brain still can turn off with it ded

#

hah

thick karma
jaunty marten
#

mb u have mods conflict

#

different professions/traits mods creates same profession/trait and both handles it but one of them can't wait for some condition due to second mod override it

solid dawn
#

where did you see this?

#

@jaunty marten

jaunty marten
#

I didn't see anything it's just my guess

wet sandal
#

I need to start writing some like that.
Reads beautifully.

solid dawn
jaunty marten
jaunty marten
#

there's literally cannot be any conflict?

solid dawn
#

yes

#

other people reported the same issue as well both with out without other mods

#

this is frustrating if I at least had the logs tell me whats the problem

jaunty marten
#

just look at ur code and try to find potential code that can start infinity loops

thick karma
#

Chuck suggested it may not be that because Zomboid can catch infinite loops.

#

So that could be a dead end

jaunty marten
jaunty marten
#

but if it's exactly loop then will freeze forever

#

without any error

#

so this m8 have problem with some loop

thick karma
#

I seeeeee

#

Thanks for clarifying

#

I was preeetty sure I crashed myself once on an infinite loop but I'm not trying to make a habit out of it lol

small topaz
#

So I made a minimal example managing those global mod data via server-client-communication. What I want to do: initialize some global mod data on server side and write them to the player's mod data for each client. The example is this:

#

Any ideas whether this will work correctly in multiplayer? Is this the supposed way to handle those global mod data?

#

typo in the client code: there should be one globalData["b"] in the if-condition...

#

I think there are even a few more typos (forgot and "end" in the server code, just ignore! 😅 )

thick karma
#

Hey I'm gonna be busy for a bit but if you stay stuck you can DM me the link and I'll take a look later.

drifting ore
#

i am stumped and it's probably me being clueless but when i use

self.character:getPerkLevel(Perks.Electricity)

it returns null on prefillworldobjectcntextmenu

#

anyone have any idea why?

#
local function readorNot()
    local bookLevel = SandboxVars.Nipswitch.Booklevel
    local zapLevel = self.character:getPerkLevel(Perks.Electricity);
    local lowLevel = bookLevel <= zapLevel
    local goodlevel = bookLevel >= zapLevel
    local menus = {
        context:addOption(getText("ContextMenu_One", self.invMenu)),
        context:addOption(getText("ContextMenu_Two", self.invMenu)),
        context:addOption(getText("ContextMenu_Three", self.invMenu))}
    local txtRandom = ZombRand(3);
    local selectedMenu = menus[txtRandom + 1]
    if lowLevel then
        selectedMenu()
        for _, menu in pairs(menus) do
            menu.notAvailable = true
        end
    elseif goodlevel then
        local totally = context:addOption(getText("ContextMenu_Four", self.invMenu))
        totally.notAvailable = false
        local tooltip = ISInventoryPaneContextMenu.addToolTip();
        tooltip.description = getText("ContextMenu_Five");
        totally.toolTip = tooltip;
        return
    end
end
Events.OnPreFillWorldObjectContextMenu.Add(readorNot)
drifting ore
#

okay you answered my question with your question lol.

thick karma
#

Presumably undefined

drifting ore
#

it is and it's one of two that are i just realized

weak sierra
#

you have inconsistent camel case

#

readorNot should be readOrNot

#

:p

drifting ore
#

hahaha

thick karma
#

lol and goodLevel

#

❤️ @weak sierra

weak sierra
#

x3

thick karma
#

Also tooltip, technically... who writes "tool tip"?

#

But the game I believe does ToolTip

#

because the game does things like "unhappyness"

#

So you do you on that front

drifting ore
#

thats literally copied vanill code

thick karma
#

Oh

drifting ore
#

local totally = context:addOption(getText("ContextMenu_Four", player.invMenu))
totally.notAvailable = false
local tooltip = ISInventoryPaneContextMenu.addToolTip();
tooltip.description = getText("ContextMenu_Five");
totally.toolTip = tooltip;

thick karma
#

I see that now

#

Haha

drifting ore
#

minuis the redfining of totally

#

anyone know how i'd call for context:addOption?

jaunty marten
thick karma
#

No

fast galleon
thick karma
#

Nothing should be snake case

#

Ever

#

Because underscores are the worst

#

🙂

weak sierra
#

the only time underscores are ok is in classical constant naming

#

THIS_IS_A_CONSTANT_LOL

jaunty marten
high cloak
#

So is it only safe to use ModData after OnInitGlobalModData? i may be overthinking this but I'm trying to decide how to organize the startup of my mod and my head's going in circles. I have one script that checks for mod data, or creates a default table instead, when OnInitGlobalModData is invoked. But then it seems unintuitive when I want to access the same ModData from another script, because what if the entry point of that part of the script is ran before OnInitGlobalModData? Or, if the entry point is OnInitGlobalModData, what happens if it ends up running before the callback that initializes the mod data if it doesn't exist?

jaunty marten
#

u creates default table but it's literally just new table it's not linked with moddata actually

high cloak
#

yeah that's what i'm doing now, but i initialize the table with default values if it's empty

jaunty marten
#

it will be deleted after relog and u again will get empty table and create default table

high cloak
#

relog?

jaunty marten
#

u need modify exactly moddata table

local mod_data = ModData.getOrCreate("name")
mod_data.key = {...}
high cloak
#

yeah i'm doing that

jaunty marten
#

show me how u exactly do it

#

part of code with it

high cloak
#
local function checkModData(modData)
    for key, value in pairs(defaults) do
        if modData[key] == nil then
            modData[key] = value
        end
    end
    -- some other initialization, usually based on sandbox vars
end

local function onInitModData()
    modData = ModData.getOrCreate('moddata')
    checkModData(modData)
end

roughly something like this

jaunty marten
#

I can't help u with it. I need exactly ur code

#

it's just a example that u just created

#

u can remove from there useless parts like sandbox vars and etc

high cloak
#

well I don't think my question has much to do with any code I have now, I am mostly inquiring about how other people deal with mod data when they are storing less simple data

drifting stump
#

not sure what your issue is

#

yes you can only access global modData after its initialised

#

if your code accesses it before then its simply an issue of your code

jaunty marten
high cloak
#

okay here's an example, two different files

-- file 1, just responsible for initializing default values
local function checkModData(modData) end
local function onInitModData() end

Events.OnInitGlobalModData.Add(onInitModData)
-- file 2, cares about some mod data values that are expected to exist
local function doThingsWithModData()
  local modData = ModData.get('name')
end

Events.OnInitGlobalModData.Add(doThingsWithModData)

what happens if doThingsWithModData runs before onInitModData? problems? how else can i deal with this? do i just have to make the entry point for my mod in the file that initializes mod data?

drifting stump
#

theyre inquiring about the possibility of acessing global modData before its initialized

drifting stump
#

if it runs before its initialized then it just shouldnt.

jaunty marten
#

I need to know HOW u creating moddata table and filling it

high cloak
#

yeah I don't doubt that they would somehow run before the event

jaunty marten
#

I already got u uses OnInitGlobalModData

high cloak
#

I'm talking about the order of the callbacks or whatever you'd want to call them

drifting stump
#

ohhhhhhh

#

they are ran in the order they were registered

#

and files are executed alphabetically

high cloak
#

ohh okay

drifting stump
#

and for folders
1 - shared/
2 - server/
3 - client/

high cloak
#

if i were to require file 1 in file 2, then can i assume that file 1's callback would run first?

drifting stump
#

yes you can require the file and itll run that first

high cloak
#

i think that solves my problem then, thanks for the info

red tiger
#

GitHub is your friend when you want to share code.

jaunty marten
#

better to use skype

drifting ore
#

better to use icq

jaunty marten
drifting ore
#

haha someone remembers

jaunty marten
#

icq for texts and skype for files

drifting ore
#

lol is icq even alive still?

#

nm it is lol!

jaunty marten
#

doomer moment

drifting ore
#

lmao!!!

jaunty marten
sour island
#

New mods dropping on limewire

#

Totally safe pls support

jaunty marten
#

I'll drop next mods only on onlyfans... only for fans...

finite radish
#

wtf limewire does NFTs now? jesus lmao

#

i guess they already have a reputation for being sketchy and shitty, can't really go much lower

neon bronze
jaunty marten
#

he even can use preview.png..

#

check out my preview! so cool image

#

aaaand... death ded

frank rivet
#

I am so happy with skizots public release of his visible items mod. I was working in the background creating a mod like his in spirit of what he already worked on. But now since it's release I can rest easy. 😌 but of course this is always followed with a desire for more. "Welcome to the human condition". Now I am wondering if anyone out there is putting work into the Melee Combat aspect of the game. I think it would be cool to have some variety with either Charged Attacks, or Combo Systems with grabbing capabilities. Any one of those could massively enhance the Melee experience! In the mean time, I'm gonna look around to see if anyone has any work remotely close to this.

faint jewel
#

oh my mod still needs work, but thank you 🙂

drifting ore
frank rivet
drifting ore
#

here's hoping it makes it to release!

ancient grail
ancient grail
frank rivet
drifting ore
#

technically there is an op mod out there for dual wielding already

frank rivet
#

Type dual wield in the workshop.

#

Type chainsaw.

#

Oh lol. One sec.

ancient grail
drifting ore
#

dual wield is far from perfect

ancient grail
#

Uploading the fox for that i forgot so thnx it reminded me

drifting ore
#

oh you wanted chainsaw link. thanks for that also

ancient grail
#

``

UPDATE:
Doesn't despawn the gas can anymore
Added Red text indicator when Chainsaw is about to lose 1 Durability (when the checker is visible)
Can now be used to saw logs (no animation yet)
``

#

thnx for the support @frank rivet appreciate you man

faint jewel
#

need an animation?

ancient grail
#

Theres an animation thats not used. I havent gotten the time to use make a timeaction.

#

But if we can make it like a thing that it doesnt like it swings anymore while aiming already does the dmg.. to do this the the swing animation speed should be a fraction of a second. So if you hold the aim and click then you are passively killing everything in front of you

sour island
ancient grail
#

Thats what youve been up to? Checkin out non steam mod distribution

Makes sense cuz u are building an community mod

fast galleon
#

Talking about animations, I think I need to edit the xml for sheet rope to be able to change climb direction. Tried that a week ago with only commands.

#

and had no result

ancient grail
#

Like half way you can move reverse?

#

Perhaps its time to add animation channel 🙂

little holly
#

heya 😄 is there any up to date guide on how to make new tiles/textures? I'm working on that wind turbine mod but I'm not sure how to integrate the textures. The pzwiki docs seem outdated, I can't get the pack viewer to export single sheets, and I don't know how to import anything other than a tilesheet in tilezed

little holly
#

thanks!

weak sierra
#

that's a pretty cool approach

#

does it do the display in blue in the UI in game or is that just to illustrate?

ancient grail
#

Thats lit if jts actually blue

jaunty marten
#

but yea, blue

ancient grail
sour island
#

At least for publishing/distro - GitHub is better for most else

#

Speaking of which my upload action broke - so I need to fix that 😦

ancient grail
sour island
#

I'm talking about the github action to upload to workshop

idle dawn
#

How does loot work between SP/MP?

faint jewel
#

is there a way to move all items in a container to another container easily?

idle dawn
# idle dawn How does loot work between SP/MP?

I'm thinking your occupation+traits set a static distribution at the start of the scenario? Or rather it calculates it when you open containers. In MP, since I've been told Lucky does nothing, I'm guessing all of this isn't applied and a server-set distribution is made on generation (and loot respawns).

sour island
#

It used to be when you first approached a container but now I think it's when you first access them

#

And lucky absolutely does something in SP/MP

idle dawn
#

What would it do in MP?

sour island
#

If anything it's a bit busted - as a lucky person can go around first and generate more loot

idle dawn
#

OH

#

So if loot isn't generated in a container, it generates for the first person who access it?

sour island
#

As far as I'm aware

idle dawn
#

Let me just say.

#

Doctors/Nurses with Lucky are busted.

sour island
#

I'd like to see an invisible loot system that requires searching to some degree

#

I don't think loot depends on occupation or trait

idle dawn
#

It does.

#

Different occupations and even traits have hidden bonuses to "foraging." And I noticed a HUGE increase in meds in my doctor.

sour island
#

uhh

#

foraging isn't looting though

idle dawn
#

I have to check it out.

#

But are you able to forage a gun?

#

Like, with the forage system?

#

Or ammo?

sour island
#

I don't think so?

idle dawn
#

Let me check because I think there's a forage stat for them.

faint jewel
#

hmmmm

#
createItemTransaction(InventoryItem item, ItemContainer src, ItemContainer dst)```
what dis do?
idle dawn
#

Ooooooh okay yeah, foraging system can actually spawn med supplies and ammo.

sour island
#

doRollItem only mentions lucky/unlucky for traits

#

I wasn't aware foraging worked that way - I presume that stuff is in cities

idle dawn
#

doRollItem is the function that calculates loot?

sour island
#

yes

#

there's a difference between loot and foraging

idle dawn
#

Okay maybe I got too lucky then.

sour island
#

medical centers usually have alot more loot than other places too - if you were looting a pharmacy

idle dawn
#

I think what tipped me off is the "traits explained" mod that actually shows in the tooltip what they do, and one of the things cops get is +Guns on foraging.

#

When there's no gun category.

sour island
#

those mods are manually done so it may have been not updated or mistakenly added

idle dawn
#

Oh no, nevermind. +Weapons, referring to the junk weapons.

sour island
#

so you're the mistaken one 😛

idle dawn
#

It does seem like guns can drop from that category though.

ancient grail
#

@zinc pilot so you figured out how to make the fence destroyable by zed i see. Was it via codes or did you overwrite the tile itself? Just curious

wild shard
#

So no more bike mod?

heady crystal
#

I'd make more vehicle mods if the devs added proper support for it

#

Just not worth the time rn

#

I'll stick to common sense as I don't have to touch vehicles

wild shard
#

ah so it was taken off the workshop because it's hard to upkeep with updates?

heady crystal
#

No Disliker DMCAd me alleging I copied him. Which I did not. But idc the mod was broken already

#

I have like almost 1000 hours in PZ 80% of which were spent trying to figure out how to make the bikes move properly

#

So many sacrifices had to be made because the game only supports 4 wheeled vehicles

wild shard
#

so annoying to take someone down that is trying to help make content for a video game 🙄

heady crystal
#

Yeah I don't understand some people

#

It actually makes me feel sad when people come ask me if they can include my mods in modpacks. Like they actually need my permission. So sad.

#

The mod is out there for people to enjoy and have fun, ofc you can pack it to make it easier for people to play in multiplayer

#

The nerve some modders have to deny that.

#

Why even make a mod if you don't want people to use it...

queen sail
#

its kinda in opposition to the whole idea of modding, you're right its whack

heady crystal
#

Exactly

#

Anyways I'm gonna focus on Common Sense now.

#

I'm busy working on a game of mine atm but I plan on adding a lot of new features

queen sail
#

I was running a server that used the bicycle mod, which I have honestly felt is one of the best mods I have ever used in zomboid- Would it be feasible like, for me to upload it privately just for my own use? Or is the mod just dead

#

None of my friends can join since it was taken off the workshop lol

heady crystal
#

I'm unsure. I'm not that well versed with all the random steam EULA with 600 pages

#

I think you're allowed to have it for private use

tame mulch
#

Sad that in steam workshop not possible create modpacks like in minecraft. As I know in minecraft mods if your mod used in modpack, it count download to mod too. Also in steam workshop not possible use special versions of mods

heady crystal
#

Indeed that is a much needed feature

#

Would make everyone happy I guess

sour island
#

You can create a modlist - it would be neat if the game allowed people to import those lists

#

Modpacks are explicitly made to avoid updates

drifting ore
#

easiest way is to allow for sub without download tbh and enforce

#

without having to redo the entire method

heady crystal
tame mulch
heady crystal
#

I had no idea they had to update the whole thing whenever a single mod was updated

faint jewel
#

i can't find anything that uses it.

heady crystal
#

It happens

#

So much unused code

#

We need proper docs man

sour island
#

basically they want to update the files themselves on a more concise schedule

#

I kind of wish Steam allowed people to download older versions if the server hasn't updated 🤷‍♂️

#

they host the old versions of mods - as you can revert to any previous version

drifting ore
# faint jewel what DOES this do?
function ISGrabItemAction:start()
    self:setActionAnim("Loot");
    self:setAnimVariable("LootPosition", "Low");
    self:setOverrideHandModels(nil, nil);
    self.item:getItem():setJobType(getText("ContextMenu_Grab"));
    self.item:getItem():setJobDelta(0.0);
    self.character:reportEvent("EventLootItem");
    createItemTransaction(self.item:getItem(), self.item:getItem():getContainer(), self.destContainer)
end

this?

faint jewel
#

y eah i just hit that.

drifting ore
#

ohh you trying to fix that place thing?

faint jewel
#

so could i use that t loops through all the tiems in a container and transfer them to a new one?

#

i am.

drifting ore
#

enter someone who knows things...

faint jewel
#

who knows things?!

drifting ore
#

lol who knows. turn of phrase

tame mulch
faint jewel
#

yes

drifting ore
#

LOL

#

yes

faint jewel
#

i need to move all the items in a held container into a placed container.

tame mulch
faint jewel
#

yes. so how do i tell what all items are in a container so that i might loop through them?

#

visibleItem is my held item and newItem is the tile that is created.

#

sendItemsInContainer(IsoObject obj, ItemContainer container)

#

ooooh

#

wait no.

queen sail
faint jewel
#
local HeldInv = HeldItem:getInventory()
    if getDebug() then print("DEBUG - The count is :" .. HeldInv:getCount()); end
#

this isn't working!

vast nacelle
#

Shouldn't it be HeldItem:getContainer()?

#

Inventory for entities like players and zombies
Containers for inanimate objects like bags

faint jewel
#

lol just after i figred it out,.

faint jewel
#
function MoveThatBus(HeldItem, PlacedItem, player)
    local HeldInv = HeldItem:getInventory():getItems():size()
    local HeldCont = HeldItem:getContainer()
    local PlacedCont = PlacedItem:getContainer()
    if getDebug() then print("DEBUG - The count is :" .. HeldInv); end
    --if instanceof(HeldItem, "InventoryContainer") and not HeldInv:isEmpty() then return end;
    for j=1,HeldInv do
        local item = HeldInv:getItems():get(j-1)
        createItemTransaction(item, HeldCont, PlacedCont)
    end
end
``` getting an error on the create item transaction.
#

Callframe at: createItemTransaction

sour island
#

Not sure how useful viewing the javafields is but 🤷‍♂️

#

also scales to size dynamically

ruby urchin
# heady crystal No Disliker DMCAd me alleging I copied him. Which I did not. But idc the mod was...

This will be my last reply about this topic, enough evidence was presented for your mod from the workshop to be removed, I will not allow my hours of work and research to be poorly rewarded, of course, you worked on your mod, but you can't continue to lie saying that you did everything by the fact of only changing the name of some variables and obfuscate functions as "Utils", give to you all the credit and demand ask for permission to use your work when you don't do the same.

sour island
#

Someone mentioned only being able to view static fields

#

Used what I gave Glytcher to grab classes

#

at least it's a bit shorter

queen sail
sour island
#

Based on context clues, sounds like they both had a bicycles mod

faint jewel
#

skateboard vs bicycles.

queen sail
#

i'm clicking around and it looks like Dislaik had a skateboard mod that, from what i can see and have experienced in game, functioned very differently. I've been running both and i'm not sure how they're related but i suppose i may not be privy to the code and any similarities that may be present there. That being said this ||pissing contest|| disagreement broke my server once the mod was removed from the workshop but i at least now have an answer as to why

sour island
#

Kind of curious to check out both- but it should be noted steam won't really do any due diligence for copyright strikes - their policy is to remove it right away and wait for a counter-claim to which they'll just goofily reinstate the mod and basically tell both parties to take it further in court(s).

#

This is to say, everything is alleged

cosmic condor
heady crystal
#

It's machine or nothing

cosmic condor
heady crystal
faint jewel
cosmic condor
heady crystal
#

LMAO

#

wait

#

What does this mean กึ๋น

cosmic condor
#

Gizzard

heady crystal
#

What the heck

#

😦

#

You mean the internet LIED to me

#

So rude

#

I was told this was 100% accurately verified to be common sense

cosmic condor
#

common sense = สามัญสำนึก

heady crystal
#

But do you actually use that term in thai?

sour island
#

what's ข้อมูลที่ทุกคนควรรู้

heady crystal
#

Maybe it's an english only expression

cosmic condor
heady crystal
#

In my language we call it bom senso so good sense instead of common

sour island
#

Also this is a wildly pretty alphabet

heady crystal
#

Ikr

#

Beautiful, ข้อมูลที่ทุกคนควรรู้ it is.

sour island
#

แม่ของฉันบอกว่านี่เป็นความจริง

cosmic condor
heady crystal
#

Works

#

Idk tho. I kinda like Gizzard.

#

I have no idea what that means it just sounds like a funny word

#

Thanks for letting me know, I'll see if I can fix it 🙏

heady crystal
#

I have literally 0 knowledge about Thai tbf

sour island
#

I put 'my mom says this is true' into google translate

cosmic condor
#

Google Translate is quite good, but needs some post-editing to check context and formality of language

heady crystal
#

It's funny to me cause it changes sometimes for seemingly no reason

#

Sometimes I write super complex stuff and it translates even obscure expressions into my native language.

#

Sometimes it can't understand basic stuff that it used to

dark wedge
sour island
#

Really odd, my github action wouldn't update workshop.txt stuff - had to manually upload it to enact changes

#

Hoping there isn't an issue with the actual mod files

ancient grail
#

Yes me

sour island
#

there's issues introduced into the teleport/inspect buttons - will look into it tomorrow if I have time

ancient grail
#

Hehe
Do you have onserverconmand onclientcommand related

sour island
#

There's no frameworks/Patch content yet

#

it's just debug tools, if that's what you're asking

ancient grail
#

I dont use those anyways

#

Question . Can you assign time action to zeds

#

Probably not

dark wedge
#

oh cool, so the Community Patch is going to be like a set of common fixes for the base game? Or is this some sort of patching API (haven't read into it, sorry). If so, i have one. lol

sour island
#

The patch mod will be various fixes or even QoL stuff that don't really warrant being a stand alone mod

#

i've made at least 3 mods that fit the "fix that shouldn't really be it's own mod" criteria and I'm sure there's various ones all over the workshop too

#

One thing that also would be done is refactoring the vanilla Lua (by hard overwriting if necessary) to make mod compatibility possible

dark wedge
#

i have included the same few small "fixes" in 3 mods now, just to make sure its g2g. drunk

sour island
#

Hm?

dark wedge
#

Was agreeing with what you said. ha. there are definitely some small tweaks that don't warrant their own mod, and i've just included the same "fix" (imo) for the clothing actions in 3 different mods because its so trivial. You can't equip shirts or other clothes and move, but you can unequip them and do so just fine. I just fix that. pants/shoes or whatever are handled via the animation.

queen sail
#

Hello, a mod that I was using on my server server was using was removed from the Steam workshop, and now friends who have not downloaded the mod previously are unable to join, as they cannot install all the correct mods. I do not want to remove the mod or restart if I do not have to, although I realize I may have to restart the world to change the mod list at all. I would like to know if i could upload the mod to the steam workshop, set to private or link required or whatever, and simply allow provide people trying to join a link to the page so they can subscribe to the one I have posted while replacing the removed workshop mod on the server and replacing it with my private copied mod?

cosmic condor
queen sail
#

What is the problem with changing the workshop ID? If it is just that my upload will not be recognized as the original on the current server because of a different ID, would it solve the problem if i restart the server with the archived mod in place of the original?

cosmic condor
#

Your friends will need the workshop ID to identify which workshop item that the client should download

#

If you reupload the mod it will counted as a new workshop item

#

1 workshop can contain multiple mods

queen sail
#

Right, and when people try to join the server, they are prompted to download all of the mods on that server- So when they go to download mods, they can't get in because one is unavailable. If i have replaced the one that is no longer on the workshop with an exact copy that I have placed on the workshop, we can continue to use the mod, albeit on a new world, and people should be able to download it from that prompt screen when they join right?

cosmic condor
#

But that way, it would defeat the purpose of not removing the mod from your mod list.

#

if it get removed, something must be wrong with that mod and should not reupload it

#

just remove it from your server's mod list is the best solution and easy to do

queen sail
#

While i appreciate the advice and the response, I know that removing the mod would be the quickest and easiest solution- I do not want to do that, and am asking about whether this solution will work, not whether it is a good idea to continue playing with the mod

bleak lantern
#

Is there a cheese mod?

fast galleon
cosmic condor
#

If the problem is that your friends can't join the server, removing that mod is the solution

#

but if the problem is, I want to keep on using that removed mod, then I have no idea

queen sail
#

That was the point of the question, was that i wanted to continue using it. That's what i intended to convey by saying I do not want to remove the mod, and that i understood removal was the quickest and easiest solution

cosmic condor
#

Could you tell which mod?

#

If the mod is not complicated, you can try learning and creating a new one

queen sail
#

The mod is rather complicated, I am not going to learn to construct it from the ground up. What i want to do is use a non-trademarked piece of software on a private server, and I want to know if the method I have described will work for archival and distribution

cosmic condor
#

I would say I never try that

#

since I have no idea which mod are you referring to, I'm not sure if the mod left some thing on the server and your new uploading mod will catch on or not

fast galleon
pulsar heath
#

anyone knows a moodle mod i can have a look around?

#

trying to add rewards to buy moodles for the player

queen sail
#

we tried swapping the folder around on a google drive but couldn't get it to show up properly, I think the only way is to get it on the workshop

fast galleon
#

I heard people use nosteam so workshop is not the only way.

cosmic condor
queen sail
#

Even when the person in question had the folder named after the mods workshop ID in what we believe was the proper folder, it would show up as downloaded in their Mod menu but it would not let them into the server because they were not subscribed

#

as far as i understand it

cosmic condor
#

because the workshop is missing

#

the game need to verify if the content on steam workshop is the same as your local folder or not

queen sail
#

Right, that's why i want to upload it to the workshop- but keep it private so i can link it to the person i want to use it, and not have it publicly appear on the workshop

ionic ginkgo
#

Mod owner is the man for this

cosmic condor
#

My stance is: Don't do that. But if you insist, then I can't help

pulsar heath
#

with custom icon and label

#

basicly looking for a moodle mod where i can get a clear view of how it works in vanilla

pulsar heath
#

thanks 🙂

dull moss
#

@pulsar heath or just look at moodle framework on workshop, it has links to mods that use moodles

slate sable
#

how do I change the cost of a occupation? this is an example code im not sure if this is written correctly

#
    fitnessInstructor:addXPBoost(Perks.Fitness, 3)
    fitnessInstructor:addXPBoost(Perks.Sprinting, 2)
    fitnessInstructor:addFreeTrait("Nutritionist2");
end```
#

Im unsure if this will cause issues or not since its coded the same way as the vanilla code all I did was change the number from -6 to -9

#

or will it overwrite it.,

thick karma
#

There are alternatives to uploading work that doesn't belong to you if you're talking about an extremely small server

#

You could stick local copies of the last working mod in each player's Zomboid/mods folder.

#

That would not automatically download things, but would allow use of the removed mod.

#

Otherwise, I would contact the mod author and ask permission to upload a new copy with a new workshop ID, if possible.

nimble spoke
sour island
warm flame
#

Hey so i know this isnt the purpose of this channel, but does anyone know of a mod that adds more zone types to the admin panel? Or if it would even be possible to do? Im looking to be able to create zones with different rules such as disallowing construction/object placement

slate sable
#

or should I write the script in a different way?

#

that may be more efficient?

jaunty marten
slate sable
jaunty marten
weak sierra
#

the biggest concern imo is violating the original uploader's rights re: their mod

#

i usually try to reach out to the mod creator and make sure they did it on purpose actually

#

often they think "hidden" still lets people download and use it

#

and what they wanted was "unlisted"

thick karma
#

definitely did that

weak sierra
#

ur not the only one either lol

neon bronze
#

Can i „remove“ my result from a crafting recipe action by setting it to nil in OnCreate?

faint jewel
#

@vast nacelleyou here?

nimble spoke
neon bronze
#

You dont happen to know it by chance 🙏

nimble spoke
#

RemoveResultItem:true,

neon bronze
#

So its just there for not giving a result item right?

nimble spoke
#

yes, you set up a result item, that is shown by the context menu, but isn't given to the player

neon bronze
#

Ahhh

#

I just wondered why tis wouldnt make the result argument non obligatory but this makes sense

nimble spoke
#

If you absolutely don't want a result item or recipe UI shown in game then I guess it should not be a recipe

neon bronze
#

Nah this is exactly what i want i had to do it through the OnCreate but this is direct

weak sierra
#

look at my Udderly Gun Reconditioning mod for reference if im wrong

#

i do that for the reconditioning recipes

weak sierra
#

that's what happens when u skimmmm

#

xD

faint jewel
#

argh. this moving items is gone be rough lol.

ancient grail
pulsar heath
#

i remember seeing somewhere in the forums a post with the keyboard key codes but cant seem to find it... anyone knows the link?

#

nevermind... quicker to do a small function to return the key code when i press it...

jaunty marten
#

there is any mod on workshop that helps to faster and easier build house or smth else by some layout? I mean build tool, not creative tool, exactly build one

#

I have some idea but maybe someone already created it

tardy wren
#

Uh, remind me, how does ZombRand work?

polar thicket
#

Me and a friend of mine is having some issues making the textures for our mod work.

I have made the appropriate art in the correct image format and with the correct ressolutions (using original extracted game textures as a reference to make the images be the correct way)

But the documentation we can find with the tilezed program is all over the place. We managed to make the .pack file.

But we are having problems making the tilesheet file

sour island
polar thicket
#

The mod intends to add a new placeable object to the game (generator of sorts)

jaunty marten
jaunty marten
tardy wren
#

Another question, Can you override Recipes?

fast galleon
#

I was helping a guy yesterday, not sure how far he got.

polar thicket
polar thicket
pulsar heath
#

@sour island how did you make the icons for the EHE? ISUIElement?

#

the ones that track the heli position

tardy wren
#

Is getUsedDelta the amount remaining or the amount used up?

jaunty marten
#

@sour island u working so much with ui, there is any function on lua side to draw polygon or at least triangle? tried to find any reference from java to lua but nothing

sour island
#

There is drawRect

#

You could try scaling a texture but it would probably look pretty bad

pulsar heath
#

yeah the markers

jaunty marten
pulsar heath
#

was trying to do something with a icon and a value on top of the image by using ISPANEL

#

but then i remembered... your markers for the events

jaunty marten
#

I don't mean drawTexture just draw colored polygon or triangle

sour island
#

I've only seen drawing an image to an aspect - you can control the aspect for x and y axis

#

I think drawRect has a width and height but it's only squares

pulsar heath
#

working with ui in pz is a pain the ...

sour island
#

Other than maybe drawing outlines or lines I don't think there's other shapes

jaunty marten
faint jewel
#

I need a code buddy

tawdry solar
#

shit ass true music mod addon

jaunty marten
tawdry solar
#

like what

faint jewel
#

well those are difficult to manage.

tawdry solar
jaunty marten
jaunty marten
finite radish
# tawdry solar

...idk that you can go blaming another mod when you don't have the correct folder structure

faint jewel
#

lua is barely a MCHINE language, much less a human language lol

finite radish
#

lua isn't a machine language at all, it's a scripting language

tawdry solar
finite radish
faint jewel
#

especially with the pz api that is spottier that a herd of dalmatians.

jaunty marten
tawdry solar
#

hold on

#

i think i extracted it wrong

jaunty marten
#

like u wanted the code monkey but now u need the code buddy, so I think monkey even couldn't figure out what do u want

faint jewel
#

have i asked about a monkey?

jaunty marten
#

it was a few days ago

#

I remember

finite radish
#

the sooner you accept that Zomboid modding is done best by writing Java logic but in Lua syntax, the better off you'll be

faint jewel
#

i'll be damned.

jaunty marten
#

🦧

#

I have only orangutan..

faint jewel
#

i have like 3 projects that need assistance beyond my capabilities.

finite radish
#

sounds like you either need to re-evaluate your scope, or you need to just buckle down and learn more

faint jewel
#

with a buddy, i can offer art for THEIR project in exchange for code help with MINE.

#

i am trying, but i like doing art WAY more.

jaunty marten
#

art? wdym

faint jewel
#

models, textures, ui stuff... ART

bleak lantern
slender mulch
#

It will happen

jaunty marten
faint jewel
#

well my carry mod, i need to take the items that a player is carrying and put them into a tile that is placed.

#

my trucking mod needs a once over to finalize and correct some stuff.

#

and my stupid ass ice cream trucks are STILL broken

jaunty marten
faint jewel
#

okay... my boxes mod? do you know of it?

jaunty marten
#

what's the tile?

#

yep

faint jewel
#

you can pick up world tiles, and carry them as models, and then place them back on the ground as tiles. while they are in your hand you can put stuff in them. i want that stuff to be placed into the tile that is created when you place it down.

jaunty marten
#

world tiles so u can pick up grass tile, right? not grass object but exactly grass tile, and while it into ur hands u can put some items inside and when u will put tile from hands on any tile it will automatically place all items from hand tile container to this place too, right?

faint jewel
#

boxes and things.

jaunty marten
#

I'm still confused about picking up the tile and how it can contain items 😅
maybe do u meant any container object?

faint jewel
#

one second. i will show you.

jaunty marten
#

oki

tardy wren
#

So, is it possible to override recipes like you can do with items?

faint jewel
#

yes

jaunty marten
faint jewel
#

the box on the ground... is a tile.

jaunty marten
#

so if there's any items inside u picked up it and place it again there have to be same items, right?

jaunty marten
#

it's fine now

faint jewel
#

if you put items in it while you are carrying it, i want those items to be moved to the box on the ground when you place it.

jaunty marten
#

with ur mod when player will unequip hand tile it will be dropped from inventory, right? won't go into player inventory

faint jewel
#

it will go to the box on the ground

idle dawn
#

I'm gonna add that delay to the explosion I mentioned then spawn as many zombies as possible.

#

And not lower any graphic settings.

jaunty marten
idle dawn
#

Do we have a tick function or something that returns the time since session start in ms or something?

#

And if so where is it found.

subtle sapphire
#

hello everyone, I have the feeling that composters are broken. They provide an unbreakable defense against zombies, they don't even attack these objects. Do you know if there is a way to make composters "breakable" or, remove them from the game?

thick karma
#

In GameTime

#

Idk what it does but it sounds good

dark wedge
faint jewel
#

yeah i have tried a few things and it appears that the newitem is a moveable and NOT the tile.

#

so yeah it's fun

idle dawn
#

I'll look into it, but if you can tell me where it is in the files lmk.

faint jewel
#
                    -- MOVE ALL THE SHIT IN THE HELDITEM TO THE PLACED ITEM.
                    local HeldInv = visibleItem:getInventory()
                    local HeldCont = visibleItem:getContainer()
                    local PlacedCont = newItem:getContainer()
                    if getDebug() then print("DEBUG - The count is :" .. HeldInv:getItems():size()); end
                    --if instanceof(HeldItem, "InventoryContainer") and HeldInv:isEmpty() then return end;
                    if HeldInv:getItems():size() > 0 then
                        getPlayer():Say("I need to empty this before I can place it.");
                    end
                    
                    _character:getInventory():Remove(visibleItem);
                    return originalPlaceMoveable(self, _character, _square, _origSpriteName);
``` this is how i;m at least blocking it for now
subtle sapphire
idle dawn
#

Looked at the tutorial and it basically has everything I want, with intellisense from the decompiled project.

#

I don't have to be guessing where everything is.

#

Other then learning some wacky plugin emmylua, should be okay.

faint jewel
#

that's the closest I've ever had those.

rancid tendon
#

we love close numbers... good sign

finite radish
faint jewel
#

lol wut

bronze yoke
#

i find that subscribers kind of snowball because of servers

rancid tendon
#

yeah i figured that's what it was

bronze yoke
#

it's usual for visitors to be much much higher than subscribers at first, and then over a few months subscribers overtake the visitors

faint jewel
#

yeah

finite radish
# faint jewel lol wut

it's an experimental proof-of-concept map with a catchy name and a decent logo, so I'm not surprised really

faint jewel
#

it replaces the road tiles with dirt? lol

finite radish
#

(and removes the lines, among other things, but that's more or less the premise)

dark wedge
#

lol. idk what i did wrong:

finite radish
#

you clickbaited 10k people

idle dawn
#

dirt

dark wedge
#

also, mfw i realize my comprehensive animation mod lost in popularity to a mod that adds a cardboard box. unhappy
jk @faint jewel nice work. i guess you won our battle. 😆

tame mulch
faint jewel
#

ffs

#

the hell mod is that?

faint jewel
#

LOL

nimble spoke
#

I will never understand how a suicide mod can be so popular in a survival game haha

finite radish
#

people want to escape reality and live out their fantasies

faint jewel
#

says a LOT about the players i guess

bronze yoke
#

that was the first mod i ever got, i was surprised it wasn't vanilla (though i can imagine their reasons now LOL)

#

it's just a staple of zombie media, and suitably dramatic

red tiger
finite radish
#

i doubt it

idle dawn
idle dawn
drifting ore
drifting stump
drifting ore
#

doesnt that just indicate that it's on a ton of servers as a collection vs in a modpack?

#

with low visitors vs subs

drifting stump
#

yes

drifting ore
#

your stuff is way too good dhert.

#

there is not nearly enough QOL stuff out there imo. i'm a roleplayer at heart so my mindset is diff than alot of others, but i will say that this stuff stands out to me as much or more than most other mods. fancy handwork alone is becoming one of my favorite mods out there just because of your work with animations. it's literally so sick dude

dark wedge
idle dawn
drifting ore
#

maybe but i swear when i used it it was updating per second

#

not ms

#

ohh nm i read tha twrong

#

yea thats right

#

wait maybe one more 0?

#

math isn't my strong suit but ms are 1000 per second right

#

so 3 zeros

#

someone please clarify cuyz i swear it was just by seconds also

#

or another method also is cool 😄

#

just test it also and you will see it's usage. can print to be sure

#

but i was making an auto restart mod (really just a save and quit mod on a timer) and i used getTimestamp and worked

idle dawn
#

Basically, if it's every second, aka 1 = 1 second.

#

If I want to check for millisecconds, which is 1000ms to 1sec

#

100ms from that 1 second is 0.01

drifting ore
#

oh yes

#

i told you math isn't my strong suit LOL you got this

idle dawn
#

When I say is it "accurate" I mean if I ask it the function can return 1.423 and it doesn't just go from 1, to 2.

#

If it only changes every second, instead of MS

#

Luckily.

drifting ore
#

in console it tracks by individual ms

idle dawn
#

Oh, so it does show 1.234?

#

decimels?

drifting ore
#

so i think there is some level of tracking there

#

in console it just shows a flat number

#

like231904832984

idle dawn
#

Well luckily, we have a function called getTimestampMs.

drifting ore
#

LOL

#

there you go

finite radish
#

that's the tick count, you guys are looking for OnTick most likely if you're trying to get accurate clock readings

idle dawn
#

Which is wacky

#

OnTick is an event. Not what I'm looking for.

drifting ore
#

yea i think he's using for tracking

idle dawn
#

I can make a function that increments OnTick

#

But that's redundant if it already exists.

drifting ore
#

crater def knows more about the code itself tho haha so he's got something

finite radish
idle dawn
#

Freezes the game for 1 second when a zombie dies.

#

Since I didn't use spawn.

#

haha

#

tldr, I'm trying to make a slight delay on some code.

finite radish
#

yeah you definitely don't want to loop like that instead of using the game loop (aka OnTick)

idle dawn
#

Which you have to use coroutines for.

#

You "can" loop like that, it isn't a problem.

#

Just that it will stall the entire game to do it.

#

That's why you run a coroutine.

finite radish
#

...that's a problem, lol

idle dawn
#

xD

#

Well with a coroutine it'l try to async off the game loop thread.

#

So it should do what I tell it to.

finite radish
#

I don't really think that's possible in this context

#

Lua in Zomboid is more of a wrapper, it's missing a lot of basic features

idle dawn
#

Let me test and record it then.

#

coroutines are in base lua afaik.

finite radish
#

spinning off new threads also isn't a great idea in general, but if you can manage it more power to you

finite radish
idle dawn
#

poop

finite radish
#

it's more or less a wrapper that interacts with the Java code - almost all the Lua you're writing (if it's decent) should match Java-esque OOP and probably uses a shitload of Java method calls directly, as well as Java objects

#

so even if you could make a coroutine, I doubt the game process would even acknowledge it or have a way to communicate with it

idle dawn
#

Yeah, I think you're right on that then.

#

Let me check.

#

Might be ignoring everything in spawn().

#

But not throwing errors.

#

Yep.

#

Full ignore.

finite radish
#

yeah i thought so. you'll have to rely on OnTick

rancid tendon
#

sharing a little writing i'm doing for a mod feature that's in the works :p

finite radish
# idle dawn Full ignore.

just to give you some ideas, I use a modulo to handle delays and it doesn't block the game loop at all. buttery smooth.

e.g.

local function DoTickThing(delta)
    if (delta % 10 == 0) then
        -- do stuff
    end 
end

-- add to OnTick event here```

so every 10th tick (basically a frame - the game loop and render loop are more intertwined than they should be tbh) it'll run your code
idle dawn
#

I just found a file called Coroutine.lua

#

In the lua source files.

#

In shared.

finite radish
#

I'm not seeing that file in the vanilla game anywhere, unless VSCode is somehow lying to me

#

what's the path?

idle dawn
#

media\lua\shared\Library\Coroutine.lua

finite radish
#

I don't even see a "Library" folder at all

idle dawn
#

O

#

Hmm

#

I saw it in the zdoc-lua.jar thing.

#

Wack

#

All this bs.

#

Maybe it's a Java implementation?

#

Most of the stuff I'm looking in the library are Java things.

#

So potentially it's all the what do you call it.

#

The LuaManager implementation.

#

And this thing generated it.

#

So there might be a coded Coroutine class in java.

finite radish
#

could be an issue with that in particular, yeah. maybe it's put there as part of the actual Lua base library - but that's useless in this case

idle dawn
#

Hm..

finite radish
idle dawn
#

Let me play around with the functions either way.

finite radish
#

feel free. if you can't accomplish what you're trying to with the base game loop though, chances are you're just writing unoptimized code in the first place or doing some really wacky bullshit

idle dawn
#

If they implemented their own Coroutine class, which became accessable through LuaManager, would work.

#

Mostly wacky bullshit. I've been programming on other things and I'm used to doing things in certain ways.

#

But coroutines is a thing that's used.

#

Wack

bronze yoke
#

there's a coroutine class but it's only exposed in debug mode

idle dawn
#

O

#

Well, wow. xD

#

YOURE RIGIIGITHIHT

#

So yeah, we do have to rely on GetTick then for any time sensitive non-event code not inherently coded.

#

My goal atm is just to "delay" a code firing for some certain time.

sour island
#

You can use timestamps in conjunction with ticks

sour island
idle dawn
#

Oh yeah, I can check how long time has passed.

sour island
#

It's not perfect but being with in 0-1 ticks is pretty damn close

idle dawn
#

I'm not that concerned about the accuracy imo. Just the method. OnTick more or less means I'm checking every tick to see if a certain "time"/tick passed, to then run code. It also has to check if it SHOULD, and I have to pass it args.

finite radish
idle dawn
#

Remember I'm running this code when zombie dies.

#

So I have to tie it to that.

sour island
#

I've done exactly that

finite radish
#

what are you actually trying to do? I think this is becoming an XY problem

fast galleon
#

you could calculate the tick you need

finite radish
#

but yes - you could set a flag on zombie death, then have the code run OnTick

finite radish
#

tickspeed changes drastically with zoom level, regardless of PC specs

idle dawn
#

It's technically the most accurate "GameTime" though.

finite radish
#

oh yeah, definitely. no doubt about that

#

it's the best we have, but it's dogshit

idle dawn
#

There's two time spaces we normally use, GameTime and RealTime.

fast galleon
#

if you have only one check it shouldn't be that bad anyway.

idle dawn
#

RealTime being a timestamp of actual computer cycles or whatever cycle the game is using on program.

#

I'm just gonna have a thing that queues a function to run it.

#

And once it reaches past the timestamp, it runs whatever I need it to.

finite radish
#

you could also just use ISBaseTimedAction and ISTimedActionQueue since that's what they're good at

#

and it'd save you from reinventing about two dozen wheels

#

but if it doesn't align with your use case then you're SOL

#

(also useless if the thing you're trying to do isn't an interruptable action the player is initiating, I'm pretty sure. again, XY problem)

idle dawn
#

Yeah, it's nothing like that.

zinc pilot
#

I basically replace every instance of a "compatible" fence via tile checking at runtime during chunk loading

#

it's basically the same method TIS used to spawn traps in the world (didn't even know traps were spawned lel)

jaunty marten
#

@faint jewel it's a bug? if box in hands > capacity is 50 but if placed > 25

faint jewel
#

i might need to adjust it.

drifting ore
#

it should still place though right? just not able to interact with until it's below that threshold? or... thats my experience

#

unless there is something specific with placing that follows that rule as well

#

same goes if you place a container with those same parameters inside another container

#

having some kind of option for nested weight reduction would be sick. i thought it used to have it, but assuming it was treated as a bug that needed to be fixed?

vast nacelle
jaunty marten
drifting ore
#

that limit is hardcoded?

#

i thought

drifting ore
vast nacelle
#

Should be a thing, but is not currently

drifting ore
#

ahh yes 100% agree

#

toolboxes and kits and stuff are useless atm imo

#

might as well just always look for highest enc reduction

#

makes me sad when stuff is built that way. so linear

#

then again <roleplayer LOL so i always think of stupid stuff like that

idle dawn
#
local TickQueue = {}
TickQueue.Queue = {}

function TickQueue:AddToQueue(time, func)
    local timestamp = getTimestamp() + time
    table.insert(self.Queue,{timestamp, func})
end

local function RunQueuedTickFunctions()
    for k,v in ipairs(TickQueue.Queue) do
        if(v[1] <= getTimestamp()) then
            v[2]()
            table.remove(TickQueue.Queue,k)
        end
    end
end
Events.OnTick.Add(RunQueuedTickFunctions)

local function OnZombieDead(zombie)
    local cell = zombie:getCell()
    local square = zombie:getSquare()
    TickQueue:AddToQueue(1,function()
        --- And the zombies were electric...
    end)
end
Events.OnZombieDead.Add(OnZombieDead)
#

I made my own helper

#

Seems to work.

#

I'm not a programmer ngl.

fast galleon
#

yeah I do something similar

#

in your example you need to call getTimestamp only once

#

local current = getTimestamp()

#

@idle dawn what is the purpose of the wait here?

idle dawn
#

the wait?

fast galleon
#

the delay

idle dawn
#

They all explode at the same time.

#

"Exactly" at the same time.

#

Which I want to prevent.

idle dawn
#

So I give it a little offset.

#

Nah I got it. 🙂

#

But thank

jaunty marten
idle dawn
#

Fuck what's lua's rand(1.5) again?

jaunty marten
torn harbor
#

Anybody know a reference I can look at to make other tools with the "Destroy" option like the sledgehammer?

bronze yoke
#

probably the actual sledgehammer code would be the best to look at

jaunty marten
fast galleon
#

isn't it a tag now?

idle dawn
#

I assume we have the math library.

#

haha

torn harbor
#

Didn't notice anything in the code for sledgehammer at pzwiki

jaunty marten
#

I found it sometime

torn harbor
#

Maybe I didn't look close enough.

bronze yoke
#

it wouldn't be in the item script they show on the wiki

#

it'd be in the game's lua somewhere

torn harbor
#

Ohh.

#

Somewhere...

bronze yoke
tacit plover
#

this should work

fast galleon
#
function Recipe.GetItemTypes.Sledgehammer(scriptItems)
    scriptItems:addAll(getScriptManager():getItemsTag("Sledgehammer"))
    addExistingItemType(scriptItems, "Sledgehammer")
    addExistingItemType(scriptItems, "Sledgehammer2")
end
jaunty marten
#

just check "Destroy" string in translation folder > copy string id for getText and by it u can find context menu option with it

jaunty marten
#

my bad ded

torn harbor
#

I'm interested in a few things sledgehammer related.

idle dawn
#

I just got a nil error using the math library.

#

I'm shook

#

We no use math?

jaunty marten
idle dawn
#

tried to access null

#

math.random(0.15)

jaunty marten
#

we not using it XD

idle dawn
#

oml

#

I wanna cry.

jaunty marten
#

idk why but ZombRand

idle dawn
#

Why.

#

Why.

jaunty marten
#

it's math.random

#

u can ask tis

fast galleon
idle dawn
#

That true

#

Will save that in the do it later or never pile. This isn't for anyone else but me anyways until I decide to.

#

Either way I want names.

#

I want my methhh.

#

mathhh.

jaunty marten
#

math.random (ZombRand) u have

fast galleon
#

Use ZombRandFloat(0.15) I guess

jaunty marten
#

what else

idle dawn
#

I know but what If I want to know the cosine of a laden swallow.

#

So I can make pretty perfect circles.

fast galleon
#

math exists, just no random

jaunty marten
#

yes

#

math.cos math.ceil math.fmod all are exists

idle dawn
#

Security thing then?

jaunty marten
#

but really why math.random it's ZombRand angry

tardy wren
#

Okay, uh... Can someone tell me what getUsedDelta returns to me? Is it the amount left or amount used up? As in, a fresh thing will return 1 or 0?

jaunty marten
idle dawn
#

It's so random, no pun intended, that that specific function is replaced with that.

fast galleon
#

maybe it has better performance or there was issues

jaunty marten
#

mb it's just thing like adding IS to name of each file

fast galleon
jaunty marten
#

hah

finite radish
#

but like, even the most lua-y lua you can write is still very object oriented and you're constantly interacting with Java objects rather than Lua tables

idle dawn
#

We set up gradle anyways for the proper documentation.

#

😐

finite radish
#

ew

idle dawn
#

I had to use it to decompile things properly.

finite radish
#

why? you can just decompile the class files into java files

#

and then ctrl+shift+F in the project to find literally anything you need

idle dawn
#

That's what I did.

#

I never said I did anything with gradle.

#

The project was just set to use it.

finite radish
idle dawn
#

Because it was the most funny sounding name.

finite radish
#

"I had to use it to decompile things properly." implies doing something with gradle doesn't it?

idle dawn
#

If it works it works. Even if it had nothing to do with it.

#

Now if you'll excuse me, I got 100 notepad++ extensions to use that I 100% require for my workflow.

slate sable
#

I'm working on a trait and occupation change in cost, im unsure if the code is written correctly or if im leaving anything out important any suggestions or tips will help a ton.
Theres a weird bug with fastlearner and slowlearner you can take one or the other and remove it and then it will allow you to duplicate and pick multiple fastlearners not sure how to fix this bug.

idle dawn
#

But yeah I have no fuck clue this ide.

#

Or java

slate sable
#

Not sure if I have to add a event for professions or not, I have one for traits.

fast galleon
slate sable
#

how would I go about fixing the problem?

fast galleon
#

stop doing that

#

Is this going to be a workshop mod or personal use?

slate sable
#

workshop mod

idle dawn
#

I tested against some good ol zombonies. Seems like the timestamping is a bit wonky on timing, Random between 0.15 turning out to be near half of a full second anyways? Moh tester later.

#

I'm done modding for the day I got other things.

#

thanks fam

fast galleon
#

considering how many mods do the same thing, there's a lot of compatibility here to consider. Not sure which one to use as a good example.

idle dawn
#

There's a mod that makes all traits free I think.

#

Anyways im out

slate sable
#

well I'm not trying to add new traits or professions just trying to modify the cost

#

I haven't found a good source of references to know how to write in java, I tried looking at PZ modding wiki but I couldn't find anything regarding a written language to go off for what im trying to do.

#

simply don't know what im doing and my mod writting is a mess

#

here to learn

fast galleon
fast galleon
jaunty marten
#

for traits u changing only cost as and for profs?

drifting ore
#

Idk if thats the right place to ask and it may sound dumb how hard Lua is compared to c++?

#

Cuz i guess that mods are almost entirely made in lua right?

jaunty marten
#

I wanted to say to u do same thing as for profs setCost but checked traits and there's no function setCost for them but only get

#

wtf

fast galleon
#

base hook to add professions correctly by Fenris #mod_development message

local original_doprofessions = BaseGameCharacterDetails.DoProfessions -- copy the original
BaseGameCharacterDetails.DoProfessions = function()
    original_doprofessions() -- call the original

    -- now do the stuff

end
Events.OnGameBoot.Remove(original_doprofessions)
Events.OnGameBoot.Add(BaseGameCharacterDetails.DoProfessions)
--- add profession
local burglar = ProfessionFactory.addProfession("burglar", getText("UI_prof_Burglar"), "profession_burglar2", -6);
--- or get profession for some edits
local burglar = ProfessionFactory.getProfession("burglar")

You can see examples in the file lua/shared/NPCs/MainCreationMethods.lua

selfPins professions

jaunty marten
slate sable
#

😐

fast galleon
slate sable
#

I already said i don't know what im doing, of course its bad.

drifting ore
jaunty marten
#

I tried to explain in simple terms

bronze yoke
jaunty marten
bronze yoke
#

lua is designed to be a lot simpler

drifting ore
#

Alr then I'm gonna start learning Lua soon

#

Cuz there's too many mods that i wish that existed

fast galleon
jaunty marten
drifting ore
#

looks like i've got a deaf trait to fix

#

you think it's possible to block voip listening? i haven't looked so ignore me if you feel im too lazy for asking before looking

#

only thing that would make deaf balanced is blocking them from hearing voip

jaunty marten
slate sable
jaunty marten
#

blind trait same

zinc pilot
#

ouchie ouch

jaunty marten
#

no offense

slate sable
#

Mhm surely not intentional. AngryTom

jaunty marten
#

sure unhappy

drifting ore
#

going to for sure fix my bad edit to deaf trait though lol

#

it was my first attempt at an overwrite

jaunty marten
#

just figured out what u can't alt-tab while pz is loading or reloading lua if you didn't press alt-tab in a small time lapse after button press but with alt-tab and after ctrl+alt+delete it's fine

#

how much time I'm spent in loading menu..

drifting ore
#

ohhh because it pauses when not in focus sometimes?

#

or am i misreading that

#

or cause issue?

jaunty marten
#

u can't alt-tab while loading is up

drifting ore
#

oh didn't even try ever lol

#

or didn't notice

jolly locust
#

Is there an appropriate channel for just spitballing neat ideas for mods/features?

zinc pilot
#

and that's why I just work in windowed mode

jaunty marten
#

u can alt-tab if u press button to load into world and in almost same time doing alt-tab

fast galleon
#

I always alt-tab, just causes some lag depending on when it's done

jaunty marten
#

mb do u know

#

or it's base parameters for any steam game idk

#

I used it in gmod

zinc pilot
#

alt+enter is your friend

crude talon
#

How would one edit the zone type (namely residential/non-residential) of an area of the map?

drifting ore
#

this is a mapping question really. but you'd have to create a new objects file that redefines the zone? unless you mean worldmap, then you'd just have to rebuild the worldmap.xml on top of a picture of what you are trying to define, write a new worldmap.xml and make sure you patch it to overwrite the original cells you want updated

#

any other questions for mapping i'd stick in #mapping

crude talon
#

oh yes I forgot about the mapping chanel

wide oar
#

i made another mod and um

#

[26-01-23 17:27:24.025] ERROR: General , 1674775644025> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at NativeMethodAccessorImpl.invoke0 (Native Method)..

#

i get this error whenever i try and launch it enabled

#

and i get the stupid no hud menu again

jaunty marten
#

it's part of it

wide oar
#
  • reuploaded cuz i forgot to revert a test i did to see if it was the textures (it isnt)
jaunty marten
#

I'm not sure but seems problem with Easy Config Chucked try to use this manual

#

cos I don't see any problem in ur code or scripts

#

stop

#

found

#

26 line

wide oar
#

that will teach me to use a older version of my own mod as a base (i used the broken files i had for the silver ghost before i fixed it on accident i guess)

#

rip

#

hahahha

#

ty

jaunty marten
#

yup spiffo

wide oar
#

still broken

#

._.

wide oar
#

i did and still nothing

#

my error logs are also just worthless lmao

jaunty marten
wide oar
#

yeah idk

#

could it be how i exported the fbx

#

does that even matter with weapons

jaunty marten
#

didn't work with weapons so idk

wide oar
#

oh well

#

i only spent like 10 minutes on it so i dont care

#

sucks that it doesnt work but i dont feel like smashing zomboid with a hammer repeatedly to figure out what the fuck the shitty obscure log error means

#

thats the one point i think they should improve on, clarity of the logs, like actually tell me whats wrong dont just throw a random ass error, i still remember my teacher telling us that errors should be helpful and allow the user to figure out what is wrong, and that is nOT what the zomboid ones do.

rancid tendon
#

sometimes you'll get a completely clear error that tells you exactly what the problem is

#

and sometimes you'll get "Oh no an error! The game crashed. What error? Eat shit"

#

it's either like 'The error was at line 29 of this specific lua file in this specific mod' or 'An exception was thrown and the game crashed. Sowwy'

#

also

#

sharing a little more radio dialogue from something im working on :3

sour island
# wide oar

That's a vanilla bug - it's trying to delete those files but has the wrong path (typo: Lua vs Lua) - you can manually delete those files. They're in the Lua folder in your local cache.

#

Also I'm still not sure why the system is flagging those files to be deleted and why it's trying so hard to delete it

wide oar
sour island
#

If you're getting the no file exception deleting the files will fix it. Idk about your mods' issue. Sorry.

outer citrus
#

I really think the Project Zomboid sandbox could really benefit from a musket, something worth considering maybe?

ancient grail
bronze yoke
#

i don't think voip goes through lua in any capacity

ancient grail
#

Ban voip or mute idk the exact function to do that but im sure if you can do that as an admin then you can do that via lua

drifting ore
#

that was the part i wondered

ancient grail
#

Ow shiz albion said it cant be done

#

So ye it cant be done

drifting ore
#

not possible to call anything from java at all here?

bronze yoke
#

admin mute might work but afaik admins can't 'deafen' someone and obviously using admin mute will mute everyone for everyone

drifting ore
#

hmmm