#mod_development
1 messages ยท Page 475 of 1
I've lucked out with essentially having the wiki guide me through what random Java type objects are, but holy shit is it obtuse.
It keeps me entertained, that's for sure.
Want to see what I'm working on?
Battery banks. Run your base off of car batteries.
Never claimed to be an artist. I just cobbled the sprites together and hoped it'd work. 
I've asked about the generator code for like... Days now. Not heard anything back so I'm going manual to see if I can just do an A* algorithm and find all nearby devices in range to power
If I can even power then using code that isn't in Java.
Yeah asking for help on modding is usually a waste of time unfortunately.
I'd help, but my knowledge of the code is nearly zero. I learned a little by using other mods and editing key spots to use for my own mod.
Valid as hell
Implementing new functionality is a pain in the ass
Indie Stone Devs hire me.
i know i probobly wont get a responce in but is there a mod to replace propane tanks or refuel them im experimenting with metal working but u run short on propane very fast any mods to help that
Yo, IsoBuilding needs a getRooms() function.
Does anyone know how to access Fields from Lua?
I'm losing my mind on this.
Reference: https://projectzomboid.com/modding/zombie/iso/areas/IsoBuilding.html
I have to access Rooms, but using building.Rooms returns nil. Weirdest part is, all the variables are there and solid in the debugger.
I dabbled in looking around for isoBuildings and such - what exactly are you trying to do?
I'm having an odd issue where some zs have a strange hairdo shaped like a duffel bag behind their necks. Can anyone confirm that authentic z is the culprit? disabled that mod. hope that fixes the issue. If it doesn't, I'll assume it is the resedent evil dress up mod.
Is it possible to make a mod where zombies only respawn on the edge of the map? I hate them respawning in secured areas.
Just make them not respawning at all ๐
If they respawned at the edge of the map, then you will never meet them as nothing will make them move toward your position. The map is huge
@sour island I'm attempting to call setHaveElectricity but the method isn't setting the IsoGrid's field. It's a code issue that I think needs to be handled on the backend.
I believe zombies spread out when herds get too big, right?
Looking at 'setHaveEletricity' that only checks for lights and if so updates them
I do agree they need to refactor the code to allow for powersources in general
The IsoGrid isn't even updated, though. Generator code uses the same method but it functions over there.
setHaveElectricity doesn't seem to actually .... set haveElectricity other than setting it to false lol
public void setHaveElectricity(boolean var1) {
if (!var1) {
this.haveElectricity = false;
}
if (this.getObjects() != null) {
for(int var2 = 0; var2 < this.getObjects().size(); ++var2) {
if (this.getObjects().get(var2) instanceof IsoLightSwitch) {
((IsoLightSwitch)this.getObjects().get(var2)).update();
}
}
}
}
very strange
isoGenerator.setSurroundingElectricity() is what seems to give power
it is public but would require you to make your power source an isoGen to work - OR you could rewrite the isoGen functions into Lua
Looked at it, too - that whole part is a mess ๐
The "has power" stuff is spread to so many different classes, starting from IsoObject and then instead of using that there's stuff on top of that for generators in chunk classes etc ๐ฉ
oh- convinient- so I had an idea to make power extensions- it'll be harder then I thought, wont it?
Yeah
unless some mad man rewrites the power functions in lua
Maybe making the extensions be generators, can I remove the need for fuel and do manual checks if it's in range of another item?
Also, can I add a custom variable to an object? Sometimes you can, sometimes ya can't with lua coding xD
generally unless a functionality has been made exposed you can't really do it
Hm-
for example I don't think you can set individual generator fuel rates
so you can't have a genny not take up fuel
I took a look at a generator light post mod and it looks like the post was told to not use fuel.
self.javaObject:setHaveFuel(false);
I think that'd be for lightsources
well I have a few functions that are rewritten vanilla stuff
if it doesn't look too crazy I could check out powersources
I've gone through and rewrote the code to get all the tiles to power but can't set the power using the field. Tiaxx has helped me out with getting me some pointers, I just gotta do some weird nonsense with setting class variables or something
I cannot use generator code because it's hardwired with toxin stuff that kills people, plus it doesn't do what I need it to do. Rather do it myself
you rewrote lua?
you can technically rewrite java - but not overwrite it
if that makes sense
I rewrote it all in Lua 1:1. With cleanup, of course.
to clarify - you can overwrite vanilla lua functions but you can also copy and paste java - translate it to lua - then call on it yourself
ok i need some help im running some mods and its seems that they have removed my ability to sleep in beds i do not know whitch one is causing has anyone else had this problem?
If you have issues with mods, try disabling them one by one or in batches to figure out which specific mod is causing the problems.
Do it on a new save to to prevent any issues on your current playthrough as removing mods can cause items to be permanently deleted.
After you find out which mod is problematic, report the problem to the mod creator on their workshop page.
Are you getting any errors? That may speed up the troubleshoot process.
When i first made my game it poped up a couple of errors but i dont get any while trying to sleep
might not be related then - so you may have to go one by one /batches depending on how many you have
first check if it works the way you expect with no mods on?
Anyone know the minimum image size that can be used in the game for map images?
hey guys! Newbie here! Just downloaded a mod pack with ~40 mods. Framerate TANKED. Is there a load order tool or something I can use to diagnose this?
uhm nvm restarting Steam is always a good troubleshooting step guys lol
I think it's around 1000 pixels?
Look at the images in my prono mag mod, I think it has the minimums in that. Yeah, looks like 1000 is what I went with?
If you have issues with mods, try disabling them one by one or in batches to figure out which specific mod is causing the problems.
Do it on a new save to to prevent any issues on your current playthrough as removing mods can cause items to be permanently deleted.
After you find out which mod is problematic, report the problem to the mod creator on their workshop page.
Thanks Blair I just got it close by trial and error and resized the image some.
First mod, really simple stuff but its a start.
https://steamcommunity.com/sharedfiles/filedetails/?id=2575989887
Oh cool! Nice idea dude! ๐
Thats really cool!!
I don't recommend using mod packs; they seem to cause lots of issues and I've seen some real clusterfucks from people trying to use ones that are full of janky mods.
Just because a mod is in a mod pack doesn't mean it works, or works well, or works with the current build.
And just because a mod worked when someone made a modpack, doesn't mean it still works if there's been changes to PZ (as there have been many) since it was assembled.
What modpack was it?
Years after I had the idea, finally getting off my lazy ass and making a photocopier mod.
Hey, thanks for the thorough response!
anyone know where i should start for modelling a roll cage/crash bar for the front of vehicles? I think i have a solid grasp of what i need to do for the code, but i would like some advice on what files i need to be converting to and from, and if possible another similar mod i can deconstruct and reverse engineer
Looks cool but what use would it have in game? Just infinite fuel for fires?
that is a really cool idea
maybe if there was a pre apocolypse scenario someday when NPCs come back. that would be cool
Player made newspapers + fliers for one.
Has anyone considered a mod that allows you to overcome the Illiterate trait like other adaptive traits? Obviously, regular books are out of the question - but maybe children's books, found in bookstores and toy stores, etc.?
Maybe a custom Literacy skill that is tied to the ability to read books, and maybe the Slow Reader and Fast Reader traits?
The average character could start with a 5 in the skill, while Illiterate, Slow Reader, and Fast Reader have modifiers.
is it me, or do the sounds to any modded gun not work?
Where's the wenslydale?
nvm, weapon sounds are silent when you turn on ghost mode in necroforged..
anyone got any idea of what is wrong here?
LOG : General , 1629072005938> ### Merging distribution tables ###
LOG : General , 1629072005938> Merging distribution addon # 1
LOG : General , 1629072005938> Merging distribution addon # 2
LOG : General , 1629072005943> Merging distribution addon # 3
LOG : General , 1629072005946> Merging distribution addon # 4
LOG : General , 1629072005946> ###################################
ERROR: General , 1629072011067> ExceptionLogger.logException> Exception thrown java.lang.ClassCastException: class java.lang.String cannot be cast to class se.krka.kahlua.j2se.KahluaTableImpl (java.lang.String is in module java.base of loader 'bootstrap'; se.krka.kahlua.j2se.KahluaTableImpl is in unnamed module of loader 'app') at ItemPickerJava.ParseVehicleDistributions line:213.
ERROR: General , 1629072011068> DebugLogStream.printException> Stack trace:
java.lang.ClassCastException: class java.lang.String cannot be cast to class se.krka.kahlua.j2se.KahluaTableImpl (java.lang.String is in module java.base of loader 'bootstrap'; se.krka.kahlua.j2se.KahluaTableImpl is in unnamed module of loader 'app')
at zombie.inventory.ItemPickerJava.ParseVehicleDistributions(ItemPickerJava.java:213)
at zombie.inventory.ItemPickerJava.Parse(ItemPickerJava.java:147)
at zombie.iso.IsoWorld.init(IsoWorld.java:2081)
at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:255)
at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:212)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1629072011070> LuaEventManager: adding unknown event "OnPreUIDraw"
LOG : General , 1629072011070> LuaEventManager: adding unknown event "OnPostUIDraw"
Idk if those lines before the error are relevant but this is the error I assume you're getting when you start the game?
I get them when I finish making my character and get to spawning in
The error is on the java side of things but ItemPickerJava.ParseVehicleDistributions line:213. suggests there's a distribution that's scuffed
Also Merging distribution addon # 4 kind of worries me as table manipulation can get tricky
pardon my interruption, but it might be because of a mod that adds vehicles.
you could try uninstalling any mods that add vehicles.
is there a mod that disables or changes the jump scare sound effect when u see a zombie
There are many, there's one that adds the alert sound from MGS for example
i just want one thats either gonna turn it off or make a far less loud and jarring sound
but i can't find one on the work shop, i dont think i am using good terms to search for it
You can go into sound options, advanced and see if there's any particular one there that allows you to reduce the panic sound to 0
Could be one of these
thank you
There's this mod called alarm check mod which lets you check for Alarms in houses and vehicles, for it to work you need to find a magazine that teaches you the skill, however it doesn't spawn as often anymore thanks to an update, I wanted to change the spawn tables for the item and I guess this is the correct lua to modify.
Can anyone give me a hand with it and let me know if this is it and what values would be appropriate?
The mod your describing is https://steamcommunity.com/sharedfiles/filedetails/?id=2459061763 Its a bit outdated atm due to some mod dependencies that no longer apply but it does what you wanted with overcoming illiterate trait.
How do I use getClassField(object, fieldNumber):setBoolean?
It requires a parameter of ObjectBoolean, which is a Java type I think. Any ideas?
Not sure I get the question
Booleans are either true or false
What are you going to use it for?
I need to set a field for haveElectricity, since the setHaveElectricity function doesn't set haveElectricity.
It throws when I attempt to set it to true like this. It's wild. I just want bool to go true. ๐
The fact it's ObjectBoolean and not a Lua boolean type is causing a throw. Am I missing something?
Could it be because it says if classFieldName ~= (approximately equal) "haveElectricity"?
Sounds like that should only have two states and not an approximate value
~= is not equal, isn't it?
no, ~= is approximately equal
What the fuck
!= is not equal in java
In fact I don't think ~= is an operator in any programming language, but I might be wrong
nvm, it is ~= not equal in lua
You're wrong, sorry. ~= is standard for Lua non-equivalence. The 'not' keyword prefix makes me sick so I use ~=
Yeah, it's just a nightmare. I can't set the variable using the function, I can't set it with this function either apparently. I checked Kahlua for conversion stuff but didn't have any luck either.
Is that part in your screenshot the only reference to this bit?
Yeah, this is the only spot I need to check. It's an IsoGrid I'm accessing the classfield of to get haveElectricity, but I can't set it.
if it is private you can't change it like that
๐ I thought not.
So since the actual function to set this variable doesn't set this variable, am I stuck?
you'd have to bug Nasko to put it in the pipeline to make that public
or rewrite the entire generator code into lua - and blackball the vanilla generators
so not stuck - but definitely alot more work
but you'd not hit anymore snags and youd get to do whatever you wanted
also not sure why 'setHaveElectricity' doesn't actually have a case to set to true
The only thing it does is set each iso light on the tile to update. It sets the variable only to false.
I put a bug report on the forums but I don't think anything will come of it. :/
Couldn't you use isoGenerator.setSurroundingElectricity ?
not itself but as an example
Is there any way to force a lua reload mid game?
@sour island
function ISBatteryBankTimedAction:setSurroundingElectricity(square)
local var2 = square:getX() - 20
local var3 = square:getX() + 20
local var4 = square:getY() - 20
local var5 = square:getY() + 20
local var6 = math.max(0, square:getZ() - 3)
local var7 = math.min(8, square:getZ() + 3)
-- for var8 = var6, var7 do
for var9 = var2, var3 do
for var10 = var4, var5 do
if (IsoUtils.DistanceToSquared(var9 + 0.5, var10 + 0.5, square:getX() + 0.5, square:getY() + 0.5) < 100) then
local gridSquare = getCell():getGridSquare(var9, var10, 0)
if gridSquare ~= nil then
self:setPowerForObjects(gridSquare)
-- print("Powering: ", gridSquare:getX(), " | ", gridSquare:getY())
end
end
end
end
-- end
end
Rewrote it in Lua already.
self:setPowerForObjects.
function ISBatteryBankTimedAction:setPowerForObjects(gridSquare)
local shouldActivate = self.activated
-- 69 / 70 = haveElectricity
local classField = getClassField(gridSquare, 69)
local classFieldName = classField:getName()
if classFieldName ~= "haveElectricity" then return end
-- local classFieldVar = getClassFieldVal(gridSquare, classField)
-- classField:setBoolean(true)
end
I get the tiles fine, but for some reason the IsoGenerator sets the haveElectricity flag fine
yeah since it's private that'd stretch your scope to also defining your own have electricity and changing anywhere in the rest of the lua it is referred to
So every object in the game that has electricity, basically. :/
Checked. The generator does set haveElectricity on surrounding tiles.
actually some of it is refered to in java so no
I don't see where it sets it to true
I'm not legally allowed to ping Nasko am I? Don't know where I'd begin asking to fix this.
return this.chunk != null && this.chunk.isGeneratorPoweringSquare(this.x, this.y, this.z);
.... Hmmmmmmmm ๐
that's under haveElectricity
Can you pastebin the function for me?
private ArrayList<Location> generatorsTouchingThisChunk;

public void addGeneratorPos(int var1, int var2, int var3) {
if (this.generatorsTouchingThisChunk == null) {
this.generatorsTouchingThisChunk = new ArrayList();
}
for(int var4 = 0; var4 < this.generatorsTouchingThisChunk.size(); ++var4) {
Location var5 = (Location)this.generatorsTouchingThisChunk.get(var4);
if (var5.x == var1 && var5.y == var2 && var5.z == var3) {
return;
}
}
Location var6 = new Location(var1, var2, var3);
this.generatorsTouchingThisChunk.add(var6);
}
public void removeGeneratorPos(int var1, int var2, int var3) {
if (this.generatorsTouchingThisChunk != null) {
for(int var4 = 0; var4 < this.generatorsTouchingThisChunk.size(); ++var4) {
Location var5 = (Location)this.generatorsTouchingThisChunk.get(var4);
if (var5.x == var1 && var5.y == var2 && var5.z == var3) {
this.generatorsTouchingThisChunk.remove(var4);
--var4;
}
}
}
}
public boolean isGeneratorPoweringSquare(int var1, int var2, int var3) {
if (this.generatorsTouchingThisChunk == null) {
return false;
} else {
for(int var4 = 0; var4 < this.generatorsTouchingThisChunk.size(); ++var4) {
Location var5 = (Location)this.generatorsTouchingThisChunk.get(var4);
if (IsoGenerator.isPoweringSquare(var5.x, var5.y, var5.z, var1, var2, var3)) {
return true;
}
}
return false;
}
}
public void checkForMissingGenerators() {
if (this.generatorsTouchingThisChunk != null) {
for(int var1 = 0; var1 < this.generatorsTouchingThisChunk.size(); ++var1) {
Location var2 = (Location)this.generatorsTouchingThisChunk.get(var1);
IsoGridSquare var3 = IsoWorld.instance.CurrentCell.getGridSquare(var2.x, var2.y, var2.z);
if (var3 != null) {
IsoGenerator var4 = var3.getGenerator();
if (var4 == null || !var4.isActivated()) {
this.generatorsTouchingThisChunk.remove(var1);
--var1;
}
}
}
}
}
under isoChunk
not sure how they can help tho
given it's looking for a isoGenerator
Yeah, I know. It's all for power draw stuff to calculate fuel costs
Am I allowed to ping Nasko here to ask about it?
yeah but if you don't have a concrete suggestion it's most likely getting added to 'the list' but atleast that's something
I'd say making
zombie\iso\IsoGridSquare.class
public void setHaveElectricity(boolean var1) {
if (!var1) {
this.haveElectricity = false;
}
if (this.getObjects() != null) {
for(int var2 = 0; var2 < this.getObjects().size(); ++var2) {
if (this.getObjects().get(var2) instanceof IsoLightSwitch) {
((IsoLightSwitch)this.getObjects().get(var2)).update();
}
}
}
}
^ to actually have the ability to set to true - would be a solid ask
Yeah, that's what my forum post is about.
Would removing require 'Items/SuburbsDistributions' make an item spawn anywhere?
@iron salmon
zombie.iso.IsoGridSquare has a private variable called haveElectricity; this cannot be accessed since
it's corresponding function called shouldHaveElectricity only sets it to false and updates light switches.
Internally, there isn't an issue with the IsoGenerator code. For modders that want to add their own content,
there is a huge blocker since the code to enable electricity on a tile is inaccessible without using IsoGenerator.
The function in question does the following:
public void setHaveElectricity(boolean var1) {
if (!var1) {
this.haveElectricity = false;
}
if (this.getObjects() != null) {
for(int var2 = 0; var2 < this.getObjects().size(); ++var2) {
if (this.getObjects().get(var2) instanceof IsoLightSwitch) {
((IsoLightSwitch)this.getObjects().get(var2)).update();
}
}
}
}
The proposal:
public void setHaveElectricity(boolean var1) {
this.haveElectricity = var1;
if (this.getObjects() != null) {
for(int var2 = 0; var2 < this.getObjects().size(); ++var2) {
if (this.getObjects().get(var2) instanceof IsoLightSwitch) {
((IsoLightSwitch)this.getObjects().get(var2)).update();
}
}
}
}
Alternatively, removing the IsoLightSwitch update all together from setHaveElectricity and ensuring function purity.
๐ค
Thanks for the assistance @sour island
Big chief.
Thanks for the help guys
Sorry awpii I have no idea
it's okay, guess I'll never fix the mod anyways
There's got to be more distribution options I imagine
There is, that's not the issue
The issue is no matter what I change, the item will never spawn
Hydrocraft?
It's a big mod. Adds heaps of stuff, good code reference.
Guess I'll try it
I'm suspecting the issue is somewhere else anyways, but I'm not sure where cause the logs don't say a thing
Good idea. I should use hydrocraft as a reference.
require is supposed to force load order - i.e. require x before loading this file
I'm also fairly certain that mod is using the old distribution format so it may not spawn at all - there should be some pins with information on the new format
how do bottles of bleach mechanically work? is the value of how much bleach they stored as a percentage? is it a number of units?
item Bleach
{
UnhappyChange = 99,
Weight = 1.6,
Type = Food,
ThirstChange = -60,
DisplayName = Bleach,
Icon = Bleach,
Poison = true,
DisplayCategory = Item,
PoisonDetectionLevel = 7,
PoisonPower = 120,
UseForPoison = 38,
CustomContextMenu = Drink,
CustomEatSound = DrinkingFromBottle,
CantBeFrozen = TRUE,
ReplaceOnUse = BleachEmpty,
StaticModel = BleachBottle,
EatType = BleachBottle,
WorldStaticModel = BleachBottle,
}
Will have to look at the code for Item, though. It'd need to be decompiled
@drifting ore
i was thinking of trying to make a mod where you can use bleach to disinfect water (as is possible irl) but i would need to know if bleach bottles actualy support non full amounts of bleach in them.
It should hold 1.6 units of bleach
ie can you have a half empty bleach bottle? what about a 73% full bottle of bleach?
Probably. If not, you could look around at the Water Bottle item stuff and see if you can retrofit it to poison you
the way you take a partial quantity of a non container item like food seems to be using ; instead of =, though idk for sure what quantity the units correspond to.
see also these recipes: cake (butter component) and pasta/rice
i still don't know exactly how to use it
Is it possible to mod hunger and thirst to realistic times? I know it's for gameplay purposes, but having my guy be starving every 12 hours gets annoying after a while. I know it defeats the purpose since food can be relatively easy to find depending on where you are, but it would be nice to not worry about feeding my guy so often unless it makes sense.
So I've learned Vehicle Recycling CAN work with EHE, but the amount of propane needed to actually scrap the crashes is over the amount the torch can handle. A guy found a code in the VR mod that you can edit to get the crash to work, but it affects all vehicles and not just helicopter crashes.
It's line 70 in the RecycleVehicleMenu.lua; propaneNeeded = propaneNeeded + 0.65
I see in the code he's also added a bit after that, that accounts for more than 100 propane needed, but I don't know if it actually works.
In coming versions are they phasing out things like VehicleDistributions to migrate everything to Procedural?
How much does a normal car take to scrap?
ah alright
I'll try and do that
Lemme check
Hm an update to one of the mods broke my game. I'll have to figure it out later. I'll let you know @sour island
Try resubbing to EHE and EasyConfig + Conditional Speech/SwapIt (if you use them)
Should force steam to update
Ight
Had to work around sandbox+ not playing nice with the menu.
And had to update EasyConfig a few times yesterday.
Looks like that worked
Looks like 38/100 for a regular car.
I'll have to spawn in a helicopter here in a sec
Or it's around that much
Different car is giving me 36/100
Think it's dependent on it's weight
woah, no kidding? That's an awesome coincidence! Better than how Illiteracy is handled in the game currently.
So how do I get a helicopter to spawn in and crash so I can test this? @sour island
I have debug on atm
If you use AUD (aiterons user debug) you can spawn in vehicles
I don't have a test setup for crashes
Ah
I'll take a look at what is causing the helicopters to be worth so much fuel
Does the "Get the choppah" work for spawning your helicopters if I have the vanilla ones disabled?
No, that'd spawn a vanilla one
If you have debug on and have the test toggled from the options menu you can spawn then with the number keys
But they'd only crash if the weather was bad or your save was old enough
Alright, I'll try and get one to crash later or just get the vehicle spawning mod. Cheers.
yes
The recent update moved most of the loot to the procedural loot stuff, that's why those entries are ignored now. You'd have to insert into the ProceduralDistributions now.
See GameDir/media/lua/server/Items/ProceduralDistributions.lua for the lists and then
table.insert(ProceduralDistributions.list["LivingRoomShelf"].items, "yourItem")
table.insert(ProceduralDistributions.list["LivingRoomShelf"].items, 10.0)
Thanks! I'll try that
The sound you're looking for is under the Zombie tab, right near the bottom, along the lines of "Sound made when zombie surprises the player"
Thank you very much my friend
Is there anything obvious in this error message as to what happened that would crash my game exactly?
I've got the expanded helicopter event mod and the crash came during an event but the error doesn't seem to be in conjunction with that (or i could be wrong)
also, i've had 2 crashes now, both errors looked like this
Is it possible to check if a given zombie is 'male'?
isFemale boolan that is inherited from the IsoGameCharacter
anyone have a small guide (or insight) into skills for the new system in 41.53?
Updating Better Literacy and ran into a wall. despite having it set to a passive in the perks.txt below, it's still starting at level 0 and without the exp boost.
VERSION = 1,
perk Reading
{
parent = Passiv,
translation = Reading,
passive = true,
xp1 = 1500,
xp2 = 3000,
xp3 = 6000,
xp4 = 9000,
xp5 = 18000,
xp6 = 30000,
xp7 = 60000,
xp8 = 90000,
xp9 = 120000,
xp10 = 150000,
}
screen shot of it
So this line would be obsolete and I would have to adapt it to what you showed me right?
table.insert(SuburbsDistributions["all"]["LivingRoomShelf"].items, 2);
yea
Awesome, thanks Tiaxx
Last question, should I change require 'Items/SuburbsDistributions' to require 'Items/ProceduralDistributions'?
oh ok, cool
you don't have to use [""] either, can just be x.y.z
Something like this would be okay? just wanna make sure, I still will test it now @gaunt pendant
and I will remove the require blablabla part
Depends on what the table's name is, could be reserved chars ๐
I loved your literacy mod. Looked at a lot of your code in IsReadABook for when I made mine. When you finish it ping me so I can make my mod compatible with your updated code.
i'll send you the updated files now for UsReadABook then. everything for the update is mostly ready. just need to figure out why it isn't being marked as passive
Was looking at AMP out of curiosity. Any idea what RCON protocol PZ uses? Perhaps STDIO?
Item doesn't seem to be spawning still, do you think something might be missing?
how are u testing this? You raised the chance to smth crazy to make sure it's not just bad loot rolls?
Also, any errors?
no errors, didn't increase it to something crazy but I did search a few maps using cheat teleport
For reference to what I'm talking about:
https://github.com/CubeCoders/AMP/issues/79
Don't even know if this is the best place to ask this question. Apologies if that's the case.
Actually game is crashing now that I removed the required thingy
I'll add it back
ook fixed, it's working
Thank you so much @gaunt pendant
So I'm trying to upload the mod to the workshop but it keeps telling me that the folders inside are unrecognized.. even though it's following the schema shown in the game
Would anyone be able to help me with this?
Hey @sour island @craggy furnace
Is it possible that there is an error in the event frequency option?
I have played all this time with the "rare" setting and today I tried the "uncommon" setting and certainly the first option has more events than the second.
I would say try resetting the events from the options menu. It may be that your scheduler broke during the updates.
Also depends where you are in the world, some times events could target zombies only, but let us know if it changes.
I started a new game today with the "uncommon" setting and that's the feeling I've had. I've always played with the "rare" setting.
Maybe @worldly olive could say something about this, she has played more than me with both options.
It's not an answer to your question but it's about your mod:
Your ReadingSkill.lua has
extraskills.PerkList["Passiv"] = {};```which would overwrite a previously added passive skill.
```lua
ISToolTipInv:setItem```Seems unreliable to me, not triggering the first time the mouse goes over the item, or something like that. You also have
```player:getModData().proflist = proflist;
player:getModData().profskills = profskills```which may risk overwriting those tables if they are used by any other mod.
Your ReadingSkill.lua has
extraskills.PerkList["Passiv"] = {};which would overwrite a previously added passive skill.
The extra skill system by soul didn't have passiv as a catagory, so my mod had to add it. The update in the new patch [41.53] changes perks from an enum to a static made before scripts are read, so the literacy skill mod is being untied to the extra skills.
ISToolTipInv:setItemSeems unreliable to me, not triggering the first time the mouse goes over the item, or something like that
Seems to work in tests for modded books every time? First time over a modded book seems to always add pages to it.
player:getModData().proflist = proflist; player:getModData().profskills = profskillswhich may risk overwriting those tables if they are used by any other mod.
tested with better lockpicking which also does the same and both worked together with no issue. Tho as mentioned above, I ditch the extra skill framework (Thank you Soul for your hard work on it before Indiestone added a way to add skills), so that part of the code is now gone.
Ohhh yeah, I'm already phasing it out. I didn't want to nuke current saves for those who want to finish them, that's the sole reason I kept compatibility for 41.50
But the fast drop of support was intentional and modders using my system that also want to keep supporting 41.50 can do that easily
yeahhhhh. pretty sure my update will nuke any saves of people who haven't updated
I think building time still has it as a require?
Yeppers
name=Soul Filcher's Building Time IWBUMS
id=BuildingTime
description=More masonry and metalwork build options.
require=ExtraSkillsSystem41
poster=poster.png
pack=sfbuild
tiledef=sfbuild 1985
yeah, I forgot to remove that line, but don't worry it will ignore extra skills system completely if you're running 41.51+
skills system itself will only do anything if it detects 41.50
Ah, gotcha.
I have a question here, the reset events option should be used each time a game is created? I mean lets say I use it, I create a game, and I die, I create again a game, for that should I do the reset again?
Btw didn't expect the helicopters to crash on my face haha thought they had to crash outside the chunk.
Reset is only used when you have an issue. When you start a new game it goes through the same process under the hood.
Good luck with the coming wave of zombies lol
anyone know where the character creation (between when you hit the okay on the creation menu and it going to the game) is?
is it in lua or java?
hunting for it to try to fix the perk issue. Justin helped and found the menu part so that's fixed. Issue is going from creation to the start, you start at level 0 still
Seems to work in tests for modded books every time? First time over a modded book seems to always add pages to it. _
Hmm ok then, I just tried it for something and it had a problem for some reason >>.
The extra skill system by soul didn't have passiv as a catagory, so my mod had to add it
You can do one of these instead:
if extraskills.PerkList["Passiv"] == nil then
extraskills.PerkList["Passiv"] = {}
end```or
```lua
extraskills.PerkList["Passiv"] = extraskills.PerkList["Passiv"] or {}```
_tested with better lockpicking which also does the same and both worked together with no issue_
They set proflist and profskills within
```lua
if player:getDescriptor():getProfession() == "burglar" then``` and
```lua
elseif player:HasTrait("nimblefingers2") then```. That your mod does not overwrite this, and instead theirs overwrites yours, may be because i comes before o in the alphabet, so Better Literature loads before Better Lockpicking? Your mod would conflict with a mod that loaded before it.
Hmm ok then, I just tried it for something and it had a problem for some reason >_>.
Might be because to read books, you need to hover over it then right click, which would refresh the tooltip. might be why it worked for books when I did it.
Are there any mods that help add renewability to the game without anything game breaking?
I guess I should ask if there are Quality of Life mods
Yes
@jagged shale Build 41 IWBUMS or other?
Trait De-Cheesing
no clue why thin skin is still +8. tends to be the cheesiest of the cheese due to a single scratch being your downfall a lot of the time. A single bad encounter is usually zombie-fied afterwards.
I see high thirst is gone, lol
Sounds like we have radically different definitions of cheese here.
The next step is using the new global mod data stuff to lock your profession, traits, and appearance selection so when you respawn they get reassigned. ie no "temporary suicide speed looter" builds. Albeit all I can do is half-ass setting this up until MP is available. (bodily resurrection at death, a la the Riverworld novels, is part of my server lore, so respawning as the same character makes sense in-universe)
Yeah that would be a good thing on a pvp server. Keeps players from abusing the respawn mechanics to get there stuff back.
As well as, if we go with no-usernames above character heads, being able to change your appearance at respawn could be abused? Albeit with how hair and facial hair can change, not so much of a consideration.
But roleplaying wise, given the in-universe respawn logic, you're the same person.
This sorta of bananas off the rails plans is definitely part of why I wish there was a way the server could disallow people from joining if they had less than 100 hours of playing PZ ๐
any no brainer perks that have little to no effect on overall gameplay like thin skin and high thirst is pretty much cheese
you play with bottles to auto-drink water: high thirst is free points
point of the game is to not get bitten or attacked in the first place since there are (unless you get really lucky) no second chances: Thin Skin is pretty much free points.
High thirst, Thin skin, smoker, and weak stomach (since all you need to do is make sure to cook your food), ez points with little downside. Same with slow reader too.
Tho smoker has been a bit of a gamble since RNG has said fuck you to me and given me no smokes before. Usually there is enough on zombie loot tables to not matter.
I have enhanced zombies, so Thin Skin is in the mix for now.
real quick, is there anything special like /n i need to do to have line breaks inside the mod.info description field?
@sour island I had a helicopter even and it started a cascade of errors, (Those red box numbers) I exited the game and tried to load back in, but the game soft crashes (stucks at Click to start). Here is the log, when I tried logging back in.
Tried the reset option as well, no luck.
The game version is 41.50 btw
Removing the mod from the save allowed me to load back in.
yeah, this is is fucked. I just had hundreds of cars fall out of the sky fromnowhere after loading in.
Sounds like an old bug - try un/resubscribing to the mod.
Also you may want to do the same for easy config (and if you have swapit or conditions Speech those too) I did a face lift to EasyConfig before the big EHE update and steam doesn't like it when mods get updated alot it seems.
@drifting ore
๐
It was similiar, a bunch of cars, car wrecks and just vehicles everywhere.
I know the game assigns a random car if it can't figure out what the vehicle is supposed to be
I cant test if re subbing would work, i reverted to a backup save I made shortly before the bug happened, but hopefully it would work
I see these errors:
WARN : Script , 1629194225305> VehicleScript.Loaded> vehicle "Bell206Police" extents != physicsChassisShape
WARN : Script , 1629194225306> VehicleScript.Loaded> vehicle "Bell206PoliceCrashed" extents != physicsChassisShape
WARN : Script , 1629194225306> VehicleScript.Loaded> vehicle "Bell206PoliceFuselage" extents != physicsChassisShape
ERROR: General , 1629194225307> ExceptionLogger.logException> Exception thrown java.lang.ArrayIndexOutOfBoundsException: 2 at VehicleScript.LoadVector4f line:1028.
ERROR: General , 1629194225307> DebugLogStream.printException> Stack trace:
Which I think are the new parameters added in .53 I think.
But it says warning so I don't know if the script-handler would refuse the script
Hmmm, I am still on .50 because many mods I use are not updated and the build is generally quite stable.
I can do some testing to see if there's issues with .50
Hey @sour island @craggy furnace just to understand if it could be a bug or an expected result, with one of the latest update of the mod the configs were set back to default, so I changed them back as I was using them, and I also used the "reset events" check because my mind told me that I had to do that to re-config the mod (probably my first mistake), but the thing is, my game was a 3 months game and I've played almost for a week (in-game) now since the reset and I got an average of 2 events per days (when it is configured as "rare") so after all of this context my doubt is: the mod is supposed to send all the events equivalent to the amounts of events that should've had happened during the three months and that's why I'm living in an airport or something could have happened and the events won't stop?
The scheduler uses the current frequency set for new events - but I did rewrite it to calculate off hours rather than days - which allows for events to "roll over excess hours". Prior to this the soonest another event could occur was the next day. If you're on rare or common though there should be several days between each wave of events.
In rare it was like that before touching the reset events option, I had an event every a certain amounts of day. What I think it is happening here is that I used that option on a 3 months game and the mod is: "Oh, this game is 3 months old and has the reset events option, I have to send all the events that should've been sent during those three months"
But I'm not actually sure, just a theory.
Hmmm I think you may be right sort of
it's calculating based on hours. and shifting the days forward - rolling over hours to after the current time - but it's not checking to see if the scheduled day is on or after the current day
Good catch
I get awful framerate if I zoom out at all on latest... Never had this issue. Beast rig. Happens in vanilla and modded... any ideas?
Pushing an update now - alternatively, you could do another reset with the config for "startday" as your current day.
Oooh, nice to know!! thank you a lot!
startday is the days played + 12 months of sandbox configuration right?
I get like 1/4th the performance with this latest PZ version than I did with previous... I really dont understand why.
No, startday is just the days survived so far
I'd ask this on #old_techsupport
So you'd want to adjust both start day and cutoff day
unless you play with never ending events
then just that and startday
okay thanks
I just avoid that because it looks like 99% bot responses
Those are for people asking about mods in there
I scrolled up for a while but we'll see
No mods, clean install, watching a powerpoint presentation while playing...
:/
Cant really test or update my stuff
Yeah I play with them never ending, got it, thank you for the info! awesome mod btw!!
Thank you, let Dito know too.
ohh my god
what is happening
is that zombies replaced with choppers
nope, something was preventing the heli from completing the crash process
so it kept retrying
endless resources
Endless resources if you have enough fps to do it ๐
wtf I thought Fragmotion was free
Is there a way to tell which mods work with the current build 41 version?
Usually you can check the mod description to see information like that
most of the good mod authors are good at documenting what a mod is or isn't compatible with
It is, you just have to enter in a prayer every 7 days.
Is this what I think it is? collectibles for PZ? ๐
yass
100% correct
They're gonna be findable on zombies rarely
just the first 151
(plus missingo)
Are they like furniture that you have to place in a tile or will be items like Spiffo?
Yep you can place them
Fucking awesome!
Should take me the rest of the day to do, hopefully only a few hours
Probably too much but is this going to be with 3d models as the 3d models that will come in the 41.54? ๐ค
Maybe I can add the functionality so that you can right click them and they'd play their "cry"
No I'm using the original gameboy color sprites
Got it! will be waiting for this to to the whole collection, gotta catch 'em all ๐
I'm not gonna do the entire pokemon catalogue unless someone paid me to do it
๐
If like this first collectibles mod is succesful I might do the second gen
Haha also having the 800-900 pokemons would require the entire West Point as a base.
Anyway, it is awesome to have more collectibles in PZ, gives much more fun to exploring
lol I saw on the reddit someone recreated the pokemon Kanto map
imagine they are all ghost types, even the trainers if they're not careful
funny you mention this - I have been tempted to learn how to mod PZ to add collectible comic books to the world. Had to have been one or two comic book stores in the area of Knox Country, after all
Forgot to mention this before but most TVs required you to be on channel 3 or 4 to view VCR feeds - perhaps it would be easier to make this the same? Turning to channel 3/4 plays the inserted tape?
I am new PZ modding.
Recipes look pretty easy to add in for existing items, but I am wondering how to add models for new items and have them be related to either existing or new skill books.
Anyone know of a github repro that I could look at for an example?
so for adding food recipes, in the scripts folder of my mod's folder, i need a "myrecipes.txt", but what is the file name for the new food item?
is this ok?
these are my scripts, how are they looking? are they gonna work?
from what i can deduce i think this is just gonna combine water saucepan and an egg to magically create a boiled egg
well fuck me i guess, modding chat's dead and i cant figure it out
Microsoft word :o
@dull mauve use notepad++
Anywhoozle. Boiling them is a different thing
I'll look into it though
You may need to make sure the saucepan is also a result of the combination so it isn't totally consumed @undone crag
Anyone know how would I go about creating new models for hairstyles?
There are models in the source. It's either .FBX or .X format; either way you can probably find an importer for .X format if it's that.
.FBX is easily imported into Blender for editing, so take one that exists and make your edits off that and save back to the files
Is that same for the vehicles?
I noticed that there are .txt files with vertex info.
Similar but the system for implementation is quite different
Yeah those are for collision models I think.
... I could be wrong since you can rip shit off the car
With hair it should be a lot more simple
Don't forget to check the actual files for implementation; there should be a hook somewhere to add hair or something, I dunno.
Look up one of the hair mods and reference their code
Yeah, I'll do that
If you're very inexperienced with Lua I can help if I can.
so I just looked at your script and
yeah it will theoretically create a boiled egg from combining the two, it won't actually show up as a cookable thing
but
you have the result as boiledegg, but the item name is boiled Egg so its not gonna work. the names need to be the same there
also you should have
keep WaterSaucepan,
so it doesn't get destroyed XD
That would most likely be why.
Increase your pc specs or reduce game load
Never heard about that - it currently creates a "AV1" channel and autoplays, dunno how it could get more immersive, really ๐
Where can I find the zombie outfit names for the zombie Soldiers? It seems when you go to Fort Redwood or any other military base, none of the zombie soldiers carry handguns in holsters or weapons on their back, Just wanted to change that ๐
AV1 is the equivalent. I just meant maybe it would be easier if AV1 was a permanent channel - right now it doesn't return to the chanel I was on previously.
But yeah in the early 90s you had to tune to a low bandwidth channel for AV1/2 to work.
It's a little more complicated on the implementation side: A Zomboid channel broadcasts on every radio device. I create a unique channel (based on TV object id), which is outside of the regular frequency range, when a tape is inserted. Creating channels for every TV object in the game wiuld just clutter that List and slow things down
hm
Don't want you (especially in multiplayer) tune in to another TV's vhs broadcast ๐คฃ
Well, it works ๐คท
Well I doubt they are limited to broadcasts, if they implement it now. At the time of writing the mod, that was the only way I found to make a TV play smth though.
I also tried interfacing with the radio/tv UI windows, but no dice to change anything there. All in java :(
the radio/tv guid tables are something I haven't had a chance to look into - kind of avoiding guids for now
but the interfaces are usually all Lua normally?
It's been a while, but I recall running into major trouble there
The stuff is modularly created based on the device's properties (e.g. battery driven, volume controls) with no room for extension
i was looking into doing the same as well for a more roleplay approach, but i keep avoiding it because it will have to be redone after the mp update again
If it doesn't work when the MP update drops (I'm somewhat confident that my method will be evergreen), then I still have already done most of the work already?
I do a fair amount of work on MP mods that I consider to be foundations that will later be finished out and such.
On the other hand, yeah, I certainly wouldn't encourage anyone to work on MP mods without MP ๐
So with firearm attachments, what tool can I use to get the proper placement on the firearm? I'm talking about the offset & rotate cords. I have no issues with attaching any mod to a firearm, but I would like it to show on the firearm instead if it being invisible.
Found it!
u wot m8 @modest nebula
Recipes consume the items you use to make the end result.
Flag them with keep so you don't destroy your pot.
Ok but so what though?
Dude, I'm like, such a pro at zomboid modding already dude.
Oh
Other guy
Excuse me for the ping; thought you were the poster of the recipe thing
:o
What mods are yours?
It is a secret I will never tell, approximately.
are evolved recipes for food only?
experimenting with dynamic weapon crafting
the base recipe system is a bit mangled for it - but being able to add specific ingredients would be great
Anyone familiar with messing with challenges? Why would functions added to OnGameStart not fire on CDDA?
as far as I know yeah, evolved recipe code is for food. It does accept non-food items but I don't think you can add them later to the base item
Thanks
I wonder why recipes don't have some way to pick which of the items gets used - or am I missing something?
Are there any up to date mods that add realistic things like going to the bathroom and other things to make it more micro-managing?
what do you mean?
When you craft a recipe and it can use multiple types of items you can't really pick which are used
you can. If I remember correctly you can do that in the function used by OnPerform or whatever the recipe field is called
oh?
You run a for loop and check the items used
you mean OnCanPerform?
Idk if that's what I need
My recipe is any weapon + any weapon
but there doesn't seem to be a way to dictate which are used
Sorry, I meant OnCreate
Do yuo meant to actually allow the recipe to use them all?
Check the digital watch recipe
to clarify - any 2 weapons
recipe Dismantle Digital Watch
{
[Recipe.GetItemTypes.DismantleDigitalWatch],
keep [Recipe.GetItemTypes.Screwdriver],
Those are functions, that return what can be used in the recipe
I already can grab weapons
one checks for the screwdriver item tag and the other if the watch item has digital in its name
my issue is there's no way for the player to pick the 2 weapons for the recipe if he has more than 2
Ohhhhh, well, maybe make the function grab primary and secondary items?
hm
and if both are weapons BAM
that's a better idea
I was going to make another util mod that let you pick things lol
thanks, i was thinking of making that but was to lazy.
is there some i way i can browse throught he lua of the game engine?
wait is it possible to overwite lua?
Well thats what happens if you make a mod with items of similar names
But I believe mods like item tweaker prevent that
is there a list of lua events
Hey which mods donโt immediately destroy my game
Iโm on Mac and playing the latest build
Chuck please add a brick as a weapon so I can glue two bricks together with a rope in between
Oh, makeshift flails. That'd be cool.
How do I set things to spawn at the secret base specifically?
Is there a mod that adds a protective bumper like those seen on the front of trucks?
- Authentic Z Update 8-19-20 -
No More Room in Hell Survivors Batch!
- Bateman
- Jive
- Wally
- Molotov
- Hunter
- Roje
- Badass
- Butcher
Motorcycle Helmet variants!
- Over 15 different designs!
- Can be found on a new Biker zombie (found at bars and rare general pop spawns)
-Hit list #2 is updated.
-Hit list #3 is created, yet is empty, to leave room for expansion.
-New Hit list distributions : Hit lists can be found in the world again.
-Removed the Pennywise "Dufflebag" Hairstyle. Made it exclusive to the future Pennywise Zombie.
-Added the Big Afro Hairstyle for the Jive zombie. You can choose to have it in the creation menu.
Right now the process only seeks out weapons but it does use Soul's suggestion of relying on primary and secondary hands ... I guess I could technically use any item. I still have to work out merging weapon stats.
๐
Hey Soul Filcher your mods are rad
what revision is PZ's lua framework?
it's up to 5.4 now, but I'm assuming PZ is on 5.3 or earlier since it went into EA a long time ago
PZ uses a modified Lua to begin with - but I'd wager 5.3 is the base
Anyone able to help me compare the script for orange soda vs this modded item in order to help me understand what element might be causing the game to throw an error when attempting to fill the empty bottle? I would assume it's to do with maybe ReplaceOnUseOn or something but i can't see what the issue actually is. I think the mod was an old mod someone updated to get it working in 41.50 as part of the orphaned mod pack.
Empty Mod item SodaBottleEmpty:
CanStoreWater = TRUE,
Type = Normal,
DisplayName = Empty Soda Bottle,
ReplaceOnUseOn = WaterSource-RS.WaterSodaBottle,
Icon = A21SodaBottleEmpty,```
Vanilla item PopBottleEmpty:
```Weight = 0.1,
CanStoreWater = TRUE,
Type = Normal,
DisplayName = Empty Pop Bottle,
ReplaceOnUseOn = WaterSource-WaterPopBottle,
Icon = Pop_empty,
MetalValue = 5,```
Full Mod item WaterSodaBottle:
```Weight = 0.8,
IsWaterSource = TRUE,
CanStoreWater = TRUE,
Type = Drainable,
DisplayName = Water Bottle,
Icon = A21WaterSodaBottle,
UseDelta = 0.1,
ReplaceOnDeplete = RS.SodaBottleEmpty,
ReplaceOnUseOn = WaterSource-RS.WaterSodaBottle,```
Vanilla item WaterPopBottle:
```IsWaterSource = TRUE,
Weight = 0.8,
CanStoreWater = TRUE,
Type = Drainable,
UseWhileEquipped = FALSE,
UseDelta = 0.1,
DisplayName = Water Bottle,
ReplaceOnDeplete = PopBottleEmpty,
ReplaceOnUseOn = WaterSource-WaterPopBottle,
Icon = Pop_water,
CustomContextMenu = Drink,
CustomEatSound = DrinkingFromBottle,
StaticModel = PopBottle,```
Do you have the error or what the ReplaceOnUseOn is?
tbh i might just remove the full watersodabottle and replace it by telling the empty to just convert it into a normal water bottle
[19-08-21 22:43:17.313] LOG : General , 1629384197313> -----------------------------------------
STACK TRACE
-----------------------------------------
function: onTakeWater -- file: ISWorldObjectContextMenu.lua line # 3061
function: onMouseUp -- file: ISContextMenu.lua line # 95.
[19-08-21 22:43:17.313] ERROR: General , 1629384197313> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: setCondition of non-table: null at KahluaThread.tableget line:1689..
[19-08-21 22:43:17.313] ERROR: General , 1629384197313> DebugLogStream.printException> Stack trace:.
[19-08-21 22:43:17.315] LOG : General , 1629384197315> -----------------------------------------
STACK TRACE
-----------------------------------------
function: onTakeWater -- file: ISWorldObjectContextMenu.lua line # 3061
function: onMouseUp -- file: ISContextMenu.lua line # 95.```
that's all i have in my logs
something's probably just misconfigured
it's trying to setCondition on nothing
think me replacing the replaceonuse with the vanilla water bottle would circumvent this? it's not like the bottles look that different.
๐คท
essentially putting ReplaceOnUseOn = WaterSource-WaterPopBottle, instead of the call towards the RS one
why did the modder even add their own soda bottles that can be filled with water?
idk, variety
oh
it's like
expanded food items including a bunch of booze
so i guess it's actual seltzer water
I kind of hate that variety of icons is handled with different types entirely
the scripts aren't the same length though
yeah there's some extra stuff
could it be the missing lines are what's messing it up?
it's entirely possible
like maybe it's like "hey this isn't a drink! what gives?"
the customcontextmenu bit especially
delta I think also stands in for condition/amount left
yeee
i'd honestly prefer not having the soda bottle give a unique empty since i have some packing mods that let me pack empty and full bottles in lots of 24 and the custom ones aren't included by their recipes
same with the water refillable booze items in this same mod which, surprise surprise, have the same error
so i might find vanilla equivalents and redirect the empties to convert to the vanilla water bottle that is the closest match
that way when emptied again they turn into vanilla items
in theory
I mean - I always suggest more work - but if the point is variety you could play around with the recipe handler to hotswap icons when needed
so you only have 1 script - the vanilla one
tbh i don't wanna break anything by messing with a bunch of stuff i'm not versed on, so the simplest tweak that changes the fewest lines is the one i'm drawn towards
is there a shaderman / shaderwoman around here? i see PZ's got opengl pixel/vertex shaders but i'm not sure how it all fits together since it's a mix of 2d and 3d, and learning this games pipeline on my own will take a bit longer than finding someone who's played around some
since i have a save in progress with these broken empties i think this modification should hopefully guive me a way toconvert the broken items to working vanilla ones while also making in future any non-empty bottles just convert straight into the vanilla empty when drank
You can also check in to #modeling
Which mod is this?
thanks, i'll do so. i've got a nice nightvision pixel shader that I can bring over from a previous mod as a first project, and could interface with the existing script eris made with enough patience
i believe it was like home for orphaned mods or something
Thanks!
given that half the booze added by this mod defaults to giving the vanilla empties, i'd prefer it if it consistently just did that instead of being weirdly inconsistent
@winged phoenix what is the module for the modded items?
I've had this issue too where some would work with my own module and some wouldn't, so I moved themall to Base
at this point i'm realising that this mod having a bunch of extra empties that don't function like vanilla ones do is dumb
so i'm removing them from the distributions lua
that and redirecting all the things that turn into the modded empties to vanilla equivalents
i hope it works tbh
problem being i don't know how many lines i need to remove to make sure that i don't screw up the distrib
i think i have to remove two lines, one with a number and one with the item name
such as highlighted
if i'm wrong please screm at me
oop, wrong way around
imagine that';s hightighting shifted down by one line
thank you for screm, i figured it'd be way too easy
yee i noticved my oopsie immediately
just by scrolling to the bottom and going "oh wait its shifted one line derp"
okay i think i got it
@winged phoenix is that ... notepad?
shh i have notepad++ i just forget to set lua to default to it
๐
also porting my pixel shader will be easier than i thought..... there's already nightvision shader in screen.frag
@nimble spoke ran into an issue with using hand held items for recipes ๐ฆ
occasionally it grabs the same item twice
which I thought recipes would not allow?
I guess I can test if the recipe is possible and just have it performed on the held items...
kind of hacky but should work
If I can dynamically set attachment points I could conceivably ducttape a hammer and a screwdriver together to make a multitool that stabs
uh oh... i think i mighta done an oopsie at some point
getting black screen on launch, hanging, log file's last entry is loading WeatherFX
wonder what's going on
@sour island how exactly are the items grabbed for the recipe?
you can use this tool to check for most syntax errors, (won't catch semantics errors, it's not intellisense by any means)
keep [DCW.AnyWeapon]
function DCW.AnyWeapon(scriptItems)
print("DCW.AnyWeapon1: ")
local allScriptItems = getScriptManager():getAllItems()
for i=1,allScriptItems:size() do
---@type Item
local scriptItem = allScriptItems:get(i-1)
if (scriptItem:getType() == Type.Weapon) and (not scriptItem:getTags():contains("Improvised")) then
print(" - "..scriptItem:getDisplayName())
scriptItems:add(scriptItem)
end
end
print(" =======================")
end
Hmm could it be the keep?
maybe, you should not keep them anyway
Welp, so far nothing stands out yet. Gonna check the other scripts.
something is definitely not functioning as it should. I know i tried hitting f11 ingame when the error thing popped up but i wasn't in debug mode so it didn't pop, before i quit out to tweak recipes and stuff
i might launch in debug mode to see if that at least helps me figure out the heck is going on
Mad Max vibes
One of the reasons I wanted to try and keep the items
But checking for types in a modData might work fine
should i stay here in modding or move to techsupport btw
cos i'm not entirely sure what exactly is broken
techsupport doesn't cover mod issues
good to know
i'm gonna try moving the mod in both my steam folder and the local user folder out and re-launching to just make sure this is my tweaking and not some other coincidental issue
Okay, cool, now i knoa i definitely did a fuckup
wish it were more verbose about it in the logs tbqh
'cos the logs are literally useless for me figuring out what is making it hang
the lua I modified to remove empties from item distribution lists checked out clean on that website
steam mods override local
you will have to unsubcribe from the mod you're trying to edit
Don't worry i already made all my modsa s local copies to prevent the workslop from updating them
i did that as soon as the new update dropped since i knew some mods might break
you will have to unsubcribe or else the game will load the steam version based on mod ID
I did
ok
sorry, i wasn't too clear there 
I've had so much annoyance with steam workshop mod updates before for other games so i've been mostly using the workshop downloader (a website that takes the file from steam workshop and yeets it at you as a zip) to prevent me forgetting to unsub
also make sure you have all your } and ,
i'm gonna try and put the mod back in to see if it still occurs, then i'll get the fine tooth comb out to search for missing ,}
oh, wait, is there any special stuff that i need to know for having modified/added a texture?
i opened one in photoshop to represent packed bottles and hue shifted it to not be orange, and did a simple export as png
i notice that it's surprisingly small in filesize compared to the other icons already present
~600 bytes compared with 1kb+
though the original i modified it from is only 710 bytes so maybe it's just a coincidence
probably just that
must just be compression shenannigans
okay, moving it back in and i'm back to the same behaviour/lack of verbose error in the logs so imma have to comb over this baby looking for typos and missing characters
Oop, found one line referencing something i was supposed to change, though it shouldn't have caused a hang
still good i saaw that
AHA
A MISSING }
c'mere you little
Woo!
Wish that there was something in the logging that could catch when something hadn't closed and reached end of file
Is there not a plugin or something for notepad++ to catch common coding issues?
the moral of the story: use notepad++ you absolute dingus
my default for .txt is notepad because i do a lot of uh, writing, and notepad++ isn't so good for that when i need a uncluttered, simple way to splurge what's in my head onto the page
you could try ATOM
so naturally i was too lazy to right click > open in notepad++
less clunky than notepad++ imo
well, for scripts and stuff i like notepad++ ir's great for it
but when i'm just writing wordpad is too janky and notepad is just right for me
but yeah it'd be nice if the game would actually catch the fact that a script was improperly closed and maybe put some sort of warning in the log
or a timeout thing maybe
if script takes more than <decently large time> to load, throw error
lua in general isn't great for catching errors in my experience
i'm no lua expert by any means, but generally when i have syntax errors games using lua just don't run the script element and throw some unhelpful shit into log. Wrong variable names or bad logic generally throw helpful errors
Error handling (or lack thereof) is easily my biggest complaint about lua.
i'm a big fan of adding print commands into every element of my lua script to find what branch its taking, and just comment them all out once i'm happy
is the recipe/item scripting just a facet of lua laid out in a different format?
i'm not exactly sure as i haven't gotten deep into PZ yet, but LUA generally has the "scripts" and the "lists" that scripts parse to get values / items / etc
it reminds me of comparing CSS to javascript in the vast difference in syntax
ahh, so it's probably sort of like how XML or JSON can be a way to store data in a more "readable" format and the lua scripting parses that data in the process of doing it's thing
in stalker anomaly, you have .script and .ltx - .script are the functions and .ltx are the settings and items that get pulled in by lua script (and sometimes by engine itself)
neat, huh
so it looks like .lua is script/functions and .txt is items/values/settings/recipes etc
which is weird because .txt are in scripts folder
๐โโ๏ธ
media/lua/.lua is a scripting language, media/scripts/.txt's are tables of values that get shot into the lua/java
I gave military helmets 50 bullet defense but in debug mode it made it so there's two helmets now. One with bullet defense, and the original without. Same item ID.
same module too?
its a fresh start, right?
i got a 45kg capable military backpack available to me (conflict of two mods) when i was adding/subtracting mods in an existing save and it persisted even after i removed the relevant mods
upon starting fresh it disappeared
anyone have any good mods?
๐
Yeah I made a new game after plugging in the mod.
@nimble spoke hm turns out the recipe I have going doesn't actually grab the primary and secondary held items :(
Most of the recipe functions go through script manager "items" and not the actual items in inventory.
May have to just make a context option ...
How hard is it to add a context option lol
I guess I can check held items on perform and on create and just craft it then - but there would be context options to improvise a weapon on all weapons in the inventory then :/
The context menu is a lua table you can add to and remove from.
Redoing all of my mods' distros for 41.52/53 has made me realize something fundamental.
Before, I was thinking, "Which containers should this item go into?" Now, it's "Which items should go in this container?"
A fundamental shift of thinking. ๐
Good on you for updating those
Thank god
Out of the house atm but can I ask about weapon attachments (again) later?
@modest nebula Did you ever get your mod working?
Yes in reply to Chuck.
Yo, can I share the link to the mod i've just uploaded to workshop in here?
if you use OnCanPerform to check if the item is in primary or not, you can then block the recipe option from appearing for items not in primary
Sorry I just keep asking questions, but are there any mods that add different zombie types?
There's terror zed, and there's my Turning Time that adds 1 type for now, working on other types for later
Is there any mod or API like ItemTweaker but for recipes?
I want to change all recipes using some item so it'd be able to use another item as well.
But just writing all recipes in txt seems... wrong.
Is there a way to make items spawn at the secret base specifically?
The first thing to check is if rooms in there have unique names/definitions
You can do that in debug mode
Does Terror Zed work as of 41.53? And I've seen your mod, but yet to try it out or see footage.
I have no idea
Looking at the script class in decompiled Java I did not see anything for changing the items used in a recipe like script item's doparam, so the answer is no.
I'm interested in trying to get some custom vehicle in the game. I've tried followed the guide (https://theindiestone.com/forums/index.php?/topic/24408-how-to-create-new-vehicle-mods/) but I keep getting hung up on trying to convert the .ply file (step 6, ive checked its triangulated,example mod converts but not the one I created). If anyone has knowledge on that, and could maybe assist whenever they're around, feel free to hit me up, be much appreciated.
- The first thing you want to do, as with most mods is to create your mods folder structure, use the image below as a reference, replacing MOD_NAME with the name of your mod: Spoiler mods MOD_NAME mod.info MOD_NAME.png media lua client MOD_NAME.lua models Vehicles_MOD_NAME.txt scripts vehicles M...
Does anyone have a good thread or tutorial on adding in some custom zeds or creatures. I'm looking to recreate some SCP creatures and put them in the game. I feel the environment fits
dear lord. peanut? when you are running from a horde of zombies?
the game is hard enough man!
XD
I just feel project zomboid is an amazing environment for SCPs to exist. not sure how to get it to happen but god it would be wild. Possibly a custom map that adds an SCP facility that they spawn at? I feel thats gotta be possible and would be amazing
To create vehicles in 41 build you need this guide https://theindiestone.com/forums/index.php?/topic/28633-complete-vehicle-modding-tutorial/&tab=comments#comment-292151
Hello and welcome to my tutorial. It covers full workflow of vehicle creation for PZ. If you are a complete beginner in 3D modelling, youll have to watch/read additional tutorials, I wont cover every aspect of model creation and where this button is located. I divide vehicle creation in these sta...
@marsh beacon nope. Code is busted in the java.
Oh nice, never saw that post. Appreciate it. I'll read through that and give another go after I think I have that down.
Stack trace attached, this looks like it's caused by "Planetalgol's EVEN WORSE Looting" mod but i'm a bit lost troubleshooting
shows up when i right click and my right click menu is missing some options, so something is unhappy
would I be better to use something like the steam downloader and use JSGME to install mods so that I can see and manually winmerge conflicting files? I assume files dropped into "mods" folder generally 'overwrite' the files in media when loaded
is it possible to use lua to alter the attributes of an item? like how you can later though the .txt item definition files?
seems to be working ๐
Use Item Tweaker, or look at Item Tweaker for how to do exactly that with code; please, please, please, don't use the .txt files to alter the properties of items. See: #mod_development message
Somebody have this? CharSpawn (character spawn)
Or How can I find this file?
I just followed that tutorial and it ends up being that the char spawn Lua does work
Doesn't*
@gaunt matrix shit.. how can I do for add an item? do you have another tutorial?
I when I did it I just installed that Necroforge and found it randomly spawned. But if you would like to give yourself the item I believe necroforge can do that too
As for debuging and adding it to the player. No idea sorry
I just started as you are
anyone know if and how its possible to add new enemies? Like special zeds
There are afew mods that do it, terror zeds, turning time.
@sour island Do you know if there's any current problems with the expanded helicopter event after a care package has been dropped? experiencing a lot of stutter/jitteryness since one has dropped in a save ive got going
no errors that ive noticed though
I don't think that'd be mod related
yeah im just grasping at straws at this point, can run the game fine and dont wanna reset the world but the issue only started after opening some supply stuff from the care package and persists through game restarts
pretty new world as well not even 2 weeks old
You could try going into debug and deleting the carepackage
but it's just a vehicle
or if you have the scrap vehicles mod you could use a propane torch and destroy it
ill give that a shot
i already assumed your mod doesnt really do much code wise until an event has fired. have just been left confused on the problem
Are you using weird helicopters too?
Nah just the Original expanded
Ok, just checking
am about to head off for the night but ill let you know if getting rid of the package does anything for us later
Doing remote play with a friend. but im the host and havent encountered this problem before after alot of time doing remote play on different runs
So, the file : CharSpawn its not necesaary?
Have you added a ram ranch heli yet?
wait If I remember correctly someone was modding in da baby as a car here, was it you?
Shark was doing something with a head
FYI: Some of the spawn chance values for procedural loot have been jacked by the devs. A spawn value of 1 is actually really rare now for some containers.
Learning this the hard way. ๐
wasn't it out of 100 before too?
Don't forget that if items aren't in the junk table, their spawn chance has a "floor" and can also be inflated by zeds in the vicinity.
So it's possible, if you are testing without zeds around (I generally delete zeds in the vicinity for testing myself just to eliminate distractions and spicy surprises, so that's why I'm mentioning this), that your results might not represent what spawns in "actual play".
Well, anyways, IMO rarer is better with mod items? Especially with how mod items can break loot respawn in MP if they spawn too frequently.
Well, there's rare, and then there's finding only trail mix in a whole looted town rare like a user mentioned recently.
Haha, well you know my opinion regarding the validity of that sort of feedback ๐คช
Trying to figure out a balance, but it seems TIS moved the rug. Not pulled it out from under me, just gave it a tug and I'm having to rebalance.
I mean, the distribution rework is still a work in progress, and there's gonna be kinks that the devs are still gonna have to work out in addition to more changes forthcoming?
The main reason I'm not too fussed about updating for the rework aside from commenting out broken entries.
So anyways, the trail mix issue might not be on you at all? ๐คท
Well, I debated just commenting stuff out like you said, and then I realized the only loot that would spawn would be trash items, since TIS haven't touched [all][bin] yet.
The .51 changes were sweeping to say the least.
9/10ths of my distro tables are procedural now. ๐
But yeah, I'm referring to the ProceduralDistributions for loot spawn chances. I'm setting my items to spawn at the median of the range of values I see there, and If I really want it to spawn I copy/paste it in twice.
It seems to be working okay, but now i don't know for sure since zeds now affect loot spawns?
Or was that something that's always been there? And I just didn't know because my monkey brain never even considered that?
It's always been there. That's why if I have a necronomicon item with a spawn chance of 0.0000001 it still would spawn all the time in fucking March Ridge.
Annoyed me to no end until I figured it out.
Still gotta update 90% of my mod item spawns to using junk tables so they're properly ingenerous with the spawing.
But yeah, your trail mix reports, if not the product of dramatic easily frustrated casuals that expect every mod item to be a guaranteed find in their spawn neighborhood, could be the result of loot spawn rework WIP jank?
@nimble spoke I got it to reliably work using OnTest - which seemingly runs through each of the items being selected.
Thanks for all the suggestions/help.
I don't even know anymore. Right now, I'm just copying whatever TIS does. ๐
Thanks for letting me know about that though, now I got a new headache. At least it's overpowering my carpal tunnel.
Well then, it should eventually work ๐คช
I guess all we can do is keep rowing for shore.
Dang man, yeah, the "headache barrier" when modding is a real thing.
So, how do you set up a "junk" table? Is it like, say, "["all"]["bin"]" in terms of formatting?
- also remember, there are still mods on the workshop, that break loot spawns in all sorts of ways?
Okay, so a lot of distro tables have a junk tables? But if they don't, um, let me cook up some code for you so it doesn't conflict with other mods.... shit, I think I already did that ๐
Thank dawg I remembered dealing with this upstream.
ProceduralDistributions.list.Bakery.junk = ProceduralDistributions.list.Bakery.junk or { rolls = 4; items = {} }
table.insert(ProceduralDistributions.list.Bakery.junk.items, "BeerBottle")
table.insert(ProceduralDistributions.list.Bakery.junk.items, 99)
SuburbsDistributions.all.cashregister.junk = SuburbsDistributions.all.cashregister.junk or { rolls = 4; items = {} }
table.insert(SuburbsDistributions.all.cashregister.junk.items, "BeerBottle")
table.insert(SuburbsDistributions.all.cashregister.junk.items, 99)
Now if some other modder does a sloppy job of defining their junk tables, that could still overwrite it?
My suggestion for that is to:
a) Have the lua fiies start with Z_
b) or have the file in a subdirectory of server/items/
Neither is absolutely foolproof, but they should be "foolresistent"
So if I am reading that correctly, that basically guarantees a beer bottle to spawn in a bakery room?
Ah, it should have a high chance of spawning? I dunno, I just know that the code should work properly for appending junk tables to distro entries?
"guarantees" don't really exist with item spawns using distro tables; there's a lot of factors that can affect it.
The number of rolls. Sandbox rarity settings. Lucky/Unlucky traits. Zombies in the vicinity. The capacity of the container already having been filled. The number of items already in the container for loot respawn.
So about as close to guaranteed as a system made of variables can get, basically?
On that note, I have no idea whether or not junk entries are included when loot respawn is involved? So that could be an issue in the majority of MP servers.
Ah, I just don't like writing a cheque that I can't guarantee can be cashed?
Well either way, I'm gonna have to write a lot of extra code now. Maybe.
Thanks, I hate it. 
I wouldn't want anyone to think that if they give an item a spawn chance of 99 in a junk table that it absolutely will, or almost always will, spawn?
iirc old distros were out of 1000 - mispoke earlier
10000 actually
wrong twice
You can always slide into my DMs once the loot spawn rework is finished + stable ๐
if Rand.Next(10000) <= chance(modified by luck) * 100 * lootmodifer + zombiedensity * 10
@zealous wing straight from ItemPicker.java
My confusion came from the fact part of it is multiplied by 100 - so mathwise it is out of 100
Huh.
You wanted to know how loot chance is calculated - that's it
the number is out of 100 for intensive purposes
according to that formula zombie intensity shouldn't impact it by much
God I would hope not. I literally do all of my testing in a zed free test world.
as in zombies are disabled?
Yeah.
Although now that I know that, I guess I'll have to cheat in some in the future when I do more testing for this.
that means zombieIntensity would be "400"
I get the impression from the formula that the more zeds that are around, the more loot's in the container(s) nearby.
@digital trellis Do you mean the dev console?
Yes
public float getLootZombieIntensity() {
float var1 = (float)this.ZombieIntensity;
float var2 = var1 / 255.0F;
var2 = var1 / 255.0F;
float var3 = 11.94F;
var3 *= var2;
var1 = 0.06F + var3;
float var4 = var2 * 10.0F;
var2 = var2 * var2 * var2;
if ((float)Rand.Next(300) <= var4) {
var1 = 120.0F;
}
return IsoWorld.getZombiesDisabled() ? 400.0F : var1;
}
with zombies disabled it overrides it to 400
I'm not sure what the range of it otherwise
looks like there's a chance for it to be 120
@digital trellis Prior to B41, it was its own thing that opened with the game. B41 you got to go to console.txt in the Zombid folder in your documents.
float var2 = var1 / 255.0F;
var2 = var1 / 255.0F;
lol
glad to see mistakes like this - makes me feel closer to the devs when I make similar typos
@zealous wing in my documents? or in Appdata?
So correct me if I get this wrong. It's a 40% boost to spawn chances with no zeds. But with zeds enabled, the higher density equals more loot in containers?
Not sure yet there's alot of operations going on
@digital trellis C:/username/Zomboid
I'm not even sure what the base intensity is
It's math all the way down.
And what I need to do with this file?
What are you trying to do exactly?
Oh, you trying to spawn items in?
Yes
Well, PZ doesn't really have that functionality.
You'll need a mod like NecroForge or Cheat Menu.
I thought you just needed the console log.
I think you can do it in debug mode?
I don't use it, so I couldn't tell you how.
Ook i will test
I use Cheat Menu/Necroforge for testing purposes.
Dummy easy to use, just get them off the Workshop.
cheating in zombies after you've already loaded in the cell would not work. to my knowledge loot tables are rolled when the cell is generated
so if there are no zombies in the cell when you enter it, they won't affect the loot calculations
lmao of course that's how it would work. ๐
sorry XD
just use cheatmenu and set yourself to god mode
then you don't have to worry about zombies
How to activate Necroforge @zealous wing
Press the button at the bottom right of the HUD in-game or press the tilde key.
Why I can't found my Puta Cola in the game?
I've selected my mod in MODS in project zomboid
But with Necroforge, I can't find my Puta cola
I don't know wky
It's in the right place in windows, i've activate my mod in game but I can't have it in game
So with the NecroForge menu open, at the top you have a dialog box with "Base.ItemID" as the default text.
You type in your item's id there. So the name of the module, then a period, then the item id according to your items.txt file.
For example, a cooking pot in game would be spawned that way with "Base.Pot".
The reason nothing is showing up is because you need to set up NecroForge definitions with your mod if you want them to show up.
I think Cheat Menu is more dynamic. I only use it for specific things.
Anyways, type in your item id, then press the anvil-shaped button to the right of the dialog to spawn it.
OK i will try thanks
Neat. What does it do?
slightly out of the isometric angle..... TRIGGERED
literally unplayable
It's part of a puzzle ๐
@nimble spokeOh god, I just noticed too.
Uggghhh
yeah now i can't unsee
Blame Filibuster for that! But this punk rocker like things to be off kilter now and then.
You're all welcome
i still haven't found the key spawning file yet
btw
i've explored so many files
and still nothing
key spawning?
trying to find out which file the game uses to spawn keys for vehicles
to find out how common it is to find such keys on nearby zombies
It's in java
yes but which file
ty i'll look through it
there's a few functions you can call depending where you want the key
yeah i'm looking through now
from what i can see, it attempts to put the key in a zombie's inventory before anything else, and if it fails to do that upon the spawning of the vehicle, it has a chance to put it in the vehicle, the glovebox, and then the ground. If it fails to do any of that it doesn't revisit the zombie. so @willow estuary it seems that you can't lure zombies to cars in order to get keys
Huh, well I sure wasted a lot of time and ammo trying to farm vehicle keys ๐
I'm guessing those functions are hard coded too? Can't mod it to repeat the steps X times?
hard coded is a myth
i can recompile the .class if i want
but it would make mod compatibility tough
if i change too much
You can use lua for it
there's supplementary functions to specifically call it on zombies
^
Oh mod wise, there'd be all sorts of ways to make that happen with lua if you put the time and effort into it?
I had an unreleased mod that would make an index of car keys and then spawn them into things because I wanted duplicate vehicle keys to exist.
curious, how do you get vehicle spawn locations with lua?
Would be neat to have wallets with information - figure out whos key belongs to which car that way - or if keys had the make on them atleast
how do you get vehicles to spawn or where are they spawned?
keys are spawned when cars are
i know. i'm saying, in order to write a lua script that spawns keys nearby spawned cars, i would first have to get the location of said cars
so that i can then spawn keys inside of zombies that are close to that location
You'd just need the cars
no, because if the car gets towed away i don't want the new location to spawn keys
i only want the original location to spawn keys
I don't think the map exists until the player loads the chunk?
it does not, as far as i know
but once the player loads the chunk, the vehicle spawns in. how, with lua, would i call that spawn location? i know a fair bit more java than i do lua
i'm a lua beginner
The easiest way would be to use an event that's defined by the devs
for finding cars that's a bit trickier
hmm
that should be simple enough. have a check at the beginning that checks to see if keys have been spawned. There is a similar check in the java
but anyway, i'm probably not going to go through with this, but thanks for the help
np
Good. Yeah directly over writing item definition would create mod conflicts, and with lua code you can probs do stuff that you could not with defualt overwriting.
Well that, and also near-daily tech support/steam forum posts by people who are using some old "Better Items" mod that predates the tag system being unable to barricade/open cans/etc?
As Vanilla is still in development, there's all sorts of potential for future headaches of that nature.
Oh, yikes. I had not even though of that.
Their weird thing is how the same people will gladly jam 200 mods into their game, including mods for build negative 12 that were last updated in 2000 BC into their game, but then will go "bUt Do I rEaLlY nEeD tO uSe ItEm TwEaKeR" when a mod has it as a dependency.
But yeah overwiting with an old format could remove vital parts of the tag system that could remove functions of the game.
Well, another example is the new bullet defense parameter in vanilla; some people using some old mods that had "better" armor vests are in for some unpleasant surprises come MP.
Hahaha yrah, the only old mod i use is one sandbox mode mod that allows you to enter exact number and stuff for some options, even though its from 2016 it still appears to work just fine, which is incredible
Sandbox+ ?
is there a log file and, if so, where is it?
trying to understand what is going on with PZ
Hmm
so when I put an item into a container, I get spammed with this message
Error, container already has id
from lines 3176 to 3401
can you post the section of the log?
it's literally just that message repeating over 200 times, with different numbers in front
it's sandwiched between two sections that say I paused the game
all right
now all i need to do is figure out how to get sets of all items that are derivitives of a certain item.
hmmm, so the log is flooded with the errors I mentioned every time I try to move an item between containers
other than that, there are no errors