#mod_development

1 messages Ā· Page 51 of 1

young grotto
#

alright thanks

rancid tendon
#

@bronze yoke does this look like it'll work?

#

if you don't mind taking a look rq!

bronze yoke
#

i'm concerned by this 'CassetteNancySinatraTheseBootsAreMadeforWalkin'(1966)', looks like some of your item names have single quotes in them which will break the string

rancid tendon
#

NOOOOOOO you're right a bunch of them do

bronze yoke
#

maybe it's a little late to say this but it looks like you should've used double quotes...

young grotto
#

oh nevermind found it, its 0.0625

bronze yoke
#

where did you find that?

young grotto
#

Project Zomboid directory/media/scripts/

rancid tendon
#

that's super easy to fix if so

bronze yoke
bronze yoke
#

but 800 item names to change... have fun

young grotto
#

err propane tank? not propane torch

rancid tendon
#

oh no i have a tool that does that for me!

bronze yoke
#

oh that's great

#

and i suppose you'd only have to look for and change the buggy ones

rancid tendon
bronze yoke
rancid tendon
#

this thing has a lil option to put symbols on either end of each part of the string so i can just change those to "s super easy

bronze yoke
#

oh that's super useful

#

i'll have to bookmark that

rancid tendon
#

givin it a shot now

#

if this works i'm gonna be so happy it'd solve all of my problems with this system lol

hearty dew
#

Should also be able to escape the ' inside the strings by replacing them with \'

clear seal
#

hey guys im new to the this discord how u guys doing? i have a dedicated server and was wondering if any1 knows a mod that gives more starting locations instead of just the standard 4. i tried getting the "More Starting Locations" mod and that didnt work

hearty dew
rancid tendon
#

hmm this leads me to a question actually

#

when you're deciding on the drop rates of items

#

is it like... what is the 'guaranteed' drop rate? 100?

bronze yoke
#

i've seen the same item in different containers with the same spawn weight have different spawn rates in lootzed

hearty dew
rancid tendon
#

hmmm

#

the dummy replacement code doesn't seem to be working

#

this is what i'm using atm--anything stick out that might be broken? šŸ˜… i probably didn't realize i was supposed to fill something in or smth

bronze yoke
#

have you checked if the event actually fires for corpses?

rancid tendon
#

how would i go about testing that?

bronze yoke
#

reading from the java it doesn't look like it does

rancid tendon
#

aw darn; is there one you think would work for corpses? this is a shot in the dark based on some googling but maybe OnContainerUpdate?

bronze yoke
#

oh yes it will!

#

oh it gets called on the client only though...

rancid tendon
#

ach

bronze yoke
#

let me check how the client adds synchronised items

#
local function replaceDummies(container)
    local dummies = container:FindAll('Tsarcraft.BlankCassetteMain')
    for i = 0, dummies:size()-1 do
        container:removeItemOnServer(dummies:get(i))
        local itemChoice = ZombRand(#itemList)+1
        container:addItemOnServer(itemList[itemChoice])
    end
end
Events.OnContainerUpdate.Add(replaceDummies)
rancid tendon
#

thank you!! i'll give this one a shot! :)

#

hmm

#

that one seems to produce an error, lemme see if i can grab it..

bronze yoke
#

ooh i know

#
local function replaceDummies(container)
    local dummies = container:FindAll('Tsarcraft.BlankCassetteMain')
    for i = 0, dummies:size()-1 do
        container:removeItemOnServer(dummies:get(i))
        local itemChoice = ZombRand(#itemList)+1
        local item = container:AddItem(itemList[itemChoice])
        container:addItemOnServer(item)
    end
end
Events.OnContainerUpdate.Add(replaceDummies)
#

forgot about that one

rancid tendon
#

i'm giving this one a look! it seems to have.. resulted in a strange bug but im doing a bit more testing

#

it seems like it stopped producing errors, but instead it just kind of.. removed the dummy item from the drop list for zombies for some reason

bronze yoke
#

huh...

rancid tendon
#

yeah, they seem to just not be dropping the blank cassette at all and it doesn't show up in loot zed, but if i remove that chunk of code and just leave in the drop code i think it works just fine

#

gonna do a bit more testing just to be sure

#

also albion i've had you kinda tied up in this for a while so feel free to throw your hands up and go 'well i've helped you enough' whenever you need to, i know this is a lot of free help to expect from a stranger ;w;

bronze yoke
#

are you sure there's no errors? that sounds like it's erroring out

#
local itemList = character limit
local function replaceDummies(_roomName, _containerType, container)
    local dummies = container:FindAll('Tsarcraft.BlankCassetteMain')
    for i = 0, dummies:size()-1 do
        container:Remove(dummies:get(i))
        local itemChoice = ZombRand(#itemList)+1
        container:AddItem(itemList[itemChoice])
    end
end

if SandboxVars.MFTEOTW.zombiedropA then
    table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Tsarcraft.BlankCassetteMain");
    table.insert(SuburbsDistributions["all"]["inventorymale"].items, 100 * SandboxVars.MFTEOTW.zombiedroprateA);
    table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "Tsarcraft.BlankCassetteMain");
    table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 100 * SandboxVars.MFTEOTW.zombiedroprateA);

    ItemPickerJava.Parse()
    Events.OnFillContainer.Add(replaceDummies)
end
```this is how i'd format it, but i'm not sure that is actually the issue
rancid tendon
#

hmm, it doesn't seem to be printing any errors no

bronze yoke
#

oh, this isn't the whole program is it? with that ItemPickerJava.Parse() i imagine this part of another function that runs after sandbox options load

#

basically though, i wouldn't put the replaceDummies() function inside the main part of the code, i didn't point it out earlier because i think it should still work but maybe that's it

rancid tendon
#

it's sitting in the loot distribution table here!

rancid tendon
#

maybe it would like

#

benefit us if i just sent over the lua file so you can see what i'm doin with it

bronze yoke
rancid tendon
#

givin it a try!!

#

yipee!! that solved the problem of removing the item from the list!

#

but the replacement does not work ;w;

#

it just remains a blank cassette

#

.. wait

#

hmm

#

i have a couple of ideas as to why that might be

#

idea one is that maybe i don't need the Tsarcraft. on there for the 'findall' function

#

inversely, it's possible that maybe it's bugging out because i don't have the tsarcraft. on there for the items in the list

#

so i'm gonna change both of those things one at a time and see if either one fixes it

#

first one isn't the case, but at this point i'm almost sure that it's the latter--i bet it's trying to replace it with items that don't exist (the entire list) and just failing and leaving the item there

#

testing now

#

nope.. ;w; probably for the best that i added the Tsarcraft. bit to the list now, but that did not seem to fix it

humble oriole
#

is there a recipe line to prevent queued actions from happening on favorited/equipped items?

#

like dismantling 10 radios but I have 1 equiped it will ignore that one

bronze yoke
#

use an OnTest function

#
function Recipe.OnTest.NotFavourite(item)
    return not item:isFavorite()
end
humble oriole
#

does that work for isEquipped() too?

#

is that even a thing?

#

lol

bronze yoke
#

it is

humble oriole
#

is isFavorite() return True/False do you know?

bronze yoke
#

it does

humble oriole
#
    if not item:isFavorite() then
      return not item:isFavorite()
    elseif not item:isEquipped() then
      return not item:isEquipped()
    end
end```
#

or am I overthinking it

bronze yoke
#

you can simplify this to just return not item:isFavorite() and not item:isEquipped()

rancid tendon
#

thank you for all the help once again btw albion! you put a lot of work into making something work for a silly stranger's random mod, i appreciate it a lot :)

bronze yoke
#

aw thank you ^_^ sorry i couldn't fully solve your thing, i honestly have no idea why that isn't working now

rancid tendon
#

tis a shame! zomboid's a weird game, maybe there's some arcane thing about the way zomboid handles zombie corpses as containers that is making this not work

humble oriole
#

Thanks albion, we're loving more literacy, people are grumbling that they lost their multiplier, but knowing you're working on that big update pacifies them ahha.

rancid tendon
#

i'll come back to the discord tomorrow and see if anybody else has some ideas on how i could manage the zombie cassette spawnrate

#

so work goes on, no problem that we couldn't figure it out tonight :) always more to try

humble oriole
#

Do you want me to invite you into our discord albion?

bronze yoke
#

sure!

humble oriole
#

hmmm, what's the tag for stuff that's "attached" like when you attach a hammer to a belt

#

There's isAttachedItem​() but it doesn't seem to have the same effect

#

as per say isEquipped()

bronze yoke
#

perhaps getAttachedSlot()

humble oriole
#

hmm, I'll try that

#

little hacky but

#
    if item:getAttachedSlot() > 0 then
        return false
    end
    return not item:isFavorite() and not item:isEquipped()
end```
#

this seems to work though, I'm guessing that the int that getAttachedSlot returns is the index of a table built to hold the "attached" items

#

and since lua indexes start at 1 it should never be 0

#

def annoyed they don't just give us isAttached() though, since that's pretty vanilla

humble oriole
#

loooooooool, now the recipe doesn't see my screwdriver if it's attached

silk hollow
#

Thank you so much Albion ā¤ļø

ancient grail
hidden compass
#

Can I add my own modded clothes to the mannequin's initial equipment?

ancient grail
#

Xyberviri tried this
And i dont know if he was able to acomplish the task
The thing is the inventory is afteryou place the manequin
Perhaps its possible if you just spawn the manequin
But theres no way to capture a player placing an object
Theres even an unused function
OnDestroyObject
I think it was

But i dont know how that works too.

#

If you are able to hook a function to the place item command then thats the key

#

I dont think anyone knows how to do this yet. There arent many mods that does place item i think

hidden compass
#

Thanks you,. It looks like the mannequin's equipment is defined in clothing.xml, but it would be nice if the mod could add items to this setting from the mod side, but I can't think of a way to do it.

silk hollow
#

In case someone is curious about how I managed the work with my mod, I've tried to keep the design simple and clean, some parts are a little more complex but I still think it can be helpful to whoever is trying to write it's own mod, so here it is: https://github.com/theCrius/project-zomboid-random-zombies-full

Contributions are welcome, in case it fits the scope of the project. One thing I "hate" about the modding scene is that every one is forced to create a new mod when wanting something slightly different. I'd greatly prefer to integrate new features instead so that the userbase don't have to go around shopping for 400 mods.

In any case, showing the source helps others create plugins/synergetic mods as well, so, there we are šŸ™‚

ancient grail
#

i cant seem to find anything about how pills work

#

the items onlysays medical true

#

but on lua i cant find where it is located

#

how does it determine the effect

drifting ore
#

Hello guys, i want to make my own spawn point mod in PZ, but i still can“t figure it out. Is any guide around the forums or something?

ancient grail
ancient grail
drifting ore
ancient grail
#

What files does it have

#

Have you by anychance have modding experience?

drifting ore
drifting ore
# ancient grail What files does it have

That“s the problem, i try to search in the mods folder. But it“s empty. So i can“t really look the files inside the mod when is downloaded in the workshop.

young orchid
young orchid
dapper geode
#

Anyone know why my mod's sandbox option doesn't showing in some people, but showing on some others?

#

It's like it doesn't load on everyone

thick karma
#

It may be that the ones reporting inability to see it do not know this.

#

It's insufficient to add it to the Host config, unfortunately.

#

Which... is honestly a bit of an oversight imo.

dapper geode
thick karma
#

Wanna link me to the mod?

#

It might be faster for me to subscribe and run it than to speculate

#

I would say if you're throwing errors from the lack of access to the sandbox vars, then for whatever reason they are accessing them at a time when they have not yet been initialized. This could imply many things, but if it's not throwing exceptions for one person and it is for another, I would guess that somehow the Sandbox Vars are being read in a different context or at a different timepoint in those two scenarios. So, e.g., if perhaps you tested as host with success, but the clients bug, then maybe something about being client caused the mod to try to use the sandbox vars before they became available. In general, I try to access the sandbox vars as late as possible in loading (preferably not until a function call from a live player) because then I can be sure they exist if I've named them right.

#

However, if I were you, I would still add protection against exceptions thrown by nonexistent sandbox vars by wrapping code that depends on them in a conditional, e.g.:

if SandboxVars.MyModName then
  --
end
#

That way if they do not yet exist they will simply not be used, and the defaults can be used instead without error until a point in time when your code can load them.

thick karma
dapper geode
thick karma
#

It depends on what you're trying to do

#

If your goal is to load your Sandbox Settings before initializing Mod Options, afaik, no.

#

If you wait to initialize Mod Options with your Sandbox Settings, other mods will not load after your mod.

#

I've gone down that road awhile

#

If you just want to access your sandbox settings, usually simply doing so after making sure your character is alive is fine.

bronze yoke
#

aren't sandbox options initialised before the lua even runs?

thick karma
#
local player = getSpecificPlayer(index)

if player and player:isAlive() then

end
#

No definitely not for clients. I have tried using them in my Lua and it throws errors if I try to just assume they exist when my Lua is loading. @bronze yoke

#

Using them in variable initialization is not okay.

bronze yoke
#

that was already a bad idea, but i've never observed this and i've had code that expects them before

thick karma
#

May work in SP or previous builds but for MP it caused issues for me

#

If it did work, using my SandboxVars in my Mod Options would have been trivially easy

bronze yoke
#

hmm well i didn't rigorously test multiplayer, but it did have quite a few subscribers before i changed it

#

then again, this is the same mod that i completely broke for a week and nobody reported it, so...

#

it's just a bad idea to begin with because while in my experience it's always initialised (it sounds like this may not even be the case) the server's settings aren't usually applied yet

#

i think there's some situations where they are but generally you want to wait before reading them or you'll just get the default value

ancient grail
#

Anyone knows the lua command for a server restart?.

bronze yoke
#

you can't restart a server with lua

#

you can shut it down but you can't restart it

ancient grail
#

Ok nvm i think misinterpreted the question

ancient grail
tardy wren
#

Uhh... To Find the position of an "=" sign in a string word I should call word.find("=")?

rancid tendon
# bronze yoke

ohh albion!! did u go back and work on it more that's so sweet you're the best

#

i'll get on testing this soon!! thank u!!

fast galleon
#
    local item = {}
    item.userdata = self.item
    setmetatable(item,{__index=function(t,k)
        local v = t.userdata[k]
        if type(v) == "function" then
            return function(arg1,...)
                if arg1 == t then arg1 = t.userdata end
                return v(arg1,...)
            end
        end
        return v
    end})
    self.item = item
#

In the end I ended up patching the class table, but this seems promising for next time.

rancid tendon
#

:D

bronze yoke
#

let's gooo

rancid tendon
#

ohhh this gives me so much power

#

excellent... this feature will now be like 5x as nice as it would have been otherwise

ancient grail
#

I have problem with something
If the item type is letsay meth_pan
And i decided to change to kt to meth_tray cuz ots more appropriate
The only thing ican change is the displayname right? Otherwise it will break servers with the mod

Imean they will lose the item
If ever some. Player has it

Is there a way via lua to do this without losing their stuff

#

Can i make like on the script both items the orig one. And the one i want it to be changed into and via lua change all of the first kne to the other? And make the first one obsolete or something

bronze yoke
#

you can't really change the internal name... but you shouldn't really need to right?

#

you can make a new item and have a lua script that replaces the old ones with the new one when they load or as a context menu action or something, but it's sort of overkill

ancient grail
#

Yeah was jist asking out of curiosity.
Wizards out there might know a trick

#

If its easy to do then why the hell not right

blissful salmon
#

I'm still desperate. I can't get my onUpdateZombie event to work anymore (like I already described yesterday). I created a new Server Instance (Local Hosted). I added only my (new) testmod to the server and beside of some scripts, textures and models (which all work), I just have a single lua file /media/lua/server/test.lua

local function OnZombieUpdate(zombie)
  zombie:setWalkType("sprint1") 
  zombie:setCanWalk(false) 
  zombie:transmitCompleteItemToClients() -- not sure if this is even needed
end

if not isClient() then
  print("Add event")
  Events.OnZombieUpdate.Add(OnZombieUpdate)
end

I can see the "Add event" in the log:

LOG  : Lua         , 1668546218341> 41’654’513> Loading: C:/Users/Peter/Zomboid/mods/SoulModClubTest/media/lua/server/test.lua
LOG  : General     , 1668546218341> 41’654’513> Add event

But the zombies don't get the sprint1. I have no clue what I'm doing wrong. I can't finde my error and I have no idea anymore what I can test...

fast galleon
#

there was a guy once who had to purge an item from server and he was replacing everything, there might be tools/help in mod support

fast galleon
blissful salmon
#

hmm... most of the time I tested in solo. I really start to think if it never worked on server. But I think I've seen other mods which manipulated the zombie on this event (server side). But I'll check this...

ancient grail
#

If i have a recipe that just do 1 thing like say oncreate: then it just allows you to say your coordinate for example

Then theres no other required item and you have that 1 item and you set it to keep

You will have a context menu of one and all

If you click all you will lag

Is there a way to remove that "all" context menu so that i can continue to do function only items without the risk making players go endless loop lag

ancient grail
ancient grail
#

Might want to try renaming test.lua
Idk i feel like its jinxed or something lol

blissful salmon
ancient grail
#

I bet you need onservercommand

blissful salmon
#

but I'm really not sure about Poltergeist's statement. Did it really work on the server. I have to check.

ancient grail
#

You have tried onServercommand before?

#

Heres wizard tyrir explaining the differences

blissful salmon
#

This is not what I want. OnServerCommand is executed on the client afaik.

ancient grail
#

And heres senpai Konijima giving a perfectly useable template

#

Yep but i think zombie owners is a thing

blissful salmon
#

I used my own function for this:

function SoulMod.server.SendCommandToClient(command, parameters)
  print("SendCommandToClient")
  if not parameters then parameters = {} end
  if not command then
    return
  end
  sendServerCommand("SoulMod", command, parameters)

end

But my game also don't recogized the sendServerCommand anymore... But I'm sure that it worked before...
I used a ClientCommand to call this on the server

function SoulMod.server.commands.SendAnimals(player, args)
  print("SendAnimals")
  SoulMod.server.SendCommandToClient("ReceiveAnimals", Animals)
end

and the list was sent back to the client...

ancient grail
#

And it has something to do with client but ireally havent tried to mess with em
As far as i know theres a debug event on admin context
And it doesnt show on other players

And so it means it can be shown if theres a server client pingpong

#

Hmm.. have you looked at accelerating zombies?

#

Maybe the answer is there

ancient grail
#

Also you might want to define the specific zed instead
Like for loop and look for isomovingobject and stufflike that

Can you try print(zombie)
print(getType(zombie))

blissful salmon
rancid tendon
#

hey question

#

if i want an item to potentially have a chance to drop twice on a container, should i just put a second entry into its loot table for the same item

blissful salmon
#

I remembered Tyrir sent me a script to check which events are fired...
#mod_development message
After executing it it seams thet the onZombieUpdate don't fire on Server. So obviously I never checked my code on a Hosted Server. I just was confused because when I spawn my own new zombie on serverside setting the speed etc. worked.
But thx for your support.

bronze yoke
rancid tendon
#

yeah that was the plan! thank u :)

rancid tendon
#

just a heads up, i gave you a special thanks credit! (I'd have given one to tyrir too for past stuff but i think tyrir prefers not to be credited)

bronze yoke
#

aw thank you ^u^

summer rune
#

Lets say there is an item like Base.Katana, which seems to spawn too often in some mods and renders the game too easy. Does anyone here has a small lua script that removes an Item with its ID from ZombieLoot and City Distribution?

ancient grail
#

why cant i put moddata on a getBuilding()

bronze yoke
#

because isobuildings don't have moddata

#

with exceptions, mostly only objects have moddata

#

that is, descendants of IsoObject, not the programming concept šŸ˜…

ancient grail
#

Im starting to look at java side codes now but i dont understand em still

ancient grail
astral dune
#

isn't arsenal a dependency of brita?

bronze yoke
#

yeah that doesn't sound right to me

ruby urchin
#

OnTick doesn't work on server side?

mellow frigate
sour island
#

Whose ever mod this is, please...

#

Kind of wish prints included the file they're from

trail lotus
#

anybody interested in making a working phone mod. basically a flip phone that can call other cell phones, each phone would have a different number. so if a player drops there phone another player could get it and have that phone number.

#

sounds dumb and unrealistic but for normal pz maybe players could rp getting cell towers up and working

#

for me personally i have a no zombie rp server so it would benifit me very much. haha and my players, it could be a simple ui skin that does the calling and texting. or if you want to take it farther with skins and what not by all means, i'd love to personally commision it just name your price,

mellow frigate
ancient grail
#

Ye i see that alot before too. I think its scrap armor but im not sure

ancient grail
ancient grail
#

Ow jeez the meth mod is doing the error thing again
My brain aint working anymore its 10am already i havent slept

#

Add all the tiles of the room on a table and modified each tiles moddata

After a delay
Loops the table remove the moddata of each tile
And nil the table

Where is that thing causing the error ... Could it be syntax.. ow man

astral dune
ancient grail
#

Ill find proof in a minute

#

Or i could be wrongn

#

And i learn from it

astral dune
#

that's removing vanilla stuff innit?

ancient grail
#

yeah seems like it

#

yep

bronze yoke
#

function RemoveItemFromDistribution(_dist, _item, _chance, _dorecursive)

ancient grail
#

i just thought it did cuz of the lua name

#

inever really checked the code

#

hahaha

#

atleast now i know

#

i always thought there was a reason for doing that.. sorta like a patch to its own mod for upgrades and stuff... idk lol no wonder i was confused whenever people talk about arsenal

bronze yoke
astral dune
#

it is a little odd

quasi geode
#

i always assumed it was so they can be updated independently. ie: lazy collaboration

#

i dont mean that in a negative way, just requires less communication and passing file back and forth

bronze yoke
#

aren't they the same developer?

quasi geode
#

no

#

brita does the models, arsenal does the coding

bronze yoke
#

i guess that makes sense then! i only had a brief look but that basically describes the majority content of each mod

ruby urchin
astral dune
#

ontick definitely works server side

bronze yoke
#

yeah absolutely

ruby urchin
#

I just used it, but I didn't get any results

---shared.lua
Events.OnTick.Add(function(tick)
    print("test")
end);
bronze yoke
#

were there any players on the server when you tested it?

#

if not, the server was paused because there were no players, so a normal ontick won't fire

ruby urchin
#

Probably was that

astral dune
#

I use serverside ontick to check the condition of every vehicle currently occupied by a player, works very well

ruby urchin
#

I still feel that server side works differently than in other games work

astral dune
#

I can't find a way to detect damage to an idle vehicle, bummer. I'll have to look at other vehicle mods to see if someone else has figured it out

weak sierra
#

fysa

#

i would think most servers keep that on so that time passes in expected ways

#

i certainly do

fast galleon
#

there's also other mods that copied the sledgehammer logic and left the same print

#

one of the mods even had two or more prints in this exact place

ancient grail
#

Haha šŸ˜‚ i just went with it .. it made looking backing at logs and investigations alot harder with all the spam

ancient grail
bronze yoke
#

i already got a pretty good explanation

ancient grail
#

Im curious about your door hp and floor spawning problems @summer rune any progress?

fast galleon
bronze yoke
#

nope, but i did discover that the bug only occurs when there's a rain barrel at z=0

#

potentially, it's something like 'rain barrels above the lowest one in the world don't work', not 'rain barrels above z=0 don't work'

#

i'm going to have another look given that extra information, but it's likely to be a java issue, and i haven't noticed any negative side-effects to the AddToWorld() solution

fast galleon
#

and this happens only when you build it or also when you place it

bronze yoke
#

i don't know, there's no naturally spawning rain barrels in the vanilla map

ancient grail
#

Whats the diffrence with ipairs and pairs again

I mean up till now i cant seem to remember and always end up figuring it out everytine i need to use one of em

bronze yoke
#

ipairs only loops through the numerical keys

ancient grail
fast galleon
#

do you have mods that change building logic or tilesheet

bronze yoke
#

i wouldn't test a bug with mods activated

fast galleon
#

I have no errors, but I test on Host.

violet pivot
#

can some one make a Ballgag mod?

summer rune
#

I mean the screenshots u posted.

ancient grail
summer rune
#

Errors here and there, because I want it to track the HP of all player build structures including barricades. However barricades dont have a HP u can read out. U can only read how much % dmg they have taken. So there is a lot of special cases.

#

+TimedActions
+Server has to check the HP as well. Because the HP is not always reliably synced across clients

ancient grail
#

So you stopped doing it for now?

lunar robin
summer rune
#

I did not implement setHealth(), neither did i use it. Some other modder of us overwrote the whole ISDoor Implementation

#

calling setHealth() is not working afaik.

vague hedge
#

Also is this the correct setup? It includes a .txt of some recipes

hearty dew
#

That error might indicate a file was not found, if that's those are the right error codes

#

Is your mod.info present with its thumbnail image?

fast galleon
#

ok so I was using a simple player:playSound but it seems to have stopped working, playSoundLocal works though

#

how do I add a sound for an isoObject

#

getFreeEmitter and play or something?

#

square:playSound is a thing, lol

bitter frigate
#

i'm back to working on my diabetes mod after months away and i'm so confounded. i remember writing NONE of this code. without my previous comments i'd be lost

astral dune
#

my last couple sessions have just been annotating my functions. Its easy to overestimate how much you'll retain without documentation

bitter frigate
#

YEAH seeing all my comments really makes a lot of the workshop items i'm digging through to learn the ropes as inscrutable as monoliths to some dark god. dear people who annotate their code: i love you.

vague hedge
ebon whale
#

Hiya, just a quick noob question, how could I go about shrinking the size of the icon of an item when it is dropped on the ground?
I believe there is a way to do this without shrinking resolution a ton?

tardy wren
#

Is there a function to call to make the player update their locally saved sandbox vars when connecting to the server?

#

I've ran into an odd issue where they seem to be updated when the player is disconnecting from the server

#

And it's causing issues with desyncs on client-side functions that use configuration from the sandbox settings

#

I probably should report that to the game devs instead as a bug?

bronze yoke
#

that has definitely worked for me, if that really doesn't work it's a recent issue

#

make sure you don't have some weird mod breaking it, and then yeah i would report it

tardy wren
#

I have only the mod that wants to use these variables

tardy wren
#

Hmmm... So... Any.way I can forcibly read the variables off the server?

quasi kernel
#

Welp, back to step 1 of modding.

tardy wren
#

Step one?

bronze yoke
#

it must've been silently patched in 41.78, since i couldn't find any patch notes that seemed related

#

that means they patched it about 10 minutes before my mod that needed it came out, which was pretty considerate of them

crimson lava
#

Hello would appreciate it if anyone could help me understand how specific zombies (or their outfits?) spawn chance works.
take e.g. table.insert(ZombiesZoneDefinition.Default,{name = "AuthenticBiker", chance=0.05}); from AuthenticZ. would a higher chance value increase the amount of Biker zombies spawning in the game or instead lower it? I'm confused because the mod "TheyKnew" has a sandbox setting which should decrease the spawn rate of a certain zombie type the higher you set it, except when looking at the source what is fed to the "chance" column gets higher instead of lower.

fast galleon
tardy wren
#

Directly from SandboxOptions

fast galleon
#

well sandbox isn't meant to change during playtime

#

what are you trying to do

tardy wren
#

The server owner is balancing a mod via sandbox options

#

Server is being reset and all

#

It worked for them

#

But me? It behaved like on my old settings

#

Map_sand.bin is the file they're save in locally, per account for the multiplayer saves

#

I then tested the mod on a local server. Shut down the server and game, let the mod load a new set of default sandbox settings(by deleting the mod's section)

#

Verified that the server has new variables loaded in properly

#

Then joined in with a player who had the old settings in their files. After joining, the file remained

#

But once they left, they updated to the new ones

mint sphinx
#

Another really really wierd question. Is there away to get the zombiod version or build number from a method call ?

latent niche
#

Heya, ive 3d modelled a bandana using blender and I want to add it to the game, is there a tutorial on how I could do so since youtube wasnt much help,

#

Any advice would be great

steep vortex
#

Is it possible to reduce perk levels (and respectively the xp for them)? Toying with the concept of a trait that sets skills to 0 but treats them all as skills that started at 3 or higher by adding the skills in normal character creation then taking them away on spawning (opposite to some traits from more traits which don't count for xp as they get added to the character in OnNewGame)

steep vortex
# latent niche Heya, ive 3d modelled a bandana using blender and I want to add it to the game, ...

https://theindiestone.com/forums/index.php?/topic/37647-the-one-stop-shop-for-3d-modeling-from-blender-to-zomboid/ This link is pinned in the #modeling
That channel might be more useful if the people paying attention to it regularly know more about modelling

latent niche
#

Thank you!

bronze yoke
#

IsoPlayer:getXp():setPerkBoost(perk, level) (where level is 0-3, granting you the perk boost you would normally get if you started at that level)

steep vortex
#

Thank you šŸ™‚

bronze yoke
#

there's also an IsoPlayer:level0(perk) which seems useful

steep vortex
#

Please could I ask where to find/access the error log?
Found it in the zomboid users folder

willow estuary
#

~~Message from the devs:

weapon/vehicle/character textures need to be a power of 2 in pixels of size (256, 512, 1048, 2096, 4096) from build 41.78.8 forward. This is to improve performance and memory management.
Issues with transparent pixels may otherwise result.~~
EDIT: The issue was resolved.

sour island
#

If you're trying to version lock your mod to can just use version min in the mod info I believe

#

Speaking of which I need to update those

willow estuary
#

Sorry, pixels, yes.

mint sphinx
#

also do you have an example on it

sour island
#

I'm not at home at the moment but if you have vcs or intelliJ and a copy of the decompiled code you should be able to find it pretty quickly

mint sphinx
#

i have one kind of decompiiled verson i guess or wait that was before i change computer ĀØ^ so yea only got utimate version at intellij lol

bronze yoke
#

it's getCore():getVersion() isn't it?

steep vortex
#

For a trait to be usable in HasTrait, what do you need to do? I've got it appearing properly and it can be selected but the error "attempted index: HasTrait of non-table: null" appears when I attempt to use it in an if statement

bronze yoke
#

that's not a problem with the trait, that means whatever you're calling HasTrait() on isn't a player object

astral dune
#

is HasTrait a static method? if its no then they're calling HasTrait on nil

steep vortex
#

Oh, right, thanks.
Wait, fudge, I wasn't passing _player into the function; would that be it?

bronze yoke
#

you should be calling player:HasTrait('TraitName') (or whatever your player variable is called)

steep vortex
#

The full line is if player:HasTrait("eagerBeaverTrait") then

I think I've just not set the player variable properly. One mod I'd looked at as an example set player to _player (passed to the function) although another uses GetPlayer()

bronze yoke
#

getPlayer() would work, but it wouldn't work in splitscreen (which nobody uses, but we should probably still plan for it anyway)

#

is your code linked to the OnCreatePlayer event by chance? that sounds like how you'd write a trait like this

#

the second variable passed from that event is the player object

ruby urchin
#
---manifest.lua
game_version '41.78.7'
author 'Dislaik'

server_files {
    "main.lua"
}
#
---server.lua
print("Wait 10 seg");

Wait(10000);

print("Wait 5 seg");

Wait(5000);

print("End Waits");
steep vortex
bronze yoke
#

it should be getPlayer(), not GetPlayer()
OnNewGame wouldn't work in multiplayer i think - and it might not work if you make a new character after dying either

#

using OnCreatePlayer does create the extra problem of needing to store whether it has happened or not though, as that will fire every time you load in - you can just use moddata for that

#

doing something like this would solve that issue - mod data is just a table that's stored on objects, and crucially it persists after saving and loading

if player:getModData().traitNameApplied then return end
-- the rest of your code as normal
player:getModData().traitNameApplied = true
queen leaf
#

I'm playing with Soul Filcher's Exploring Time, and I noticed that they've updated to not allow Gasoline in Bottles. Is there a patch or another means of playing with a more potable source of Gas for my lanterns? Thanks

steep vortex
fast galleon
#

I never get that one right with first try

steep vortex
#

Which log should you be checking for the most recent error? There's 5 debug logs and 5 console logs so not really sure what to start with

fast galleon
steep vortex
#

Thank you

bronze yoke
#

if you use the steam launch argument -debug, you can press f11 to view errors

#

sometimes you'll need the console.txt anyway but it can be a lot faster

astral dune
steep vortex
#

Thanks; using -debug does make it a lot smoother.

#

Hm, so no more errors, which is good, but not actually seeing an effect.
player:getXp():setPerkBoost(Sprinting, 3);
and other setPerkBoost lines are run without error but the character doesn't have those boosts

#

I've been using the names of perks from the zomboid-javadoc website in case that might be an issue

bronze yoke
#

Perks.Sprinting

steep vortex
#

Thanks; would this be right?
"player:getXp():setPerkBoost(Perks.Sprinting, 3);"

bronze yoke
#

i think so, yes

steep vortex
#

Thank you! It's working.

#

And thank you for all the patience with my questions

bronze yoke
#

of course ^_^

latent niche
#

Ive made a mod file, coded it according to a yt video and put it in my pz mods folder but its not showing up when I boot up the game, any reason why?

ruby urchin
latent niche
#

Do I need to upload it to workshop to even view it privately now?

ruby urchin
#

It not necessary, that path is at least it's the one I use to see/test my mods in development

latent niche
sour island
#

No

sour island
#

The game pulls mods from either one but they have different file structure expectations

#

You don't have to upload it for it to be read locally from the workshop folder

#

But you may have structured your mod in a way that it wouldn't work in the mods folder but would in the workshop

#

Without seeing how your mod is structured no one can tell

steep vortex
#

And Eager Beaver is released. Thanks šŸ™‚

digital ridge
#

Is there any mods to control how much fuel your generator use for a dedicated server can find the file to change that so either that or a mod would do that’s good

sour island
#

Isnt there a sandbox option for that - or is that just cars?

digital ridge
#

It’s not sandbox it’s through a hosting service with bisect

sour island
#

The game has sandbox options regardless - MP has additional configuration options

#

For a dedicated server, you probably have a file with settings you can change - but not sure if there's one for what you need

summer rune
#

Is it possible to send a chat message to a radio channel from the server (not from a client)? I want to create my own emergency broadcast.

digital ridge
#

I went through a bunch of files with the website couldn’t find any options so if there is a mod for it that would be a good solution but couldn’t find that either

#

If not then it’s gonna be rough for ppl who work to make sure gen is always on so good don’t go bad lol

bronze yoke
#

there are definitely options for that

summer rune
bronze yoke
#

oh, sorry, i was responding to someone else

sand harbor
#

is there a lower (and upper) limit to the "table.insert(ProceduralDistibutionsList" chance? i've been fiddling with it on a mod that adds tons of items and it doesn't seem like it has much effect

solid tundra
#

-- Hello all! Extremely new to Lua and modding (I have 3 entire hours of experience). I am running into a loot distribution issue that's in vanilla PZ. I can no longer find instances of Base.Journal in any of the normal locations when searching in game. - Checking the Distributions.lua file, I see a single entry with a weight of 4, in the "SideTable" group under the All heading group. In Rooms - Bedrooms, sidetable is called with a procedural list BedroomSideTable, in which the Journal doesn't exist. There's also a LivingRoomSideTableNoRemote & LivingRoomSideTable procedural lists. So my question is - Where the heck am I going to find a SideTable that isn't in a bedroom or livingroom? And specifically what I mean to ask is: What tool would allow me to parse or view the instances and locations of containers designated with "SideTable" that aren't in a bedroom or living room?

#

I'll have to add, that the All heading further gives definitions for many SideTables with zero loot in places like furniture stores / warehouses etc.

#

I'm almost wondering if they've accidentally removed it from the game.

bronze yoke
#

i did feel like i had almost never seen the item... and from what i'm reading of the code, i have to agree that there doesn't seem to be any spawns for it

#

it looks like you can get it as a junk item from foraging... but that's it

solid tundra
#

Welp. Guess its time to research modding in a recipe to cobble together a notebook & magazine into a Journal. If you're wondering its related to the Examine Corpses mod. It calls for a Journal to create the recipe item.

#

Thanks for the info!

bronze yoke
#

yeah, now that i'm looking at the item in-game, i don't think i've actually *ever* seen a journal before

#

and going through the expected containers with lootzed confirms that the item isn't set to spawn in them

solid tundra
#

They were exceeding rare a couple patches ago. But since then, it must've been changed to exclude them accidentally. They're still listed in that single table, but its not called anywhere now that they've changed the names of those two procedural lists.

bronze yoke
#

perhaps it's because it pretty much shares a function with the notebook? same sprite, just the journal has twice as many pages (which i'd bet there are few people who care about that)

#

also, when dropped, the journal uses a newspaper model... maybe it's not meant to be used anymore?

astral dune
#

does IsoRoom:getWindows() not work like I think it does? I don't appear to be getting an arraylist of windows

opaque ocean
#

that has downsides, ofc.

if the mod author pushes an update and changes something in the file you're overriding, you'd have to actually stay ontop of that and manually add the changes to the overwrite (if you want the changes).

but, that's pretty much the easy solution to tweak mods how you want them to work. (without reuploading someone else's mod)

(also make sure the file you're making is named the same as the one you're overwriting, and is in the same folder path.

so, meme.txt in /scripts, your overwrite is still gonna be named meme.txt and is still gonna be in /scripts but it's in a separate mod you're uploading and is loading after the original mod)

astral dune
#

@hearty dew hey boss, sorry for the ping but you're the master of this particular thing. I'm trying to get a Field on an IsoPlayer that it inherited from IsoGameCharacter (its SUPER class' Super class). Is it possible with the reflection stuff exposed to Lua? Iterating through the IsoPlayer class fields doesn't seem to find it

astral dune
#

it looks like I need to use Class.getSuperclass which doesn't appear to be exposed

hearty dew
#

If you use that inspectJava function, it would print out everything that is accessible

astral dune
#

I don't believe so, it relies on Class.getDeclaredFields, which doesn't show inherited fields, you have to call Class.getSuperclass() to get those, I believe

hearty dew
#

If it is a static field, you can read it via IsoGameCharacter.staticFieldName

astral dune
#

its instanced, unfortunately

hearty dew
#

What's the field's name?

#

I can check it in a few

astral dune
#

hitlist and attackvars

blissful salmon
#

I have an interesting problem where my crafted item disappears when I move it from a "container" (an oven) to my player inventory. I replace an item in the OnCooked method which is defined in my first item. My code looks as follows:

function PotWithFishGuts_OnCooked(item)
  local character = item:getPreviousOwner()

  local resultItem = InventoryItemFactory.CreateItem(item:getModData().SoulModReplaceOnCooked);
  if not resultItem or not instanceof(resultItem, "DrainableComboItem") then return end

  resultItem:setUsedDelta(item:getUsedDelta())
  resultItem:copyConditionModData(item)
  resultItem:setPreviousOwner(character)

  local container = item:getContainer()
  container:AddItem(resultItem)
  container:DoRemoveItem(item)

  --character:AddXP(Perks.PrimitiveCrafting, 4)

end

The item is removed and the new item appears in the oven. But when I drag it to my inventory it disappears (I can see it for a second in my inventory). Do I have to call something special?

bronze yoke
#

does this issue occur in singleplayer?

blissful salmon
#

no just when i host a game...

weak sierra
#

is there any way to view the zombie heatmap

#

of like.. ur actual save

#

ur set of maps

#

etc

#

if not, what files govern it? can i somehow look at that?

#

i have VANILLA cells with seemingly psychotic heatmap, out in the woods with 7000 zed count

#

double the main strip of md

#

which is around 3800

bronze yoke
hearty dew
astral dune
#

boo urns

bronze yoke
#

you might need to use container:removeItemOnServer(item) too

dapper geode
#

Uhh, How I get all player inventory included backpack on back, and backpack on his both hand?

hearty dew
#

Might be able to get the Field object from an IsoGameCharacter somehow, then use it with the IsoPlayer instance. Tricky part is getting an IsoGameCharacter instance from the java side somehow

blissful salmon
astral dune
#

IsoGameCharacter.new might possibly work

bronze yoke
dapper geode
# bronze yoke ``getPlayer():getInventory():getAllItems()``

I think it doesn't work with this code below right? I need to gather backpack, main inventory, pouch, toolbelt so I can getItemsFromFullType from each attached container on my body, so I can add Context option the Curreny.Wallets item

local playerInv = getPlayer():getInventory():getAllItems()
for k,v in pairs(Currency.Wallets) do
        local items = playerInv:getItemsFromFullType(k)
.
.
.
bronze yoke
dapper geode
bronze yoke
#

yep!

dapper geode
#

Thank you! I am going to test it ā¤ļø

#

Btw, I find out that v:isInPlayerInventory() only check player main inventory, is there any chance I can check other attached container (like backpack) too?

bronze yoke
#

oh wait, hold on, i just noticed that playerInv is the result of getAllItems() and not the container šŸ˜…

#

i think if you wanted to do it on an already gathered list of items you'd probably have to parse through it and check it manually, i would just use getAllTypeRecurse(k) on the inventory container

blissful salmon
dapper geode
bronze yoke
#

i've never seen getPlayerInventory before though, is that a custom function?

#

getSpecificPlayer(playerNum):getInventory() should suffice

dapper geode
dapper geode
bronze yoke
#

yes that should work!

bronze yoke
#

ah that was it, it's a lua function not a java function

dapper geode
#

Just tested it, but the getInventory() still return main inventory and not included backpack within it

ruby urchin
#

try getInventory -> find backpack item -> getContainer() or something like that was

finite radish
#

anyone know if there's an available source or reference for the native C/C++ functions?

bronze yoke
#

do you mean the java functions?

finite radish
#

mainly from PZPopMan64 but I figured if a reference exists, it's more general/broad than just that one module

quasi geode
# finite radish mainly from PZPopMan64 but I figured if a reference exists, it's more general/br...

can check the decompiled java for zombie.popman.ZombiePopulationManager.class most of them should be listed in there

   private static native void n_init(boolean var0, boolean var1, int var2, int var3, int var4, int var5);

   private static native void n_config(float var0, float var1, float var2, int var3, float var4, float var5, float var6, float var7, int var8);

   private static native void n_setSpawnOrigins(int[] var0);

etc etc
though theres not going to be much info on the args that way

finite radish
thick karma
#

Anyone mind enlightening me to a way to generate a sound (or anything) that draws zombies to your character location?

#

Really specifically I'd prefer to find how Shout does it if that's in the Lua somewhere, but I couldn't find it...

bronze yoke
#

addSound(source object, x, y, z, radius, volume)

thick karma
#

Tysm

ruby urchin
# quasi geode can check the decompiled java for `zombie.popman.ZombiePopulationManager.class` ...

you can deduce it with the input variables that are used like

n_config((float)zombieConfig.PopulationMultiplier.getValue(), (float)zombieConfig.PopulationStartMultiplier.getValue(), (float)zombieConfig.PopulationPeakMultiplier.getValue(), zombieConfig.PopulationPeakDay.getValue(), (float)zombieConfig.RespawnHours.getValue(), (float)zombieConfig.RespawnUnseenHours.getValue(), (float)zombieConfig.RespawnMultiplier.getValue() * 100.0f, (float)zombieConfig.RedistributeHours.getValue(), zombieConfig.FollowSoundDistance.getValue());
bronze yoke
#

optional parameters are stresshumans (boolean), zombieIgnoreDist(float?), stressMod (float)

#

not really sure what zombieIgnoreDist does, but i imagine stresshumans will cause humans that hear it to gain stress equal to the stressmod or something

thick karma
#

Now to figure out how to call the WorldSoundManager

bronze yoke
#

addSound() is on the global object

thick karma
#

Oh

#

Nice

#

Thanks

#

I thought I had to use getWorldSoundManager or somethin

finite radish
#

the bitwise nature of the data there is pretty clear to me, but how it's structured or determines which byte goes to which coordinate... isn't at all lol

bronze yoke
#

looks like zombieIgnoreDist is the range where zombies won't be attracted to it at all - i expected it to be if they're too far, but it's actually if they're too close

#

i guess it's to stop nearby zombies bunching up one tile or something

thick karma
#

Weird.

ruby urchin
#

Oh I see, I had no idea that native make reference to a C function

thick karma
#

Well I'll experiment starting with something like local player = getSpecificPlayer(0); addSound(player, player:getX(), player:getY(), player:getZ(), 10, 10) and see what happens

finite radish
#

yeah, either C or C++
I'm assuming the latter, but there's no way to know I don't think

ancient grail
ruby urchin
ancient grail
finite radish
# ruby urchin Look interesting, I will take a look

(either way, it's pretty much impossible to decompile it in the same way you'd decompile Java/C# - so there'd need to be some sort of source reference provided by the devs elsewhere. I doubt it exists publicly, but I figured it wouldn't hurt to ask lol)

#

the DLLs also don't appear to have any outward COM interface, so that strikes that off the list (which isn't super surprising)

dapper geode
#

Hi, I got some question about override vanilla base item, I tried to change the container capacity from vanilla base backpack, it changed on admin spawn, but it doesn't change on natural spawn (still with its old vanilla capacity)

thick karma
#

@bronze yoke I'm seeing it labeled x, y, z, radius, radius in places... lol game files so wonky

ancient grail
bronze yoke
#

honestly, considering that it doesn't make a sound i'm not sure what the difference is

#

oh it's a multiplier on zombie attraction

#

so i'm guessing the radius is the range, and the volume is the chance to attract in that range (among some other factors)

thick karma
#

Ahhh interesting...

#

Radius probably in tiles?

ancient grail
bronze yoke
thick karma
#

Nice... I'm gonna try 10, 20 and see how it rolls

bronze yoke
#

reading the java with all this 'varX' nonsense makes things a bit confusing but i'm pretty sure everything i've told you is accurate

thick karma
#

Thanks

#

Definitely 15, 10 "worked" subjectively.

#

It got some attention from nearby zombies

bronze yoke
#

yeah i think it's something you'll just have to tinker with, not much way of knowing how it'll behave just from maths

thick karma
#

Percent of some kind tracks with what I saw in the Luas

#

That "volume" / "radius" / "percentage chance zombie reacts" ranged from 1 to 100 in files I checked

ancient grail
bronze yoke
#

it's not exactly that simple, there's a linear attraction dropoff over range and some stuff depending on whether it's indoors or not

thick karma
#

@bronze yoke Yeah and apparently no matter what I set, I attract every zombie in range of the first radius variable

#

Horizontally at least

weak sierra
#

that just shows buildings and current zeds within a tiny area

thick karma
#

I am wondering if the 2nd radius is really a vertical dist...

#

Idk

#

So confused

bronze yoke
#

huh? it's volume

#

which is just a multiplier on attraction

#

the only time it takes verticality into account is the ignore range only applies on the same z level

#

otherwise zombie attraction is essentially 2d

thick karma
#

@bronze yoke I cannot tell you why, but I can tell you that this:

local player = getSpecificPlayer(0); addSound(player, player:getX(), player:getY(), player:getZ(), 20, 0)

Does the same thing as this:

local player = getSpecificPlayer(0); addSound(player, player:getX(), player:getY(), player:getZ(), 20, 100)

...in an empty field.

ancient grail
#

ZombiePopulationWindow.OnOpenPanel()

thick karma
#

I am moving a horde back and forth with that command right now

#

with both

bronze yoke
#

hmm...

thick karma
#

Switching back and forth

#

Very confused on the purpose of that variable

#

IF it were vertical distance this could make sense

#

I dunno gotta find more places to test

bronze yoke
#

it's definitely not vertical distance because i'm looking at the source code

#

there's no accounting for z at all

ancient grail
bronze yoke
#

(except the minimum range thing)

thick karma
#

Maybe it affects how precisely they track the sound???

#

Nah

#

Never mind that theory

#

Hmmm

bronze yoke
#

i really don't understand that... both related functions multiply by volume before they return, so if it's zero it should always return zero... maybe it's just not used for what i think it is

ancient grail
#

Try nil?

#

Idk just curious if it will break the game

finite radish
# finite radish that's one thing, but the specific functions I was looking for are `n_initMetaGr...

in case anyone in the future is searching for something similar in this same vein and I don't figure out what I'm trying to figure out, this is what I've deduced so far:
(rough, somewhat rambling notes that I didn't bother cleaning up yet, pardon my dust)

// messy chunkdata file format scratch notes below
// -----------------------
// first two bytes are trash, always 00 01
// then there's 900 entries, so that's easy - 30 x 30, it's chunks
// BUT each section of chunk data is of a variable length
// so we need to figure out how the data corresponds to the header/pack
// I'm guessing the pack binary will be the key here, with the count or something, need to finish polishing the read code there
// but essentially it's each square within the chunk that actually has data, ignoring the rest? hence the difference in size
// each byte should in theory be a tile though I think, unless there's a byte at the start
// which would explain why the empty cells have exactly 900 bytes of (usually) empty data, but maybe that's a byproduct of the export process
// cell x=0 y=16 is very weird because it's filled with 0x03 instead of 0x00, which I think means every tile there is considered "solid" and also "north walled"
// but it's also the first cell that exists, so maybe that's notable in some way```
thick karma
#

But regardless my trash talking is now attracting zombies correctly so thanks for that

#

Gonna just pull within 8 tiles when the trash talk fires.

bronze yoke
#

maybe it's a tiebreaker

#

oh yes, i think that's what it is

thick karma
#

Ahhhhhhhhhh

#

That would make so much sense

#

And also my chosen value is fine if so

#

Quieter than breaking a door but louder presumably than some other stuff.

weak sierra
#

baked into each map

#

that determines how much zed spawns in each cell

#

each square even

ancient grail
#

Ow ok

outer vigil
#

I'd like to learn how to create a mod that removes the arms from these three leather jackets that already exist within the game, or potentially add variants of the jackets without the arms? I'd still like to be able to see whatever the player character is wearing underneath said jacket though.
-Barrel Dogs Leather Jacket
-Iron Rodent Leather Jacket
-Wild Raccoons Leather Jacket

I have no knowledge about modding, or modding software in general, but I feel like this shouldn't be too too hard to accomplish. I just don't know where to start.

Is this even possible?

ancient grail
#

u probably want to learn how to mask them

#

not sure if its possible but thats what i would try ifm to make a mod like that

outer vigil
#

That's a start! Thank you.

late hound
#

is the reload lua files functionality still broken for people? I can't reload any of mine currently

summer rune
#

Steam is not downloading any mods anymore when i unsub and resub. Someone else with the same problem?

young orchid
#

do you wait some seconds before you sub again

#

wait for it to be deleted

summer rune
#

yes. tried it for 1 hour now. different ways. it is working now... restarting computer helped. restarting steam and killing processes did not help. very weird

#

maybe something to do with the last steam update

young orchid
#

or delete the manifest files and/or the folders manually?

#

maybe

summer rune
#

unsubbing did not even delete the files. anyway it is working now as intended. thanks šŸ™‚

young orchid
#

but it should delete the folders? not?

#

hm

summer rune
#

it should. and it did not. now it does. but only after the full restart.

young orchid
#

ah got it. thought you mean it will not, regulary

thick narwhal
#

so yes, restarts usually help because they clear the RAM

ancient grail
#

is there a way to spawn a paper with written contents on them

#

via lua

summer rune
#

My mod is downloaded on my local game client. However when my dedicated server starts and tries to pull my mod from the workshop, it fails. I did almost no change regarding to last time, when it worked. Only thing i changed was adding 2 print outputs to the code.

coop-console.txt:

LOG  : General     , 1668680381097> 293,767> Workshop: download 0/18833120 ID=...
LOG  : General     , 1668680381192> 293,862> Workshop: onItemNotDownloaded itemID=... result=2
LOG  : General     , 1668680381193> 293,863> Workshop: item state DownloadPending -> Fail ID=...
summer rune
#

appworkshop_108600.acf:

{
    "manifest"        "4833560570148361230"
    "timeupdated"        "1668683365"
    "timetouched"        "1668683800"
    "BytesDownloaded"        "0"
    "BytesToDownload"        "16496"
}
#

Is there a log file that can tell me an exact error, why and where it is stopping?

ancient grail
#

Maybe sharing the mods code would help us see whats going on

summer rune
#

there is not "one" mod code. it is about 20 mods and patches combined in one mod. and it worked yesterday and now it does not. my client can download the mod. but the server cant. i am wondering if there is a detailed log where the download process stops. since the coop-console just logs one abstract entry

#

i deleted all of the mods except one with a mere single print statement. still the same error

river plinth
#

I'm currently working on something that needs to store a whole lot in modData and everything is working fine, until I quit and load my save again. After the reload everything from my modData is loaded back, except this resultClassConstructor = function(...) return ISDoubleDoor:new(...) end

#

Does someone in here know why this won't get properly saved?

#

I've thrown in a log message where I access this field from the modData and when I didn't reload the save it has access to it: ```
LOG : General , 1668686626430> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOG : General , 1668686626430> resultClassConstructor
LOG : General , 1668686626431> closure 0x1628397420
LOG : General , 1668686626431> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#

Once I've reloaded my save it is nil: ```
LOG : General , 1668686651534> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOG : General , 1668686651534> resultClassConstructor
LOG : General , 1668686651534> nil
LOG : General , 1668686651535> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

hearty dew
#

I'm fairly certain you can't store a closure in mod data

#

Anything outside of your more basic lua types (number, boolean, string, table) may present issues

#

e.g. userdata, threads, closures

river plinth
hearty dew
#

Are you trying to capture some variables in a closure for use at a later time?

river plinth
ancient grail
#

any ideas what happens when a player dies? does it destroy all the mod data? it does im sure.... just wanted to confirm

#

and if i have the player restricted to move
will it return the controls ? (same question if they log in and out)

        getPlayer():setIgnoreInputsForDirection(true);
        getPlayer():setIgnoreContextKey(true);
        getPlayer():getIgnoreMovement(true) 
#

im going to test this anyways but if someone has any idea that will save alot of time

hearty dew
#

Think the player's mod data is copied to the isozombie created from the dead player @ancient grail

river plinth
#

So once the ghost object is complete I execute the defined constructor of the actual TIS object to create the actual ISObject

hearty dew
#

In other words, directly store the variables into moddata that you were trying to store in the closure

#

(if some of those variables were userdata types (e.g. java types), you'll need to handle those differently)

finite radish
#

or even simpler, just build a model that stores raw data and then rebuilds the constructor based on that data
i.e. turn it into a state machine, where the state integer that's saved resumes the machine at a certain point, along with variables for the position, progress, materials needed, etc. in the most primitive form possible

#

imo storing complex structures in moddata is a bad idea anyways, i don't know the details of how it's stored but i imagine network reproc shits out massive packets if you're storing massively unnecessary data

limpid moon
#

is there a way to get a zombies location base from a specific square.

#

im looking for like square in x:12 y:43 z:0 and nearest zombie from there thats distance is withing 10 squares in direction north gets shot kinda deal

thick karma
#

Alright y'all it's time we address something

#

Are these devs blind or do they just never go outside?

#

Why is night borderline pitch black?

#

And how do I fix this atrocity

lyric bolt
#

What is this statement doing at the top of some of the lua files im looking at?

ISInventoryMenuElements = ISInventoryMenuElements or {};

Never seen that syntax before

thick karma
#

It says it equals itself or an empty new table if it doesn't exist already.

#

@lyric bolt

thick karma
bitter frigate
#

I'm having an intermittent issue with the mod I'm making. (Almost) every time I *right click on a specific item I've created the game throws an error. This error looks very similar to the one I received when the same item was missing it's icon. I've fixed the icon problem and it now displays correctly, but it's still throwing an error that says it's trying to pull a texture that doesn't exist. The thing is: I can click through the error and the context menu I was TRYING to call shows up just fine. I'm stumped.

thick karma
#

Can you paste the stack trace and the chunks of code surrounding any lines of your code identified by the trace?

bitter frigate
#

if you can direct me on how to do that absolutely! it's been a long time since I modded and I'm very rusty with the interface.

thick karma
#

Are you in -debug mode already?

#

Can you bring up debug window with F11?

#

If not you need to close the game and add debug as a launch option in Steam and relaunch

bitter frigate
#

yes I'm in -debug! I remembered how to do that

thick karma
#

Cool then as soon as the exception is finished firing, open F11 and expand the window with errors in it by clicking its bottom right corner

#

Make sure you scroll up to the "beginning" (i.e. really the end) of the most recent stack trace (will be near the bottom of errors window in F11 menu), then screenshot that and drop it here

#

If no other errors have occurred since you triggered exception and you're in game, you can just open F11, expand, screenshot

#

That'll give us a line number or more

bitter frigate
#

like this? or was it another window

thick karma
#

Nailed it... But oddly I'm not seeing mod files in your stack trace, so apparently the vanilla files are reading some object you've created and coming to a null value that they expect to be a table, and they expect that nonexistent table to have getTexture as a function.

#

I would check ISInventoryPaneContextMenu in the vanilla Lua and see what it's trying to do on 2839

bitter frigate
#

what is "Question_On"? I'm still having trouble understanding what the problem is

lyric bolt
#

Are things automatically serialized? Like I am dissecting a mod here and they use a teleport function that teleports you to a location, sets a 'return point', and then allows you to teleport back to that point. I assume its saved on exit... I should check. But yea does that happen automatically?

thick karma
# lyric bolt Are things automatically serialized? Like I am dissecting a mod here and they us...

I don't think anything is autoserialized here but idk. I have no idea how that mod's teleport function works either, tbh... sorry. But, yes, Lua has some interesting and convenient features. Though I gotta be honest, not a fan of the indexing from 1, especially in context of games that interact with traditional languages that index from 0. Sorta leads to unnecessarily ugly indexing code imo.

lyric bolt
thick karma
#

Also, warning, #table is used to get the length of a table, but it's a lie. Gives you the last index instead. So if your Lua table is:

{
  [0]: "Muahaha",
  [1]: "Eat my shorts
}

and you use # to find its length, prepare for disappointment.

lyric bolt
#

🤢

thick karma
#

Also, if your Lua table is:

{
  [1]: "Muahaha",
  [3]: "Eat my shorts
}

and you use # to find its length, prepare for disappointment.

lyric bolt
thick karma
#

I mean it's not so much something to fix as something weird to think about

lyric bolt
#

yea

thick karma
#

Ultimately the way Lua does it is faster if you can programmatically guarantee the structure of your table

#

Because checking the last index is faster than counting through elements.

lyric bolt
#

yea i mean its faster, and you can just add 1

thick karma
#

yeah of course

lyric bolt
#

but it should honestly just do that in compiler...

thick karma
#

It's just ugly to me haha

lyric bolt
#

yea

thick karma
#

all the +1 conversions that could've been #table

lyric bolt
#

yep

#

length should just return the true count of an array

#

*or dict

thick karma
lyric bolt
#

Wait... are objects in Lua all just huge nested tables lol?

bitter frigate
#

if there aren't any errors, why are you BREAKING my dude?? reveal to me your secrets

thick karma
#

I don't think quite all but a lot

#

e.g. an integer is not a table

#

Those are the main ones

thick karma
summer rune
gaunt meteor
#

i was under the impression that dedicated servers can only access and pull public downloads. maybe im wrong, but i always thought that were the case.

lyric bolt
# thick karma A whole lot of them yes

That's funny lol. Do you know how to actually serialize something btw? I want to save coordinate points associated with a specific object. I should actually just look at the Journal mod...

summer rune
#

always this error Workshop: onItemNotDownloaded itemID=... result=2

bitter frigate
gaunt meteor
summer rune
#

before i have checked. but i create a new mod id on purpose while identifying the problem. to see if maybe that might fix the problem

#

i even deleted everything from my mods contents except a simple debug print. even now it still gives the error

gaunt meteor
#

Someone else just had that error with AuthenticZ. I thought it was from server not shutting down properly. But if you have AuthZ maybe thats the culprit too

summer rune
#

i made a new server only with my test mod

#

maybe something wrong with my workshop account?

fast galleon
ancient grail
#

Why is my oncreate doing this error

summer rune
weak sierra
ancient grail
thick karma
# summer rune i made a new server only with my test mod

I have had 2 confusing issues where my workshop file wouldn't download.

  Solution 1: My mod's image files had the wrong depth (32 instead of 24), so even though the flat resolution was fine, Steam wouldn't let me pull the file. Had to export image again after flattening in GIMP.

  Solution 2: My workshop description was too long, so it was rejecting the data after creating the page for the mod. Since there was no mod data, I couldn't even see my mod. Had to shorten desc.
summer rune
weak sierra
#

ostentatious are we

thick karma
weak sierra
#

not so pretty on my end

#

server ads in the code too jesus xD

lyric bolt
#

Is there any difference between these syntaxies?

writeSettingsFile = function(tbl, filename)

function writeSettingsFile(tbl, filename)

weak sierra
#

alright what line was it

lyric bolt
weak sierra
#
    if modData['hasDeaf'] == false then player:getTraits():add("Deaf"); end
lyric bolt
#

ah I see

weak sierra
#

that was not for u

#

:p

#

but

#

player:getModData()["whatever you want"] = something

weak sierra
lyric bolt
#

And those syntaxes? Thanks for all the help guys, not versed in lua

#

Never seen NAME = function() before

weak sierra
#

@ancient grail look in the log and see if there's a full error, the debug screen kinda sucks imo

lyric bolt
#

or well I guess in expressions

weak sierra
#

the former is just a syntax sugar that is more like other languages tbh

lyric bolt
#

gotcha, I thought it was the standard

weak sierra
#

u can thus reassign functions like variables

#

no matter how they are declared

lyric bolt
#

thats pretty neat

weak sierra
#

which is how we override things and wrap them for modding

thick karma
summer rune
thick karma
#

Can you link me to the mod page?

thick karma
#

Hmmmm

#

Yeah that's not what happened with mine

#

Workshop text did not go through for me when my upload bugged

summer rune
#

Ok i narrowed the problem down, even more. when i try to download the mod on a hosted server with a real host, it somehow works. however if i use the ingame option "host" and it tries to download the mod it fails.

#

i guess i can live with that, however this behavior is obviously wrong and broken. i have even reinstalled, steam, the game. verfied files... deleted stuff by hand. nothing helps. so i guess i will leave it at that. the problem occured with the latest steam release for me.

#

i think the problem occurs if u have a local version of the mod in ur local workshop folder, but then u use the ingame "host" option and it tries to download the version from the steam workshop.

thick karma
bitter frigate
thick karma
#

I too was busy, no rush

bronze yoke
#

but there is a sandbox setting for it, so just use that

thick karma
#

@summer rune Launching through Host in-game is fine:

ancient grail
thick karma
#

I think you probably have a mismatch between what's in Zomboid/Workshop and the online version. I recommend you unsubscribe from your online version and remove it from your server if you want to test new local code for an existing mod.

#

I often run into issues if I don't do that, and I have had no issues since I started doing that.

#

@summer rune

ancient grail
lyric bolt
#

How do you pass multiple args via menu inputs. Like say I have this function

function AddPoint ( id, x, y, z )

Is this the right way to make that a menu entry?

submenu:addOption( "Mark", self.invMenu, self.AddPoint, id, x, y, z );

thick karma
#

Is this reasonable darkness?

#

I mean my eyes just must be God's gift to night vision if normal people think this is what the dark looks like outside...

bronze yoke
#

yeah we definitely aren't

thick karma
#

I'm thinking not.

bronze yoke
#

well this is what my night looks like, but after i set it to pitch black lol

ancient grail
summer rune
ancient grail
#

i may have found the cause for the error l;ol

#

getPlayer():getIgnoreMovement(false)
instead of
getPlayer():setIgnoreMovement(false)

supple quiver
#

I have a question

#

Where are britas weapon pack gun files?

#

I want to edit them

#

Can't find them

thick karma
#

Yeah I would delete all your wonky mod's files manually from ProjectZomboid folder's workshop & steamapp's workshop (there's a workshop directory in both places), then unsubscribe, then remove it from your server's ini, and then add your local version back to the server through the Mods tab, test it, make sure it's right, and reupload just to be 1000% sure your local and online version match.

thick karma
#

@summer rune

ancient grail
#

what

thick karma
#

Implies getPlayer() is null there @ancient grail

bronze yoke
# ancient grail

you called player:getTraits() near the start of the function but never assigned a player object to player...

thick karma
#

Oh I see

#

The --become deaf lines

bronze yoke
#

you should really assign it to a variable, as you have like 30 getPlayer()s in there

thick karma
#

I second @bronze yoke there, I would just throw local player = getPlayer() at the top

#

And use player

vestal belfry
#

anyone know where I can find documentation on altering the character model?

summer rune
#

Same for getStats()

#

It all takes processing power

thick karma
#

Actually I would probably use getSpecificPlayer(0) at least because afaik that works for 1 person playing SP or MP online, which seems to apply to most people. That or loop through the local players. Or if I already were, I would pass along the index. @ancient grail

bronze yoke
#

getSpecificPlayer(0) and getPlayer() are just the same thing i'm pretty sure

thick karma
#

Oh okay cool thanks for the correction because first tutorial I used tried to warn me to use getSpecificPlayer(0) for online

bronze yoke
#

this mod is for an rp server that i don't think even allows splitscreen? i've been writing most of my mods for them with it in mind just in case because i think it's good practice and rarely much harder but it's not a big priority

ancient grail
#

ye albion did the shopmod that totaly kicks ass

supple quiver
#

Still can't find them

ancient grail
#

well this is the 3rd syntax related bug.. i think i removed the
local player = getPlayer()

#

well ididnt plan to use it anyways id rather use the getPlayer()
cuz it will be easier to test on debug parts of the code

ancient grail
supple quiver
#

More specifically, files in which I can edit the weapon's stats

ancient grail
#

you can check the scripts for the model its going to point to where the files are located

#

ammm there are rules to modding someone elses mod i hope you are aware

supple quiver
#

I just wanna tweak some stuff to alter my gameplay

supple quiver
#

Hm

#

Changed my mind, it's simply too hard for a simple file edit

#

Shouldn't it be like

ancient grail
#

sir @willow estuary sorry to ping you but is there limitations to using this when modifying other mods that are on lockdown? cuz technically if you do this then you never included their code and you didnt modify them...

supple quiver
#

Find the mod folder, search sub folders, find files of the items you wanna edit, edit them, save, exit, start game, changes applied

supple quiver
#

Not in britas weapon pack apparently

ancient grail
#

the thing is there are rules for using other modders files. so you should check em out

thick karma
supple quiver
#

There were some truck mods I edited

#

They worked fine

#

But with bwp the closest I get is model x files and in those files there are hundreds of lines of undecipherable code

supple quiver
#

Where can I read the rules

vestal belfry
#

anyone know of any documentation I can look at to alter the character model? i.e. amputation

lyric bolt
bronze yoke
lyric bolt
#

Like NoctisFalcon has been away so I patched one of his mods because people used it a lot

#

Gave him full credit ofc since I literally added like 20 characters worth

bronze yoke
#

when a modder specifically puts their mod on lockdown i think there is a discussion to be had about whether it's okay to disobey their wishes like that, even if i don't believe there's actually a copyright violation there

ancient grail
lyric bolt
#

Different thing IMO. If I just died unexpectedly or something... I would be fine if someone continued my work for sure

#

A patch definitely

bronze yoke
#

if it wasn't under lockdown then it's not really what i was talking about

lyric bolt
#

Ah ok I thought it was about any continuation of code that isnt yours or whatever

#

(like if they say they dont want forks of it and all, but have vanished)

ancient grail
# supple quiver I'm not creating anything new just customizing for personal use but allright
thick karma
#

So somewhere in foo you would prepare parameters appropriately.

#

If you're not writing or at least modifying foo, it will never be able to call a custom bar with custom parameters.

#

However, if a built-in foo (that you are not editing) accepts a bar, odds are good that it intends to pass a standard array of parameters to every bar it is given.

#

In that case you would want to read foo carefully to figure out what parameters it will be sending to bar and how it will obtain them.

fast galleon
#

I believe context:addOption() passes at least 4 parameters to the function you give it. So it seems ok.

lyric bolt
fast galleon
#

There's a few things like context where you add a function and then it checks for extra parameters. In some cases you need add lua:addParam(...) but I've been using the context like your example.

hallow prism
#

mod idea: PZ but in california, chicago, new york, oakland, literally any major urban city. shit would be crazy

#

PZ in philly 🤯

fast galleon
fast galleon
lyric bolt
#

kk, any idea why this isnt working? I am trying to add a new point based on a new menu entry I made, the entry shows up and fires but causes an exception because player is nil when it tries to get the current position


    function self.MarkRecallLocation( player )
        print("MarkRecallLocation CALL MARK" );
        SSDart.Transporter.MarkRecallLocation( player );
    end
    
    function self.Return( player )
        print("Return FUNCTION MARK" );
        SSDart.Transporter.Return( player );
    end


submenu:addOption( "Mark", self.invMenu, self.MarkRecallLocation );




     
    function transporter.Return( player )
        print("transporterInit FUNCTION MARK" );

        player = player.player;
        local returnPoint = transporter._returnPoint.Last;
        player:setX( returnPoint.X );
        player:setY( returnPoint.Y );
        player:setZ( returnPoint.Z );
        player:setLx( returnPoint.X );
        player:setLy( returnPoint.Y );
        player:setLz( returnPoint.Z );
        transporter._returnPoint.Last = nil;
    end

    function transporter.MarkRecallLocation( player )
        print("MarkRecallLocation FUNCTION MARK" );

        player = player.player;
        print(player:getX());
        print(player:getY());

        --transporter.AddPoint(
        --    "Markkkk",
        --    player:getX(),
        --    player:getY()
        --);
    end
#

I am basing it on the return function from the mod I am dissecting and cant see a difference

#

I added MarkRecallLocation = transporter.MarkRecallLocation as well

fast galleon
lyric bolt
#

the original doesnt have it

#
            submenu:addOption( "Return", self.invMenu, self.Return );
fast galleon
#

ok let me see where it's called then

lyric bolt
#

Where what is?

#

this is the menu creator


    function self.createMenu( _item )
        print("createMenu FUNCTION MARK" );

        if _item:getFullType() == "Base.TeleportationDevice" then
            local teleMenu = self.invMenu.context:addOption( "Teleport", self.invMenu, nil );
            local telePoints = SSDart.Transporter.GetAvailablePoints();
            local submenu = self.invMenu.context:getNew( self.invMenu.context );
            self.invMenu.context:addSubMenu( teleMenu, submenu );
            print("======================> Processing '" .. #telePoints .. "' teleporting points" );
            for _, pointName in ipairs(telePoints) do
                submenu:addOption( "Teleport to '" .. pointName .."'", self.invMenu, self.TeleportTo, pointName );
            end
            if SSDart.Transporter.CanReturn() then
                submenu:addOption( "Return", self.invMenu, self.Return );
            end
            submenu:addOption( "Mark", self.invMenu, self.MarkRecallLocation );
        end
    end

fast galleon
#

just need time

lyric bolt
#

Ah ok thought you were asking me something

fast galleon
lyric bolt
#

the specific error is "Attempted index: player of non-table:null"

#

his doesnt throw that

ancient grail
lyric bolt
#

The issue?

ancient grail
#

No issues i just mentioned i saw it šŸ˜…

lyric bolt
#

oh šŸ˜„

#

This is stumping me... like its basically the same function at this point

fast galleon
#

print the menu where you add the option

#

debug includes a bunch of prints šŸ˜…

lyric bolt
#

I got it, this was awful lol

#

I think when I added a new function, it caused a issue because it was loading the lua files in a different order maybe? Because some changes I could just reload in the game but I fixed it by doing a full reload in the main menu

winter thunder
#

Anyone know of any good tool to make a lot of recipes without coding them each individually

#

ItemZed used to be good, but I cannot get it to work with current stuff

young orchid
lyric bolt
# fast galleon that's different

Ok this is the fuckiest problem. Maybe you can help me understand this guy more because im pretty sure this is it but I am too dumb to understand what ordering he is talking about....https://theindiestone.com/forums/index.php?/topic/1805-timed-actions-attempted-index-new-of-non-table-null/

rough goblet
#

could anyone mod this box to be larger so we could actually read mod titles when making a local server? XD

#

its impossible to differentiate some of them because the box is so small....look at all that real estate!!

winter thunder
bronze yoke
stray yacht
#

Got a problem with placing custom tiles. I've got things to the point where I can craft an item from a recipe and get it into my inventory, I can right click and place it with all requirements showing green (minimum skill, item needed etc) but then when I actually want to place it, I can't. Item preview over the cursor is always red. I can "drop" it and have it appear in the world, but then I can walk over it.

Anyone know or know a tutorial about how I can get the place action working and ensure the item's tile blocks movement?

winter thunder
#

and- did you create your .pack file as well

ancient grail
kind fossil
#

Hello! Do you know if it's possible to find a way for admin to prevent a player from dying without using god mode?
For example to block the health bar to go under a certain amount of health?

thick karma
kind fossil
rough goblet
#

any of you gurus that can help my friend and i get a hosted modded run working?

#

we've waited until 41 was finished so mod updates could happen....but it keeps terminating the world before opening

#

we just wanna play some modded pz with the boys ā¤ļø

ancient grail
#

only read the description

ancient grail
thorn cipher
thick karma
#

Is there any simple way to tap into and rewrite local functions that are used by vanilla Lua OTHER than directly editing the vanilla Lua files?

ancient grail
#

I cant seem to find the code for fade in
I can only see fade out.
Im trying to replicate sleep

ancient grail
thick karma
#

If you could link me I would appreciate it, because only way I know how to do it is to just copy-paste and edit the file, and that feels like overkill bigtime.

#

Problem is the file itself seems to locally use its local functions to build the panels before the file's finished

#

So idk that rewriting the function outside the file could possibly do any good

#

Even if I could do it.

azure jackal
#

is their a mod to remove the amount of zombies like it seems kinda unrealistic

thick karma
#

Specifically, I need to tap into ServerSettingsScreenWorkshopPanel and ServerSettingsScreenModsPanel in ServerSettingsScreen.lua:

#

If anyone has any brilliant ideas for how to efficiently edit these lines:

(826)
    self.listbox = ServerSettingsScreenModsListBox:new(24, label:getBottom() + 4, math.min(self.width - 24 * 2, 400), self.height - 24 * 2)

(1495)
    self.listbox = ServerSettingsScreenWorkshopListBox:new(24, label:getBottom() + 4, math.min(self.width - 24 * 2, 400), self.height - 24 * 2)

You would be a hero.

ancient grail
#

Tried my best to look for it . But found this instead. Im not sure if its the same,
But yeah ,you might want to ask chuck

thick karma
#

No big thanks for trying!

ancient grail
thick karma
#

Totally.

azure jackal
#

thanks

ancient grail
#

If your not on SP
And you are admin
Then you can find it on the admin panel
It says sandbox options

You can customize zombie lore from there

#

Its a hook version tho but it might just do it for your needs

thick karma
#

Unfortunately that does not help me, but I still appreciate your enthusiasm for trying

ancient grail
#

šŸ˜µā€šŸ’«

#

Can you just destroy the listbox and then place yours?

thick karma
#

I mean maybe but I don't know how

#

Most obvious solutions are hampered by lack of access to countless crucial local variables

#
local Page1 = ISPanelJoypad:derive("Page1")
local Page2 = BaseServerSettingsPanel:derive("Page2")
local Page3 = ISPanelJoypad:derive("Page3")
local Page4 = BaseServerSettingsPanel:derive("Page4")
local Page5 = BaseServerSettingsPanel:derive("Page5")
local Page6 = ISPanelJoypad:derive("Page6")
local MultiColumnPanelJoypad = ISPanelJoypad:derive("MultiColumnPanelJoypad")
local Page7 = MultiColumnPanelJoypad:derive("Page7")
local ServerSettingsScreenPanel = ISPanelJoypad:derive("ServerSettingsScreenPanel")
local ServerSettingsScreenBaseListBox = ISScrollingListBox:derive("ServerSettingsScreenBaseListBox")
local SpawnRegionsPanel = MultiColumnPanelJoypad:derive("SpawnRegionsPanel")
local SpawnRegionsListBox = ServerSettingsScreenBaseListBox:derive("SpawnRegionsListBox")
local SpawnPointsListBox = ISScrollingListBox:derive("SpawnPointsListBox")
local ServerSettingsScreenGroupBox = ServerSettingsScreenPanel:derive("ServerSettingsScreenGroupBox")
local ServerSettingsScreenModsPanel = MultiColumnPanelJoypad:derive("ServerSettingsScreenModsPanel")
local ServerSettingsScreenModsListBox = ServerSettingsScreenBaseListBox:derive("ServerSettingsScreenModsListBox")
local ServerSettingsScreenMapsPanel = MultiColumnPanelJoypad:derive("ServerSettingsScreenMapsPanel")
local ServerSettingsScreenMapsListBox = ServerSettingsScreenBaseListBox:derive("ServerSettingsScreenMapsListBox")
local ServerSettingsScreenWorkshopPanel = MultiColumnPanelJoypad:derive("ServerSettingsScreenWorkshopPanel")
local ServerSettingsScreenWorkshopListBox = ServerSettingsScreenBaseListBox:derive("ServerSettingsScreenWorkshopListBox")
local SandboxPresetPanel = MultiColumnPanelJoypad:derive("SandboxPresetPanel")
local FONT_HGT_SMALL = getTextManager():getFontHeight(UIFont.Small)

For context.

ancient grail
#

What r u trying to do anyways

thick karma
#

I'm trying to do exactly what this does, but WITHOUT duplicating Indie Stone's file almost entirely in order to edit it.

#

Load it up and go see your Host > Edit > Steam Workshop tab.

#

I would like to upload this for general use but I don't want to make Indie Stone mad

ancient grail
#

You can ask for permission iguess

thick karma
#

They talk to human beings?

ancient grail
#

Use email

thick karma
#

Fair enough, I could try to email them.

ancient grail
#

Heres the email

#

Its open for people who needs permission to edit abandoned mods
So i guess u can hijack it to ask for something sorta diffrent

#

Anyone know how i can disable all player controls. Or fade the screen back in

I need just one these

#

Cuz i can make the player stay there and not be able to move
But they can still drag and drop stuff which mess up the purpose of being high on heroin
Since it fucks up the animation

#

After this im done with the heroin mod

bronze yoke
#

the way i stopped them from doing this for the prisoner thing was to just ban them from doing timed actions

#
do
    local old_isValid = ISInventoryTransferAction.isValid

    function ISInventoryTransferAction:isValid()
        return (some heroin check) and old_isValid(self)
    end
end
#

you'll need to see what timed actions you need to block

safe silo
#

We're using a mod where the animation is only shown locally. It gives an odd animation in multiplayer. How can this be?

#

It's a vanilla animation

#

(reload animation)

ancient grail
safe silo
#

We're using the Kitsune's Crossbow thingy on the server

#

So just their ISKCMReloadCrossbowAction.lua basically which should work, but I assume B41 Firearms could interfere with it so I'll just run some tests

thick karma
# rough goblet

I have something working for this but I need permission to upload it. 😭

#

If you want to DM me I'll send you a link if TIS grants permission, or I'll walk you through running local copies if they won't.

#

Also, anyone who wants to DM me for a mod you can drop in Workshop to just read your mod names better, I'm down to share the solution privately.

bronze yoke
#

i'm pretty sure you're allowed to use tis lua in your mods

#

like otherwise you wouldn't really be able to overwrite anything, and it'd just be a weird restriction in general when it's right there

#

and, not legal advice, tis won't sue you for uploading a mod containing their code that can only be downloaded by people who already have access to their code

thick karma
#

Meanwhile, how glorious is this?

#

They literally said min when they meant max istg

thick karma
#

like 3500 lines of it

#

Because all the local variables are not worth my time

astral dune
#

the modding ToS says you can distribute their code as long as you don't make it so ppl can play the game for free, more or less, so I wouldn't worry about it

bronze yoke
#

and the worst you'd likely face is a dmca anyway

ancient grail
lyric bolt
#

Thanks debugger, very helpful