#mod_development
1 messages Β· Page 328 of 1
Windows
Alright thanks
i got the vehicle width but i also need the car length
there doesnt seem to be a method to get the length in IsoMovingObject
Yea that's not a thing for character at least
No idea for vehicles
You're using getWidth ? https://projectzomboid.com/modding/zombie/iso/IsoMovingObject.html#getWidth()
If so you sure that even gives you the width of the vehicle ?
yes
it did give me the width but in decimals
but i multiplied it by 100
Sounds like this would give everything needed
Gives the corners of the hitbox
Or the shadow I guess
Does the vehicle script hold the info regarding its size ?
declaration: package: zombie.scripting.objects, class: VehicleScript, class: Area
Hmm can't retrieve that from the vehicle
https://projectzomboid.com/modding/zombie/scripting/ScriptManager.html#getVehicle(java.lang.String)
https://projectzomboid.com/modding/zombie/scripting/objects/VehicleScript.html#getArea(int)
declaration: package: zombie.scripting, class: ScriptManager
declaration: package: zombie.scripting.objects, class: VehicleScript
You can retrieve the vehicle area from its original script by using this most likely
I'll see
Hmm what does CanAlwaysBeResearched mean in https://pzwiki.net/wiki/Tags_(craftRecipe) ?
local script =
"{ inputs { item 1200 [Base.BlowTorch] mode:destroy flags[Prop2],} }"
local recipe = getScriptManager():getCraftRecipe("PackBoxOfWeldingTorches")
recipe:getInputs():clear()
recipe:Load("PackBoxOfWeldingTorches", script)```
how would i go about changing this so that instead of changing the craftrecipe, it changes the item?
this is the item i have:
```lua
item CrateOfPlanks
{
DisplayName = Crate of Planks,
DisplayCategory = Material,
Type = Normal,
Weight = 25,
Icon = Parcel_Medium_Ammo,
ConsolidateOption = ContextMenu_Merge,
WorldStaticModel = Parcel_Ammo_Heavy,
}
}```
i want to change its weight so it is instead 6 or 8
local script =
"{ DisplayName = Crate of Planks, DisplayCategory = Material, Type = Normal, Weight = 6, Icon = Parcel_Medium_Ammo,ConsolidateOption = ContextMenu_Merge, WorldStaticModel = Parcel_Ammo_Heavy,}"
local item = getScriptManager():getInstanceItem("CrateOfPlanks")
recipe:getInputs():clear()
recipe:Load("CrateOfPlanks", script)```
settled some of the scripting part but getinstanceitem doesnt exist
and on the javadocs im not finding any appropriate parameters to replace it with
Mhh I also would appreciate a quick review of this simple debug recipe. Hard to debug the errors from recipes I find..
{
imports
{
Base
}
craftRecipe AssembleResonantAgitatorMKII
{
timedAction = MakingElectrical,
Time = 5,
category = Electrical,
Tags = AnySurfaceCraft,
inputs
{
item 1 [Screws]
}
outputs
{
item 1 Screws
}
}
}```
local script =
"{ DisplayName = Crate of Planks, DisplayCategory = Material, Type = Normal, Weight = 6, Icon = Parcel_Medium_Ammo,ConsolidateOption = ContextMenu_Merge, WorldStaticModel = Parcel_Ammo_Heavy,}"
local item = getScriptManager():getInstanceItem("CrateOfPlanks")
item:getItem():clear()
item:Load("CrateOfPlanks", script)```
final revision of what ive got,
UUhm what was it? π
Space in craft name I believe
Also old ass message man
Yeah just looking through peoples recipe to find out why mine doesn't work π
Just explain your issue here
Well I would assume this recipe simply converts 1 screw into another screw - for testing.
Upon testing (press B while in debug) I get a hard to read console error and the UI doesn't show
function: OpenHandcraftWindow -- file: ISEntityUI.lua line # 559 | Vanilla
function: onPressKey -- file: ISCraftingUI.lua line # 1724 | Vanilla
LOG : General f:11222, t:1748292253897> __len not defined for operand
ERROR: General f:11222, t:1748292253897> ExceptionLogger.logException> Exception thrown
java.lang.RuntimeException: __len not defined for operand at KahluaUtil.fail(KahluaUtil.java:100).
Stack trace:
se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:100)
se.krka.kahlua.vm.KahluaUtil.luaAssert(KahluaUtil.java:88)
se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:729)
se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1790)
se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
zombie.Lua.Event.trigger(Event.java:72)
zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:315)
zombie.input.GameKeyboard.update(GameKeyboard.java:69)
zombie.GameWindow.logic(GameWindow.java:310)
zombie.GameWindow.frameStep(GameWindow.java:917)
zombie.GameWindow.mainThreadStep(GameWindow.java:643)
zombie.MainThread.mainLoop(MainThread.java:76)
java.base/java.lang.Thread.run(Unknown Source)
LOG : General f:11222, t:1748292253897> -----------------------------------------
STACK TRACE
-----------------------------------------
function: calculateLayout -- file: ISWidgetIngredientsInputs.lua line # 206 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 466 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 116 | Vanilla
function: calculateLayout -- file: ISCraftRecipePanel.lua line # 119 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 466 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 116 | Vanilla
function: calculateLayout -- file: ISHandCraftPanel.lua line # 137 | Vanilla
function: calculateLayout -- file: ISHandcraftWindow.lua line # 94 | Vanilla
function: createWindow -- file: ISEntityUI.lua line # 416 | Vanilla
function: OpenHandcraftWindow -- file: ISEntityUI.lua line # 559 | Vanilla```
mhhhh .. god damn, this works now. π whyyyy.
{
craftRecipe AssembleResonantAgitatorMKII
{
timedAction = MakingElectrical,
Time = 20,
Tags = AnySurfaceCraft,
category = Electrical,
inputs
{
item 1 [Base.Screws],
}
outputs
{
item 1 Base.Screws,
}
}
}
```
maybe just talking it over was what I needed 
Sorry for bothering.
Are you working on a mod that has a copy on the workshop that you downloaded ?
Could also be because you didn't properly reload the recipe after doing changes
mhh, I have a inotifywait rsync that copies files from my git projects into $HOME/Zomboid/mods/MyMod (because symlink bug)
That usually works fine.
I'm not familiar with symlink enough to know if that can cause issues
they cause problems yeah
Question though, if I have an item script like this (tested standalone to spawn, works)
{
imports
{
Base
}
item ResonantAgitatorMKII
{```
I should be able to refer it in recipe output also namespaced?
``` outputs
{
item 1 StorModeMod.ResonantAgitatorMKII
}```
yeah
then why it errors out π . I managed to craft a screw (for a screw) fine.
item:
{
imports
{
Base
}
item ResonantAgitatorMKII
{
DisplayName = Resonant Agitator MKII,
DisplayCategory = Electronics,
Type = Normal,
Weight = 1.8,
Icon = NoiseMaker,
PhysicsObject = NoiseMaker,
WorldStaticModel = NoiseMaker,
Tooltip = Tooltip_ResonantAgitatorMKII,
}
item Schematic_AgitatorMKII
{
DisplayName = Schematic: Resonant Agitator MKII,
Type = Literature,
Icon = Book,
Weight = 0.1,
TeachedRecipes = AssembleResonantAgitatorMKII,
}
}
recipe:
{
craftRecipe AssembleResonantAgitatorMKII
{
timedAction = DismantleElectrical,
Time = 20,
Tags = InHandCraft;Electrical,
category = Electrical,
inputs
{
item 1 [Base.Screws]
}
outputs
{
item 1 StorModeMod.ResonantAgitatorMKII
}
}
}
```
well it errors out because you typo'd the module name π
lol
happens 
i didn't point it out because i assumed you just typed that up as an example so it didn't seem like it mattered π
Ok. I think I nead a break π
is this code fine? i dont think i can use "getitem" at all and im not sure if "instanceitem" is even an option in scriptmanager
ive yet to test it but im verifying that all the parameters are correct
ive reviewed the pzwiki and the 42.8 javadocs to not much avail
I can't even find getInstanceItem in the java doc
i found it on the pzwiki though
on that link you sent me yesterday instanceItem is an option so i assume getInstanceItem was also an option
Yea yea figured that was where you could have found that, but I can't seem to be able to find it
getInstanceItem doesn't exist in that page
mhh I fixed the module naming, double checked names overall.
I have the suspicion it is something about handcrafting
LOG : Lua f:1058, t:1748293116064> ISXuiSkin -> ISXuiSkin -> could not find style for 'ISHandcraftWindow', style = 'HandcraftWindow'...
LOG : Lua f:1058, t:1748293116065> ISXuiSkin -> ISXuiSkin -> could not find style for 'ISHandcraftWindowHeader', style = '(default style)'...
LOG : Lua f:1058, t:1748293116067> ISXuiSkin -> ISXuiSkin -> could not find style for 'ISWidgetRecipeCategories', style = 'S_NeedsAStyle'...
LOG : General f:1058, t:1748293116105> -----------------------------------------
STACK TRACE
-----------------------------------------
function: calculateLayout -- file: ISWidgetIngredientsInputs.lua line # 206 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 466 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 116 | Vanilla
function: calculateLayout -- file: ISCraftRecipePanel.lua line # 119 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 466 | Vanilla```
Those errors don't give any info
well how would you override an items properties (particularly the weight of an item)
Can you show your craft script again please ?
You're trying to create an item here, try to do that first
Wait no nvm
Give me a sec
sure thing:
Item:
{
imports
{
Base
}
item ResonantAgitatorMKII
{
DisplayName = Resonant Agitator MKII,
DisplayCategory = Electronics,
Type = Normal,
Weight = 1.8,
Icon = NoiseMaker,
PhysicsObject = NoiseMaker,
WorldStaticModel = NoiseMaker,
Tooltip = Tooltip_ResonantAgitatorMKII,
}
item Schematic_AgitatorMKII
{
DisplayName = Schematic: Resonant Agitator MKII,
Type = Literature,
Icon = Book,
Weight = 0.1,
TeachedRecipes = AssembleResonantAgitatorMKII,
}
}```
recipe:
```module StoryModeMod
{
craftRecipe AssembleResonantAgitatorMKII
{
timedAction = DismantleElectrical,
Time = 20,
Tags = InHandCraft;Electrical,
category = Electrical,
inputs
{
item 1 [Base.Screws]
}
outputs
{
item 1 StoryModeMod.ResonantAgitatorMKII
}
}
}
```
Lua I can debug usually on my own .. this is new territory.
no no im making a patch currently that replaces the values of an item "CrateOfPlanks"
Can you remind me which version you're on please ?
42.8.1
local script = "{ DisplayName = Crate of Planks, DisplayCategory = Material, Type = Normal, Weight = 6, Icon = Parcel_Medium_Ammo,ConsolidateOption = ContextMenu_Merge, WorldStaticModel = Parcel_Ammo_Heavy,}"
i believe that this part is correct
Ok wait so I'm having to help two persons on two different problems so give me a few minute guys lol
help out karma first i came in here second
Yea looking at it π
You don't import base, could that be the issue ?
Import base maybe
Since you reference a base item
Nothing else stands out to me
I think I need to put examples of crafts on the wiki page too, I'll try to add one regarding this if that's the solution
Well but I used [Base.Screws]
I tried with import base before and then I could do simply [Screws]. But maybe there are sublte things in the background. I am trying a few iterations π€
Also full game restart, no "reload lua". Maybe I was naively relying on that.
Ok so I think you got to go this way
local item = getScriptManager():FindItem("CrateOfPlanks",true) -- true means it will use Base.
I do not know the details of import Base and what it's for exactly tbf
Reload Lua properly reload scripts
Nothing to worry about that
Then search in this to change stats of that item
https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/scripting/objects/Item.html
declaration: package: zombie.scripting.objects, class: Item
is getActualWeight returning the encumbrance?
I go no idea, I'm looking for the method to change weight
Sounds like it would be weirdly named possibly
it should be setActualWeight(x)
i'll test it out
also realized that it may be easier to just change the contents of the item description
which was my original objective
when you write clear(), are you trying to clear the entire item so that you can replace it?
i'll see what it says about that
yes
thats what im doing
ah, there's no need to use lua for that
Tho you really shouldn't replace an entire item ....
you can just create a new script file with the item script, it'll replace the original
:|
confirmed works:
{
craftRecipe AssembleResonantAgitatorMKII
{
timedAction = MakingElectrical,
Time = 20,
Tags = AnySurfaceCraft,
category = Electrical,
inputs
{
item 1 [Base.Screws],
}
outputs
{
item 1 Base.Screws,
}
}
}
confirmed not working:
{
craftRecipe AssembleResonantAgitatorMKII
{
timedAction = MakingElectrical,
Time = 20,
Tags = AnySurfaceCraft,
category = Electrical,
inputs
{
item 1 [Base.Screws]
}
outputs
{
item 1 StoryModeMod.ResonantAgitatorMKII
}
}
}```
the item in question:
```module StoryModeMod
{
imports
{
Base
},
item ResonantAgitatorMKII
{
DisplayName = Resonant Agitator MKII,
DisplayCategory = Electronics,
Type = Normal,
Weight = 1.8,
Icon = NoiseMaker,
PhysicsObject = NoiseMaker,
WorldStaticModel = NoiseMaker,
Tooltip = Tooltip_ResonantAgitatorMKII,
}```
next I'll just test dropping all namespacing π
the hack you're using there is only used when we need to add things to an item without replacing it entirely
You know, at first I thought about the comma but then I thought the craft had worked without and thus stopped thinking about them
thing is im implementing a patch for it. its separate from the main mod and when enabled will replace the weight of the item with 6.
Are you actually replacing EVERYTHING in the item ? @steady fable
Bcs if you're only replacing a few bits, patch it
yeah im only replacing one items data
even then its not every part of the item i just want to replace the weights value with 6
the function would have to define where it is first and im not sure how i'd do that
Yea so patch it with Lua
FindItem:getActualWeight?
Why do you need the reference weight ?
or wait
You're trying to modify an existing item stats in a world or modifying the entire default item definition ?
finditem:setactualweight
im trying to modify an existing items stats within a script script
like where i store all the mods items, packs.txt
local item = getScriptManager():FindItem("CrateOfPlanks",true) -- true means it will use Base.
item:setActualWeight(weightValue)
This
Then
Adding a comma behind the item in output gave a nice parse error. Which is super weird because in vanilla I see the trailing commas everywhere π€―
it must be a namespace thing. Testing ..
{
craftRecipe AssembleResonantAgitatorMKII
{
timedAction = MakingElectrical,
Time = 20,
Tags = AnySurfaceCraft,
category = Electrical,
inputs
{
item 1 [Base.Screws]
}
outputs
{
item 1 StoryModeMod.ResonantAgitatorMKII,
}
}
}```
But fucking hell I hope they improve the errors for script mistakes because that's confusing so many people and you always need to put literally ages in figuring it out
Forgotten comma at the end of inputs
The mistake is not at outputs
vanilla scripts don't add a comma between inputs and outputs either. Which is akward. And it worked when the recipe was spitting out a screw. But I can test.
Show an example ?
vanilla recipes_sacks.txt
{
timedAction = UnPackSack,
Time = 15,
Tags = InHandCraft,
category = Packing,
inputs
{
item 1 [Base.Claybag] flags[IsFull] mode:destroy,
}
outputs
{
item 8 Base.Clay,
item 1 Base.EmptySandbag,
}
}```
But it does have a comma
oh you mean behind item 1 [Base.Screws] ?
Yea !
ok I can try.
God damn it I'll put a warn on the wiki for this shit π
FINE TIS, I'LL MAKE THE ERRORS MYSELF
i contribute to the wiki on occasion
lets see. don't write much until we rubbed ourselfes sore enough on more weird formatting cases.
You're welcome to do so
my username is "a" if you ever see that but i did do some of the roads in december when ti first came out
I mostly stay in the Modding space of the wiki
it's safe to assume all lines should always have a comma at the end
So if you edit stuff elsewhere it's likely I won't see it
there was a lack of hunting content so i added some descriptions there
yar
good work though
I actually don't know the main part of the wiki very well haha
it worked
Nice
thank you #mod_development for saving my mod multiple times because i cant probe the javadocs without getting confusedπ
You'll get used to the doc π
if i dont get burnt out of course
For sure
Make sure to chill sometimes
No point pressing yourself, you got all the time in the world
dont be a hero
That's kind of that yea
And don't hesitate to deactivate the mod's comments if people get too annoying to you
You owe them nothing
Confirmed working 
item:
{
imports
{
Base
}
item ResonantAgitatorMKII
{
DisplayName = Resonant Agitator MKII,
DisplayCategory = Electronics,
Type = Normal,
Weight = 1.8,
Icon = NoiseMaker,
WorldStaticModel = NoiseMaker,
Tooltip = Tooltip_ResonantAgitatorMKII,
}
item Schematic_AgitatorMKII
{
DisplayName = Schematic: Resonant Agitator MKII,
Type = Literature,
Icon = Book,
Weight = 0.1,
TeachedRecipes = AssembleResonantAgitatorMKII,
}
}```
recipe:
```module StoryModeMod
{
imports
{
Base
}
craftRecipe AssembleResonantAgitatorMKII
{
timedAction = MakingElectrical,
Time = 20,
Tags = AnySurfaceCraft,
category = Electrical,
inputs
{
item 1 [Base.Screws],
}
outputs
{
item 1 StoryModeMod.ResonantAgitatorMKII,
}
}
}```
so .. it was the right commas afterall.
Also notice how at times I had a comma here:
``` imports
{
Base
},```
That is not required and maybe actively harmful π
Clarified it on the wiki
Thanks so much @bright fog I salute you

I will try to help others when I spot it here.
Or tell them to read the big red texts on the wiki pages regarding craftRecipe 
I just wonder about the wisdom to not keep definitions in lua where they would be, for all the looseness of the language, still clearer to format and debug π€
You mean instead of using their current script system to do it fully in Lua ?
yeah
one missing comma in one mod breaks the whole game from starting π . In lua it would bit just a blimp of an error bottom right.
That was something we had discussed a few times, I'm in the team that they really should use a normalized writing language that exists, and doing it in Lua could allow for anything to be done on every single assets of the game. An argument against it was load time, that it would be less efficient than its current form
Yea and the worst part is it barely even tells you about it
Alright. Well lets see post b42. "ass cheeks together and ride till dawn".
I recently discovered how Vintage Story handles its assets, things that you could say is their own "scripts" and they use JSON files
Yea definitely in it too now
I've seen how Vintage Story does it and that's really good
Let me find an example
Alright, maybe Sir @true plinth can pick up on the comma issue even more. There is already builtin strictness for items which I super love
but extending it to recipes would help alot I think.
Sorry for the indentation, Discord
For some reasons I literally can't upload the file directly and I have to copy it's content, wait
tab characters π€’
Yea tabs getting eaten by freaking Discord, wait 
Here ya go
But I find their method of handling definitions for things (in this case it's an enemy type) pretty nice, and best of all it's NORMALIZED >:(
And the best part is that with a mod, you can easily patch one of these json files with a bunch of tools, like add, replace, remove, move, copy commands etc
patch with another json file
the entire script language is just a legacy holdover they keep building on top of
it was supposed to actually be a scripting language but pretty early on they figured out lua was a way better choice
whenever they add something new that needs external tooling they just use xml
hi guys, I'm trying to spawn a key for a specific door on player inventory, but I can't find anything that works
can anyone point me to the files/variables I should be checking to make this work?
thanks!
Look at the Universal Key mod script maybe
I vote for XML, with inheritance and support for xpath patches in mods.
Sandstorm
1920s dustbowl/great despression zomboid?
Tryin to make a cool desert scene for Dane's 100 Years Later mod
Only thing I cant seem to initiate in the script is puddles. They make pretty good sand dunes
Makes the sand floor much more detailed and interesting
Sand dunes you can drink from?
I could probably disable that
(that can be disabled)
yea lol
Should just be a function added to populatewoeldcontextmenu that removes "drink from puddle" if found
Does anyone know a way how to move the recipe names to a sub menue like: recipe->craft something 10x - without making my own custom context menue?
Ive looked through this for B.41 and even B.42 yesterday but coudnt really find an answer. Source for that question was that ive played on a server where there are so many mods for some stuff (planks for example) that you have to scroll down to find anything 'normal' like 'place' between them. So i thought it would be nice if we could just move recipe names into some sub folders, but didnt find anything on the topic? π
i had this idea for a mod
do you guys think its possible to set zeds as passenger? i know it can be done for SP survivors but not sure if its possible for mp zeds
idea is that they died inside the car
make em animate while being stuck inside the car
i also want to know how to do this
like use an existing menu and add sub options to it..
if its not possible maybe just remove the og menu and recreate it
look at vanilla admin contextmenu theres a function that allows you to spawn a key for the door you selected
might be something like this
not sure abt the syntax
key:setKeyId(door:getKeyId())
is there any info around handling fluids in crafts?
Hm, maybe i can set up at the end and read out the context menu and move recipes to a sub folder? Not exactly the solution i hped for honestly. Had more hope there was some trick how i can tell the game to put the name in a recipe folder on its own. But thinking about it, thats rather naive, since in return id have to touch every recipe in the db. XD
mostly wondering if it'd be possible to have any fluid container (with maybe a few exceptions) instead of listing every container, and keeping the used container with the new fluid
In theory fixing stupidly big right click recipe lists is one of the goals of the B42 crafting update.
I think the list of what gets shown is chosen by java code using some weird black magic, but the last time I looked was during the 42.0 era and I think it changed since then.
If the code that adds recipes to the inventoryitemcintextmenu is in lua you might be able to patch it, but a lot of that stuff is huge functions where you might want to change a few lines in the middle of 700 lines of if statments
Yes it is
Bandits does it
I think ?
You can list specific containers but you can't blacklist containers, that would involve adding every containers as a possibility which would be annoying to do + might cause mod issues where some types of containers are accepted but a mod adds a container that should be accepted but isn't
You could use a Lua function too to test valid containers perhaps
Just check the page regarding inputs
It details fluids in inputs
oh wow, the wiki is quite detailed on how shit works. I'm too used to barely any info about mods in games xD
thank you
The wiki was unusable before I came around updating it. CraftRecipe is one of the most recent and detailed page you can find
Explains quite well recipes, tho there's still some bits here and there missing of course
damn my ambition is growing too fast π©
There aren't pages for everything yet tho, some stuff in the game are still undocumented, it'll become fully documented as time goes on and it'll get there faster when people start editing with me
from what I see liquids don't have any interaction with freezing or heat
Liquids also don't go rotten
I expect that to change, but right now milk lasts forever.
funnily enough thats exactly why I got the idea to do something fun, but even basic chocolate milk is borking my game for some reason xD
"MilkChocolate" or "Base.MilkChocolate" just doesn't exist π€·ββοΈ
tho if I understand correctly, this should in theory work no?
oh, output fluid can't be in brackets for some reason
and I already see a huge flaw with the transfer fluid system... if I have 9L I will move 90ML
Not as an item.
Chocolate milk is a fluid.
There is a "small carton of chocolate milk" item Base.MilkChocolate_Personalsized
I wish I could upload screenshots but rip img perms :/
I managed to get it to work proper
just my tired ass doing simple dumb mistakes like trying to add chocolate milk to a chocolate bar xD
The img perms thing is really annoying
I get the idea behind it, but it makes it so much harder to help people/share info/etc until you have been here for enough time and/or messages.
so basically we spam "." till we level up xD
tho I assume the server has an automatic spam prevention, I'm not willing to fuck around and find out tho
That's not in the wiki ? I'll change that
It's a behavior between output and input
Bcs and output can't have multiple options
While inputs can and so it takes a table of items
that actually kind of sucks... if I wanted to try messing around with liquid metal, and if I needed for example to extract 2 liquids from an item... like copper and iron as an example
cooool
then maybe make the mod using non vanilla methods
I'm too code-fu illiterate for advanced stuff like that, I mostly just try to toy around with whatever is available
you probably can extract more than one liquid, you just can't have two options for a single output, that doesn't make sense
for an input you can do [item1/item2] and that means 'any of these items are acceptable', but for an output, what would [item1/item2] even mean?
I mean I already see another problem with liquids, they mix together, I'd guess that restricting which liquid can go in different kind of bucket type would help remedy that, but that sound like a stupid solution, tho I guess removing "beverage" tag for something like liquid metal should solve it
actually nvm still not done with this i also need to take the vehicle length into account for when the car is moving sideways (assuming it was hit by another car or just somehow the player managed to drive the vehicle sideways)
Hey, im trying to modify the inventory of a zombie but nothing works.
local Zombie : IsoZombie = .... local test = Zombie:getInventory() test:AddItem("MoneyBundle")
Is there something im missing?
Can I not add items to a living zombies inventory?
local Zombie : IsoZombie isn't lua syntax
Sir Doggy Jvla method of using raycast was by using doggy api and its only available on build42
welp
its not an actual snippet from my code, just pseudo for better understanding
alrighty it seems that isoZombies dont have a inventory
you can use addItemToSpawnAtDeath
keep in mind that this isn't persistent so if you absolutely need a specific zombie to drop an item (e.g. zombies with this outfit always drop this item), it's better to use custom logic in an OnZombieDead callback (you can edit their inventory normally during this event)
hmm
Well im working on fixing draggable zombies
I cant stand not being able to put them into cars
Well in short im restoring the original corpse pickup logic and creating an "husk" zombie which is then dragged
Does that break the new ragdoll dragging?
Fixed the lack of gay porn in Kentucky: https://steamcommunity.com/sharedfiles/filedetails/?id=3488617311
You could do it with a lua function; make one of the inputs an empty fluid container, then the output is the empty fluid container and the lua OnCreate function puts liquids in the container.
Wdym by that? I havent seen the bodies being ragdolled when dragging them
But honestly I wouldn't spend time working on that right now since there is a good chance that will get done by TIS when eth fluid and crafting systems get more work.
I only saw them being ragdolled when hit by cars
Actually you are probably right... I'm going to quickly check because now I'm trying to remember exactly what it looks like when dragging...
I tried adding the corpse to the inventory without deleting the physical corpse but that broke a lot of stuff
So i try creating a copy of the corpse as a living zombie which then gets marked for dragging only and is then picked up by the player
The problem is its not copied the same
blood and dirt, aswell as holes are not carried over
(top is copy and bottom is original corpse)
you might be able to iterate through all clothing items and copy the details over piece by piece
you're right, no ragdoll on dragging - just identical animations
Would I iterate through itemVisuals or wornItems
I'm not sure, I can't remember which does what
Ill try itemVisuals first then
They're kind of the same thing-- one updates off the other.
Well i did try setting wornItems, and checking the debug info itemVisuals seem to have more of the needed data
Having messed with that a while ago my memory is a bit rusty-- but it highly depends on the timing. What are you trying to do exactly with the body?
im creating a new Zombie thats supposed to be an identical copy of a corpse. Without reviving the corpse
Ah, for dragging?
yes
You can haul them out windows right? Might be worth looking at those anim files and the Lua/java behind that
The current issue is that you have to stop dragging and then pick them up and transfer them I assume?
The Corpse has the necesseary functions for reviving itself, but that function both deletes the corpse and creates the isoZombie for dragging
I want to have a hybrid kind of system where the player drags the corpse but also has the corpse Item in primary and secondary slot
so its possible to transfer the corpse to a container
Hmm
I then recreated the functionality of that and removed the delete corpse stuff. But that led to nothing working
Do dragged bodies have ragdolling or anything in particular?
no
Maybe a different approach: if dragging a corpse AND not in a vehicle AND there is a car seat or trunk inventory available add a option to the rightclick world menu "Put Corpse in Car"
i did think of that if my attempt didnt work
This is probably the easiest way to go about it tbh
At first it looked right with dragging and having the item. But when trying to drop the corpse, the corpse would just delete. Ig reviving the corpse deletes the corpse item
Aren't dumping them out windows like that? Haven't spent much time on B42 tbh - as in right click to throw out window/over fence... Or is that a mod?
havent looked into dumping out windows
I added ragdolling to the dragging animations...
no, you hold e while dragging into a window
but since it doesnt have anything to do with containers or the corpse item itself, i dont think its of any use
the itemVisuals field is protected
You could make a timed action based on currently dragging a corpse and have the corpse be dropped and go through a queue of transfering it
Can i change it using getItemVisuals, like a ptr in c?
You shouldn't need to do all that and I think you'll spend more time fighting the system
You can also make the context menu apply to any container (maybe ignoring floors)
yes
all objects in java act more or less like pointers
some getter methods might copy the object and return that to prevent you from reaching the original but that's rare
Well my plan rn is to restore the orignal corpse functionality. Having it in the inventory, making transfering easy.
And on top of that have a fake zombie be dragged. I then have a OnEquipPrimary event which checks if the corpse has been moved (dropped or moved into a container) and then deletes the fake Zombie
so the fake zombie is to keep the dragging, while using the old corpse item stuff
this is what i've been doing with wornItems: isoZomb:setWornItems(corpseBody:getWornItems())
Thanks for taking the time Jvla! You've been a consistent helpful voice with a number of the questions I've had. I appreciate you!
I read up on the "trueID" and I just wanted to confirm - You said the pID (and therefore trueID) is non-unique? How exactly does that work? Is it just that the pID/trueID is recycled after the zombie assigned that pID/trueID is dead/gone, because if so, that would not really be a concern for my situation!
For my situation, I am looking to keep certain zombie data persistent; A string for addLineChatElement() for a "name" on screen, whether the zombie is a sprinter, and maybe eventually some other data when I start to dip my toes in the custom zombies territory!
Currently in my mod, up to 500 of the zombies whose data I'd like to track spawn simultaneously, so I probably can't do unique, individual outfits for each one if that would be a baseline requirement to achieve a truly unique trueID for each zombie with persistent data.
a zombie's persistent outfit ID is basically just a combination of their gender, an ID corresponding to the outfit (e.g. Police), and then a random number between 1 and 500
that means that ID conflicts are unlikely but possible between zombies of the same gender with the same outfit
...?
And their hat.
Are you mixing up an ArrayList from java with a Lua table?
oh yea
the hat bit doesn't matter because both IDs (hat + hatless) belong to the same zombie and a hatted id can never conflict with a non-hatted id
actually
idk
but am basically storing an IsoObject in lua table
i suppose object is made from java arraylist?
in practice we use IDs with the hat bit normalised out otherwise they're kind of useless
That's my guess from the message
or vice-versa
i'm actually baffled trying to make sense of this error
oh no
i've *never* seen this exception thrown by any pz code lua or not, and a java exception being thrown by pure lua is insane
I see object, objects and Objects
there's no reason why it should be trying to cast anything here
local objects = square:getObjects()
You can make a lua table then use a for loop to go through the Array list and copy things one by one into the table
i think whatever's going on here is confusing even the debugger/error handler
Just remember thecArrayList is zero indexed
the line it's blaming just doesn't make any sense
And a table is π€·ββοΈ indexed
I've seen that before, it's annoying
it looks like RayBeam2D:_checkForIntersectedObject expects an ArrayList but you're passing a table
however that's lua so i don't see why that'd throw that exception
i'm not sure why he annotated it as any, will have to ask him about it later π
You could also just increase the distribution of corpses in vehicle seats to something really high, so like 1 in 3 cars could have a dead zed in it
I wonder if you could define a vehiclePart to have a corpse as the item that gets attached
how am i gonna manage to create an arraylist in a lua file π
is that possible
wellthe idea is that some cars become dangerous
so corpses wont make sense
also it willl look awsome to see zombies moving inside
lol
but what for
ArrayList.new()
Ablative armor?
this error basically means 'you are passing a PZArrayList to a java method that expects a lua table instead', i can't see anywhere in the screenshot where you could do this
java methods that expect tables at all are very rare
huhhh but i passed a lua table
the only arraylists in the locals stack are objects and Specialobjects so i would look at where you're using those
but okay
i think the debugger is just blaming the wrong piece of code entirely
unless there's a bug with the vm it's not possible for lua code to even throw this exception
but it says one of your lines is throwing it
0
k
a
it's probably trying to cast to table because you're attempting to write to an arraylist as if it were a table
i can't believe i missed that π i cannot recommend renaming these variables enough
alr renamed them
does that not work?
if you want to set a value in an arraylist you'd use list:add(o) or list:set(i, o)
but i'm not sure why you'd be doing that here at all, i think it's a mistake
lua does it like
if A ~= B or A ~= C then
its not
if A ~= ( B or C) then
- you create a table called Objects
- you set objects[1] to Object, but objects is an arraylist from earlier in your code, not the table you just created
i see
thx
but thats not causing the error
i just wanted to point that out
Presumably and was intended rather than orβif B and C are different then that'll always be true
but wait i wanted it like if A ~= B and A ~= C then
huh
does build 42 have vehicles without collision
or is the mod tweaking
vehicles still have collision
i think somethings up with my mod
welp
the raycast is working but it returns false when it should be true
sighh
at least i got somewhere
or maybe i forgot to call castRay()???
Hello, anyone know how to add visible holster when zombie is created(OnZombieCreate). I've tried with instanceItem setAttachedItem, i've tried with itemfactory, i've tried with adding it to inventory, i've tried setWornItem, nothing helps, the holster spawn in inventory when i kill the zombie, but it doesn't show on the model. Weapons work, i can attach them and get them visible, but i can't get holster visible and worn.
in vanilla game spawnitems.lua file there is such code -- attaching the pistol to the holster doesn't work properly when the player spawns so it's commented out -- local holster = playerObj:getInventory():AddItem("Base.HolsterSimple") -- playerObj:setWornItem(holster:getBodyLocation(), holster) and -- the pistol isn't attached to the holster because it doesn't work properly when the player spawns -- playerObj:setAttachedItem("Holster Right", pistol); -- pistol:setAttachedSlot(4); -- pistol:setAttachedSlotType("Holster Right"); -- pistol:setAttachedToModel("Holster Right"); does it mean i can't spawn holster using lua code like that, and only have to use outfit distribution module? I would like to use code for that.
wow
i cant figure out how to get the raycast to work
it just keeps returning nil
ok i think it works now wow that took some time
OK, I got the puddles to work. Now to disable the drinking option
Is there a more vehicle modding guide for b42? I'm trying to use the one by tubetarakan but it's outdated and I don't really understand what exactly has changed between B41 and B42.
i feel like onzombiecreate is busted and the inventory is not initialized hence i can't add to it, on the other hand onzombiedead works properly. Attaching items to onzombiecreate works though :/
you aren't meant to be able to edit a zombie's inventory, onzombiedead is the exception
i want to add stuff to zombie inventory when onzombiecreate
and then show it on the zombie, like holster
i dont want outfit system
you'd want to add it to the zombie's wornitems
zombies don't really have inventories
yes i tried using setWornItem
when you see a zombie wearing clothing, it doesn't actually have clothing items in its inventory, its inventory is always empty, it just has wornitems that get converted into items when it dies
hmm i tried item = instanceItem("Base.HolsterSimple), and then zombie:setWornItem("BeltExtra",item)
im trying to convert my code so it spawn pistol in holster and make the zombie worn that holster, hence i need OnZombieCreate. It works well when i do stuff like item = instanceItem(base.shotgun) and then zombie:setAttachedItem("rifle on back", item), but not with holster.
the onzombiecreate part doesn't work, the code with onzombiedead works but it spawn pistol and ammo on dead zombie, it doesnt show it nicely so you dont know which zombie carry gun
in kentucky they didnt have concealed carry at the time
i hope someone will be able to help me, please don't bully, i'm not code wizard.
outfit system is the only easy way
adding the item visual to each zombie manually is a complicated nightmare for something as simple as adding a holster
problem is i haven't found a way. Brita for example adds a fanny pack container, to which it adds ammo and gun and then add it to distribution table of the inventorymale. This solution is at mercy of RNG with other items and limited roll. My solution is similar to Mad Zombie Loot mod which i adore but its not for b42 yet.
if someone know how to add visible holster using lua scripts then please hit me up here or DM. Outfit system is great, but its not granular and controllable enough for my particular need/this solution.
Does ZombiesZoneDefinition.Default give a chance for any zone or any area NOT a zone?
Its the default population, so all zombies except for the ones that spawn in randomized stories I think
Seems to be the case thanks. I have the weight set to about 2% (after the math) and its kinda close
So I've got my car working, but when I try to get inside the action seems to fail. The trunk and hood works normally, as do the doors, but I can't get inside.
This is what the Areas look like
had to force using wornItems by e.g using setReanimatedPlayer(true)
Last thing I edited was in here. I'm wondering if maybe the seat templates or something got messed up, but I don't know.
@bright fog sorry to bother you but i can't seem to figure out how to use Doggy API raycast, am trying to use _checkForIntersectedObject method https://github.com/SirDoggyJvla/Doggy-s-API/blob/master/Contents/mods/Doggy's API/42/media/lua/shared/DoggyObjects/RayBeam2D.lua#L91 but it keeps returning nils even after trying many different adjustments, are you able to help?
API for Project Zomboid which adds a bunch of tools that I use in my mods and that I make available to the modding community. - SirDoggyJvla/Doggy-s-API
Mhh .. is it true that item icons icon = textures cannot be in a subfolder? everything flat inside media/textures/ ? https://pzwiki.net/wiki/Icon doesn't explicitly mention
no
Item_ is prefixed to the *path* you give, not the filename, so the subfolder has to start with Item_
e.g. Icon = MyItem looks for Item_MyItem.png, but Icon = subfolder/MyItem looks for Item_subfolder/MyItem.png
Oh good thats great. π . Thank you.
I had to read that twice lol, tested and confirmed works. So for good namespacing we would see two folders inside media/textures.
media/textures/Item_myMod/```
That is awful but doable π
It might be less akward to simply prefix the icon file names `Item_myMod_myItemIcon.png` and not go for an extra folder. Ah well.
Happy though, I learned about blender modeling, textures/UV-mapping, icons and managed to create a super simple new textured item in less than 2h thanks to this discord, pzwiki and - yes chatGPT. This was pleasant 
Hello guys, so I wanted to make a mod for PZ, my first one actually, but it does not show up on the mod list inside the game. I followed the Mod structure that is on the Wiki, but nothing happens.
Im using the unstable 42 build, added the mod on "Zomboid/Workshop/MyMod/Contents/mods/MyMod/", and I've created the mandatory "common" folder, is there something I'm missing?
copy a known mod there, rename it in mod description file and it should work, alternatively use username/zomboid/mods folder
Thanks! I will give it a try
when i tried to make my own it also didnt work, now i copied one as template and it works, weird...
the hell, it actually worked
what specifically worked?
like, I went to "steamapp/workshop" and copied a mod, then I pasted it on "zomboid/workshop" folders and renamed some values like the id and name inside "mod.info", and it appears on the pz modlist
idk but it works :/
maybe it is bcs of the folder structure? Will check it later but thanks man!
np
good luck you two π«Ά
Alright I got this fixed, for anyone in the future having this issue: Your physics box is probably too big, make it smaller and more form fitting to the car.
Now I gotta get the wheels to stop clipping through the ground
Items be like
DisplayCategory = Electronics,
Recipes be like
category = Electrical,
SkillRequired = Electricity:4,
My brain be like

Wheels fixed
i've spent over na hour pulling my hair why math.random doesn't work, found out zomboid devs have their own implementation lol
hi, anyone knows how to 'unpack' .pack files? i want to try making a retexture for most zomboid textures. It's part of my plan on total conversion of whole game into antiquity.
"Tilezed" has a Pack viewer and maybe other capabilities. I just opened the last version from September 2022
Tools > .pack files
Tiles Tileset images These are the same tilesets released on February 16. For Windows TileZed + WorldEd 32-bit TileZed + WorldEd 64-bit The 32-bit version of WorldEd seems unable to load all the tilesets due to high memory usage, displaying ??? for some tiles. Linux TileZed + WorldEd 64-bit This ...
thanks!
#mod_development message Found in search. The File > Extract Image is not very self-explanatory π.
tested and confirmed works though.
With or without the X? Its a IV bag of a certain serum
thanks, i was looking for some .pack extractor online and stuff, i was really confused, now i can finally make some golden mediterrean forest textures
I'd say without. The yellow looks nasty enough.
It has returned. I seriously don't understand whats causing the issue
try doing just a droplet on the bag
it's something between the model offset and the center of mass offset I think
This is genuinely a really annoying bug and I'm shocked I haven't found anyone else complaining about it. The worst thing is that it only shows up on either newly spawned cars or after the lua resets, if you have a car you can already access it doesn't show up on it.
If anyone could give me some help here it would be really appreciated, I'm at my wits end with this bug. it seems to just show up randomly, totally ruins the mod, and I can't figure out what causes it and how to fix it.
Hey! Can someone help me find an introduction or guide for WorldEd (version 42.8 fork)? I'd really appreciate any help! any links ? thanks
If the physics chassis is too far above the blue line in the vehicle editor (Seems to be if it is above the line at all) the vehicle won't be enterable
Back to where I was 2 hours ago, but it works again. Wheels clip through the ground still but I have no idea how to fix that at this point
Good idea
KI5 cars used to do that in B42 - they would be dunk into the ground on load, then lift up when you started teh engine and they became physics enabled. At some point that was fixed. Might be worth looking in the KI5 shared library
My guess was it was something to do with having custom wheel models instead of using generic Zomboid wheel models
Based on the color I assume the "certain serum" is whiskey.
I'd say don't have a big plain label like the left one, at least put some black dots on it for writing like an actual IV bag would have (but not in enough detail to read on a tiny icon)
The "single big icon" is good from a gameplay POV in quickly identifying the item, but isn't really needed in Zomboid IMO.
Thats my guess too
gonna mess around with wheel scale but might just say screw it and just deal with it
maybe make my wheels more in line with the base game ones
Is there any sort of "spawn X height above ground" parameter?
I'd look at how other people solved it so you don't have to solve it again π
You're literally reinventing the wheel here.
Stupid mod idea time: Primative vehicle crafting
All in the pursuit of NASCAR Zombie disposal my friend
gonna probably take a break and work on something else, will check out how the Mad Max interceptor mod and KI5 work with it
The issue isn't the car spawning in the ground and then needing to launch up, it's that the wheel model themselves clip into the ground
the cars work totally fine
They clip in while driving?
Do the wheels have any sort of physics collision box you need to define?
Maybe? They seem to work fine but the model just sinks in
old picture but they look like this
they work fine
but they visually clip
Somewhere there has to be a "wheels are this big" number for the physics sim
If not a full bounding box style definition for them
And it has to be configurable somehow since modded vehicles have different size wheels.
I shall look into it later
need a break, almost fried my brain over the physics box stuff
Thanks, first time actually getting something finished enough to put in game
Ooooh, that's always exciting!
This mods been in the works for something like 8 months? with massive breaks in between and many scrapped models
Here are some parameters related in the script file: wheel radius / vehicle suspensionStiffness /vehicle suspensionCompression /vehicle suspensionDamping / vehicle maxSuspensionTravelCm / vehicle suspensionRestLength
Radius might be what I'm looking for
Will check it out later
modelling the thunderbird rn
Yes wheel radius worked perfectly, thank you!
hey the mod absolutely scored on the featured page of the workshop
came around to thank yall for the help again
Congrats!
juvenile snickering
And 80 people are subscribed to my handgun mod but not the required library...
RayBeam2D is an object, you are supposed to use it as such by instanciating it
For a working example of it, chrck my mod Chrck Around
- Init the object
- create collide segments for object types in a table then send it to the instance of RayBeam2D
- update beam direction then cast it
Bro is making nascar, hope you will add map with the track too.
Just cars, mapping isnβt something I know a lot about
Plus idk if you could even make a realistic track in PZ
i dont want to discourage anyone, but since KI5 exist, no other car mod can compete lol
Purely hypothetically, if I were to make a map. Iβd probably turn Irvington into a short track like Bristol or Martinsville
But pz doesnβt have banking for roads, so that would mean it would be a flat track and probably feel awful to drive on
just wait 10 more years for fully 3d zomboid π
PZ driving is aweful in general. Better Car physics helps a lot, but it's still not the game I'd pick for a racing mod.
But driving a nascar though hordes of zombies - perfect
This is the end goal
Gotta do donuts in hordes of zeds in a Lumina
If I make a B41 version Iβll probably make it a bit more focused on racing and leave out a lot of the non-car stuff
Hi all, to mod the vanilla traits is it sufficient that I overwrite this file in my own mod? MainCreationMethods?
Or is it more complicated?
im gona post this on the mod request thread but i wanted to make sure theres no such function
a function to fetch the name as string of the audio thats playing
like from emitters or wherever
finally some results
but this is not the results i even want this isj ust the results for understanding how to use the raycast
i need the raycast to hit the car
A different error is a sign of progress.
true
Ok guys, so since last time of testing alot has changed. And now while dragging a zombie, i cannot transfer items between containers. This wasn't the case on B42 release.
Inspecting it further i discovered that the DraggingZombieState clears the ActionQueue every tick. So basically whenever you try to queue an action (like transfering an item) it gets cleared immediately.
An Idea i had was overwriting the state but im not really sure. Anyone got any other ideas?
hey anyone will to help me make a mod ? new to mod making juts need some guidance
Check out the wiki
I don't think it's resetting the action queue or you wouldn't be able to use walk-to while dragging a zombie. More likely it's something in ISInventoryTransferAction
We haven't seen MONSTER TRUCKS yet, have we? that would be 1993 indeed.
I remember going to my first monster truck "rally" in Indy at the RCA Dome in 1993. Big Foot, Hulk, Snake Bite... good times
nah, i rlly debugged it
il show u a snippet
and execute gets run on update inside the stateMachine
And since ISInventoryTransferAction isnt forced or instant, it needs to run through a few Updates until the Progress Bar is full
ig if i could make the item itself trigger an instant transfer
Then it would be able to work, since the first action update is always ran
if i can set forceStop or forceComplete thru the InventoryItem then ig it'd work
thank you will do !!
So I've seen a few mods do it, how do you make unique spawn points for cars and stuff?
it's always something. no idea where the rest of the zombie went, why I can't grab it but I can push it around...
exit the game while grappling a corpse, and it turns into a wad of mush that you can't interact with, except you can push it around
where is this class at? I can't find it or even the "if (!character.isGrappling()..." bit
i can verify it, what version is your decompile? i think it's a recent addition
i don't remember it using a unique state when i looked into it a couple months ago
I'm using your decompiler, of course, it's great! and I did it last on May 20th but I'll run it again.
hmm yeah, doesn't seem like it should be outdated then
fancy
My WIP UI framework that uses GLSL shaders and 3D matrix transforms to render.
Parent-child matrix transforms allow me to implement 3D translation, 3D rotation, and 3D scaling.
I just rewrote the font renderer / font file parser to apply these transforms to rendering text.
This won't have depth-testing however it has everything else.
I might implement CSS z-index nature to render-sorting / render-ordering but that's probably it.
I haven't looked into the codebase of https://steamcommunity.com/sharedfiles/filedetails/?id=3384338630 but maybe it gives you some clues. For some "reactive" car spawning I scan squares in the loaded chunk and then spawn with lua in a "good place for a car". Quite expensive, should be used for rare specific cases only IMHO.
Yesss please!!! star-wars intro font slides π . HTML, CSS, LaTeX!!! gogogo :DDD
We could use something like a React Native implementation to make it feel more like HTML
What is a font/text/letters in your shader programming anyway? just textures loaded from the game? not Bezier Curves?
Loading custom fonts would be huge
the game already loads custom fonts, just nobody really does it
woah, really. I gotta look into it. The "This is how you died" font is cool but I heard its a texture. I use TeX Gyre Termes in artwork which seems to come close-ish.
since revolvers don't have a mags, would it be wise to spawn ammo boxes if more loose bullets are to be spawn on the corpse? Currently with 60 bullets spawning on the corpse i notice some delay before container is available, i guess since each bullet is a separate object, it calls AddItem 60 times, even though i use method AddItems(item, number)
dont ask me why so much ammo on the corpse, im just testing :/
that shouldn't cause delay, it's not asynchronous
if you're testing in multiplayer delay is expected no matter what you do though
ok. so here's my code, for pistols it adds ammo to mags, for revolvers it has to spawn loose ammo.
chatgpt doesnt find issues
but obviously it has limited understanding of PZ code structure and affect on performance
hmmm now it works faster, weird...restarted the game
I rewrote that subsystem to have access to the full process of rendering text.
There's quite a bit I wrote to get here lol
PZ doesn't expose LWJGL's vector math library entirely so I had to bring that into Lua too.
It's less interop to calculate all on one side so I'm happy with that.
Also the control over stuff with metafunctions is stupid fun.
is there a way to make PZ AA shader less crap?
shaderz mod i know, but it sharpen too much, and if there is no sharpen then the smear return
and edges
I've seen a lot of static shader mods on the workshop that does that.
I'm doing dynamic shader stuff with setting values in the shader when rendering.
i tried chatgpt/deepseek for AA implementation and theres no improvement over vanilla, but its singlepass
PZ's render pass stuff is incredibly simple / rigid.
I had to grab the last FBO frame as a texture and set that to render frosted glass effects.
also B42 was supposedly bring performance improvements, i haven't noticed it heh
and i dont have super cpu, so it should work with their offloading to gpu improvements
There are, it's just so under-the-hood and redesigned on the chunk rendering level.
That's where the bulk of those optimizations are between 41 and 42.
Can I ask you something about mods?
Don't ask about asking buddy. Just ask 
Ok. I want to play mods with my friends. I am opening a server but it is still defined. What can I do? The number of open mods is around 312. And even though we waited for 2 hours, it got stuck on the identifying screen.
Ok. few things:
- Thats a lot of mods but not a rediculous number yet I guess π
- I have seen such question and issues before, not on #mod_development , more in #mod_support I guess. Search? I have no experience with zomboid MP personally so cannot advise. If I were you I would seek out people here who had similar issues and see how they solved it.
Is there anyone who can help me with creating a mod?
I have basic modding experience, made my first mod quite a bit ago changing climate coloring.
Ok thank you for informing me
Not your whole mod I guess
but people here tend to answer specific questions or look at specific problems. You are not new to zomboid modding from the sound of it so sending you generic resources wouldn't help you probably?
Not really lol, Just a few generic questions I could not find an answer on
Relating to the zombie spawns/heat map
Well ask and see who knows an answer.
Good point
big brain, small worm. And thats what she said.
Anyways, I want to know if there is a way I can change the vanilla zomboid spawns and heat map, I'd like to create my own mod involving revamped zomboid spawns. Also any tips regarding how to add backpacks to zomboids would be fantastic.
If it helps, I am fluent in Lua, and amatuer with Javascript.
somebody have a good modpack for latest version?
Does anyone know if this https://pzwiki.net/wiki/OnTickEvenPaused is the same as every frame or faster?
it's the same
ask in #pz_b42_chat best I think.
thanks
I'll look into it. My end goal is for the NASCARs to only spawn on Irvington speedway itself on pit road or in the garages if possible.
Re backpacks: No experience with that myself but I have a suspicioun that https://pzwiki.net/wiki/Outfit may be involved somehow. Search Discord I think your kind of question came often before.
Alright this will most likely help, thank you
The new event added in B42 with OnZombieCreate is a bummer, it doesn't seem to have zombie inventory initialized, or at least on zombie death that inventory is not carried over.
Zombie inventory is just straight up not a thing until they die
Why do you need their inventory ?
i wanted to spawn holster on them to show it as a model, and neither setwornitem and setattacheditem work
visible gun spawning work though...
wasn't i talking to you about this the other day? zombie inventories aren't real until they die
yes and its a pity, and other methods seem to not work
Use zombie visuals
it's not that the event is bugged (there are a few criticisms of it though), it just doesn't make sense to put things in zombie inventories
zombie visual?
OnZombieDead is the exception, the game temporarily puts things in their inventory during the dying animation and then transfers that to the corpse
The main issue is that OnZombieCreate doesn't properly allow you to setup visuals directly
ahh i don't want to use outfit, but i will have to then, create just some dummy outfit with just holster and then set that outfit?
You need to wait for the zombie model to be loaded in for the first time
Read that page
That's an issue I had to take care of, figured I should write an event for it but never got to it
i will use this then: You can access the current outfit of a zombie with zombie:getOutfitName() and set it with zombie:dressInNamedOutfit("<outfit_name>").
Didn't you want to simply add a holster to every zombies ?
yes holster and then gun in that holster
Setting the outfit means you will limit the zombie clothing loot to a singular outfit
ehhh fugg
Thus locking:
- a lot of clothing types
- possibly backpacks too
cant i just overlay that outfit on otehr outfits?
That's human visuals
or merge?
Read the page, I mention it
ItemVisuals
But like I said, there's currently an issue where you can't exactly do it OnZombieCreate and instead you need to catch the zombie getting loaded in, then detect whenever its outfit gets set. That's something I had done in Zomboid Forge
I guess I need to write that event
Yea that's why I think I need to get to writing that custom event for it because a lot of people end up in your case where that's the solution but bcs of that simple issue, it's not that simple
i just wanted a gun mod, where zombies spawn with a gun in holster, they spawn nicely with gun attached to back with onzombiecreate
Actually I'm not sure you can do that on zombies
the outfit system is terrible for attached weapons, because it will also spawn all the melee crap when chance is upped
@potent loom can you attach a gun to the back of a zombie ?
Or in a holster
Oh wait you can right no ?
Hmm
either of
Interesting
sorry not this lol
its attaching shotgun on the back, item = instanceItem(base.shotgun) then setAttachedItem("Rifle on Back", base.shotgun")
onzombiecreate works with this
you can get a sea of zombies with shotguns on the back already rendering when you see them
with a script, but holsters are clothing items and need setWornItem which seems to not work
Most likely because they don't have an inventory if I had to guess OR because of the same issue you can't set ItemVisuals OnZombieCreate
i will try messing with visuals thank
does anyone know how to alter/find the zomboid spawning heat map, and then package it up for a mod? cannot seem to figure this out
albeit simple
Isn't it a png file ?
unsure, cannot find it
Uh check something like media/maps ?
solid idea, and do you know if the heat map actually controls spawning? someone said prior that it does not
as for slayer, bandits mod seems to use premade outfits, the bandit creator mod too, so it doesn't use lua scripting to directly assign clothing stuff, it also doesn't use onzombiecreate event.
i already scoured it for ideas heh
you know that feeling of butthurt when theres small detail you cant do, im in that state
I'm literally the extreme-end of this.
What? I can't do something? I'll code it in.
next level is learning to mess with java directly like nepthene mods, something is holding you back, just replace it directly, no limitations. But i dont like mods that replace java classes because i cant keep track of them in mod manager[thankfully only a few of thjem so far], i wish someone remade the mod manager and added the tab with exclamation[needs manual install] or filter.
I was there in like 2015 with this game lol
Don't use Bandits as a reference on how do you what you want to do here
Bcs Bandits use a lot of completely different aspects
It manually spawns the NPCs
And thus NPCs in Bandits don't follow the same rules
yeah, the npcs are zombies thnough as i understand
Yes
But they don't follow the same rules as your normal zombies because the mod adds a lot of layers to it
So while it's a good reference technically on what you can do, in your case, it won't teach you much
And I bet Bandits uses ItemVisuals to set the clothings, bcs outfits are not defined in the game xml file for outfits
With the new Bandits Creator mod
could be
i didnt found onzombiecreate so it evade the issue
theres onzombieupdate, but i dont know what trigger it
zombie movement?
every tick while the zombie is alive (more or less, some situations temporarily disable it)
True
Might need to improve it
Every tick for zombies that are visible, every two ticks for zombies that are not visible
Same way as OnPlayerUpdate tho that one doesn't have that two tick rule I think
well a player is never not visible
Other players
Thank you
would be a cool idea if week one, ie. pre pandemic time evolving into the last of us infected mod.
If they did it would be an nightmare when multiple players get together.
1 player, 1 playerUpdate event per tick
2 players, 4 playerUpdate events per tick
5 players, 25 playerUpdate events per tick
yeah this stuff doesn't work unfortunately :/ ```local function loopdroptest(zombie)
local itemVisuals = zombie:getItemVisuals()
for i = 0, itemVisuals:size() - 1 do
local itemVisual = itemVisuals:get(i)
itemVisual:setItemType("Base.Jacket_WhiteTINT")
itemVisual:setClothingItemName("Jacket_WhiteTINT")
zombie:resetModel()
end
end
Events.OnZombieCreate.Add(loopdroptest) ```
i know the resetmodel can be outside it was there originally, i added it to be sure
Not if you only do it for players that are in the player cell then that's mostly fine
Yea like I said, you can't do it OnZombieCreate, you need to catch the zombie loading its outfit, which I've successfully done but it's an annoying process
how do i use your framework to do it?
i see this ZomboidForge.InitializeZombiesVisuals
I haven't made the custom event yet sadly
ZomboidForge should not be used for what you are trying to do
It's to make custom zombies
Figure it out, or wait for me to make it a custom event in my API π
Gl with that
ok. i will wait then π
i hope i wont forget about this lol
going to bookmark zomboid forge
It won't be in Zomboid Forge
well at leat it's reassuring this is possible using some code wizardry
hmmm but then why would this code not work onzombiedead too? after the zombies die they dont wear visually white jacket, and i checked with console and they indeed have these itemvisuals
maybe they have assigned generic outfit and it somehow as you said override it no matter what? so whats the point of item visual then
Reload the model only once perhaps
No
That's not it
You can modify those
local itemVisuals = zombie:getItemVisuals()
for i = 0, itemVisuals:size() - 1 do
local itemVisual = itemVisuals:get(i)
itemVisual:setItemType("Base.Jacket_WhiteTINT")
itemVisual:setClothingItemName("Jacket_WhiteTINT")
end
for i = 0, itemVisuals:size() - 1 do
local itemVisual = itemVisuals:get(i)
itemVisual:getItemType()
itemVisual:getClothingItemName()
print(itemVisual:getItemType())
print(itemVisual:getClothingItemName())
end
zombie:resetModel()
end
Events.OnZombieDead.Add(loopdroptest) ``` this should work
What the zombie visually wears is dependent on ItemVisuals
And it does modify the spawned loot
With this code your setting every clothing to that white jacket
Let me check if you're doing it properly
I never tried to do it OnZombieDead
You shouldn't do it there
If you just want to add the shirt to the loot, just add it to the zombie inventory OnZombieDead instead
For visuals, idk, it might react weirdly because at this point you're in a transition state for the zombie from IsoZombie to IsoDeadBody
And so the visual change might just not move over to the corpse
Or it's too late for the loot to generate with the modified clothings
i just tried to check if it this itemvisual works
It does
so why it doesnt here? too much items replaced?
Unless they broke something somehow in the past B42 updates
Read what I just wrote
should i just update tshirt?
For OnZombieDead
As for OnZombieCreate I already explained to you why
Try to put it in OnZombieUpdate
so if it doesnt work onzombiecreate, doesn't work onzombiedead, then it works onzombieupdate?

Let me explained to you one last time why these two don't work (or why I think it doesn't work for OnZombieDead):
OnZombieCreate:
- it's too early in the zombie loading, the zombie clothing is set the first time the player sees the zombies or so, so you need to cash the clothing being set by the game LATER AFTER OnZombieCreate. Which there's a method for, but it's annoying to do and if every mods ran that code it could have a performance impact on the game (thus the reason why I want to make it a custom event in my API for modders)
OnZombieDead:
- either it's too late to set visuals
- or the transition aspect of the zombie state at this moment makes it that setting visuals won't be taken into account
- if you just want the item to spawn in the inventory at this point, no need to set visuals, just add the item to the zombie inventory OnZombieDead
OnZombieUpdate, if your code is well written, it will work because you run the code basically all the time at a point where zombies should be loaded, or at least some zombies will be loaded (just spawn one in front of you)
yes, i understand there are elaborate reasons, but for my crude monke tests and brain it doesn't work with simple unit tests. Maybe there are some ways for it to work, but for my needs and skill level it doesn't work. And there's no documentation on what conditions needs to be fulfiled for these to work, like wait 10 ticks, or wait for sth else to load, and preferably how to do it. I appreciate they give us these new events, but some things that theoretically are implemented according to documentation are most likely gated behind some specific coding sequence/code for it to work. I dont have endurance for that and testing.
There's no conditions, just run the code OnZombieUpdate
You want the real answer ?
The real answer is that zombies are DOGSHIT
I'm not even joking, Bandits existing and how well it works is a fucking miracle seriously, I'm baffled by it. The amount of dogshit you have to deal with when you mod zombies is just insane
It should be possible to call getItemVisuals() on an IsoDeadBody, change the clothing, then do something to force the atlas texture to update. Adding a clothing item and then calling CheckClothing(item) to remove it would do the trick.
Assuming you wanted to change the outfit and corresponding visuals of a corpse.
Yea
Tho that doesn't seem to be his goal here
I agree with this, Bandits may be limited and Janky but it's also an amazing bit of work.
Bandits is a masterpiece lol
Does IsoZombie:dressInClothingItem(string itemGUID) work?
Keep in mind that a java mod is a commitment to update the mod potentially every patch, and that two mods can't replace the same .class file.
oh bugger I told someone I'd look at their work on a zomboid java mod loader and them stuff happened and had a horrible time due to my jaw locking up for two weeks and I was all tired and distracted and forgot.
I need to find where I wrote down where to get it from and test it.
Back to what I was saying... if you do want to make a java mod the Brighter Headlights 2 mod includes a modified .java file and the (really ugly) build script I use, with ZomboidDecompiler used to make the dependencies folder (and base ,java file)
Yea
I think it does
Also itemGUID ...?
I remember it taking the outfit name ...
There are a bunch of similar functions.
Forgot to say, i managed to get results, but only for static objects, but i want the raycast to detect the vehicle, i also dont really get how you figured out what to put in propertyToSegments table
Also, this might have changed since you last looked at it
propertyToSegments is kind of special, it's basically relative coordinates to the square coordinates of the various elements on a tile type. So it was a bunch of testing and some debugging by drawing the segments on screen (what you can see in the video I had shared)
As for vehicles, currently my script doesn't take them into account, but they could be added with what I shared the other day regarding vehicles dimensions
is adding a vehicle possible to the table
Seems a waste to use GUIDs for performnce and then pass them as strings instead of making a basic object that holds a 128bit number.
Oh i see
Might need some tweaking on how it retrieves some informations so vehicles can be added in
But the same kind of system could be used, alongside the vehicle angle, to define segments for it too
That way it's easy to adapt to the raycasting method which uses segments
Hmmm
I'll go sleep soon, but I can look at it tomorrow if you want, got a whole free day
That way I can also look at that custom event I was mentioned in that other conversation a bit earlier here to add to the API
Currently just trying to think of an alternative... casting the ray from the vehicle to the object
I cant figure out if itll be more accurate or not
But basically propertyToSegments is the table that mods need to define to know what element intersect with the ray
I see
That's not what you're doing ?
What are you doing exactly ?
Well what am currently doing is casting the ray from the object to the vehicle
The other way around
So you're casting rays from every single objects ?
Why do you not cast rays from the vehicle in the direction the vehicle is going ?
And shoot some from the whole width of the vehicle ?
Like retrieve the front segment of the vehicle and shoot N rays spread across this width ?
Only from objects that are close enough to the car while the vehicle is moving
That sounds so much more costly than just shooting rays from the vehicle
Honestly idk about the performance that much but wouldn't i need to cast like at least 50 rays to properly cover a direction
No
Vehicle goes in a straight line
You can cast in front of the vehicle a small line of beams that go N distance forward
And adapt the distance to the deltaX of the vehicle
Like if you check every ticks, then adapt the distance to predict if next check is hitting the object, so you give a long enough distance
I don't even see how you would casting from the object to the vehicle, like what are you trying to collide with here ?
with the vehicle
It's the vehicle that collides
Not the tiles
So you need to check if the vehicle is going to collide
Its hard to explain
So you ray cast from the vehicle in the direction it's going and say "ok if that hits an object, then it will collide"
Nothing hard to explain, I don't see how else you would do it lol
Hello. I am having a hard time implementing my own radial menu entry for firearms. Is there a basis that I can look into?
I'm not aware of any doc on the subject nor do I know an example of it
I'm looking at some mods like VFE but for the life of me, I can't make it work.
Am not the best at explaining but i was basically planning to cast the ray from the object to the opposite direction of the vehicle velocity
i dont know about casting the ray from the vehicle to object since am concerned about the performance impact if i replaced the whole collision detection with just raycasts, and if it casts the rays from the vehicle to the object after selecting the grids, how will i go about predicting if itll collide or not.
Distance
vehicle also selects grids at its sides so player can stick very close to the wall and damage them
Like I said, just raycast from the vehicle's front like a total of 1 beam / length (so if width is 3 then cast 3 beams). Adjust the distance so that it corresponds to the distance the vehicle will travel until the next raycasting, that way you check between its current position and the next one if there's an object. You can also take into account hte vehicle speed etc
You don't need to do it every ticks, bcs the vehicle will never have drastic speed change in a few ticks, it'll at least spread to 10 ticks I'd say
Take into account that in my own mod I did a raycast of a distance up to 25 tiles or so and never got any performance impact by doing one raycast every ticks
I did get drastic performance impact but thats probably cause i was doing something wrong
If you raycast for every tiles around the player, I see how that can get costly
You don't need millions of raycasts
ideally, you might want to cast in the direction of "impulse" also to detect collisions if you're not exactly going straight
but this is all above my soberness atm
if you get the slip and slides
I figured having a ray on the extremities should be enough
What's that ?
Well the mod rn basically selects the tiles from the direction of the vehicle so if u were going straight and ur vehicle covered 3 blocks it would only select the 3 blocks infront of you
probably 95% of them would be covered I'm sure.
slip and slides, if you turn too fast and are sliding sideways, or all the way backwards maybe
maybe just the way I drive too
π
If you take your vehicle direction vector that should be enough
You can even take into account what segment of the vehicle is in the direction
You could map the sides of the vehicle hitbox, to properly shoot rays according to this
slightly heartbreaking gonna have to completely remove the current grid square selection code to be completely replaced by raycasts but dis for the greater good
wait .... Say if you were going to hit a wall placed to the north and you were driving south
Could the raycast miss the wall
raycast is the way to go with a vehicle
As long as you raycast in the direction the vehicle is going
lots of neat stuff in BaseVehicle but , it kind of stinks that there's no "isVehicleIntersecting" for an object, only squares
No shit, that's why vehicle collision is annoying 
Heya. I'm having issues with my first mod, which is a submod for the furry mod 'Anthro Survivors' (I'll call it AS to simplify). How AS works is that the 'fur' is categorized as a single piece of clothing, almost like the hazmat suit in vanilla PZ. My mod adds in a new variant texture of the fur, though the issue I'm having is that the texture isn't showing up at all on the character; it is completely invisible. I disabled all mods other than AS and mine, and the issue persists. I've tinkered with my mod some to try and fix it, but I haven't seen any better results. And since I have no experience other than this when it comes to modding, I don't know how else to fix it. I can provide the mod link and pictures if needed, and any help is appreciated.
How hot should a desert be?
Thinking of setting the temp to 60C or should I go hotter
"but it's a dry heat"
6 summer months in the desert of New Mexico and 90 F was typical, 105 F was an ok day. 115 F was hot
speaking of which, I still have to disable the ablity to let players drink the "sanddunes"
if it's 60C, they'll be drinking those sand dunes
Lmao, ya
we didn't even turn the swamp cooler on until it was around 90 F / 32C
anyway, 140 F is good
if you see either 60 C or 140 F, you're going to get that it's really hot
Ask in #modeling you might get more visibility
Ah alright, thank ya
Currently, I'm checking for any and all "saw log recipes" and returning after finding one, but curious if there is a better/less heavy way of doing this:
-- assume obj is a log object
local function getSawLogRecipes(obj, playerObj)
local containers = ISInventoryPaneContextMenu.getContainers(playerObj)
local item = obj:getItem()
if instanceof(item, "InventoryItem") then
local recipes = CraftRecipeManager.getUniqueRecipeItems(item, playerObj, containers)
if clickedFlags.logs and hasWoodSaw and not recipes then
clickedFlags.tooDarkToSaw = true
end
if recipes then
for j = 0, recipes:size() - 1 do
local recipe = recipes:get(j)
for k = 0, recipe:getOutputs():size() - 1 do
local outputItem = recipe:getOutputs():get(k):getOutputMapper()
for m = 0, outputItem:getResultItems():size() - 1 do
if outputItem:getResultItems():get(m):getName() == "Plank" then
print("Planks are delicious!")
return recipe
end
end
end
end
end
end
return false
end
i just copied bandit solution and it works finally: ```local function loopdroptest(zombie)
if zombie:getVariableBoolean("HolsterPresent") then return end
local itemVisuals = zombie:getItemVisuals()
local itemVisual = ItemVisual.new()
itemVisual:setItemType("Base.HolsterSimple")
itemVisual:setClothingItemName("Base.HolsterSimple")
itemVisuals:add(itemVisual)
zombie:resetModel() -- force visual update
zombie:setVariable("HolsterPresent", true)
end
Events.OnZombieUpdate.Add(loopdroptest) ```
slayer is goat
I didn't get the weird shape quite right but I did make a hot pink variation.
You shouldn't do that if the zombie already has a holder
You're just going to add item visuals for nothing, also I'm unsure if the game clears duplicates in item visuals
Wait no nvm !
It checks for the variable
No that's good yea
Yeah i will add checks, but zombies dont spawn with itemvisual holster from my test, even the police one, its added then as outfit in inventory.
I will still implement check and see, im not at pc right now.
Yes it spawned but what I meant is that you could have a silent problem bloating saves, but it does the check for the variable so it's all good
There's already a check
That's not needed
Q: can we change visual of bullets being fired?
Worst case you possibly have two holster entries but like I said I'm not sure if the game clears duplicates
Empty texture? For bullets
Uh ?
Unless they are purely shader thing
I'll add that snipet to the wiki for the time being
Pretty sure they are 100% java
HolsterPresent is a made up name!! Not actual ingame check.
Got it. ;_; thank you.
I'm aware
It's an animation variable, Bandits uses them a lot to know what things were set on zombies
Wait, but you can get the issue I mentioned still
This won't stop the problem of a zombie loading and not having its outfit set yet
Unless it resets variables too when setting the outfit ? But I'd be surprised
Its still unoptimal from perf standpoint, i wish zombiecreate worked. Do once and be done, now it checks every zombie for variable. If there are like 200 of them in the render square its a lot.
It's really lightweight, that's really fine tbf
200 zombies triggering a single if check and function call is nothing
I'll do that event thing tho
Event thing?
Oh, ok. It would be nice to see perf profiler if its better than this flag setting.
How do i test perf?
If the bullet effects can be tweaked it will likely be here: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/iso/objects/IsoBulletTracerEffects.html
declaration: package: zombie.iso.objects, class: IsoBulletTracerEffects
I have other function and its getting heavy.
I'm gonna look into it.. thank you o7
See also: isoBulletTracerEffectsConfigOptions, which is a subclass of in IsoBulletTracerEffect and seems has a lot of stuff like size and color... but the actual rendering is a line, not a texture.
I wonder if they fixed "game crashes if shotgun fires more than 9 projectiles" yet.
Nope.
Will definitely check those one out. o7
Good luck!
mhh in debug mod console if you declare a variable var = getSomeObjc - how do you inspect the variable with ingame debugging?
I tend to dump the getmetatable(var) of most of the stuff and then read from console.txt but its kinda cumbersome.
you probably can't
you *could* put in a file:
function DEBUG_INSPECT(object)
breakpoint()
end
But you folks don't do that because you trust documentation π , the decompiled java code you have lying around or because you just know? π
i just don't spend enough time in the console for it to have come up
Hi guys, I have a question about vehicle zone distributions. In vanilla script there are two options, normal and specific. If I want to add to my moded vehicles specific distribution zone, (clothing, doctors, golf etc) how could I do it?
Or game simply randoms a chance to spawn a car with random distribution table? Like if I have set to my vehicle distribution table βmodern carβ it could spawn both with vehicle distributions normal and specific?
Would you know how? I am researching but so far found no references. Java-side modding only?
Loading a Java Font object into TextManager somehow?
i don't actually know, i heard about it from jab ages ago
Yeah, this here
Not a high prio-item, but a nice-to-have.
what exactly did you do? clothing mods uses lots of files
what files have you done for the mod?
how exsctly did you add the texture
and what made you think its not working?
I had to kinda reverse engineer another mod that works the exact same way in order to make it, as its essentially the same outline but different skins/textures for different people. It's set up in the B42 mod structure, and the files I've done I'll show via pics. Other than that im quite clueless but I can send the mod link if that'll help. It's not working due to some issue with the texture, as the clothing is see-through and invisible. I'll try to get someone more knowledgeable on this mod to help tho, but if you know what could be causin this, it'd be a big help
Why do you have a mod.info file inside the media folder ?
If I had to guess, you made a mistake in the item script
Or model script
And the texture isn't setup right at all
Ah okay, I'll check there then
Honestly, just beginner stupidity lol
Happens
Okay am I crazy or could I make a throwable spear by making it a gun, giving it a short range, and then just animating the prop bone to make it go forward? Could use OnHitZombie to detect if a zombie is hit by the spear, and if it is, just interrupt the animation and spawn a spear attached to the zombie?
Would have to block the changing of direction while spear is in the air as to not make it rotate with the player, but if it has short enough range and is thrown fast enough it could work to just have the animation kinda lock you for a second without feeling disruptive
and if shoving with the spear you stab
damn
might have to give it a shot
zombie.core.font.AngelCodeFont
Select all characters in the GUI before exporting.
It's basically a pre-parsed and preloaded TTF rendered font as a bmp / image.
Pre-baked.
So you load it into an object and then call that object to render.
I rewrote this in Lua for my UI system.
