#mod_development

1 messages · Page 151 of 1

fading horizon
#

so it calculates blood sugar increase based on the amount of carbohydrates in the food eaten

ancient grail
#

Oncreate? You can still get the stats from there can you? Not sure

#

If you go debug and print the stats if it shows then i guess you can access it even if its not usong on eat?

#

Using*

frank rivet
#

Does anyone know if there's a mod out there, that allows you to pick up containers with items inside them?

ancient grail
#

Thats hard to make

#

Im not sure if its doable

fading horizon
#

i'm just gonna put it in :new instead of :perform

#

not as good since it will still trigger if the action is cancelled but

#

its what I can come up with rn

#

it works!

fast galleon
fading horizon
#

that's a great idea

#

thank you

fast galleon
#

Weird possible issue, I want to compare two strings but the string uses System.lineSeparator()

#

for me it works if I use "\r\n", would there be an issue with other systems?

#

Should I use string.find in this case.

sand dagger
#

hey there,

is there a way to change single Zombie Speed, Strength ... without change the complete Sandbox setting ?

fast galleon
#

@sand dagger
seeing as nobody answered, I'll try. Yes, depends on your programming skills.

sand dagger
#

lua is normaly not my strength, cause iam c# developer, but if it is possible i will need to find a solution

fast galleon
#

This might require java, not Lua.

sand dagger
#

oh well then i need to check this, thanks for the answer

merry storm
#

How do you get the spriteName of the items in PZ?

#

i mean, for example im searching for the spriteName of the militaryCrate but cant find it, on the game files it only appears al militarycrate

fast galleon
#

if you just want to find it in general, you can press F2 in-game

#

then there's also looking at the unpacked images in tilezed

#

or the tilesheet images

merry storm
#

Thank you! Dont know where to find the tilesheet images but ill try the first two options 😄

echo fiber
#

so i made a bottle for my vape liquid umm but how do i go about making sure the texture is correct lol someone showed me but that was yesterday and i forgot by the time i finished the model XD

ancient grail
#

changed the manequins pose

echo fiber
nimble spoke
echo fiber
#

finally got the texture on oml

#

that slowly killed me

merry storm
#

Any idea what this could be? im rying to create an object to test something but this __call metatable error keeps showing
This is my Code:
local sq = getSquare(12483, 4273, 0)
local crate = IsoObject(sq:getCell(), sq, 300001)

nimble spoke
fast galleon
#

IsoObject.new(...)

merry storm
#

I see... May I ask what is the difference between using new or just only the class as you see it on the constructor?

fast galleon
#

IsoObject in a Lua context is a regular table.

ancient grail
#

ill teach you if you want

merry storm
#

Oh i see.. thanks you guys! So many little things that changes so much in modding here, im learning a lot :).

nimble spoke
# ancient grail ill teach you if you want

That would be nice, thank you. I'm interested in porting player's idle pose to a mannequin. I tried shuffling files around without a new pose file but that didn't work

ancient grail
#

to spawn
getDoll("FemaleWhiteMod13")

this is how i spawn it
im not sure how to do it without this lua code
cuz the item script doesnt even contain which animation file it should use

---@param dollPose STRING
function getDoll(dollPose)
    local scripts = getScriptManager():getAllMannequinScripts()
    for i=1,scripts:size() do
        local script = scripts:get(i-1)
        if script:getName() ==  dollPose then
            DebugContextMenu.OnMannequinCreateItem(script)
            break
        end
    end
end

local function doRoll(percent) 
    if percent >= ZombRand(1, 101) then 
        return true 
    end 
end 

function getRandomDoll()
    local scripts = getScriptManager():getAllMannequinScripts()
    local script = scripts:get(ZombRand(1,scripts:size()+1))
    DebugContextMenu.OnMannequinCreateItem(script)
end
#

duplicate one of the poses
rename it
for this example i named it
pose13
this is the direct x file
Kate_MannequinMod13


<?xml version="1.0" encoding="utf-8"?>
<animNode>
    <m_Name>pose13</m_Name>
    <m_AnimName>Kate_MannequinMod13</m_AnimName>
    <m_Looped>true</m_Looped>
    <m_SyncTrackingEnabled>true</m_SyncTrackingEnabled>
    <m_EarlyBlendOut>false</m_EarlyBlendOut>
    <m_SpeedScale>0.80</m_SpeedScale>
    <m_BlendTime>0.20</m_BlendTime>
    <m_Scalar></m_Scalar>
    <m_Scalar2></m_Scalar2>
    <m_Conditions>
        <m_Name>Female</m_Name>
        <m_Type>BOOL</m_Type>
        <m_BoolValue>true</m_BoolValue>
    </m_Conditions>
    <m_Conditions>
        <m_Name>Pose</m_Name>
        <m_Type>STRING</m_Type>
        <m_StringValue>pose13</m_StringValue>
    </m_Conditions>
</animNode>
#

media\AnimSets\mannequin\female\poseX.xml

#

media\anims_X\Kate\Kate_MannequinMod13.x

#

item script

    mannequin FemaleWhite13
    {
        female = true,
        model = FemaleBody,
        texture = F_Mannequin_Mod,
        animSet = mannequin,
        animState = female,
        pose = pose13,
        outfit = ,
    }
    ```



```\media\textures\Body\F_Mannequin_Mod.png```
echo fiber
#

I DID IT

fast galleon
#

#mod_development message
@merry storm
I think you might like this. It's a way to print a java object and information about it.

merry storm
bronze sinew
#

If I wanna make a mod show up do I put the mod.INFO file in the first folder with preview.png and the content folder?

#

Also sorry for not using backticks, I’m not at my pc rn so I had to bold the files lol

hot patrol
#

so i recently posted an update for one of my mods and a few people have reported accumulating fatigue at a faster rate. My mod does have a buff that is involved with fatigue but it should only be a thing for players using a specific profession where as in the reports they are saying everyone is getting it. can anyone tell me what might be wrong with this code here and how I can fix it? ```local function dakiBuffEffect()

local item = nil
local player = getPlayer()

--check if servers  SleepAllowed is on
if getServerOptions():getBoolean("SleepAllowed") then
    -- somewhat counters sleepless traits effect by adding more fatigue but only uptil 0.8
    if player and (player:HasTrait("NightOwl") or player:HasTrait("NeedsLessSleep") or player:HasTrait("Insomniac")) and player:getStats():getFatigue() <= 0.8 then
        player:getStats():setFatigue(player:getStats():getFatigue() + 0.01)
    end
    --  same as above but without the limit
    if player:HasTrait("NeedsMoreSleep") then
        player:getStats():setFatigue(player:getStats():getFatigue() + 0.01)
    end
end

--just type the Profession on the "" and remove the -- on the left side of the line below
if not player:getDescriptor():getProfession() == "Weeb" then return end


-- just type the trait on the "" and remove the -- on the left side of the line below
--if not player:HasTrait("") then return end

--player:getModData()['BuffEffect'] = "daki not found" -- for testing
if player:getInventory():getFirstEvalRecurse(function(item)            
        return item:hasTag("DakiWeapon") or item:hasTag("DakiArmorFront") or item:hasTag("DakiArmorBack")
    end) then
    --player:getModData()['BuffEffect'] = "daki found" -- for testing
    local bodyDamage = player:getBodyDamage()
    local stats = player:getStats()

    bodyDamage:setUnhappynessLevel(bodyDamage:getUnhappynessLevel() - (bodyDamage:getUnhappynessLevel() / 4))
    if bodyDamage:getUnhappynessLevel() < 0 then
        bodyDamage:setUnhappynessLevel(0);
    end
    if player:isAsleep() then
        stats:setStress(stats:getStress() - (stats:getStress() / 4))
        if stats:getStress() < 0 then
            stats:setStress(0);
        end
    end
    -- else  player:getModData()['BuffEffect'] = "something might be wrong" -- for testing
end
--player:Say(player:getModData()['BuffEffect']) -- for testing

end```

fast galleon
hot patrol
fast galleon
red tiger
#

Good morning.

#

At work but wished my work was what I'm working on here. =/

hot patrol
tawdry solar
#

like this

#

the one before media

bronze sinew
#

Thanks again man!

#

When I get home I’ll try and fix it lol

tawdry solar
#

np man

#

btw i face a massive issue

#

with trying to fit every item into my v1 update

#

try adding all the items overtime

red tiger
tawdry solar
#

vista?

#

whos vista

neon bronze
#

Vista xp

bronze sinew
#

I made my desktop look like XP lmao

bronze sinew
tawdry solar
#

I got 4 melees rn

bronze sinew
#

Oooooo nice!

tawdry solar
#

But idk what to do

#

5 actually somone else made one for me

bronze sinew
#

I got all my masks and perks written out for it

tawdry solar
#

What are the perks?

bronze sinew
#

I might have to remake the Richard mask because I don’t think I can UV unwrap it

tawdry solar
#

Yeah

#

I dont fully understand it

bronze sinew
tawdry solar
#

But somone told me to use subsurfave painter

bronze sinew
tawdry solar
#

I mean modeling

bronze sinew
#

I’ll probably figure it out with enough time though

tawdry solar
#

Mhm

bronze sinew
#

I think I need to lower Richards polygon count anyways

tawdry solar
#

I gtg my round is startin

bronze sinew
#

Alright

versed prism
#

Hello, trying to make small zombie mod for this game and I have two questions

#

Do zombies have IDs? And do zombies despawn?

#

(trying to spawn a single zombie that follows you)

red tiger
versed prism
#

Thank you!

versed prism
#

This is just what I needed, wow. Thank you

dusty wigeon
#

anyone able to tell me how to return multiple results in a recipe

fast galleon
#

what are you trying to do?

red tiger
dusty wigeon
#

thats what i was thinking wasnt sure if there was an easier way without having to do a whole lua function for each recipe

red tiger
dusty wigeon
#

what do you mean

red tiger
#

You want to have a flexibly defined result, no?

#

The opposite of flexibility is rigidity.

dusty wigeon
#

ok

red tiger
#

You can however execute a function in Lua when the result is delivered to the player.

#

AFAIK this is how it would be done right now.

dusty wigeon
#

ok makes sense

drifting cipher
#

Hi all.
How did you solve the problem of accessibility of containers with locks?
The lock on the container does not guarantee the protection of personal belongings.
Is there any solution or mod?

tawdry solar
#

this is for mod creation

#

@drifting cipher

hollow lodge
#

Hi ppl. If I wanted an item to be colored by the user, which parameter should I set to true? the randomhue or randomtint values the item.xml

#

I have too many gloves variants

tawdry solar
#

like ui

#

wait did you make the more gloves mod

hollow lodge
#

yes

tawdry solar
#

i remember you posting it in here when you first made it aha

hollow lodge
#

the visuals mostly, not the coding

#

haha

tawdry solar
#

good job on the success btw

hollow lodge
#

thx I'm still learning with my team

tawdry solar
#

but you may have to make a new ui

tawdry solar
#

i have to do mine solo

hollow lodge
#

wdym, a new array of code lines in the xml?

tawdry solar
#

idk i have seen it before in another mod

hollow lodge
#

thanks, I'll look into to anything similar

tawdry solar
#

alr

tiny forum
#

I have a LUA file from a mod that even if encoded in ANSI doesn't show accents. What could be the problem?

viscid drum
#

I'm trying to edit a mod, and I'm getting the error that file doesn't exist on client, but the file is there. What causes that?

dusty wigeon
#
item WeedHomemadePipe
    {
       DisplayName                    = Homemade Pipe With Weed,
        DisplayCategory             = Drugs,
        Type                        = Food,
        Weight                        = 1.0,
        Icon                        = PopEmpty,
        Packaged                     = TRUE,
        FatigueChange                = -70,
        BoredomChange                = -70,
        UnhappyChange                = -70,
        HungerChange                =  48,
        StressChange                = -50
        OnEat                        = OnEat_Cigarette,
        EatType                        = Cigarettes,
        RequireInHandOrInventory    = Lighter/Matches,    
        CustomContextMenu            = Smoke,
        CustomEatSound                 = smoke_blunt,
        StaticModel                    = PopEmpty,
        WorldStaticModel             = PopEmpty,
        Tooltip                     = Tooltip_KIDrugs_WeedBong, 
    }
```Any idea why i cant use this in game
fast galleon
#

missing comma

#

hm, you need ZedScript expert

dusty wigeon
#

omg i looked over that so many times and ive missed that each time thanks

#

i keep forgetting how to activate zedscript

#

is there a way to make it so it automatically is on when im doing these mods

red tiger
#

I plan to request this on the forums at some point.

dusty wigeon
#

that would be awesome

#

i do love the zed script when i remember to activate it lol

#

to set a custom use time for items i have to do a timed actions lua right?

tawdry solar
#

how is it blue

dusty wigeon
#

i use the 3x ` then type fix like this

#

i cant get it to show easy

#

three tildes then type fix and hit enter then enter whatever you want and finnish with three tildes

red tiger
#

Thanks for trying out my WIP VSCode extension.

#

I am afraid that what I will ask for ZedScript will be brushed aside or not considered important enough to mend to make things a lot better for both the extension and end-user experience.

dusty wigeon
#

Yea it sucks that they just pick and choose what is worthy and what isnt

#

i think the zedscript is "smashing" you could say

#

soryy bad joke

red tiger
#

All good.

dusty wigeon
#

it is really good though

#

me and my buddy use it he actually told me about it

red tiger
#

I'll try to get the first beta formatter out in the next day or two.

merry storm
bronze yoke
#

why don't you look at how carpentry does it?

versed prism
#

What is the difference between PipeWrench and PipeWrench template?

red tiger
#

PipeWrench is the typings that are generated. PipeWrench-Template is the NodeJS environment to mod and compile to Lua.

bronze yoke
#

addtileobject would be better than addspecialobject, special objects are supposed to be doors and windows and stuff, throwing other stuff in there might not work and might cause issues elsewhere

#

oh now that i'm thinking about it i actually have code that adds an object, i'll have a look at it

merry storm
bronze yoke
#
local crate = IsoObject.new(freeSquare, 'furniture_storage_02_17', 'furniture_storage_02_18')
freeSquare:AddTileObject(crate)
#

freeSquare being the IsoGridSquare in this instance

merry storm
#

Im gonna try the AddTileObject, thank you

red tiger
bronze yoke
#

i wonder what the IsoObject constructor actually does with the square you pass it if it doesn't add itself to it

#

i should check that out

merry storm
red tiger
#

My plan is to make VSCode the perfect working environment for PZ modding. =)

bronze yoke
#

hmm, that code was written under the impression that they were sprites for different facing directions, but a quick check of the source shows the second string is just meant to be the name of the object

#

you can actually just omit that

merry storm
#

I can see on the tile that some object have spawned there but i cant see anything,not sure now if those were from before. So the String Tile is the name of the tile where you are placing the object, and the number at the end might be something about where is facing the object

bronze yoke
#

i think the numbers are just to do with spritesheets

#

not really my area of expertise but that seemed to be how it was organised

merry storm
#

Okey, something happened. I dont know why but at least it spawned hahahah

#

Thank you very much, im gonna dig a bit what made that spawn and control it 😄

unborn radish
#

Yet another bump

calm depot
#

does the mod.info for your renamer mod specify the base mod as a dependency?

versed prism
#

Pipewrench package was not the was def not the way to go for learning how to mod

#

Im just gonna write lua, all of the online documentation for learning how to write mods looks like its the traditional approach

bronze yoke
#

yeah, typescript is a little niche

versed prism
#

Maybe once I have more experience making mods

red tiger
#

Some people prefer the environment and the style of programming Typescript provides over Lua.

#

Some don't. Not a big deal.

#

It's good to have options.

#

If you want to try it again down the line, it'll be there. =)

dusty wigeon
#

wtf i fixed all the errors i could see and the dang thing still wont let me eat it

red tiger
#

@bronze yoke I retrofitted my new formatter to remove spaces between ; and /.

bronze yoke
#

nice!

red tiger
#

Syntax highlighting should counter the fact that it's less visible to spot the delimiter.

versed prism
#

For pipewrench do I need to compile the .ts files and the transfer it's lua file to the media/lua folder?

red tiger
#

You do need to compile the .ts files.

fast galleon
red tiger
# fast galleon fixing works with space after `;`

True. I did see this.. however.. I don't wish to complicate my formatter to suit technicalities that can be fixed in less than two minutes in the Java code that would allow for cleaner formatting eventually... =)

#

The formatter is actually pretty blind.

#

It doesn't know anything other than whitespace, words, delimiters, and scope terminators.

versed prism
#

Sorry for such a basic question, but what exactly do I put in the lua folder vs the scripting folder?

fast galleon
#

how do you change a specific file's type in VS anyway? In intellij it's two clicks, while in VS it's a bunch of settings and then it's for all txt?

red tiger
versed prism
#

oh okay

red tiger
fast galleon
red tiger
#

Sorry. It's been getting close to a year since I actively worked on PipeWrench.

versed prism
#

No problem I went in over my head trying to use pipewrench it just sounded better using static typing

#

Where would I find a library of available functions for zomboid lua?

red tiger
#

It's definitely worth trying when you get familiar with PZ.

red tiger
#

I only write tools at this point. =/

bronze yoke
#

i still primarily use the api reference site though

red tiger
#

I use my typings because I'm a freak.

versed prism
#

Where can I even find my installed mods?

#

C:\Users[REDACTED]\Zomboid\mods is suprisingly empty

bronze yoke
#

Steam\steamapps\workshop\content\108600

versed prism
#

thank you

#

but does anyone know the difference between the lua and scripts folder in media?

#

like where do I put my content

bronze yoke
#

well... lua in lua

versed prism
#

But lua files are scripts, so what are people putting in /media/scripts?

bronze yoke
#

things that arguably don't really count as scripts

#

item scripts, vehicle scripts, model scripts, etc

#

i would just look in the vanilla scripts folder to get a feel for it

neon bronze
#

.txt files go in scripts

red tiger
dusty wigeon
#

any ideas why its not working ive run out of things

bronze yoke
#

what isn't working

dusty wigeon
#

cant eat it

red tiger
#

OnEat = OnEat_Cigarettes, is on purpose, correct?

dusty wigeon
#

yea

red tiger
#

Are you overriding the cigarettes function or something?

dusty wigeon
#

yea until i can find a more suitable one

red tiger
#

I wouldn't know then.

#

Figured the function you assign when eaten would be expecting something that isn't present in your script.

#

I added a lowercase pass for true false values in ZedScript.

bronze sinew
#

what is module Base?

#
{
    item RichardMask
    {
        Type = Clothing,
        DisplayName = Richard Mask,
        ClothingItem = RichardMask,
        BodyLocation = FullHat,
        Icon = RoosterMask,
        CanHaveHoles = false,
        ChanceToFall = 5,
        BiteDefense = 10,
        ScratchDefense = 20,
        NeckProtectionModifier = 0.5,
        Insulation = 1.0,
        WindResistance = 1.0,
        WaterResistance = 0.60,
        Weight = 1,
        WorldStaticModel = RichardMask_Ground,
    }
}```
dusty wigeon
#

i beleive that is what your naming your module

bronze sinew
#

so its the ID?

dusty wigeon
#

this is what mine looks like

bronze sinew
#
id=50
description=Adds Hotline Miami animal masks to the game, traits, and an occupation.
poster=poster.png``` My id is 50 so do i replace Base with 50?
bronze sinew
dusty wigeon
#

lol i just name my module based on the mod im making

bronze sinew
#

ah

#

i got the mask to show up in the debug item list but its invisible and has no icon

dusty wigeon
#

base stays as base

bronze sinew
#

alright

dusty wigeon
#
module "yourmodnamehere"
{
imports
  {
      Base
  }

"your recipes/ items go here"

}
#

thats your basic layout

bronze sinew
#

oooooh okay, thanks!

dusty wigeon
#

do you have an icon of the mask in the textures folder of your mod

bronze sinew
#

yeah

#

its this

dusty wigeon
#

did you link it to your mask wherever you put that item?

bronze sinew
#

I think so Icon = RoosterMask.png,

dusty wigeon
#

thats named the same?

bronze sinew
#

yeah the icon is RoosterMask.png

dusty wigeon
#

ok in your textures folder it should be named item_RoosterMask.png

#

then where you link it with icon you can put RoosterMask

bronze sinew
#

alright thanks!

dusty wigeon
#

should fix the icon problem

bronze sinew
#

yeah it fixed it, now its all off colored but its kinda cool lookin so im gonna keep it like that lol

dusty wigeon
#

nice

bronze sinew
#

i just need to remodel it so its less polygons and it has a texture

dusty wigeon
#

hopefully that goes well for oyu

#

ive been stuck on a problem for a few hrs with no reason in my mind why its happening

bronze sinew
#

ah that sucks

red tiger
#

Preparing to write my linter for ZedScript.

dusty wigeon
#

how would i go about reducing the time it takes to eat something

primal vapor
#

Hello, does someone know why getSpecificPlayer() method isn't working?

nimble spoke
primal vapor
#

even basic function like this
function testing(player)
local player = getSpecificPlayer(player)
player:Say("Hello")
end
Events.OnPlayerUpdate.Add(testing)

#

just doesn't work

#

maybe i don't understand or miss something

fast galleon
#

even basic function like this

function testing(player)
    
    player:Say("Hello")
end
Events.OnPlayerUpdate.Add(testing)
ancient grail
#

Thats not gona work

#

Say alot of times

primal vapor
#

but if i need to get another player?

fast galleon
primal vapor
#

i have a context option and in after clicking on it i need to alter another player stat

ancient grail
#

Thats just for splitscreen

#

Cuz its for split screen

fast galleon
#

this function works works num 0 to 3, not a player object

ancient grail
#

Thsts up to 4 split screen

#

0, 1, 2, 3

echo fiber
ancient grail
#

Wdym like how long or fast

#

Iant that defined by recipe scriots

#

Or maybe timed action

echo fiber
#

hes trying to make the food item he made a shorter time as the base eating is 30s but he wants it to be like 2s

#

yea but OnEat waits for the action to finish before calling function

ancient grail
#

Ahh

echo fiber
#

unless he has to make a full context menu to create that timed action

ancient grail
#

Modofy the xml file

#

Modify*

echo fiber
#

where is that xml file?

ancient grail
#

Or the lua

echo fiber
#

thats where you lost me XD

ancient grail
#

The xml is

#

AnimsSet

echo fiber
#

thank you

#

will look into it with him

ancient grail
#

player
action

#

Ithink

#

Or maybe there a bob folder there idk i fogot im on mobile

nimble spoke
mossy steeple
#

is there a way to store the colour/texture of a clothing item used in a crafting recipe to be used in the end product? ie a specific, randomly coloured shirt, or a spiffo-textured schoolbag

#

or at least a way to require a specific texture in a crafting recipe, so i could have the end result produce identical but differently identified items like all the duffel bag variants

nimble spoke
#

Check the colored ripped sheets mod

mossy steeple
#

is there a particular name to it? i'm not finding it

bronze sinew
#

does anyone have a guide on how to make a custom profession with a custom trait?

nimble spoke
mossy steeple
#

i'll keep looking then, thanks!

#

i can at least get this working while not preserving the colours, if nothing else

echo fiber
#

so idk what i did wrong here

#

but that texture on the other bottle wont load, it is a different bottle but with a reskin to be purple and it does that

#

do i have to make a new model in blender?

fading horizon
#

no

#

so

#

in your models-items folder

#
{
    model GnomeBarRB
    {
        mesh = WorldItems/GnomeBar,
        texture = WorldItems/RB,
    }

    model GnomeBarBlueRazz
    {
        mesh = WorldItems/GnomeBar,
        texture = WorldItems/bluerazz,
        // ~ scale = 0.075,
    }
#

you can make different models with the same mesh but with different texture

#

so just save the new texture in the worlditems texture folder

echo fiber
#

i tired that but it does that red white texture

fading horizon
#

oh

#

hmmm

echo fiber
#

and im pretty sure i called everything correctly

fading horizon
#

everything looks correct to me

#

that's weird

#

try switching it to a different texture temporarily

echo fiber
#

im loading blender to see if its like broken

fading horizon
#

if you added two textures in blender and then re-exported it, that may be why

#

idk, i'm bad at blender

echo fiber
#

nope blender picked it up no probelm

low basin
#

I have half an idea, as I just fixed this myself but would have to see your txt file to be sure

nimble spoke
# echo fiber

Unrelated to the issue you're trying to fix but if you have the exact same mesh and texture for the static model and world static model then you don't really need 2 separate model scripts

echo fiber
#

so i put both lol

fading horizon
#

static mesh is in hand model

#

so basically

echo fiber
#

oooo

fading horizon
#

world model is on the ground

#

static mesh is when you're using item in hand

#

like in my mod when you actually hit the vape, it appears in your hand, which is the static model

echo fiber
#

so i can see it in my hand if i find a way for the player to hold it?

fading horizon
#

no

#

its only for an action

echo fiber
#

awwww

fading horizon
#

i haven't figured out how to make it show in hand if you equip it

#

maybe weaponsprite parameter or something

nimble spoke
#

you can have it visible for an action or recipe

echo fiber
#

how do i do it for a recipe?

nimble spoke
#

Prop1:Source=2,
Prop2:Log,

#

from the Saw Log recipe, source=2 means it uses the second ingredient for the recipe, or you can point to a model script like Log

low basin
#

Hey Val can I see the entire model section (txt file) relating to GVapeBottle? Assuming you haven't fixed the texture issue yet

echo fiber
#

module VapeMod
{
imports
{
Base
}
model GVapeLiquids
{
mesh = WorldItems/GVapeBottle,
texture = WorldItems/GVapeBottle,
scale = 0.1,
}
model GPVapeLiquids_ground
{
mesh = WorldItems/GVapeBottle,
texture = WorldItems/GVapeJuice,
scale = 0.1,
}
model RVapeLiquids_ground
{
mesh = WorldItems/GVapeBottle,
texture = WorldItems/RVapeJuice,
scale = 0.1,
}
model HMVapeLiquids_ground
{
mesh = WorldItems/GVapeBottle,
texture = WorldItems/HMVapeJuice,
scale = 0.1,
}
model GVapeLiquids_ground
{
mesh = WorldItems/GVapeBottle,
texture = WorldItems/GVapeBottle,
scale = 0.1,
}
item VapeJuice
{
Weight = 0.1,
Type = Drainable,
UseDelta = 0.1,
DisplayName = Grape Vape Juice,
DisplayCategory = Vapes,
ReplaceOnDeplete = VapeJuiceE,
Icon = VapeJuice,
WorldStaticModel =GPVapeLiquids_ground,
}
item VapeJuiceE
{
Weight = 0.01,
Type = Normal,
DisplayName = Grape Vape Juice (Empty),
DisplayCategory = Vapes,
Icon = VapeJuice,
WorldStaticModel =GPVapeLiquids_ground,
}

item VapeBattery
{
Weight = 0.1,
Type = Drainable,
UseDelta = 1,
DisplayName = Vape Batteries,
DisplayCategory = Electronics,
Icon = Vapebattery,
}
item GAJuice
{
Weight = 0.1,
Type = Drainable,
UseDelta = 0.1,
DisplayName = Green Apple Vape Juice,
DisplayCategory = Vapes,
ReplaceOnDeplete = GAJuiceE,
Icon = GAJuice,
WorldStaticModel =GVapeLiquids_ground,
StaticModel =GVapeLiquids,
}
item GAJuiceE
{
Weight = 0.01,
Type = Normal,
DisplayName = Green Apple Vape Juice (Empty),
DisplayCategory = Vapes,
Icon = GAJuice,
WorldStaticModel =GVapeLiquids_ground,
StaticModel =GVapeLiquids,
}
item HMJuice
{
Weight = 0.1,
Type = Drainable,
UseDelta = 0.1,
DisplayName = Home Made Vape Juice,
DisplayCategory = Vapes,
ReplaceOnDeplete = HMJuiceE,
Icon = HMJuice,
WorldStaticModel =HMVapeLiquids_ground,
}
item HMJuiceE
{
Weight = 0.01,
Type = Normal,
DisplayName = Home Made Vape Juice (Empty),
DisplayCategory = Vapes,
Icon = HMJuice,
WorldStaticModel =HMVapeLiquids_ground,
}
item SJuice
{
Weight = 0.1,
Type = Drainable,
UseDelta = 0.1,
DisplayName = Strawberry Vape Juice,
DisplayCategory = Vapes,
ReplaceOnDeplete = SJuiceE,
Icon = SJuice,
WorldStaticModel =RVapeLiquids_ground,
}
item SJuiceE
{
Weight = 0.01,
Type = Normal,
DisplayName = Strawberry Vape Juice (Empty),
DisplayCategory = Vapes,
Icon = SJuice,
WorldStaticModel =RVapeLiquids_ground,
}

#

0.0

#

thought that would do the text file XD

#

my bad

#

just realized that they are saved as JEPG

#

does that effect it?

#

model GVapeLiquids
{
mesh = WorldItems/GVapeBottle,
texture = WorldItems/GVapeBottle,
scale = 0.1,
}

#

was the first line

low basin
#

Also as far I am aware they do need to be png ( but I don't know for sure)

echo fiber
#

well we are about to text that lol

#

sorry was in the bath room just got back >.<

low basin
#

Also someone may come behind me and be like what are you talking about, idk, all I know is I did it that way for my mod and it worked.

nimble spoke
#

No, each model script's mesh links to the model file

low basin
#

^ See, I really just need to start keeping my mouth shut. Im just going to delete all of that so its not lurking around to needlessly confuse someone.

echo fiber
#

it was becuase the file was saved as a JPEG and not a PNG

#

tip for other people adding textures dont save as JPEG lol

nimble spoke
#

Not only that but as far as I know the game doesn't like 32-bit png, so stick to 24-bit for textures

low basin
#

Well I guess this means I need to reevaluate my script now.

echo fiber
#

big images XD

nimble spoke
#

I'd say you can shrink that to 128x128 or 256x256 cause you won't see the details anyway

echo fiber
versed prism
#

Does anyone know where I can find a list of subroutines for the events class

#

Like Events.OnTick, Events.EveryHours etc, I'm looking on the modding index but I cant find anything

echo fiber
#

every command in lua is here 🙂 hope this helps

echo fiber
#

this was just the page i was on XD

versed prism
#

thank you!

hot patrol
#

I remember someone in here was making a big drug mod that added lean and dare shirts. Anyvody know if they ever finished and uploaded it?

echo fiber
#

dont think he had shirts though XD

echo fiber
dusty wigeon
echo fiber
hot patrol
# dusty wigeon

not sure if this is the one but it looks good. lotsof content. The one I saw I distinctly remember hasving a rendered image of all the models and it had a big lean cup and dare tshirts

dusty wigeon
#

there will be a lot more as i go down the line lol

#

val does my modeling im just trying to get it out

echo fiber
#

lol i do all the modeling at this point XD

versed prism
#

Kind of a silly question, but do lua events trigger for each client independently on a server?

#

Like say if I added a function getPlayer() to Events.EveryHours, would that function run multiple times returning each client?

nimble spoke
#

If you're running that from the client folder it will run once for each client, returning the player for that client

versed prism
#

What if I ran that from the server folder?

#

I imagine it would run once, but who would be returned from getPlayer()?

nimble spoke
#

I guess in that case it fails to return a player

bronze yoke
#

getPlayer() returns player one on the current client, and the server doesn't have a player one

versed prism
#

Thats what I originally though okay, I was just reading Soul Filcher's code for their Turning Time mod and they use getPlayer() to determine distance from zombie on a server file

bronze yoke
#

don't be tricked by the folders

#

files in the server folder will still run on the client unless you have code to stop it from doing so

versed prism
#

oooh okay

bronze yoke
#

the client folder doesn't run on the server though

#

if you want something to only run on the server, you can start the file with if isClient() then return end

#

you can also do if not isServer() then return end but that will also stop it from running in singleplayer, which isn't usually what you want

versed prism
#

Is there a way to fetch the ID of a player by the server?

bronze yoke
#

what do you mean?

versed prism
#

I want something to track 1 player on the server, but I want that player to be randomly selected and reevaluated every day

#

I was gonna just add a function to Events.EveryDays but I dont know how to get that random players ID

bronze yoke
#

the best ids to use for something like that are online ids, which you can get with player:getOnlineID() (but note that these don't work in singleplayer)

versed prism
#

Thats okay this is multiplayer only, okay so I could have a global list and each client appends their online ID to the list on connect right?

bronze yoke
#

you could just pick a player randomly from getOnlinePlayers() and store that player object in a variable

versed prism
#

Even better, thanks I didnt see that function

#

I'm trying to make an It Follows mod, if youve ever seen that movie

bronze yoke
#

i haven't unfortunately

versed prism
#

One invincible zombie will follow a player around the map, it will always know the location of that player and be moving towards them

bronze yoke
#

ooh that sounds great, i've thought of doing something similar before

versed prism
#

Thanks, im finding it just a little hard though. I cant find much documentation for what most methods actually do

#

Like I think maybe addAggro() would alert them to the player? I'm not sure because it takes both a player value and a float

bronze yoke
#

honestly messing with zombie ai is not a good entry point for modding

#

i've seen people have some luck but it's all very hardcoded and annoying

versed prism
#

I will try a basic attempt before I give up

red tiger
bronze sinew
#

WAIT ARE WE GONNA BE ABLE TO MAKE OUR OWN DRUGS???

dusty wigeon
#

its a work in progress im just getting ready to post the basic version of it

#

which is whatever is in the photo

bronze sinew
#

im gonna try to deal to the zombies now

#

im a basic businessman. I can sell wood to a lumberjack, i can sell dirt to an eskimo

dusty wigeon
#

lmao

dusty wigeon
#

can anyone tell me how to fix this idk why the h3 is staying there

autumn temple
#

I have created a simple 3D object in Blender to use to attempt to learn more about modding, and attempted to create a new "Junk" item with it, using the vanilla items as example, ei Comb. and when I attempted to test to see if the item worked it was not visible in the debug mode item spawning menu. is anyone able to assist me into figurine out what I did wrong?

bronze yoke
#

the item script should be in a folder named scripts, not lua

mossy steeple
dusty wigeon
#

my first mod ever for zomboid. It took a lot and im glad to have it this far

bronze sinew
#

hell yeah, time to make my character a drug addict😎

bronze sinew
dusty wigeon
#

i spent over 70 hrs in 5 days

bronze sinew
#

accurate

dusty wigeon
#

first 2 days i did 40 hrs

bronze sinew
#

I think I finally have the Richard Mask done and now i have to do the textures

dusty wigeon
#

oo fun fun

#

i plan on doing a stim mod later on which should be a lot easier after doing this one

crystal oar
#

ooh like a stim pack?

deft marsh
#

I know little to nothing about writing lua but i heard Google Bard can now write code in a handful of languages. I've told it to write me somewhat complex windows executables that actually worked. Please don't lynch me for this lol. I asked it to make me a pvp mod where if a player has pvp on, they cannot attack players who has pvp off and this was the result. I doubt it's correct but I'm thinking this ai could at least help you code along the way.

dusty wigeon
crystal oar
#

i had been imagining something that wasn't very lore friendly but would add health and then you'd slowly lose health over then next period of time. i wonder tho how people will imagine stim packs

dusty wigeon
#

the way im wanting to make them is they only last for a period of time then have an effect afterwards

crystal oar
#

ooh that sounds neat

bronze sinew
#

OMG I SHOULD MAKE A KROTCHY COSTUME NEXT

echo fiber
#

how do i add a model to the hand when crafting?

ancient grail
#

Prop1:Screwdriver,

#

@echo fiber

#

Theres also prop2

echo fiber
ancient grail
#

?

echo fiber
#

i asked earlier but it got lost in this chat lol someone answered it

echo fiber
#

even got the model for the vape betterys XD

red tiger
#

Pain.

reef karma
#

Hey yall, is there a mod that does gates longer than 4 walls (Maybe 6) ?

upper mason
reef karma
#

cuz bigger vehicles lol

hot patrol
#

Is damage done on other players calculated differently than with zombies? In my mod I have it so my weapon is supposed to be very weak against zombies but on players you would think it was full of bricks

#

If so is there something I should be doing with my script to change that?

upper mason
tardy wren
#

Do .txt files in scripts overwrite each other or not? As in, if I have two mods with the exact same file names

unborn radish
#

Another bump. Issue still unsolved, I'm still at a loss. Hoping someday someone will help

upper mason
#

OnWeaponSwing is for ranged weapon as well?

unkempt dragon
#

Hello everyone, I am a typescript and c# programmer, I would like to know if it is possible to create mods using one of these languages.

ancient grail
#

So the weapon stats should be for zed

ancient grail
#

Hold on

#

@unkempt dragon

#

That might not be the latest

#

@red tiger sorry to tag you

hot patrol
unkempt dragon
dusty wigeon
#

Good morning. I hope everyone has a great day and kills it today.

faint jewel
#

is there something along the lines of OnVehicleUpdate?

hot patrol
#

can anyone point me to where I can learn how to use OnHitCharacter? I don't see it used anywhere in the game or related mods. I was to make my weapon damage on players consistent with what it is on zombies.

#

rn they hit like a brick

neon bronze
#

Isnt there a OnHitZombie event? You could do it the otherway around, instead of nerfing damage to players buff it to the zombies

hot patrol
#

I guess. honestly I don't really understand it much. Correct me if I am wrong but this weapons should already be plenty weak item Dakimakura1 { DisplayCategory = Dakimakura, DisplayName = Dakimakura - Power, WeaponSprite = Dakimakura1, Icon = Dakimakura, /** DO NOT CHANGE UNLESS YOU HAVE CUSTOM ICON **/ WorldStaticModel = WorldItem_Dakimakura1, MinAngle = 0.75, MaxRange = 1.3, Type = Weapon, MinimumSwingTime = 4, KnockBackOnNoDeath = FALSE, SwingAmountBeforeImpact = 0.02, Categories = Blunt, ConditionLowerChanceOneIn = 10, Weight = 0.8, SplatNumber = 0, PushBackMod = 10, SubCategory = Swinging, ConditionMax = 10, MaxHitCount = 2, DoorDamage = 0, SwingAnim = Bat, MinRange = 0.61, SwingTime = 4, KnockdownMod = 10, SplatBloodOnNoDeath = FALSE, RunAnim = Run_Weapon2, IdleAnim = Idle_Weapon2, BreakSound = dakiBreak, DoorHitSound = daki, HitSound = daki, HitFloorSound = daki, SwingSound = PlankSwing, TreeDamage = 0, TwoHandWeapon = TRUE, CriticalChance = 0, CritDmgMultiplier = 0, MinDamage = 0.1, MaxDamage = 0.2, BaseSpeed = 0.9, AttachmentType = Shovel, Tags = DakiWeapon, }

#

it seems about rigth when used on zombies but when I attack players on MP it might as well be a sledghammer

#

which is funny considering the weapon but not very good pvp wise

ancient grail
faint jewel
#

well onplayerupdate doesn't read a vehicles trunk updates

#

and that is what i need to check.

drifting ore
#

Why does placing something with AddWorldInventoryItem deletes the item if it's a food?

fast galleon
#

huh, is there more to this? What parameters are you using?

neon bronze
#

You should use 0, 0, 0 for its digits

faint jewel
#

this is with the onplayerupdate.

#

it only updates the very first time you get on.

#

and then never again.

fast galleon
neon bronze
#

I use 0,0,0 and it works

#

Pz moment

drifting ore
#

I use 000 and it works with other items but with food not so much

#

I suspect it's because the food can rot

fast galleon
#

For center 0.5,0.5,0, x%1,y%1,z for other things.

neon bronze
#

What does the z parameter actually do in that call?

drifting ore
#

Oh, one more thing to it... the food spawns and stays but when I move my character then it dissapears

fast galleon
neon bronze
#

That doesnt seem that good tbh id rather have it under the car than to have it float

ancient grail
# hot patrol can anyone point me to where I can learn how to use OnHitCharacter? I don't see ...
---@param attacker IsoGameCharacter The character whose weapon hit another character.
---@param target IsoGameCharacter The character who's been hit by another character.
---@param weapon The hand weapon used to hit the character.
---@param damage Float The damage inflicted to the character who's been hit.

local function yourFunction(attacker, target, weapon, damage)    
    if not (instanceof(attacker, "IsoZombie") and instanceof(target, "IsoZombie")) then return end
    --you need a cheker here if you want speific dakiweapon to do this. if you dont then all weapon will bonus dmg
    local targetBody = target:getBodyDamage()
    local bonusDamage =  damage/2   --feel free to change this aslong as its a positive interger or float
    targetBody:ReduceGeneralHealth(targetBody:getOverallBodyHealth()-bonusDamage);
end
Events.OnWeaponHitCharacter.Add(yourFunction) 
#

@hot patrol by defaul the damage still hits the target so to do bonus dmg is just hit em again
but what i did here was i only hit em with half of the first damage
so just fix the math and add checker
you can copy the previous checkers i did for you other mod

neon bronze
#

Actually does anyone know where all the events are defined?

neon bronze
#

Yea but i mean in game files wise

#

Is it java, is it lua?

faint jewel
#

oh that i do NOT know.

#

java probably

neon bronze
#

Hmmm

fast galleon
#

both

#

You can add custom Events too.

neon bronze
#

Can you define them aswell on what it triggers?

faint jewel
#

i dont see any lua for OnPlayerUpdate

fast galleon
faint jewel
#

i'd love an event that fires whenever something is added or removed from a container lol

fast galleon
#

@ Blair has you covered for next version, I think?

hot patrol
ancient grail
#

It applies to everything
Even ranged

dusty wigeon
#

trying to think of a mod that hasnt been done or done well

dusty wigeon
#

wow thats an idea

#

lol

sour island
#

Off the top of my head, stuff related to shooting guns

#

There's even a hook which is rare - as it supercedes the java block entirely

red tiger
#

I'd like to work more on my linter and formatter this evening but I'm feeling really bad so I might not.

#

Will need to figure out all the syntax error situations for ZedScript to implement checks for in my linter. =/

frank elbow
twilit rune
#

Is it possible to spawn vehicles on rooftops?

autumn garnet
#
-------------------------------------------------------------------------------------------------------------------------------------------------
debug = {}
-------------------------------------------------------------------------------------------------------------------------------------------------

debug.OnKeyPressed = function(key)

    local debugStatus = true

    if debugStatus == false then return end

    if(key == 27) then -- $

        local player    = getPlayer()
        local getX      = player:getX()
        local getY      = player:getY()
        local getZ      = player:getZ()



        getPlayer():getCurrentSquare():AddWorldInventoryItem("Base.CannedCornedBeefOpen", 1, 1, getZ);
    end

end
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Events.OnKeyPressed.Add(debug.OnKeyPressed)
-----------------------------------------------------------------------------------------------------------------------------------------------------------```
red tiger
#

The enclosure on the if key == 27 line is redundant though.

#

It doesn't hurt anything and makes it look nicer IMHO.

autumn garnet
#

php habits ^^'

red tiger
#

Didn't expect it to come from PHP. That's a curveball.

autumn garnet
red tiger
#

Oh.. I remember you.

autumn garnet
#

héhé

red tiger
#

How're the templates doing?

#

Beats blasting my forehead on my laptop and rolling around to write a new linter.

autumn garnet
#

I think maybe include the UI in the live template to make quick UI

red tiger
#

A Lua "Helper" extension for PZ in VSCode may be in order.

#

Common patterns can be templates for modders.

autumn garnet
#

i don't use VSCode ^^ i'm on JetBrains

red tiger
autumn garnet
timber river
drifting ore
sour island
#

The engine will purposefully remove it - even indoors.

twilit rune
#

ehh. sad. thank you

fast galleon
ancient grail
fast galleon
drifting ore
fast galleon
#

yes, it auto sets age 👍

fast galleon
stable coral
#

Can anyone tell me rq how to take models from the game and place them into blender? Thanks!

drifting ore
#

Like... the item is first spawned into player's inventory and then fro there it is automatically dropped or something? The real item is something that can't be picked up(weights 10000), don't know if I can spawn into player inventory.

bronze yoke
#

you don't have to put it into their inventory, just create the object

drifting ore
#

i have no idea what I am doing

bronze yoke
#
local item = InventoryItemFactory.CreateItem("Base.CannedCornedBeefOpen")
-- probably need to mess with the item's age here
getPlayer():getCurrentSquare():AddWorldInventoryItem(item, 0, 0, 0)
ancient grail
#

If your wanting to animate

#

I mean if you want to make like video

ancient grail
stable coral
#

@ancient grail I asked modeling, but thought I may get a faster answer here, thanks 😄

ancient grail
#

not everyone here knows how to model

#

but from what peach told me what he does is he import x file to fragmotion export it as obj

#

and import it to blender

#

then export as fbx

#

@stable coral

#

goodluck

stable coral
#

Perfect! Thank you 🙂

fast galleon
#

I spent a good part of an hour trying to debug the matatable I added, turns out I reverted earlier to an earlier version with a lowerCase variable and it was bugging as a result 🙂

quartz badge
#

how could I make an item like a belt that attaches things to the player and lets you hotkey them

#

but on your chest and stuff

#

also where are item icons stored

fast galleon
quartz badge
#

where at

bronze sinew
#

Anyone got any guides on how to make a custom occupation?

fast galleon
#

Caused by: java.lang.UnsatisfiedLinkError: 'void zombie.core.physics.Bullet.removeVehicle(int)'

fast galleon
fast galleon
quartz badge
#

someone has done it before, but I want to make one that is better suited for what i want

opal rivet
#

Anyone knows how to fix this?

opal rivet
#

Please Ping me If anyone knows how to fix this

echo fiber
viral notch
opal rivet
#

It's light

opal rivet
#

It's part of the world lighting

viral notch
#

you mean red light or reverse light?

opal rivet
#

And the Model

#

yes that

echo fiber
viral notch
#

he mean probably light shadow mirrored
or
reverse light

echo fiber
#

lol i still have no clue whats wrong here, as there are two forms of light that could be wrong here

opal rivet
#

I'm glad that you're helping

viral notch
opal rivet
#

Yes the Mirrored light

viral notch
#

filped mask

#

or you wrong set mask texture and game see left as right and right as left..

opal rivet
#

It's not that actually

#

It's with the model

viral notch
#

not mask problem

opal rivet
#

Nope

#

It's more like a model problem

viral notch
#

then flip vertex

#

for me looks like rected set uv

#

are you have mirrored uv with textures?

opal rivet
#

There is no mirrored textures

viral notch
#

like textures are half fitted and second is just mirorred?

opal rivet
#

I think It's the shading of the model

viral notch
#

it have separated parts or is solid?

opal rivet
#

If I put it in flat shading right it does this

sour island
#

Anyone know of a way to confirm cross character play by the same user if the person is on -nosteam or gog?

opal rivet
sour island
#

Is there a mac_address field that's exposed or something?

opal rivet
#

Like this

faint jewel
#

I think so chuck

faint jewel
#

But I'm coaching a little league game atm.

sour island
#

Oh neat lol

viral notch
sour island
#

Wouldn't this topic fit better on modelling?

bronze yoke
#

what do you mean? like seeing if the player is using multiple characters in singleplayer?

faint jewel
#

It would chuck

sour island
#

SteamID is unique to user - I was curious how nosteam handles it

bronze yoke
#

username

sour island
#

Wouldn't they be able to log into eachother's acc?

bronze yoke
#

the username is server specific

#

it's not their gog username or something like that

sour island
#

So the username/password for server's yes -- but wouldn't two friends be able to share that easily?

viral notch
#

woodchuck chuck wood when wood chuck woodchuck

bronze yoke
#

yeah but then they'd be playing on the friend's character too

opal rivet
#

@viral notch Actually you don't need too

viral notch
sour island
#

I wonder if there's a mac address that's not exposed 🤔 @tame mulch ?

opal rivet
#

Thanks for the help @viral notch and @echo fiber

viral notch
sour island
#

if I recall the log files have a mac address on it

#

nvm - but there's hardware info

opal rivet
sour island
#

I'll have to do some digging around

viral notch
opal rivet
#

It can also be the game itself

#

It's a PZ Thing

viral notch
#

use sharder for it... without light effects

#

and check again

opal rivet
#

I'm checking the script for it right now

faint jewel
#

Ask @last flax he fixed it before

bronze yoke
red tiger
#

Steam and non-steam can work with the same account. The steam's account and the gog's IP address will tie in to the same account.

faint jewel
#

So by ip then??

red tiger
#

It depends on the server's mode.

#

You can swtich the mode.

faint jewel
#

You xan verify it's not the same user?

red tiger
#

But it cannot work with non-steam if steam. Same the other way.

#

What steam users can do though is launch the game from the batch files provided in the installation folder's root.

#

set to nonsteam and play like gog.

#

So if you have nonsteam friends and want to play, go nonsteam.

sour island
#

My IP changes tho

red tiger
#

Yeah? PZ should handle that.

sour island
#

I have some experience dealing with a ban system - mac address and connecting account was kind of the only way to go

#

What I also did for that system was track IPs and connecting accounts

#

and preventing new accounts using already used IPs

#

but I'd rather not go through all that

#

as well as the mac address / hardware

red tiger
#

Are you making a ban system or are you working with one?

#

Steam connections cannot work with IPs, unfortunately

sour island
#

No, this was experience on another platform/game engine

#

not that PZ is one cough

red tiger
#

Oh. Thought you were asking for support help.

#

lol

sour island
#

Nah, trying to prevent cheating/unintended use of a mod

red tiger
#

(Coming from someone who was paid by an ancient PZ server to mod the Java side into Bukkit, literally making these solutions privately)

sour island
#

Not a super big deal - I could use usernames

#

There's also this under public server util

private static String getMacAddress() {
red tiger
#

Does Steam forward that?

#

I also wonder if I can MITM and send false machine addresses if so..

sour island
#
   private static String getMacAddress() {
      try {
         InetAddress var0 = InetAddress.getLocalHost();
         NetworkInterface var1 = NetworkInterface.getByInetAddress(var0);
         if (var1 != null) {
            byte[] var2 = var1.getHardwareAddress();
            StringBuilder var3 = new StringBuilder();

            for(int var4 = 0; var4 < var2.length; ++var4) {
               var3.append(String.format("%02X%s", var2[var4], var4 < var2.length - 1 ? "-" : ""));
            }

            return var3.toString();
         }
      } catch (Exception var5) {
         var5.printStackTrace();
      }

      return "";
   }
bronze yoke
#

i'm not sure i understand why usernames don't suit your usage

sour island
#

I does, but it's not ideal

#

as people can exchange them

red tiger
#

Thanks for reminding me that SOME PEOPLE did not test my server-exclusive mod loader like they said they would a couple months ago...

sour island
#

people would be a lot less likely to share their steam accounts

red tiger
#

Last I checked, PZ scans for family steam accounts.

#

I could be wrong.

sour island
#

Well, those people would be screwed over in the off chance they use my mod and mac addresses are ever supported lol

red tiger
#

What is this mod you're trying to protect?

bronze yoke
#

i don't really see the exploit, if kate plays as bob and uses bob's skill journal what's the issue?

sour island
#

Cause it's intended the journal's can't be shared

red tiger
#

@sour island Why don't you simply password-lock the journal?

bronze yoke
#

but whether it's kate or bob doing it it's bob's character getting bob's xp

sour island
#

The issue isn't really with good faith actors - but people looking to exploit it

red tiger
bronze yoke
# sour island uh?

if i play on account a and my friend gives me the password to account b, that still doesn't allow me to use account b's journal on account a, does it?

sour island
#

It does if you're on a non-steam server

#

otherwise the steamID is compared and blocks you

#

steamID = 0 on non-steam, and split-screen shares the same steamID

bronze yoke
#

but why isn't username sufficient for non-steam then? it seems like it would accomplish the same thing

sour island
#

for people not looking to cheat - yes

red tiger
#

Unfortunately some of the 60 exploits I patched last year are still active. =/

sour island
#

and I'll probably implement that

#

unfortunately people have already asked me why they cant read eachother's journals on steam even though they shared passwords to their pz characters -- so people will do it

red tiger
#

RP is RP

#

People do what people do

sour island
#

overall, not a grave issue though - given the market of non-steam MP servers are probably smallish?

quartz badge
red tiger
#

So people are able to do this without maliciously modifying their clients?

ancient grail
# sour island My IP changes tho

i think steam gives us like virtual ip well thats not the correct term but we noticed this too when trying to ban a hacker before

quartz badge
#

???

ancient grail
red tiger
#

The IP you would see is Steam's, not the player's

ancient grail
#

most of the people there knows how to build mods

#

related to modeling

quartz badge
#

i see

red tiger
#

Steam has its own traced route that they do whatever with for games.

sour island
red tiger
#

I'd put that problem on the player for not doing enough to protect their account.

#

That's me.

sour island
#

It's not a security issue

red tiger
#

Hmm maybe I'm not understanding what is the issue.

#

It screams security issue. xD

sour island
#

The skill journal mod lets you store XP earned so that your next character can continue given you've been diligent about recording the XP,and didn't lose your body to a horde.

#

I have it store and compare the steamID of the initial author

red tiger
#

Oh. That sounds like a really good mod.

#

Hmm'

#

One sec.

sour island
#

Non-steam users' don't have a steam ID or seemingly anything to compare to -- and while I could use usernames that still creates an issue of exploiters

#

Where as right now non-steam is a free for all

#

I'd rather it be a FFA than a very short fence some people will elect to hop over

willow estuary
red tiger
#

@sour island I remember a creation timestamp for players. Maybe try using that.

sour island
#

@ancient grail use * for emphasis, lol

red tiger
#

If not, use moddata and create one.

sour island
#

This has to be across multiple isoPlayers though 😅

red tiger
#

That timestamp will be unique to that player, not just a steam or non-steam user.

#

Okay. Create a dictionary?

willow estuary
red tiger
#

I'd avoid using IP and SteamID.

#

Use a transient variable tied to each player and map them.

fast galleon
quartz badge
#

i didnt say i could do it better

#

I just said i wanted to make one that would suit me and my friends better

red tiger
#

The server API for this game is too unstable to be reliable in this way.

#

As long as you can tie a transient variable to a player, you can use that instead.

sour island
#

I don't think I can do that given the isoPlayer is killed off - and in some cases the body is destroyed -- I do believe the client is connected to a corpse though

#

Something to look into I guess

red tiger
#

Yeah, for sure.

#

Maybe a phrase provided by a player when the player spawns for the first time.

sour island
#

Ah, which would lock the journal

#

I see what you mean now

red tiger
#

I really like phrases because it solves a lot of this type of problem.

sour island
#

They can't really share it without giving it up entirely

fast galleon
willow estuary
quartz badge
#

how?

#

im just trying to get help here and the internet isn't working, so i'm not sure where else im supposed to go

red tiger
#

Back before factions were officially written for the game, my system had to deal with some of these issues.

#

Phrases fixed all of them.

#

It puts responsibility on the players and gives enough security.

sour island
#

I'll look into it

red tiger
#

Awesome. Hope that I helped you or at least gave you new ways to think about approaching the problem.

willow estuary
# fast galleon spamming

I see that they posted about the same issue 3 hours ago; that's not unreasonable, and I don't believe it qualifies as spamming.
If you believe someone's behaviour in these channels require moderation, please a contact a moderator instead of taking it upon yourself.

sour island
#

Yes, indeed - I like the idea of 'claiming' the journals

red tiger
#

=)

fast galleon
red tiger
#

Now if you can help me think about how to implement this ZedScript linter... xD

quartz badge
sour island
red tiger
#

My boss who worked in the programming field since 1981 says this is Master's level shenanigans.

sour island
#

'hey you're missing a comma' alone would save alot of people hours

red tiger
#

xD

red tiger
#

It's more like thinking about for every symbol, what shouldn't proceed or follow it.

willow estuary
quartz badge
fast galleon
#

I has a belt with extra slots

sour island
#

What a beautiful poster

red tiger
#

Oh you know what... I should make a pattern-sequence matcher for locating bad patterns.

fast galleon
#

Then there's also Authentic Peach with anothe big mod.

red tiger
#

[new_line][whitespace*][word][whitespace*][delimiter][whitespace*][values][delimiter_comma][whitespace*]

#

This is the basic key->value property line sequence.

#

I'll need to scan for deviations that would make the line illegal.

#

That's just one of like an insane amount.

sour island
#

I'd start with counting brackets

red tiger
#

Oh I have a lexer / tokenizer.

#

I have two: one aggressive and one passive.

sour island
#

Recipes also have a secondary value on some lines

red tiger
#

Yup.

#

I'm showing sort of what I'm thinking, not actual.

#

So if say OnConsumeSound = Blah,,, I would squiggle the second comma and say illegal character.

sour island
#

I gotta work on a commission but I'll pop in a couple of minutes at a time

red tiger
#

I'm delaying this work as my IRL work takes precedence.

#

The extensions' code is FOSS.

sour island
#

You might also need a dictionary of params and expected value types

red tiger
#

This is the passive tokenizer.

fast galleon
#

BlairAlgol will we still be able to have better crops indoors, or is that impossible with new 'seasons' system?

willow estuary
#

There will be a sandbox option to enable it.

low basin
#

Lets say I am making a mod to pack 5 bread knives into a box and unpack them again later, is there a way to save the condition of them so that you end up with 5 bread knives with the same condition after you unbox them?

unborn radish
#

Daily bump for this mod issue i can't figure out

#

Help would be welcome

sour island
low basin
#

Slides LUA for dummies behind back this'll be fine

echo fiber
#

So i need alittle help as i am stumped, been bashing my head on the wall for a few hours with this issue.

(Problem: The Vape is upside down when using in hand)

I have the items static model and world model coded in correctly and called correctly as well,
Ground world model in the model is upright
and the static model is flipped to match when in hand

i have tried flipping the model in every witch way possible but it will always show up upside down... how do i fix this

nimble spoke
#

Keep in mind you must do it in Edit mode in Blender, not in object mode

echo fiber
#

iv even tried laying it flat and it still goes to that position

#

World model

#

static model

#

item

#

maybe you can see something i did wrong here that i cant

#

but all my other models do it just fine like here

faint jewel
#

after you edit it, use ctrl+a then all transforms.

#

that would do it too.

echo fiber
#

in blender?

faint jewel
#

yup

echo fiber
#

ill give it a shot

quartz badge
#

how do I get an item icon to display properly? i have the name of the items icon set to the "Icon" variable perfect, but it still makes it just a question mark

echo fiber
quartz badge
#

oh i see

echo fiber
#

in the folder for the png

#

then when you call it just use the name without the item_

quartz badge
#

well now it reads it but the icon is invis in game

echo fiber
quartz badge
#

yes

echo fiber
# quartz badge yes

ughh im stumped on that part, did you make sure to exclude the item_

so

files in folder
item_Catfood
item_dogfood

Script

item Cat_Food
{
 Type =normal,
 Icon =Catfood,
)
#

just an example

quartz badge
#

yeah

#

i did that

echo fiber
#

also make sure to caps the I in Icon

quartz badge
#

yep

echo fiber
#

do you have the , at the end

quartz badge
#

yep

echo fiber
#

0.o

quartz badge
#

module Base { imports { Base } item ALICEWebbing { DisplayCategory = Accessory, Weight = 0.2, Type = Clothing, DisplayName = Webbing Gear, Icon = ALICEWebbing, BodyLocation = Belt, ClothingItem = Belt, AttachmentsProvided = SmallBeltLeft;SmallBeltRight, WorldStaticModel = Belt_Ground, } }

echo fiber
#

it should be working then, can you show me a SS of your script and the file name?

quartz badge
#

name of the file is ALICEWebbing

#

Name of icon is item_ALICEWebbing

echo fiber
#

do you have it in the correct folder structure?

quartz badge
#

Which would be?

echo fiber
#

this

quartz badge
#

Yep

echo fiber
#

try fully reloading your game

#

some times i have to do that to get it to render a change

echo fiber
# faint jewel yup

didnt work btw still upsidedown, iv even tried making the model sideways and still goes to this position

faint jewel
#

then y ou might noit be overwritng the irght model.

echo fiber
quartz badge
#

I restarted the game, its still invis

echo fiber
faint jewel
#

the tatic and world models should be different

quartz badge
#

im not sure what could be wrong

echo fiber
dusty wigeon
#

can u send a pic of how u have the png named a where

quartz badge
#

i made a test item and i guess its the icon

dusty wigeon
#

i have no idea

echo fiber
# quartz badge

that looks correct and its a png cuz its transparent, umm im not sure really with this one

dusty wigeon
#

its all correct from what i can see

quartz badge
#

welp idk

nimble spoke
#

media not Media, and Item_ not item_ these are all case sensitive

quartz badge
#

lets see if it worke

echo fiber
quartz badge
#

still doesnt work

frosty schooner
#

How do I get into modding for PZ? Kinda interested

quartz badge
#

im out of ideas on how to fix this

echo fiber
quartz badge
#

yep

echo fiber
#

and you changed the file to Item_ with cap I

quartz badge
#

yep

frosty schooner
#

Then I'm fully interested? I meant like how do I get into the modeling and doing the code

echo fiber
echo fiber
frosty schooner
echo fiber
frosty schooner
#

Properties, local files?

echo fiber
# quartz badge yep

SmallBeltLeft;SmallBeltRight, try removing one of the items here not sure the ; is valid for this it might be /

#

just a guess though as thats the only diffrance

frosty schooner
#

I got the DayZ modding down lol

quartz badge
frosty schooner
#

Thank you

echo fiber
quartz badge
#

i suppose not

echo fiber
quartz badge
#

i am now

echo fiber
#

🙂

quartz badge
#

idk why just getting an icon to work is being so hard

#

still broke

echo fiber
dusty wigeon
#
module Base
{
    imports    
    {
        Base
    }
    item ALICEWebbing
        {
            DisplayCategory = Accessory,
            Weight        = 0.2,
            Type        = Clothing,
            DisplayName    = Webbing Gear,
            Icon        = ALICEWebbing,
            BodyLocation    = Belt,
            ClothingItem    = Belt,
            AttachmentsProvided = SmallBeltLeft/SmallBeltRight,
            WorldStaticModel = Belt_Ground,
       }
}
#

try this

quartz badge
#

on it

echo fiber
#

try making a simple image can be a dot whatever, but make sure it follow the same size and png rule then name it Item_TEST then try that

quartz badge
#

still broke

#

man this is ridiculous

#

ill try that

echo fiber
#

if making the new icon breaks it then files might be in the wrong location

#

one small thing can break the whole thing

nimble spoke
echo fiber
nimble spoke
#

Make sure your png is not 32-bit the game doesn't like that

quartz badge
#

test icon worked

#

i guess how do i make it not 32-bit

echo fiber
nimble spoke
quartz badge
#

i used GIMP and ms paint

echo fiber
#

Krita is free and is amazing

quartz badge
#

i mean, preferably right now i dont want to download a whole new software just to convert an image

nimble spoke
#

I have no experience with GIMP

quartz badge
#

so should it be 16 bit?

nimble spoke
#

8 or 24

#

I use 8 for items

quartz badge
#

ok i exported it in 8 bit

#

lets hope this works

#

still doesnt work

#

come on

nimble spoke
#

one thing that is probably not related, you're using Belt as clothingItem, you need to change that

quartz badge
#

this icon is cursed i guess

echo fiber
#

i fixed my model!

echo fiber
quartz badge
#

this is stupid

#

i think im just gonna go do something else

#

i seriously dont get what i did wrong