#mod_development

1 messages ยท Page 475 of 1

modest nebula
#

That is, if I even need to do that. I don't know- There isn't documentation to tell me that I'm doing something wrong in general

#

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. stressed

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.

quick moth
#

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.

modest nebula
#

Valid as hell

#

Implementing new functionality is a pain in the ass

#

Indie Stone Devs hire me.

zinc cliff
#

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

modest nebula
#

Yo, IsoBuilding needs a getRooms() function.

modest nebula
#

Does anyone know how to access Fields from Lua?

sour island
#

I dabbled in looking around for isoBuildings and such - what exactly are you trying to do?

unreal carbon
#

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.

quick moth
#

Is it possible to make a mod where zombies only respawn on the edge of the map? I hate them respawning in secured areas.

devout flint
#

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

modest nebula
#

@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.

quick moth
sour island
#

I do agree they need to refactor the code to allow for powersources in general

modest nebula
#

The IsoGrid isn't even updated, though. Generator code uses the same method but it functions over there.

sour island
#

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

gaunt pendant
#

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 ๐Ÿ˜ฉ

stoic kayak
#

oh- convinient- so I had an idea to make power extensions- it'll be harder then I thought, wont it?

sour island
#

Yeah

stoic kayak
#

red is gen, dark blue is first extension, light is a 2nd extension

#

oh fun-

sour island
#

unless some mad man rewrites the power functions in lua

stoic kayak
#

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

sour island
#

generally unless a functionality has been made exposed you can't really do it

stoic kayak
#

Hm-

sour island
#

for example I don't think you can set individual generator fuel rates

#

so you can't have a genny not take up fuel

stoic kayak
#

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);
sour island
#

I think that'd be for lightsources

stoic kayak
#

oh yes-

#

function ELElectricLightSource:create(x, y, z, north, sprite)

sour island
#

well I have a few functions that are rewritten vanilla stuff

#

if it doesn't look too crazy I could check out powersources

modest nebula
#

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

sour island
#

you rewrote lua?

#

you can technically rewrite java - but not overwrite it

#

if that makes sense

modest nebula
#

I rewrote it all in Lua 1:1. With cleanup, of course.

sour island
#

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

zinc cliff
#

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?

slow graniteBOT
#

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.

sour island
zinc cliff
#

When i first made my game it poped up a couple of errors but i dont get any while trying to sleep

sour island
#

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?

upper junco
#

Anyone know the minimum image size that can be used in the game for map images?

mellow crag
#

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

willow estuary
#

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?

slow graniteBOT
#

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.

upper junco
willow estuary
#

Oh cool! Nice idea dude! ๐Ÿ‘

ocean wave
#

Thats really cool!!

willow estuary
# mellow crag hey guys! Newbie here! Just downloaded a mod pack with ~40 mods. Framerate TANK...

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.

willow estuary
#

Years after I had the idea, finally getting off my lazy ass and making a photocopier mod.

mellow crag
solar peak
#

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

willow estuary
fading prawn
# willow estuary

Looks cool but what use would it have in game? Just infinite fuel for fires?

ocean wave
#

that is a really cool idea

#

maybe if there was a pre apocolypse scenario someday when NPCs come back. that would be cool

willow estuary
#

Player made newspapers + fliers for one.

willow estuary
late hound
#

Wallace likes his CHEESE

edgy ruin
#

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.

short shell
#

is it me, or do the sounds to any modded gun not work?

north ledge
short shell
#

nvm, weapon sounds are silent when you turn on ghost mode in necroforged..

restive snow
sour island
# restive snow 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?

restive snow
sour island
#

Also Merging distribution addon # 4 kind of worries me as table manipulation can get tricky

edgy ruin
#

pardon my interruption, but it might be because of a mod that adds vehicles.

#

you could try uninstalling any mods that add vehicles.

strong swift
#

is there a mod that disables or changes the jump scare sound effect when u see a zombie

cyan veldt
strong swift
#

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

cyan veldt
#

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

strong swift
#

thank you

cyan veldt
#

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?

quick solstice
modest nebula
#

How do I use getClassField(object, fieldNumber):setBoolean?
It requires a parameter of ObjectBoolean, which is a Java type I think. Any ideas?

cyan veldt
#

Not sure I get the question

#

Booleans are either true or false

#

What are you going to use it for?

modest nebula
#

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?

cyan veldt
#

Could it be because it says if classFieldName ~= (approximately equal) "haveElectricity"?

#

Sounds like that should only have two states and not an approximate value

modest nebula
#

~= is not equal, isn't it?

cyan veldt
#

no, ~= is approximately equal

modest nebula
#

What the fuck

cyan veldt
#

!= 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

modest nebula
#

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.

cyan veldt
#

Is that part in your screenshot the only reference to this bit?

modest nebula
#

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.

sour island
#

if it is private you can't change it like that

modest nebula
#

๐Ÿ˜’ I thought not.

#

So since the actual function to set this variable doesn't set this variable, am I stuck?

sour island
#

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

modest nebula
#

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. :/

sour island
#

Couldn't you use isoGenerator.setSurroundingElectricity ?

#

not itself but as an example

cyan veldt
#

Is there any way to force a lua reload mid game?

modest nebula
#

@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.

sour island
#

oh nice

#

so what are you getting that error from?

modest nebula
#

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

sour island
#

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

modest nebula
#

So every object in the game that has electricity, basically. :/

#

Checked. The generator does set haveElectricity on surrounding tiles.

sour island
#

actually some of it is refered to in java so no

#

I don't see where it sets it to true

modest nebula
#

I'm not legally allowed to ping Nasko am I? Don't know where I'd begin asking to fix this.

sour island
#

return this.chunk != null && this.chunk.isGeneratorPoweringSquare(this.x, this.y, this.z);

modest nebula
#

.... Hmmmmmmmm ๐Ÿ™‚

sour island
#

that's under haveElectricity

modest nebula
#

Can you pastebin the function for me?

sour island
#

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

modest nebula
#

Yeah, I know. It's all for power draw stuff to calculate fuel costs

sour island
#

hm they don't even seem to be used anywhere

#

strange

modest nebula
#

Am I allowed to ping Nasko here to ask about it?

sour island
#

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

modest nebula
#

Yeah, that's what my forum post is about.

cyan veldt
#

Would removing require 'Items/SuburbsDistributions' make an item spawn anywhere?

modest nebula
#

@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.

cyan veldt
#

Thanks for the help guys

modest nebula
#

Sorry awpii I have no idea

cyan veldt
#

it's okay, guess I'll never fix the mod anyways

modest nebula
#

There's got to be more distribution options I imagine

cyan veldt
#

There is, that's not the issue

#

The issue is no matter what I change, the item will never spawn

modest nebula
#

Maybe Hydrocraft has answers in their files?...

#

I'm not sure.

cyan veldt
#

Hydrocraft?

modest nebula
#

It's a big mod. Adds heaps of stuff, good code reference.

cyan veldt
#

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

quick moth
sour island
#

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

drifting ore
#

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?

modest nebula
#
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

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.

modest nebula
#

It should hold 1.6 units of bleach

drifting ore
#

ie can you have a half empty bleach bottle? what about a 73% full bottle of bleach?

modest nebula
#

Probably. If not, you could look around at the Water Bottle item stuff and see if you can retrofit it to poison you

winged phoenix
#

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

viral spire
#

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.

dull yoke
#

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.

quick moth
#

In coming versions are they phasing out things like VehicleDistributions to migrate everything to Procedural?

sour island
dull yoke
dull yoke
#

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

sour island
#

Should force steam to update

dull yoke
#

Ight

sour island
#

Had to work around sandbox+ not playing nice with the menu.

#

And had to update EasyConfig a few times yesterday.

dull yoke
#

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

edgy ruin
dull yoke
#

So how do I get a helicopter to spawn in and crash so I can test this? @sour island

#

I have debug on atm

sour island
#

If you use AUD (aiterons user debug) you can spawn in vehicles

#

I don't have a test setup for crashes

dull yoke
#

Ah

sour island
#

I'll take a look at what is causing the helicopters to be worth so much fuel

dull yoke
#

Does the "Get the choppah" work for spawning your helicopters if I have the vanilla ones disabled?

sour island
#

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

dull yoke
#

Alrighty'

#

"Debug Test Suite"?

dull yoke
#

Alright, I'll try and get one to crash later or just get the vehicle spawning mod. Cheers.

sour island
gaunt pendant
# cyan veldt There's this mod called alarm check mod which lets you check for Alarms in house...

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)
jolly drum
strong swift
ivory warren
#

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

edgy ruin
#

Is it possible to check if a given zombie is 'male'?

undone heron
#

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

cyan veldt
gaunt pendant
#

yea

cyan veldt
#

Awesome, thanks Tiaxx

cyan veldt
# gaunt pendant yea

Last question, should I change require 'Items/SuburbsDistributions' to require 'Items/ProceduralDistributions'?

gaunt pendant
#

don't think that's needed at all, you can remove it

#

that's a global var anyway

cyan veldt
#

oh ok, cool

sour island
#

you don't have to use [""] either, can just be x.y.z

cyan veldt
#

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

gaunt pendant
crisp token
undone heron
random finch
#

Was looking at AMP out of curiosity. Any idea what RCON protocol PZ uses? Perhaps STDIO?

cyan veldt
gaunt pendant
#

Also, any errors?

cyan veldt
#

no errors, didn't increase it to something crazy but I did search a few maps using cheat teleport

random finch
cyan veldt
#

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

cyan veldt
#

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?

solemn pebble
#

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.

sour island
#

Also depends where you are in the world, some times events could target zombies only, but let us know if it changes.

solemn pebble
#

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.

undone crag
# undone heron anyone have a small guide (or insight) into skills for the new system in 41.53? ...

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.
undone heron
# undone crag It's not an answer to your question but it's about your mod: Your ReadingSkill.l...

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:setItem

Seems 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 = profskills

which 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.

nimble spoke
#

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

undone heron
#

yeahhhhh. pretty sure my update will nuke any saves of people who haven't updated

willow estuary
#

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
nimble spoke
#

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

willow estuary
#

Ah, gotcha.

worldly olive
#

Btw didn't expect the helicopters to crash on my face haha thought they had to crash outside the chunk.

sour island
#

Good luck with the coming wave of zombies lol

undone heron
#

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

undone crag
#

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.
undone heron
#

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.

jagged shale
#

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

wide inlet
#

Yes

modest nebula
#

@jagged shale Build 41 IWBUMS or other?

willow estuary
#

Trait De-Cheesing

undone heron
#

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.

upper junco
#

I see high thirst is gone, lol

willow estuary
willow estuary
# upper junco I see high thirst is gone, lol

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)

upper junco
#

Yeah that would be a good thing on a pvp server. Keeps players from abusing the respawn mechanics to get there stuff back.

willow estuary
#

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 ๐Ÿ˜„

undone heron
#

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.

willow estuary
#

I have enhanced zombies, so Thin Skin is in the mix for now.

winged phoenix
#

real quick, is there anything special like /n i need to do to have line breaks inside the mod.info description field?

drifting ore
#

@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.

sour island
#

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.

sour island
#

@drifting ore

sour island
#

If it looked like this:

#

that's an older bug - and shouldn't be happening

drifting ore
sour island
#

I know the game assigns a random car if it can't figure out what the vehicle is supposed to be

drifting ore
#

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

sour island
#

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

drifting ore
#

Hmmm, I am still on .50 because many mods I use are not updated and the build is generally quite stable.

sour island
#

I can do some testing to see if there's issues with .50

worldly olive
#

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?

sour island
worldly olive
#

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.

sour island
#

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

echo leaf
#

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?

sour island
worldly olive
#

Oooh, nice to know!! thank you a lot!
startday is the days played + 12 months of sandbox configuration right?

echo leaf
#

I get like 1/4th the performance with this latest PZ version than I did with previous... I really dont understand why.

sour island
#

No, startday is just the days survived so far

sour island
#

unless you play with never ending events

#

then just that and startday

echo leaf
#

I just avoid that because it looks like 99% bot responses

sour island
#

Those are for people asking about mods in there

echo leaf
#

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

worldly olive
sour island
#

Thank you, let Dito know too.

thick kettle
#

what is happening

#

is that zombies replaced with choppers

sour island
#

nope, something was preventing the heli from completing the crash process

#

so it kept retrying

edgy ruin
#

lol

#

imagine if you could salvage from each of those helicopters

sour island
#

you can loot each of them

#

and some mods allow you to salvage vehicles

edgy ruin
#

endless resources

worldly olive
#

Endless resources if you have enough fps to do it ๐Ÿ˜‚

tulip valve
#

wtf I thought Fragmotion was free

edgy ruin
#

Is there a way to tell which mods work with the current build 41 version?

noble iris
#

most of the good mod authors are good at documenting what a mod is or isn't compatible with

sour island
abstract raptor
worldly olive
abstract raptor
#

yass

abstract raptor
worldly olive
abstract raptor
#

They're gonna be findable on zombies rarely

#

just the first 151

#

(plus missingo)

worldly olive
#

Are they like furniture that you have to place in a tile or will be items like Spiffo?

abstract raptor
#

Yep you can place them

worldly olive
#

Fucking awesome!

abstract raptor
#

Should take me the rest of the day to do, hopefully only a few hours

worldly olive
#

Probably too much but is this going to be with 3d models as the 3d models that will come in the 41.54? ๐Ÿค”

abstract raptor
#

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

worldly olive
#

Got it! will be waiting for this to to the whole collection, gotta catch 'em all ๐Ÿ˜‚

abstract raptor
#

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

worldly olive
#

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

abstract raptor
#

lol I saw on the reddit someone recreated the pokemon Kanto map

nimble spoke
#

imagine they are all ghost types, even the trainers if they're not careful

edgy ruin
grim perch
#

Authentic Peach any update on AuthenticZ

#

?

sour island
#

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?

coral remnant
#

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?

dull mauve
#

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

undone crag
#

Microsoft word :o

abstract raptor
#

@dull mauve use notepad++

#

Anywhoozle. Boiling them is a different thing

#

I'll look into it though

modest nebula
#

You may need to make sure the saucepan is also a result of the combination so it isn't totally consumed @undone crag

glass ravine
#

Anyone know how would I go about creating new models for hairstyles?

modest nebula
#

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

glass ravine
#

Is that same for the vehicles?

#

I noticed that there are .txt files with vertex info.

modest nebula
#

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

glass ravine
#

Yeah, I'll do that

modest nebula
#

If you're very inexperienced with Lua I can help if I can.

abstract raptor
#

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

stiff mauve
#

why my game fps drop when using NPC mod?

#

i set npc spawn rate into extremely high

upper junco
#

That would most likely be why.

drifting ore
#

Increase your pc specs or reduce game load

gaunt pendant
tulip valve
#

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 ๐Ÿ˜›

sour island
#

But yeah in the early 90s you had to tune to a low bandwidth channel for AV1/2 to work.

gaunt pendant
#

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

sour island
#

hm

gaunt pendant
#

Don't want you (especially in multiplayer) tune in to another TV's vhs broadcast ๐Ÿคฃ

sour island
#

that's a clever solution tho

#

I wonder if the official vhs will do something similar

gaunt pendant
#

Well, it works ๐Ÿคท

gaunt pendant
#

I also tried interfacing with the radio/tv UI windows, but no dice to change anything there. All in java :(

sour island
#

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?

gaunt pendant
#

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

sour island
#

ah

#

you'd have to use modData extensively I imagine

ivory flower
willow estuary
#

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 ๐Ÿ˜„

short shell
#

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.

short shell
#

Found it!

undone crag
#

u wot m8 @modest nebula

modest nebula
#

Recipes consume the items you use to make the end result.

#

Flag them with keep so you don't destroy your pot.

undone crag
#

Ok but so what though?

#

Dude, I'm like, such a pro at zomboid modding already dude.

modest nebula
#

Oh

#

Other guy

#

Excuse me for the ping; thought you were the poster of the recipe thing

undone crag
#

:o

quick moth
undone crag
#

It is a secret I will never tell, approximately.

sour island
#

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

sour island
#

Anyone familiar with messing with challenges? Why would functions added to OnGameStart not fire on CDDA?

nimble spoke
#

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

sour island
viral spire
#

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?

sour island
#

When you craft a recipe and it can use multiple types of items you can't really pick which are used

nimble spoke
#

you can. If I remember correctly you can do that in the function used by OnPerform or whatever the recipe field is called

sour island
#

oh?

nimble spoke
#

You run a for loop and check the items used

sour island
#

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

nimble spoke
#

Sorry, I meant OnCreate

nimble spoke
#

Check the digital watch recipe

sour island
#

to clarify - any 2 weapons

nimble spoke
#

recipe Dismantle Digital Watch
{
[Recipe.GetItemTypes.DismantleDigitalWatch],
keep [Recipe.GetItemTypes.Screwdriver],

#

Those are functions, that return what can be used in the recipe

sour island
#

I already can grab weapons

nimble spoke
#

one checks for the screwdriver item tag and the other if the watch item has digital in its name

sour island
#

my issue is there's no way for the player to pick the 2 weapons for the recipe if he has more than 2

nimble spoke
#

Ohhhhh, well, maybe make the function grab primary and secondary items?

sour island
#

hm

nimble spoke
#

and if both are weapons BAM

sour island
#

that's a better idea

#

I was going to make another util mod that let you pick things lol

drifting ore
#

is there some i way i can browse throught he lua of the game engine?

#

wait is it possible to overwite lua?

marsh beacon
#

Well thats what happens if you make a mod with items of similar names

#

But I believe mods like item tweaker prevent that

drifting ore
#

is there a list of lua events

feral niche
#

Hey which mods donโ€™t immediately destroy my game

#

Iโ€™m on Mac and playing the latest build

sour island
#

@nimble spoke

#

Has science gone too far

modest nebula
#

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.

quick moth
#

How do I set things to spawn at the secret base specifically?

minor shuttle
#

Is there a mod that adds a protective bumper like those seen on the front of trucks?

late hound
#
- 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.
sour island
nimble spoke
modest nebula
#

Hey Soul Filcher your mods are rad

safe heath
#

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

sour island
#

PZ uses a modified Lua to begin with - but I'd wager 5.3 is the base

winged phoenix
#

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,```
sour island
#

Do you have the error or what the ReplaceOnUseOn is?

winged phoenix
#

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

sour island
#

it's trying to setCondition on nothing

winged phoenix
#

think me replacing the replaceonuse with the vanilla water bottle would circumvent this? it's not like the bottles look that different.

sour island
#

๐Ÿคท

winged phoenix
#

essentially putting ReplaceOnUseOn = WaterSource-WaterPopBottle, instead of the call towards the RS one

sour island
#

why did the modder even add their own soda bottles that can be filled with water?

winged phoenix
#

idk, variety

sour island
#

oh

winged phoenix
#

it's like

#

expanded food items including a bunch of booze

#

so i guess it's actual seltzer water

sour island
#

I kind of hate that variety of icons is handled with different types entirely

#

the scripts aren't the same length though

winged phoenix
#

yeah there's some extra stuff

sour island
#

could it be the missing lines are what's messing it up?

winged phoenix
#

it's entirely possible

#

like maybe it's like "hey this isn't a drink! what gives?"

#

the customcontextmenu bit especially

sour island
#

delta I think also stands in for condition/amount left

winged phoenix
#

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

sour island
#

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

winged phoenix
#

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

sour island
#

fair

#

I have a personal aversion to sets of basically duplicate code

safe heath
#

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

winged phoenix
#

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

safe heath
#

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

winged phoenix
#

i believe it was like home for orphaned mods or something

nimble spoke
winged phoenix
#

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

nimble spoke
#

@winged phoenix what is the module for the modded items?

winged phoenix
#

all the same, RS

#

so it's not a typo i think

nimble spoke
#

I've had this issue too where some would work with my own module and some wouldn't, so I moved themall to Base

winged phoenix
#

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

nimble spoke
#

DONT DO THAT

#

hahaha, item name and the number in the NEXT line

winged phoenix
#

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

safe heath
#

@winged phoenix is that ... notepad?

winged phoenix
#

shh i have notepad++ i just forget to set lua to default to it

safe heath
#

๐Ÿ˜‰

#

also porting my pixel shader will be easier than i thought..... there's already nightvision shader in screen.frag

sour island
#

@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

winged phoenix
#

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

safe heath
#

probably a typo somewhere, one moment @winged phoenix

nimble spoke
#

@sour island how exactly are the items grabbed for the recipe?

safe heath
#

you can use this tool to check for most syntax errors, (won't catch semantics errors, it's not intellisense by any means)

sour island
# nimble spoke <@!55792318204092416> how exactly are the items grabbed for the recipe?

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?

nimble spoke
#

maybe, you should not keep them anyway

sour island
#

I was going to try and force them inside the result

#

ah yes, the keep was the issue

winged phoenix
sour island
winged phoenix
#

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

nimble spoke
sour island
#

One of the reasons I wanted to try and keep the items

#

But checking for types in a modData might work fine

winged phoenix
#

should i stay here in modding or move to techsupport btw

#

cos i'm not entirely sure what exactly is broken

nimble spoke
#

techsupport doesn't cover mod issues

winged phoenix
#

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

sour island
#

steam mods override local

#

you will have to unsubcribe from the mod you're trying to edit

winged phoenix
#

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

sour island
#

you will have to unsubcribe or else the game will load the steam version based on mod ID

winged phoenix
#

I did

sour island
#

ok

winged phoenix
#

sorry, i wasn't too clear there Hehe

sour island
#

just checking

#

are you still getting the same error?

winged phoenix
#

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

sour island
#

also make sure you have all your } and ,

winged phoenix
#

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

sour island
#

probably just that

winged phoenix
#

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

sour island
#

Is there not a plugin or something for notepad++ to catch common coding issues?

winged phoenix
#

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

sour island
#

you could try ATOM

winged phoenix
#

so naturally i was too lazy to right click > open in notepad++

sour island
#

less clunky than notepad++ imo

winged phoenix
#

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

safe heath
#

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

dry sparrow
#

Error handling (or lack thereof) is easily my biggest complaint about lua.

safe heath
#

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

winged phoenix
#

is the recipe/item scripting just a facet of lua laid out in a different format?

safe heath
#

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

winged phoenix
#

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

safe heath
#

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)

winged phoenix
#

neat, huh

safe heath
#

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

#

๐Ÿ’โ€โ™‚๏ธ

sour island
#

media/lua/.lua is a scripting language, media/scripts/.txt's are tables of values that get shot into the lua/java

quick moth
#

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.

sour island
#

same module too?

safe heath
#

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

wintry thicket
#

anyone have any good mods?

echo leaf
#

there are no good mods

#

none

#

turn back now

wintry thicket
#

๐Ÿ˜”

quick moth
sour island
#

@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 :/

undone crag
#

The context menu is a lua table you can add to and remove from.

zealous wing
#

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. ๐Ÿ˜›

sour island
#

Good on you for updating those

sour island
#

Out of the house atm but can I ask about weapon attachments (again) later?

marsh beacon
#

@modest nebula Did you ever get your mod working?

undone crag
#

Yes in reply to Chuck.

marble folio
#

Yo, can I share the link to the mod i've just uploaded to workshop in here?

nimble spoke
sour island
#

True ...

#

But the "recipe" in OnCanPerform is the recipe object

viral spire
#

Sorry I just keep asking questions, but are there any mods that add different zombie types?

sour island
#

There's extended heli events: weird helis

#

But that comes with helicopters

nimble spoke
left grail
#

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.

quick moth
#

Is there a way to make items spawn at the secret base specifically?

nimble spoke
#

You can do that in debug mode

viral spire
nimble spoke
#

I have no idea

undone crag
glass pond
#

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.

gaunt matrix
#

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

solar peak
#

dear lord. peanut? when you are running from a horde of zombies?

#

the game is hard enough man!

#

XD

gaunt matrix
#

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

radiant ginkgo
# glass pond I'm interested in trying to get some custom vehicle in the game. I've tried foll...
modest nebula
#

@marsh beacon nope. Code is busted in the java.

glass pond
#

Oh nice, never saw that post. Appreciate it. I'll read through that and give another go after I think I have that down.

safe heath
#

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

drifting ore
#

is it possible to use lua to alter the attributes of an item? like how you can later though the .txt item definition files?

willow estuary
digital trellis
#

Somebody have this? CharSpawn (character spawn)
Or How can I find this file?

gaunt matrix
#

Doesn't*

digital trellis
#

@gaunt matrix shit.. how can I do for add an item? do you have another tutorial?

gaunt matrix
#

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

hexed arrow
#

anyone know if and how its possible to add new enemies? Like special zeds

upper junco
#

There are afew mods that do it, terror zeds, turning time.

sour island
#

new flyer for super weird helis

#

every day is Spiffo's birthday

drifting tundra
#

@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

sour island
#

I don't think that'd be mod related

drifting tundra
#

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

sour island
#

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

drifting tundra
#

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

sour island
#

Are you using weird helicopters too?

drifting tundra
#

Nah just the Original expanded

sour island
#

Ok, just checking

drifting tundra
#

am about to head off for the night but ill let you know if getting rid of the package does anything for us later

sour island
#

๐Ÿ‘

#

Us?

drifting tundra
#

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

sour island
#

alrighty

#

lmk

digital trellis
errant meteor
sour island
#

Sir, this is a PG-13 face eating game

errant meteor
#

wait If I remember correctly someone was modding in da baby as a car here, was it you?

sour island
#

Shark was doing something with a head

digital trellis
#

Somebody have distributions.lua with only food?

#

You know what I mean?

zealous wing
#

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. ๐Ÿ˜›

sour island
#

wasn't it out of 100 before too?

willow estuary
#

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".

zealous wing
#

lmao fuck.

willow estuary
#

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.

zealous wing
#

Well, there's rare, and then there's finding only trail mix in a whole looted town rare like a user mentioned recently.

willow estuary
#

Haha, well you know my opinion regarding the validity of that sort of feedback ๐Ÿคช

zealous wing
#

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.

willow estuary
#

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? ๐Ÿคท

zealous wing
#

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.

willow estuary
#

๐Ÿ˜„

#

Yeah, I think this disproportionately affects your stuff.

zealous wing
#

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?

willow estuary
#

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?

sour island
#

@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.

zealous wing
#

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.

willow estuary
#

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.

zealous wing
#

So, how do you set up a "junk" table? Is it like, say, "["all"]["bin"]" in terms of formatting?

willow estuary
#
  • 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 ๐Ÿ˜„

zealous wing
#

Ah, so it's lua stuff.

#

Well, all this is lua stuff. That's dumb to say. ๐Ÿ˜›

willow estuary
#

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"

zealous wing
#

So if I am reading that correctly, that basically guarantees a beer bottle to spawn in a bakery room?

willow estuary
#

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.

zealous wing
#

So about as close to guaranteed as a system made of variables can get, basically?

willow estuary
#

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?

zealous wing
#

Well either way, I'm gonna have to write a lot of extra code now. Maybe.
Thanks, I hate it. angry

willow estuary
#

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?

sour island
#

10000 actually

#

wrong twice

willow estuary
sour island
#

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

zealous wing
#

Huh.

sour island
#

You wanted to know how loot chance is calculated - that's it

zealous wing
#

Ow my head.

#

Goddamn math.

sour island
#

the number is out of 100 for intensive purposes

#

according to that formula zombie intensity shouldn't impact it by much

zealous wing
#

God I would hope not. I literally do all of my testing in a zed free test world.

sour island
#

as in zombies are disabled?

zealous wing
#

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.

sour island
#

that means zombieIntensity would be "400"

digital trellis
#

How can I open the console?

#

I've made an objet and I wanted to give me the item

zealous wing
#

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?

digital trellis
#

Yes

sour island
#
   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

zealous wing
#

So with zeds disabled, it just straight multiplies it by 4.

#

Feck.

sour island
#

no

#
  • (400 * 10)
zealous wing
#

That's 4,000

#

that's even worse. D:

sour island
#

+4000/10000

#

it's an added 40%

zealous wing
#

Ah.

#

My monkey brain is not good at math.

sour island
#

I'm not sure what the range of it otherwise

#

looks like there's a chance for it to be 120

zealous wing
#

@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.

sour island
#
      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

digital trellis
#

@zealous wing in my documents? or in Appdata?

zealous wing
#

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?

sour island
#

Not sure yet there's alot of operations going on

zealous wing
#

@digital trellis C:/username/Zomboid

sour island
#

I'm not even sure what the base intensity is

zealous wing
#

It's math all the way down.

digital trellis
#

And what I need to do with this file?

zealous wing
#

What are you trying to do exactly?

digital trellis
#

To have dev console in the game

#

To give my item to test it

zealous wing
#

Oh, you trying to spawn items in?

digital trellis
#

Yes

zealous wing
#

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?

digital trellis
#

debug mode?

#

Oook

zealous wing
#

I don't use it, so I couldn't tell you how.

digital trellis
#

Ook i will test

zealous wing
#

I use Cheat Menu/Necroforge for testing purposes.

#

Dummy easy to use, just get them off the Workshop.

solar peak
#

so if there are no zombies in the cell when you enter it, they won't affect the loot calculations

zealous wing
solar peak
#

sorry XD

#

just use cheatmenu and set yourself to god mode

#

then you don't have to worry about zombies

sour island
#

I'd recommend AUD

#

has a HUD for godmode

digital trellis
#

How to activate Necroforge @zealous wing

zealous wing
#

Press the button at the bottom right of the HUD in-game or press the tilde key.

digital trellis
#

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

zealous wing
#

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.

digital trellis
#

OK i will try thanks

willow estuary
zealous wing
#

Neat. What does it do?

nimble spoke
#

literally unplayable

willow estuary
zealous wing
#

@nimble spokeOh god, I just noticed too.
Uggghhh

solar peak
#

yeah now i can't unsee

willow estuary
nimble spoke
#

You're all welcome

solar peak
#

i still haven't found the key spawning file yet

#

btw

#

i've explored so many files

#

and still nothing

sour island
#

key spawning?

solar peak
#

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

solar peak
#

yes but which file

sour island
#

^

#

BaseVehicle.class/java

solar peak
#

ty i'll look through it

sour island
#

there's a few functions you can call depending where you want the key

willow estuary
solar peak
#

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

willow estuary
#

Huh, well I sure wasted a lot of time and ammo trying to farm vehicle keys ๐Ÿ˜„

zealous wing
#

I'm guessing those functions are hard coded too? Can't mod it to repeat the steps X times?

solar peak
#

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

sour island
#

You can use lua for it

solar peak
#

theoretically i could write a lua script

#

yeah

sour island
#

there's supplementary functions to specifically call it on zombies

solar peak
#

^

willow estuary
#

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.

solar peak
#

curious, how do you get vehicle spawn locations with lua?

sour island
#

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

solar peak
#

probably not going to do anything with this

#

but i kinda want to know

sour island
#

how do you get vehicles to spawn or where are they spawned?

solar peak
#

OT spawn

#

for key spawning

sour island
#

keys are spawned when cars are

solar peak
#

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

sour island
#

You'd just need the cars

solar peak
#

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

sour island
#

I don't think the map exists until the player loads the chunk?

solar peak
#

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

sour island
#

The easiest way would be to use an event that's defined by the devs

#

for finding cars that's a bit trickier

solar peak
#

yeah

#

i don't even know how to go about it with lua

sour island
#

There's an event called "LoadGridsquare"

#

single argument being the isoGridSquare

solar peak
#

hmm

sour island
#

from isoChunk

#

you'd just have to make it so it can't keep spawning keys

solar peak
#

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

sour island
#

np

drifting ore
willow estuary
drifting ore
#

Oh, yikes. I had not even though of that.

willow estuary
#

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.

drifting ore
#

But yeah overwiting with an old format could remove vital parts of the tag system that could remove functions of the game.

willow estuary
#

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.

drifting ore
#

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

sour island
#

Sandbox+ ?

edgy ruin
#

is there a log file and, if so, where is it?

sour island
#

Should be in the pins

edgy ruin
#

trying to understand what is going on with PZ

edgy ruin
#

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

sour island
#

can you post the section of the log?

edgy ruin
#

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

drifting ore
#

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.

edgy ruin
#

hmmm, so the log is flooded with the errors I mentioned every time I try to move an item between containers

sour island
#

can you post the error here?

#

few lines before and after

edgy ruin
#

other than that, there are no errors