#mod_development

1 messages · Page 301 of 1

sly monolith
#

i'll try that

#

yea still an error

tranquil kindle
#

How did you call this file?

#

.

#

Name i mean*

sly monolith
sly monolith
#

does it matter how it's called? i was using some other mod as a reference and it had it's file called "AuthenticZLite_attachments"

tranquil kindle
#

Can i just... send you the files i have and you try conver them for yourself. I'd like to help further but im quite tired and will be heading to bed soon

sly monolith
#

sure, thanks a lot for your time and input

#

really appreciate it !

vast pier
#
Heavily increased the time it takes to drill out a pipe.
Added recipes to be able to forge a pipe from iron chunks/quarters.```
https://steamcommunity.com/sharedfiles/filedetails/?id=3422050461
tranquil kindle
tranquil kindle
drifting ore
#

I can't even get custom crops to work by copying from another farming mod

#

And all I learn from the console is that these two lines have a problem, but no matter what I try to do to them I get the same errors

#

MapObjects.OnNewWithSprite(farming_vegetableconf.sprite["marijuana"], NewMarijuana, PRIORITY)

MapObjects.OnLoadWithSprite(farming_vegetableconf.sprite["marijuana"], LoadMarijuana, PRIORITY)

#

This is the line being called from my sprites.lua with a placeholder sprite
farming_vegetableconf.sprite["marijuana"] = { "vegetation_farming_trampled_01b_56", }

sly monolith
tranquil kindle
#

It's been some time since i created it. Try various things. Its not really something that alot of modders are actively doing so there is little to no guides i feel that talk exacly about it. Maybe wiki pages that sirdoggyjvla posted can be of help

sly monolith
tranquil kindle
#

something with attachment editor. Make sure you dont have other mods enabled that also have custom attachment points

#

Might be that you will be overriding other mods files instead of yours

sly monolith
#

i disabled all mods for testing this

#

i have this same thing done for my mod that adds some holsters and that one works just fine

#

tho this new one is missing those 2 lines, maybe that's why? then again you don't have them either and it works fine for you

#

nope still an error lol 🤦

tranquil kindle
#

I'll check it out tomorrow.

sly monolith
#

i think that attachment editor must be broken xd

#

it does look broken from the way half of the menu isn't even visible

tranquil kindle
#

It is possibility since b42 did change it abit

sly monolith
#

oh well, i'll just rotate it a degree at a time i guess lmao, would have finished that already if i wasn't trying to use that editor probably 😂

sly monolith
lethal dawn
#

is there a way to see the console in the main menu or anything? keep getting like 1-2 on launch or whenever I turn on my mod but I can't figure out why

drifting ore
#

Error Magnifier

lethal dawn
#

ty

distant inlet
#

Is there any way to send keyboard input to the game from lua?

#

I'm trying to cancel the reading action from lua but no luck - so far the only way is keyboard input. I've tried forceCancel, forceComplete, and removing from the queue directly

local character = getPlayer()
local taQueue = ISTimedActionQueue.getTimedActionQueue(character)

if taQueue and taQueue.queue and #taQueue.queue > 0 then
    local currentAction = taQueue.queue[1]
    if currentAction then
        table.remove(taQueue.queue, 1)
        currentAction:forceComplete()
        currentAction:forceCancel()
        print("!Completed: Force stopped action")
    end
end
silent zealot
#

For detecting a keypress, use the OnKeyPressedEvent

#

Here's my change sandbox options script, with key 26 being [


    local key = _keyPressed
    -- print(key)
    if key == 26 then -- If you want to change the key, you can change this number
        -- SandboxOptions.new()
        if ISServerSandboxOptionsUIover.instance then
            ISServerSandboxOptionsUIover.instance:close()
        end
        local ui = ISServerSandboxOptionsUIover:new(150, 150,800, 600)
        ui:initialise()
        ui:addToUIManager()
    end

end

Events.OnKeyPressed.Add(changesandboxoptions)```
#

(code stolen from the change sandbox option mod, with the context menu stuff stripped out)

sharp plinth
distant inlet
silent zealot
#

Oh, the reverse. Obviously in that case:


    desserPyek_ = yek lacol    
    (yek)tnirp --    
    rebmun siht egnahc nac uoy ,yek eht egnahc ot tnaw uoy fI -- neht 62 == yek fi    
        ()wen.snoitpOxobdnaS --        
        neht ecnatsni.revoIUsnoitpOxobdnaSrevreSSI fi        
            ()esolc:ecnatsni.revoIUsnoitpOxobdnaSrevreSSI            
        dne        
        (006 ,008,051 ,051)wen:revoIUsnoitpOxobdnaSrevreSSI = iu lacol        
        ()esilaitini:iu        
        ()reganaMIUoTdda:iu        
    dne    
dne

(snoitpoxobdnasegnahc)ddA.desserPyeKnO.stnevE```
#

I would have throught that the various forceCancel, forceComplete etc would do the job but you've tried those... guess they are more of a "you've been cancelled, so now cleanup"

#

Did you start this mod after beginning to read in a car and getting stuck?

distant inlet
distant inlet
#

just found what works:

local taQueue = ISTimedActionQueue.getTimedActionQueue(character)
    taQueue:clearQueue()
silent zealot
#

So the character cancels everything instead of managing the action directly... makes sense now you've figured it out.

distant inlet
#

yeah - and thanks for the reverse answer it gave me hope ded

silent zealot
#

hahahahhaa

#

I don't always have useful answers, but I always have sarcasm and silly jokes. 🤪

jovial valley
#

can ya'll tell me what file i have to look in to see how to add skills

silent zealot
#

If you don't get answer here there are a few mods that add skills so you can check how they do it.

#

There's a Scavenging skill mod for B42, not sure how many others have made it to B42.

jovial valley
#

i found the Scavenging skill mod but after i subscribed to it it didn't aper in the modding menu

#

and without that i cant see what file its in 😦

honest plover
#

Anyone know if there's a working mod for build 42 that lets you start in Louisville?

silent zealot
#

Did it download files to C:\Games\Steam\steamapps\workshop\content\108600\XXXXXXXXXX (where XXXXXXXX is teh mod id, in the URL on steam)

#

(path will differ if you installed steam somewhere other than c:\games\steam)

silent zealot
#

A warning: Louisville is still laggy if you drive around and most of it hasn't had a big glow-up like Mauldraugh/the new map areas, but the tall skyscrapers are fun to start in.

honest plover
#

Thank you! The tall skyscrapers ae exactly what I want to check out.

tacit pebble
bronze yoke
#

this will break the action, return hook(self) at the end instead

tacit pebble
#

(I haven't tried with TimedAction tho)

bronze yoke
#

this function needs to return true or false depending on whether the action is valid. if you just call hook(self) and don't do anything with the return value, it won't return anything and you break the action

tacit pebble
drifting ore
#

https://pastebin.com/7J4MuBkJ

I added custom farming crops which work fine except the console is throwing 2 errors when I load a world that seem harmless but I can't get them to go away and I don't understand anything in the errors except for the two lines it references

MapObjects.OnNewWithSprite(farming_vegetableconf.sprite["Marijuana"], NewMarijuana, PRIORITY)

MapObjects.OnLoadWithSprite(farming_vegetableconf.sprite["Marijuana"], LoadMarijuana, PRIORITY)
I don't know how they could be incorrect when everything works as intended, except I can't see the seeds icon in the sow menu which I'm pretty certain isn't related

silent zealot
#

What is the full lua file using those calls

drifting ore
silent zealot
#

In particular, are you sure that farming_vegetableconf.sprite["Marijuana" is a string matching the world object name and NewMarijuana is a function?

drifting ore
#

Well...

#

I finally tried to comment the two lines out on a whin and everything still works perfectly

#

So

#

Uh

#

Yeah

silent zealot
#

I'm comapring Marijuana to Broccoli... lets see if anything stands out.

#

They use MapObjects.OnNewWithSprite(farming_vegetableconf.sprite.Broccoli, NewBroccoli, PRIORITY) so slightly different syntax, but if I understand lua tables correctly foo.Broccoli and foo["Broccoli"] will do the same thing. I'm guessing you have another function that puts the values into farming_vegetableconf.sprite ?

drifting ore
#

Yes

#

I don't even understand what these functions do

#

MapObjects.OnNewWithSprite

silent zealot
#

if you do print(farming_vegetableconf.sprite["Marijuana"]) in the lua console what does it show?

#

should say "table"

drifting ore
#

With the two lines commented out or still in?

silent zealot
#

After you load data into farming_vegetableconf.sprite

#

So just run the game and try it after it loads.

#

won't matter if the lines are commented out or not for this test

#

We're just trying to make sure that farming_vegetableconf.sprite["Marijuana"] is a table, not nil or a string or something

drifting ore
#

Yes it does

#

I have it defined in another file

#

farming_vegetableconf.sprite["Marijuana"] = { "vegetation_farming_01b_56", "vegetation_farming_01b_57", "vegetation_farming_01b_58", "vegetation_farming_01b_59", "vegetation_farming_01b_60", "vegetation_farming_01b_61", "vegetation_farming_01b_62", "vegetation_farming_01b_63" }

silent zealot
#

I'm not sure why it hates your version

drifting ore
#

As far as I can tell everything works fine

#

Without those lines

#

Soooo

#

I'm just gonna keep on rolling

silent zealot
#

Makes sure you leave the area and travel a way away and return, and also save/load the game

#

They look to have soemthing to do with making a new plant and loading it again later

#

And try again after a growth stage

drifting ore
#

I even teleported away and reloaded then teleported back

#

Everything is still sound

#

But I checked and even other mods include those commands

silent zealot
#

Blame the war on drugs targetting marijuana

drifting ore
#

Freaking Nixon

native swift
#

can anyone help me find which lua and where it is that determines sounds according to speed with vehicles. im able to get my start vehicle sound to play, but the game doesn;t understand when i am idleing vs driving. so my vehicle just plays engine sound constantly. i tried to go off of a mod i found that had lua written to play idle sound when under 15km per hour and engine sounds after that but when i put it in my mod it didnt work. i want to see how the vanilla game does it

#

all i can find for vanilla vehicles is the scripting where it calls for the engine start and the engine sounds. cant find the idle sound, and cant find the lua or whatever makes the game know the difference between idling and drivingh

#

ive been struggling at this ALL DAY

#

For reference I was using the Sherman tank mod

#

All I wanna figure out is how to make my vehicle play my idle sound when I’m idling 😭

latent fractal
drifting ore
#

There was no issue other than the errors appearing

#

I commented the two lines out that were mentioned in the console and the errors went away and the mod is still fully functional

#

So

latent fractal
drifting ore
#

Vanilla placeholders, I am making custom sprites

latent fractal
drifting ore
#

I didn't know there was vanilla hemp 😂 what is your mod called?

#

I just used the tobacco since I based everything off of that

latent fractal
#

just hemp lol

drifting ore
#

Well shoot

#

That definitely looks better

#

I suck at making art lol

latent fractal
drifting ore
#

Yeah exactly

#

Give them some variety for each strain

#

There is a ton you could do with that

latent fractal
#

yea for real, the OG author was def ambitious of the mod im trying to update. but like guy even had a genetics thing in the works

#

🤯

drifting ore
#

Oh my

#

That's insane

latent fractal
#

have you set up the open seed/put seed away packet recipes already?

drifting ore
#

I don't have it set to pack away, only open, but yes

latent fractal
latent fractal
#

and seed packets have growing seasons attached to them as ya know

umbral raptor
#

what does it mean when a mod keeps failing to update to the workshop?

winter bolt
#

it can happen if the description is too long

umbral raptor
#

aha

#

might be that

umbral raptor
tranquil kindle
#

Thats a thing?!

ancient grail
#

just a heads up if ever thers anyone working on forage related mod, the time action params are different for b42

bright fog
silent zealot
#

There's also a limit on the size of the preview.png image - (bytes, not dimensions). I found that out when GIMP refused to compress my PNGs and they were too big to upload Rimworld mods without using another program to re-save them.

#

But with Zomboid previews being standardized as 256x256 the size limit isn't a major issue!

bright fog
#

In fact you can even have gifs

silent zealot
#

So that's the secret to animated gifs previews

#

I'll have to try that

vague marsh
#

anyone knows where the scripts for advance forge located?

#

oh nvm found it

abstract iron
#

hey is there a mod for buld 42 that is similar to superb npcs? i have been looking and i cant seem to find anything

vast pier
vague marsh
abstract iron
# vague marsh how about the bandits mod?

i have it instald and im making my way threw the week one mod but i would like to recruit and build a party with some npcs. i just came back to the game and superb npcs was a staple mod for me

small topaz
#

Hello! Irrc, there was a way to mod a custom lua event. Does anyone know how exactly this is done or a resource explaining it? What lua code do I need for this? Thanks!

abstract iron
vague marsh
bright fog
#

In B42

abstract iron
#

can i recruit the ai and give them orders?

#

lol no responce oh whell

umbral raptor
#

Thats all they do, if you are talking about bandits

tiny kiln
#

In Bandits non-Day or Week you need friendly ones, hostile ones always hostile

vast pier
#

Why aren't these popups translating?

vast pier
# vast pier Why aren't these popups translating?
    IGUI_Achievement_SockBroke = "First Thread",
    IGUI_Achievement_SockBroke_Description = "Break your first pair of socks.",

    IGUI_Achievement_ShoeBroke = "First Tread",
    IGUI_Achievement_ShoeBroke_Description = "Break your first pair of shoes.",

    IGUI_Achievement_SockBroke_50 = "Fifty Thread",
    IGUI_Achievement_SockBroke_50_Description = "Break your first 50 pairs of socks.",

    IGUI_Achievement_ShoeBroke_50 = "Fifty Tread",
    IGUI_Achievement_ShoeBroke_50_Description = "Break your first 50 pairs of shoes.",

    IGUI_Achievement_SockBroke_100 = "Hundred Thread",
    IGUI_Achievement_SockBroke_100_Description = "Break your first 100 pairs of socks.",

    IGUI_Achievement_ShoeBroke_100 = "Hundred Tread",
    IGUI_Achievement_ShoeBroke_100_Description = "Break your first 100 pairs of shoes.",

    IGUI_Achievement_FootAngel = "Foot Angel",
    IGUI_Achievement_FootAngel_Description = "Reach a less than zero chance of sock damage.",

    IGUI_Achievement_BrokenShoePain = "Sole Splitter",
    IGUI_Achievement_BrokenShoePain_Description = "Suffer pain from stomping in broken shoes.",

    IGUI_Achievement_NoSocksPain = "Blistered",
    IGUI_Achievement_NoSocksPain_Description = "Suffer pain from stomping in shoes without socks.",

    IGUI_Achievement_WetSocks = "Threading Water",
    IGUI_Achievement_WetSocks_Description = "Wear wet socks.",
    
    IGUI_Achievement_WetShoes = "Treading Water",
    IGUI_Achievement_WetShoes_Description = "Wear wet shoes.",

    IGUI_HaloNote_Sock_Break_Notify = "Socks Broke",
    IGUI_HaloNote_Shoe_Break_Notify = "Shoes Broke",
}```
steep glade
#

hi guys! I wanted to start modding PZ but I'm not sure how I could check if my code is correct, is there any extension to show erros or add auto completion? where can I find the classes, methods etc that I can edit/access? other games I modded had extensions that helped with this so I'm feeling a bit lost here 😅

silent zealot
#

If you use getText("IGUI_Achievement_NoSocksPain") it will return the translation, or "IGUI_Achievement_NoSocksPain" if it can't find one.

bright fog
#

Also don't hesitate if you think a few bits are unclear on the wiki, I'm interested in getting some feedback

silent zealot
#

VS Code with the Umbrella plugin is a huge timesaver, especially if you want autocomplete (I feel like I'm fighting it just as often as it helps)

undone elbow
#

The most simple and unoptimized way is:

Events.OnTick.Add(function()
  if (condition_met) then
    trigger_custom_event()
  end
end)
silent zealot
#

They may also be non-event code you can hook into. For example if you wanted to make a character catch fire when they finished reading a book, you could hook into the complete() function of the timeaction for reading.

undone elbow
#

True.

silent zealot
#

...I don't know why that was the first example I thought of.

silent zealot
#

Or whatever the syntax is for addTextWithArrow

#

addTextWithArrow(playerObj, getText("IGUI_Achievement_NoSocksPain", true, ...)

silent zealot
small topaz
vast pier
undone elbow
#

Anyway your custom event should be based on a specific condition. The way depends on that.

undone elbow
silent zealot
small topaz
# silent zealot What's the custom event you want to add? We might be able to give more specific...

My required custom event is quite similar to onClothingUpdated but triggered on slightly different positions in the code (vanilla onClothingUpdated is not usable for me anymore, it was usable in B41 but isn't in B42 anymore). Main problem in my situation is that the event should be triggered by functions in the shared folder while it is required that adding stuff to the event is possible in the client folder.

vast pier
silent zealot
#

...I should finish up my "diassasmble non-wrecked cars mod"

#

It works, just needs translation for context menu text and a few variabels moved to sandbox vars and teh packaging/preview image/etc

silent zealot
#

Or use a bandsaw and do it super quick, but until we can move those things that's not going to see much use

undone elbow
silent zealot
#

The client/shared/server thing is (mostly) like those bins with a hole for recycling and a hole for rubbish and underneath it's all one garbge bag.

#

If you can describe exactly what you want to trigger your code, we can help you find out where to shove it.

undone elbow
#

If onClothingUpdated is not available at "shared" stage, you can add it later at "client" stage.

#

Why not?

small topaz
# undone elbow Are the Lua functions really marked as `client` or `shared`? And what's "adding ...

"add stuff to event" = Events.OnClothingUpdated.Add(myfunction) (i.e. adding a function to the event)

For the client/shared issue: In theory, I simply could put all my modded code to the client folder and then solve the issue without events. Problem is that the relevant code which should trigger the event are TimedActions and in B42, most TimedActions are now in shared. So, when I simply put them client, I am afraid that this could later mess-up things when multiplayer is added to B42...

Btw, onClothingUpdate can be triggered in shared code (that is also done in the vanilla code), so that is not the problem. Problem is that B42 changed the structure of some of the code which results in the situation that onClothingUpdated is now triggered too early for my mod. See my previous message for a more detailed description: #mod_development message

silent zealot
#

client and shared are just for your organization of code files.

undone elbow
#

You can keep you code in shared.

#

Firing an event early shouldn't cause errors, right?

silent zealot
dry coral
#

Is it possible to add an item that will have the same ItemID as another item? I'm trying to make a mod that adds "Bone Nails" but implementing them in recipes seems impossible since there isn't a "Nails" tag or something of the sort. All vanilla recipes just use "Base.Nails", which is the vanilla nails. Is there a way to work around this? Do I simply make my mod a recipe that creates regular nails instead even if its a little unimmersive?

silent zealot
#

I say "postfix patch" but that's not really the proper term... basic idea is you replace complete() with your own function that calls complete(), then runs whatever adiditonal code you want before returning whatever the original function returned.

undone elbow
dry coral
silent zealot
small topaz
dry coral
undone elbow
small topaz
#

but anyway, if Zomboid's lua does not provide predefined commands to define custom events, I'll pbbly just keep all my code in client and solve the problem that way

dry coral
# silent zealot You could add Tag:nails to to Base.Nails and then programatically edit every rec...

Another solution I thought of but I'm unsure if possible is through code. I'd first need to figure out if what I want to do is possible, but essentially it'd just look for that particular "Carve Bone nails" recipe, which by itself just gives regular nails. The script would change the icon and name of the recipe's outputs. I think having it renamed might be possible but I'm unsure on the icon feature

#

Essentially the recipe gives you regular nails but it changes their name and icons of it's outputs, but again I've no idea if this is even possible

silent zealot
#

It is possible to have cosmetic variations of an item, but I don't know if having a variation means Base.Nail ails will pick one at random every time one is created.

dry coral
#

I guess I have to test it. Do you know how cosmetic variants of items are made? Or at least any mod that does so, that way I can take a look at it

#

Albeit I think vanilla already does this with certain hammers

undone elbow
#

Here, I’m using Events as a global variable. It can be any global variable used to connect the client and the shared state.

drifting ore
#

I got farming workingggg

#

I just had to stop being an idiot

#

It's simple really

umbral raptor
#

🪖 Are you interested in becoming a contributor to the Support Corps mod? Now you can. I am looking to form a small modding team that would allow the mod to grow much larger than it can if I did it alone.

I can teach you basic Zomboid modding for scratch, but if you have experience with modding or LUA then you are surely welcome!

If you can work or edit 3D models or do graphics then you are also welcome.

If you are interested then please message me privately to get started!

frank elbow
#

"Lua" (pronounced LOO-ah) means "Moon" in Portuguese [...] "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people.

https://www.lua.org/about.html

#

I don't typically care for prescriptivism but it feels warranted whenever I read “LUA”

bronze yoke
#

why's it so common anyway? nobody says JAVA

frank elbow
#

I'd guess it's because it's three letters & people are used to 3/4 letter acronyms, but that's a shot in the dark

outer crypt
#

is there a way to adjust the sound level and still call is in a square? Currently using this method: square:playSound("LightSwitch")

bright fog
#

@true plinth

#

Some vanilla files not getting picked up

true plinth
#

Yes, the first line must start with module…

bright fog
#

yup

bright fog
silent sky
#

anyone know how i could go about making my cybertruck in game be battery charged

crude sage
#

Does anyone know a mod to remove this trash (without sledgehammer) please?
Alternatively, does anyone cna point out a good mod to start with, to make a new one that will do this?

With B42 ideally, I would add a context menu entry to pick a plank or unusable wood here.

main pasture
sly gazelle
#

decided to port ExtraEletricalTraits myself

#

this is the .lua it provides

#
require('NPCs/MainCreationMethods');
local function initExtraElectricalTrait()    
    local geek = TraitFactory.addTrait("Geek", getText("UI_trait_geek"), 4, getText("UI_trait_geekdesc"), false, false);
        geek:addXPBoost(Perks.Electricity, 1)
    local tinkerer = TraitFactory.addTrait("Tinkerer", getText("UI_trait_tinkerer"), 6, getText("UI_trait_tinkererdesc"), false, false);
        tinkerer:addXPBoost(Perks.Electricity, 2)

end

Events.OnGameBoot.Add(initExtraElectricalTrait);
#

what changed from B41 to B42?

distant inlet
#

OnPlayerUpdate seems like an expensive operation to add a listener to. I'd like to maybe check it every nth time unit, but I want to make sure I use an efficient time obj. Any ideas on efficient time objects? I'm thinking @LuaMethod(name = "getTimeInMillis", global = true) public static long getTimeInMillis() { return System.currentTimeMillis(); }
for its native call efficiency but unsure about the lua-java conversion efficiency

frank elbow
#

Methods like the one you mentioned can help with the timing; they will be an additional Java call, but if it's happening infrequently that's not all that bad

silent zealot
#

That way it's just an integer comparison & integer math when your function code is not used.

#

No system calls needed.

distant inlet
#

yeah that's what I started doing but was feeling too lazy when I asked the question to think through some other stuff I'd have to consider with the approach

silent zealot
#

There is an event that fires minute of game time. Depending on what you need to do, sometimes that is often enough.

#

EveryOneMinute

silent zealot
#

Why does changing BloodLocation cause such dramatic problems? The first two of these work fine. The third throws java errors, strips everyone naked, deletes all underpants in the world and causes spawning a new pair of underpants to throw a lua exception when it checks to see if your underpants are actually an animal corpse.

winter bolt
silent zealot
#

true, but it works with the comma.

winter bolt
#

i mean it sounds like its causing errors lol

silent zealot
#

I've had similar issues replacing the whole item and adding BloodLocation, though I've not tried that today.

silent zealot
winter bolt
#

ive not had any issues changing bloodlocations on my modded items so idk

silent zealot
#

...apparently some things work when you leave the comma in, and BloodLocation is not one of them .

#

Thanks

#

And I will once again 1) complain about the parser being unable to handle any deviation from what it expects gracefully and 2) remember Rimworld's XML system fondly. 😂

#

Still can't rip them up via the "rip clothing" recipe but I guess I can sew leather strips into them now so that's something.

#

I wouldn't be shocked if the recipe parser makes a list of everything with a certain tag on load and refuses to re-check on the asumption item tags never change.

bronze yoke
#

it does

hidden compass
#

Is there any way to get the actual items (outputs) generated by the recipe execution from any client side script other than OnCreate?
I can do this by monitoring my inventory and TimedAction for item increases/decreases, but I am looking for a smarter way to do this.

silent zealot
#

What is your goal? You can probably do it by hooking into the timeadaction:complete() function, but that feels like it will be a lot more cumbersome than OnCreate.

hidden compass
#

I want to get the opened cans, after performing the action (recipe) of opening the cans.

silent zealot
#

ISCraftAction:complete() is where the outputs get added to your inventory (or the floor)

#

Replace that with a custom version that does a "<if item == OpenCan then do stuff>" in the loop through list, right after local item = list:get(i);

#

I can't see a good way to do it via prefix or postfix patch, but that may be possible deeper in, in RecipeManager.PerformMakeItem

hidden compass
#

Thanks to your help, I have gotten the answer!

P4PickingMeister.Actions_addOrDropItem = Actions.addOrDropItem
function Actions.addOrDropItem(character, item)
    P4PickingMeister.Actions_addOrDropItem(character, item)
    print("Result is " .. item:getType())
end
silent zealot
#

Much better place for the coe than my suggestion too.

#

And obvious now someone else has said it. 😆

granite ginkgo
#

Aight, new issue, can't seem to enter any of the seats now, the bar loads for 1 second and dissapears, i also need to open the door manually, the seats and areas seem right, did anyting regadring changed in B42???

rapid flume
#

Hey modders funkers spiffo
Could I seperate my Tiles (.pack and .tiles) and make it standalone, then use it for my mods with a require so that I can add tiles in the future and use it for several diffrent mods, so that players/admins can choose to use either mods independently, just with the same tile/pack requirement.

My mod contains traps with fire, and my tileset is on 2 rows. I plan to make another trap mod without or with minimum fire. And also add more tiles to the tileset to use something else.

The Idea is to not create more tileset since the unique ID is limited. and for optimization.

Would updating the tiles mod affect saves / servers or such ?

Also: noticing thump sound is generic, even when it's metal generic. is there a way to set the sound or the type of the item/tile so that the sounds adjust to it. (has Metal or such?)

severe maple
#

Question for mod im making: I want to make the premiumtech generator (Generator_Yellow) never lose durability. Setting ConditionLowerChanceOneIn to 0 does nothing, and I could always just turn ConditionLowerChanceOneIn up to 99999 or something, but I would prefer if there's a way to actually make it unable to ever lose durability instead. Does anyone know the best way to do that?

vast pier
#

or just try removing that param entirely

granite ginkgo
silent zealot
#

Aren't there normally little icons indicating the door entry/exit positions on that diagram?

#

If something went wrong maybe the game doesn't know where the player needs to stand to use a door.

#

Those little blue door icons. (ignore that the P19 Oshkosh has weird seating, that's the first image I found)

granite ginkgo
mellow frigate
# silent zealot Those little blue door icons. (ignore that the P19 Oshkosh has weird seating, th...

position inside is the square, position outside is the door.```
passenger FrontLeft
{
door = DoorFrontLeft,
door2 = DoorFrontRight,
area = SeatFrontLeft,
showPassenger = true,
hasRoof = false,

        position inside
        {
            offset = 0.0000 0.8750 -0.3375,
            rotate = 0.0000 0.0000 0.0000,
        }

        position outside
        {
            offset = 0.3375 -0.0250 -0.3375,
            rotate = 0.0000 0.0000 0.0000,
            area = SeatFrontLeft,
        }

        switchSeat FrontRight
        {
            sound =,
        }
    }
silent zealot
#

And that's seperate to the area that draws the green rectangle for the doors?

#

Since that doesn't look like enough numbers for a rectangle.

icy night
#

Anyone know why developers used GUID for their VHS scripts? Why not have the scripts all on one file instead of them making another translation file

silent zealot
#

Because the dev who coded it liked that method and ten years later it's not a priority to change.

tacit pebble
#

Is anyone friendly with context menu?
When I right-clicked item, print(item) or RNGBackpack.doRandom(item) fires immediately even i don't click actual option yet.

Here is my code for context menu

function RNGBackpack.DebugOption(playerNum, context, items)
    if not isDebugEnabled() and not SandboxVars.RandomBackpackCap.DebugEnabled then
        Events.OnFillInventoryObjectContextMenu.Remove(RNGBackpack.DebugOption)
        return
    end
    --  if #items > 1 then return end
    local item = items[1]
    if type(item) == "table" then
        item = items[1].items[1]
    end
    local isValidItem = item:getCategory() == "Container" or item:getCategory() == "Backpack"
    if isValidItem then
        --local debugOption = context:addOption(getText("Randomize Backpack Capacity (From RNG Backpack Mod)"), item, RNGBackpack.doRandom(item));
        local debugOption = context:addOption(getText("Randomize Backpack Capacity (From RNG Backpack Mod)"), item, print(item));
        -- This part is the problem. 3rd arg fires when I opened context menu. when i don't click option yet. ######
    end
end

Events.OnFillInventoryObjectContextMenu.Add(RNGBackpack.DebugOption)
#

but when I copied and pasted ISInventoryPaneContextMenu.AutoDrinkOn to 3rd arg,
then AutoDrink was only enabled when I clicked my option.
I don't know what is the different.

#

fck me lol sigh

vast pier
wise zinc
#

Hey, so, I'm starting to make some form of mod, and I have a question.

I'm thinking of making a very basic project for my first time.

#

I'd like to basically do 2 items :

  • import the b42 stag skulls into B41, and allow them to be used as headgear (basic bitch, I know)

Is that something that's possible ?

Second thing is much more simple (I think?)

  • Reskin a crowbar into an antler
vast pier
wise zinc
#

Couldn't I rip the b42 model for the skull ?

#

(I have NO coding experience)

vast pier
#

yeah but you would need to weigh it to the player's head, wouldn't be that hard

#

I don't know much about making clothes in zomboid, but I think a helmet specifically would be easy since there's only 1 or 2 animation bones that need to be considered

#

weighing a model to animation bones is just how you tell the game
"this part of the model moves with this part of the animation"

wise zinc
#

Got it

sly monolith
#

you can just transfer weights from the body in blender so you don't have to do anything yourself

wise zinc
#

Oh god blender again-

sly monolith
#

it's really simple once you figure it out, just import player model, import the skull, position it where you want, select body then skull, ctrl+p to parent it, then select body then skull, enter weight painting mode, select weights, transfer weights, set to nearest face interpolated and source layers by name and that's it

#

i learned that in some youtube video

vague marsh
#

I added a SkillRequired Woodwork to craft the handle, but why isnt it showing that it's required in the crafting menu?

craftRecipe Make Katana Handle
    {
        time = 500,
        category = Survivalist,
          SkillRequired = WoodWork:5,
    xpAward = Woodwork:10,
    timedAction = Making,
        Tags = InHandCraft;CanBeDoneFromFloor,
        inputs
        {
            item 1 [Base.Plank],
            item 1 [Base.Saw] mode:keep,
            item 2 [Base.LeatherStrips],
            item 1 [Base.Woodglue],
            item 1 [Base.Twine],
            item 1 tags[CarpentryChisel] mode:keep flags[MayDegradeLight;IsNotDull;Prop1],
        }
        outputs
        {
            item 1 Base.Katana_Handle,
        }
    }
#

oh wait, i think it needs carpentry tag

#

its not...

#

sample vanilla recipe

granite ginkgo
#

Bruh, the vehicle editor dosen't open, im literally breaking the game

vague marsh
#

oh wait, bruh the W is capital🤦‍♂️

vast pier
granite ginkgo
#

Does this look good? regarding the seats issue : passenger FrontLeft
{
showPassenger = true,
hasRoof = true,

        position inside
        {
            offset = 0.1755 0.0532 0.0000,
            rotate = 0.0000 0.0000 0.0000,
        }

        position outside
        {
            offset = 0.5479 -0.1596 0.4787,
            rotate = 0.0000 0.0000 0.0000,
            area = SeatFrontLeft,
        }
    }
granite ginkgo
dusty flint
#

Does anyone know whats wrong with my recipe file? Whenever i try loading it, it either doesnt load or straight up craashes the game.

module Base
{
craftRecipe MakeHardtack
{
timedAction = Making,
Time = 150.0,
Tags = AnySurfaceCraft;Cooking,
category = Cooking,
xpAward = Cooking:10,
inputs
{
item 1 tags[RollingPin] mode:keep flags[MayDegradeLight],
item 1 tags[Fork;MixingUtensil;Spoon] mode:keep flags[MayDegradeLight],
item 1 [Base.Bowl] mode:keep,,
item 1 [Base.Salt],
item 1 tags[Flour],
-fluid 0.5 [Water],
}

    outputs
    {
        item 1 Base.AVIHardtack,
    }



}

}

vague marsh
dusty flint
#

God damn it
I’ll try, thank you!

vocal vector
#

can anyone help me figure out what is wrong with the code here?

local function OnZombieDead(zombie)

    if zombie:isReanimatedPlayer() or not zombie:getVariableBoolean("Bandit") then return end
    
    local inv = zombie:getInventory()
    local invItems = zombie:getInventory():getItems()
    local specificWeapon1 = nil

    for i = 0, invItems:size() - 1 do
        local item = invItems:get(i)

    
        if item and item:getCategory() == "Weapon" then
            local gun = item:getFullType()
            if not specificWeapon1 then
                specificWeapon1 = gun
                print ("weapon1 ".. specificWeapon1)
            elseif specificWeapon1 then
                if gun == specificWeapon1 then
                    print ("weapon1 remove ".. specificWeapon1)
                    inv:Remove(item)
                    specificWeapon1 = nil
                end
            end
        end

    end
end

Events.OnZombieDead.Add(OnZombieDead)

it's supposed to locate duplicate weapons on the dead body and remove them, and it seems to work, but i get this error too:

[08-02-25 19:06:30.600] ERROR: General f:313, t:1739041590600> ExceptionLogger.logException> Exception thrown
java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor62.invoke(null:-1).

and i don't get any prints

vast pier
#

Is there a way to identify if a zombie is a sprinter or not?

#

In lua specifically

#

the entire mod is just this code

#

I figure if there's a way to identify if IsoZombie is a sprinter, then I could just put that into the if statements and call it a day

vague marsh
tacit pebble
#

seems are some functions related speed or sprinting but not gonna say anything about those because I've never tried.

however, this is a simple idea when pretend there's no function to check sprinters, you can pick by voice type? sprinter has different voice effect vs normal zombies.

proud moss
#

I am now working at one mod, but I don’t know the name of desktop computer in the game, so in code I just write “Desktop Computer” is it correct?

tacit pebble
umbral raptor
#

does anyone know why my models won't work? I keep getting this error
WARN : General f:541, t:1739045742159> MeshAssetManager.loadCallback > Failed to load asset: AssetPath{ "WorldItems/Food/GlassJug_Ground" }

#

i tried putting it into worlditems but it doesn't work either

bright fog
#

Wdym "blank" mod ?

sour island
sour island
#

No, and they probably shouldn't to be honest - as it led to alot of people, again, accidentally uploading it lol.

#

Anything with a mod id of 'mod template'

jaunty marten
vocal vector
#

i did some more testing of my code:

local function OnZombieDead(zombie)

    if zombie:isReanimatedPlayer() or not zombie:getVariableBoolean("Bandit") then return end
    
    local inv = zombie:getInventory()
    local invItems = inv:getItems()
    local specificWeapon1 = nil

    for i = 0, invItems:size() - 1 do
        local item = invItems:get(i)
    print ("!")

        if item and item:getCategory() == "Weapon" then
            local gun = item:getFullType()
            if not specificWeapon1 then
                specificWeapon1 = gun
                print ("weapon1 ".. specificWeapon1)
            elseif specificWeapon1 then
                if gun == specificWeapon1 then
                    print ("weapon1 remove ".. specificWeapon1)
                    inv:Remove(item)
                    specificWeapon1 = nil
                end    
            end
        end

    end
end

now i get the !, weapon1, and weapon1 remove prints, then an error:

function: OnZombieDead -- file: BanditAddOptions.lua line # 138 | MOD: Bandits Extra Options.
[08-02-25 21:27:26.172] ERROR: General f:444, t:1739050046172> ExceptionLogger.logException> Exception thrown
java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor62.invoke(null:-1).

#

something in the inventory is reacting badly to the elseif clause, if i comment the elseif clause out theres no problem

bright fog
silent zealot
umbral raptor
#

is there any software yet that makes B42 tiles?

#

i want to add tents/sleeping bags, but TileZed still doesn't have that.

silent zealot
#

Your for loop will go off the end of the inventory, because there are fewer items now so get(i) will not be happy at the end.

fathom dust
#

Anyone know offhand what a "unit of fluid" is? Is it 1 mL?

silent zealot
#

I think normally one litre

#

But if you told me it's a litre in some functions and a mL in others and a flOz in this one place i'd believe you.

vocal vector
#

that's probably it, thank you!

ebon dagger
#

Is there any write up anywhere that details the properties on weapons?

I made a spreadsheet of all of the vanilla weapons and I found some oddities, and was looking to find out what some of the properties actually do. For example:

AimingMod = 2,

Aiming mod only exists on shotguns, but NOT on the Sawed off JS-2000. Which is a weird outlier.

and

ToHitModifier = 1.5,

is on all weapons other than shotguns, EXCEPT the Sawed off JS-2000 which has it at 2.5.

silent zealot
#

I wonder if "aimingmod 2" is what makes shotguns completely incisor of shooting crawlers

#

Meanwhile I can aim my rifle at a zombie's head and it will hit a chicken on the ground then bounce up to hit the zombie.

#

Right now I don't think anyone understands the goal of the new aiming system, and that includes the devs. 😦

#

I'll have a look at decompiled java later because I'm curious about AimingMod now

ebon dagger
#

I'm thinking I'm probably going to share the spreadsheet too when I get it finished, because its nice to be able to see all the stats at once.

silent zealot
#

I like it a lot, it just feels like they are doing things at random

#

Like making toHit instead do random damage

#

And suddenly bullets are doing much less damage when you shoot a zombie

#

Instead of rewarding the player for the skill to make a headshot, it decides to make the shot hit a limb instead. No fun.

vocal vector
#

to make my loop happy, do i have to mark the things i want to remove and then remove them afterwards?

silent zealot
#

Yes, make an empty list before the loop and put things in it

#

Then go through the list and remove those after

vocal vector
#

it works, i think

vocal vector
silent zealot
#

If you install starlit library it has some magic that lets you access the fields in java classes, so once you have the zombie object zombieObj.speedtype == 1 will work. I think.

summer wren
#

Just wondering if there is a way to make it so a fluid container can only accept one type of fluid .. like water?

silent zealot
#

So 1) I'm wrong, which is very possible 2) it's dead legacy code or 3) it is supposed to be part of the new aiming system but it not yet implemented.

bright fog
#

In the modding Discord, so I think he should figure it out ;)

#

Also speedType is exposed

#

That's not the problem

#

Starlit doesn't expose new stuff

#

It just makes it way easier to access than the normal way

silent zealot
#

Well at least I told him teh same thing and not a different answer.

bright fog
#

Yea

silent zealot
#

What is the normal way for accessing the public java fields?

bright fog
#

I don't know the method perfectly, but something with iterating through all the fields and finding the right one or some shit like that I believe, I'm not too sure

#

What I know is that it requires quite a few lines

silent zealot
#

Reflection?

#

Or something similar at least

#

provided by the Java <-> Lua interface.

bright fog
#

I'm not knowledgable enough on the subject

#

I wanted to explain the process in the wiki but didn't go deep enough in it

silent zealot
#

Fair, it's a pretty niche thing

bright fog
#

Yea

silent zealot
#

AFAIK (From C#) only modders really care about reflection because developers would just make a public interface to get to things easily and properly, but modders show up wanting to do stuff to bits of code they aren't supposed to access. So documentation is a mix of "this exact syntax works for me, don't ask what to do if it doesn't" forum posts and "here's a highly technical discussion on the internal workings of code" forum posts.

bright fog
#

The method used to access fields is provided by PZ I believe

faint steeple
#

If I update a mod to be B42 compatable, would it still be compatable with B41?

bronze yoke
#

yes

faint steeple
#

W, and reading the thread in pinned messages, do I NEED to use the common folder at all? or could i just keep it empty

bronze yoke
#

you don't have to, but it must exist

bright fog
#

Yea

#

Your mod is not detected if you don't have it

faint steeple
#

okay W again, thank you 😄

vast pier
faint steeple
#

yee, now i just need to update other stuff since now it crashes when i interact with it 😭

sturdy rune
vast pier
sturdy rune
#

awesomee ill be waiting to download it

sturdy rune
#

🙂

#

btw can anyone point me to some cool modding tutorials? ive found a couple of basic ones but i find it really hard to find the specific things i want to make, ive been downloading other mods and checking their scripts to get things done that way but i feel im not really learning, just guessing and copying. also tried asking chatgpt for help but it sucks, if anyone has any tips to make gpt work or any other ai that could help me i would really appreciate it!

bright fog
#

Wiki is getting updated with better information on how to do stuff

sturdy rune
#

thank you!

vast pier
# sturdy rune awesomee ill be waiting to download it

https://steamcommunity.com/sharedfiles/filedetails/?id=3423871533

Edits the mod "Stay Away From The Windows" by k and Clem
https://steamcommunity.com/sharedfiles/filedetails/?id=2922443751
Uses Starlit library to make it so the code only activates on sprinter zombies.
That's it, that's all it does. It adds a single "if" statement to the original code.

Enjoy your sprinter terror, and significantly less shattered windows.

Pairs nicely with Vaulting Zombies by Ham
https://steamcommunity.com/sharedfiles/filedetails/?id=2872586942
opaque moth
#

im new to modding making my first map but when i go and try to test it i cant spawn or atleast i cant select the location? i did the "write spawn points..." in WorldEd and was following dirkie dirks tutorial (part 4) fine up until now i just cant spawn ;-; any ideas on where to begin on fixing this?

silent zealot
#

I wouldn't trust ChatGPT, or at best consider it to be as reliable as a random guy on the internet who might be pretending to know lua and also didn't check his post for sytax errors.

vast pier
#

I've seen some people in here complain that their ChatGPT lua scripts to not be working and then get upset when we explain it's because it's ChatGPT not knowing what it's doing.
Please don't use Ai to write code.
It can't actually think, it just follows patterns.

#

Those youtube videos where people use Ai to write code gloss over all the fixing to the code they have to do

silent zealot
vast pier
silent zealot
#

I use 2% sprinters.

vast pier
#

Well then they're gonna jump through your windows. (you should use vaulting zombies to make the sprinters actually jump through)

undone elbow
silent zealot
#

I added a comment to Vaulting Zombies lettingthem know about the sprinters-only code, since from the comments the author was trying to figure out how to do that.

vast pier
#

Now it does all that but first it goes
"Is this zombie speedType 1?(Sprinter) No? Ok nvm"

silent zealot
#

I figured it would be that simple, any code that works on a single IsoZombie at a time should be easy to add the "is this a sprinter?" conditional.

vast pier
#

I did minimal testing and it seems to work on B41 and B42 so this is technically my first build 41 mod lmao

#

My first build 41 mod and it's just adding an if statement to someone else's code facepalmsigh

#

To be fair though, trench foot would probably work on B41 I just haven't tested it at all so I haven't back ported it

shadow pumice
#

My Map isn't showing up when I boot up the game and look for it, I've checked and double checked the Mods.info file, as well as the ones inside of the Media folders, anything I could be missing that I could try?

#

There is also a slight possibility that I could be a lil special

shadow pumice
#

no

vast pier
#

build 41 or build 42?

shadow pumice
#

B41

vast pier
#

where do you have the mod folder?

shadow pumice
#

In Project Zomboid Mods

vast pier
#

that's the problem then, you need it to go in
C:\Users\User\Zomboid\Workshop\ModParentFolder\Contents\mods\ModName

shadow pumice
#

Modparentfolder is so suppsed to be the main file like Mod template folder?

vast pier
#

Yeah can be named anything

shadow pumice
#

ight

vast pier
shadow pumice
#

if it's in the mod folder would it mess with it?

vast pier
#

don't worry about the workshop.txt that's auto generated when uploading

shadow pumice
#

in main mod template?

vast pier
#

I don't think it'll load the mod in the mods folder so no

#

oh you could put it in the mod template's mod folder yeah.
Would be better to make your own though so you don't accidentally upload the mod template itself

shadow pumice
#

I alr have

vast pier
#

Happens a lot lol

shadow pumice
#

I didn't put into the mods template I meant like the workshop.txt, do I need to personally add it to the folder?

#

Still isn't showing up

vast pier
#

can you show where you put the mod

shadow pumice
vast pier
#

Windows Key + Shift + S will let you select only part of your screen for a screenshot if you don't wanna show everything

shadow pumice
#

TheCabin is the mod

bronze yoke
shadow pumice
#

yup

drifting ore
#

Main Mod Folder\Contents\mods\mod folders

outer crypt
#

question: after using setPerkLevelDebug() is there a way to correct the xp in the perk so it's no longer negative for the level?

vast pier
# shadow pumice yeah

Well first off, I said Zomboid not ProjectZomboid.
I also said it needs to go Workshop\Parent\Contents\mods\ModName

shadow pumice
#

Should there not be a media file in the contents folder?

drifting ore
#

No

vast pier
#

You did Workshop\Modname

shadow pumice
#

ooh

#

should I put it into the zomboid folder?

#

wait

vast pier
#

ProjectZomboid folder looks like this

shadow pumice
#

yeah...

bronze yoke
vast pier
#

Zomboid folder looks like this

shadow pumice
#

huh

#

where is that

outer crypt
shadow pumice
#

oh

#

notice how I said I maybe a lil special

vast pier
#

All good man

#

Albion was tryna explain to me how to use starlit library to do something and I kept asking questions and not understanding so I gave up on asking and just started messing with stuff 😅

shadow pumice
#

...

#

found it

vast pier
#

I felt so bad for asking lol

bronze yoke
#

you don't have to feel bad for asking - i definitely could've given a better explanation than essentially 'just do it' but i was busy at the time

shadow pumice
#

So the file thing should look like something like this?\

vast pier
#

Your instance would be like
Zomboid\Workshop\TheCabin\Contents\mods\TheCabin

shadow pumice
#

ok

#

so no map or media folder

vast pier
#

The mod itself goes into the mods folder

shadow pumice
#

OOOOOOOH

vast pier
#

whatever your mod contains goes into that

vast pier
shadow pumice
#

so this

vast pier
shadow pumice
#

ight imma test

vast pier
#

Your mod is for build 41 so it wouldn't look like this

shadow pumice
#

um

vast pier
#

Name of the parent folder doesn't matter, this instance I didn't even bother renaming it

shadow pumice
#

it ain't showing up still

#

it's a map to if that changes anything

vast pier
#

Ignore the "42" and "common" folder
This should be the inside of your mod

#

Can you show the inside of TheCabin ?

shadow pumice
#

yeah 1 sec im making the folders real quick

#

This so far

#

How big does the icon png need to be?

vast pier
#

we can worry about that later, the mod will load without it

shadow pumice
#

ight

vast pier
shadow pumice
vast pier
#

see if the mod shows up now (restart the game or reload lua)

shadow pumice
#

1 sec

#

Nope

#

still aint there

vast pier
#

idk if capitalization is important, but it's worth a shot

shadow pumice
#

k

#

still not there

#

idk what im doing wrong

vast pier
#

can you put the mod into a .zip or .rar file and send it here so I can look at it?

shadow pumice
#

hol on i think I found the issue

vast pier
#

oh?

shadow pumice
#

nothin

#

lmk if you've got anythin

vast pier
#

I see the problem lol

shadow pumice
#

is it bc there are 2 object folders?

vast pier
#

You have the mod.info and preview.png the parent folder instead of modName

shadow pumice
#

oh

vast pier
#

And your map data is kinda naked

shadow pumice
#

like there is nothing in it?

#

So these go into

shadow pumice
vast pier
#

one sec

shadow pumice
#

ight

drifting ore
#

Your Zomboid workshop folder has a "ModTemplate" folder that is an example of a map mod btw

vast pier
shadow pumice
#

huh

#

how

vast pier
shadow pumice
#

oh

vast pier
shadow pumice
#

are they map data files?

vast pier
#

I have no idea, they're your files 😭

shadow pumice
#

fair

#

ngl I kinda just copied a tutorial by
Daddy Dirkie dirk

vast pier
#

You would need to ask someone who knows how to make maps, I just know how to make your mod show up

shadow pumice
#

ok

#

still thanks

vast pier
#

no problem 👍

shadow pumice
#

I'm still not seeing anything...

#

what the fuck

#

wait

vast pier
#

I mean if you opened the zip I sent and dragged the folder into Workshop to replace the one you have there, it should work fine

#

well at least show up

shadow pumice
#

got it to show up

#

I needed to re downaload it

#

Well shit

#

this happened when I tried to spawn in

#

anyone here a map maker or smthn like that who cna help out?

vast pier
# vast pier

just as a test, chuck everything from this folder into media\maps\TheCabinMap

shadow pumice
#

The console says that it didn't load bc it failed to find any .lotheader files

vast pier
#

well it's a good thing I see 0_0.lotheader in the files I said to move xd

shadow pumice
#

true

shadow pumice
#

I can play it now!

#

ty for your help!

vast pier
#

nice

#

I'm also from minnesota, haven't lived there since about 10 years ago now tho

shadow pumice
#

oh thats neat

#

how'd you like it?

vast pier
#

Well it was my childhood lmao, I'm only 21. Turning 22 this month

#

@round thorn Hey I was wondering what you thought about the update from the other day to Salty Smithing - Forging Iron
Any thoughts?
Suggestions for recipes or functions that could be added to the mod?

crude forum
#

Where do local mods go, and is it different in B42? It's been awhile since I did anything, I just made a retexture and want to test it

drifting ore
plush wraith
#

I'm getting the "Your mod is missing a mod.info file" error, I can't seem to figure out what im missing here when trying to upload through PZ to the workshop. I've referenced the wiki and ETW's github but it looks like everything is there? 😩

plush wraith
#

Same issue without the / tried having both of them the same too

winter bolt
#

maybe try without versionMin?

#

im not sure but i feel like i've seen someone mention that versionMin breaks something in b42?

vast pier
#

why does your build 42 mod have the id as /TrueSmoking

#

instead of TrueSmoking

plush wraith
#

Saw someone say to try that but i've tried it without as well

vast pier
#

the \ is used for dependencies & incompatibilities because it's telling the game to check a folder deeper I'm pretty sure

#

I don't think you want that in your id

plush wraith
#

Stripped out minVersion, no \ in id, still throws missing mod.info its so weird

#

Has to be something dumb

winter bolt
#

oh wait

#

it must be the vscode folder

#

its probably checking the vscode folder inside mods and seeing it has no mod.info

plush wraith
#

LOL

#

Big TY

winter bolt
#

if you set your project folder in vscode to the main workshop folder for the mod it works fine

plush wraith
#

Will do, I think thats how I had it setup last time

bronze yoke
vast pier
#

Does anyone have any idea why adding ExtraDamage = ##,
to the SENSOR version of bombs causes a crash to title screen?

#

It does not happen with time bombs, or impact bombs

#

just the sensor bombs

#

This shit has me tweaking hard because I'm trying to add damage to pipe bombs while removing the fire from them

#

Even the remote controlled version doesn't crash

#

it's JUST the sensor version

#

I don't understand why

summer wren
plush wraith
granite ginkgo
#

Alright, tested my vehicle back in B41, the seats work great, I have no idea what causes issues in B42, I'm using Tsars lib on it (B42 Version) and also tried it with it removed, nothing worked.

#

Anyone had this happen before?

granite ginkgo
#

I'm leaving this here if anyone wants to check it. I'm out of ideas.

oak hornet
#

huh... it's kinda funyy rn

#

have anyone been wondering why u can only pet 1 animal and not able to queue the actions instead?

knotty stone
#

@granite ginkgo I downloaded your mod from workshop, the recipe is not up to b42 standard(deactivated it) and i fixed the vehicle areas and position, you can build up from that. And you should decide which folder u use you have common and 42 with the same content, common should have your textures ,models and ui (changed stuffs in the 42 folder since its loaded last.)

weary matrix
#

Hi, any clue how to wait for the take pill action to be finished before doing something else?

ISInventoryPaneContextMenu.takePill(item, playerNum)

For example if I do this after:

ISTimedActionQueue.add(ISInventoryTransferAction:new(player, item, inventory, container))

it interrupts the take pill action
I guess I could hook ISTakePillAction:complete() to achieve this but I wonder if there's a better way

sturdy rune
granite ginkgo
knotty stone
#

your welcome 🙂

#

and you should do something about your tires they cant hold air 😄

#

you are missing the MaxCapacity = yourvalue, in the item def

granite ginkgo
knotty stone
#

and if you use non vanilla parts for your vehicle, you should make recipes to craft them or add them to the loottable, iam myselt am not rly a fan of that, i think using vanilla parts is just fine.

granite ginkgo
knotty stone
#

how would the game know if you dont define it.

granite ginkgo
#

well, if I have it in the items.txt I thought the game will automatically get them from there

knotty stone
#

nah, just because its in the games itemlist doesnt mean it can drop

#

same is with the car if you dont define the spawns you wont see it

granite ginkgo
#

indeed

manic forum
#

when i update my mod to b42, can ppl with 41 still play/use it?

granite ginkgo
#

you will create a folder called 42 in your b41 mod, and the game will load the data it has for that version, so yes.

manic forum
#

oh thats why it says Copy and not move the data

granite ginkgo
#

yep

manic forum
#

thanks

granite ginkgo
#

👍

vast pier
opaque moth
#

im trying to spawn into my test world (first mod) and im trying to see if it works so far, i can see and enable it in my mod list but when i get to choosing spawn points the one i made is not there. is there any area i can begin to look? i cant find any vids or posts that fix this ive tried everything that i can think of im pretty sure the files are fine, the closest thing i have is the "write save points..." step i mightve done wrong but if so idk how to save them then?

vast pier
#

Why are these separate recipes? is the 1 xp difference that important?

    craftRecipe DismantleMiscElectronics
    {
        timedAction = DismantleElectrical,
        Time = 60,
        OnCreate = Recipe.OnCreate.DismantleMiscElectronics,
        OnTest = Recipe.OnTest.DismantleElectronics,
        Tags = InHandCraft;Electrical,
        category = Electrical,
        xpAward = Electricity:2,
        inputs
        {
            item 1 tags[Screwdriver] mode:keep flags[MayDegradeLight;NoBrokenItems],
            item 1 [Base.CDplayer;Base.HomeAlarm;Base.Remote;Base.Speaker] flags[ItemCount] mappers[itemType] mode:destroy,
        }
        outputs
        {
            item 1 Base.ElectronicsScrap,
            item 1 mapper:itemType,
        }
        itemMapper itemType
        {
            Base.Amplifier = Base.Speaker,
            Base.ElectronicsScrap = Base.CDplayer,
            Base.MotionSensor = Base.HomeAlarm,
            Base.Receiver = Base.Remote,
        }
    }    



    craftRecipe DismantlePowerBar
    {
        timedAction = DismantleElectrical,
        Time = 100,
        Tags = InHandCraft;Electrical,
        category = Electrical,
        xpAward = Electricity:1,
        inputs
        {
            item 1 tags[Screwdriver;SharpKnife] mode:keep flags[MayDegradeLight;IsNotDull],
            item 1 [Base.PowerBar]  mode:destroy,
        }
        outputs
        {
            item 1 Base.ElectricWire,
        }
    }```
umbral raptor
vast pier
#

I know, but why are they different recipes

umbral raptor
#

because they yield different items

#

the CDplayer and others yield a few itmes

#

and the power bar only yields electric wire

vast pier
#

yeah so does each input, that's what mapper recipes are for

umbral raptor
#

so the similar ones are group together

vast pier
#

Base.Amplifier = Base.Speaker,
Base.ElectronicsScrap = Base.CDplayer,
Base.MotionSensor = Base.HomeAlarm,
Base.Receiver = Base.Remote,

umbral raptor
#

the mapper essentially allows the recipe to occur using multiple options of an item

#

it could also be used to yield different results depending on the item inputted

vast pier
#

could have added on
Base.ElectricWire = Base.PowerBar

umbral raptor
#

true, the power bar recipe allows the use of a sharp knife tho

vast pier
#

Yeah and why don't normal electronics?

umbral raptor
#

or smthin

#

idk ask indiestone

vast pier
#

@ The Indie Stone WHY ELECTRICAL GO BRR

oak hornet
# vast pier Yeah and why don't normal electronics?

notice the OnCreate on DismantleMiscElectronics? Basically it modify how many ElectronicScrap That Will Be Outputted when It is done crafting using Elect. Skill Level (iirc).

What TIS envision rn is probably to seperate PowerBar as they don't want it to output any electronic scrap, only wire

vast pier
#

Yeah well that's weird too cuz power bars have circuit boards

oak hornet
oak hornet
vast pier
#

Oh they have a chance to give batteries?

oak hornet
vast pier
#

Oh then there's really no reason to have them be separate recipes huh 💀

oak hornet
#

and TIS don't want power bar to drop that

vast pier
oak hornet
#

again... dk why 🫠

vast pier
oak hornet
vast pier
#

that's okay, even though the hand phone is used in the electrical dismantle animation, I don't think you can dismantle them

oak hornet
#

🫠

vast pier
#

Unless it was just bugged in my game and works fine normally

#

wait no I don't think you can in build 42 cuz the dismantle electrical doesn't use tag crafting

oak hornet
#

wdym?

granite ginkgo
#

to offset on z axis iis offset = 0,0,number, ?

vast pier
#

nvm separate recipe

    craftRecipe DismantleElectronics
    {
        timedAction = DismantleElectrical,
        Time = 60,
        OnCreate = Recipe.OnCreate.DismantleFlashlight,
        OnTest = Recipe.OnTest.DismantleElectronics,
        Tags = InHandCraft;Electrical,
        category = Electrical,
        xpAward = Electricity:2,
        inputs
        {
            item 1 tags[Screwdriver] mode:keep flags[MayDegradeLight;NoBrokenItems],
            item 1 tags[Camera;Digital;MiscElectronic;Flashlight]  mode:destroy flags[IsNotWorn;ItemCount],
        }
        outputs
        {
            item 1 Base.ElectronicsScrap,
        }
    }
    ```
#

this one makes even less sense to be separate

#

recipe choices got me tweakin

latent fractal
#

I managed to add a sub menu with a matching icon, and removed the default context crafting option.
I keep coming up with no valid items for my sub options, vs any of the 1 out 4 inputs for the valid recipe.
if anyone can point to any references to better understand sub options, ty dirkThumbsUp

south bear
#

Does anyone have an example of a working usage of player:setClothingItem_Head (or any other body part for that matter lol)?

vast pier
karmic cobalt
#

Hey guys. I'm trying to pack a couple of mods into one mod for my server. I tried merging everything, keeping the directories, but i believe some files might be conflicting. The mods by themselves work well with some minor errors, but when packed, it's a total mess. Does anyone have any experience with modpacking and could help me out?

distant inlet
#

I have a min viable mod after ~40 hours 🥲

#

does anyone know the Lua class responsible for handling in-game UI resizing (like the player inventory UI and how it's resizable by click-dragging the bot-right corner)?

karmic cobalt
vast pier
#

Because it's generally frowned upon and there's not really much reason to do it anymore

karmic cobalt
vast pier
#

confused on why you would need to pack them then

karmic cobalt
vast pier
#

Modders here tend to avoid helping with modpacking. Is there a specific reason you need to do it?

south bear
winter bolt
south bear
#

what are the potential values for bodylocation?

#

The standards from the setClothing_X?

winter bolt
#

if you look in media/lua/shared/npcs/bodylocations.lua you can see them

south bear
#

Thanks so much! You rock!

plush wraith
#

Can I check for mods to add additional options in the sandbox based on loaded mods? (hide or display them)

sour island
#

Oh damn, Bury is on hiatus 😦

latent fractal
onyx valve
#

I think I have a problem, do you know why my mod doesn't appear in the workshop? It is in public and everything seems fine but when using the search engine it simply does not appear.

onyx valve
#

I uploaded it from build 41, because it is for that version, but could that be the problem?

tacit pebble
onyx valve
onyx valve
#

I don't know what happened but I deleted it and uploaded it again and it worked haha

dense gorge
#

oh my god im free it's finally done

#

this should not have taken like a month off my life

distant inlet
#

does anyone have tips for doing translations quickly? it's something i'm considering skipping

umbral raptor
#

you might need to do double checks but from my experience if u explain it well, AI can easily do translations

bronze yoke
#

there's a tool to google translate a whole mod into every supported language

#

otherwise just skip it, most people who get your mod will speak english anyway since your mod page will be in english and machine translations are never very good

distant inlet
#

thanks, I'll look into these recs

distant inlet
umbral raptor
#

i had to work on radio translations and that file had me translate every GUID of every line in the broadcast

#

the Ai did it in a few mins. It would've taken me like at-least several days.

#

but they can't write code for shit

#

a blind and deaf guy could write better than them sometimes haha

distant inlet
#

it's pretty decent but needs a lot of guidance

umbral raptor
#

Which is better and free like Deepseek. Also not constantly loading like Deepseek. And comes with an image generator.

#

i mean i don't like having 50 accounts just to use GPT for a long task lol

#

cuz u get blocked from doing any requests after like 5-10 messages.

humble raft
#

Here's a great resource for verified localization of various common words if you have any simple text you're translating too

whole bay
#

how difficult is it to modify the collision size of an object?

#

id like to make the car lifts not have an entire tile of collision and just roughly the shape of the object itself as it blocks exiting the car and parking easily

humble raft
#

Anybody know off the top of their head where animals are defined in the java/lua?

#

As in specific animals, rather than general/inherited behavior

whole bay
#

where is the tiles packs found?

umbral raptor
#

does anyone know how i can make a world object give out light?

#

closest thing i found was the lanterns mod

bright fog
#

And they inherit from IsoPlayer, for some reasons

humble raft
#

Cheers, thanks

faint steeple
#

idk if this is the right place to ask but i'll ask here, I'm also new to pz modding

Would this mean that player was nil(null) for whatever reason?

faint steeple
#

and the issue would be in my vehicles onKeyPress function?

#

I swear i check if player exists... maybe i dont idk

grizzled fulcrum
#

do if player == nil or player:getVehicle() then return end maybe as a fail safe

faint steeple
#

im pretty sure i do do that one secc

grizzled fulcrum
#

looking at the code in your screenshot it doesnt seem you do

faint steeple
#

on the right side that isnt mine

grizzled fulcrum
#

ohh

faint steeple
#

Thats CAnimals_Interact, which idk why its that one..

grizzled fulcrum
#

well thjen ikd but yes the player is nil in your case, it should be pretty ok to fix but if you still need help just ask

tacit pebble
#

both vehicle and animal radial menu uses V for opening radial menu. that's why I guess

#

if it is not radial, but should be something similar

whole bay
#

what unpackers do yous use

bright fog
whole bay
#

to unpack tiles1x.pack ect

#

i wanted to modify a tile collision

#

or would a lua work

bright fog
#

I don't remember if an unpacker is linked on the wiki

#

But you can open and unpack from the modding tools I believe

whole bay
#

like TileZed?

#

that and the world one is all i got

bright fog
#

You got a section at the top, in tools I believe, for pack files

#

It's fairly explicit so you should be able to find it

#

You can open pack files, and I believe you can unpack

whole bay
#

okay thank you im just starting lol

whole bay
bright fog
whole bay
#

nah i only just as of 10mins ago decided to look into modding pz lol

#

if u know of any resources to help learning much appreciated 🙂

bright fog
sly monolith
#

can someone help me with this, so i have this outfit for a zombie, when i add lets say a dufflebag to it, the zombie will spawn with that bag on it's back. It works fine, always spawning without any issue, but when i want to replace the dufflebag with a briefcase it just won't spawn at all, i tried using GUID for the briefcase alone, for the left hand one, for the right hand one, for base and one hand, and all 3 of them, but neither of those combinations work, is it somehow possible to have a zombie spawn with that thing at all?

fleet bridge
tranquil kindle
sly monolith
sly monolith
#

the difference with the dufflebag is it's worn on the back, and the briefcase can't be worn on back

tranquil kindle
#

Thing is, containers like garbagebags/briefcase, because of TIS knows why are counted as clothing items. You don't equip weapons on zombie, you make it appear on spots that game allows you to place on player model for displaying them as if they were "impaled". I dont think you can "impale" zombie with briefcase or any other clothing item.

#

It wouldn't be hard to make clothing items like briefcase that is actually displayed like holding in hand and still be equiped on clothing item slot, so it doesn't need to be in right/left hand

bright fog
#

You can equip something in the hands of a zombie

tranquil kindle
#

Hmmm

bright fog
#

setPrimary... something

sly monolith
#

how would i do that, in a lua?

bright fog
#

The main problem will be: is the zombie animation able to handle that item in hands

tranquil kindle
#

But UwU want to do it with outfit definition i belive?

bright fog
sly monolith
#

i dont really care how, i just want it to work haha 😄

bright fog
#

Look it up in the java doc

#

Idk if it'll work for briefcases since it seems to be weird

#

But just check it out

sly monolith
#

i'm not sure what you mean tho, i'm very very very new to all that

tranquil kindle
#

How did you add dufflebag to zombie?

sly monolith
#

in an XML just like i'd equip a shirt or w/e

#

<m_items>
<itemGUID>cd6a888a-939b-45ef-a100-2b726ebb66f3</itemGUID> <!-- Briefcase -->
</m_items>

bright fog
#

You need to do it through the lua

tranquil kindle
#

Did you add that item to fileguid table, even if its vanila item?

sly monolith
bright fog
tranquil kindle
#

Same with briefcase?

sly monolith
#

yep

tranquil kindle
#

Do you care if that briefcase would be equipable on back?

#

Also from what i can see briefcase has 3 clothing xml files, Base one (which seems to be unused?) right hand and left hand

#

Did you include all of them in your fileguid and outfit definition?

sly monolith
sly monolith
tranquil kindle
#

I'd go for workaround (im in no way in my current state to think of better idea) and make new "custom" briefcase that can be equiped on back.

item CustomBriefcase
    {
        DisplayName = Briefcase,
        DisplayCategory = Container,
        Type = Container,
        Weight = 1.5,
                CanBeEquipped = Back,
        IconsForTexture = Briefcase;Briefcase_Metal,
        ClothingItem = Bag_Briefcase_RHand,
        Capacity = 8,
        CloseSound = CloseBriefcase,
        MetalValue = 15,
        OpenSound = OpenBriefcase,
        PutInSound = StoreItemBriefcase,
        ReplaceInPrimaryHand = Bag_Briefcase_RHand holdingbagright,
        ReplaceInSecondHand = Bag_Briefcase_LHand holdingbagleft,
        RunSpeedModifier = 0.97,
        WeightReduction = 50,
        WorldStaticModel = Briefcase_Ground,
        MaxItemSize = 2.0,
    }

See if it works.

sly monolith
#

i dont care for anything other than zombie walking around with a briefcase in it's hand, and after killing it you being able to loot that briefcase, it can be done any way possible, like making a fake briefcase weapon for the zombie to wear, and then removing that on zombie's death and replacing it with an actual clothing item, i just don't know how and if that's possible

tranquil kindle
#

My idea is to make it wearable on back (or any other location, if needed) and when equiped on back it will use Clothing XML as if it were hold in Right hand.

sly monolith
#

yea sure that works too, but will it stick to the hand bone and move with it?

tranquil kindle
#

In theory it should

sly monolith
#

oh but wait a second, will that use the acutal vanilla briefcase?

tranquil kindle
#

Yeah

#

All vanila clothing xmls are used. You just make new container that uses them, with addition it being able to be worn on "back" slot of character/zombie and while worn on back, it will use RightHand version of briefcase because of "ClothingItem = Bag_Briefcase_RHand,"

sly monolith
#

it won't be possible to wear anything on back while wearing that tho right

tranquil kindle
#

I think you can change it to any other location or make your own. Though its for testing first

sly monolith
#

then again not like it even matters really, who's walking around with a briefcase right

tranquil kindle
#

You can then change it in script and still should work.

#

Wait...

#

I forgor... We dont give zombie actuall item do we?

sly monolith
#

yea i kinda wanna do the thing Sir Doggy Jvla said, tho i have no idea how haha

tranquil kindle
#

Sorry. I've still not fully recovered after my sickness. You tried adding that briefcase through "clothing" xml in media>clothing, right?

sly monolith
#

yea

bright fog
#

Actually maybe not

sly monolith
#

there's all those folders and parameters idk where to even place anything, like in an attachedweapondefinitions lua, or making a new one, or w/e

tranquil kindle
#

Id suggest make copy of all 3 of briefcase xmls, rename them to be diffrent from original and change all their guids, insert those guids into fileguid table. Then make that custom briefcase use your edited files you inserted in table.

#

Its easier for me to do it than to explain it

sly monolith
#

yea i get you, tho in that case wouldn't i just need 1 XML, for wearing it on the back but attaching like it's in the hand

tranquil kindle
#

You can, and just dont put "ReplaceInPrimaryHand" and ReplaceInSecondHand lines in your briefcase

#

I mean you can....

#

Okay... i can't really think straight for some reason.

sly monolith
#

is it possible to remove it on zombie's death and replace with a regular briefcase in it's inventory?

sly monolith
#

weird thing is when zombie's walking it actually looks good, only when it's standing it clips, and it clips both when standing and walking on a player 😄

bright fog
#

That's my guess

sly monolith
# bright fog Yes

could you give me some example where this is used? like some in-game thing or a mod if you know any

bright fog
#

It will involve this

umbral raptor
#

idk what its called

#

biprop adjustment or smthin like that

#

attachment world
{
offset = 0.0000 -0.0250 0.0000,
rotate = 0.0000 0.0000 0.0000,
}

    attachment Bip01_Prop1
        {
        offset = -0.0 -0.00 0.00,
        rotate = 90.00 -90.00 0.00,
        }

    attachment Bip01_Prop2
    {
        offset = -0.0 -0.00 0.00,
        rotate = 90.00 -90.00 0.00,
    }
#

this

sly monolith
#

yea but it's actually in the back slot, so the game isn't using the hold in hand animation for it hence the weird rotation

umbral raptor
#

aha

#

i think the model itself needs to be adjusted then

#

i dont think you can adjust the back position with scripts

sly monolith
#

yea it would be best to just make a prop briefcase as a weapon or w/e, and then on zombie's death replace it with the real one, tho idk how

umbral raptor
#

that converts it from a container form to a weapon form

#

beware tho it'll delete all the contents inside the briefcase

#

or what do you want to do exactly?

#

you can just have it as a container that can be held in hand too

sly monolith
#

i want a zombie wearing my outift to carry around a briefcase in hand, that you can loot when you kill it

umbral raptor
#

ahh

#

you can just define a new body location i guess

sly monolith
#

apparently that's not as easy as it might seem heh

umbral raptor
#

its super ez

#

nah haha

#

lemme send u mine, its literally 3 lines

#

works for me just fine

#

that adds a new clothing category

#

like many mods do

#

this allowed me to add in armbands

sly monolith
#

but how are you going to attach a briefcase to it

umbral raptor
#

BodyLocation = Righthand in item scripts

#

and then set a zombie to spawn with this clothing

#

and it'll spawn

#

you can then have it as a locked form that the zombies spawn with and an unlocked form which is only accessible thro recipes and also gives loot and a container form of the breifcase instead of a clothing one

#

so the player can reuse the briefcase

#

im not sure how to make the model appear in the hand tho

#

i always used models that had a left and right hand form

#

mostly from vanilla

sly monolith
#

and i want to use the vanilla briefcase here

umbral raptor
#

you can just use WorldStaticModel = Xbriefcase or whatever its called you'll need to refer to the vanilla zomboid files

#

and then the clothingitem you define the right and left hand models

#

<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel>media\models_X\Skinned\BackPacks\Briefcase_LHand.X</m_MaleModel>
<m_FemaleModel>media\models_X\Skinned\BackPacks\Briefcase_LHand.X</m_FemaleModel>
<m_GUID>0580be0d-ef5b-486a-a423-7ebe13d7976e</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<textureChoices>clothes\bag\briefcase</textureChoices>
<textureChoices>clothes\bag\briefcase_metal</textureChoices>
</clothingItem>

#

here's how vanilla does it

#

the models are already there so u can just re-use all of that stuff

#

if you wanna use the vanilla model

sly monolith
#

yae but look, i tried adding that briefcase to the outfit, but the game won't spawn a bag that's not attached to the back

#

like right/left version just doesn't work

umbral raptor
#

did you copy the vanilla briefcase model script?

#

send me ur files

sly monolith
#

i mean, i want a vanilla briefcase, without making any new stuff

#

attached to a zombie's hand

#

if i need to make a new item as a prop then so be it, but in the end, after killing the zombie, i want to loot a regular vanilla game briefcase from it

umbral raptor
#

you'll need to define a new body location

sly monolith
#

it's all pretty pointless tbh, but i just wanted to make that work for whatever reason 😆

umbral raptor
#

cuz zombies dont hold things in hand

umbral raptor
#

and it wasnt a lua file lol

sly monolith
#

😄

umbral raptor
#

its up to u if u wanna continue

sly monolith
vast pier
vast pier
# vast pier

Previously only able to use alarm clocks and kitchen timers, for time bombs

umbral raptor
#

and you'll define the righthand clothing location

#

local group = BodyLocations.getGroup("Human")
group:getOrCreateLocation("MARightHand")

#

like this

#

and then it'll be like the zombie wore it instead of using it like a weapon

#

zombies dont have primaries or secondaries, they do wear clothes tho

#

did you do the ClothingItem too?

#

and the whole process?

tranquil kindle
sly monolith
umbral raptor
#

lemme just send u an example

sly monolith
#

the thing is if i make a new clothingItem i'll end up with a new briefcase, not the vanilla one, no?

vast pier
umbral raptor
#

item SecretBriefcaseRight
{
DisplayCategory = Accessory,
Type = Clothing,
DisplayName = Locked Briefcase,
ClothingItem = SecretBriefcaseRight,
BodyLocation = MARightHand,
ClothingItemExtra = SecretBriefcaseLeft,
ClothingItemExtraOption = Left,
Weight = 0.01,
Icon = SecretBriefcase,
CanHaveHoles = false,
Tooltip = Tooltip_Briefcase,
WorldStaticModel = Briefcase_Ground,
}

Now I did make it a bag/container as it is a locked form, but if u want to make it a container sure, but I have no idea how to make loot spawn in a container in the world.

#

now you can make a recipe to unlock it. you'll also make a left hand form.

#

you will also make a clothingitem for each one

#

you will make a recipe that allows the player to unlock it

sly monolith
#

ah you mean just craft a regular briefcase form this one

umbral raptor
#

this deletes the secret briefcase and gives a normal briefcase + loot

#

yep

sly monolith
#

well that's one way to do it yeah

umbral raptor
#

this would give the player the loot u want and a normal briefcase

umbral raptor
sly monolith
#

well maybe you're right 😄

umbral raptor
#

dont forget translations, models, textures, icons and such

sly monolith
#

that way i could specify what's inside of the briefcase?

umbral raptor
#

its a whole process

umbral raptor
#

wanna see an example?

sly monolith
#

sure

umbral raptor
#

I have something called a FAR raiton

#

it gives medical supplies

#

when opened

#

however, lemme tell u smthin before

sly monolith
#

you mean u just get that stuff added to your bag, or is it inside of that crafted thing

umbral raptor
#

if u want different loot u might need to make many variants of the briefcase

#

so each recipe can be defined and each briefcase would be "random" instead of pre-determined single loot

umbral raptor
#

craftRecipe OpenFARRation
{
Time = 25,
timedAction = UnPackSmallBag,
Tags = InHandCraft;CanBeDoneInDark,
category = Medical,
xpAward = Doctor:1,

inputs
{
    item 1 [SupportCorps.RationFAR;],
}

outputs
{
    item 2 Base.AlcoholBandage,
    item 4 Base.Bandaid,
    item 1 Base.Antibiotics,
    item 1 Base.Pills,
    item 2 Base.SutureNeedle,
    item 1 Base.Tweezers,
    item 1 Base.Disinfectant,
    item 2 Base.AlcoholWipes,
    item 1 Base.AlcoholedCottonBalls,
    item 1 Base.Splint,
    item 1 Base.ScissorsBluntMedical,
    item 1 SupportCorps.RationFARPackage,
}

}

#

this gives a ration package that can be used as a container by the player to store all the loot they just got

#

now to make it easier

sly monolith
#

and does all of that loot end up in your bag, or in that opened item

umbral raptor
#

all the loot goes into player inventory

sly monolith
#

i see, wouldn't it be possible to put it in that bag?

umbral raptor
#

which he can then store into a new container that he just got "SupportCorps.RationFARPackage,"

#

would require complex lua coding

#

not worth it

sly monolith
#

just wondering, not like that matters heh

umbral raptor
#

you could probably do it, but its def not worth the headache

#

you might as well develop a new modding tool or smthin

sly monolith
#

and do you see what you'll get when crafting that recipe?

umbral raptor
#

if you use a tooltip

#

you can tell the player what he'd see

sly monolith
#

and if i don't then you won't see untill you open it?

umbral raptor
#

yeah

sly monolith
#

ok that's good

umbral raptor
#

you'll just get the recipe name

#

which you can set as "Crack Suitcase' or whatever u want

#

its defined in translations

sly monolith
#

yeah that'll be good enough, thanks a lot !

umbral raptor
#

Recipe_OpenFARRation = "Open Ration",

#

i think you can add tooltips too but i havent tried one yet

#

so like a tooltip to the recipe itself

#

and u can add one to the item

sly monolith
#

idk who thought it's a good idea to make clothes in XMLs, weapons in scripts, and all the functions in LUAs, then again idk how games work so maybe that's necessary 😂

umbral raptor
#

honestly, if scripts and clothes were in LUA nobody would mod LOL

sly monolith
#

i don't want any tooltips tho, i just want to get money from the briefcase 😄

umbral raptor
#

i'm already ripping half my hair out writing a 20 line LUA script