#mod_development

1 messages Β· Page 128 of 1

open drum
#

start with Item_your icon

#

??

odd wraith
open drum
#

the icon name is ok in script

odd wraith
open drum
#

yea that name

#

needs to start with

odd wraith
#

so item_CompressedRippedSheets

#

?

open drum
#

Item_

odd wraith
#

Alright ill try that

open drum
#

got it fixed Thank you Aiteron

odd wraith
#

its working! thanks for helping solve my 2 day headache. @open drum

open drum
#

no problem

#

i get my helps in here all the time as well XD

thorny garnet
#

How do I use lua to delete an existing recipe? I've tried using setIsHidden(true) to no avail.

        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 = ScriptManager.instance:getRecipe(v)
            if recipe then
                print("********************* Hydrocraft -> Recipe Hidden? -> " .. v)
                recipe:setIsHidden(true)
                print(recipe:isHidden())
            else
                print("********************* Hydrocraft -> Recipe NOT FOUND ->" .. v)
            end
        end
#

Above code always returns recipe:isHidden() == true, like it's working, but when I go in-game the recipes are all still available

thorny garnet
ancient grail
#

Make it learnable

#

Then dont create anything to teach it

thorny garnet
#

That'll work. Wish there was a way to outright disable them but I'll take it. Been working on this prob on and off all day

glass basalt
#

if I want to require modFileOne.lua in modFileTwo.lua in the same folder, would the correct statement be require(modFileOne) or do I need to create an object in modFileOne.lua as a "module"?

weak sierra
weak sierra
#

i plan to put this in its own dependency mod so that multiple mods don't need to fuckin loop thru all the recipes

#

but it's like 2ms so it's not that bad

open drum
#

oh where did it go??

weak sierra
#
--[[
    Version 1.2
    
    1.0: YeetRecipes.lua Written By UdderlyEvelyn 9/9/22
    1.1: Updated To Remove Recipes From Books/Magazines 9/24/22    
    1.2: Removed removal from books/magazines, affecting CanPerform instead now.
    
    Feel free to use this, retain credit to me please. :)
    
    If you only need to replace *one* recipe with a given 
    name, it is more efficient to use overrides/etc.! If
    you're already using this, though, might as well
    use it for all recipes to be removed.
]]
local modName = "UdderlyRP"

local recipeDisplayNameLookup = {}

local recipesToYeet = {}

recipesToYeet["Make Sling"] = true --Nah, let's suffer! :)

local yeeted = 0
local start = Calendar.getInstance():getTimeInMillis()
local recipes = getScriptManager():getAllRecipes()
for i = 1, recipes:size() do
    local recipe = recipes:get(i - 1)
    local name = recipe:getName()
    recipeDisplayNameLookup[recipe:getOriginalname()] = name
    if recipesToYeet[name] then
        recipe:setIsHidden(true)
        recipe:setCanPerform("nope")
        yeeted = yeeted + 1
        print ("["..modName.."] Yeeted \""..name.."\"..")
    end
end
local stop = Calendar.getInstance():getTimeInMillis()

print("["..modName.."] Yeeted "..yeeted.." recipes in "..(stop - start).."ms!")```
open drum
#

i was reading it xD

weak sierra
#

was posting a shorter with syntax highlighting version

#

dw :p

thorny garnet
#

Thanks πŸ™‚

glass basalt
#

gotta do that '''lua ''' magic lol

open drum
#

ty haha

weak sierra
#

UdderlyRP_YeetRecipes.lua

#

in shared

#

if you use this dont use the same filename, and change the modName variable

thorny garnet
#

I've been looking at the Recipe doc all day and not once noticed the setCanPerform bit :/

weak sierra
#

i have hesitated to share this cuz i wanted to make it a released thing

#

but

#

lord knows when ima get to that

thorny garnet
#

So far I'm just going to use it in Hydrocraft b41 continued, to stop tobacco items from spawning as they have no recipes of consequence and conflict with other smoking mods

weak sierra
#

removing a recipe won't stop an item from spawning

#

separate thing to do

thorny garnet
#

I know, I've already set up their distribution to be conditional

#

So they no longer spawn but if you didn't have a smoking mod installed and ran across 20 or more cigs, you'd still get the option to "pack" them into Hydrocraft packs

#

Which if you have "Spawn Tobacco Items?" disabled, you'd expect all of that crap to disappear

glass basalt
#

is this correct? I just really don't get the require statement, the lua docs don't explain it simply lol

open drum
#

looks correct to me

#

except no parenthesis

glass basalt
#

no parentheses? all of the require statements I've seen in Kahlua have parentheses

#

I just need to launch the game and try it...

glass basalt
#

yep, need parentheses.

open drum
#

gotcha πŸ™‚

#

This works on single player, but if i run it on server it cause error

#

could be because i have to use getSpecificPlayer() instead of getPlayer but how do i know if the game is calling the right player? like.. the player who exceuted this command?

#

since the index is from 0 to what ever the player number... and it always varies

glass basalt
#

it causes an error because the server doesn't know how to use getPlayer() and will return nil. Use the player parameter in your TESTCOMMAND()

#

that player is given by the client, who knows what getPlayer() is

open drum
#

i thought getplayer() function is inherited to all lua

glass basalt
#

simply remove local player = player, you already have it as a variable ready to go

glass basalt
#

client on the other hand does not know how to access the world tiles, like server

open drum
#

hmm i see

#

i am still struggling to understand how server and client works

#

even after i read the forum

glass basalt
#

it is not fun, no

open drum
glass basalt
#

documentation would be amazing!!!

open drum
#

Can you help me to understand the getSpecificPlayer() and getPlayerIndex() ???

#

do i have to getplayer index first

dark wedge
#

The server absolutely knows how to access players.
On the server, you have to use getPlayerByOnlineID(playerID)
The OnlineID is only given to a player during multiplayer

open drum
#

and put its return into getspecificplayer parameter?

dark wedge
glass basalt
open drum
open drum
#

so ill have to get player's ID first

#

then it will return the player's id in int or wat so ever, and use it as variable to call the function onto that player?

#

gee im making myself locked in a paradox

dark wedge
#

When you send the signal from the client to the server, the player parameter IS the online id of the player that sent the command.
You can't pass an IsoPlayer object like that, as the client and the server don't have the same reference, so it sends the onlineid of the player and the server can get it via getPlayerByOnlineID()
just ignore this. xD

#

Actually, scratch that. the game does it for you. dope. The player variable should actually already be the player. neat.

#

been a long day. drunk

open drum
#

hahah i feel ya

glass basalt
#

honestly, the less communication needed between server and client, the better, f#&@ that dumb business

open drum
#

xD i feel ur rage

viral notch
#

is there way to request item by vehicle part?

glass basalt
glass basalt
viral notch
#

custom wheel rack for vanilla wheels as spare wheel addon
so if you not mount wheel rack then you don't have option in car to mount spare wheel, but after you install that part you'll see option to install spare wheel

glass basalt
viral notch
glass basalt
#

they have specific names, so you cannot make one mod that universally covers all of his vehicles

#

the only parts that do not have specific names are the vanilla, default ones like Battery and GasTank

viral notch
#

expl you can install roof storage without installing railings or same for trunk doors for additional stade where should ve required to have trunk built to can mount doors...

glass basalt
glass basalt
viral notch
glass basalt
#

the issue is that the wheel rack can only install certain wheels, or that the wheel can be installed on the vehicle without the rack?

#

I am having a hard time understanding your issue, I am sorry

viral notch
#

due is something like install part on another part

#

and that idk if is possible to make

viral notch
# glass basalt you can change that by editing the script file that contains the vehicle, or whe...

also there is way to make similar part as upper but with adding item to install table for existing slot?
as expl : you need to install custom fusion box to can install trucks batteries for car battery slot (without fusion box you see only car battery that can be installed, but after installing fusion box you will see in battery slot option to install car battery and truck battery)
that is possible to make?

glass basalt
#

I do not know, I have not seen any vehicles that dynamically change which parts can be added. The only thing I have seen is "missing parts" for upgrading, like in KI5 and Autotsar Tuning Atelier

viral notch
#

:/

#

dam

glass basalt
viral notch
#

thx will look for that

#

now how to make possible to do with batteries

glass basalt
#

@drifting ore I've got the weirdest problem: I can't add your mod "Light-Switch Overhaul" to my collection. Is that because of the review bombing or something else? nevermind, I found your re-upload πŸ‘

viral notch
#

at all

#

with some mods has same problem so from that know it

glass basalt
#

strange, Nippy uploaded a second version of the mod. I'm guessing that's to circumvent the crap that's going on

tawny elk
#

Hello, is there code to determine if stationary containers were made by the character?

glass basalt
#

that can be determined, but I have no clue how

#

I simply know it is possible

tawny elk
#

SandboxVars.ZombieLore.ThumpOnConstruction may be the key to my issue.

fast galleon
fast galleon
sour island
#

Are you trying to prescribe a "created by" value or?

#

Why is nippy getting review bombed o..o

tawny elk
sour island
#

Yes, sorry - I'm curious what your goal is

tawny elk
sour island
#

What mod is that? It multiplies items?

sour island
#

Any luck contacting the author?

tawny elk
sour island
#

Fair enough, I saw in the description the author isn't reachable/interested

#

Are you using the OnFill event for spawning items?

#

onFill is the event that is called when loot is spawned naturally

#

I assume the vanilla game bypasses it for constructed things

#

Not at a computer at the moment but by chance I was using the event for dynamically changing items

#

The params for it include the container name, type, and container itself -- which means you can pull loot info right from the distro

#

I think you could probably call loot spawn on the container itself though -- to simply reroll additional loot if you didn't want to break down the methods

fast galleon
tawny elk
thick karma
#

How I feel when I see players asking about controller support on an unsupported mod when I have a controller supported similar mod but I don't want to be seen as advertising on an active modder's mod page so I don't tell those poor players that they could easily have what they want if they simply knew my mods existed: 😭 😭

#

I hate competition 😭

fast galleon
#

People still install clearly obsolete mods and don't read descriptions

ancient grail
#

You did the right thing. But you can contact the dude if his discord is same as steam i guess

thick karma
#

I hear you... and tbf I am not trying to say that their mod is worse than mine because it lacks support for controllers... The specific mod I just looked at has some (unique) value that KBM users would likely appreciate... But still, it has none for controller users, and I wish I could just help them without worrying about people's egos along the way.

thick karma
faint jewel
#

anyone here written frag shaders before?

sour island
#

I presume it's catching the inventory display and spawning stuff there and using modData to stop it from repeating

#

Moving that code to OnFill would make it only apply when the loot is spawned

#

Afaik it doesn't run on player built structures

winter tree
#

Hey everyone, I'm working on a mod and the items I'm creating have a maxcondition set in the items.txt but don't display their condition in the inventory like say for example a brakes or tires would. Anyone know why?

#

it's set in the items file.. but only shows encumbrance in game

fast galleon
winter tree
#

mechanics item is set to true

I tried to set a vehicle type and the game broke lol

#
    {
        DisplayCategory =    VehicleMaintenance,
        Weight            =     0.3,
        Type            =    Normal,
        DisplayName        =     BrakePad,
        Icon            =    BrakePad,
        StaticModel     =    BrakePad,
        ConditionMax     =     100,
        MechanicsItem     =     TRUE,
    }```
#

oh wow, out of sheer stupidity I tried to add the vehicle type again and it worked.

I must have forgot a , or something last time

#

thanks guys haha πŸ˜„

ancient grail
#

definitely the wrong channel glytch go to #creativity hehe
but wanted to share to you guys.. emote for a vblogger/gamer client

  • icons for vishnya
iron talon
#

Has anyone here used chatGPT or other AI tools to write / help with PZ mods? I've seen some people post a few things on other discords and didn't know how accurate the stuff was

real helm
#

Depends what you need) but you cloud train chat to write for you)

sour island
#

I haven't seen an example that's accurate but it's somewhat close

#

It could probably write scripts or repetitive stuff tho I just use excel for that...

iron talon
#

I bet it would do pretty well if you could feed it some type of error output automatically, saw a whitepaper the other day showing that one of the models could fix its own code by reading the output errors.

drifting ore
#

the prob with writing stuff without knowing what you are doing is debugging. it could sure maybe write up something. but if you started running into issues. you will spend probably more or as much time figuring that out than just learning to write the mod

iron talon
#

c: pretty neat for gaming modding and design

iron talon
sour island
#

It would probably be more useful on a standalone project too

#

PZ has a lot of intricacies unique to it

real helm
#

chatGPT much better to be used like assistant for planning or idea generation

#

Or if you have straight up question and doesn’t want to look throug google for the answer)

sour island
#

Is there a website to use it?

#

I didn't think to try it out tbh

real helm
sour island
#

I'm working on something I think it could help with - catching possible features I'd need

real helm
#

Yeah, it might help (or might not) kekeo

#

But it really could generate ideas for features/mods

sour island
#

Well that's pretty accurate

iron talon
ancient grail
#

I like ChuckGPT more.

#

Hows the card mod doing btw?

sour island
#

Still working out the controls/feel

ancient grail
#

Wow

#

Whaat game you plan to build?

sour island
#

It's free form

ancient grail
#

Black jack might be easiest

#

Ah i see

sour island
#

Less work for me if I just have to focus on card deck logic, and board game pieces

real helm
ancient grail
#

You just need the shuffle function which is super easy for you to do.

sour island
#

Let players move stuff around and possibly cheat eachother πŸ˜…

ancient grail
#

RP mod nice

sour island
#

Shuffle is there

ancient grail
#

Wepl maybe if the cards have specific serial id per deck they wouldn't be able to cheat

sour island
#

Using the vanilla CardDeck item I give it a modData list of cards -- drawing a card creates another CardDeck item with just that card listed. Drag dropping decks merges them.

#

This will let you mix up cards from any deck

ancient grail
#

Ow yeah from your shop money mod

#

Nice one

sour island
#

Yeah same code

ancient grail
#

Thats efficient

sour island
#

Cards are just strings, not going to bother with values as it's not needed

#

Also keeping it as freeform as I can, so I can add more games later

#

And not have to program whole new features

ancient grail
#

Smart

sour island
#

I do plan to add Uno tho

#

"everybody has Uno"

ancient grail
#

Lool playing a game within a game. Thats inception shiz

sour island
#

They mentioned on the blog about adding more junk items- they seem to be all board game centered.

#

I think junk items should always have a use, even if it's just gameplay flavor or white-noise

#

Same reason I wrote Named Literature. Very glad the devs seem to share the same outlook.

#

I hope they change books to be not consumable tho lol

drifting ore
#

also 100 lmao

#

i created so many version of read books just to give that effect in my server

sour island
#

Ooh, I wonder If I can use chatGPT to make puns from the book titles

drifting ore
#

oh for sure

#

it whipped up 40 punny lightbulb related comments

sour island
#

Hmm, I'll start feeding it titles lol

drifting ore
#

i told it to have avg 5 words with max of 7 words and it nailed it

#

yea only a couple examples of your type of humor will do the trick

sour island
#

I considered having real world titles to be iffy but I think using only the title falls under fair use

#

Even commercially(?)

drifting ore
#

anyone who answers that won't give you the answer i bet

#

πŸ˜›

#

i'd just roll with it and not worry too much lol. or if you are worried at all just dont

#

actually i did look a little bit

#

i guess because they are just words throw together to make a title, they are all fair use

#

should probably post the actual link lol

#

this seems to be focused on books and writing

sour island
drifting ore
#

haha

sour island
#

These aren't half bad, but the poor thing took so long. Same speed as a NES rpg

drifting ore
#

lmao yea thats why i can't use it for anything but math stuff and things like that

sour island
split basin
#

How long does a eat sound has to be, so it doesnt loop? Already added loop = false.

iron talon
hollow current
#

soo i have a weird issue... I have a mod which adds a slice to the vehicle radial menu. I was updating the icon for that slice, so naturally, i removed the old icon, and put the new icon, and then updated a few bugs in the code.

I am being driven crazy because it still shows the old icon (even though its not even in the mod's directory anymore??). I thought its reading the mod from somewhere else, but the bugs I fixed in the code are updated and the changes I made to them are taking effect in-game, but not the new icon. Is there something I am missing?

#
menu:addSlice(vehicle_name .. getText("ContextMenu_clickToRename"), getTexture("media/ui/vehicles/rename.png"), ISRenameEverything.onRenameVehicle, player, vehicle);```
#

actual in-game icon

sour island
#

Are you subbed to the mod? If it's on the workshop that is.

#

You'll have to unsub to use the local version.

hollow current
#

not even subbed to the workshop version

#

-- maybe i am lemme see

#

sighs I was sure I wasn't but apparently I am

sour island
#

That'd do it

#

I kind of wish the game could handle local vs workshop but they share IDs so it would be a hassle to compare directories and list both

modern hamlet
#

Here is a very good example of chatgpt and openai for games ^^
https://www.youtube.com/watch?v=akceKOLtytw&t=0s&ab_channel=Bloc

The following video will demonstrate the using ChatGPT in Bannerlord with a custom build story engine for NPC dialogue interactions.
SECOND VIDEO(more characters, professions etc): https://youtu.be/L_qauw4QM3Q
In the video, we will go to Battanian village, Imlagh and start chatting with random NPC's. NOTHING is scripted in this video.
This imp...

β–Ά Play video
sour island
#

Might be using the voice AI ElevenLabs for more variety in EHE. I didn't consider having AI also write the lines

faint jewel
#

anyone got a function for right clicking on a player to add a context menu option.

#

or a mod that does such a thing?

#

@mellow frigate you around?

#

or @timid plume

young edge
#

ElevenLabs
I assume EL is the only real option atm, huh?

frank elbow
hot goblet
#

May be a silly question, but I’ve been trying to figure out a way to set vanilla items as a potential water source, such as the shower head, washing machine, etc. Is there a simple way to to just make these fixtures have a similar interaction to a sink/toilet?

drifting ore
#

TileZed has the ability to do this also

hot goblet
hollow current
# faint jewel anyone got a function for right clicking on a player to add a context menu optio...
if clickedPlayer and clickedPlayer ~= playerObj and not playerObj:HasTrait("Hemophobic") then
        if test == true then return true; end
        local option = context:addOption(getText("ContextMenu_Medical_Check"), worldobjects, ISWorldObjectContextMenu.onMedicalCheck, playerObj, clickedPlayer)
        if math.abs(playerObj:getX() - clickedPlayer:getX()) > 2 or math.abs(playerObj:getY() - clickedPlayer:getY()) > 2 then
            local tooltip = ISWorldObjectContextMenu.addToolTip();
            option.notAvailable = true;
            tooltip.description = getText("ContextMenu_GetCloser", clickedPlayer:getDisplayName());
            option.toolTip = tooltip;
        end
    end```
This is the way "Medical Check" displays when clicking on another player in the vanilla files
#

Check line 452 in media\lua\client\ISUI\IsWorldObjectContextMenu.lua

ISWorldObjectContextMenu.createMenu = function(player, worldobjects, x, y, test)```
#

you should be able to use this as a starting point for editing it to your mod's needs

fast galleon
#

how does the game hide walls?
*oh right, change alpha

red tiger
supple reef
#

I am running into trouble getting my map mod to load into the game

I can see it in the mod list upon loading PZ, I have all the files correctly placed in the mods folder.

I load into the game and I head to the chunk where my map mod should be loading and nothing is there

fast galleon
supple reef
fast galleon
supple reef
#

checking that now, but I dont see any errors

fast galleon
supple reef
red tiger
drifting ore
#

also why do you have so many spawn files

#

you either add it into objects or create a new file and add there, but you shouldnt need multiple files for it

supple reef
drifting ore
#

it could break it but most likely not the problem

#

make sure you added the mod. then goto maps, add the map. in the edit server settings in host

#

make sure the map is ABOVE Muldragh

#

also make sure you added the vanilla lot in there also if it's for vanilla map

#

mod load order and map is backwards from each other. mod order is load from top to bottom. map load order is from bottom to top

supple reef
#

I know my map.info is set up properly

As far as the maps portion are you talking about the map.bin file or just the chunk files like I have above.

Or is it something that the resources I had didnt cover?

drifting ore
#

are you loading into a previous save or new

#

if new then forget map chunks

#

when you setup a mod in PZ

#

you goto host. you click edit. you goto mods, you use the dropdown menu to add the mod

#

if its a map you have another step. you goto maps two spots below that

#

then the map should in theory already be added. but just to be sure check

#

make sure it's above muldraugh, ky

#

if you did all my directions and still no work, then you did something wrong when exporting your map from worlded or tilezed

opal nest
#

Hi guys I've just created my first mod that simply adds a new drink to the game using the Whiskey structure. So I have the full object, water full object and empty bottle object for it. It all works well except I can't drink water out of the bottle once it's been refilled. Is this a common issue and if so does anyone know the fix?

red tiger
fringe ridge
#

My course of action would be looking at how bottles work and see if you missed a line of code

red tiger
#

Would be great for RPG servers

fringe ridge
#

Currently trying to figure out if i can force my char to equip a welding mask for a recipe i'm making.

opal nest
#

Sounds super cool

fringe ridge
#

But i don't think that's possible without a bunch of extra lua

red tiger
drifting ore
#

most script info is in the pzwiki

opal nest
red tiger
#

I keep watching the chat here.

twilit geyser
#

So

#

Quick question.

#

When adding a crafting recipie, How do I drain a car battery a percentage instead of destroy it

drifting ore
# opal nest I've had a look through this and it all seems to be there

water pot script posted earlier

    {
        DisplayName = Cooking Pot with Water,
        DisplayCategory = Water,
        Type = Drainable,
        Weight = 3,
        Icon = Pot_Water,
        CanStoreWater = TRUE,
        EatType = Pot,
        FillFromDispenserSound = GetWaterFromDispenserMetalBig,
        FillFromTapSound = GetWaterFromTapMetalBig,
        IsCookable = TRUE,
        IsWaterSource = TRUE,
        RainFactor = 1,
        ReplaceOnDeplete = Pot,
        ReplaceOnUseOn = WaterSource-WaterPot,
        Tooltip = Tooltip_item_RainFromGround,
        UseDelta = 0.04,
        UseWhileEquipped = FALSE,
        StaticModel = CookingPot,
        WorldStaticModel = CookingPotWater_Ground,
    }```
opal nest
fringe ridge
#

from what i can gather right quick is that you turn your empty bottle into a totally different item and if you add all required lines (like the pot with water posted by Nippy) it should just work XD

drifting ore
#

there is an item for empty and one for not empty

red tiger
#

Nothing to show just yet but I'm working on a visual editor for ZedScript.

opal nest
#

The empty one works but its the water filled one that causes the issue

drifting ore
#

you will see some basic requirements for water item here

#

it's probably because you arent indicating its water

#

whats the script look like

#

probably will help

opal nest
#

Ill get it now

fringe ridge
#

I'm still trying to figure out if i can force my char to equip a welding mask when it's crafting an item i'm working on xD but i seem to be failing at that xD

twilit geyser
#

Guys, How do I make this not destroy car batteries?

#

Idk how to post a code. ;-;

supple reef
fringe ridge
drifting ore
fringe ridge
#

i'm not that good at lua yet, but i doubt i'd be as easy as just referencing to the game's code for disassembly or something XD

drifting ore
#

its easier than that really

#

because the example here is for wearing a clothing item

drifting ore
#

eat type?

opal nest
drifting ore
#

nm thats animation i forgot

#

one sec

opal nest
#

I was wondering what it was

humble oriole
#

Hey guys, I'm having some issues with an onEveryHours event. It's working on my local hosted session, where you hit host and load it in there, but on the server it's not loading and nothing is being printed to the console.

function SBioGasSystem.sandbox()
    --Events.EveryTenMinutes.Add(function()SBioGasSystem.instance:addBioWaste() end)
    Events.EveryHours.Add(function()SBioGasSystem.instance:processBiowaste() end)
end

Events.OnInitGlobalModData.Add(SBioGasSystem.sandbox)

SGlobalObjectSystem.RegisterSystemClass(SBioGasSystem)```
wooden lodge
#

How does one simply disable / remove all vanilla recipes?

bronze yoke
#

just replace the vanilla recipes file with an empty one

wooden lodge
#

I tried that, it doesn't seem to be working

#

am I missing something?

#
module Base
{
    
}```

that's all there is in C:\Users\Terrormuecke\Zomboid\Workshop\KaeldorMedieval\Contents\mods\Kaeldor\media\scripts
small topaz
fringe ridge
#

OnTest:Recipe.OnTest.IsNotWorn, is not what i'm looking for i think, that checks if an item isn't work (like with ripping sheets from clothes) and all i want is for my char to equip the welding mask before they start making the item in from the recipe XD

wooden lodge
#

And how does one remove all professoins but unemployed? lmao

#

Sorry ubt this is new land to me

supple reef
bronze yoke
#

e.g. if poisonDetectionLevel is 2, you need to be level 8 or higher to know it is poisoned

fringe ridge
#

i think i understand how the ontest stuff works, now my brain just needs to work with me ROFL

drifting ore
#

Ohh I reread

#

You are right

#

You just want it to force equip?

fringe ridge
#

yeah i want my char to equip the Welding mask

#

i got the animation to use the torch already so that's working as i want it

drifting ore
#

I think setcanperform or oncanperform can do it also

#

It triggers before crafting ends

fringe ridge
#

yeah i was looking at that page you linked, but now i need my brain to work with me XD

drifting ore
#

Lmao I feel you there

fringe ridge
#

(gotta love autism, in my case at least)

drifting ore
#

It took me so long to setup custom craft speed by sandbox options

#

I still didn’t even implement even though I got it working hahaha

fringe ridge
#

I'm implementing a recipe in my mod so players can make a set of pliers using some materials and a can opener, with the end result of being able to turn Wire into barbed wire for the weapon

#

and crud the F key on my keyboard keeps ghosttyping :S

#

i hope that's not gonna get worse. this keyboard wasn't cheap

twilit geyser
#

Any reason why that my mod has no content, but is 7 mb and was downloaded?

#

There's 0 content in game

#

but it downloaded 7 mb

supple reef
#

@drifting ore

Map did not show up in game on anything anywhere.

I am going to try and go back through and redo all the main files.

If you see anything wrong lmk please

#

upon load, I confirmed that the mod is "enabled"

next I went to

Solo >

#

so its not even showing up in the spawn list

#

Is that going to determine if its on map or only if its a spawn point

#

I have spawns set for specific professions within the mod but not "all"

opal nest
#

Do you need lua to add new food and drink or is it purely the scripts?

small topaz
wooden lodge
#

How can I remove all selectable professions or replace them with my own?
Naming the file the same doesn't work, the host 'terminates' on start up

wooden lodge
#

The file name or?

#

sent

fringe ridge
#

think i'm too tired, i can't seem to come up with what ineed to type to make this work, what i do have right now kinda triggers the recipe not being craftable even IF the mask is equiped LOL

#

I've tried looking at the code for fishing and other things to see how it works but i just can't wrap my head around it for some reason

fringe ridge
#

Thanx for the help regardless @drifting ore

drifting ore
#

Np. You essentially will create the requirements or actions you want to happen within that timeframe of the lua script running.

drifting ore
supple reef
#

I used InGameMap and when I looked at the xml file nothing was in it.

Do I need to define something or even worry about that?

red tiger
supple reef
#

I think I got it

drifting ore
#

oh you dont need xml to see it in game

#

only on the worldmap

#

if you dont have that, it will still appear at the location in game. just cant see anything on map. to see on map you have to generate features

#

normally when you place buildings, you can tag, or they will be tagged already in buildinged with a specific building property.

small topaz
#

does anyone knows which part of the vanilla code realizes crafting the evolved recipes? I just checked ISCraftAction.lua but this seems not to be active in this case

wooden lodge
#

We've tried so many things now. Does anyone know how to remove all vanilla professoins?

#

Like, this is doing my head in right now πŸ˜‚

true vault
#

I mean, if you don't mind using the Profession Framework as a dependency, it's a single line of code

wooden lodge
#

Whatever it takes at this point

#

I'm starting to burn out

#

I tried removing professions using the Framework

#

It doesn't work, cna you please assist me somehow

true vault
#
ProfessionFramework.RemoveDefaultProfessions = true
#

I currently remove all professions myself, for a Medieval mod I'm working on; that's line 1 lolz

#
ProfessionFramework.RemoveDefaultProfessions = true
local addProfession = ProfessionFramework.addProfession
addProfession('Peasant', {
    name = "UI_prof_peasant",
    icon = "prof_peasant",
    description = "UI_profdesc_peasant",
    cost = 0,
    traits = {"Peasant"},
})

local addTrait = ProfessionFramework.addTrait
addTrait("Peasant", {
    name = "UI_trait_peasant",
    description = "UI_traitdesc_peasant",
    profession = true,
    exclude = { "Mechanics", "Formerscout", "Handy", "Hunter", "Hunterhunter", "Nutritionist", "BadMiner", "GoodMiner", "SpeedDemon", "SundayDriver"},
    recipes = {"Make Stick Trap", "Make Snare Trap", "Herbalist"},
})

The full file right there; removes all professions, then adds in a new one

wooden lodge
#

I'm going to try this, much love going out to you lmaooo

true vault
#

No worries, good luck! If you need additional assitance feel free to ping or DM if you want :3

supple reef
#

I have generated lots, Objects, spawnpoints, I have created zones for water, town..etc

#

Is my Tilezed supposed to be different than my world ed?

#

because Tilezed doesnt give me any options to do anything like world ed does and I never saw dirk or Blackbeard do anything major in TZ

small topaz
# wooden lodge We've tried so many things now. Does anyone know how to remove all vanilla profe...

I think you essentially need to overwrite the vanilla function BaseGameCharacterDetails.DoProfessions then. This is also what the ProfessionFramework does when RemoveDefaultProfessions is set to true. When you overwrite, you need to make sure to add some code like

    for i=1,profList:size() do
        local prof = profList:get(i-1)
        BaseGameCharacterDetails.SetProfessionDescription(prof)
end```

at the end of your new function to make sure that your new professions get the correct descriptions in the interface. And note that overwriting the vanilla code may lead to several compatibility issues with other mods and in the worst case, to compatibility issues with upcoming vanilla updates.
wooden lodge
#

I finally figured it out

#
ProfessionFramework.RemoveDefaultProfessions = true
#

That was literally it

#

πŸ˜‚

#

This is insane

#

I've spent like 2-3 hours to find out I was missing the 'true'

drifting ore
small topaz
#

ah ok. then you still use the Framework. Setting this to true has also the effect that the vanilla function is overwritten then. But maybe still the easiest solution

supple reef
drifting ore
#

haha i get ya.

humble oriole
minor mauve
#

Hello everyone! I need some help, and I think this is the best place to ask, long story short, I'm trying to create a mod that adds some more jewelry (cosmetic only), but I can't fully understand how to do it, I've already been following the steam and theindiestone guides but clearly it is something that is beyond me, I can change textures without problem, but I can't figure out how to add a new object, so I wanted to ask if anyone knows or has a template for a jewelry mod in which I can replace models 3d or textures, to make my life easier. I would appreciate it

red tiger
#

If you scroll up I posted a generated UML of the item category for ZedScript.

thick ginkgo
#

hi guyz, does anyone know how to upload a playermodel to the workshop

#

??

sand dragon
#

I believe in you, I'm excited to see the finale product!

tawny elk
#

Stop loot spawn in player-made containers

ancient grail
#

anyone knows how to get a square using a click

#

left click

red tiger
#

Color-coded UML

#

Made a custom theme to mimic VSCode's "Dark Theme"

somber heath
#

can you override base tiles info?

red tiger
#

Redid my items UML from earlier.

#

I'll probably combine these UML into one.

#

Then it'll be a mega-atlas for ZedScript objects.

#

:D

fringe ridge
#

Something's puzzling me, The game says certain animations are not in player/actions, but the file exists? for example, i can get SawLog to work, but LootLow fails to work.... am i missing something?

ancient grail
#

The xml file

fringe ridge
#

the XML file is called LootLow and the name inside is also stated as such, but yet the game says it's not there even though it is... could it be because i'm assigning props?

#

Trying to find an animation that works with what i'm trying to have the character do (whittling) InsertBullets gets close, but he's cutting his hand with the knife ROFL

ancient grail
fringe ridge
#

i'll just fiddle with it, maybe i'll just copy an animation and tweak it to fit my mod

#

Bandage defaults to the fallback animation (surrender), so i guess it might be the "props"

#

found a workaround xD

#

just wish i had a way to reload lua while ingame, haha going back to the menu and reloading the save is getting tedious XD

fast galleon
humble oriole
#

They get put into debug log, right?

#

I don't know what else it could be either, they're 1:1 with mods and everything and the actual server just doesn't seem like it runs the hourly code.

fast galleon
humble oriole
#

Events.OnInitSystem.Add(SBioGasSystem.sandbox)

#

like that?

fast galleon
#

you surely must have a system function where you setObjectModData?

It's a system function that is called when you make the system instance.

humble oriole
#

self.system:setObjectModDataKeys({'methane', 'biowaste', 'fertilizer', 'exterior'})

fast galleon
humble oriole
#

oh, I see the whole thing

#
    SGlobalObjectSystem.initSystem(self)

    -- Specify GlobalObjectSystem fields that should be saved.
    self.system:setModDataKeys({})
    
    -- Specify GlobalObject fields that should be saved.
    self.system:setObjectModDataKeys({'methane', 'biowaste', 'fertilizer', 'exterior'})
end```
#

what's crazy is this was working

#

I guess it has to be a mod conflict or something

#

it just blows me away that it would work locally, but not on the server

fringe ridge
#

Does anyone have a way to import PZ animations into blender? i wanna tweak an excisting animation slightly to suit my needs and don't feel like coding the entire thing from scratch

rare wigeon
#

Can someone help me? I can't understand how to make my furniture moveable. I tried everything - used tilezed, wrote script, but it just didn't work.

fast galleon
#

On this note, I wonder if it's even worth making the new function
function()self:doStuff() end vs doing local self = system.instance

fringe ridge
#

nvm i found an online converter that allowed me to convert the .x to .fbx πŸ˜„

fast galleon
humble oriole
rare wigeon
#

I can rotate it, I can place it when I spawn them as an item, but I can't pick it up

humble oriole
#

do you toggle it "IsMoveAble"?

rare wigeon
#

Yes

humble oriole
#

that's all I got haha

fast galleon
rare wigeon
small topaz
#

Question about the poison system: There is a java command called "player:isKnownPoison(item)". Does anyone knows whether there is also a command like "player:setKnownPoison(item)"?

humble oriole
#

what's your goal? doesn't look like there is one

bronze yoke
#

isknownpoison is what queries things like poisondetectionlevel

#

so not directly, but yes if you set one of the actual ways of detecting poison

fast galleon
small topaz
bronze yoke
#

yeah, as well as the herbalism type and some other stuff

small topaz
#

kk

#

thx

ancient grail
chrome egret
# red tiger

Awesome, can't wait to see this all published!

ancient grail
#

Any feedback? Comment? Violent reaction? Suggestion or whatever

chrome egret
#

Is that bone costume related, or you just happened to post both this morning?

#

Pyrokinesis is of course a fantastic gameplay idea

frank elbow
#

The letter spacing within the word "Pyrokinesis" and between that word and the word "Trait" looks a bit strange, presumably because of the thin "I"s (but also in certain letter pairs: O+K and R+A). I don't think it's terribly noticeable, though

#

Overall, well done 🀠

lusty marsh
#

Does reverting an update remove the new files?

#

or do I have to do an update stubbing the broken files?

hollow current
#

is it possible to display textdraws above vehicles? Kind of like the textdraws that appear when watching TV?

modern hamlet
# ancient grail

If you are not satisfied with the result, you can try to have it done by ai. I leave an example

red tiger
#

Good morning.

#

Was fun staying up last night working on perfecting my current UML diagrams for ZedScript.

#

I plan to do the rest of the categories for ZedScript and then make a mega-map of all images.

#

I have no one to check my library for accuracy.

red tiger
# red tiger

Oh hey @tame mulch . I hope that people find these works useful.

ancient grail
red tiger
#

Anywho, delivering the work as promised.

#

For modders here: Would you be interested in VSCode support for ZedScript? (Syntax highlighting, error-checking)

#

Since my work for ZedScript is in Typescript, I can make a VSCode plugin with it.

warm quiver
ancient grail
#

Great

#

I like the triippy pattern background but this does look clean.

lunar carbon
#

question, what is the difference of making a recipe on .txt file if can do it in lua

frank lintel
#

perfect timing. Poltergeist was told you might know this answer... what controls what lua script is loaded, and when. is there any control? or they just all loaded up for a mod without any order/control?

fast galleon
#

this, you can also require inside your script to make a file in same server/client/shared folder is loaded for sure.
@frank lintel

frank lintel
#

or if anyone else knows this answer because I cant find it documented or explained in any way.

fast galleon
#

and because somebody asked before... If your file is not in the same location as the other file (related to these 3 folders) then it won't affect the load order.
so require from shared would fail to require from server if used directly and not on an event, or some kind of function call

frank lintel
#

where do # folders fall in that order

#

sorry numbered scripts dang # key messing me up with channels

#

01.lua 02.lua alpha.lua zeta.lua would be and example

#

and yeah it was folders this mod has like client/01_bla 02_bla and so on...

fast galleon
#

I really have no idea why he does that btw, that seems like bad design if it's for load order specifically.

frank lintel
#

this is exactly why Im asking cuz java its clear cut... lua and modding for PZ Im like umm where do I even start....

#

my life for a main and dependancies ^_^

#

thanks Poltergeist for the help.

mellow frigate
#

Hi everyone. When I add items to the game there is no picture available in the debug item list (that we can use to sapwn them). Do you know what I should do to get them their picture? Or do you know a mod that does it successfully ?

opal nest
#

So I'm making a mod to add a new drink, I've created a distribution file for it and it seems that I've replaced all loot in the game and it can only spawn my item (so 90% of storage is just empty)

#

So can anyone explain how I should structure them? And do they add onto the vanilla one? Should every structure be renamed or do I need to use a namespace that specifies my mod or something?

fast galleon
# opal nest So can anyone explain how I should structure them? And do they add onto the vani...
opal nest
spring zephyr
#

Is there anyway to use "Tile" as one of Keep item method?
i mean "CERTAIN TILE" should be next to character that do recipe work.

what i want to try is this.
player should be near by "Activated ATM machinie to make Cash(100) in to 100$ bill cash.

#

so is there any parameter i can use for recipe.txt to use tile as one method?

ancient grail
#

@spring zephyr check out my atm mod

spring zephyr
#

found it

spring zephyr
#

gave you thumbs up and

#

liked to you

#

always appriciate your adive.

#

advice *

spring zephyr
mellow frigate
mellow frigate
#

Has anyone been able to use the args parameter of sendServerCommand ? (khalua table)

#

It works like a charm for sendClientCommand (from client to server) but I am not able to use it the other way around.

bronze yoke
#

it should work the same

#

what issue are you having?

mellow frigate
#

On the server side I receive and use the content of some sendServerCommand

#

then I call that:

#

sendServerCommand(getPlayerByOnlineID(args.target), "BetterPrisonner", "Restrain", {source=player:getOnlineID(), restrainingItem=args.restrainingItem});

#

and on the client side I receive something with nil as 4th parameter of my OnServerCommand callback

faint jewel
#

TCHERNO!

mellow frigate
faint jewel
#

i was looking for you.

bronze yoke
#

module, command, args

mellow frigate
bronze yoke
#

you are confusing it with onclientcommand which has 4 (player, module, command, args)

faint jewel
#

i have a bunch of stuff for prisoneering.

#

and was wondering if i could co-opt your mod to make them work.

mellow frigate
plucky dirge
#

Good day! Recently I began to take interest in creating mods that lets the player feed another player, carry them on your back, massage them to reduce exercise fatigue/stress. But unfortunately, I have never found a similar mod. There are mods that add items, traits, models, and maps, but there are no mods that alter your interactivity with another player. Is it even possible to create such mod?

#

For example, medical check and trading is a functionality that lets you interact with another player. But there are no mod like that.

small topaz
#

Does anyone has an idea how to exclude a vanilla item from a vanilla evolved recipe? I just thought you could overwrite the vanilla item's script.txt entry and simply remove the line
EvolvedRecipe = [something].
Did this for the peanut butter and the new script.txt looks as follows:

#

However, the recipe options are still shown. For example, the "new" peanut butter can still be used to craft peanut butter sandwiches

#

(although it requires "Peanut Butter(0)" as ingredient)

#

already tried to add the line
Override = True
but didn't work so far

bronze yoke
#

if i remember, they're added to the recipes as soon as the line is read, not stored on the script or anything, so unless you directly override the file it'll still be applied?

small topaz
#

and thanks for trying to help! πŸ™‚

#

(as always... πŸ˜‰ )

bronze yoke
#

like you'd have to override the vanilla items.txt to stop it from getting applied

#

you might be able to remove them from the EvolvedRecipe object after the fact

small topaz
bronze yoke
#

i think override just deletes the previous item when it gets loaded, the original still gets loaded in some capacity i assume (otherwise it'd have to scan all files for overrides before actually loading scripts, which seems silly)

#

and the problem is that this evolvedrecipe stuff isn't actually stored on the item object, so it doesn't get undone

small topaz
#

ah ok... think I got it...

#

puuuhhhh.... in fact my modding project started as a tiny little project and now I run into dozens of complicated issues like this all the time!! πŸ˜…

red tiger
#

Howdy yall

frank lintel
#

At work but superb survivors/SSR has health check function for the npcs might give ya some insight

small topaz
real helm
#

Quick question.
What is the limit for players on dedicated server?
Not sure if this is the right channel to ask, but I'm considering to try to make the mod for multiplayer and just wondering what is the limit.

bronze yoke
#

100

#

or so i've heard

hearty gulch
#

Before I try, is it even possible to edit the health of furniture/prop items of things like Fridges and the like?

#

I feel like if it was, it would already be a mod on the workshop. but since I cant find any Im wondering if its even possible.

sour quest
frank lintel
sour quest
#

Ahhh. You're right. Sorry about that.

frank lintel
#

all good just likely get a faster answer there

fast galleon
hearty gulch
#

I only found stuff for player built stuff.

fast galleon
# hearty gulch I only found stuff for player built stuff.

sure, a fridge that you haven't moved would not have any health.

There was a mod that showed health of objects when you hit them for example, not sure what it's called.

ISA changes the damage taken, but as you say of a placed object.

hearty gulch
#

ISA?

fast galleon
#

solar power

small topaz
#

any possibility to append ArrayLists via lua code?

hearty gulch
# fast galleon solar power

I'm confused, Maybe I said it wrong, I was looking for a mod that make the already in-game furniture more robust, not adding new ones. ^^

humble oriole
#

So, I'm trying to track some specific recipe usage into the DebugLog of the server. Is there any reason why a print wouldn't go to that log?

function Recipe.OnCreate.Logger(items, result, player)
    print("APA-ATM-Transaction -- Player: " .. player:getUsername() .. " -- Recieved: " .. result:getType())
end```
#

it prints to the coop-console.txt on a hosted server, but isn't working on an actual server

#

Also, @fast galleon still no dice with biogas, the OnEveryHours event just isn't running on the live server, in my local testing when I click on host and start the server there it works. I even tried removing any of the other conditions and doing this.
Events.EveryHours.Add(function()SBioGasSystem.instance:processBiowaste() end)

open drum
#

good evening everyone

#

i bring another question...

#

this doesn't output the item lists

#

it outputs the print() outside the For loop

#

but nothing inside the loop is showing

#

did I do something wrong? or is this recorded in somewhere else?

#

I tested this in Single play

#

debug doesn't show any errors

#

My guess is that calling getInventory() of a player doesn't have any return value?

tame mulch
# open drum
local items = player:getInventory():getItems();
local items_size = items:size()
for i=0,items_size-1, 1 do
    local item = items:get(i)
end
open drum
#

Oh...

#

they have size() function inherited as well?

tame mulch
#

It's java object

#

ArrayList

open drum
#

gotcha

#

another question

#

how did you type in your code in that separate block?

#

when i copy pasted my snips it just looked terrible

tame mulch
open drum
#

'''lua
print("test")
'''

#

lua
print("test")

tame mulch
#

Not this πŸ™‚
need press key near number 1 (left)

#

above Tab key

open drum
#
print("test")
#

ah! gotit

#

thanks

frank lintel
#

is that a different key on their keyboard not a tilde?

#

always wondered what key gets replaced or added for the KEY_YEN

frank lintel
#

is a timestamp inserted automatic to anything put into a DebugLog.log() msg or do we have to add that on?

balmy river
#

does update for 3d engine means that all mods have to update their models?

glass basalt
#

maybe, maybe not

#

I think they will likely continue using FBX and X models. Modders may need to adjust the parameters or add new ones though, but the models themselves should be fine

light umbra
#

Hello.. I am trying to find an example of a mod that can have a zombie spawn in with a certain chance of wearing certain equipment / certain items on its body that can be looted after it's looted.. if anyone knows where I can find a similar code snippet, that would be great. Thanks

open drum
#

umm probably the best chance of finding it will be Authentic Z

#

though it's a big Mod, there are many snippets that you can learn from

light umbra
#

Okay thank you.. I will try to find that

dense mauve
#

Hello i would like to make profession based on me and my friend is there some yt video that i can watch to learn

plucky dirge
#

any learning resource for mods to work in multiplayer?

glass basalt
# plucky dirge any learning resource for mods to work in multiplayer?
#

how do I actually use PZWorldEd.exe? It's complaining about Tilesets.txt (I just want to see the spawn points in a mod)

mellow frigate
sour quest
#

What's the best way to go about doing a character modification? Do people usually make their own class like male / female (that use entirely new models) or do they just make new articles of clothing?

#

I think it'd be nice to just spawn in the world with a different character model so I don't have to look for the right clothing (though I could tryout the debug mode anyway).

mellow lichen
#

I'm just starting modding (My pc is mostly fixed finally) I'm a little confused:
Where do you use Java Script and where do you use Lua Script?
Is knowing both required for all modding or is one for a certain type of modding?

wheat kraken
ancient grail
ancient grail
open drum
#

you have to delete the .tilezed folder in your user folder

ancient grail
frank lintel
#

heh Glytch3r my first actual mod is called LoadOrderAcidtest drunk

#

lil hint where Im going with this....

ancient grail
ancient grail
#

Ow every one of em go make em print 1 letter
And it should in theory
Show you a vertical readable sentence

#

If you compose it right

frank lintel
#

Im just gonna do a simple debug log and have it spit out what lua file loaded... then work thru'm all nothing hard just tedious to make

ancient grail
frank lintel
#

now if I could get the Lua script file name easy that would make it easier

glass basalt
ancient grail
#

Yeah we can just inherit it if no one from their side wants to organize it
Since after all we are trying to compile everything

And threads btw gets removed after a week if inactive
So bump it or lose it

glass basalt
#

i did not know that stressed

ancient grail
#

There is a mapper community disscord server
Thats probably where everything is
About mapping
And the resources
Idk about modelling

frank lintel
#

forums?

ancient grail
ancient grail
glass basalt
#

the unofficial mapping discord has some stuff on modelling like this one, so i guess its all over the place

frank lintel
#

yes but guides would stay historically I mean

ancient grail
#

Mapping has the most guides after all
They have alot of documentation and alot of veteran mappers willing to teach

open drum
#
    if command == "printcode" then 
        print ("START")    


        local playerInventory = player:getInventory():getItems()
        local items_size = playerInventory:size()
        local money_items = {}
        
        -- Loop through each item in the player's inventory
        for i=0,items_size-1, 1 do
            print("executed")
            -- local item = playerInventory:get(i)

            local item = playerInventory:get(i)
            local item_type = item:getType()
            print("CHECK_POINT")
            if item_type == "money" then
                -- Add the item to the money_items list
                table.insert(money_items, item)
                result = money_items:getDisplayName()
                print(result)
                print("HERE1")
            end
    
        end
    
        
        print("Terminated")
    end


end
#

Im trying to save money types item into a different list

#

so i can use merge function on them all together

#

but looks like table.insert(money_items,item) isn't proper way to do it??

#

since "HERE1" pritn isn't showing up nor the result

dark wedge
#

table.insert(money_items, item) is fine.
The issue is your condition:
if item_type == "money" then
This is only going to find money that is named "money" as an item. i.e. if the item is defined as "Module.money" or something like this. Make sure that it matches the item's actual name.

open drum
#

AH!

#

yea it suppose to be "Money"

#

stupid mistake.... thanks dhert

ancient grail
#

He ment
You shoult add the module not just the name

#

getType()
getModule()
getFullType()
getName()
getDisplayName()

#

Different things

frank lintel
#

They using Kahlua2 right?

wide oar
#

when i put it on ingame, no errors but its invisible

jaunty marten
#

bro..

wide oar
#

yeah i realized and posted it there sry lol

jaunty marten
#

np petthespiffo

open drum
frank lintel
#

Well... I think this enough to know, so load order acidtested as 0-9,_,a-z for folders and .lua files

plush sky
#

Hi all, I am trying to use the player:say function to let player character speak chines,
but chines text end up corrupted.

Here is the code:

function DoSomething(items, result, player)
player:Say("δ½ ε₯½")
end

tame mulch
#

Try do by translate files and getText("IGUI_MySayLine")

ancient grail
#

@nimble spoke sir i need to speak with you

fast galleon
wide oar
#

does anyone know what hte blender export settisgs for clothes are

boreal garnet
#

hemlo, new survivor here. DuckyHowdy
what is the policy for requesting mods in this server?

hearty gulch
#

Oh requesting commissions are allowed? Yeah I'd be up to pay for a mod like that./

glass basalt
#

anything goes, we have a few commissioned modders here

hearty gulch
#

Yeah if anyone is able and willing to make a mod where you can modify the Furniture health in the sandbox settings, DM me your rates and we can talk there then :)

boreal garnet
#

ye i was gonna request, not commission cattofingies
i do value the time and skill of modders, im just unable to express it in monetary payment.
that being said maybe someone else like the suggestions as well and chips in.

so essentially i was asking if its okay to barge in here and dump suggestions?

ancient grail
ancient grail
boreal garnet
hollow current
#

I am trying to create a button at the right of the title of the main inventory, the one that displays for example "Lance Hernandez's Inventory". Printing (self.title) works but not self.title:getRight(), any idea why?

#

solved it using lua local x = getTextManager():MeasureStringX(UIFont.Small, self.title) + 60

fast galleon
#

@hearty gulch
I would ask Udderly first, she might already have something similar.

boreal garnet
#

no offence, that place looks so empty i feel like nobody checks in on it pepesweat

open drum
#
function TESTCOMMAND(module, command, player, args)
print("recieved the code")



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

        local playerInventory = player:getInventory():getItems()
        local items_size = playerInventory:size()
        local money_items = {}
        local value_final = 0
        
        -- Loop through each item in the player's inventory
        for i=0,items_size-1, 1 do
            print("executed")
            -- local item = playerInventory:get(i)

            local item = playerInventory:get(i)
            local item_type = item:getType()
            print(item_type)
            
            if item_type == "Money" then
                -- Add the item to the money_items list
                table.insert(money_items, item)
                result = money_items[#money_items]:getDisplayName()

                
                -- Add the value of the item to the total_value variable
                value = tonumber(string.match(result, "%d+%.%d+"))
                value_final = value_final + value
                
                print(value_final)
                -- test(player)

                


            else
                print("This is not a money item")

            end
            
        end
    
        --playerInventory:remove(money_items)????
        print("Terminated")
    end


end

Events.OnClientCommand.Add(TESTCOMMAND)
#

I want to remove item with type (Money) after executing

#

money value addition

#

but if i do clear() then everything in the inventory goes away...

wheat kraken
open drum
#

When I test print() for item type, it shows Money without problem

boreal garnet
open drum
#

tried ```lua
Remove(ItemType itemType

#

doesn't work either..

wheat kraken
boreal garnet
open drum
#

@jaunty marten lol yea i know.. my codes are terrible T___T

jaunty marten
#

he-he petthespiffo

chilly beacon
#

is there a way to make an equipped item only show half of the model or so? I'm lookijng to make a inner waist band holster which would have the pistol grip visible but the barrel not

small topaz
#

Moreover, if you want to remove all items "Base.Money" from the inventory, you just could try the single command
playerInv:RemoveAll("Money")

open drum
#

though i believe i have tried remove function

#

ill try again though

small topaz
# open drum though i believe i have tried remove function
#

Also note that "remove(money_items)" will probably not work since your "money_items" is a lua table and I think the Remove() commands are not defined for this type of data.

neon bronze
#

I think DoRemove(InventoryItem) works for removing that specific item

chrome egret
small topaz
sour island
#

The safest way to remove an item is using several things -- check the delete function for debug

#

You need to confirm worldItems, equipping status etc

ancient grail
#

Snippet

#

Hehe

sour island
#

At work atm, so no way to look it up

#

I used a pieced together version before I knew about the debug stuff -- probably causes issues if you're holding the items

chrome egret
#

What do y'all think of the choices between different modes for the feature?

  • Restricted - Player can search only within their safehouse, nowhere else
  • Hybrid - Player can search within their safehouse or non-safehouse buildings
  • Unrestricted - Player can search anywhere, even within someone else's safehouse
#

Last one might have to be predicated on the SafehouseAllowLoot server option

frank lintel
#

OoO 0-9,_,a-z 🀫 @ancient grail dunno if you seen before I passed out

#

and apparently _blabla.lua is a valid name too

small topaz
#

When playing-testing my modded game in debug mode, using the item search function and dealing with hundreds of items, I detected some short fps drops (from normal 60 fps to 30-something fps). Is this normal game behavior or do you think this could be related to my mod badly optimized? EDIT: guess it is vanilla since I got similar issues in non-modded game

frank lintel
#

you can find out what by turning on a debug option

#

I'll have to boot my game up to look up the exact name but it might help id what/why eg. WARN : Lua , 1678261938763> Event.trigger> SLOW Lua event callback metazoneHandler.lua function doMapZones:55 755ms WARN : Lua , 1678261940920> Event.trigger> SLOW Lua event callback forageSystem.lua function init:217 1922ms

fast galleon
#

@frank lintel
!test.lua
other characters
~test.lua

I was trying to remember the character set used here, but I can't. Check ANSI character codes

frank lintel
#

I'll add in them I didnt think ! or - was valid but if they are I'll check'm

#

@small topaz F11 debug menu, options, checks, checks.SlowLuaEvents

open drum
#

Thanks alot

#

πŸ™‚

small topaz
# open drum This worked

Cool! But to make your mod really bug-free, it might be a good idea to check how your remove-money-function behaves if you have the money equipped in your character's hand, as @sour island suggested here: #mod_development message

#

not sure if this makes a difference in your case but might be better to give it a try

frank lintel
#

@fast galleon okay tested ! (exclamation), - (minus), 0 thru 9, _ (underscore), a thru z, ~ (tilde)

#

albeit not sure on the validity of them.

open drum
fast galleon
frank lintel
#

oh yeah they def work just not sure if they should. also what is that stamp they put in log unixtime? ticks?

#

only asking cuz the 'stamp' was like dead sequential in order.

red tiger
#

Good morning.

frank lintel
#

and good to know on that front with compat I'll keep that in mind since ! and ~ are first and last for each of the 3 lua/. folders

fast galleon
#

changing square positions in chunk breaks my game extra hard now, need to exit the game completely and things are still not normal. This new test doesn't behave well.

ancient grail
frank lintel
#

and I hope they not ansi codes cuz I can def think of one that would mess with ppl in a bad way

frank elbow
#

I assume they meant ASCII? the order you described there is ASCII order

#

Which also implies uppercase letters are sorted before lowercase

frank lintel
#

far as I read has to be lower

frank elbow
#

For filenames, or something else?

frank lintel
#

yeah and the folders

frank elbow
#

They can certainly be uppercase, many vanilla lua files start with "IS"

#

Unsure whether they're converted to lowercase somewhere, though

frank lintel
#

dunno. but if they valid easy to test it the way I got it set up atm.

#

now I feel like testing alt+255 the fake space

#

only reason Im doing this is because never seen (or could find) anything spelling it out exactly lua script loading order

ancient grail
#

Anyone familiar with UI
Online right now?

#

I need to where i can find anything related to bar
Like hp bar fuel bar what do you call that again

frank lintel
#

health UI stuff is in.... client/XpSystem/ISUI/ character skills window, health and info panels.

hollow current
#

Trying to create a custom sort function. This is what I got so far.

-- Called when the player presses on a button
function ISInventoryPage:onSearchContainer()
    self.inventoryPane:searchContainer()
end

--Referenced from the previous function
function ISInventoryPane:searchContainer()
    local playerObj = getSpecificPlayer(self.player)
    local playerInv = getPlayerInventory(self.player).inventory
    local items = {}
    local it = self.inventory:getItems();
    for i = 0, it:size()-1 do
        local item = it:get(i);
        table.insert(items, item)
    end
end```

This code, so far, stores the items of the container that the player is working with in a table
#

how do I use that table to sort the items according to a custom criteria? I have been looking at how vanilla code does it but no luck with comprehending it

(I can actually sort the items stored in the table, but how can I show them in the container after being sorted according to the new criteria?)

hollow current
#

alright so update on what I am trying to do so far. I pulled the items inside a container and stored them in a table, sorted them according to my criteria inside the table.

self.itemSortFunc = ISInventoryPane.itemSortByNameInc```
This is the way to sort inventory items.

```lua
ISInventoryPane.itemSortByNameInc = function(a,b)
    if a.equipped and not b.equipped then return false end
    if b.equipped and not a.equipped then return true end
    if a.inHotbar and not b.inHotbar then return true end
    if b.inHotbar and not a.inHotbar then return false end
    return not string.sort(a.name, b.name);
end```

This is the code of the function.

I have no idea how to utilize this to sort the containers items according to the sorted items in the table. Would appreciate the help!
inland trellis
#

Player movement logic is stored in IsoPlayer.java correct?

#

Trying to figured out some logic for a mod. Basically needing to make a prone animation

wheat kraken
#

heey im grouping up with some people, to do a mod big enough to not be able to do it alone
if interested for more details about it check here
#modeling message

odd notch
#

After setting moddata on a placeable object, is there a transmit function that needs to be run to get it to save?

ancient grail
odd notch
#

like after setting moddata do you just run obj:transmitModData();

odd notch
ancient grail
#

Oh ok

odd notch
kindred dawn
#

Having a problem with my mod, despite it being 2 files, one adding items, the other adding recipes. Both are just .txt files.

It’s getting reported that players are being unable to disinfect bandages and unable to dismantle electronics.

Anyone know a fix?

red tiger
#

Wondering where @pulsar heath and someone else have been..

#

Things to share. =(

ancient grail
red tiger
#

I can't remember the name or type it that starts with 'B' but Russian.

ancient grail
#

Vishnya?

red tiger
#

Yeah. I can't type it.

rugged plover
#

hi, I have an idea for a mod but I am unsure of its viability to actually be possible to make. can I get some guidance?

ancient grail
#

Π’ΠΈΡˆΠ½Ρ?

#

@jaunty marten

#

Vishnya Jab has something to show u but cant ping u

red tiger
#

Pinged him a couple days ago on it. Vishnya may be away too.

#

Wanted his opinion on these.

wheat kraken
red tiger
#

I want to let him know that the parser code is basically done.

wheat kraken
#

nice!

red tiger
#

Here's every file in PZ's media/scripts/ folder parsed as JSON API.

wheat kraken
#

wow that sounds juicy!

ancient grail
#

Json thing

red tiger
#

~50 hours of work to get here.

zinc pilot
fast galleon
#

where does the term ZedScript come from?

zinc pilot
#

or parsing I guess

#

still, that's amazing

red tiger
#

It's a foundational library for my planned ZedScript editor program.

ancient grail
#

Ow its different?
I really couldn't distinguish stuff
Jabs is doing all alien work
I mean i never understood anything he says

red tiger
#

It has a purpose beyond documentation.

ancient grail
#

I just live inside my bubble and his like explored the whole ocean and such

#

Wizardry

red tiger
#

Lol thanks.

#

I just follow the rabbit down the hole.

ancient grail
#

I bet thats some kind of magical rabbit

red tiger
#

I still have my other projects. I chose to work on ZedScript documentation and library support because of the observation that the majority of problems modders face are related to ZedScript.

ancient grail
red tiger
#

Having a visual editor with advanced tools to make ZedScript will solve approx. 60% of the issues I see discussed in this chat.

red tiger
rugged plover
#

I want to make a tornado mod with these things in mind:
-Severe Thunderstorms can appear during spring and summer months, sometimes capable of producing a tornado
-Tornado sirens will sound, with EAS tones preceding them if you have AEBS or TV on. A warning message is displayed with detailed information about the tornado's location, path, speed and potential strength.
-Tornadic winds will appear and cause widespread destruction to structures and trees in its path.
-Wind speeds and destruction will be based on the strength of the tornado.

is this something that might be viable to make in PZ?

ancient grail
#

Like u mentioned most modders having problems with the txt files

ancient grail
ancient grail
#

Its just that the only ways to do this are workarounds
There is no route to just being able to spawn an effect
Cuz thats java side like fire and smoke

red tiger
#

My focus as a modder in this community is making tools for modders.

#

So since this is the most common issue, I'm focusing on it.

#

If possible, I'd love to get the official script name.

#

(Preferably before publishing my npmjs library)

boreal garnet
#

hemlo, it me again DuckyHowdy
anyone knows where i can find the file location for the PZ logo displayed in the ingame escape-menu?

small topaz
#

Hey! In multiplayer games, is there some kind of unique identification for a specific player like a unique number or string? If so, how to access it via lua code on client side?

bronze yoke
#

IsoPlayer:getOnlineID()

#

keep in mind it's not persistent

#

you can use getPlayerByOnlineID(id) if you need the inverse

wheat kraken
#

uuid for mp for future reference search's people, tagging to help on future searches

small topaz
bronze yoke
#

i think it stays the same if they leave and rejoin, but if the server restarts the ids will be assigned from 0 again

small topaz
#

ah ok.

small topaz
fast galleon
#

it stays, unless they delete the players file

small topaz
#

kk. thanks!

boreal garnet
red tiger
boreal garnet
#

in here? i think i checked them all by this point tiktokweep

red tiger
#

I think that it's in UI2.pack

#

For some reason I cannot unpackage it.

boreal garnet
#

ye its empty for me too

red tiger
#

I could look into why this isn't unpacking UI2.

#

Forking it for later.

fast galleon
red tiger
fast galleon
#

can't say, but that github is last updates in 2015

#

The anomaly zone - Building shuffle

red tiger
kindred dawn
red tiger
#

Roadside Picnic (Russian: Пикник Π½Π° ΠΎΠ±ΠΎΡ‡ΠΈΠ½Π΅, Piknik na obochine, IPA: [pΚ²ΙͺkˈnΚ²ik nɐ ɐˈbotΙ•ΙͺnΚ²e]) is a philosophical science fiction novel by Soviet-Russian authors Arkady and Boris Strugatsky, written in 1971 and published in 1972. It is the brothers' most popular and most widely translated novel outside the former Soviet Union. As of 2003, Bori...

#

Houses with anomalies

fast galleon
red tiger
sour island
wheat kraken
#

im trying to use in game animation but keep be able to walking while doing
im using

self:setActionAnim("RefuelGasCan")

self:setActionAnim("BlowTorchFloor")
or an custom one on anims folder self:setActionAnim("BlowTorchFloor_firetrail")

im am on timedaction with
o.stopOnWalk = false; --be able to walk pouring

can someone help me got this working? use RefuelGasCan anim and be able to keep walking, and BlowTorchFloor and be able to walk away without wait it anim finish


did you know about dealing with animation or met some people that have experience on it?
on the fire trail, im trying to customize in game animation to not lock movement, have any idea or met any people that knows that, do you?

i will patch an update including propane torch and better animations

i love and find this two anims
BlowTorchFloor to start fire
and refuelgastank to pour
looks so much better to pour and ignite but i feel bad that was locking movement even it is on timeaction with stoponwalk false
i try to use copy xml from it and edit, and the players starts to do the action not locked but both hands up

and im struggling to set it be able to stop when try to walk, or do the animation while walking

ancient grail
ancient grail
dark wedge
# wheat kraken im trying to use in game animation but keep be able to walking while doing im us...

The RefuelGasCan animation has the following defined in its XML file:

<m_SubStateBoneWeights>
    <boneName>Dummy01</boneName>
</m_SubStateBoneWeights>
<m_SubStateBoneWeights>
    <boneName>Translation_Data</boneName>
</m_SubStateBoneWeights>

The Dummy01 means that the animation plays on all bones, and Translation_Data means that the animation will impact the player's movement while the animation is playing. So if the animation doesn't move, the player will not either during this animation. You should be able to create your own action file and use the same animation, just remove that bit about the Translation_Data

wheat kraken
#

woow! @dark wedge the dev from the masterpice handwork stuff right? you are a legend on anims! thanks for helping, i admire you, and awesome anims you did there, and in yours mods

#

thank you for help me with the anims update! :))

dark wedge
#

you're too kind. πŸ™‚ hope that helps!

wheat kraken
#

i try a shot on the dark yesterday, and delete all the snipped that you mention, and the person does the action, but with both hands up

ancient grail
#

Its the surrender

#

Thats the fallback

dark wedge
#

Correct. Your conditions didn't match, or it couldn't find what animation to play so it defaulted.

ancient grail
#

Check your syntax or your files..or where your file is
Is it vanilla xml?

wheat kraken
#

yes, i will try remove Translation_Data from the gasoline, to get expected result to keep the bones positions while pouring, from refuel gas can

and to start fire, i dont know what to do about, and im not sure about the expected result yet, i just dont want it to lock the player position and disable his movement, but it will be nice if he keeps layed down, but if player tries to walk cancel, do not trigger fire, return default animation and walk away

i think that is aprox what im looking for to start fire

#

because i want it to be friendly to ignite it while being chased

#

like the current state

fiery pecan
#

welp. I've been dabbling with blender stuffs, and it appears that all my items in the model are stuck in the same spot in-game?
is that a scripting or modelling skill issue? Originally shoved this in the wrong channel...

ancient grail
fiery pecan
#

mk

ancient grail
#

But you will get better help from there im sure
Also sorry i cant help with the question as i dont use blender

fiery pecan
#

all gud

ancient grail
#

Have you read peach or dislaiks guides

fiery pecan
#

nope

ancient grail
#

Maybe i can link them to you and might help you.

fiery pecan
#

perhaps

ancient grail
fiery pecan
#

thnx

ancient grail
wheat kraken
#

im concerned about bad performace impact on it (that will have if done via code), and be able to use animation on it will be an better performatic approach to it

supple reef
#

Does anyone have the list of tiledefinition numbers in use already?

dark wedge
wheat kraken
fast galleon
dark wedge
#

The systems are different, you could have events on the animation to light multiple fires at different times during the animation, sure. But for real fire spread that's outside of an animation

#

I wouldn't tie that to an animation

wheat kraken
#

like, if you was over an gas puddle you have gas on your boots, and fire will catch you when ignited

#

@dark wedge i was willing about just a visual clue, the fire and the code spreads keeps as original, all instantaneous,

but plays an visual cue animating and virtual fire spread on it, over the tiles

that fire spreads sequentially add a lot of extra processing, and it will be a shot on our own foot, to add visual but have trash performance, it is a strange feeling to see people asking this, but doesnt knows the consequences to it,

to put in a visual perspective, is like to have a ferrari, you can be able to run 400 km/h in 10 seconds (without break, or turning off), but adding fire spread in code, and not just visual, it is run the ferrari 20 km/h in 10 seconds, stops run it again, and keep doing it until the end(result as of turning breaks and turn off to walk a little more next iteration) and wanting to achive the same distance it was when running 400 non stop, so that is a huge bottleneck

im my mind this is the better way to fillup users wants and asking, just putting a visual clue, and keep the code as performatic as possible

supple reef
dark wedge
fast galleon
wheat kraken
supple reef
faint jewel
#

stupid kahlua. how the hell do i get the USERS current time?!

wheat kraken
faint jewel
#

still gives me the UTC time.

#

as in i am EST and getting greenland time.

dark wedge
wheat kraken
#

there is nothing about it in os variable?

faint jewel
dark wedge
#

I could be wrong, also just started work so can't take a solid look right now, but can for sure later

kindred dawn
faint jewel
#
        local adjDelivery = os.time(os.date('*t')) + (adjDist/60); 
        local readjDelivery = os.date("%B %d %Y, %I:%M %p", adjDelivery);
#

that's still 5 hours ahead.

wheat kraken
#

yeah, i got it, so, the way will to add it, with bad trade off on performance in my opnion, and i will add an option to use that sequentially thing, or the instant one,

and add it disabled by default, the user enable if he wants, if visuals are too important to him more than fps and gameplay advantage, he uses it if he want

users with the default will have a better fps and the fire will get to the and faster, and i think this is something like movie stuff, because irl fire with gas on ground spreads faster, than movies

#

you can add you own gmt stuff, use the utc time, and ask user to setup their gmt +3 +2 +1 stuff

faint jewel
#

what?

fast galleon
faint jewel
#

i want it to use the USERS timezone

kindred dawn
wheat kraken
#

if users gives their time zone, you can use utc to result their time, if the game doesnt give you an option to direct use it, it will be an option to make a in-game window to setting up your current time zone, and use utc os to be current time irl

#

gmt means to me the same as eft to you

#

ops, my bad, i dont know what eft is

lunar carbon
#

Hi, anyone know how to indentify when a food Is cooked?, Like for example if i Cook a potato it only change the name but it's the same Γ­tem and if i need to make a recipe with cooked potato i dont know how set cooked to the recipe

ancient grail
ancient grail
#

Mostlikely the pc of the player

ancient grail
ancient grail
wheat kraken
# faint jewel i want it to use the USERS timezone

if you are trying to do it on mp server

and when you test on client, sp, without mp, and are getting the right time

you can use mp compatibility, to sendcommands and the server stores players current time in table, by their onlineid

lunar carbon
wheat kraken
faint jewel
#

I am using a client side script. i only want the clientside script to show the correct delivery time to the user. INSTEAD it's using UTC time.

ancient grail
#

@kindred dawn the filename
Its recipe.txt
That must be it

#

Ow wait polt already answered this

faint jewel
#

there is no option in a server to set the timezone that i can see.

ancient grail
faint jewel
#

I AM HOSTING IT.

ancient grail
#

You might just want to manually convert the returned value by doing a little math