#mod_development
1 messages ยท Page 472 of 1
@thin hornetmods with the title IWBUMS that's for 41+ right?
@solemn tide yes latest, which mean 41.52 right now
Greeaat T-T
so many good mods but non of them work for certain on B40
another question. Mods that don't have any tag except mod, those should Hypothetically work between the different ones right?
dont rely on the tag, not everyone set them
Absolutely not.
It's a pain in the butt involving a third party solution to use tags, and most people don't use them.
If it was made in the past 1-2 years, assume it's for 41 unless it says otherwise.
If it hasn't been updated in the past 1-2 years, it might be for 40.
Honestly, unless it says otherwise on the page, just assume it won't work straight up for build 40 unless you test and confirm that it works for build 40.
Ain't nobody making playstation 2 games nowadays, so to speak. (I'm sure some hobbyist somewhere is, but I'm being poetic here)
xD i like the analogy
Good grief such a hassle, well it's worth it in the end, thank you to the both of you,
honestly same it's a good little chuck
you welcome man and good luck with this
thank you, I'm gonna need it
Ahh capsidddd D:
@willow estuaryjust to clairify, if something was made before say 2020/2019 or during that time it should (SHOULD) maybe work for B40?
Yeah usually I'd guess, but there's also mods on the workshop that were made for build negative twelve in 2000 BC?
I mean, there's a fair amount of mods on the workshop that don't work properly for any build to be honest as well.
Just don't jam mods into your game like it's Katamari Damacy.
T-T it's like Building a car with nothing more than Caveman Tools
I hope the B41 Mulitplayer releases soon enough
some seriously great mods out ther
okaaaay.. but.. I mean
If people must shitpost and the like, the workshop channels are not the place for it FYI.
another question, if I may What about B40 mods would they work for B41?
certain ones do
many dont.
trial and error if its not in the comments or description.
Comments should be taken with a grain of salt to be honest, and lot of people in them have a cargo cult-esque grasp of the technicalities involved when they make their evaluations.
also maybe a grain of pepper if you will
Shitposting, Memeing, Heated Disagreements, Drama, and flooding the channel with Gifs have no place in this channel; if you must, take it elsewhere ya zany goofballs.
Be lovely and let's keep the focus on modding in a reasonably well behaved manner.
๐คช ๐
Still trying to figure the perks.txt
somehow it require a value VERSION
but not sure how to format this and where
tried something like this
media/perks.txt
{
VERSION = 1
perk Skating
{
parent = None,
translation = Skating,
passive = true,
xp1 = 100,
xp2 = 200,
xp3 = 300,
xp4 = 400,
xp5 = 500,
xp6 = 600,
xp7 = 700,
xp8 = 800,
xp9 = 900,
xp10 = 1000,
}
}
tried:
perk Skating
{
VERSION = 1
parent = None,
translation = Skating,
passive = true,
xp1 = 100,
xp2 = 200,
xp3 = 300,
xp4 = 400,
xp5 = 500,
xp6 = 600,
xp7 = 700,
xp8 = 800,
xp9 = 900,
xp10 = 1000,
}
trying to follow the Block/Value scheme
its first parsing the string into Blocks
then it search for a VERSION value in the first block
then it iterate the main block childrens
Anybody know why the 41.51 patch broke NPC mods? They can't damage zombies now.
Been trying to debug it and I don't see it's anything the mod is specifically doing. I'm wondering if a deeper change in how multiplayer is handled broke them.
taking a guess, but I assume it uses the loot system for weapon spawning or something?
that might have broken
Nah, Serious S doen't have any distro table stuff in it, the multiplayer code would be my guess as well?
The code for arming NPCs wouldn't be affected by that.
Yeah, the npcs still function fine, even the weapon swing events fire.
But the zombies take no damage, and in fact don't stagger or react to being hit in any way.
Interestingly there is sometimes blood splatter though.
I've heard split screen play is also broken, because of the way the zombies are handled on the client now and there's only one client.
Good news!!!.. I got a pretty decent solid B40 pack going
Wondering if something is similar here. Since the NPC is actually an IsoPlayer object, maybe they need their own copy of the zombie locations in their "client" somehow?
Huh, I mean we're fumbling in the dark here, but that sounds like a solid guess?
If anything, given what a headache the Survivor mods have proven to be for everybody involved, maybe this is the opportunity to finally rip the bandage off.
I'm inclined to agree, just pretty sad about it.
Spent probably a hundred or more hours over the past month finally getting SS playable again.
Yeah, I mean I put a lot of work into my own mod that used it, but at the end of the day it was just too much of a fucking headache and people get too intense and weird about NPC mods in general IMO?
I'll just save my ridiculous ideas for when NPCs are in Vanilla and spare myself the hassle.
The amount of times that someone got upset and confused that they couldn't muder NPCs when in god mod, good lord ๐
PZ players are an interesting sort, haha.
@willow estuary
Oh missed that, yeah, usernames/Zomboid/console.txt
lol you're a very wordy person xD I love it, but thank you non the less xD
But man, I would just not waste my time on build 40 stuff to be frank? I just play DayZ or something myself when I get the MP itch.
That's just my terrible hot take, but it just seems like a bunch of frustration and the such for a substandard iteration of the game?
better play an existing server when playing b40
I get that, but DayZ just isn't for me, waaay to many Toxic folks
and yeah that's an idea!
Existing server are already working well
I got some stuff working just gotta push through it ya know
arhg that perks.txt thing is getting on my nerve xD
Yeah, play on the Good Ole DayZ to get used to MP, it's an excellent MP kiddie pool so to speak.
currently, I open the game... can't craft anything and can't access the pause menu
I broke something but I don't know what it is
will need a pz dev to explain cause it seems that we wont figure it out D:
should be something like that from my understanding of the source code....
media/perks.txt
{
VERSION = 1
perk MyNewPerk
{
parent = None,
translation = MyNewPerk,
passive = true,
xp1 = 100,
xp2 = 200,
xp3 = 300,
xp4 = 400,
xp5 = 500,
xp6 = 600,
xp7 = 700,
xp8 = 800,
xp9 = 900,
xp10 = 1000,
}
}
I'm gonna be straight up here, aside from the whole build issues, a lot of mods on the workshop are just janky as fuck. I mean, the majority of them are made by someone with a rudimentary grasp of the technicalities involved, no fault of their own, they had an idea and went for it? And it seems to get a lot worse going back.
A lot of super popular mods are just straight up broken as fuck, but people just keep using them anyways?
Less is more, you don't need 21983463298 mods in a game, and frankly you'll learn all sorts of zany things that aren't relevant to the way vanilla PZ works.
And the more mods you use, the chance of there being some corner case mod conflict that breaks shit, even if the mods work properly by themselves, increases exponentially?
yup
I see a lot of mod packs on the workshop that have multiple mods that straight up will cancel each other out.
Trunk space mods are know to despawn vehicle contents on a regular basis, but people keep insisting on making + using them so ๐คท
My mod LiquidOverhaul does override existing game function cause thats the only way to do it. So it's like sure gonna break with anything trying to do the same
i dont really understand the trunk space mods to begin with
the trunks i usually find in cars have enough space and you can upgrade them with mechanics anyway
People use every gun mod on the workshop at the same time and then get confused when Barry's Weapons MP5 submachinesguns don't accept the MP5 magazine from Shlobby's Shooting Time.
xD
reminds me of how almost every popular minecraft mod used to add their own version of copper
i quit for perks.txt, when anyone get the answer ill be more than happy if you can share the solution ๐
@near copper just ask if someone can he\she will answer
@thin hornet can i ask you a question?
@near copper yes
i forgor 
xD
I want to do this to rj so bad
Why is this so funny to me
Im giggling like a little bitch lmfao
Shitposting, Memeing, Heated Disagreements, Drama, and flooding the channel with Gifs have no place in this channel
Just don't. Not here.
Alright alright
Alright here the source for the new perks.txt feature:
https://pastebin.com/GkQbeLbj CustomPerks.class
https://pastebin.com/UH6iVNcb ScriptParser.java
If anyone find how to properly write the .txt file I give you 10 canned food of your choices.
nice
I'll throw in another 10 as well. Interested to understand what sounds like a neat new feature. Especially for things like modded literature
more interesting in actually taking apart magazines
my plan is to check that tomorrow, as I need to plan a phasing out for my extra skills system
Well this dummy janitor has his box of pins ready whenever one of you smart feller's solves the mystery.
are you just going to private/delete the old one?
or total renovation
for now I'll need to keep it there and working for those still playing 41.50 saves
or anyone who got modded skills really. And make it not give my system skills anymore for new saves
I'm not a fan of nuking people's saves
Well iwbums does nuke save everytime it updates. It suck to manage backward compatibility when mod is more complexe.
Would be nice if the Workshop did have a versioning system.
if perks.txt foes through the ScriptParser then it must be built like the other txt files, for items, vehicles, models and so on
My terrible take on this situation is this is all a sand castle until build 1.0 is stable?
It's one of the reasons I don't use the version tags myself.
it seems to be but i think the only thing that is confusing is the main block requiring a value VERSION equal to 1
no matter how i try it nothing works always get the missing VERSION error that is into the CustomPerks class
i dont even know how to use the tags
Yeah, never tried myself, but I think there's been some weird corner case issues involving it anyways?
But i mean when uploading our mods to the workshop it would be nice to have version for 41.50, 41.51, 41.52 this way it would just install the proper version of the workshop mod based on the subscriber game version. This way when i update the mod for a new game version it doeant overwritte those on 41.50
you could just include different mods for each version inside the workshop folder
You can have multiple mod directories and mod IDs in the same works.... ..yeah that.
thats what i did but still thats a little bit messy and save game has to be edited to select the old version
for exemple my latest is named
MyMod
and the older one is renamed to
MyMod4150
but save game is using MyMod still so if the person is not aware of the update he will not edit the save game.
true but they would probably end up checking the workshop page in that case
Yeah, trying to work around all this seems like a clusterfuck of endless headaches?
So this cowpoke doesn't have a rear view mirror in his hot rod.
I say rip the bandaid off and submit to the cruel wheels of progress?
But I don't get attached to SP saves, so I'm unsentimental about it myself.
Guess it stings when you're one of those megabase/1 year challenge/etc types and all.
Yeah but subscribers are players and most likely care about their save games. And will complain if we mod maintainer nukes their saves
haha
its a mess
If you can I would leave the original mod alone and name the new versions going forward
Yeah, I mean I spammed the workshop for 1.5 years and have over 100 mods, so, um, I can barely keep on top of one version? ๐
That could be a better way i agree chuck
yeah so updated clients has to start a new game anyway so they'll select mods again
i cant make too many mods i just made one yet and its quite something to maintain and upgrade.
At the end of the day it comes down to what you, the mod creator, have the time and energy for. ๐คท
Exactly. Don't let is run you ragged or anything?
This isn't pacemaker firmware or anything.
In the sense that when game updates ill have to update multiple mods
uhhhh I couldn't find error messages or any related message to be honest. Hard to figure out what I'd need to "fix"
about perks.txt?
yeah
check the console.txt
exactly, nothing relevant there
no exception?
ohhh it's probably case sensitive and I had it named Perks.txt
still nothing
yeah
did u try restart the game
yeah, doing it one more time now
you are on 41.52 too i guess
yeah, could you share what you've tried so far?
search perks.txt in this channel i pasted many exemple
didnt paste all exemple i tried
it should be a value in the main block
if im not mistaking
Blocks contains values and children blocks. and so on.
that value seems to be called VERSION in caps and must be equal to 1.
its specific to perks.txt only..
Anybody know what mod is causing this popup about the item? It keeps happening randomly and I can't figure out how to disable it
It shows things like shovels, guns, pens, but never items I can see
I guess it's an optional setting in the gunslinger thingy that brita's uses?
And I assume that you're using Superb Survivors and that the NPCs weapon info is being sent to that, because there's all sorts of corner case jank like that with it.
Yes I am using both
I'll do that then, thank you
well, no errors or messages. I'll take a look tomorrow
alright man
awwww fuck, the creator of the system just sent me an example
have fun! I'll check it tomorrow I can barely read anything right now
ill have a look haha
omy
thats all xD
Adding custom perks to media/perks.txt
VERSION = 1,
perk CustomPerk1
{
parent = None,
translation = CustomPerk1,
passive = false,
xp1 = 0,
xp2 = 0,
xp3 = 0,
xp4 = 0,
xp5 = 0,
xp6 = 0,
xp7 = 0,
xp8 = 0,
xp9 = 0,
xp10 = 0,
}
perk CustomPerk2
{
parent = CustomPerk1,
translation = CustomPerk2,
passive = false,
xp1 = 50,
xp2 = 100,
xp3 = 200,
xp4 = 500,
xp5 = 1000,
xp6 = 2000,
xp7 = 3000,
xp8 = 4000,
xp9 = 5000,
xp10 = 6000,
}
perk CustomPerk3
{
parent = Combat,
translation = CustomPerk3,
passive = false,
xp1 = 50,
xp2 = 100,
xp3 = 200,
xp4 = 500,
xp5 = 1000,
xp6 = 2000,
xp7 = 3000,
xp8 = 4000,
xp9 = 5000,
xp10 = 6000,
}
Translation File:
media/lua/shared/Translate/EN/IG_UI_EN.txt
IGUI_EN = {
IGUI_perks_CustomPerk1 = "Custom Perk #1",
IGUI_perks_CustomPerk2 = "Custom Perk #2",
IGUI_perks_CustomPerk3 = "Custom Perk #3",
}
LUA Client:
print( "CustomPerk1", Perks.CustomPerk1, 'parent', Perks.CustomPerk1:getParent() )
print( "CustomPerk1", Perks.CustomPerk2, 'parent', Perks.CustomPerk2:getParent() )
i was so close xD
Tested and seems to works, but it's not adding to the Skills UI
ill try adding some XP and see it that adds it
Do I need to unpin that post? ๐
How about I give you a day or so to work out the kinks, and then we can pin something?
check out perksInfo
Dont need to unpin thats the code from the creator of the system
Okay, I'm just gonna switch the pin to a post with the archive in it then.
An archive containing the example files for adding new Perks with build 41.51
An archive contains the example files for modded sandbox options with build 41.51
mhm interesting
@sour island after checking ISCharacterInfo.lua its should have loaded custom perks too. It say that custom perks are loaded before lua so they should already be in the array when it makes the UI.
but im guessing it might be because i made a passive skill
passive skills aren't listed iirc
there's two types of skills one is more of a category system
to have a passive perk to show up you must set the parent to parent = Passiv,
this way it will show up
ye
parent is a perk too yeah
but its a category perk
Crafting, Survivalist, Firearm, Combat, Passiv, Agility
so in theory you could have a mechanic perk with things like tire, suspension under it which skill books could boost. then you link code to those skills to provide higher chance of repairing those parts of a car?
@ruby urchin Hey I am trying out your clothing model guide, and I am finding that the 3d-convert.com website that you linked and recommended is not working for any of the skinned .X models that I am putting into it. It keeps giving me an error that reads: "An error occurred during the conversion".
hitConsequences doesn't work anymore, which may be part of it.
You would have to stop default game behavior to override it with with your code i think
yeah, bad example....but you could have granular skills
You'd have to find the spots that add the xp and apply it to your skills instead in lua
but yeah you can do anything with the custom skills
---OnEveryTenMinutes
local function OnEveryTenMinutes()
---@type IsoPlayer
local playerObj = getPlayer()
playerObj:getXp():AddXP(Perks.Skateboarding, 1000)
end
---OnAddXP
---@param character IsoGameCharacter
---@param occupation
---@param amount number
local function OnAddXP(character, occupation, amount)
print( "Added XP to:", character:getFullName(), "occupation:", occupation, "amount:", tostring(amount) )
end
glad someone bugged them about it 
one thing i hope the new multiplayer will do is save character on the server side its unrealted to the skills subject but just though about it
I got save-able zombieAI working via attachedWeapons - shotout to @nimble spoke 
I would assume for this to be a given
well since they rewriting it i do too
b40 was a patched mp so i guess they had limitation
is this about the modData that was reseting?
yeah
zombies aren't saved like items or players - it's as barebones as it can be -- even changes done to the zombie sometimes aren't saved
so I can't spawn in a zombie and give it a new item
but I can define an outfit to always have an attachedWeapon and run a function in zombieUpdate and check for that item - and apply behavior
which is convoluted but it works pretty well
Spawning an isoSurvivor with survivor factory and making it wear a suit and sunglasses and carry a hammer spawns a shadow with an upright hammer on the ground so it has to be an isoPlayer NPC for now it seems :/
don't use isoSurvivor
There's the thing you can do what's called something like isZombifiedPlayer for the zombie
you're better off using isoPlayer and giving it extra variables under modData
Yes I was commenting on an earlier conversation saying maybe isoPlayer survivors might have been broken because of multiplayer code.
theres alot of functionality that written into isoPlayer than isoGameCharacter doesn't have unfortunately
nah isoSurvivors have been a bit of a dead end for a while
they were the original NPCs
hmm
Also about the zombie's clothes there's a thing for that that someone like planetagol was using.
terrorzeds?
that's one yes.
His special zombies wouldn't save from what I saw
Aww
unless they're outfits
It saves the zombie that's your player and its items somehow though.
Oh his code says zombie:setReanimatedPlayer(true)
He did something in onSave which I only see trigger right after you load though. :/
He does local setReanimatedPlayer = setReanimatedPlayer twice in the same file and doesn't use it D: ree
reanimatedplayer doesn't seem to be referenced anywhere in the java
besides itself
in setters and getters lol
yeah, I wouldn't be surprised with the new saving techniques if it broke those kinds of mods further
I'm using pzdoc on its own
another sneak preview
Aha how about this, you spawn an isoPlayer in the suit, then you get it infected and reanimated as a zombie?
for the AI? I'm using invisible attached items - like when there's a weapon sticking out of the zombie's cheat
Bah humbug
it can't be removed - so it works pretty solidly
Actually that could work if they were on custom bodylocations. Or the custom bodylocations may be unnecessary.
hang on maybe that wouldn't make sense umm
:|
I made a custom one lol
It pays to preemptively avoid compatibility issues
it's on github if you want to mess with it
Before the update for easier clothing modding I had started using things like this to attach a model to the player's attached weapon locations to make clothing show up which became redundant D:
Github whar?
Fortunately the zombieAI items don't have visual components
haven't gotten into clothing modding yet outside of textures
What's a zombieAI item?
the attached items I mentioned above
Oh you said invisible, I missed that word.
no worries lol
basically during the lua event ZombieUpdate I check their attached items
and compare their types to entries in a lua-class's functions
if there's a match it runs that function
Farewell
Regarding the Toxic fog mod, does the fog actually kill you in that mod without a gas mask? Or does it just leave you with a sliver of health no matter how long you're in it for? I know the original toxic rain mod did that and I was always bothered by it.
Don't know how much even a single mod affects the game crash-wise, but that'd be the only mod I'd plan to use for my PC until I upgrade.
Anyway to make zombies ignore player without making player invisible?
Yes, without a mask you are dead
zombie:setUseless(true) does the trick to be ignored by a specific zombie but they stop moving completely
Has anyone made a Toxic Snow mod? Or does the Toxic Rain mod also apply to snow?
is it possible to save custom values to items
hmm maybe i can use item type as drainable
and use usedDelta as a custom variable for my use
is it possible to do a recipe without result
ok found a way
can anyone explain how getModData() works
Every object in the java side of things is given a Lua table that can be called by using object:getModData() that's about it. You hould be aware many mods use this same table as you so you should name keyed variables something unique or nest your variables inside another table. Also recently found out zombies don't save their modData and anything on zombies does not either.
Also I believe it has to be a simple table, i.e. : only strings, numbers, booleans, and other simple tables (nested). If you live reference other objects I don't believe it will save that entry.
thanks
im trying to check a getmoddata inside a recipe onTest
is second argument is list of item or something?
first one is result item as far as understand
like recipe result
I'd have to check, some of the recipe step functions don't have the items then and there
I think ontest checks for them by type though? What is it returning?
oh wait
they are both object of item
but im not sure are they InventoryItem
or somethinge lse
i think its a Item class
not InventoryItem
I'd look into one of the other steps, there's alot
what do you mean
Recipe crafting includes a few steps to it, including time actions
You could probably find a step that's better suited and actually has the items in question
I assume you're trying to make sure an item can be crafted?
Based on a custom value?
i think there is none, cryogenic mod, winter is coming
can i make a menu that will open when right click on the item?
The receipt script allows you to run functions there - if you look for anything that has [ ] in the script - that's a function being called which returns what items can be used for the recipe on the tooltip. If that helps.
I would help more but I gotta go to work
ok you already helped me alot thanks
And yes you can had custom context menus but I've not done it personally
looks like im quite stupid
i checked games code by decompiler
should have did earlier tho
in OnTest first argument is InventoryItem second one is recipe result as Recipe class
Happens, some of the arguments flip depending on the step
this is probably a dumb question but is there documentation for project zomboid?
and if so where
i didnt see any documentation but you can use any java decompiler and games lua code or other mods lua code to understand how modding works
I don't see that being used anywhere in the code, do you know anything else that might be affected?
so best way to understand is look inside mods or game code
looks like i gotta do some investigation
yeah
i also haven't touched java too much so i guess ill find out
:p
idk, probably the page is broken, I'm trying create a executable in C++ with assimp (to not depend on third parties), but i'm busy with other things for now
๐
@trim tartan here some links for you
https://github.com/cocolabs/pz-modding-guide
https://projectzomboid.com/modding/
https://pzwiki.net/wiki/Modding:Lua_Event
thanks ๐
Anyone else having trouble with Java Decompiler not working after update?
I don't see a way to do that in JD
i cant help with that i use capsid on Intellij IDE, all i needed to do is to set my project to use jdk15
Bumer. I think you're probably right. The decompiler I use is named 'Java Decompiler', is open source and standalone... and hasn't been updated in 2 years. Java15 was released in 202
2020*
I guess I need to find a new decompiler program.
Is there a pz randomizer?
@swift sequoia i strongly suggest to get capsid setup, not easy if you do not know gradle but once you're setup its pretty much heaven. https://github.com/pzstorm/capsid
so how do i get my stupid survivors to use britas competently
as of now they just seem to infinitely reload unless i active infinite ammo cheats
Subpar Survivors has brita's compatibility, but it and Superb Survivors are broken right now in 41.51/52
Subpar works pretty well on 41.50, yeah.
Ok, as long as they dont inf reload like me whenever i reload then thats good
haha
thats another thing why are their reload functions always so glitchy lol
The infinite reloading bug fro m Superb is fixed, yeah.
cuz every single weapon mod ive ever had makes inf reload bug happen
even to my character and its super weird
Reloading in PZ is surprisingly complicated. You have hand-loaded weapons, mags, clips, guns that are chambered or not, multiple mags of different sizes, ammo loose or in boxes, multiple containers ammo could be in.
ye but like every single weapon mod has always had broken reload mechanics and its weird lol
i gotta like run or shove to stop reloading haha
does soul filchers turning time work in 41.50, and whats it add?
It adds new types of enemies and yes it works
Reload also breaks when In debug mode. Haven't looked into it as it's debug mode and all that. I think the issue is that multiple mods may be overwriting parts of the same set of functions.
I've heard of this mod, sounds pretty fun. I'd love to see a toxic variant of it to simulate nuclear winter. :V
You can be very careful with overwriting - by storing the original function and sliding it's return it into your own iteration of the function (then handing it off to any other iterations) but all it takes is one person to break that chain.
Only only his mod?
Brita's requires gunfighter as well, so that could be your problem.
i have a bunch of other mods that make items usable as weapons but nothing that is related to guns
i have gunfighter too
like you can use a random bucket as a weapon
cuz realism.
There could be something off about reloading in general. I noticed if you speed up time it can get reloading stuck?
But I'm usually on debug mode, so reloading sometimes just lockups forever
Maybe not :s
I am also interested in this question. There's ghost mode which also makes the character walk right through zombies when usually they only noclip when fighting.
oh thats what ghost mode does?
i assumed it was meant to make you invisible but just didnt work
never used cheat menu
I'm working on custom zombie AI I'll let you guys know if I run into anything- or let me know if you do lol
Hmm
There's a toothless feature I want aware of
Could be used to make "jawless" zombies.
does it make them unable to bite?
Anyone know how I can make it so upon taking a trait, all bags weight reduction is 100%?
I have this code:
local packmule = inventory:AddItem("Base.Bag_ALICEpack")
packmule:setWeightReduction(100)
Altough it spawns a specific bag into the inventory and reduces the weight reduction by 100% but I want to do this with all bags and not have a certain bag added to inventory to reduce weight hmm
Maybe this could work?
local packmule = getItemContainer():FindAndReturn("Base.Bag_Schoolbag")
packmule:setWeightReduction(100)
Yes, but they can still scratch and I assume the pull down thing still comes into play.
There's a subclass to inventoryItem that are bags
so getItemContainer is wrong?
You may have to forloop it but I think there's an eval function from players inventory
Don't understand that ^^
yeah pulling down would probably still work
I don't know what get item container is exactly getting in this case
dont need teeth to pull someone apart lol
Since there's nothing Infront of it- I would assume it's getting the general class and not a specific player's inventory
local packmule = getItemContainer():FindAll("Base.Bag_Schoolbag")
packmule:setWeightReduction(100)
Shouldnt this work? It checks for Bad_Schoolbag, if it finds it sets it to weightreduction 100
If you're trying to make it a trait it will break with co-op or multiplayer unless you make sure the item changes based on it's location.
But that's an issue for another day
If your not familiar to Lua or progranming- getX() with nothing Infront is getting the template of X so to speak. Player:getX() would more likely return the players X.
If you're just making this for SP use you can use local player = getSpecificPlayer(0)
That would let you spawn the bag in your inventory and change it
To adjust items based on player a players trait I would look for item transfering
There's most likely a function or Lua hook for it- and you could even prevent other players from gaining the benefit that way.
I know that, but what I want to do is have it change the weight reduction on all bags and not just add a bag with changed weight reduction
I would look into timed actions
There should be one for looting
And it should have the item being transferred
Ah
You can use instanceof() to check if it's a....... inventoryContainer?
I keep getting itemContainer, inventoryItem, and inventoryContainer mixed up
Me too lol
InventoryContainers should be the bags cause inventoryItem is the base
ItemContainer is probably it
But the actual list object is itemContainer
Iirc
Like mapobjects can have itemContainers, players inventory's are actually the players' itemContainer
Unless I got them mixed up
Idk if this helped
But good luck
Thanks! I will just make it spawn a bag in inventory and change its weight reduction, doing it any other way seems way too advanced for me ^^
No problem, and enjoy
@sour island Not sure if you have tried out the tutorial and reading the code as you go along in it. It showed me probably the only actual uses for these zombie states such as toothless or blind/deaf
I have an idea for a revolutionary project on project zomboid, to make a roleplay life server with jobs in a small town.
People who would be interested in helping me?
Yeah, brother and mother :(
stomps
I also tried breaking the tutorial too, much fun
ohhh I think I broke it a few times before it was patched
Hi!
Does somebody knows how GameTime.getAnimSpeedFix() works? all usages I see if I'm understanding correctly are for the different game speeds. But I'm probably misunderstanding it
Does Blender have a scale function where instead of scaling the vertices all away from one point they scale them away from their bones?
For making them thicker or thinner?
@craggy furnace @sour island would it be possible to add a CDC Helicopter Event? Goes around circling large groups of infected. And when it crashes spawns Hazmat zombies/corpses?
If there's hazmat suits in game it would be a matter of a few seconds
@undone crag blender does have that, but I don't remember the name
There are the yellow ones
@calm portal ill merge them into army helicopters maybe
i have hazmat stuff lying around anyways
Nice. It be cool to see given that its confirmed they are sending scientists into the exclusion zone to 'conduct tests'
Also, what do the anarchist helicopters do? I had one crash. But it didn't do anything too noticeable.
It be cool if they blared music or something to stir around zombies
Ahhh got it
What mods are already ready for the new build 41.52?
most of mine are. My plan is have the others updated by the end of the weekend
Great, can you send me the list you use?
the ones not updated yet are blacksmith, building time and dressing time
Ty ๐๐ผ๐๐ผ๐๐ผ
legit probably one of the best mod lists in PZ right now
ohhh thanks!
i cant plant seeds because the seed menu doesnt open anyone knows why?
i suspect its caused by an outdated mod but idk which
is there any way to delay the loading of a lua file until after another lua file is loaded?
add a require line
that doesnt work for my situation
i need to let other mods add stuff into a list but the function will end up running before other mods can even add into that list
probably a very, VERY outdated mod
nvm its hydrocraft
oh well im not removing hydrocraft so no planting until it updates i guess
I have a very similar situation in one of my projects. What I'm trying to do is to tie the function to events that happen right after lua files have been loaded. OnMainMenuEnter works, but now I laos need an event for loading a game and probably for joining a server too
ohh i think OnMainMenuEnter might work
how do you add a function to an event in lua again?
it works but doesn't cover all cases.
i'll try it out and see
Events.OnMainMenuEnter.Add(yourfunction)
the problem is that i think making the function load any later might break the game because its messing with the bodylocations directly
ok thanks
ohhhh that's exaclty what I'm working on lol
yeah, compatibiity for separate mods
I'm halfway through it
it works if you have the mod enabled and go for a new character/save
but if the mod isn't enabled I need another event for loading
ohhh and there's one for loop I need to fix
right now exclusive locations don't work
i've managed to include stuff like exclusions and multi items but i havent tested them yet
yeah adding the function to OnMainMenuEnter didnt do anything for me
what i did was manually add all of the vanilla bodylocations to a table and then just replace BodyLocations.lua entirely and use the list to add the body locations instead
i couldnt figure out where the table of body locations was actually stored so i just opted to overwrite the whole file instead
how come i cant host a Server with mods on 40 build tho
like the reason it was disabled
exactly what I did, it is the only way to allow mods to add locations where they should go and not at the ned of the list
yeah i mean like at first i tried to insert new ones directly into the table but i couldn't figure out where it was stored
it's a java thing, and what you see in vanilla BodyLocations.lua may be the only way of interacting with that list
there's an online list but it is outdated
I know the feeling
Making your Lua files deeper in the directory works too
Like adding another folder past what you need to load first
hmm
If these are all your files you can use _ and numbers
This is my file, have fun making it work 100% lol
yeah yours is way better organised than mine lmao
feel free to use that version. If you make any improvements let me know
okay thanks, i'm just trying to figure out why mine keeps erroring
@nimble spoke by the way, dunno if you've heard but learning time makes skill books unreadable now
Are you sure that's the mod causing the issue? I know Extra Skill System had that bug but it was fixed today
well i'm not getting errors anymore but now i am actually getting the issue of it not loading mods before the bodylocations file
the only problem with that is that the file that needs to load last is a vanilla file that needs to be overwritten so i cant move it
was it really that? it took me a sec to realize that i actually had extra skill system installed, it's not something i look at very often when i'm culling my modlist. regardless, thanks for updating it.
Oh did you update extra skills to work with the exposed perks stuff? ๐ฎ
that'd mean skill recovery journal can work with it
my script overrides the game's BodyLocations.lua file and hijacks its functionality so that mods can add their own bodylocations to a list without needing to overwrite the vanilla file
it then reads that list and adds them as body locations like how the vanilla game does it
ah
but the problem is that any mods that insert new locations wont load before the bodylocations file
not yet, I will update it again when my mods are ready to cover both versions in that area
@winter bolt if all those mods include the same new version of the file it won't be a problem, if they don't then they're risking a broken table insert anyway
?
Can't you just add bodylocations this way?
sorry I'm not sure what issue you're having with regards to something being overwritten
yeah, the whole clothing system depends on that
you have to be very specific about the order to avoid weird combinations
You could make a sister table with a vanilla location to match
and insert based on position
i've done that
oh
the problem is that any lua files from mods that try to insert into the table arent loaded before theyre added as bodylocations
so they'll get left out
again...... if all such mods include this new lua version that's not an issue
you are inserting into the same table though?
if they flatly overwrite it with their own list that's kind of on them?
can't work around that
we can set up a system that works
hold on
or.... as a last resort, I handle the file to a dev and explain the situation
i just realised i havent actually been replacing bodylocations.lua the whole time
i had it in the wrong folder
and now i replaced it i'm getting even more errors lmao
you could try the event "OnGameBoot" ?
I don't remember if I tried that one
so its not loaded when lua is loaded but after
it may be too late, I'd have to test
right when it finishes or when it starts?
it's at the end of the reset lua function
LuaEventManager.triggerEvent("OnGameBoot");
LuaEventManager.triggerEvent("OnMainMenuEnter");
LuaEventManager.triggerEvent("OnResetLua", var2);
I'll give that a try, thanks
i'm now getting a completely unrelated error where the character creation lua file cant find "Hat"
๐คท
not totaly unrealted, during my tests if it dailed to load properly in time I'd get those errors too
ok, OnResetLua covers changing mods and then back to main menu but not just starting the game, so I guess I need all those 3 events
ongameboot is just turning the game on
looks like these 3 events cover all cases I can test right now, I may need to add one more later for MP
I know theres an event for coop join
for now I need to fix the for loops for exclusive locations and hide locations
and the file will be ready for the mods
New version
So Chuck helped me figure out what I had done wrong in the final pieces. Now it is working as intended. If you guys add this file to your clothing mod and insert into those tables our mods should be compatible
I'm going to update my Dressing Time with it tomorrow
wouldnt it be more efficient to have like a function that you can use to insert into it?
the group stuff is the built-in way to insert
if you wanted to add your own parts to the list you could insert into it yes
but that would defeat the point of having it in the first place lol
I'm still not sure what this is for to be honest, i Just noticed like 3 actual letters that were wrong lol
I gathered you'd be using his list as a shared resource to make everything work together
how would inserting into his list defeat the purpose?
---@param newValue string The name of the new location being inserted
---@param insertHere string "newValue" will be placed after (by default) a list entry matching this; if "insertHere" not defined will insert at the end
---@param bFore boolean if true place "newValue" before "insertHere" onthe list, otherwise after
function InsertNewLocation(newValue, insertHere, bFore)
if insertHere then
for n, v in pairs(CreateLocation) do
if v==insertHere then
if bFore then
insertHere = n
else
insertHere = n+1
end
break
end
end
else
insertHere = #CreateLocation+1
end
table.insert(CreateLocation, insertHere, newValue)
end
@nimble spoke if you wanted something for people to use
@winter bolt is this what you meant?
@thin hornet sorry for the ping,
i had this problem with the gas fill option on gas station
i just found out that for some reason "Coco Liquid Overhaul" broke Gas station Fuel pump option on version 41.50 PZ
Whenever i tried to take gas, it always give this bug
ERROR: General , 1626921996015>
ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in GetFuelStationOnSquare at KahluaUtil.fail line:82.
ERROR: General , 1626921996016> DebugLogStream.printException> Stack trace: java.lang.RuntimeException: Object tried to call nil in GetFuelStationOnSquare```
@hybrid palm do you have the mod version for 41.50 enabled?
yes
hum
i was assuming this was from CLO based on this stack trace
LOG : General , 1626921996015> -----------------------------------------
STACK TRACE
-----------------------------------------
function: GetFuelStationOnSquare -- file: CLO_Functions.lua line # 81
function: GetAvailableFuelOnSquare -- file: CLO_Functions.lua line # 95
function: Context_TakeFuelFromPump -- file: CLO_Context_TakeFuelFromPump.lua line # 44
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@7f6dd557
function: createMenu -- file: ISWorldObjectContextMenu_LetMeThink4150.lua line # 420
function: createMenu -- file: ISMenuContextWorld_LetMeThink4150.lua line # 51
function: createWorldMenu -- file: ISContextManager.lua line # 28
function: doRClick -- file: ISObjectClickHandler_LetMeThink4150.lua line # 48
function: onObjectRightMouseButtonUp -- file: ISObjectClickHandler_LetMeThink4150.lua line # 347
what is _LetMeThink4150 is that an other mod
ohhh, Let me think is from another mod
it lets you pause the game
https://steamcommunity.com/sharedfiles/filedetails/?id=2033451936
im looking into the bug
its hard to support both version, I tried to take a commit version prior to the update but might have messed up
i have to downgrade my game to test it
hahaha, Thank for the help!
Sorry for the trouble ๐
Out of curiosity what had to be changed between versions?
Fuel Pump uses new functions
To remove/count fuel?
Are you overwriting the entire function?
i am not overwritting it, i just make my own function and at the end i set fuel to nil which make the original context menu think there is no fuel so it doesnt run.
i am only overwritting some actions specific functions
Are they timed actions?
Is the only thing you're changing about the vanilla function the setting something to nil?
wait ill show you
True, you have github
local function OnLoad()
print(CLO_ModSettings.Name .. " v" .. tostring(CLO_ModSettings.Version) .. " has loaded!")
---Do overrides
CLO_Override_ISAddGasolineToVehicle()
CLO_Override_ISTakeFuel()
CLO_Override_ISTakeGasolineFromVehicle()
CLO_Override_ISVehicleMenu_FillPartMenu()
CLO_Override_ISVehiclePartMenu_getGasCanNotEmpty()
CLO_Override_ISVehiclePartMenu_getGasCanNotFull()
for i = 1, #CLO_ModSettings.PreloadLogs do
print(CLO_ModSettings.PreloadLogs[i])
end
CLO_ModSettings.Loaded = true
end
i call those override functions on load
and those are the functions
i have changed the way they calculate fuel transfert in/out vehicles cause it is also hard coded for a 8 unit fuel can
I made a function to add custom fuel items to a table that are use in the overriden functions so this way its like an API where we can add more fuel containers
---CLO_AddNewFuelItem
---@param moduleName string
---@param emptyItemName string
---@param fullItemName string
function CLO_AddNewFuelItem(moduleName, emptyItemName, fullItemName)
CLO_Print("Add new gas can item:\n- " .. moduleName .. "." .. emptyItemName .. "\n- " .. moduleName .. "." .. fullItemName)
table.insert(CLO_ModSettings.CustomFuelItems, { module = moduleName, empty = emptyItemName, full = fullItemName })
end
---Add new GasCan like items
CLO_AddNewFuelItem("CocoLiquidOverhaulItems", "Coco_LargeEmptyPetrolCan", "Coco_LargePetrolCan")
CLO_AddNewFuelItem("CocoLiquidOverhaulItems", "Coco_WaterGallonEmpty", "Coco_WaterGallonPetrol")
i wish pz would create something like CanStoreWater but CanStoreFuel to drainable items
but pz did only plan to use the small gas can
Well you are working on multiple liquids, right? It would be nice to be able to also have things like beer and soda and water and gas all be able to be stored in the same containers
beer and soda and milk and any other "fake" liquid as such are actually food. (not drainable)
They add boredom and stress relief etc
I am planing to look into it tho.
I find your work interesting partly because I've been looking at the code for the fuel changes as well
oh yeah
the mod was not ready to publish before 41.51+ came out so that is why im having a hardtime to try to keep 41.50 compatible.
Right now 41.50 doesnt have the large fuel can. So i suggest people update their game and start a new save ๐
anyway 41.51+ is a nice update
Btw you can grab items with shared tags recursively - there's examples of this in the recipe lua
im having a hardtime to use the recursive functions
even if i copy it from the source code and use it like it should i get exception idk why
Hm
ill have to look into it one day
so i made functions to move forward in my development
its not the best and i will try to fix this somehow one day
but the code is getting massive and its getting hard to maintain with game update too
You could just overwrite the vanilla gas can entirely
wouldnt change the fact that those functions need overwritting tho?
No but iirc timed actions have arguments or fields
i wonder if its possible to get custom value from items.txt
I'd have to see the originals to see if you can slip in what you need with out entirely overwriting it
ahh shit, i think i just noticed
Im using CLO vers 41.51
instead of CLO old version 41.50
for PZ in PZ 41.50
my bad hahaha
the scriptparser would pick them up like any other but the java doesnt have getters for them
@hybrid palm nice it should work then!
I think it should, let me check
Yes but you're running the normal functionality unless you also have your own can right?
That suggests you should be able to run the vanilla steps to completion and then check for your own cans- depending on the step, and what's being returned
so basically just create custom action and run them instead of the vanilla overriden one
yeah i could do that
ISTimedActionQueue.add(ISTakeFuel:new(playerObject, fuelStation, petrolCan, 5000))
ISTimedActionQueue.add(CustomISTakeFuel:new(playerObject, fuelStation, petrolCan, 5000))
storedVanillaFunction = VanillaFunction
VanillaFunction(a,b,c)
storedVanillaFunction(self, a,b,c)
Your stuff
end
Ye, it's the best way to avoid compatibility issues too
I think timed actions return something in most steps
Youd just have the stored function be a local variable, then do your stuff to what it's returning, then return the final product
So for a step that checks for a gas can you should be able to intercept it and add your own cans as a result
Again it depends on what the vanilla stuff is doing
I gotta go to bed, I can look at it tomorrow
good night man
@hybrid palm i downgraded and its work well with the right mod version enabled
but that version wont be updated ever
so new features are and will never be available on 41.50
Yeah! currently i had no issue with the CLO 41.50 version. Thank you !
cool ๐
I love it
i am crossing the event horizon into the mundane dimension
um
smoking cigarretes don't give you negative moodlets such as: Lung Cancer, Heart Disease or Emphysema
and your average player life expectancy is: 1-4 days
based!!!!!!!
Stuff that actually starts hurting you when your in your mid 60โs to late 80โs and as shark said, short life span
Hey are there any clear resources for updating loot distribution lists in mods?
I'm not really sure where to start fixing my old stuff atm ๐
There's some pins
Yeah I checked those and didn't see anything recent relating to how to update a distro list, did I miss it?
Okay thanks, I'll take another peek!
@sour island About yesterday's bodylocation.lua: there's no need to provide a function for inserting new values because table.insert will do (it can receive an int param that is the position in the table)
I thought it mattered where it went?
Like the order mattered
For rendering? Unless I misunderstood
yes, it matters, but you can insert wherever you want with table.insert
Yes but the function identifies the position based on the the entry
Like if what ever your adding has to be after "eyes"
I imagine if multiple people are inserting into the list the position isn't fixed
ahhhh that would be more precise, yes
I think was the other guy's concern
Also just realized I didn't include a way to put it in the front of the list
I have a passion for frameworks :p
Sned me the function when you feel it is finished and I'll add it
thanks for the help
Could somebody direct me to where the code for the "rolls" is located? I'm just getting into modding and I'd like to go through the code to understand how loot spawning etc. works.
would be cool a mod that keep all your stats minus one everytime you die (would be nice for split screen)
There are a couple mods that do things like that.
Some drop something when you die that when you pickup give you back the skills you had. Others let you create journals which when read again will give you the skills you had when you wrote the journal. Stuff like that!
A way of avoiding something being in a context menu other than that, is to first let the context menu generate normally, and then remove the bit you don't want. It uses Lua tables.
@echo leaf nice does you have the mod name for the journal thing plz
Where is it though I don't see it?
https://github.com/ChuckTheSheep
How many polygons on a vehicle model for PZ is highest?
For the toxic fog and rain mod, does it affect/kill crops?
My models use no more than 5,000. It can be more, but does it make sense?
If you have a pentium ๐
Have you finished your car? ^^
What a car?
You made a car model if I remember correctly
he means the space shuttle with wheels danny
i hate UVing
tail work is ๐ค
My kind of car
I haven't finished with them yet, so there will be an inscription Porsche ๐
I suppose it will come with different colours or will it just be white?
Yeah UV mapping is hell ๐ฆ
Well, this is a silver color, but without several maps it is difficult to make it exactly silver
xD
There will be 5-6 color options
Silver is cool
that reminds me
but in the pictures it looks white
after the porsche i gotta submod your stuff
?
ive kinda worked out in my head how to stash cars in certain places
Years of training, this is not the first time I am engaged in UV
indeed
Drools
I dont know anyone that enjoy's UV mapping
Stash cars?
Don't understand
yeah in certain locations around the map
@radiant ginkgoHow long have you worked on that damn car? Feels like forever lmao
i already do it for some of filibusters cars
Month
nothing insane, just specifying on the map theyll spawn and adding a chance
Ah, I already have this feature
i have never liked the car distro system in its entirety because i think it lacks nuance
you mean rich/poor, right?
Ford Time Machine
๐
@tulip valve 972 Polys
And they have good detail
That's about how much a car needs to have polygons for the PZ

But there is also a texture that is 2048x2048
nice
Okay. I've faffed about enough. Time to bite the bullet and figure out this capsid thing. I really wish my old decompiler works, it was very nice.
Just bringing this up again, would be appreciated if somebody could help.
Humm. So there's all kinds of creeps. There's specification creep, feature creep. Now there's IDE creep.
I've got as far as unzipping Capsid and Gradle, and creating the environment variable for Gradle, but for now it's just a load of folders and files without any instructions on how to actually run the software. :/
It has intellij integration. Hence my comment about ide creep.
Used to be there was eclipse and notepad. Now there's notepad++, atom, intellij, VBcode, SciTE... I probably have them all intalled at this point.
Oh Beans. Right. I forgot Beans.
It's like this is my notepad installation but it doesn't tell me how to open a notepad window.
When all the tutorials rely on you already knowing how to open this:
I have this problem with Microsoft Visual Studio. I know how to install it, I know how to use it once it's open, but I don't know how to open a visual studio window without using some other software that opens it.
Oh do I need to install some software called IntelliJ so that I can run Gradle and Capsid?
It's under Beta of helicopter mod
:o
Okay, so Gradle is just the autobuild to for compiling capsid. Gradle doesn't have to be installed to build capsid.
D:
Correct?
I do not know.
Ah, I'm wrong. Its a gradle plugin.
yeah its a gradle plugin, and capsid adds tasks to gradle
to setup the environment and decompile/compile zomboid.
i can help if anyone got question about capsid
Warning, Intellij is 774MB.
and the bad news is you have a hard drive from 2003
Once I had to download a 20GB update for a computer game which was DLC I couldn't even use because I had not bought it, and it took about 730 days.
I checked when I had last saved the last saved game in the game and it was 730 days earlier. That's two years to the day.
@undone crag whats up with 774mb? Whats your internet connection?
It says that's the size of the zip from the Intellij website.
but whats the matter?
Too big
too big to download or to install ?
My internet is faster now so it could download it, so it's mostly hard drive space for me.
what do you got?
155 GB left free
damn
Is that a lot or a little?
well 774mb is less than 1 gb
:|
But if I do this more than a hundred times I'll have trouble copying things.
if you are stumbling over 774mb then you need to free up your shit
I just want to use it to see the PZ java, notepad++ is fine :|
or get an ssd for 100$ on amazon
get rid of the 500 gb folder of commanders cancelled mods
notepad++ is not ok ๐
orly
using capsid and anotation you do get a big advantage coding zomboid mods
you'll be less searching for mistakes and errors first. And your be able to better visualize what you are coding.
i swear i would never go back to notepad++ since i started using intellij+capsid
Oh I missed your message on the other server.
i use notepad++ when i need to quickly see a file such as scripts.txt
any way i dont use notepad++ anymore i moved to linux for development
I installed a linux called something like Darn Small Linux on a virtual computer but it wasn't registering a certain key or mouse press or something like that. :/
and im kidding notepad++ is good but yeah like i say if you can get used to intellij youll probably love it
Hmmmmm maybe I will install it...... I have an external hard drive I could install it on which I did not mention earlier.
all my steam games are installed on external ssd disk. I got over 150 games so that help alot.
even my OS are installed on different external ssd so its easy to switch and reinstall without loosing games.
you can get a ssd ADATA for cheap on amazon. They are worth it. OS boot in like 1 min and less
I am boycotting amazon though ha got you you can't get me that easily
lol
as you wish man
but grab some ssd somewhere else asap
youll go from shamblers to sprinters
Eh that's spending money though. Maybe eventually. Possibly because the external hard drive was not flat, it doodled on my huge dank meme collection that may have been gigabytes even, or at least a large part of a gigabyte.
Wait a minute
I'll download all those dank memes but not Intellij
It is a little aggravating. I was getting what I needed between notepad++ and JD. JD is just 1.5 megs. ๐ฆ
and JD doesnt work anymore?
Correct. I'm taking a second look at it. JD-Core was updated 16 days ago.
if you guys need ill upload a zip with the decompiled java classes, i dont mind the effort
That's ultimately what we're after. I'd appreciate that.
I'll miss JD's crosslink. But them's the breaks.
If your curious, this is what I was using: http://java-decompiler.github.io/
JD Java Decompiler
Massively. Thank you!
So I started a new mod called Guts n Glory. It allows you to Gut Corpse to make yourself bloody. My only challenge right now is to get zombies to ignore the player. I want them to ignore him as long as he doesnt run/sprint/speak/attack. Which is all good already.
You'd probably have to replace the AI.
Yeah i havent play with AI yet im not sure were to start
i been using zombie:setUseless(true)
but thats not good, zombie stop walking and everything else
already been done
the latter i mean
pawlow wrote up something you can take a peek at in his loot mod if you want
Well, there are roughly three ways that AI might track a player so long as we ignore actually pathing to the player. 1) calculate linear distance between object and player, 2) some variation fo ray trace to see if there are any blockers between object and player, 3) player leaves a trail where they move and object follows trail. 1 and 2 are pretty straight forward changes.
How would i cancel the zombie following the player been looking at most functions and couldnt see anything that would help me do that
You could probably just use the existing zombie AI, and remove its ability to 'see' the player using a linear calculation for any zombies within x radius.
i tryed setting target to nil and stuff like that but nothing worked
ill have to read more
its pawlows, but it does work
you can set it up to read the blood mask
i currently have this rigged onto a skeleton costume
but ghost mod is for everything
the way i want to do it is that if a zombie sees me do something like "run" he will start going for me but other will not unless they see me do something too.
I just found out about aiBrain ill see what i can do
OMG. JD-Gui works with your decompiled libraries.
great man
This is incredible. Its faster too, I guess because its not decompiling, its just displaying. reference links work too, so I can click on say 'bloodybodyparttype' and it'll open the file that contains that reference.
๐
Now to fold laundry as a 'reward'
A need a bit of help disabling some of the core systems for a story mod
like being able to get infected, clothing degrading. stuff like that
@umbral wasp might wanna check "Last Stand" gamemode code how they handle it.
will do
i try using zombie:setTarget(nil) but it seems to reset it every frame. Seriously not sure how i can acheive zombie to forget about specific player
im trying something like that
---@param zombie IsoZombie
local function OnZombieUpdate(zombie)
local modData = zombie:getModData()
if modData.spottedPlayer then return end
local playerIsTarget = zombie:getTarget() == getPlayer()
if playerIsInvisible then
if playerIsTarget then
zombie:setTarget(nil)
end
elseif playerIsTarget then
--modData.spottedPlayer = true
end
end
Trying to remove the player as target every zombie update but that dont work
well thats the thing, the mod will end up having monsters
so id even have to go and make them behave diffrent
so im in over my head with that as well
@umbral wasp to set sandbox settings you might wanna try
--SandboxVars.Zombies = 2;
-- SandboxVars.ZombieLore.Speed = 1;
SandboxVars.Zombies = 1;
SandboxVars.Distribution = 1;
SandboxVars.DayLength = 3;
SandboxVars.StartMonth = 12;
SandboxVars.StartTime = 2;
SandboxVars.WaterShutModifier = -1;
SandboxVars.ElecShutModifier = -1;
SandboxVars.FoodLoot = 1;
SandboxVars.WeaponLoot = 1;
SandboxVars.OtherLoot = 1;
SandboxVars.Temperature = 3;
SandboxVars.Rain = 3;
-- SandboxVars.erosion = 12
SandboxVars.ErosionSpeed = 1
SandboxVars.XpMultiplier = "1.0";
SandboxVars.Farming = 3;
SandboxVars.NatureAbundance = 5;
SandboxVars.PlantResilience = 3;
SandboxVars.PlantAbundance = 3;
SandboxVars.Alarm = 3;
SandboxVars.LockedHouses = 3;
SandboxVars.FoodRotSpeed = 3;
SandboxVars.FridgeFactor = 3;
SandboxVars.ZombiesRespawn = 2;
SandboxVars.LootRespawn = 1;
SandboxVars.StatsDecrease = 3;
SandboxVars.StarterKit = false;
SandboxVars.TimeSinceApo = 13;
SandboxVars.MultiHitZombies = false;
using SandboxVars
you are trying to create story/challenge with predefined settings?
@thin hornet by chance do you know a way to get custom music in game?
i think ive got the code right but not the file type or bit rate, i mean if the game is even that picky
i suppose replaceing works
You can check the audio.txt files in the game directory "media/scripts/"
but more likely you gonna have to edit the .bank files
using the fmod tool
i should have them point to my mod folder rather then replacing the in game files right?
check the workshop some music replacement mods exist you can check how they do it
thats how i did
smart
when i got back to my computer ill send you soomething
may thanks
yeah the coding isnt all that hard
the map editor makes me wanna jump from a building though
haha
i know its not that easy
software to unpack/pack audio bank file for zomboid
you have banks file at media/sounds/banks/Desktop/
Game Audio Scripts location:
media/scripts/sounds_music.txt
default:
sound NewMusic_32
{
category = Music,
master = Music,
clip
{
event = NewMusic/32,
}
}
modded:
sound NewMusic_32
{
category = Music,
master = Music,
clip
{
file = media/music/TheSearchForJim.mp3,
}
}
one problem with this is that the music is playing like a 3D sound, so when you move the character the audio change direction and distance
i tried adding additional properties but didnt change anything
sound NewMusic_32
{
category = Music,
master = Music,
is3D = false,
clip
{
file = media/music/TheSearchForJim.mp3,
reverbMaxRange = 0,
reverbFactor = 0,
}
}
might work better with an edited bank file. havent tried cause the tools is for windows not linux
you will have to edit NewMusic or OldMusic and in the audio settings you choose the sountrack based on what you edited.
im almost there but zombie are buggy a "little"
@nimble spoke hey man sorry for ping, im looking at your turning mod and im trying to understand how SFTurnLoadZombies.lua is ever used in the game i dont see anything calling SFTurn ever.
? with S or no S
No s
okay thanks
yeah im french basically so my english far from perfect
Itโs all good
That was me trying to do it in a way that wouldn't require the game to go checking things on zombie update, but it didn't work and I forgot to clean it up
I needed to recover certain changes to zombies only once upon loading, maybe I'll try it again later
depends on what you consider custom behavior
well right now im trying to do the gut mod
and im trying to find some mod that would help me understand how to change zombies behavior
couldnt you see what the inconspicious trait does?
and what would that do?
im looking for
- single zombie to ignore player if very bloody
- if single zombie see player run or talk he will stop ignoring him
it has to be for each zombie. otherwise i would just use ghost mode
all zombie checks are inside the java code, you'd have to read through and find "holes in the armor" that could be exploited from lua
we are pretty limited i see
I doubt you can do that for single zombies
wouldnt there be a way to make a modified inconspicious trait and then add and remove the trait whenever you want while hiding it from the player?
will look at the trait solution and see if there is something to do with that
adding traits and making them have a real game effect are 2 completely different things
again, checks for these traits are all java you won't be able to add your new trait to those checks unless you include modified class files in your mod
modified class are loaded or it require a modloader for java ?
modified class are not loaded from mods
you could apply some of the tokens I have in Turning Time as long as the zombie is within X distance to that player, but it would affect zombies behavior for all players
pretty much only setUseless is working for what i want to do, but it will make zombies stop doing what ever they were doing including for "other players"
so i guess thats why this mod never was created before
NoTeeth is also interesting
for anyone keeping clothing mods that add new body locations: I updated my Dressing Time with a new system so that our mods could be compatible. Please give it a try!
if playerIsInvisible then
if playerIsTarget and not zombie:isUseless() then
zombie:setUseless(true)
zombie:setTarget(nil)
uselessCount = uselessCount + 1
end
else
if zombie:isUseless() then
zombie:setUseless(false)
uselessCount = uselessCount - 1
end
if playerIsTarget then
--modData.spottedPlayer = true
end
end
doing this give a result that is not that bad but will certainly not work in splitscreen and mp
in fact the effect is very nice, they kind of come to you like if they are grouping\hording around you
yeah, we've been fiddling with that
i am curious to apply that to specific body locations (full face/head) for clothing
actually thats what im doing and its starting to be very nice
---@param player IsoPlayer
local function IsInvisible(player)
local invisible = IsBloody(player) and not player:isSpeaking()
if invisible and player:isPlayerMoving() and (player:isRunning() or player:isSprinting()) then
invisible = false
end
return invisible
end
---@param player IsoPlayer
local function OnPlayerUpdate(player)
playerIsInvisible = IsInvisible(player)
end
---@param zombie IsoZombie
local function OnZombieUpdate(zombie)
local playerIsTarget = zombie:getTarget() == getPlayer()
local modData = zombie:getModData()
if modData.spottedPlayer then
if not playerIsTarget then
modData.spottedPlayer = false
end
return
end
if playerIsInvisible and playerIsTarget then
zombie:setUseless(true)
elseif not playerIsInvisible and playerIsTarget then
zombie:setUseless(false)
modData.spottedPlayer = true
end
if not playerIsTarget then
zombie:setUseless(false)
end
end
they even forget that they run after me if they lose sigh of me
im currently streaming if you wanna see the result
but setting it to useless has other issues with MP, maybe try setTarget(nil) just to see what happens?
I'm glad this is taking shape. People havve been requesting for years
setting target to nil in the ZombieUpdate lead to zombie being stupid
they still get assign you as a target every frame
so they kind of act like they want you
and yes it will not work with MP and will not work with splitscreen but i would specify it in the mod description.
there's probably another variable you can set/change to make it forget/unsee the player it was targeting
thing is making it useless is for every player at the same time
one thing that would be cool is setting the "zombie walk" animation to the player
or isnt there a function set the player as a zombie, or maybe that function actually kills the player
well it suck that we are so limitted with the lua part but its ok i understand why it is. Night yall
What mods were least likely to be affected by the latest update? I'm thinking of using the toxic fog mod and zombies fear the sun.
those to should be good
pretty much any mods that add custom objects where fucked
@thin hornet i did end up getting audio working just fine
But here's a more complex one
Depending on the amount of enemies on screen I'd like to bring in more elements of a song.
So i export my new tracks as stems, but i need a way to sync up the times and just get them to layer properly
Current mods installed are G.E.A.R., Fear The Sun, Item Tweaker API, and Toxic Fog and Rain. Had Slocan Lake installed too and saw 6 errors during the loading screen, so I'm going to check if that's the reason.
is it ADVANCED GEAR or normal gear?