#mod_development

1 messages · Page 127 of 1

fast galleon
#

he posted the code a few messages higher

frank lintel
#

yeah I cant track it without that being in my IDE.

fast galleon
#

regular teleport

frank lintel
#

why I suggested looking at how debug does it

hot patrol
sour island
#

all teleports use the same setX setlX stuff

#

the issue was the order of events for onPlayerUpdate and onplayerMove

#

it was cancelling out the changes in order to 'finish' the movement

ancient grail
#

We do mod commission. Join our discord server. The links on my profile as i cant send it here.

wide oar
#

question

#

i made a mod that adds some new books

#

but when i try and enable it my game freezes on loading lua and nothing happens

#

the game doesnt crash and i get no errors

#

if anyone wants to take a lok

#

*look

frank lintel
#

I was thinking ya dealing with MP and anti-cheat saying 'no'

#

but honestly I dont even know if they use BE or anything

digital moon
#

Where do you customize a capacity for a container again? I know in TileZed I can do 100 - but if I wanted more than that it mentions you need to create custom script to reference it or something?

drifting ore
#

lets see if tilezed can go higher

#

how high are you trying to go

digital moon
#

240

#

It seems to cut off at 100

drifting ore
#

yea you can change that

#

ill shoot you a new file you can use to try to change and see if it works. it should in theory, not sure what hardcoded number is. but it's not always the tilzed setting

digital moon
#

Oh cool ok - thanks, wasn't sure what I was doing wrong. I tried typing in "240" but it just stopped at 24 - it wouldn't let me go further lol

drifting ore
#

this goes into user/.tilezed

digital moon
#

Ok sweet - thank you kindly

#

Worked a treat - thank you!

drifting ore
#

you are welcome. just make sure it actually works in game also

digital moon
#

About to test

#

Worked perfectly.

drifting ore
#

nice! glad to hear

#

always nice to not have to code haha

digital moon
#

Yes - very true. All that's left is for me to get the container to accept only specific items. I'm so close lol still confused as hell but so close

drifting ore
#

i mean you can use the guide to create a custom definition for it

#

its in the mapping area

digital moon
#

The guide?

drifting ore
#

then you can control the items that go into it

#

i can try to find it

digital moon
#

Oh.em.gee

#

lmao

drifting ore
#

not all of this applies to you but you will see what parts you need

digital moon
#

You're wonderful. Thank you so much

drifting ore
#

np!

digital moon
#

Silly question, not sure how similar it is to python - but in Lua if I want to say:

if name (contains) "123"

what is the syntax/relational operator for that? If I put:

if name == "123"

Will it only find items that are named specifically 123 or will it find items that have 123 in the name?

sand dragon
#

if anyone knows how to set an item to spawn inside of an item would be awesome, been trying figure this out for a few days an we just cant figure it out. Thank you in advance!

sour island
#

Figured out how to prevent looping from a 2 way teleport tile

sand dragon
sour island
#

Someone plans to make dungeons or something - so I think they wanted something like the RVs or basements

sand dragon
#

thatll be cool tho

#

id check out a dungeon crawler server

digital moon
#

I can't seem to get the lua script working and I know it's because it's wrong lmao

Trying to get a custom container (like a counter/shelf) to only accept "tools" or something specific so I used a Nails and Screwdriver to test but I can still put any items into it.

test_container.AcceptItemFunctionTestContainer = function(inventoryContainer, inventoryItem)
local scriptItem = inventoryItem:getScriptItem()

    local name = scriptItem:getDisplayName()
    if name == "Nails" or name == "Screwdriver" then
        return true
    end
end```
ornate summit
#

How tf are tilesheets supposed to be formatted?

#

I can't seem to find any info on how TileZed actually separates them.

#

Here's what I just threw together

drifting ore
drifting ore
#

I need help.

Task: open modal window with text or image or all together with possibility to close this window.

#

I found this function, but it's give me error

#

Something about MyFunction.toExecute

#

When I tried to replace this function ( MyFunction.toExecute) to nil it doesn't work. It's give me the same error but tell me about nil.

#

What parameters need for ISModalDialog:new ??

ancient grail
#

U mean spawn inside a bag right? Or a tile container?

drifting ore
#

damn my mod must be bad

ornate summit
#

what's the mod?

drifting ore
#

lightswitch overhaul haha

#

i'm getting harrassed by some person and their friends

#

it's not bad btw. pretty sure it doesn't actually have any issues at all. they are just stinkers

real helm
#

Hey guys, is there a way to write mods in typescript yet?

rancid panther
#

is there a way to find an old workshop description i accidentally overwrote?

ancient grail
#

Go back to previous version

rancid panther
#

ah

#

can i bring it back to the updated version again right after copying the description?

ancient grail
#

You might want to check out jabs work

#

Pipewrench

#

Its on the threads

red tiger
ancient grail
ancient grail
#

Use removeitem i believe

#

Im afk and cant link the propersyntax

bronze yoke
#

it won't restore the description

drifting ore
#

Does somebody work with GUI ?

rancid panther
#

i just wrote a new one

#

will ur old description be overwritten every time unless you actually change it in the files rather than on steam?

drifting ore
#

unless you made the workshop.txt file with it

rancid panther
#

i'll just change the description through workshop.txt from now on

drifting ore
#
description=[h2]Want colored bulbs? No Problem. Battery connector? Your wish is my command. Sandbox controls? You got it![/h2]
description=
description=[img]https://i.imgur.com/qtZDWr7.gif[/img]
description=[b][i]This mod turns all Vanilla light switches into pick-up and placeable objects, allows you to change any bulb, add battery connectors, and completely reworks lighting from the vanilla game. It even adds the ability to craft right and left-sided switches! Each side (right and left) of the light switch faces in any direction depending on the wall it's touching. You can disable any feature via sandbox settings, some of which change on the fly, and most require a restart. I suggest setting sandbox settings, then restarting your server immediately.[/i][/b]
description=[img]http://i.imgur.com/9iYzwL4h.gif[/img]    [img]https://i.imgur.com/VhyjlvW.gif[/img]
description=[h3]This mod can be added or removed from any save, but note that any moved/changed switches will remain even if the mod is uninstalled.[/h3]
...
rancid panther
#

yea

drifting ore
#

this works. for spaces just do empty line of description=

rancid panther
#

ik how, i just didnt realize it would overwrite when i was changing through steam

#

oversight on my part

drifting ore
#

ahhh sorry to hear

rancid panther
#

it's okay it basically just said what the trait did and what i have tested it with

fast galleon
#

I just copy the steam description before upload and put it into the description text UI which appears before you push the update.

#

a lot of people never realize you can insert description and change notes in-game before you publish the update.

real helm
rancid panther
ancient grail
#

Didnt work? Darn

rancid panther
#

i changed description through steam usually when i already shut off the game and dont wanna go back in again, but next time i'll just copy it

#

well now it says this

ornate summit
#

There's... a few.

untold moss
rancid panther
ornate summit
rancid panther
#

i will also link the workshop page there

untold moss
#

oh right yes

ancient grail
ancient grail
frank lintel
#

thats only in ref to the source the mod was updated recent but the files have changed massively.

digital moon
digital moon
ornate summit
ornate summit
digital moon
ornate summit
#

Just post what you got over in #mapping, so the information can be archived in-case someone else has the same issue later down the road.

digital moon
lusty marsh
#

Hey everyone, so what time do you update your mods if any? there's 31k playing according to steamcharts and it's a Saturday so I was wondering if it would cause a big inconvenience?

ornate summit
ornate summit
frank lintel
#

updates only for critital/security ones otherwise only on a restarts of a dedi.

ornate summit
digital moon
#

I got it from the Indie forum - but I made a few changes to it to help my brain understand it better, I could upload it in the mapping channel too if that's not against the rules

ornate summit
#

I didn't see that so an upload would be great. I was just using one of the base game sheets.

digital moon
digital moon
ancient grail
ornate summit
hidden tusk
#

Hi, I added a recipe to make Nails and I want it so that you need to be minimum level of 3 on metal welding and carpentry even tho I added the lines It doesnt seem to work

#

This is what I used to make the skills required "SkillRequired:Carpentry=3,"

fast galleon
hidden tusk
#

Thanks, Ill try that

fast galleon
#

the skills are Woodwork and MetalWelding

hidden tusk
#

module Base

{

recipe Craft Nails
{
        ScrapMetal=1,
        keep [Recipe.GetItemTypes.Hammer],
        keep [Recipe.GetItemTypes.Screwdriver],
        Result:Nails,
        CanBeDoneFromFloor:true,
        Time:1000,
        Category:Carpentry,
        SkillRequired:MetalWelding=3;SkillRequired:Woodwork=3,
}

}

#

Thats what Im using

#

is it true?

#

Also even tho i diddnt writw 10 it gives me 10 nails as a result

#

I dont think it is

#

Oh eya its not

hot patrol
hidden tusk
#

Ok I fixed it

digital moon
#

@fast galleon I thought I was on the right path and creating the lua and script reference but the container will accept anything I drag into it.

Here's the script (I have a recipe, item and base file in the scripts folder, this is the base txt script):

{
    item TestContainer
    {
        AcceptItemFunction = TestContainer.AcceptItemFunctionTestContainer,
    }
}```

This is the Lua in the lua/servers folder:

```require "Items/AcceptItemFunction"

TestContainer.AcceptItemFunctionTestContainer = function(container,item)
    return item:hasTag("Screwdriver","Nails","Screws")
end```

Alternatively, I also tried:

```require "Items/AcceptItemFunction"

TestContainer = {}
TestContainer.AcceptItemFunctionTestContainer = function(inventoryContainer, inventoryItem)
local scriptItem = inventoryItem:getScriptItem()

    local name = scriptItem:getDisplayName()
    if name == "Screwdriver" or name == "Nails" or name == "Screws" then
        return true
    end
end```

Either way I  do it - the container works perfectly fine, but it will accept any items I add to it as opposed to just those items listed above.

Any suggestions on what I should be looking at?
faint jewel
fast galleon
red tiger
#

Good morning.

frank lintel
#

sup

digital moon
fast galleon
digital moon
drifting ore
# drifting ore damn my mod must be bad

I will explain why you have received so many downvotes.

Your Lightswitch Electrician mod allows players to create switch tiles, but switches installed in player-built structures do not work.

As a result, another user created a mod called Light Switch Plus and uploaded it to the workshop. This mod allows switches to work in player-built structures, unlike your mod.

However, you claimed that Light Switch Plus stole your Lightswitch Electrician mod and reported it, resulting in its removal from the workshop.

This incident was shared in a community, and many downvotes were given to your new mod, Light-Switch Overhaul.

I suspect that you reported the mod to monopolize it and prevent its release on the workshop.

If that is not the case, why did you disable comments on your mod?

tulip valve
#

Anyone know a way to disable the vanilla Gunpowder? I made my own Gunpowder and need the vanilla one to never spawn in the game

red tiger
drifting ore
#

I just wanted to inform about what happened. It's an issue that should be resolved between the two parties involved.

I will not mention it anymore.

manic relic
#

is there a way to make clothes not get bloody?

#

like everytime when blood gets on my wearable cigarette the texture just becomes white

#

dont know why

tame mulch
#

Or remove it if you have it

manic relic
#

so just remove the whole line?

tame mulch
#

yep

manic relic
#

cheers👍

red tiger
#

Planning to finish my ZedScript -> JSON parser today.

#

When it is finished, it will also have a linter.

tame mulch
#

Someone need help with lua modding? I can do review code in real time and improve code/add advice. Or I can do review code of some mod and explain it 🙂

#
  • In voice chat
sand dragon
# ancient grail U mean spawn inside a bag right? Or a tile container?

Yea like u know how u can find Paper Bags, Gun Cases or other items that can hold items spawning with items already in them. Like normally Gun Cases have Guns and such and the Paper Bags usually have food and like napkins in it, I wanna add the Card Pack from my mod to spawn inside the Paperbag_Spiffos from the vanilla Distribution file but obviously put the code in my own mod files, but that's where the original game code for spawning items in the bag is but haven't been able to format it to my code or get it to work.

#

also got a thread for it here

ancient grail
#

ok

#

spawn bags with items inside

heres a code we used for Signs of Sickness Server - ToxSick Event

local shotgun = InventoryItemFactory.CreateItem("Base.DoubleBarrelShotgun");
local bag = InventoryItemFactory.CreateItem("Base.ShotgunCase1");
shotgun:setTooltip("initially has 6 chambered  shells");
shotgun:setClipSize(6);
shotgun:setCurrentAmmoCount(60);
shotgun:setRoundChambered(true);
shotgun:setAimingTime(90);
shotgun:setMinDamage(shotgun:getMinDamage()*2)
shotgun:setMaxDamage(shotgun:getMaxDamage()*2);
shotgun:setName("SOS ToxSicK Event Shotgun"); 
getPlayer():getInventory():AddItem(bag);
getPlayer():setWornItem("Back", bag);
bag:setName("SOS ToxSicK Event Gun Case"); 
bag:getItemContainer():AddItem("BladeSOS.Bloodbath");    
bag:getItemContainer():AddItem(shotgun);

another one used as template for Kentucky RP server


local spwnbag = InventoryItemFactory.CreateItem("Base.Bag_Schoolbag")
spwnbag:getItemContainer():AddItem("Base.Apple");
spwnbag:getItemContainer():AddItem("Base.Apple");
spwnbag:setCapacity(70)
spwnbag:setWeightReduction(70)
spwnbag:setName("Kentucky RP - Store Items"); 
getPlayer():getInventory():AddItem(spwnbag);
getPlayer():setWornItem("Back",spwnbag);
getPlayer():resetModel();
manic relic
#

@tame mulchso when I remove the bloodlocation 13 or so error happen when you wear the cigarette

sand dragon
#

am I able add that code to the file I already have for spawning? or would I need put that code in its own file?

willow estuary
# sand dragon Yea like u know how u can find Paper Bags, Gun Cases or other items that can hol...

Just do it this way, without any complications or fancy business, and it will just work, as long as some other mod isn't breaking stuff #mod_development message
Just have the code itself, no functions or events or anything else, in a lua file in the server directory.
Obviously use the correct name for the spiffo paper bag and your items; but if you have the container and item names correct, and no other mods messing stuff up, this will just work.

table.insert(SuburbsDistributions["Bag_SurvivorBag"].items, "Base.BlairsBestItem");
table.insert(SuburbsDistributions["Bag_SurvivorBag"].items, 10);
manic relic
#

nevermind I might just deleted the wrong thing

#

sorry for the ping then

ancient grail
ancient grail
#

you have to take what you can and build what you need

sand dragon
willow estuary
#

Try it with an insanely high spawn chance, without any other mods running, and double-checking that all of the names are correct.

sand dragon
willow estuary
#

I know that code works when the right names are used + no other mod is farting up stuff.

#

There could be an error in your item script itself that means that they can't exist and can't spawn.

ancient grail
#

his right... try vanilla run you rcode on debug

willow estuary
#

If this works, and yours doesn't than maybe it's your item script

table.insert(SuburbsDistributions["Paperbag_Spiffos"].items, "Base.Spoon");
table.insert(SuburbsDistributions["Paperbag_Spiffos"].items, 200);
manic relic
#

hey thanks Aiteron, it works

ancient grail
#



local bag = InventoryItemFactory.CreateItem("Base.Bag_BigHikingBag");
bag:getItemContainer():AddItems("Base.Apple", 5);
getPlayer():getInventory():AddItem(bag);
getPlayer():setWornItem("Back", bag);
getPlayer():resetModel();


frank lintel
#

even though I found a work around but throwing it out there 'is there anything that is triggered 'after' clicking to start and the world has rendered in on the screen. ie dont have to do a 'nil' check on mod created windows. and sup Glytch

ancient grail
#

heres a concise version of itemspawning inside a bag

frank lintel
#

chill'n making sure before I move to trying to dig for another issue Im not just half hacking code so it dont break

#

seen the big guns talking figure'd I'd ask

fast galleon
ancient grail
frank lintel
#

it dont.... I dont know how they setting/linking timing the events up to create the windows but in that time where P2Start shows and the world if ya hit a hotkey, error pop.

ancient grail
#
local function checkStuff()
    local rad = 1
    local player = getPlayer()
    local cell = player:getCell()
    local x, y, z = player:getX(), player:getY(), player:getZ()
 
    for xx = -rad, rad do
        for yy = -rad, rad do
        local square = cell:getGridSquare(x + xx, y + yy, z)
            for i=0, square:getObjects():size()-1 do
            local obj = square:getObjects():get(i)
                if obj and obj:getPipedFuelAmount() and obj:getPipedFuelAmount() > 0 then                        
                local fuelamt = obj:getPipedFuelAmount()         
                print(fuelamt)
                getPlayer():setHaloNote(fuelamt) 
                CheckStuffOff()    
                end        
            end
        end
    end
end


function CheckStuffOn()
    --getPlayer():setHaloNote("CheckStuffOn") 
    Events.OnTick.Add(checkStuff);
    return true
end

function CheckStuffOff()
    --getPlayer():setHaloNote("CheckStuffOff") 
    Events.OnTick.Remove(checkStuff);
end
frank lintel
#

I worked around it with this eg. if (myQuestInfoWindow ~= nil) then myQuestInfoWindow:setVisible(not myQuestInfoWindow:getIsVisible()) but I rather make sure Im not missing some 'on world render event' or something

ancient grail
#

this is old and i think it can be refactored quite alot still

#

bgut what the heck

frank lintel
#

and player and getplayer playeralive or whatever tried those also...

drifting ore
#

I added new clothing to the game, but even though I didn't set up any configuration for it, zombies are appearing with the new clothing. What can I do to prevent zombies from wearing the new clothing?

ancient grail
frank lintel
#

all good like I said I got a work around but if its only cuz the keybind event is started too early or something (which I got 0 exp in dealing with) was maybe the cause

sand dragon
#

yayyy it works, thank you bunches!

#

can i set it to be more than 100? bc still isnt spawning in every bag, or at least most bags

willow estuary
#

You can probably set it as high as you like, just test rigorously to make sure it's working as desired? 🙂

sand dragon
#

okay sweet, wasnt sure i like putting in 200 will make a dif or the cap was 100. Thank you again! Been trying get this figured out for a few days, big help!

willow estuary
#

AFAIK there's no cap, but a high enough number might bork the calculations in many circumstances.

sand dragon
#

yea look like for this item the rates in vanilla are pretty high, lowest one is like 30 or 40 with most being 50, thought 100 would make them spawn in atleast most if not all, but ill figure it out bc they are suppose to be like a kids meal toy so i want them in a majority of the bags so i can lower the spawn rate for other places

drifting ore
#

i have been having a hell of a time moving gas pumps lol

#

i did get a little help but it's weird that even from a tileproperties edit it give an error. i'll post it later

wet sandal
#

Anyone know how to make a UI element block aiming?

#

I've got mouse clicks handled, but I can't figure out how to block Ctrl

wet sandal
#

The inventory blocks ctrl aiming, but I can't figure out what its doing to do so

fast galleon
#

set focus?

#

eatkey?

wet sandal
#

A cool, eatKey will be useful

#

Don't see it in the inventory page though

dark wedge
#

It looks like the inventory does this:

function ISInventoryPage:onBackpackMouseDown(button, x, y)
    ISMouseDrag = {}
    if not isKeyDown(getCore():getKey("Melee")) then
        getSpecificPlayer(self.player):nullifyAiming();
    end
end```
#

So if your window has focus, can check for the key and nullify the aim

wet sandal
#

Yea I've got mouse clicks handled

fast galleon
#

when the code works fine but PerPlayerRender gridstack throws errors at square getWater stressed
square:discrad(), square:setZ(1)
seems to not get errors from that anymore, time to quit while I am ahead

wet sandal
#

Its aiming the camera around I'm trying to suppress

red tiger
#

Straight up S-tier name & PFP

dark wedge
dark wedge
wet sandal
#

Yea its not what I need for this, just happy it exists in general

#

Was trying to find it a few weeks ago, think I was searching for consume instead and never found it

#

I wanted to make escape close popup windows

dark wedge
#

ah. even that would be tricky due to how key events work using the eatKeyPress; the vanilla escape key event will likely trigger before yours in the event stack. your best bet for that would be to just decorate the global ToggleEscapeMenu function.

drifting stump
#

Not home rn and i dont recall

#

Ive documented that already

#

Not uploaded to github too

#

@wet sandal think its something like checkConsumeKey

#

Decompile UIElement and UIManager to find it

frank lintel
#

might help

#

not the highlighted just searched for 'consumekey'

dark wedge
#

@wet sandal Possiblly ISUIElement:setWantKeyEvents(true)
to block key events

drifting stump
#

Yeah thats part of it

#

You need to enable key events

#

Then you need the function i was talking about to return true when control is pressed

dark wedge
#

ah, then that ISUIElement:isKeyConsumed(int int1)

#

I guess

drifting stump
#

Yep thats it

wet sandal
#

I'm confused, are you guys talking about the escape key thing I mentioned?

dark wedge
#

Could probably be used for both, really. But, since Browser8 came in I assume the aim key thing since that was your question

drifting stump
#

Yeah i was talking about the aim thing

wet sandal
#

Not having any luck

#

Its not really about eating the key event I don't think, because you can just hold aim and do this

wet sandal
#

Whatever, spent too much time on this.
The camera movement can be jarring, but the player doesn't fire their weapon so it's not a big deal.

sand dragon
wet sandal
#

Punished Spiffo when?

#

Foils could be cool too

sand dragon
#

lol atm im just using offical spiffo PNG but some are hard to find, if you have any feel free link them i got a whole folder of them. Yea was thinking maybe doing something like holos, but before that i wanna try and do a PAWS run since I just added Classic Spiffo

#

only been able find one other PAWS png tho

fast galleon
iron talon
#

not sure where to post this but lacking the time to make advanced mods, willing to pay ($100+) someone to do a few things, hmu if interested <33

faint jewel
#

Like what? Dm me

ornate summit
fast galleon
#

if this works, it will be possible to move buildings drunk

#

maybe not the building, just the tiles

drifting ore
#

Is there a way to attach a mesh to the player thru a script?

wet sandal
#

I don't know the specifics, but I THINK its done by using a hidden equipped item in a unique bodyLocation

jaunty marten
# sand dragon New Update to my mod, prob wont update for at least a few days https://steamco...

awesome mod tbh, I love mods that give you the opportunity to collect anything
rn creating adding compatibility in my mod for ur mod https://steamcommunity.com/sharedfiles/filedetails/?id=2914650723
it will work way like I'm getting all items and checking their module and if module is SpiffoCards then adding them into list + checking if item name not is cardpack\cardpackgold\cardpack_trash cos it's not cards
the point of my msg is if u will add more cards it's cool but if u will add more items like cardpack which not in my items blacklist can u shoot me msg in dm moon_kittylove to fast add compatibility for new version of ur mod

sand dragon
red tiger
#

Goooood evening.

supple reef
#

Added a building then removed it after I changed my mind.

Do I need to do anything special to remove these "lights" or can I ignore them

fast galleon
#

this looks like a napping question

odd wraith
#

Hey, would anybody be willing to help me out with my mod? I got it all written up, but for some reason my items dont exist nor the recipes

#

No clue what I did wrong

thick karma
#

Also consider sharing your folder structure so we can be sure stuff is in the right place.

#

(screenshots work)

odd wraith
#

Alright, is there an efficient way to do that? It probably isnt a good idea to copy paste a thousand lines of code in here lol

thick karma
#

That's actually fine because Discord will box it into a message.txt file, however, if you just go to the file and hit ctrl+o to open it, that will likely open the folder you're in

#

And then you can drag and drop your actual file

#

And then it'll have its original name

odd wraith
#

oh cool got it

ancient grail
thick karma
#

How you prefer to share it is up to you

odd wraith
thick karma
#

I'm not sure what the issue is but that info should help someone who knows recipes better than I do spot what's wrong.

odd wraith
#

yeah cause i have no clue honestly

#

ive been looking over and testing for hours now

wet sandal
#

Pessimists:
AI is gonna take our jobs

AI:

ornate summit
#

lookin like some yandere sim code

limber oar
#

It is absolutely inexplicable to me that files stored in one location somehow behave differently when you reference the exact same files, only stored somewhere else.

Has anyone else encountered an issue with underlay masks somehow affecting opacity of unrelated/uncovered items? If I set my clothing's underlay mask folder to media/textures/Clothes/Jacket/Masks (the vanilla location), it works fine. If I copy that folder and put it into my mod folder, then reference that new copied folder's location, suddenly tights/stockings/etc. get darker when wearing the jacket despite that behavior not occurring when the masks are called from their vanilla location.

Again, these are the exact same masks, the only thing that has changed is where they're being kept...

#

Here they are when referencing the vanilla folder location...

#

...and here they are when I move the folder.

#

Exact same files. Different location. Somehow, different color on the stockings...despite it being a mask for the jacket.

small topaz
#

Does anyone knows whether there is an easy way to completely disable a vanilla recipe so that it is not shown in game anymore? Specifically, I want to arrange things so that the recipe is not shown in the craft UI menu when in game, i.e. here:

humble oriole
#

Does anyone have or looked into a way to fix the First Aid exploit with broken glass? Or is anyone familiar with the FA system to give me some direction?

red tiger
#

Sooooooooo

#

I have good news

#

I parse 100% of ZedScript, including vehicles.

small topaz
red tiger
#

So with some remaining properties to apply as not mod data I have completed the first library for parsing ZedScript outside of the game and has a linter

small topaz
# humble oriole yes

would be nice to fix this! but I think this is not only a technical issue but also a question about game design and balancing. have you already some ideas of how a fix might look like?

humble oriole
#

personally, I'd just want diminishing returns on xp.

#

50% xp gain on the same injury until it heals.

small topaz
#

but not sure how and if this will really work for this case

humble oriole
humble oriole
#

which part xD

small topaz
small topaz
humble oriole
#

I guess we could come in here, but it would be better if we could slide in when the injury is made

#

I'll have to think about it a bit, idk if I'm up for diving down this rabbit hole with the mods we have going and everything for our server. 😦

odd notch
#

it's finally published

#

now i can sleep

ancient grail
#

Goodnight @odd notch

wet sandal
#

Anyone know if its possible to animate a piece of clothing?

ancient grail
#

yyes

#

i guesss

#

well im not sure ihavent tried but therere are bones on the clothing

wet sandal
#

mmm

#

I don't actually want a piece of clothing

ancient grail
wet sandal
#

Just thinking of an easy way to fake "air particles" near the player

ancient grail
#

then you might want to try editing the idle atleast

#

then move the dress bones

wet sandal
#

I haven't messed with Zomboid modeling / animation yet

#

What programs are good for it?

#

I'm familiar with Blender

ancient grail
#

blender works

misty pecan
#

You know I have to wonder

#

Would it be possible to make a mod that would allow us to restore power through power plants?

narrow zenith
#

I mean

#

You’d have to program the whole interaction to do that but wouldn’t it just be reverting the whole city to having electricity again

misty pecan
#

Cause honestly I have no PZ modding experience but I wanna know if it is possible

#

I’m a CS major in college

#

I’m familiar with lua

#

So

#

I thought well “I wanna be able to restore the power grid even if it’s temporary and will eventually go out”

misty pecan
#

Since there is a power station you can subvert the power to go into spots

narrow zenith
#

I’m no expert in the matter what so ever

misty pecan
#

I just think it’s a good idea cause it would give us more of a sandbox goal ya know

narrow zenith
#

Yeah

#

Would require a lot of work

misty pecan
#

But I’m sure if i can make it and make it work it would be a hit mod in the community

narrow zenith
#

Just clearing the zeds to even comfortably start working on the grid

narrow zenith
#

Best way to go about it prob would be looking into the way generators work and then pumping those values up like Arnold after juicing

misty pecan
#

Like they fill certain areas and lets you use electricity

narrow zenith
#

Yep

#

That’s what they do

#

20 tiles where the generator is connected

#

Dunno how the programming works for that

misty pecan
#

Soo what if I’m able to do like a directed line of electricity than cover the entire towns area hitting houses and stuff like to cover it

narrow zenith
#

I’d have no clue

#

You’d have to add in new functions entirely since the way generators work is they explode and everything when not properly taken care of

misty pecan
#

I need Like a modding tutorial for this…

narrow zenith
#

I’m not your guy for that

#

Haha

misty pecan
narrow zenith
#

I’m still praying I can learn better programming in the next few weeks

misty pecan
#

If you survive the explosion it attracts a horde of zeds

#

If you don’t

#

You blow up and burn to death

narrow zenith
#

Obliterated

misty pecan
#

Cause well

#

You fucked up so bad you blew it up

narrow zenith
#

Yeah

#

Meltdown of a power station would be hilarious

#

But yeah since you only want to set up a line that activates a certain area I recommend looking at how generators work and go from there

sand dragon
misty pecan
#

Like how to edit the code and work on it

narrow zenith
misty pecan
narrow zenith
#

For how to mod the game probably

#

To do what you wanna do

#

Probably not

misty pecan
sand dragon
# misty pecan Like how to edit the code and work on it

if ur just leaning how to code and make mods for PZ (legit me right now, im big noob and just made my first mod with no experience what so ever) id suggest trying to make a small mod.

Like I picked a Trading Card mod bc was easy and was able to build off someone elses code to make my own. Maybe get an idea for a smaller easy mod, find one that is similar and then read the code, see and learn how it works and then do some tests, remove parts u dont want and changing things to better fit the mod ur making or what u want in ur mod.

Then once u got it started always come here if u need some help like ur stuck with ur code, tried figure it out and didnt work usually someone where can help, might take a couple days if no one knows but eventually someone wise will be able to help.

Always better start small and work ur way up. Like I have tons of big mod idea, but ik I cant do any of them until I can learn more basic stuff first. My next mods I have planned are like a More Posters mod (maybe, might just add Posters to my mod) and a More Comics mod to add like Marvel, DC and other comics. fun fact, vanilla comic uses Superman cover.

nocturne lagoon
#

hi, guys... I think I chose the wrong channel to bring my modding question... will bring it here. if someone know the cause of my issue, I could use an advice.

#

Im new to pz modding, and I need some help regarding firearms attachments models. I managed to make the mesh with Blender and to export it as .x file, I made the texture, I made the scripts and made it all to work in-game. I adjusted the position of the attachment at the firearm and the attachment world placement. it all works and look as intended. the problem comes when I place the firearm with the attachment in the world: then the attachment appears flipped, pointing at the opposite direction. let me show an image:

ancient grail
#
getReplaceWhenUnequip()

what is this for

ancient grail
# misty pecan I need Like a modding tutorial for this…

there is no such tutorial that is very specific to you rmod.. and the thing is , the only way to help you is to actually write the code for you so thats not an option unless you commission.. most of how we help each other is just ask a certain part of the mod project that you are having time with.. but it seemed to me that your looking more of how to mod and not how to do that mod.. so i suggest starting with smaller mod or atleast determine if its doable based on your knowledge and in order to learn is by hitting the ebooks... #1070852229654917180 message

#

goodluck btw

glass basalt
#

does anyone have a code snippet that goes through the procedural loot distribution tables and checks if a certain item is in it? My version for some reason is only giving me the original, vanilla tables without any modded items. Not sure what the issue is, the mod with the scanning function is last in the load order, unless that doesn't even matter for server lua

#

how tf is my mod running BEFORE the mod that I am trying to overwrite? I don't get this...

glass basalt
#

AHA I GOT IT

#

what a stupid game, I hate how it uses Kahlua like this lmfao

glass basalt
#

yes

#

the issue is how PZ loads the lua files. somehow my mod gets higher priority and executes first

#

I had to trigger my code with an event instead of running immediately like procedural distribution should do

#

...scratch that, the game is still spawning the items I was supposed to remove

#

i stg, this is the second night I cannot sleep because I am trying to get this to work

thick karma
red tiger
#

For ZedScript, in Vehicle -> Part -> door = ,, is this deprecated?

#

Every part door definition is empty.

#

Also, the only definition of door { } has a comment with an empty body.

#

Seems like there's scaffolding in the official ZedScript for some kind of future placeholder or deprecated, legacy or initial phase of implementation of doors for vehicle scripts..

#

The only place that I can see door assignments that aren't empty strings or empty object bodies are in Vehicle -> Part -> Table.

hidden tusk
#

Hi, Im making a recipe where u can craft nails I want the result of the recipe to be 2 Nails but when I write Result:Nails=2, it gives me 10 instead, how can I fix it?

red tiger
#

Like a 5 somewhere possibly?

#

(Remembers seeing this in new script docs)

fast galleon
hidden tusk
fast galleon
#

Some items like nails are added in batch unless you create the item manually with Item Factory

red tiger
fast galleon
#

I don't have the code with me

fast galleon
hidden tusk
#

Thx ill look it up

red tiger
#

So I have a fully parsable ZedScript library now. =3

#

I support parsing all vehicle scripts now.

#

@quasi geode

#

Doing some cleanup on the codebase before proceeding.

hidden tusk
#

Or do i not add the Recipe.OnCreate and just go with function AddNailsToInventory(items, result, player)

red tiger
#

Does ZedScript support comment-line syntax along with comment-block syntax?

#

It's only officially used on one line in the entire library for vanilla.

#

o__O

winter tree
#

Hey, sorry to like, butt in.

I have a little problem I'm stuck on lol.

red tiger
#

models_vehicles.txt has them but they're wrapped in /* */.

red tiger
winter tree
#

so I've created a new item, this item has a condition.

in the items.txt I can add Tooltip =

Not sure how to get that to display the items condition in the player inventory.

hidden tusk
#

I connected the result to the OnCreate function but it still gives me more than what its supposed to give

#

Ok i fixed it

frank lintel
#

@red tiger you figure out the comment block yet?

ancient grail
frank lintel
#

cuz yes /* */ is the block

red tiger
#

Going to do some modifications to my lexer to support them.

ancient grail
#

Tooltip = you can read this later,

frank lintel
#

apparently also # works for single line

red tiger
#

That'd be very bad IMO to support C comment syntax and Python at the same time.

#

Makes no sense.

winter tree
red tiger
#

My code hasn't ran across this yet.

frank lintel
#

well I think craftweaker looks like a legit zedscript wiki

#

just scroll to the bottom of that page

red tiger
#

That's ZenScript

#

I'm discussing ZedScript.

frank lintel
#

wtf Im going to go blow up google thats exactly what I searched for not fucking zenscript

red tiger
#

Hahaha

#

It's all good.

frank lintel
#

and I def know Im not trying to do a *unix installation

#

swear between google and yt lately... grrr

ancient grail
frank lintel
#

that wont help with YT putting f'n transscripts up no reason

#

anyhoot swear I know the name zenscript too and I knew it from somewhere before here..

red tiger
# ancient grail Duckduckgo

Gives the sort of results I'd expect from Google from the early 2000's. More infected links populates that site too.

frank lintel
#

doom? ultima? hmmm

red tiger
#

Use DDG with caution.

frank lintel
#

I'll just go to unix FS and never worry ^_^

#

lynx ftw

red tiger
#

Google usually asks you for explicit search results if something very similar is more dominant in the results.

red tiger
frank lintel
#

its not a LoL script is it?

#

ie. rust libraries

red tiger
frank lintel
#

yeah but refering to riot games API wonder if its based behind that

red tiger
#

Oh ok.

frank lintel
#

ie. LoL as in League...

red tiger
#

No. ZedScript is a custom format designed by TIS for Project Zomboid.

#

These files.

frank lintel
#

interesting looks jusst like they talking about this in rust lang a macro programming method

red tiger
#

ZedScript in this context is not an executable language; it's a storage format for properties of components used in the game.

frank lintel
#

hmmm

red tiger
#

There's some strange syntax differences going on in recipe source items.

#

I'm seeing item;amount where most recipes use item=amount;item;..

#
recipe Make Cake Batter
    {
       keep Spatula/[Recipe.GetItemTypes.Spoon]/[Recipe.GetItemTypes.Fork],
       Bowl,
       [Recipe.GetItemTypes.Flour]=2,
       [Recipe.GetItemTypes.BakingFat];15,
       [Recipe.GetItemTypes.Sugar];10,
       [Recipe.GetItemTypes.Egg]=2,
       Yeast,
       [Recipe.GetItemTypes.Milk];5,

       Result:CakeBatter,
       NeedToBeLearn:true,
       Time:50.0,
       Category:Cooking,
       OnGiveXP:Recipe.OnGiveXP.Cooking10,
       OnTest:Recipe.OnTest.WholeEgg,
    }
#

So what, ; and = can both be used as the same delimiter for optional amount arguments provided for recipe items?

#

Going to assume this until told otherwise. =/

#

Strange syntax.

frank lintel
#

edible vs inedible ingredient?

#

or something that uses a partial amount of the item stack/volume? vs multiple pieces of the same ingredient

red tiger
frank lintel
#

well to me thats what it seems like. eg. bakingfat I doubt ya using 15 of them

red tiger
#

I'm going through a cleanup phase right now, catching all mis-interpretations of array-like values stored as strings.

frank lintel
#

same with sugar, then the eggs are clear 2 eggs

#

dunno just throwing out there atm while my brain going 200

red tiger
red tiger
frank lintel
#

well it works for the game atm right?

#

so its syntax valid I would guess

red tiger
#

Pure syntactic conjecture.

red tiger
#

The game doesn't interpret JSON for ZedScript.

#

This is a foundational library for what I'm actually planning to build, a ZedScript editor that's visual, not based on text-editing.

#

I'm taking the long and hard route on building this so that human-typed errors are less likely to cause issues with the final product.

frank lintel
#

so like an IDE plugin? or a total standalone

red tiger
#

Actually I could build several things out of this one library.

#
  • A linter.
  • A syntax highlight plugin.
  • A JSON parser.
  • A ZedScript exporter from JSON.
  • Batch scripts for ZedScript.
  • A formatter.
frank lintel
#

👍

red tiger
#

This is the first deep lexer & tokenizer library for ZedScript, so now that it exists, we can do all of these things.

#

Fenris_Wolf has a shallow, recursive string->val parser in Python 3.

frank lintel
#

sorry its early my brain just decided to make a curved tangent

fast galleon
#

A lot of the script process relies on if a== b so sometimes even if you add wrong comment signs it will just make it invalid instead of break everything.

red tiger
#

I'm supporting both syntax because then I'd have to assert that this is invalid syntax and throw errors on the vanilla scripts.

fast galleon
#

most times there will be a warning in logs though which is useful when you look it up 🙂

red tiger
#

I'll take a dive in the Java code just to be sure.

#

The sane way to disable these lines is using commenting.

fast galleon
#

This will be a nice tool 🙂

red tiger
#

I'm feeling more and more likely to write a short paper describing the issues with the current specifications of ZedScript. It may be a good way to communicate what can be improved on over time if picked up by the right people. =)

frank lintel
#

atleast you not me pulling hair trying to figre out these last 4 errors this mod creates that give no clue why or how it is

#

other then UI related

red tiger
#

Heheh. UI is very hard for people that are new to it.

#

There's a lot of dead code in ISUI.

frank lintel
#

its not my code remember... and the error isnt a mod error its core game stuff

fast galleon
#

ah

frank lintel
#

1 sec I can post the small error block

#
ERROR: General     , 1678028829075> DebugLogStream.printException> Stack trace:
java.lang.IllegalStateException
    at zombie.ui.UIManager.update(UIManager.java:685)
    at zombie.GameWindow.logic(GameWindow.java:262)
    at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
    at zombie.GameWindow.frameStep(GameWindow.java:765)
    at zombie.GameWindow.run_ez(GameWindow.java:681)
    at zombie.GameWindow.mainThread(GameWindow.java:495)
    at java.base/java.lang.Thread.run(Unknown Source)```
fast galleon
frank lintel
#

huh?

#

I know its mod caused but nothing tells me how..

red tiger
#

So it could be an assigned function from Lua either being nil or assigned as something other than the function.

#

So update, render, prerender and onresize are reserved function names.

#

You may have assigned something other than a function to those names.

frank lintel
#

yeah but sadly its a 1 time only pop only when the world renders after click2start

red tiger
#

This is something not a lot of people know.

frank lintel
#

and I know all about nil functions I had to do nil checks for the hotkey nonsense

red tiger
#

You know the reserved names that are in ISUIElement? Good.

#

Then that might not be the issue.

frank lintel
#

I'll add that to my list of double look and compare and make sure since this not my code

fast galleon
#

I'm dumb and have little information. I guess do not interact with UIManager before game start.

I'm also not at a pc, just throwing ideas in case it helps.

frank lintel
#

you normally dont but this mod somehow inits all keybinds, and if you hit any of them before clicking to start 'different error' which was just nil functions even player and ... isalive or something was even valid so I had to add implicit if's just to make sure one cant trigger what the keybinds did.

#
            myQuestInfoWindow:setVisible(not myQuestInfoWindow:getIsVisible()) ``` for example
fast galleon
#

Can you remove their function from events?

#

Or does it make an instance without one.

frank lintel
#

shrugs ya welcome to look yourself if you wish Im just trying to work on the mod cuz I like it and doesnt seem like anyone is anymore or not publically

#

Im way too new to lua to know this stuff Im learning it more by trying to debug it.

#

java isnt an issue

#

that error just an odd one, pops 4 times every time but never again later only just after the world renders in after hitting C2S

#

and a mod someone suggested that helps expand on error msg showing them inworld. showed me the keybinds cause but not these ones that mod doesnt even notice those 4

#

wish clicking the error redbox would cause a break and then open debug

#

that or maybe if anyone knew what UI stuff that red 'error' popup window was.

red tiger
#

@quasi geode Here's my current results for all PZ vanilla ZedScript. This is the current format that I'm running with. If you have any questions or concerns on how I handle certain properties / objects, let me know. =) It's now 100% parsing everything.. Except imports. xD (Easy fix)

#

The next steps are to write export code to ZedScript.

#

I won't bug you again for a while.

#

The next steps will take some time.

fast galleon
#

is the quest window from that mod?

frank lintel
#

yes

#

thats diff error which was fixed with just nil checks the other windows it can open also did the same problem added the logic there fixed it, but those 4 nothing I do even points back to the mod albeit I know its the mod cuz it never appears if the mod isnt loaded

misty pecan
#

I think I can do this

#

Just gotta give me the time

frank lintel
#

you will learn SQL and like it :P

#

meh SELECT Joke RESULT flat... guess ya just had to work there...

misty pecan
frank elbow
frank lintel
#

I would help but ya know my SQL knowledge is like from 1991.

#

wow I just had a flashback of all the Zenith 386's we had lined up doing HD mirroring and raid creation.

frank elbow
#

Like an example of the file? It's a file written by modders

red tiger
#

Yeah. I've not seen one.

frank elbow
#

I could provide mine, but it doesn't have all of the types. I start typing an explanation of them bc I didn't see it documented anywhere, dunno if I finished. I'll try to find it

red tiger
#

I'll search pzwiki

frank lintel
#

wait you just need a sandbox options file with ALL of them?

frank elbow
#

Convenient, past Omar

#

This is a simple example of each type of sandbox option available and all of the values they accept.

VERSION = 1,

option ExampleMod.ExampleBoolean
{ type = boolean, default = true, page = ExampleMod, translation = ExampleModExampleBoolean, }

option ExampleMod.ExampleDouble
{ type = double, default = 0.5, min = 0, max = 1.0, page = ExampleMod, translation = ExampleModExampleDouble, }

option ExampleMod.ExampleEnum
{ type = enum, default = 2, numValues = 3, page = ExampleMod, valueTranslation = ExampleModExampleEnumValues, translation = ExampleModExampleEnum, }

option ExampleMod.ExampleInteger
{ type = integer, default = 50, min = 0, max = 100, page = ExampleMod, translation = ExampleModExampleInteger, }

option ExampleMod.ExampleString
{ type = string, default = This value cannot contain a comma or curly braces, page = ExampleMod, translation = ExampleModExampleString, }

frank lintel
#

cuz I got 20 minutes I'll just flat out make one right now

fast galleon
#

there's also a skills xp txt file

frank lintel
#

just have to change all settings to non-default correct?

red tiger
#

Thanks.

#

Yeah that looks surprisingly easy to parse.

#

Why not.

#

I'll do it rn.

frank elbow
#

Uses the same code (or at least one of the methods of the script parser) from what I recall

red tiger
#

I intend to provide full support.

frank elbow
misty pecan
#

Ok so the generator how it works is it covers twenty tiles of space around it so….I was thinking when I make this substation repair mod could I apply this effect in a larger scale say make the tiles reach out around that area of town and activate its electricity

fast galleon
frank elbow
#

Interesting

red tiger
#

Send or DM me which files are ZedScript and I'll look into them.

robust briar
red tiger
#

My DMs are open.

misty pecan
red tiger
frank elbow
red tiger
#

Feel free to ask here.

red tiger
#

This channel is for modding support. (Not mods specifically for players)

#

Dev chat.

misty pecan
red tiger
#

Ah ok good.

robust briar
misty pecan
#

I just need to know if something works a way I think it does

#

Cause I’m making a mod that’s going to let a player repair the electrical grid to specific towns

frank lintel
#

yeah Nomadic was here last night asking trying to brainstorm on how power works. that would require making an actual grid? or virtually?

misty pecan
#

Cause I’m gonna make several substations that would allow us repair various towns power each of them only effective in their area

frank elbow
misty pecan
#

Like Louisvilles power station

#

Repair that

#

Louisville gets its power on for say maybe a month or so I’ll add a sandbox option to adjust

misty pecan
#

The intention is to allow the players MP or solo to activate the grid and get power again

frank lintel
#

too bad power usage really isnt a thing

misty pecan
misty pecan
#

But I can make it on a time based thing

#

It “deteriorates”

#

Over a month the power goes out

frank lintel
#

yeah but then to me thats 'time to repair it' never dies

misty pecan
#

There’s a chance I’m gonna add for failure

#

If failed the area sparks and catches fire

#

Burning down the area and ruining the station

frank lintel
#

well sporadic/random totally get thats normal in RL so

misty pecan
#

There is always a chance a substation blows up

#

Happens a lot in unskilled electricians even professionals

#

I could make it so there’s a critical failure and a normal failure

#

Normal failure will make it so you have to fix it twice

frank lintel
#

yeah but you plan on going down that whole road of fuses/disconnects/isolators etc

misty pecan
#

Once to repair the substation the second to fix it completely

misty pecan
#

Fuses are important

frank lintel
#

well now adays circuit breakers

misty pecan
#

If you do it while it’s down a message will show “the power is still down maybe I can fix it”

#

I’ll have small boxes that will appear to fix

#

Maybe 2 per station?

frank lintel
#

if you talking like house supply side yeah 2 for 220/240 but the HV side you'd be 3

#

but gens only give basically 110/120 anyway generally for portables. so dunno on that front what the community would like

misty pecan
#

Honestly I’m more or less making this mod for myself

#

But I wanna post it and open source it so I can have community input and help

frank lintel
#

thats same reasons Im working on Superb, I use it and like it but dev team kinda poof'd from the public so I forked off what was avail.

misty pecan
#

I should shake your hand

frank lintel
#

no no!

misty pecan
#

Or just doing fixes

frank lintel
#

there no GH for Superb I can find only SSR (its predecesor) so I forked took the latest update Feb 5th? and updated my fork to that then started working on bugs from there 'unofficially'

#

pretty much all the code the same, there adds and dels but bunch of folders changed and stuff. havent talked to Ryuu or NolanRItchie so I got no clue what they doing at all.

frank lintel
#

okay laters work day.

misty pecan
#

Ah fuck…

#

I just realized that I use a MacBook not a windows machine for stuff

#

FUCK

#

The tools are only available for the fuck windows….

frank lintel
#

there no intelliJ for Mac?

#

I woulda say netbeans but its not java

red tiger
#

Huh.. apparently there's this for ZedScript...

#
distributionTable.PickUpTruckLightsSmashedRear = distributionTable.PickUpTruckLights;
distributionTable.PickUpTruckLightsSmashedFront = distributionTable.PickUpTruckLights;
distributionTable.PickUpTruckLightsSmashedLeft = distributionTable.PickUpTruckLights;
distributionTable.PickUpTruckLightsSmashedRight = distributionTable.PickUpTruckLights;
#

More to do..

frank lintel
#

odd

red tiger
#

media/scripts/vehicles/vehicle_pickuptrucklights_smashed.txt

#

Wondering if that's an artifact and doesn't belong.

#

Yeah.. nothing's there for that so I'm ignoring it.

frank elbow
#

I don't recall seeing semicolons anywhere else as delimiters (or seeing it in the parsing code), so that's what I'd guess too

frank lintel
#

that is odd

red tiger
#
[130:1] :: Ignoring unknown artifact: distributionTable.PickUpTruckLightsSmashedRear = distributionTable.PickUpTruckLights;
[131:1] :: Ignoring unknown artifact: distributionTable.PickUpTruckLightsSmashedFront = distributionTable.PickUpTruckLights;
[132:1] :: Ignoring unknown artifact: distributionTable.PickUpTruckLightsSmashedLeft = distributionTable.PickUpTruckLights;
[132:87] :: Ignoring unknown artifact: distributionTable.PickUpTruckLightsSmashedRight = distributionTable.PickUpTruckLights;
#

Yeah. It definitely looks like scaffolding or uncommented notes that may need commenting from TIS.

quasi geode
#

junk data. not sure what its doing there, its from the lua (i spotted and removed it a few days ago)

misty pecan
#

Tilezed

quasi geode
#

got the parser fully working validating all vehicles and templates a while ago. moved on to adding lua support, validating items in distribution tables

misty pecan
#

I can’t get it on Mac

misty pecan
#

It’s quick I promise

quasi geode
misty pecan
quasi geode
#

entire map or tile based (after shutoff)

misty pecan
#

To be able to restore the power stations and have electricity in the one town

#

Like in Louisville

red tiger
#

=)

#

I'm currently adding support for sandbox-options.txt.

misty pecan
#

I just wanna know if it’s even possible to enable the electricity when it shuts off

#

And then also my other question

quasi geode
#

its possible but per tile. not ideal really

misty pecan
#

Or would it have to be like a massive coverage

quasi geode
#

hard is relative. i'm saying the current electric system wasnt designed for much other then handling electricity across the whole map, or in a localized area around a generator on a tile by tile basis

red tiger
#

Got to remove an artifact in there but support is there.

frank elbow
# red tiger

I'm not seeing examples for boolean and string, just making sure you didn't miss those ones

red tiger
#

I used another one provided by someone else.

cunning kestrel
red tiger
#

I'll test yours now.

frank elbow
red tiger
#

You have a strange format for it so it'll test my flexible tokenizer.

frank elbow
#

I'd hope it'd work the same despite the lack of newlines lol

red tiger
#

Aaaand parsed.

#

Going to fix a bug.

misty pecan
red tiger
frank elbow
#

Nice

red tiger
#

Sooo that's a thing now.

#

Was there something about a skills ZedScript thing?

frank elbow
#

I'm unfamiliar with that file, but yeah @balmy pagoda had mentioned that

#

That is the wrong person, whoops

red tiger
#

I'm absolutely blind to scripts. I've never written one myself.

frank elbow
red tiger
#

If I find out what file and an example to parse I can gobble that up before grabbing some lunch and then working on IRL work stuff.

#

One thing to note is that my parser doesn't mutually exclude modules and options in files.

#

It'll mix them via options and modules arrays.

#

files without versions are inferred VERSION=1,

fast galleon
#

Better Lock picking, Literacy mod add new skills.

red tiger
#

Is it somewhere on a Git repository?

frank elbow
#

The custom sandbox option parser will reject versionless sandbox-options.txt, but that'd be a linter or checker's job, I suppose

red tiger
#

Well almost.

#

Version should be IMO something shared globally.

#

b42 will have a different schema for ZedScript so I'm worried about not having any sort of version flag or control over that.

#

This is up to TIS.

frank elbow
#

Do other scripts not have an equivalent syntax for specifying the version? I've also not written many scripts

red tiger
#

I'll gently scream from the mountain-tops to add it and still be lovely.

red tiger
frank elbow
#

Interesting and unfortunate

fast galleon
#

I see no github links

red tiger
#

I'll add that strict-check for sandbox-options.txt. Thanks for letting me know.

#

So yes, this will be a linter as well as a parser as well as an API.

#

Examples of like-errors:
LexerError: [286:1] :: Illegal line in 'Base.CarLightsPolice.Part[GasTank]': install

#

It's not illegal, however at the time of this example, install wasn't a known object.

balmy pagoda
red tiger
wet sandal
#

Is it possible to have a 3D model follow the player? I was looking into using hidden equipment, but that gets the rotation following the player/bones which isn't quite what I'm looking for.

#

Really I want a particle system to follow the player, but I assume Zomboid lacks those as that would be weird without the upcoming z-buffer.

#

If equipment is the only way, I can make that work, but need to rethink the style I'm going for.

Just need some sort of visual I can turn on/off to visually tell the player they are in a contaminated building.

#

Maybe just a screenspace overlay would be fine

#

Not as cool though

glass basalt
modern hamlet
#

I add animal footprints to the forage system so that players can hunt. I made the footprints as food so that they would become unusable very soon after they were found. Can someone tell me what is the differences between item:getOffAge() and item:getOffAgeMax() so i can greatly reduce the item's freshness time.

supple reef
#

anyone know of any assets for larger gates?

instead of being only 2 tiles for each side, having 3 or 4?

inb4 the current tileset doesnt really like when you try to manually make them larger (with the exception of garage doors)

supple reef
red tiger
#

@pulsar heath I have completed my parser. You can now look at the full code.

wet sandal
#

Anyone know how to get a list of all the IsoPlayers on a server?

#

Ah, probably server:getConnectedPlayers
The global object has getOnlinePlayers() which was what I needed

glass basalt
#

@ancient grail In the Mod Resources, I recommend renaming the "Lua Folder" post to "Lua load order" or something similar to better describe it 👍

wet sandal
#

Anyone know how big an IsoCell is?

#

Oh, its the loaded area

bronze yoke
#

it's thought to vary based on resolution and such

wet sandal
#

Hmm, hope its not null from the servers perspective

#

Good, the cell exists per player on the server

split basin
#

How bad is using the OnTick event, when my script only changes two variable?

fast galleon
drifting ore
#

somebody knows why my building tab disappeared

#

ahh

#

stone hammer and normal hammer is not the same rip

#

ok

rugged lodge
#

you need carpentry,nails/screws and other tools like hammer i had like that too but you cant build anything and the devs though its useless to have build option if you cant build anything

round stump
rugged lodge
#

is there some idk channels for modders?

split basin
#

OnPlayerUpdate might be what i was looking for, not sure how often its called

round stump
#

well, there you go.

#

Another technique you can use, although I'm not sure how it works on Lua, is having a variable where you count ticks

#

And when that variable reaches X nr of ticks, than you calculate whatever you want

split basin
split basin
#

Oh wow i'm blind

slow graniteBOT
#
BaQstein#5912 has been warned

Reason: Bad word usage

split basin
# tame mulch

If i want to stop the infection to grow, would it be enough to stop the InfectionTime and InfectionLevel?

split basin
#

I'm trying to understand the whole infection process but what is Fakeinfection for? Is it just the character thinking he is infected?

bronze yoke
#

it's for when infection lethality is turned off

#

i think there was a trait that gave it before too

wet sandal
#

Hypochondriac?

#

You'd think you got infected sometimes from scratches even if you didn't

bronze yoke
#

fakeinfection gives all the symptoms but when it reaches 100 it starts going back down

wet sandal
#

Anyone know how far away zombies stay loaded?

split basin
#

Ah thank you!

wet sandal
#

Ah, the zombie pop debugger

#

Perfect, looks like it all lines up with the cell

weak sierra
#

for tooltips

#

i know there's a way to do a newline

#

is it like.. <newline>..? i think?

#

also is there a way to have quotes in the text

#

like an escape char

#

or &quot or something

sour island
#

\n for newlines afaik

weak sierra
#

so can we do \" then?

#

or did they make \n a magic hardcoded one

sour island
#

you should be able to use 'test "thing"'

weak sierra
#

oh it accepts singles for the wrapping?

#

that works

sour island
#

or escape the characters

weak sierra
#

thanks will test some stuff.

sour island
#

afaik it's just a string read into java

wet sandal
#

Rooms are not always divided by walls

weak sierra
#

one would think zedscript is just a lua table at first glance, but very much no

#

or json

#

i don't assume anymore

frank elbow
#

It's <LINE> for the rich text object with the name that escapes me (dunno if this applies to the tooltips, just seemed like what was meant by the "<newline>" thing)

#

ISRichTextPanel or something to that effect

ancient grail
# wet sandal Rooms are not always divided by walls

yes this is frustrating..back when i did the drug mod. there was a function that i ran that will make the whole rromm toxic while crafting the meth.. but then if theres like a lobby or some sort of a division but not walls (usually noticeable when the floors are different.. ) it doesnt get the toxic part so its kind of weird seeing it like that

weak sierra
#

not sure if radius or room is better lol

#

custom player structures would make room hard to use unless it picks that up

#

afaik it does not, seeing as other things don't

wet sandal
fast galleon
#

Superb-Survivors is even worse than I thought, who uses a global var myDialogueWindow...

wet sandal
#

Still need to add some weighting by position, but it works well enough

frank elbow
frank lintel
#

if anything not being the coder and trying to rev/undo bugs/problems this the easiest way for me to learn what not to do

#

if anything insight why they prefix #'d almost all the folders cuz it just irks me every time I see it

split basin
#

What would be the best way to add a custom sound to a food item?

fast galleon
#

I was going to say you can do things like this, so that your functions are called only after you make the UI

function QuestManagerInit(newplayerID)
    --...
    Events.OnKeyPressed.Add(QuestManagerKeyDownHandle)
    Events.OnRenderTick.Add(QuestManagerOnRenderTickUpdate)
end
#

This way the functions would be called after the UI has been made if it followed the usual logic.

#

Then I noticed the absence of locals and modules

spring zephyr
#

my mod's recipe doesnt show up in the "B" menu why is it? i dont have any "NeedToBeLearn:true" this option.

ancient grail
#

Show the recipe

#

Script

spring zephyr
#

i just tested on the hosting server. with my pc. and it shows. but on dedicated server it doesnt show

ancient grail
#

Omg 1800 items thats gona lag

#

You already imported base no need tk use it on the recipe
Just say money

bronze yoke
#

can modules have spaces in them?

spring zephyr
ancient grail
#

You can remove the =1 on the trolleycontainer

And i dont think you need to add ( , )
Comma after the money

#

Iirc

#

Check out vanilla script to be sure

#

Also what albion said

bronze yoke
#

no you need comma

ancient grail
#

No space on your module

ancient grail
#

Thats what you dont need and you didnt add it so all good

spring zephyr
#

i will change the module part and try it on dedicated server

ancient grail
#

@fast galleon hi bud you know if its possible to control distribution using sandbox? Or perhaps the order of things wont allow this?

fast galleon
queen sail
#

is there a simple change that will allow the boombox from True Music to attach onto a particular belt slot or Noir's attachments attachment? It seems all i'd have to do is give it a particular trait

ancient grail
#

Ow theres a spoiler thing i didnt notice . Ok ill figure out how i can use this
Thanks alot

#

🙏

ancient grail
queen sail
#

If i can put it on my hotbar that'd be enough

#

If i can get music to play from a boombox hanging on my backpack? well that's just gravy

#

nothing beats attracting every zombie in town to we will rock you

ancient grail
#

You can doparam and make it attacheable

queen sail
#

how would i do that?

thorny garnet
#

What am I doing wrong here?

        local tobacco_recipes = {
            "Hydrocraft.Open Cigarette Carton",
            "Hydrocraft.Open Cigarette Pack",
            "Hydrocraft.Pack Cigarettes",
            "Hydrocraft.Pack Into Carton",
            "Hydrocraft.Dry Leaves",
            "Hydrocraft.Grind Tobacco",
            "Hydrocraft.Roll Cigar",
            "Hydrocraft.Put Tobacco in Pipe",
        }

        for k,v in pairs (tobacco_recipes) do
            local recipe = getScriptManager():getRecipe(v)
            recipe:setIsHidden(true)
        end
#

I'm trying to disable recipes whose names are listed in the table tobacco_recipes

frank lintel
#

verify setIsHidden because that name is just wrong in what its saying its doing

#

Is would be a ? ie logic response and set is changing the logic so kinda doesnt seem right.

thorny garnet
#

Am I just reading it wrong?

frank lintel
#

that is just wrong on so many levels honestly

#

should just be setHidden

thorny garnet
#

It's not even working 😦

frank lintel
#

yeah it just doesnt seem right if thats a valid func I mean its trying to set and ask a bool kinda throws me.

thorny garnet
#

Are my recipe names at least on point? Hydrocraft.Open Cigarette Carton and others are actually several duplicate recipes

#

Just didn't know if getScriptManager():getRecipe(v) is even able to "get" what I'm trying to find

frank lintel
#

I dunno on that front. if ya worried about that just test it on something known to be valid

#

your func could be the right one I dunno I'm IG atm but honestly if I seen that func named like that first thing I'd be doing is refactoring..

thorny garnet
frank lintel
#

I understood that, and why I said that too :) its just like why would ya combine a set bool and bool return together as a name.

thorny garnet
#

Yeah it's confusing for sure :p

#

Thanks for the help 🙂

frank lintel
#

yeah not your fault... thats not on you. why I said verify its correct

vestal geode
#

Is there any chance to get a players steam play time for pz?

queen sail
#

What is the item code for the treadmill?

red tiger
#

Good evening.

queen sail
#

hi

jaunty marten
queen sail
#

like if i wanted to additem treadmill

red tiger
#

@jaunty marten Hey. I finished the parser code for ZedScript. I am however having a blast doing a CLI.. >__>

jaunty marten
#

hmmm, tbh I even don't remember name of treadmill to find reference, single thing that I remember is treadmill have different name than treadmill, there really strange name for it

red tiger
#

From ZedScript to JSON yes.

jaunty marten
#

have no words only emotions.. panic peepoClap_HPG

#

how much time did u waste for it?

red tiger
#

I did a code cleaning phase this morning. The code is definitely readable.

jaunty marten
red tiger
jaunty marten
#

really? lul

open drum
#

hello fellows, I bring a question

#

I am practicing with sendclientcommand function

#

to execute a funtion to a server

#

function CAP_pressed(KEY)

if KEY == 58 then

local player = getPlayer();
healthUpdate.bodyDmg = player:getBodyDamage();
X = getPlayer():getX();
Y = getPlayer():getY();
Z = getPlayer():getZ();
chunk1 = player:getChunk();

addZombieSitting(getPlayer():getX(),getPlayer():getY(),getPlayer():getZ())
sendClientCommand(player,module,printcode,args)
print("sent")
end 

end

Events.OnKeyPressed.Add(CAP_pressed);

#

so I sent a client command with "printcode" command string

#

and on the same LUA file i also have following code

#

function TESTCOMMAND(player, module, command, args)
print("recieved")

if command == printcode then 
print ("hi")


end

end

Events.OnClientCommand.Add(TESTCOMMAND)

#

and... in theory the string "Recieved" and "hi" should b seen in the game

#

but neither of them appear

#

although "sent" string is showing up so i know sendclientcommand was executed

#

could anyone enlighten me with why the command is not being relieved?

#

No i haven't ran this in single player, i have hosted new server game

modern hamlet
#

I dont know much but can you change function TESTCOMMAND(player, module, command, args) to function TESTCOMMAND(module, command, player, args) and test it

open drum
#

hmm last time i tried to change the parameter orders it showed up an error

#

but i guess i can try again?

#

but would that make any difference? since they are just parameters.. but im not an expert haha

modern hamlet
#

change only the TESTCOMMAND function

open drum
#

ok ill try it

modern hamlet
#

oh also i think you need a separate lua in server folder

open drum
#

yes?

#

so they need to be in a separate .lua?

#

thought they are just to keep in organized

modern hamlet
#

Yes i think you need to separate this part to server folder

function TESTCOMMAND(player, module, command, args)
print("recieved")

    if command == printcode then 
    print ("hi")


    end


end
Events.OnClientCommand.Add(TESTCOMMAND)
#

and dont forget to change the order to this

 TESTCOMMAND(module, command, player, args)
#

This is from my wip mod and its working

local function OnClientCommand(module, command, player, args)

--print(module)
--print(command)

    if module ~= 'MadhousePayment' then
        return
    end

    if command == 'AddExp' then
        SendExpToNearestPlayers(player, args[1])
    end

    if command == 'ReligionCom' then
        --
        SendReligionCommandToPlayer(player, args[1])
    end
    
    if command == 'AddDamage' then
        SendDamageToPlayer(player, args[1])
    end
end
Events.OnClientCommand.Add(OnClientCommand)
open drum
#

oki ill try it ty

#

they are in different folders

#

"sent" is seen in the console

#

but recieved nor hi shows up...

#

no error messege

#

However if I change the parameter to this, it shows up error

#

sendClientCommand(module,player,printcode,args)

odd wraith
#

So my mod is still not working. Subscribing to it in the workshop doesnt add my mod to the mod menu. It also doesn't show up if i put the mod folder inside a different workshop mod. Could this be a folder structure error or mod.info error?

modern hamlet
#

and send command is like this

open drum
odd wraith
#

No

open drum
#

if it didnt' and was successfully uploaded

#

then try opening up the debug log

#

and see if there's any error and the LUA isn't running due to code crash

#

still .. only showing Sent string.. .sigh..

tame mulch
open drum
#

sendClientCommand(player,module,printcode,args)

function TESTCOMMAND(module, command, player, args)

open drum
#

to run the sendclient

tame mulch
#

On dedicated server?

open drum
#

on a hosted local game

#

not single

odd wraith
#

this is the only mention of my mod in the debug log

open drum
odd wraith
#

where is that

open drum
#

if you run ur game in debug mode, and press F11

odd wraith
#

oh my mod doesnt have any lua files

#

it just adds simple items and recipes

tame mulch
#

server will print in this file

open drum
#

oh?

#

oh dang... recieved shows up

#

but where's "hi" text?

tame mulch
#

because printcode is nil

open drum
#

i guess i did something wrong here then?

tame mulch
#

Yep. Printcode is not initialised variable

odd wraith
#

I think maybe i got it working by changing the mod id

open drum
odd wraith
#

its working now but the icons are question marks

#

sigh

open drum
#

Did you set ur item name