#mod_development

1 messages · Page 525 of 1

fair frost
#

*livery

drifting ore
#

I cant wait tilll NPCs come out

#

Idea for a mod for eventual release of NPCs,

#

If you smoke a lot or drink a lot

#

Your character smells like shit

#

And therefor none of the NPCs want to be arounf you

open bolt
#

hello ! is any mod making zombie blind ?

faint jewel
#

you got made invisible.

next glacier
#

you can make zombies blind in vanilla

#

or was it customized zombies?

#

because i have not played with configs on vanilla zomboid

void lintel
#

Okay so i want to learn how to mod to add some spice to my server with a couple of friends but i dont know where to go

#

Like a new town

drowsy needle
#

Have you checked the Steam workshop?

#

I don't know how to add mods to multiplayer, but I think looking there might be a good start.

verbal ivy
#

server setting→mods

drowsy needle
#

Can anyone here help me use ItemZed? I want to make a joke version of the base scissors, but I can't figure out how to copy the Base scissor's values.

verbal ivy
#

I just edit the original scripts, never used something like ItemZed before

drowsy needle
#

Ah. Very well.

#

How do I find the original scripts, again? If orget.

verbal ivy
#

ProjectZomboid\media\scripts

drowsy needle
#

I see. Thanks.

#

Ok, I've made the joke scissors. Now how do I make sure they spawn in the world?

#

As in, during gameplay, without cheats or recipes or something?

verbal ivy
#

you need to insert the item and spawn chance to the ProceduralDistributions table. I suggest look into other mod's ProceduralDistributions.lua

drowsy needle
#

Understood. I'll see if I can do this part on my own, but, if I can't... I'll ask for help again.

verbal ivy
#

It's easy really, lots of mods have done the same things, you could just figure out yourself by look into how other mods did it.

drowsy needle
#

Huh. Should I be making a server and shared folder, or...?

verbal ivy
#

Well, you should know where the original ProceduralDistributions.lua is in

drowsy needle
#

I'm afraid I don't...

verbal ivy
#

Just do search in the game directory

drowsy needle
#

Got it. Thanks.

#

There anythign I need to do to make sure the joke scissors have the same functionality as the regular scissors?

#

I just copied and pasted the code from the regular scissors.

drowsy needle
#

How do I spawn in items? Do I use the debug menu, or...?

drowsy needle
#

nvm, cheat menu works just as well.

drowsy needle
#

Uh... preview files.

#

How do I do them?

#

I've placed a preview file in the media folder, and in the folder with the mod.info file.

#

It's 447x338 or so, but it's a png file. That should be fine, right?

#

Oh, never mind. Hold on.

drifting ore
#

Okay. FMod Bank Tools does not work at all -.- I was able to extract the bank-file ... BUT ... it does not repack the bank file ... HOW i can fix this?

round kiln
#

anything about tile identifiers code and its list of tiles?

#

trying to modify a short portion of code in a mod to add in the metal roofing as part of something that wont burn the player on ground floor

#

here is the code of the floor is lava mod

drowsy needle
#

Ok, I'm confused.

#

I'm trying to upload a mod to the workshop.

#

I've got the folder, a contents folder in that, and in that folder, I've got a 256x256 png image labeled "preview.png".

#

Never mind.

round kiln
#

nice

drifting ore
#

why the f' can't anybody help me solving my issue?!?

drowsy needle
#

I don't know anything about Fmod, sorry.

drifting ore
#

i just want to replace some zombie sounds ... that can't be that difficult or complex, or? ... <_<

willow estuary
willow estuary
# drifting ore i just want to replace some zombie sounds ... that can't be that difficult or co...

I think that only a relative handful of people have actually used FMOD for PZ modding, and from what I gather it's a fussy, tedious process and has some limitations?
I would try googling it, "zomboid Fmod modding" or somesuch.
Also, I'd suggest looking at the files for other sound replacement mods and see if there's anything in there that could point you in the right direction.
But yeah, googling got results: https://steamcommunity.com/sharedfiles/filedetails/?id=2474838710 although I have no idea if the guide works or anything?

drowsy needle
#

Iv'e got it worked out now, yeah.

willow estuary
#

Oh cool! Was that the issue, or something else?

drifting ore
#

i did'nt wanted to use fmod for modding. i searched for replacing sounds in project zomboid. and regardless, what i found. all say, i have to use this fmod thing ... what i don't like ...

round kiln
#

right now im trying to like, figure out how to modify a code for a mod and im not sure what to do

#

im not even sure what definition or term i should use

willow estuary
drowsy needle
round kiln
#

actually lemme show the code again for the mod im trying to modify

#

this is the entire code for the floor is lava mod, and im trying to figure out what can i do so that the metal roof that is possible to be build through metal working skill wont burn me when i step on it on the ground level or something

drifting ore
# willow estuary I'm just guessing here, but if it was possible to replace sounds w/o using FMOD,...

i already checked the whole interieur of Project Zomboids Folders. There are a few sounds already inside the folders ... but they don't get used by PZ ... But after a few researches and checking other mods, that replacing sounds, they use a bank-file. And all i found about bank-files to unpack them is FMod ... (and yes. the original bank-file from PZ is such a FMod-Bank-File with all the sounds in it. ALL ... over 5000 single files.)

round kiln
#

for someone that never really code this is way too confusing to me

drifting ore
#

i'll try to decompile the Fmod Bank Tools Exe and recode it by myself to maybe work a bit better with bank files and MAYBE figure out, why this bank file not works by the opposite way.

hearty gulch
#

Hey any pointers in how I can make it so that firearms spawn on police officers way less frequently?

willow estuary
hearty gulch
willow estuary
#

👍

#

I would try to modify the sandbox setting via editing the sandbox settings file itself versus doing it with code?

fair frost
gaunt swallow
#

Can someone tell me how the file structure should look like when you place all mods for our own server in one pack?

#

C:\Users\TwentyFree\Zomboid\Workshop\Nirvana Server Mods\Contents\mods\Nirvana Server Mods\media

#

currently this is how i have it, the media map contains every single mod inside its own map: BetterUI,Killcount,etc

drifting ore
#

Does anyone know where and how the tooltips for unequipped clothing add the (+10) next to the resistances? I've been looking for a while but I couldn't find it

#

When I use ISToolTipInv:new(item), I get a tooltip but without (+10)

drifting ore
#

It can't be possible that NOBODY is in any way able to tell, how to work with the soundfiles of pz and how to "replace" them ... some other mods have done this already AND they have modified bank-files ... <_<

bold bay
#

Are there mods that add other survivors in singleplayer?
AKA zombies with guns? Is that a possibility?

chrome egret
#

@drifting ore I believe you're looking for ISInventoryPaneContextMenu.doWearClothingTooltip

#

It iterates over the worn clothing of the player, compares the previous defenses to those on the new item, feeds that info into the tooltip for the new item. The actual tooltip is created as a local returned by ISInventoryPaneContextMenu.addTooltip()

calm depot
#

I've created an object that's spawned as an instance of IsoThumpable but its sprite is nil if I try to access it from getIsoObject():getSprite():getName() - despite this, it is rendering correctly in the game

#

thing is, I have multiple sprites and it needs to change depending on whatever the current sprite is - why the heck would it be nil?

daring palm
#

Folks. I'm trying to create an indestructible container mod. Biscally, the container needs to be both: not thumpable and fire proof

#

I've managed to set it not thumpable so that players can't destroy it

#

as it comes to fireproof, I got no clue on how to set it

chrome egret
#

My suggestion is to look at the code for setting corpses on fire and see if that leads you to anything relevant about items that can or can't burn, or whether fire should spread to a nearby item that is or isn't burnable

daring palm
chrome egret
#

At the very least you should be able to look at the lua code which fills the context menu including the burn option

next glacier
#

I have to ask again

#

any coders?

#

anyone know what value getBloodLevel() and getDirtyness() returns?

#

because its surely not returning the values I want

#

and Weapons are supposed to also have blood thats why you wash it but... I cant find anything related to blood in its table... unless ive missed something?

daring palm
#

they both return a float value

next glacier
#

when checking an item's table in the locals tab of debugger bloodLevel is like 75

#

but the local i set
bloodAmount = bloodAmount + getBloodLevel()

#

bloodAmount shows a decimal

#

ofc if it was a percentage you'd expect the decimal to be 0.75

plush juniper
#

Heya anyone here who play cherbourg map?

next glacier
#

but its something like 0.38 or some weird number

#

that is not even equal to 1-0.75

plush juniper
#

I have this map bug where it's fixed on this position so I can't properly use the map

#

Is there a fix for this?

#

oh wait

#

sorry wrong channel

daring palm
#

what does player:getTotalBlood() return to you?

next glacier
#

no wait sorry I need to clarify

#

im talking bout items

daring palm
#

which items exactly? because the general class InventoryItem has no such methods

#

specialized classes like Cloth do have such methods defined

next glacier
#

so there is absolutely no way to get a nonclothing blood?

daring palm
#

no. I'm not saying that. Maybe some items are not intended to have bloodlevel

next glacier
#

i have a function

function bloodclothes(item)
if instanceof(item, "clothing") then
    return item:getBloodLevel()
else
    return i want to get blood level here of item
end
daring palm
#

You can't get bloodlevel from items which were not coded for it

drifting ore
daring palm
#

It seems to me that only Cloth, HandWeapons and InventoryContainer have bloodlevels associated

#
public boolean hasBlood() {
      if (this instanceof Clothing) {
         if (this.getBloodClothingType() == null || this.getBloodClothingType().isEmpty()) {
            return false;
         }

         ArrayList var1 = BloodClothingType.getCoveredParts(this.getBloodClothingType());
         if (var1 == null) {
            return false;
         }

         for(int var2 = 0; var2 < var1.size(); ++var2) {
            if (this.getBlood((BloodBodyPartType)var1.get(var2)) > 0.0F) {
               return true;
            }
         }
      } else {
         if (this instanceof HandWeapon) {
            return ((HandWeapon)this).getBloodLevel() > 0.0F;
         }

         if (this instanceof InventoryContainer) {
            return ((InventoryContainer)this).getBloodLevel() > 0.0F;
         }
      }

      return false;
   }
#

from InventoryItem

next glacier
#

HandWeapon
and
InventoryContainer

right?

#

so i can have

function functionname(item)
if instanceof(item, "Clothing") or instanceof(item, "HandWeapon") or instanceof(item, "InventoryContainer");
return item.getBloodLevel()
end
#

thanks

#

will get to testing this

next glacier
daring palm
#

decompiling java

next glacier
#

oh probably something i couldnt have done

#

because I couldnt know what items had bloodlevels

daring palm
#

yep. Java code is useful to inspect things

#

you can "make sense" of things much faster than the trial and error method

next glacier
#

what statement do I do

#

to reject if its nil

daring palm
#

if the method is not defined?

#

or the value is nil?

next glacier
#

dont they mean the same thing?

#

or yeah if the method returns nil

#
local function CalculateItemFilth(item)
    local bloodAmount = 0;
    local dirtAmount = 0;
    local waterUsage = 0;
    if instanceof(item, "Clothing") or instanceof(item, "HandWeapon") or instanceof(item, "InventoryContainer") then
        bloodAmount = bloodAmount + item:getBloodLevel();
        dirtAmount = dirtAmount + item:getDirtyness();
    else
        bloodAmount = bloodAmount + 1
    end
    waterUsage = bloodAmount+dirtAmount
    return waterUsage
end```
#

current code

#

ISWashClothing.GetRequiredWater
returns 10
i overrided that to return waterUsage
i didnt send that part of code here

rose acorn
#

Hello!

next glacier
#

Hello

daring palm
#
if value ~= nil then ...
rose acorn
#

How are you mates?

#

I hope someone here is willing to take a simple request

next glacier
#

oh is it that simple?

#
if item:getBloodLevel() ~= nil then```
daring palm
#

you're testing if the method exist

#

if you want to know the returning value, then you must call the method with ()

#

ok

next glacier
#

does this count as the method existing

daring palm
#

are you sure the method returns nil? I think it returns 0

next glacier
#

but has a nil value

#

tried to call nil

daring palm
#

getBloodLevel() returns a float value. I assume 0 indicates no blood at all

next glacier
#

ah wait

#

found issue

#

item:getDirtyness() returns nil

rose acorn
#

Anyone here can make a simple mod where during starting a new game a modded vehicle of my choice is already spawned outside of the house/spawn point?

next glacier
#

am confused

#
local function CalculateItemFilth(item)
    local bloodAmount = 0;
    local dirtAmount = 0;
    local waterUsage = 0;
    if instanceof(item, "Clothing") or instanceof(item, "HandWeapon") or instanceof(item, "InventoryContainer") then
        if item:getBloodLevel() ~= nil then
            bloodAmount = bloodAmount + item:getBloodLevel();
        end
        if item:getDirtyness() ~= nil then
            dirtAmount = dirtAmount + item:getDirtyness();
        end
    else
        bloodAmount = bloodAmount + 1
    end
        waterUsage = bloodAmount+dirtAmount
    return waterUsage
end```
#

java.lang.RuntimeException: Object tried to call nil in CalculateItemFilth
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:973)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:169)
at zombie.ui.UIManager.update(UIManager.java:930)
at zombie.GameWindow.logic(GameWindow.java:253)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:745)
at zombie.GameWindow.run_ez(GameWindow.java:661)
at zombie.GameWindow.mainThread(GameWindow.java:475)
at java.base/java.lang.Thread.run(Unknown Source)

#

yea if the method doesnt exist

#

even if i do method ~= nil

#

still does it

daring palm
#

try this

next glacier
#

so new code

daring palm
#
local function CalculateItemFilth(item)
    local bloodAmount = 0;
    local dirtAmount = 0;
    local waterUsage = 0;

    if item.getBloodLevel then
      bloodAmount = bloodAmount + item:getBloodLevel();
    end

    if item.getDirtyness then
      dirtAmount = dirtAmount + item:getDirtyness();
    end

    waterUsage = bloodAmount + dirtAmount
    return waterUsage
end
next glacier
#
local function CalculateItemFilth(item)
    local bloodAmount = 0;
    local dirtAmount = 0;
    local waterUsage = 0;
    if instanceof(item, "Clothing") then
        if item:getBloodLevel() ~= nil then
            bloodAmount = bloodAmount + item:getBloodLevel()/10
        end
        if item:getDirtyness() ~= nil then
            dirtAmount = dirtAmount + item:getDirtyness()/10
        end
    elseif instanceof(item, "HandWeapon") or instanceof(item, "InventoryContainer") then
        if item:getBloodLevel() ~= nil then
            bloodAmount = bloodAmount + item:getBloodLevel()/10
        end
    else
        bloodAmount = bloodAmount + 2
    end
        waterUsage = bloodAmount+dirtAmount
    return waterUsage
end```
daring palm
#

instead of testing the item's class, try testing if it responds to a method

next glacier
#

It can be made as simple as that?

#

probably thought too hard

#

let me test

daring palm
#

don't know. Try it out

#

not an expert in Lua ... but that should work

next glacier
#

yeah i say that because it looks like it could work

chrome egret
#

Your example JosEffigy is only doing a value comparison

#

But the problem is in the call itself. hotdog's method should reference the method as a handle without invoking it to test

next glacier
#

i have this other part of code

local ISWashClothing_GetRequiredWater = ISWashClothing.GetRequiredWater;
function ISWashClothing.GetRequiredWater(item)
    local vanillaWaterAmount = ISWashClothing_GetRequiredWater(item);
    local filth = CalculateItemFilth(item)
    
    if filth < 1 then
        return 1
    else
        return filth
    end
end```
#

that i dont need editing so i didnt send

#

basically should return what calculated in first

#

i have this

next glacier
daring palm
#

the code I sent you from CalculateItemFilth does return 0 when the item has neither a bloodlevel nor dirtyness

#

you can fix that by adding +1 in the final call if you want to

next glacier
#

ah wait

#

that was dumb

#

should not have /100

#

its perfect

#

thank you so much

#

i was racking my brains because although I wasnt good at lua

#

I was focused on knowing what items had the methods

daring palm
#

yeah ... your logic was correct in fact, but sometimes there is an easier way to do things

next glacier
#

btw after I tweak this

#

this is basically what happens

#

if 100/100 blood and 100/100 dirt
then water usage = 10

#

no wait. maybe i should balance this so that
100/100 bloody = water usage 10
and 50 dirt + 50 blood = water usage 10
because dirt stacks slowly and some items dont have dirt

#

i present

#

finished code

#
---@param item InventoryItem
require("ISWashClothing")
local function CalculateItemFilth(item)
    local bloodAmount = 0;
    local dirtAmount = 0;
    local waterUsage = 0;

    if item.getBloodLevel then
      bloodAmount = bloodAmount + item:getBloodLevel()/10
    end

    if item.getDirtyness then
      dirtAmount = dirtAmount + item:getDirtyness()/10
    end

    waterUsage = bloodAmount + dirtAmount
    return math.floor(waterUsage+0.5)
end

local ISWashClothing_GetRequiredWater = ISWashClothing.GetRequiredWater;
function ISWashClothing.GetRequiredWater(item)
    local vanillaWaterAmount = ISWashClothing_GetRequiredWater(item);
    local filth = CalculateItemFilth(item)
    
    if filth < 1 then
        return 1
    elseif filth > 10 then
        return 10
    else
        return filth
    end
end

local ISWashClothing_new = ISWashClothing.new;
function ISWashClothing:new(...)
    local this = ISWashClothing_new(self, ...);
    local waterUnits = ISWashClothing.GetRequiredWater(this.item)
    local filth = CalculateItemFilth(this.item)
    this.maxTime = waterUnits*20
    if this.maxTime > 200 then
        this.maxTime = 200
    elseif this.maxTime < 1 then
        this.maxTime = 1
    end

    print("Washing Information")
    print("filth: ", filth)
    print("maxTime: ", this.maxTime)

    if this.character:isTimedActionInstant() then
        this.maxTime = 1
    end
    return this;
end```
daring palm
#

congrats, man @next glacier

next glacier
#

thanks for the help @daring palm

#

btw

#

why wash weapons?

#

its 64/100 blood and water is 1/1
so probably doesnt have bloodlevel

#

because if filth < 1 then
return 1

#

but now that I think about it, why wash weapons at all?

chrome egret
#

Does it contribute to overall unhappiness for survivors who don't like being dirty?

next glacier
#

uh no clue

#

UI in game shows you can wash nightstick

#

and its 64/100 blood

#

but doesnt get calculated as bloodLevel
probably doesnt have it

hot patrol
#

what is the difference between "weaponsprite" and "icon"?

calm depot
#

about to push an update to the rain barrel crafting, y'all OK with that?

#

ah shit, wrong server

fair crater
#

Does anybody know if theres a mod that displays map markings on the minimap?

Example: Plop down the house icon on your safehouse, then on the minimap you can see it

hollow drum
#

Can't you click the "S" button on your mini map to see symbols ?

fair crater
#

oh

#

That's

#

a thing.

#

Well, thank you very much, Joe.

#

I did not actually know that existed, so thank you

hollow drum
#

No sweat.

zealous pebble
#

Ah ok ill try looking there

#

Hopefully I can figure out how to apply my profession

faint jewel
#

wiat wait wait... better towing guy is going to redo fishing? cars will be stuck to your fishing pole XD

#

i kid i kid.

zealous pebble
#

Is there an easy way to get a new profession in the game i know theres the frame work

silver kindle
#

I dont think mod support should be posted in tech support right? im having an ingame map issue
My ingame map in zomboid does not show the modded area I am in, but it shows for the host just fine. Example is West Point Expanded wont show for me on the ingame map, but does for the host

hot patrol
#

Can you taste that? It's degeneracy

#

so first and foremost I don't like how it looks when placed on the ground. Part of the mod is supposed to be displaying them in your base but you can hardly see the images

#

anyone got any suggestions?

abstract raptor
#

thonk Is there a way to make campfires infinite?

fair frost
hot patrol
#

That coudl do

faint jewel
#

whys that one pillow all sticky?

hot patrol
#

Don't worry about it

scarlet cedar
#

i got an idea of a cool mod.
basically season 10 of the walking dead the whisperers, could make it occupation and or traits to help blend in with the zombies and stuff.
you'll understand if you watched the walking dead

drifting ore
hot patrol
#

not a terrible idea

drifting ore
#

If you dont make an option

#

To attach them to cars

#

Like Atellier

#

Then I'll be upset

hot patrol
#

I wouldn't even know where to begin on allowing something like that

#

but I want to

drifting ore
#

Another idea for base display might be like

#

Placing them as "wallart" kinda?

#

Like placing them against a wall specifically

fiery pecan
#

hello everyone! I come with a modding question: How does one dynamically update changes to a zombie??? Specifically the outfit. I have dressInPersistantOutfit("NAME"), but it doesn't show the changes till a world reboot?

drifting ore
#

No idea the implications of that though

hot patrol
#

same here. Just getting them in this form has been a ball ache

#

Making them thinnker didn't seem to help in any way. Sadly I think it is just the perspective

#

Making stands is a good idea but since I don't know how to code or model that it will have to wait for a later date because I feel ready to upload this beast

hot patrol
#

It's in about as good a shape as I can get it for now so I figured I would post it

abstract raptor
#

is it possible to like... um... disable stun lock?

faint jewel
#

question... out of sheer curiosity. would it be possible to add a zombie model that has different animations? for instance if someone ported the tank from l4d.

faint jewel
#

100%? or not been tested?

nimble spoke
faint jewel
#

hmmmm

#

well that makes my idea of "ultimate zombie game" a bit less interesting.

grizzled grove
#

you could animate new ones from scratch, or retarget l4d anims onto the pz skeleton. Copyright issues aside, that would work

faint jewel
#

well that's what i meant. but with the other model.

grizzled grove
#

making a zombie look like a tank would be a small challenge, but doable.

willow estuary
#

You just give it clothing that's a tank costume. Done.

#

That's how Sould Filcher did his nemesis zombie.

#

Although making it so the costume can't be removed/worn requires some extra care and attention, but is certainly doable.

grizzled grove
willow estuary
grizzled grove
#

that's something i'd like to figure out someday (too many plates spinning right now), but how to append to the animSets xml files without touching the originals

shut valley
placid hinge
#

Random question out of the blue but by chance anyone know how to output an weapon mag through an recipe crafting to get it be fully loaded?
I heard of OnCreate: but idk if it can be used here

willow estuary
#

OnCreate is the way you would do it.

placid hinge
#

Huh as thought but what should it be set if I can ask. Been looking through a bit other mods but can only find people using it for flamethrowers and cause of such, using something like - OnCreate:Fill_LiquidAmmo

daring palm
#

Guys. is there an event for an item update when its state changes?

willow estuary
#

You're gonna need to create a custom lua function that is called when the recipe OnCreate is called.
Something with the equivalent of "result item set ammo count to maximum ammo count" or such.
Look at the recipecode.lua in media/lua/server for how vanilla PZ handles OnCreate functions for recipes.

placid hinge
#

Ahh got it, need to go a bit deeper than lol. Thanks for the help, pretty much jus trying to create mag that get charged via the crafting tab to be fully loaded rather than inserting bullets.

lusty nebula
#

I was reading PZ wiki about lua event and about the OnTick one it says, I quote " Triggered every tick, try to not use this one, use EveryTenMinutes instead because it can create a lot of frame loss/garbage collection. "
My scripts uses this to not let spawn the default belt applied by the game when a new character is spawned....better switch to the 10 mins one or not?


   Events.OnTick.Remove(RMMM_MilitarySpawn.RemoveBelt)
   local item = getPlayer():getInventory():getFirstTypeRecurse("Base.Belt2")
   getPlayer():getInventory():Remove(item)
 
 end
 
 
Events.OnTick.Add(RMMM_MilitarySpawn.RemoveBelt)```
willow estuary
#

You do realize that using this code means that if a player finds a belt that it will be removed from their inventory when the function is called?

lusty nebula
#

yep but in the script I've already fixed it...I was just curious if, fps wise, was better to use the 10 mins one

willow estuary
#

Well yes, but it would be better just to have this code be called once, when the character has first been created/spawned.

lusty nebula
#

ok so how can I call it just once? ( Sorry I'm not a big expert of scripting ) Can you please edit the part above and paste it here ( if feasible ) thanks

#

@willow estuary I have to use the OnGameStart trigger I guess...correct?

hot patrol
#

So I got a suggestion that I should add instructions for people to add their own waifu body pillow addon mods kinda like some weeb version of true music but tbh I don't really know how. Is it just as simple as giving them the Photoshop files I used to make mine and running them through on how to work the config?

last oak
#

So I'm looking into making a simple mod to add one farmable plant to the game. So far I've seen that vanilla plants are hard-coded in farming_vegetableconf.lua and SFarmingSystem.lua, how easy is it exactly to just add a modded type of plant to this same logic? Are there any other lua files I need to be aware of? I want to keep my mod very lightweight.

#

Additionally, does anyone know of a mod that adds one single plant with vanilla behavior like I'm talking about that I could look over? I know of a few that add a ton of plants with custom recipes and stuff, but I want to stick as close to vanilla as possible.

silent bloom
#

Working on a custom TV channel and so far so good. I've got it working and it's entertaining to watch. I was hoping to clarify some codes used in the default radiodata.xml - does anyone know the three I have labeled "NOT SURE" can can confirm?

rose acorn
#

Hello...someone here willing to take a simple request?

dusky prawn
#

hey yall, wonder if you can help me out. I haven't really been playing MP, but users report it doesn't work in MP. It's a tiny thing, and I imagine I just need the right event?

require('NPCs/MainCreationMethods');
local function init300PointsTrait()
    TraitFactory.addTrait("300Points", "300 points", -300, "Get 300 points to spend on traits.", false);
        --300Points:addXPBoost(Perks.someperkname, 0)
end

Events.OnGameBoot.Add(init300PointsTrait);
dusky prawn
glass ocean
#

Anyone working on a mod to make candles to stay on table and work like real candles?

dawn shuttle
acoustic wedge
#

i wanna commission someone for a mod if i can do that. armor mod

tranquil reef
#
local eggItem = InventoryItemFactory.CreateItem("Egg")
specificPlayer:getCurrentSquare():AddWorldInventoryItem(eggItem, 0, 0, 0)```
#

I'm trying to get this egg to spawn right underneath where the player is standing, but this is randomizing where in the square it goes

#

I'm confused why it's doing that lol, can anyone explain?

drifting ore
#

Mannequins are technically 3d assets

#

That act like tiles

#

I imagine through that you can interpolate a way to just change between textures depending on what pillow/stand combo is used

scenic mulch
#

Aye. Anyone know how to add a Mechanic Interface on a custom vehicle?

hollow shadow
#

Someone make a mod that makes falling off a building less punishing. Especialy since some maps have non collision railings :v

drifting ore
#

Uh

#

Like DayZ fall damage?

#

Where you can fall like 5 stories and only break your legs

#

Well, old DayZ

#

Latest DayZ has it so a 2 story fall knocks you uncon

sinful vessel
#

When im combining 2 items how can I make recipe to disregard condition of the second item and keep first items condition without change?

hot patrol
hot patrol
golden plover
#

Is it possible to add pop up headlights? I’d presume it would have to be a seperate model but no idea how to tell the script to change the models when turning lights on or off

vivid flare
#

yes, with animations. check workshop, autotsar people recently had a car like that

vivid flare
inner chasm
#

Hello, does anyone know how in in which files I can change the maximum carry capacity from 50

next glacier
#

amazing

#

big fan

#

damn. very ambitious mod

#

project poweroid

#

what do you think about mine @hot patrol

fair frost
hot patrol
#

Or in the case of the anime faces eye shape.

#

That would be cool

hot patrol
next glacier
#

i have no idea what to do

#

maybe at an item that cannot be looted

#

and make zombie equip them?

#

so they look like power?

#

because player and zombie models are the same

hot patrol
#

Nooooooo

#

If you are gonna make me have to kill someone make it makima

#

Fuck Makima

#

All my homies hate Makima

next glacier
#

power

#

waifu af

#

then takes off pads

#

jacks off

#

flat is justice

#

doesnt like big badonkers anymore*

hot patrol
#

Power is best girl therefore no zombie version

next glacier
#

If I knew QoL UV and texture hacks

#

also modeling hax

#

I would make those mods

hot patrol
next glacier
hot patrol
#

Them make it so I can play as her. Power eats zombies she does not become one of them

next glacier
#

maybe I can make a mod

hot patrol
next glacier
#

front

#

that can easily be made into texture

#

so the art style looks like chainsawman

hot patrol
#

I have just the one but it will have to wait for me to get home

next glacier
#

hard to make UV edits to prevent completely breaking other mods

#

cant change it drastically

#

you guys know

#

about this

#

mod options documentation says admin can change options before server start

hot patrol
next glacier
#

ill need to edit it abit

#

hmm are you home now @hot patrol ?

hot patrol
#

yep

next glacier
#

so what would you think

#

if i changed model again

#

remove the mouth

#

does any mod use mouth anymations?

hot patrol
#

I didn't even know the model had a mouth so I doubt it.

#

The model is so small you wouldn't see any detail there anyways

next glacier
#

wanna see stream?

#

yea

hot patrol
#

I'm working on something myself currently but keep me updated

next glacier
#

shat

#

what do her eyebrows look like

#

i think ill use this instead

#

clearer

next glacier
#

doesnt look close

#

@hot patrol

hot patrol
#

ooo

#

I like it

#

though I wonder how good it would look in game

next glacier
#

cant capture her beauty 😢

hot patrol
#

I feel like that level of detail might be jittery looking on the small model

#

maybe redice the detail on the eytes to only the most important elements

next glacier
#

tru

hot patrol
#

I do like it though

#

The mouth might also need to go. You wouldn't be able to see the fangs anyways

#

but I would test it first

sinful vessel
#

If you really want it high detailed and if you are going to look at it mostly it means you are not going to put a helmet or mask on it why dont you make that head a wearable helmet make custom UV and detail it out as much as you want?

#

If you are going to wear stuff over it make a custom body location then you can wear other stuff over it if they wont clip much

hot patrol
#

I mean you could do that but I think the main issue stems just from the fact that high detail is lost on a small scale model. Even if he went that route you still need to make compromises so that the texture doesn't liik like a mess.

#

In game we will never get a close up view like in that image so whilst it is nice it means very little

#

I learned that making my mod.

next glacier
#

I dont know how

hot patrol
#

well for one get rid of the eye wrinkles. those lines are too thin you won't see them. Make the eyeborws more pronounced by not outlining them maybe

#

outlines are likely to only make the textute look choppy

next glacier
#

Yeah i dont know how to make a custom body location

#

what does that even mean

#

we dont attach them to bones?

#

oh right

hot patrol
#

oh I don't know about any of that

next glacier
#

so custom body location so that it wouldnt register as

#

helmet

#

so you can wear stuff over it

hot patrol
#

you know that is actually a good approach. then in the character creator make a selector for you to pick those heads.

#

unless I am understanding wrong

next glacier
#

yeah

#

I'll do that next time

hot patrol
#

just make the full head, hair and all

sinful vessel
#

You could add extra details to the mesh, around eyes, eyebrows and some good ambient occlusion paint it would look great

#

You cant do these while just painting base character model

next glacier
#

yea

#

its already up to 1024

#

and the texture quality still is degraded

hot patrol
#

it does look a lot better with the extra detail reduced

#

I wanna see how it looks in game

next glacier
#

ok wait

#

due to

#

lazyness

#

ive only done one texture

next glacier
hot patrol
#

a formal shirt suite pants and a tie

next glacier
#

did u really make those horns

hot patrol
#

the horns is from the demonware mod

next glacier
#

ngl looks bad

hot patrol
#

not really bad it's just you can't really tell what it is supposed to be

#

kinda figured

next glacier
#

yeah

#

the hairline is too low

hot patrol
#

yea the hair doesn't fit either

#

if you had hair to go with it I think it would all fit together and be more understandable

next glacier
#

thats why i edited model and textures

#

the hairline isnt realistic, let alone anime

#

where foreheads are bigger than real

#

and the ears are too high

#

looks better with mikasa hair tho

#

edited it abit

#

squished the face more

hot patrol
#

just looking at the mikasa hair makes it more recognizable

#

with the bang in her face

#

I think the smile is odd.

#

I think it would look better with no mouth so you can interperate the expression yourself

#

a permanent smile looks off

#

or something a little more subtle

next glacier
next glacier
hot patrol
# next glacier

I like it. again, the size of the model and the perspective is working against you here but I do think it looks good in the situations where you can really see it. Perspective has been a challenge for me as well. Like when I place my pillows on the ground you can't see the image very well and that was one of the main reasons I made it

next glacier
#

is it possible for you to

#

make the ground model standing?

hot patrol
#

yea but that would look offputting having it just stand straight up. I want to be able to lay it on the bad like you would IRl. Maybe have suggested adding stands for them and that is what I will probably do if I can work out how.

#

Ideally I would like to be able to rotate both axis when placing items in world so you can display it as you wish.

#

gonna have to nag the devs for this aPES_LulLaugh

#

@drifting ore 😉

#

Imagine being able to prop things like guns against the wall rather than just dropping them to the floor

#

I love small stuff like that

next glacier
#

and personally id want a "60fps UI" mod

hot patrol
next glacier
#

lua editable but i sucks at lua so..

next glacier
#

for portrait

#

@hot patrol i dont like how your mod has a different name in workshop and mod list

#

almost couldnt find it xD

#

i thought what? i subscribed to big degen

#

where is mah big degen

hot patrol
#

is it zomboidDakimakura or something in the mod list? if so I forgot to change it

next glacier
#

in steam its big degen's dakimakura emporium

#

so i thought it was big degen

hot patrol
#

what was it in the mod list?

next glacier
#

zomboid dakimakuras

#

dead last in mod list

hot patrol
#

ah yea ok

#

that was just a dumb name I gave it when making the mod

next glacier
#

i also keep forgetting to change it

hot patrol
#

forgot to change it

next glacier
#

from modtemplate

hot patrol
#

lol

#

the workshop name I gave it is a little long winded so I will probably name it after the mod ID

#

so WaifuDakis

#

but idk

next glacier
#

uhh

#

my reorganized info screen not working

#

or maybe because im in debug

#

right

#

dumb dumb

#

forgot to add it to the save

#

btw @hot patrol nice poster.png

#

did you draw it yourself

hot patrol
#

no

#

I had found it online

#

lol

next glacier
#

nice choice then

hot patrol
#

yea it fits good

#

sadly it has makima on it

next glacier
#

imagine in an actual zombie apocalypse

#

your copium

#

grabbing em dakis

#

how bout now @hot patrol

hot patrol
#

much, much better

hot patrol
# next glacier grabbing em dakis

I had really wanted to push the mod out before MP hit so that in the description I could make it look like I was trying to sell somebody on a MP mod by going on about being lonely and then BOOM body pillows

daring palm
#

does anyone know how to create an item in a specific map location?

#

basically speaking, does anyone know how to get a cell from a specific map location?

#

I've inspected the java source and got nothing at the moment

#

I've searched here and it looks like it's still an open issue for most of us

next glacier
#

did you add pillows in distribution tables?

#

and do they spawn near beds?

#

@hot patrol ?

small topaz
hot patrol
#

They spawn on special neckbeard zombies and on double beds kinda like the screenshot on the the workshop page

#

I made them rare so it's not too overly goofy

#

plus it's a collectable

#

I'm using a dick bat mod on my private friend server and I find the damn things in every house

#

it kinda ruins the meme

next glacier
next glacier
#

ruins the anime theme

hot patrol
#

are those Question marks caused by my mod?

#

they are just hentai bats

#

very in theme

next glacier
#

how do you get the rope thing

#

idk why question marks appear in debug mode

hot patrol
# next glacier

I really need to tweak that back placement. I don't like how it clipps the arm. It is really hard to work with tho.

hot patrol
#

1 pillow per side

#

so you can do 1 for the back and front

next glacier
#

sadly when equipped on back

#

bunny girl side

#

i wanted the hawt side xD

#

maybe for front

hot patrol
#

that side is on the front piece.

#

so the back piece shows the back image and vice versa

#

made the most sense to me

next glacier
#

hmm

#

different models for front and back?

#

i thought you could

hot patrol
#

yep

next glacier
#

just like weapons

hot patrol
#

the front is drooped so you can see

next glacier
#

equip on dropdown

#

you choose to equip front or back

#

rather than crafting a front and a back

hot patrol
#

I could have probably did that

#

not sure

#

that was just the easiest method

next glacier
#

is this the way normals render or

#

or can it be changed by

#

shade smooth in blender?

hot patrol
#

?

#

oh the squares?

next glacier
#

ah right

#

the weapon model is smooth

hot patrol
#

yea idk why it's like that. So I made the weapon model and @hexed arrow made the armor. I tried sdhade smoothing it but it didn't appear to do anything

next glacier
#

weapon is not in equipped category

#

yeah the weapon looks smooth

#

the armor not so

hot patrol
#

maybe I just made the weapon a higher poly than he made the armor

next glacier
#

not returning rope when uncrafting is also

#

intentional right

hot patrol
#

yep

#

zombied survivor ties knots too tight and ruins the rope undoing it

#

tbh Idk why I choose to do that

next glacier
#

yup both armors have square normals

hot patrol
#

I'm not good at blender but if you are you are welcome to fix it 😉

#

I had tried shade smoothing it myself

hot patrol
#

You are making me realize just how not ready my mod was XD

next glacier
#

if its armor its equiped

#

dont worry

#

many of my mods werent ready

#

esp the coding mods

#

but they are now

#

check out "Better Washing"

#

and "Reading is a joke"

hot patrol
#

yea, it'll get there.

chrome egret
# daring palm does anyone know how to create an item in a specific map location?

Hey hotdog, check out Robomat's modding tutorials thread: https://theindiestone.com/forums/index.php?/topic/61-robomats-modding-tutorials-updated-12112013/, section d "Customer Spawnpoints". While I realize you're concerned with items, there is a digression about the player's "absolute" coordinates position and translating that.

hot patrol
#

Maybe

next glacier
#

yeah your weapon has quite the polygons

chrome egret
# chrome egret Hey hotdog, check out Robomat's modding tutorials thread: https://theindiestone....

"So if our cheater profession should start in the large warehouse (where else!?) the game will show us a player position of X: 3110 and Y: 1809. Unfortunately we can't use those "absolute" coordinates for the spawning code. We have to calculate the "relative" coordinates instead. Don't worry though - it is pretty easy. Basically you just need to divide the absolute coordinates by 300 to get the cells, but more importantly you have to ignore the remainder. Our coordinates for the big warehouse would be X: 10 and Y: 6 then. Now we have the cell in which the player should spawn. Relative to that position we need the exact coordinates and this is where the remainder comes into play. Still using the above coordinates the remainders of the division would be for X: 110 and for Y: 9."

small topaz
# willow estuary Well yes, but it would be better just to have this code be called once, when the...

I think the command Events.OnTick.Remove(...) in the code example makes it so that the function is called only once on the first game tick. this is exactly when the player has spawned for the first time. problem was that the default belt could not be removed easily via events like OnNewGame since it wasn't clear to us when the game adds the belt to the player. what I don't know though is how this behaves if the player re-joins an existing world after player death by using the option "New Character", i.e. not clear for me whether the default belt gets still removed in such a situation.

chrome egret
# chrome egret "So if our cheater profession should start in the large warehouse (where else!?)...
hot patrol
next glacier
#

@hot patrol you sir got trolled

#

every edge is marked sharp

#

also i think smooth normals work

willow estuary
next glacier
#

because when i imported your weapon, the normals were smooth

next glacier
hot patrol
#

I don't know what that means.

#

I have 0 experience in blender

#

I made my model following a literal pillow making tutorial

next glacier
#

if its marked sharp

#

the line/edge

#

then it will never be smooth

#

like tips of swords and stuff are marked sharp

#

so the edge wont be smooth

#

its as simple as clear sharp tho

hot patrol
#

ohhh

#

well damn

next glacier
#

cleared sharp

#

same amount of faces.
low res

#

hes right in one part, to decimate the faces to optimize performance of the game

#

but he marked everything sharp

hot patrol
#

I will fix that now

next glacier
#

wont keep the folds though because the folds exist because your model is high res

#

hmm

#

you know what I can make nose sharp

#

by marking sharp

hot patrol
daring palm
#

@chrome egret thank you for your reply. Knowing how to get a cell(x,y) from an absolute position really helps. Now I only need to know how to get the cell

small topaz
daring palm
#

Is there a function getCellAt(x,y) or somethign equivalent?

hot patrol
#

yea

next glacier
#

do you have it on yours?

#

the bug?

small topaz
hot patrol
next glacier
#

uhh

#

did you override

#

did you edit global class?

hot patrol
#

not sure\

#

I had help with the coding side

next glacier
#

yup

hot patrol
#

shit

next glacier
#

you see can opener

#

in the same photo

#

and theres no open canned beans

hot patrol
#

what would have caused that?

#

that's a huge issue

next glacier
#

i think you edited something

#

that shouldnt

#

i dont think you really need that
--- if for whatever reason line

#

might make it black if you do or {}

#

because if they are vanilla files no reason why they dont exist as globals

#

esp if u have require

hot patrol
#

Ok so I think this was put together because when I tried making neckbeard zombies they would spawn in with no clothes

#

I will try getting rid of it.

#

Everything in that screenshot?

next glacier
#

just test

#

keep backup

hot patrol
#

what part do I delete?

#

oh the --- lines

#

ok

next glacier
#

no

#

i mean

#

the whole line

#

thing = thing or {}

hot patrol
#

ok

next glacier
#

just check any global variables that you have

#

replaced

#

ah

#

i think i found it

#

its not this

willow estuary
#

This sort of statement variable = variable or {} does not replace or over write global variables.
It only defines them if they don't already exist.
That is normal good practices.

next glacier
#

does placing files here

#

Append

#

or Replace?

#

i think this is replacing

willow estuary
#

Now that is definitely not the right way to do things and will cause no end of headaches.

next glacier
#

@hot patrol the vanilla files

#

contain the can opening

#

and shit

hot patrol
#

Wait so what did I do wrong?

next glacier
next glacier
hot patrol
#

ohh

next glacier
#

and vanilla file has every recipe

hot patrol
#

so I should rename the file to something else?

small topaz
hot patrol
#

gotcha

next glacier
#

so in other words recipes.txt already exists

willow estuary
gilded hawk
#

how often is Events.OnPlayerUpdate called? Every frame?

next glacier
#

and they contain every recipe in vanilla

#

you replaced everything with dakis

#

xD

#

dakis are life

hot patrol
next glacier
#

yeah

small topaz
hot patrol
#

such a dumb mistake literally breaking the game

#

working as intended!

next glacier
#

there is also

#

fileguidtable

#

idk what to do with it

#

but you are replacing it i think

hot patrol
#

that needs to be renamed to? That has all the vanilla clothin in it because again for some reason without it my zombies were nude

next glacier
#

idk what to do with it

willow estuary
next glacier
#

it wont?

#

what should the contents be like @willow estuary

#

only the new added items

#

?

willow estuary
#

It's how every mod that add clothing does it.
It absolutely works that way.

next glacier
#

because i see every vanilla item in his fileGuidTable.xml

willow estuary
#

It should contain any new clothing items.
And any other clothing items referenced in the mod's zombie outfits,

#

That's normal for mods that add outfits.

next glacier
#

so that's fine?

#

so fileGuidTable.xml doesnt work the same as .txt

hot patrol
#

so that is why my zimbies were nude. in any case having all the items seems to make things easier if I ever make a new zed

next glacier
#

just asking in case I make a clothing mod as well

hot patrol
#

can open cans now

#

anybody know an easy way to change position of attachements on body? The attachment editor is so confusing

#

I just need to tweak it a little

next glacier
#

attachment editor?

#

how do you open that xD

hot patrol
#

in the ebug

#

debug

#

I just want to fix that clipping

#

I just know if I touch it tho everything will break

drifting ore
#

Okay. (Maybe) Solved the issue. After asking here for days ... now i got a tip from a steam-friend ... the sound-files have to be THE SAME LENGTH as the originals ... <_<

next glacier
#

what

next glacier
#

you mean f11 debug?

#

i dont see it

hot patrol
#

no the little icon on the left side UI

next glacier
#

ohhhh

#

thanks

hot patrol
#

Don't thank me yet

#

that thing is miserable

next glacier
#

just wanna know

#

btw

#

this guy is a legend

#

great art style

nimble spoke
gilded hawk
hot patrol
#

Yea dude makes great art

#

I follow him

next glacier
#

im from same country

#

theyre my fb friend

hot patrol
#

knock on his door and tell him to draw more power

next glacier
#

on their personal account

#

"friend"

hot patrol
#

cool

next glacier
#

will upload soon

hot patrol
#

so do you actually know them?

next glacier
#

nope

#

i just know their name from their personal facebook

#

haha

hot patrol
#

how did you find that CH_PepeScared

next glacier
#

also one of the mods in your collection is like

#

900mb

#

true music addon gamer...

hot patrol
#

me like music

hot patrol
next glacier
#

not tonight at least

#

right now this is a player replacer

#

might add hair soon

#

might add horns as part of hair actually

hot patrol
#

Honestly doing the full head as it's own thing is something you should look into for the future. That sounds like a really good idea for more character centric ones like this.

#

Then being able to pick that head in the character creator

next glacier
#

hmm

#

what if we model the hair

#

into a head

#

so its like we are selecting head?

hot patrol
#

that's what I mean. just like the full head and hair as one

grizzled grove
#

just a reminder to keep it family friendly in here

next glacier
#

temporary

#

deleted now

#

for only nalmac to see

grizzled grove
#

then use a private message?

next glacier
#

how do i even load daki back here? @hot patrol

#

i can only see dakiarmor_ground

hot patrol
#

they are named dakimakura 1-10

next glacier
#

and i dont understand shit

hot patrol
#

neither do I

#

like I said it is confusing

next glacier
#

i think they use blender for this

hot patrol
#

I tried blender but I think the way I have my model makes it kind of impossible and idk how to fix it

#

I would prefer it tho

next glacier
#

i think theres some kind of data translation thing

#

then you convert it

#

so the origin point remains the same

hot patrol
#

Yea I know but I couldn't quite seem to get it right

next glacier
#

delete all vertex groups except for part you want to attach

#

dont know what this all means but

hot patrol
#

yea neither do I. I just moved the model around and checked it in game and simply couldn't get it to work

hot patrol
next glacier
#

colors dont translate very well

#

@hot patrol thats a wohoi profile bg there

hot patrol
#

?

next glacier
#

your steam

#

thanks for the comment

hot patrol
#

oh lol

#

No problemo

next glacier
#

time to

#

sleep

#

kekw

hot patrol
#

Good night

drifting ore
#

anyone wanna play

fair crater
acoustic wedge
#

anyways

#

never noticed how many mods i was using

hot patrol
# fair crater Furry version?

I won't be touching that one but you are welcome to once I get it sorted out well enough to open it up to user made addons

fair crater
hot patrol
#

I know that feeling

torpid briar
#

someone do a BMW mod please 🙄

hidden compass
#

I'm looking for a way to add loot for a specific zombie. For example, when I kill a policeman zombie, it drops a specific item (in zombie's inventory).

Are there any mods that would be helpful?

willow estuary
hidden compass
gilded hawk
#

Is it possible to have an Events.EverySecond ?

#

If yes, did anyone implement it?

#

Cause I'm making a mod that lowes/increases the endurance, like a passive regen/passive debuff

#

And using Events.OnPlayerUpdate is making my brain go insane

hidden compass
gilded hawk
hidden compass
gilded hawk
#

Good idea, I'll try

willow estuary
nimble spoke
#

I know there is an EveryTenMinutes but I think we have seconds too

gilded hawk
#

Dosent seem like tbh

hidden compass
gilded hawk
#

Also, how can I fully hotreload my mod?

#

Cause atm my just turning it off and then on from the mods menu

gilded hawk
#

Can someone also explain me wtf is this error? i'm so confused

function: onPlayerUpdate -- file: BipolarTrait.lua line # 84

LOG  : General     , 1645219309272> __add not defined for operands in onPlayerUpdate
LOG  : General     , 1645219309333> creating new sourcewindow: C:/Users/massi/Zomboid/Workshop/pz-mental-illnesses/Contents/mods/MentaIllnesses/media/lua/client/BipolarTrait.lua
drifting ore
gilded hawk
#

Yeah but I'm not i'm so confused

    local stress = stats:getStress() or 0
    local stressChange = isInDepression and 0.001 or -0.002
    stats:setStress(stress + stressChange);
chrome egret
#

If it even returns, it would probably be boolean?

#

hard to figure, really

dusky prawn
#

sounds like printing out stressChange and isInDepression might reveal the issue

#

got a question for yall. People say this breaks in MP. am I calling the right event?

require('NPCs/MainCreationMethods');
local function init300PointsTrait()
    TraitFactory.addTrait("300Points", "300 points", -300, "Get 300 points to spend on traits.", false);
        --300Points:addXPBoost(Perks.someperkname, 0)
end

Events.OnGameBoot.Add(init300PointsTrait);
gilded hawk
#

Weird, I always do stuff like that. Anyway is working now idk how tbf

willow estuary
#

Ah, okay, just new to me.

gilded hawk
#

I probably fucked up when I wrote it like this

stats:setStress(stress + isInDepression and 0.001 or -0.002);

And forgot the ()

#

Also where can i find the original PNG for the moodlet of pain? Thinkedit

#

But I cant find the JAR

frank elbow
#

Might be in a .pack file under ProjectZomboid\media\texturepacks ("might" bc I haven't personally extracted the ones containing moodles, if they're there, only UI stuff)

gilded hawk
#

Ah okay I see UI and UI2, how do I open them? 7zip is not opening them

frank elbow
#

There are a few community-made programs to open them, gimme one sec to find the one I've used

gilded hawk
#

Okay thanks

frank elbow
gilded hawk
#

Thanks!

frank elbow
#

No problem

#

You may have better luck in one of the lfg channels

drifting ore
#

oh oops

zealous pebble
#

how does the mod professions framework help you make new professions

nimble spoke
bitter frigate
#

is there any way to force ONLY a starting house to spawn with certain loot in a specific container? eg making a baking tray spawn in the fridge, or a wrench spawn in any bedside table

tulip valve
#

Anyone know how I can add more protection locations for a certain clothing? Like Hands and Neck protection?

I want to add Neck and hand protection on the Spiffo Suit clothing

calm depot
#

just to make sure I'm not a blind prat, there's no method you can call to dynamically set the capacity of a world item, right?

#

I've resorted to hacking the sprite props, but that only gets me up to 100

sharp wind
#

Anyway to have a mixed input for a recipe that's more than one? Like 2xItem1 or 2xItem2 or 2xItem3, analogous to Item1/Item2/Item3 ?

#

Additionally, anyway for result to be anything other than interger?

calm depot
#

(specifically, I want to modify Capacity in ItemContainer.java)

#

@sharp wind if you want to just do "2 of any of the following" then modData["need:x/y/z"] = 2 would work

sharp wind
#

this is in recipes

calm depot
#

yeah, I think you're gonna have to do it in proper lua for that

#

but then, in Lua, you can do anything

sharp wind
#

I suppose so, but then you'd need to know the syntax for what's need doing

#

I've never seen ["need:x/y/x"] used before

calm depot
#

I use exactly that syntax for my metal barrel/drum crafting mod

sharp wind
#

that seems to be something specific to this game?

#

it parses things in the [] ?

calm depot
#

see media/lua/client/ISBlacksmithMenuPatch.lua

#

line 48, I concat a table with / to generate the needed string

#

if I remember correctly, the implementation that parses it is in ISBuildUtil

#

so you could also just roll your own, if the built-in isn't granular enough for you

sharp wind
#

So, it is right, that syntax is something only to this game

calm depot
#

what?

#

it's just regular lua syntax

#

it's setting a string key on a table

#

you can walk the table with pairs

#

table.someValue = 5 is the same as table["someValue"] = 5 - the only thing here is that : and / are not legal characters for using the former notation, so you have to use the latter

sharp wind
#

I'm not talking about that

#

but about the : and /

#

between []

calm depot
#

I don't get what you're saying

sharp wind
#

that table[need:x/y/z] is a proper syntax

#

I've never seen that before

#

Is what I mean

calm depot
#

are you familiar with for k,v in pairs(tbl)

sharp wind
#

yes

calm depot
#

it's not table[need:x/y/z], that would be invalid

#

it's table["need:x/y/z"]

#

as in, it's a string key

#

a lua table can have anything as its key, except nil

sharp wind
#

You wrote that and I thought it was odd

#

as I've never seen such syntax

#

must be a short-hand

calm depot
#

so you've never written say... table[2] - same thing, but an integer key

sharp wind
#

It's the ["need:x/y/z"] that I've not seen before

calm depot
#

it's just an arbitrary string, ISBuildUtil iterates through the table and parses the string

#

to lua, it's just a string

#

there's loads of code in the game where they use tbl["stuff"] notation (even though they could just as well have used tbl.stuff

sharp wind
#

I'm familiar with that

calm depot
#

right, so if you want to get/set a key that contains non-alphanumeric characters, you have to use the square brackets notation

sharp wind
#

I know

calm depot
#

or say, you receive a variable in your function from elsewhere, then you would have to use the square brackets notation

#

not sure what you're confused about then, it's just the syntax of the language

sharp wind
#

Okay, I looked at that line in your code, it's just a string you constructed as the index for the table barrel.modData

calm depot
#

yes, I use table.concat since it's cleaner code - I have a single source of truth for modifying the recipe

#

better than hardcoding it as a static string

sharp wind
#

I thought you were doing a recipe where the input is any of Item1=x/Item2=y/Item3=z , where x,y,z > 1 and need not be the same.

calm depot
#

oh, in your original example you specified x/y/z all == 2

sharp wind
#

meaning that if I have at least some of Item1, Item2, or Item3, at least some of which satisfied x,y,z, then the recipe will craft

calm depot
#

yes, but it doesn't support X or Y or Z where if X then require 2, or if Y then require 3, or if Z then require 4

sharp wind
#

but I see now that the selection mechanism for recipe is not so advanced

#

I'll use OnCreate to write a function to do what's needed for the result then

calm depot
#

if you want something more advanced, adapt buildUtil.consumeMaterial in lua/server/BuildingObjects/ISBuildUtil.lua

sharp wind
#

scaling things down to Item1/Item2/Item3 , where each is at least 1

calm depot
#

doesn't have to be 1

misty ginkgo
#

👍

calm depot
#

it can be any amount, but it will consume that amount from any of X, Y or Z, whichever is available

sharp wind
#

I tried the syntax Item1=2/Item2=2/Item3=2, it was not happy

calm depot
#

yes, that obviously won't work

#

I pointed you at the function that parses the string, it doesn't handle that

#

the correct syntax would be modData["need:Item1/Item2/Item3"] = 2

sharp wind
#

Yes, but would that work in the recipe format ?

calm depot
#

no

#

because this isn't part of the recipe logic

#

the only way you could do it with recipes is split it up into a multistage build, like they do for wooden walls

#

(i.e. wall frame -> wall level 1/2/3)

#

because then you can create multiple paths to stage 1, then stage 2, etc

#

probably won't provide for the best user experience, better to roll the code yourself, but it's doable

sharp wind
#

It's sufficient for now to use recipe format of Item1/Item2/Item3/etc and scale with OnCreate to modify the result

#

I need it anyway since the result is partial unit

#

It doesn't like result that isn't an integer

wet dune
#

weird question, but how would I make zombies always lunging?

#

another question, how would I replace zombie walk animations with my own fbx?

calm depot
#

AFAIK you can't change that without modifying the java code

wet dune
#

damn

#

ok

#

not even replace them?

sharp wind
#

there's a mod that makes them always run at night

#

if I remember right

wet dune
#

I've seen people replace the zombies animations

sharp wind
#

is that what you mean by "lunging"?

wet dune
#

when you move near

sharp wind
#

walk with their arms reaching?

calm depot
#

you can change their walking via IsoZombie.setWalkType from lua

wet dune
#

the animation is called lunge

calm depot
#

I don't know of anything to make them do the lunge anim

#

as for the FBX, you should be able to define your own models data that's named the same as the base game and I believe it'll override it

wet dune
calm depot
#

um, you would need to iterate over the table of IsoZombie instances and call that method

#

but "lunge" isn't a valid walk type

wet dune
#

I can just do plan b

#

which was replace zombie animationsa

#

only issue

calm depot
#

I mentioned it mainly in response to Fatmice mentioning the mod that makes them sprint at night

wet dune
#

I dont know how to retarget animations to another rig, I'll ask in modeling

frank rivet
#

Hey does anyone have any decent experience with lua. I am needing help with something that i am hoping is really simple. I'd appreciate the help 😄

silent bloom
#

I have spent way too long working on this image for my mod and not actually working on the mod itself, but I wanted to share because I think only this channel would understand, haha

calm depot
#

@silent bloom we've all been there, it's called "yak shaving"

hidden compass
#

Please tell me.

Is it possible to place items in specific locations at the start of the game?
For example, can I place a gun on the desk at the police station in Muldraugh?
(Not spawn into a container)

willow estuary
calm depot
#

@hidden compass yes, see media/lua/server/BuildingObjects/ISPlace3DItemCursor.lua