#mod_development
1 messages · Page 151 of 1
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*
Does anyone know if there's a mod out there, that allows you to pick up containers with items inside them?
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!
alternatively try patching both stop and perform and check eatPercent
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.
hey there,
is there a way to change single Zombie Speed, Strength ... without change the complete Sandbox setting ?
@sand dagger
seeing as nobody answered, I'll try. Yes, depends on your programming skills.
lua is normaly not my strength, cause iam c# developer, but if it is possible i will need to find a solution
This might require java, not Lua.
oh well then i need to check this, thanks for the answer
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
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
Thank you! Dont know where to find the tilesheet images but ill try the first two options 😄
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
changed the manequins pose
i love the one in purple
That is something I need to learn. Was that done in Blender?
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)
You should call IsoObject:new()
IsoObject.new(...)
I see... May I ask what is the difference between using new or just only the class as you see it on the constructor?
IsoObject in a Lua context is a regular table.
no fragmotion
ill teach you if you want
Oh i see.. thanks you guys! So many little things that changes so much in modding here, im learning a lot :).
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
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```
I DID IT
#mod_development message
@merry storm
I think you might like this. It's a way to print a java object and information about it.
:O, its better to work with the object in Java? i was trying to get use to them with kahlua and the zomboid docs https://projectzomboid.com/modding
package index
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
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```
quick look: you have the profession check bellow the check for the server sleep option.
ahh, I never would have thought that would matter. As far a accumulation speed would you say that looks to fast?
not sure what you mean, it should do nothing if the profession doesn't match. That's what I understand from the initial question.
oh I just meant if you think the value looks good for those who have the prof.
like this
the one before media
np man
btw i face a massive issue
with trying to fit every item into my v1 update
try adding all the items overtime
Vista is that you?
Vista xp
I made my desktop look like XP lmao
im planning on releasing it when I get like 3-4 masks added and just updating it when I make more
I would do that too
I got 4 melees rn
Oooooo nice!
I got all my masks and perks written out for it
What are the perks?
I might have to remake the Richard mask because I don’t think I can UV unwrap it
These, might end up changing them if possible
But somone told me to use subsurfave painter
I might try to find someone who makes clothing and ask them how lol
Its just blender
Ask #mod_development
I mean modeling
I’ll probably figure it out with enough time though
Mhm
I think I need to lower Richards polygon count anyways
I gtg my round is startin
Alright
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)
- Yes.
- Yes.
Thank you!
This is just what I needed, wow. Thank you
anyone able to tell me how to return multiple results in a recipe
what are you trying to do?
OnCreate is a function executed on the creation of the result. You can register an event and wait a bit, then execute and remove itself to modify the item as needed.
thats what i was thinking wasnt sure if there was an easier way without having to do a whole lua function for each recipe
Recipe scripts looks very rigid to me.
what do you mean
You want to have a flexibly defined result, no?
The opposite of flexibility is rigidity.
ok
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.
ok makes sense
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?
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
i think you would have to make a new slider
like ui
wait did you make the more gloves mod
yes
i remember you posting it in here when you first made it aha
good job on the success btw
thx I'm still learning with my team
but you may have to make a new ui
lucky man aha
i have to do mine solo
wdym, a new array of code lines in the xml?
idk i have seen it before in another mod
pls tell me if u remember
thanks, I'll look into to anything similar
alr
I have a LUA file from a mod that even if encoded in ANSI doesn't show accents. What could be the problem?
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?
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
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
Not unless TIS supports an official extension type.
I plan to request this on the forums at some point.
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?
i copy+paste one of my old items code saves alot of time
how is it blue
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
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.
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
All good.
I'll try to get the first beta formatter out in the next day or two.
Im so lost bro. I dont know why is that hard to spawn a simple item into the world., I have tried so many things and methods, no errors but nothing happened, addToWorld doesnt do anything, AddSpecialObject neither with no error in logs... Vehicles were so easy, only a method AddVehicleDebug and it just appear on the game on the coords set...Why is so hard with objects?
why don't you look at how carpentry does it?
What is the difference between PipeWrench and PipeWrench template?
PipeWrench is the meat. PipeWrench-Template is the plate served.
PipeWrench is the typings that are generated. PipeWrench-Template is the NodeJS environment to mod and compile to Lua.
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
I did, but it uses a IsoThumpable and the AddSpecialObject function, as far as i saw the militaryCrate is a IsoObject, not IsoThumpable.
local crate = IsoObject.new(freeSquare, 'furniture_storage_02_17', 'furniture_storage_02_18')
freeSquare:AddTileObject(crate)
freeSquare being the IsoGridSquare in this instance
Im gonna try the AddTileObject, thank you
If you use the template environment then you shouldn't need to worry about PipeWrench itself.
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
In this function, what is the difference between the tile and the name? i see that there is only 1 plus on the end, when i check in the game with F2 a pile of militaryCrates they have a different name too.
The one on the ground has: location_military_generic_01_1
and the one on the top has: location_military_generic_01_0
My plan is to make VSCode the perfect working environment for PZ modding. =)
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
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
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
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 😄
Yet another bump
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
yeah, typescript is a little niche
Maybe once I have more experience making mods
Correct. PipeWrench is a non-standard way to mod.
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. =)
wtf i fixed all the errors i could see and the dang thing still wont let me eat it
@bronze yoke I retrofitted my new formatter to remove spaces between ; and /.
nice!
Syntax highlighting should counter the fact that it's less visible to spot the delimiter.
For pipewrench do I need to compile the .ts files and the transfer it's lua file to the media/lua folder?
The config should have an output directory setting.
You do need to compile the .ts files.
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.
Sorry for such a basic question, but what exactly do I put in the lua folder vs the scripting folder?
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?
Oh crap. I think that's way outdated.
oh okay
F2. Move the cursor to the extension.
thanks, I'll try this next time
It should compile to dist/ by default.
Sorry. It's been getting close to a year since I actively worked on PipeWrench.
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?
It's definitely worth trying when you get familiar with PZ.
I believe there are tools out there for the Lua modders.
I only write tools at this point. =/
https://github.com/Konijima/PZ-Libraries is the only library project i'm familiar with
i still primarily use the api reference site though
I use my typings because I'm a freak.
Where can I even find my installed mods?
C:\Users[REDACTED]\Zomboid\mods is suprisingly empty
Steam\steamapps\workshop\content\108600
thank you
but does anyone know the difference between the lua and scripts folder in media?
like where do I put my content
well... lua in lua
But lua files are scripts, so what are people putting in /media/scripts?
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
.txt files go in scripts
Again, "scripts" is a misnomer in PZ.
any ideas why its not working ive run out of things
what isn't working
cant eat it
OnEat = OnEat_Cigarettes, is on purpose, correct?
yea
Are you overriding the cigarettes function or something?
yea until i can find a more suitable one
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.
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,
}
}```
i beleive that is what your naming your module
so its the ID?
this is what mine looks like
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?
also, ooooo la la me gonna overdose
lol i just name my module based on the mod im making
ah
i got the mask to show up in the debug item list but its invisible and has no icon
base stays as base
alright
module "yourmodnamehere"
{
imports
{
Base
}
"your recipes/ items go here"
}
thats your basic layout
oooooh okay, thanks!
do you have an icon of the mask in the textures folder of your mod
did you link it to your mask wherever you put that item?
I think so Icon = RoosterMask.png,
thats named the same?
yeah the icon is RoosterMask.png
ok in your textures folder it should be named item_RoosterMask.png
then where you link it with icon you can put RoosterMask
alright thanks!
should fix the icon problem
yeah it fixed it, now its all off colored but its kinda cool lookin so im gonna keep it like that lol
nice
i just need to remodel it so its less polygons and it has a texture
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
ah that sucks
Preparing to write my linter for ZedScript.
how would i go about reducing the time it takes to eat something
Hello, does someone know why getSpecificPlayer() method isn't working?
player:getSpecificPlayer() should work unless the variable player does not hold a proper value at the time of checking
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
even basic function like this
function testing(player)
player:Say("Hello")
end
Events.OnPlayerUpdate.Add(testing)
but if i need to get another player?
your example didn't try to get another player
i have a context option and in after clicking on it i need to alter another player stat
this function works works num 0 to 3, not a player object
id like to bump this
Wdym like how long or fast
Iant that defined by recipe scriots
Or maybe timed action
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
Ahh
unless he has to make a full context menu to create that timed action
where is that xml file?
Or the lua
thats where you lost me XD
If you get a proper player when generating the menu option then you should be able to use getSpecificPlayer(), no problem
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
I know you can retrieve colors, there is probably something to get the variation like from schoolbags too, but I never really tried that.
Check the colored ripped sheets mod
is there a particular name to it? i'm not finding it
does anyone have a guide on how to make a custom profession with a custom trait?
I don't remember the exact name, sorry, but the mod makes ripped sheets colored when you rip clothing items
i'll keep looking then, thanks!
i can at least get this working while not preserving the colours, if nothing else
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?
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
i tired that but it does that red white texture

everything looks correct to me
that's weird
try switching it to a different texture temporarily
im loading blender to see if its like broken
if you added two textures in blender and then re-exported it, that may be why
idk, i'm bad at blender
I have half an idea, as I just fixed this myself but would have to see your txt file to be sure
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
i know lol but idk what staticmesh does i only know what the WorldStaticMesh does
so i put both lol
oooo
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
so i can see it in my hand if i find a way for the player to hold it?
awwww
i haven't figured out how to make it show in hand if you equip it
maybe weaponsprite parameter or something
you can have it visible for an action or recipe
how do i do it for a recipe?
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
Hey Val can I see the entire model section (txt file) relating to GVapeBottle? Assuming you haven't fixed the texture issue yet
i have yet to fix it will send the file now
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
Also as far I am aware they do need to be png ( but I don't know for sure)
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.
No, each model script's mesh links to the model file
^ 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.
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
Not only that but as far as I know the game doesn't like 32-bit png, so stick to 24-bit for textures
Well I guess this means I need to reevaluate my script now.
lol mine is 2500x-2500x XD should i fix that lol
big images XD
I'd say you can shrink that to 128x128 or 256x256 cause you won't see the details anyway
originally made it that size cuz i couldnt see where i was putting it on the model in blender lol
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
declaration: package: zombie.characters.BodyDamage, class: BodyDamage
every command in lua is here 🙂 hope this helps
this was just the page i was on XD
thank you!
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?
my friend rush is working on a drug mod you talking about him? if so hes almost done
dont think he had shirts though XD
got as pic?
one sec think hes sending a photo now
he sent the photo idk if you where talking about his mod though
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
there will be a lot more as i go down the line lol
val does my modeling im just trying to get it out
lol i do all the modeling at this point XD
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?
If you're running that from the client folder it will run once for each client, returning the player for that client
What if I ran that from the server folder?
I imagine it would run once, but who would be returned from getPlayer()?
I guess in that case it fails to return a player
getPlayer() returns player one on the current client, and the server doesn't have a player one
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
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
oooh okay
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
Is there a way to fetch the ID of a player by the server?
what do you mean?
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
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)
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?
you could just pick a player randomly from getOnlinePlayers() and store that player object in a variable
Even better, thanks I didnt see that function
I'm trying to make an It Follows mod, if youve ever seen that movie
i haven't unfortunately
One invincible zombie will follow a player around the map, it will always know the location of that player and be moving towards them
ooh that sounds great, i've thought of doing something similar before
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
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
I will try a basic attempt before I give up
This is mentioned in the documentation.
I cant wait to use this mod lol
WAIT ARE WE GONNA BE ABLE TO MAKE OUR OWN DRUGS???
its a work in progress im just getting ready to post the basic version of it
which is whatever is in the photo
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
lmao
can anyone tell me how to fix this idk why the h3 is staying there
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?
the item script should be in a folder named scripts, not lua
woo, finally got my first actual public mod out! it's a small one and i might want to add a thing to it later, but it's definitely at least sufficient
https://steamcommunity.com/sharedfiles/filedetails/?id=2963903667

thanks bro..
@bronze sinew here you go buddy https://steamcommunity.com/sharedfiles/filedetails/?id=2963904135
my first mod ever for zomboid. It took a lot and im glad to have it this far
hell yeah, time to make my character a drug addict😎
from what ive seen you post its alot and looks really good! The Hotline Miami mod im making is my first and im glad with what ive already done lol
i spent over 70 hrs in 5 days
accurate
first 2 days i did 40 hrs
I think I finally have the Richard Mask done and now i have to do the textures
oo fun fun
i plan on doing a stim mod later on which should be a lot easier after doing this one
ooh like a stim pack?
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.
yea
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
the way im wanting to make them is they only last for a period of time then have an effect afterwards
ooh that sounds neat
that reminds me of a health pipe from Postal 2 lol
OMG I SHOULD MAKE A KROTCHY COSTUME NEXT
how do i add a model to the hand when crafting?
thank you lol couldnt find that chat from earlier XD been everyhwere
?
i asked earlier but it got lost in this chat lol someone answered it
Pain.
Hey yall, is there a mod that does gates longer than 4 walls (Maybe 6) ?
Why you need wider gate?
cuz bigger vehicles lol
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?
I'm pretty sure even modded M113 passes through 4-wide gate.
Do .txt files in scripts overwrite each other or not? As in, if I have two mods with the exact same file names
Another bump. Issue still unsolved, I'm still at a loss. Hoping someday someone will help
^
OnWeaponSwing is for ranged weapon as well?
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.
Use OnHitCharacter event
Add damage attacker and target are both players
So the weapon stats should be for zed
Yes
Hold on
@unkempt dragon
That might not be the latest
@red tiger sorry to tag you
Is there an example I can look at?
thank you very much.
I will study
Good morning. I hope everyone has a great day and kills it today.
is there something along the lines of OnVehicleUpdate?
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
Isnt there a OnHitZombie event? You could do it the otherway around, instead of nerfing damage to players buff it to the zombies
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
Just use player update
Later sorry
well onplayerupdate doesn't read a vehicles trunk updates
and that is what i need to check.
Why does placing something with AddWorldInventoryItem deletes the item if it's a food?
huh, is there more to this? What parameters are you using?
You should use 0, 0, 0 for its digits
this is with the onplayerupdate.
it only updates the very first time you get on.
and then never again.
I never use 0,0,0 and it works.
I use 000 and it works with other items but with food not so much
I suspect it's because the food can rot
For center 0.5,0.5,0, x%1,y%1,z for other things.
What does the z parameter actually do in that call?
Oh, one more thing to it... the food spawns and stays but when I move my character then it dissapears
it's square z, for example I set it to 0.5 and it was like ON the car instead of under it. Magic float without car later.
That doesnt seem that good tbh id rather have it under the car than to have it float
---@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
Actually does anyone know where all the events are defined?
Hmmm
Can you define them aswell on what it triggers?
i dont see any lua for OnPlayerUpdate
I guess? Wrap a Lua function and trigger event.
i'd love an event that fires whenever something is added or removed from a container lol
@ Blair has you covered for next version, I think?
Thank you. Question. Is this something the game does with all melee weapons? or is the damage on players in MP weird with everything? I don't see anything like this anywhere in the base game and I don't see any weapon mods I use using it.
It applies to everything
Even ranged
trying to think of a mod that hasnt been done or done well
zeppelin mod
You can create your own trigger points that come back to events you define. Theres a few done this way already in vanilla Lua
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
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. =/
See LuaEventManager
Is it possible to spawn vehicles on rooftops?
-------------------------------------------------------------------------------------------------------------------------------------------------
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)
-----------------------------------------------------------------------------------------------------------------------------------------------------------```
Goddamn.. Impressive to see people formatting their code here after all I've seen here so far..
The enclosure on the if key == 27 line is redundant though.
It doesn't hurt anything and makes it look nicer IMHO.
php habits ^^'
Didn't expect it to come from PHP. That's a curveball.
Oh.. I remember you.
héhé
How're the templates doing?
Beats blasting my forehead on my laptop and rolling around to write a new linter.
I have not retouched since the publication: https://github.com/JHDane/LiveTemplatePZ
I think maybe include the UI in the live template to make quick UI
A Lua "Helper" extension for PZ in VSCode may be in order.
Common patterns can be templates for modders.
i don't use VSCode ^^ i'm on JetBrains
I'm aware.
is there a cleaner way to do different sets of spawn points than adding them to different map folders?
Exibit A (hooo boy look at all dem map folders!!)https://steamcommunity.com/sharedfiles/filedetails/?id=2964109650
I still want each "folder" to be selectable on their own, but being able to add them all to the same folder if possible would be cool
Anyone wondering
Basically : If your sandbox rotten food removal time is lower then then the starting months days combined then FOOD item added with AddWorldInventoryItembreaks somehow and deletes the item.
No, not last I checked
The engine will purposefully remove it - even indoors.
ehh. sad. thank you
what parameters are you using?
No
are you placing an item or using item's name?
getPlayer():getCurrentSquare():AddWorldInventoryItem("Base.CannedCornedBeefOpen", 0, 0, 0);
yes, it auto sets age 👍
Maybe you can create the item yourself and place that instead?
Can anyone tell me rq how to take models from the game and place them into blender? Thanks!
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.
you don't have to put it into their inventory, just create the object
i have no idea what I am doing
local item = InventoryItemFactory.CreateItem("Base.CannedCornedBeefOpen")
-- probably need to mess with the item's age here
getPlayer():getCurrentSquare():AddWorldInventoryItem(item, 0, 0, 0)
Ithink boobie knows how to that
If your wanting to animate
I mean if you want to make like video
You should ask #modeling
Thank you! Wish I was smart.
You are man
@ancient grail I asked modeling, but thought I may get a faster answer here, thanks 😄
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
Perfect! Thank you 🙂
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 🙂
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
in the packs
where at
Anyone got any guides on how to make a custom occupation?
Caused by: java.lang.UnsatisfiedLinkError: 'void zombie.core.physics.Bullet.removeVehicle(int)'
media/texturepacks/ui
anyone?
If this is possible, maybe somebody else made this before. Maybe check the scrap orchard.
someone has done it before, but I want to make one that is better suited for what i want
Anyone knows how to fix this?
Please Ping me If anyone knows how to fix this
whats wrong with it?
remove uv location from light mask
No It's not that
It's part of the world lighting
you mean red light or reverse light?
how am i supposed to know whats wrong just by an image with no description of said issue, was just trying to help
Yes I understand that
lol i still have no clue whats wrong here, as there are two forms of light that could be wrong here
I'm glad that you're helping
and answer for that is
Yes the Mirrored light
filped mask
or you wrong set mask texture and game see left as right and right as left..
not mask problem
then flip vertex
for me looks like rected set uv
are you have mirrored uv with textures?
There is no mirrored textures
like textures are half fitted and second is just mirorred?
I think It's the shading of the model
it have separated parts or is solid?
If I put it in flat shading right it does this
Anyone know of a way to confirm cross character play by the same user if the person is on -nosteam or gog?
Is there a mac_address field that's exposed or something?
Like this
I think so chuck
goog and nonsteam is same
But I'm coaching a little league game atm.
Oh neat lol
for me looks like mask or uv problem
Wouldn't this topic fit better on modelling?
what do you mean? like seeing if the player is using multiple characters in singleplayer?
It would chuck
I have people using skill-recovery-journal on a nosteam server, and I would want a way to prevent player from sharing them.
SteamID is unique to user - I was curious how nosteam handles it
username
Wouldn't they be able to log into eachother's acc?
So the username/password for server's yes -- but wouldn't two friends be able to share that easily?
woodchuck chuck wood when wood chuck woodchuck
yeah but then they'd be playing on the friend's character too
@viral notch Actually you don't need too

I wonder if there's a mac address that's not exposed 🤔 @tame mulch ?
Thanks for the help @viral notch and @echo fiber
so what was problem?
I think It's model that's the problem
I'll have to do some digging around

I'm checking the script for it right now
Ask @last flax he fixed it before
i'm not sure i understand what the goal is here, you don't want skill journals to work if the character has changed ip address...?
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.
So by ip then??
You xan verify it's not the same user?
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.
My IP changes tho
Yeah? PZ should handle that.
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
Are you making a ban system or are you working with one?
Steam connections cannot work with IPs, unfortunately
Nah, trying to prevent cheating/unintended use of a mod
(Coming from someone who was paid by an ancient PZ server to mod the Java side into Bukkit, literally making these solutions privately)
Not a super big deal - I could use usernames
There's also this under public server util
private static String getMacAddress() {
Does Steam forward that?
I also wonder if I can MITM and send false machine addresses if so..
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 "";
}
i'm not sure i understand why usernames don't suit your usage
Thanks for reminding me that SOME PEOPLE did not test my server-exclusive mod loader like they said they would a couple months ago...
people would be a lot less likely to share their steam accounts
Well, those people would be screwed over in the off chance they use my mod and mac addresses are ever supported lol
What is this mod you're trying to protect?
i don't really see the exploit, if kate plays as bob and uses bob's skill journal what's the issue?
Cause it's intended the journal's can't be shared
@sour island Why don't you simply password-lock the journal?
but whether it's kate or bob doing it it's bob's character getting bob's xp
The issue isn't really with good faith actors - but people looking to exploit it
uh?
If I had more time on my hands, I could walk you through how I'd try to exploit your work.
this is more of #modeling related
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?
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
but why isn't username sufficient for non-steam then? it seems like it would accomplish the same thing
for people not looking to cheat - yes
Unfortunately some of the 60 exploits I patched last year are still active. =/
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
overall, not a grave issue though - given the market of non-steam MP servers are probably smallish?
im already modeling it, i want to know how to make a mod that could make an item like a belt that lets you attach things to your chest and stuff
So people are able to do this without maliciously modifying their clients?
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
still same answer
???
The IP you would see is Steam's, not the player's
i see
Steam has its own traced route that they do whatever with for games.
Yes, my mod just checks for steamID - I looked into confirming it's the same person otherwise to no real luck and wasn't really motivated to come up with a clever solution.
I'd put that problem on the player for not doing enough to protect their account.
That's me.
It's not a security issue
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
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
They're making a perfecly valid inquiry for this channel, please chill.
@sour island I remember a creation timestamp for players. Maybe try using that.
@ancient grail use * for emphasis, lol
If not, use moddata and create one.
This has to be across multiple isoPlayers though 😅
That timestamp will be unique to that player, not just a steam or non-steam user.
Okay. Create a dictionary?
Sorry, I'm not going to be able to help you with the details, and the model isn't in the screenshots, but this mod does what you're looking to do, if you need examples of code and scripts involved.
I'd avoid using IP and SteamID.
Use a transient variable tied to each player and map them.
that would be nice
lol, he said he knows the mods, but he can do it better
i didnt say i could do it better
I just said i wanted to make one that would suit me and my friends better
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.
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
Yeah, for sure.
Maybe a phrase provided by a player when the player spawns for the first time.
I really like phrases because it solves a lot of this type of problem.
They can't really share it without giving it up entirely
ah, by bad. I misread probably.
If you're trying to roast someone who is trying to get help making a mod or something with this, please don't.
he's soamming
spamming
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
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.
I'll look into it
Awesome. Hope that I helped you or at least gave you new ways to think about approaching the problem.
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.
Yes, indeed - I like the idea of 'claiming' the journals
=)
I only answered to you about this, I didn't try moderating.
Now if you can help me think about how to implement this ZedScript linter... xD
do you have a link or files of the mod so i can take a look
I don't have experience, but scripts only have a fixed number of symbols
My boss who worked in the programming field since 1981 says this is Master's level shenanigans.
'hey you're missing a comma' alone would save alot of people hours
xD
It's more like thinking about for every symbol, what shouldn't proceed or follow it.
No, it's not on any computers I have available; just the steam workshop item(s).
i dont think this is what im looking for
I has a belt with extra slots
What a beautiful poster
Oh you know what... I should make a pattern-sequence matcher for locating bad patterns.
Then there's also Authentic Peach with anothe big mod.
[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.
I'd start with counting brackets
Recipes also have a secondary value on some lines
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.
I gotta work on a commission but I'll pop in a couple of minutes at a time
That should work then
You might also need a dictionary of params and expected value types
BlairAlgol will we still be able to have better crops indoors, or is that impossible with new 'seasons' system?
There will be a sandbox option to enable it.
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?
You could use recipe functions and modData
Slides LUA for dummies behind back this'll be fine
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
Create a separate model for static model, turn it upside down. That's how I do it
Keep in mind you must do it in Edit mode in Blender, not in object mode
i did this for all my models but the vape is the only one thats doing this
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
in blender?
yup
ill give it a shot
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
items icon needs to be item_ITEMNAME
oh i see
well now it reads it but the icon is invis in game
is it a 32x32 png file
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
also make sure to caps the I in Icon
yep
do you have the , at the end
yep
0.o
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, } }
it should be working then, can you show me a SS of your script and the file name?
do you have it in the correct folder structure?
Which would be?
Yep
try fully reloading your game
some times i have to do that to get it to render a change
didnt work btw still upsidedown, iv even tried making the model sideways and still goes to this position
then y ou might noit be overwritng the irght model.
does it matter the layout of the script? so for example putting the StaticModel=Item at the bottem?
I restarted the game, its still invis
might have an error in your code somewhere
the tatic and world models should be different
im not sure what could be wrong
try just makeing a base item and apply that image to it and see if the image is working if it is then its the code
can u send a pic of how u have the png named a where
i have no idea
that looks correct and its a png cuz its transparent, umm im not sure really with this one
its all correct from what i can see
welp idk
media not Media, and Item_ not item_ these are all case sensitive
lets see if it worke
iv tried replacing the model with one of the bottles and it works, its just the vapes model not working >.<
still doesnt work
How do I get into modding for PZ? Kinda interested
im out of ideas on how to fix this
did you change the folders name to media already?
yep
and you changed the file to Item_ with cap I
yep
Then I'm fully interested? I meant like how do I get into the modeling and doing the code
learn lua and blender then start going threw the code of the main game
im looking at my files compared to yours atm one second
Thank you🙏 That's all I needed
file location is under your steam do you know how to get there?
Properties, local files?
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
I got the DayZ modding down lol
i don't think that will change it since i already tested a base item and it didnt work eitehr
Thank you
did you test the base item after making all the changes
i suppose not
try that real quick then
i am now
🙂
yea idk why that is an issue today but there is always something
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
on it
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
if making the new icon breaks it then files might be in the wrong location
one small thing can break the whole thing
If module is Base there's no need to import Base
thats what V85 has at the top of his file
Make sure your png is not 32-bit the game doesn't like that
yay!
It depends on what software you're using
i used GIMP and ms paint
Krita is free and is amazing
i mean, preferably right now i dont want to download a whole new software just to convert an image
I have no experience with GIMP
so should it be 16 bit?
one thing that is probably not related, you're using Belt as clothingItem, you need to change that
this icon is cursed i guess
try making a new icon that is the best idea i can come up with atm