#mod_development

1 messages ยท Page 265 of 1

feral lion
#

i using now without rest phase

#

so the circle shrinking for a whole 3 hour nonstop

#

its a 1 phase

mellow frigate
#

30s means 30s after as many players as you configured joined

feral lion
#

its 1 player

#

so its already expired

#

we will see he is joining now

#

i always test it with 1 player

#

to start right away

mellow frigate
#

I never tested Hosting. always dedicated.

feral lion
#

Yeah, its not working for us, stays in nonPVP

#

for me simple hosting is a lot more benefical

#

a battle royale is like, i run it on my comp, and they join in, after that i close the server

#

i had used about 100+ mod with your royale mod, all of them worked correctly.

#

thats why i think that there cant be any difference.

minor ravine
#

@night ironhey

night iron
#

Hey hey

mellow frigate
feral lion
#

im not, you are right, im just a beginner.

#

checking the ini file

#

Im just loving your work, dont want to be overwhelming.

#

Also i will support your royale project with some money in the future. if it becomes good.

#

I can do really big streaming events in zomboid.

#

ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

i think maybeeeeeeeeeeeee...........

#

i found something

#

@mellow frigate your PVP shield also work on custom standalone maps? because i using that.

#

maybe the problem is that it only works in the basic map. which is a problem for me.

feral lion
#

then idk, i found a server configer guy, maybe he can help, need a few minutes

#

maybe that can be a problem if i set to "1" player.

#

trying with "2" player. maybe gonna work.

My friend also tested it, sadly he also cannot get it work.

night iron
#

Is there any helper function / method to get an items texture without instantiating it? assuming we have it's full 'class' name

bronze yoke
#

ScriptManager.instance:getItem("Module.Type"):getNormalTexture()

pearl prism
#

Guys, if I want to have a table on the server side, do I need to place it inside the function that is called by the "OnClientCommand" Event or can I leave it "free" in my code? Just because my code is inside the server folder, would the game interpret it as a server table?

bronze yoke
#

all code in the shared and server folders is ran by the server

#

you may want to start server-specific files with if isClient() then return end to prevent them from also running on the client but in a lot of cases not doing this won't actually cause problems

pearl prism
#

I'm trying to migrate my code from single player to MP, but there are so many challenges

grim cedar
bright fog
#

That can definitely be useful for infinite water plumbing

round notch
#

Anyone got any good documentation on how animations are called?

topaz tangle
#

does anyone know how to make having two trunks on a vehicle work right?

im trying to add a trunk and truckbed but the truckbed only allows acces when standing on the area of the trunk

night iron
#

now that i have finished my inventory pane rewrite i could finally pull this one off for my improvised tools woo hooo:

#

when salvaging these improvised tools there will be a chance, based on skill, to recover each of the material used to make them ๐Ÿ˜„

bright fog
bright fog
night iron
#

Just tested with equipmentUI and that one worked well

#

Have yet to test with tetrisUI

bright fog
#

๐Ÿ‘Œ

#

Inventory tetris can't show this for sure

#

Which is why I'd find tooltips more suited

#

It's what Susceptible does for example to show a custom durability bar on its filters or oxygen tanks

night iron
#

I find the tool tip option not optimal specilly when you want multiple items displaying information for comparison etc

#

I can however also show the mats on the tooltip though

bright fog
#

I see what you mean yeah

bright fog
#

So what's your mod concept exactly ?

#

Modifying weapons ?

night iron
#

Also my rewrite opens doors to a lot of new ideas. Rows can now vary in height and bespoke renderes can be done for specific items

#

My original intent is to ease on the gatekeeping, through endless search for key items, of a LOT of game features. So I'm introducing very flimsy but salvageable alternatives to this crucial items to get you going until you find safer and more durable alternatives

round notch
bright fog
#

Get in game

#

In a save

#

Then debug menu (left icon)

#

Second panel and you should have "Animation Viewer" or smthg like that

round notch
#

Let me quickly unbreak my mod and I'll check it out haha

night iron
#

For balance reasons I'm going to make this recipes take a realy long time to make, the durability be based on skill and materials used, probably introduce a chance of injury when failing critically both creating and salvaging the items. Also the material recovery will also depend on skill and be time intensive

ancient grail
round notch
#

I've seen a couple mods have used the radial emote feature. Been trying that so far

#

It's annoying though, certain emotes in the zombie AnimSet are pretty cool and I'd like to use them but emotes have a different set altogether. Is it a copy paste, rename job. Emotes seem to check for something like Bob_EmoteDance strings

#

Shame you can't just do "player:playAnim("zombie/walk") like the docs imply

round notch
bright fog
#

I highly doubt that's a thing in the doc

#

There's no examples in the doc

round notch
#

I know

#

It's still listed in the docs tho

#

I've tried many test animations for it and doesn't seem to do anything

#

If it worked I'd assume mods like True actions would use it

#

But they use the emote radial stuff

bronze yoke
#

yeah this is really old api, probably from when characters used sprites

#

none of it does literally anything```java
public void PlayAnim(String string) {
}

public void PlayAnimWithSpeed(String string, float float1) {
}

public void PlayAnimUnlooped(String string) {
}

#

but of course it's not marked deprecated why would it be

round notch
#

So that's why I never got any errors LOL

#

ILuaGameCharacter was probably the old standard then I assume

bronze yoke
#

no most of that is still used

round notch
#

Oh right ๐Ÿคจ

bronze yoke
#

there's just not really any consistency about these things i'm afraid

round notch
#

Yeah, trial and error til it works

rose oar
#

hello, where would i start learning how to mod zomboid
i wanna make a mod where you can make cookies that have a 1/100 chance of making you explode for no reason

#

ah pinned

night iron
#

anyone around willing to point me in the right direction on how to add a random injury to a character? (just trying to spare my self some time digging around)

topaz tangle
#

(Repost)
does anyone know how to make having two trunks on a vehicle work right?

im trying to add a trunk and truckbed but the truckbed only allows acces when standing on the area of the trunk

night iron
#

this one is driving me crazy.... so BodyTypePart has a static method to get an array of all bodyparts
but when i try to do anything with the result of this i get some obscure error message that seems unrelated to this like it fails to get somethings type

rancid panther
#

@night iron try using this advice burryaga gave me a while back and see what you can make of it

rancid panther
#

oh and im not sure if he was looking at the exact function names at the time so you might have to double check. i think the one for getBodyParts is right tho

night iron
#

right now i'm struggling with this:

    local bodyParts = BodyPartType.values();

    for i in pairs(bodyParts) do
        print('========>');
    end
#

i can't figure how to iterate through that supposed array

rancid panther
#

i wouldnt know. i dont have proper coding experience

#

good luck figuring the rest out!

night iron
#

thanks he he

rancid panther
#

there are plenty of mods that get random body parts tho so you can always look around

grizzled fulcrum
#

maybe it doesn't return a lua array but a java one, so it might not be able to loop through from lua properly idk

night iron
rancid panther
#

i think the one u can read in lua is getBodyPart

night iron
grizzled fulcrum
#

if you cant do this BodyPartType.FromIndex(0) then you probably cant access it or something

grizzled fulcrum
grizzled fulcrum
#

let me check

#

oh ik why nvm

#

but that requires you to input a BodyPartType as the arg

rancid panther
#

yeah so there is getBodyParts and getBodyPart, which both do separate things

grizzled fulcrum
#

getBodyParts returns ArrayList<BodyPart>

rancid panther
#

and there is a table somewhere that tells you the name of every body part, but i dont remember where i found that

grizzled fulcrum
#

but you know what

rancid panther
#

it was years ago

grizzled fulcrum
#
local a = ... getBodyParts()
for i = 1, a do
    local part = a:get(i - 1)
    print(part:getType():ToString())
end
#

thats an example. but it might work

rancid panther
#

there are mods that do something like this already btw

grizzled fulcrum
#

like a lib? or in general

rancid panther
#

meaning free real estate

night iron
#

hummm i may just end up making my own list of bodyparts i can randomise through their numerical indexes that is if i keep to my original plan to restrict which body parts could get injured as opposed to just use

rancid panther
#

no just the looping of body parts

#

that is an option. if you can find that list

grizzled fulcrum
night iron
#

the page i linked as the vanilla list of all body parts

rancid panther
#

oh it does

#

epic

#

is there a way to make a table of exclusions instead of rewriting the table while excluding some?

#

it sounds intuitively wrong to copy the whole thing unless the code simply doesnt allow it (like when i was suffering with the health panel)

bronze yoke
#

when people say 'array' here they mean arraylists, actual arrays do not work in kahlua whatsoever

night iron
spiral egret
#

having fun in lua lmao

full bane
bright fog
full bane
#

ah alr

#

what can i use to get started then

bright fog
#

hmm tho looking at it the codes look clean

full bane
#

i just need a guide to lay everything out and get a basic mod loaded then i should be able to do the rest

full bane
#

tyty

grizzled fulcrum
vagrant rampart
#

Hi everyone, I had a question regarding True Music (TM). While digging around its files, I noticed that they have a folder containing some .wavs titled 'TCBoombox_service', 'TCBoombox_stop', 'TCVinylplayer_service', and 'TCVinylplayer_stop'.

I was interested in creating a mod that adds sounds for inserting cassette tapes into TM's boomboxes (along with taking them out, same for their record players) which is why I discovered these in the first place. As someone that has no idea on how to go about implementing something like this (read: no coding experience), where would I start?
In short, I want to achieve the following:

  1. Make a custom sound play when you insert a cassette tape into a boombox (using the Device Options GUI), and
  2. Make a custom sound play when you eject a cassette tape out of a boombox (using the Device Options GUI).

Thanks in advance. spiffo

upper helm
#

I can imagine it being a pretty simple few lines of code tbqh

coarse sinew
round notch
bright fog
#

Isn't there some very rare mods that add their own ?

round notch
#

Yeah it probably will but I haven't downloaded any tail mods lol

bright fog
bright fog
round notch
#

Could do tbf, in my use case I don't think it's necessary

#

But you could adapt the code to check length of array before iterating through it

bright fog
#

You can possibly do:

local bodyPartTypes = BodyPartType.values()
local size = bodyPartTypes:size()

?

bronze yoke
#

BodyPartType.values() is an array

#

you can get the count of bodyparts from the bodydamage

#

i don't think mods can add new ones but it's preferable to get the count just to avoid magic numbers

#

and potentially it will be more forwards compatible

bright fog
#
local size = BodyDamage:getBodyParts():size()
#

just got to retrieve the player BodyDamage

#
local BodyDamage = player:getBodyDamage()
#

Something like that

bronze yoke
#

oh it's just an enum lol

round notch
bronze yoke
#

you can get the count with BodyPartType.MAX:index()

#

but unless you have a reason to specifically loop over body part types and not the player's body part array it's preferable to just use the regular arraylist loop syntax

bright fog
#

Right yeah I didn't see the max

#

Yeah actually you can just use getBodyParts()

#

No point getting BodyPartTypes here ?

bright fog
bronze yoke
#

is separating the local declaration faster in kahlua?

bronze yoke
#

it is actually slower on an extremely microscopic level

#

and it's a readability + scope nightmare so please don't do this ๐Ÿ˜ญ

bright fog
#

I've always done that

bronze yoke
#

yeah i just tested it

#

it's very slightly slower in both lua 5.3 and kahlua

bright fog
#

Alright, time to clean my entire code lmao

#

I've developed this habit of doing it bcs I figured having to declare a local every time would have an impact, guess not then

#

How can it even be slower ?

round notch
#

Presumably it's not creating a new variable every time it's just wiping it?

bronze yoke
#

i don't really know why it's slower but i figure it's either smart enough to notice this kind of case (DOUBTFUL TBH) or declaring a variable just isn't an expensive operation to begin with

#

internally locals are stored in an array so 'creating' one may not actually require memory allocation

#

(the value you assign to it may though)

round notch
#

If the performance is negligible I wouldn't worry ๐Ÿ˜‚ As long as it works

bright fog
#

hmm

bright fog
bronze yoke
#

it's not really a performance concern here and more 'you probably sacrificed readability because you think this runs better, but it doesn't'

bright fog
#

It's especially important if your code runs every ticks, and it's particularly NECESSARY when your code runs every tick * every zombies

bright fog
#

Well I'm happy I can ditch it ngl lmao

night iron
#

would this be considered a good practice? or is there a more efficient way to create iterable `arrays' in lua / kahlua?

local toolBodyParts = {};
toolBodyParts[0] = BodyPartType.ForeArm_L;
toolBodyParts[1] = BodyPartType.ForeArm_R;
toolBodyParts[2] = BodyPartType.Hand_L;
toolBodyParts[3] = BodyPartType.Hand_R;
toolBodyParts[4] = BodyPartType.UpperArm_L;
toolBodyParts[5] = BodyPartType.UpperArm_R;
toolBodyParts[6] = BodyPartType.UpperLeg_L;
toolBodyParts[7] = BodyPartType.UpperLeg_R;
toolBodyParts.size = 8;
bronze yoke
#

count from 1, not 0

night iron
#

ok and other then the starting index?

bronze yoke
#

if you start from 1 you can use```lua
for i = 1, #toolBodyParts do
local v = toolBodyParts[i]
end

#

i believe keeping size as an explicit field here might be marginally faster but it's not really necesary and could leave you open to mistakes

night iron
#

notice i'm not actualy using all parts just the ones i feel make sence to get injured while crafting an improvised tool

#

the idea is to then randomize the index and get a random body part from this list

#

and it's all going to get encapsulated in a getRandomToolBodyPart or something along those lines so my question is more in terms of good practices / performance

bronze yoke
#

you can also create it like this```lua
local toolBodyParts = {
BodyPartType.ForeArm_L, BodyPartType.ForeArm_R,
BodyPartType.Hand_L, etc
}

night iron
#

ok good to know

bronze yoke
#

if you need a specific key you can use string = value, or [anytype] = value,, otherwise the keys are 1, 2, 3...

night iron
#

i did try with { 0 = value } but the language doesnt seem to like numercial indexes at creation does it?

bronze yoke
#

if you wanted to do that you'd do [0] = value,

night iron
#

ha! i missed the square brakets

#

thanks

bronze yoke
#

it's a little weird because strings don't need the brackets

#

(as long as they're valid lua identifiers at least)

night iron
#

and for the length? is there a better option then set it speficaly as another index of the table?

#

would this make any sence at all? toolBodyParts.size = #toolBodyParts

bronze yoke
#

not within the initialiser

#

oh you weren't even using the initialiser syntax that's not what you meant ๐Ÿ˜…

#

yeah, that's valid, most people would just use # when they need it though (haven't tested the exact performance difference but it's likely negligible)

night iron
#

lol ok i just ran a few tests:

  • sequential 0 to 7, # = 7
  • sequential 0 to 6 with last index as 8, # = 8
  • sequential 2 to 8 with last index as 1, # = 8
  • starting index 10, sequencial 3 to 8, last index as 1, # = 10
#

so # returns the highest numerical index hum?

glacial ether
#

Hey if I were to make weapon sound replacements how might I go about that?

bronze yoke
#

a lot of people make the mistake of thinking it counts the number of pairs in the table but that's not what it's for, it'd actually be effectively useless if it did that

ancient grail
#
local bodyParts = getPlayer():getBodyDamage():getBodyParts()
for i=1, bodyParts:size() do
    local part = bodyParts:get(i-1)
    print(part:getType()) 
end


for i=0, BodyPartType.MAX:index()-1 do
    local part = BodyPartType.FromIndex(i)
    print(part)
end


function getRandPart()
    return getPlayer():getBodyDamage():getBodyPart(BodyPartType.FromIndex(ZombRand(BodyPartType.ToIndex(BodyPartType.MAX))));
end
print(getRandPart():getType())
#

i use something like this for body parts

#
print(BodyPartType:getRandom())
autumn pumice
#

Hello, somebody knows setBumpType types?

bright fog
autumn pumice
bright fog
#

media/AnimSets

autumn pumice
#

i found them i guess

#

those?

bright fog
#

It's a custom animation

#

Related to bump state

night iron
#

probebly a dumb question but... what is the string argument of 'derive' for? is it just a unique identifier or something along those lines?

bronze yoke
#

yeah

sonic needle
night iron
#

yeah it's a dumb question? :x

bronze yoke
#

no, that's all it is

night iron
#

a unique identifier?

#

can it have '.' in them?

bronze yoke
#

it gets put into the new class's Type field or something like that, it doesn't actually do anything, i don't think anything in the game even reads it

night iron
#

like would this cause any sort of circular dependency issue?
ExtendableItemInventoryPane.derive('ImprovisedTools.overrides.ExtendableItemInventoryPane')

frank elbow
#

Although you'd want :derive

night iron
#

ops! yeh i did miss that!!

topaz tangle
#

Does anyone know how to avoid this with texturing vehicles?

chrome veldt
#

Hey guys, I think I might be missing something, I can't find where the sound object is mapped to the actual sound file. Like generator.ogg, where is it mapped to the GeneratorLoop sound?

grizzled fulcrum
#

isn't it just in the sound definition?

#

if you can, please show me it as I am away from my computer rn

honest lodge
#

im probably out of my depth here, but how would i go about editing an occupation? I want to tweak some of their stats

honest lodge
#

Nevermind I found a way using one of the cheat mods.

ashen mist
#

is there a way to stop guns from emiting light when shooting?

#

messing with a mod for airguns and i'd like to make them that tiny bit more accurate (alongside attempting to remove muzzle flashes)

kindred dagger
#

Is there a function somewhere that triggers on zombie death? I'm trying to add loot to their corpses under specific conditions (so, not something that I think I can just do with distros)

kindred dagger
#

Oooh, thanks! That looks exactly like what I need

#

smh my head I was looking for "onzombiedeath" but it's "onzombiedead"

bright fog
bronze yoke
#

i'd argue it should be onzombiedie but i don't really like how that sounds

kindred dagger
#

Yeah. I still remember struggling with strawberry code once, because for some reason it's strewberrie

bright fog
#

That sounds way more natural

kindred dagger
#

hueh

full bane
#

i'm tryna add an item:

        StaticModel = Kitty,
        WorldStaticModel = Kitty,
        Icon = Kitty,
    model Kitty {
        mesh = Kitty,
        texture = Kitty,
        scale = 0.019,
    }
#

but it wont load the model

kindred dagger
#

Alright, OnZombieDead works like a charm

full bane
#

i mean something happened

tranquil kindle
kindred dagger
#

Although I'm a bit confused now. Items are added to a zombie's inventory after they die?

full bane
#

in the log it says "Failed to load asset, asset path: ..."

#

do I have to put the full path?

#

do i have to restart my game every time i make a change

tranquil kindle
#

For models failing to load, most likely

full bane
#

i think i got it to laod

#

load

#

nothings showing up now though

bright fog
bright fog
tranquil kindle
# full bane

I see you have scale thing in model txt. It might be either Small or huge that it does not show up

bright fog
#

Bcs that might clash with another mod calling their model or item "Kitty"

full bane
kindred dagger
bright fog
kindred dagger
#

Since (outside of mods like brita's) I believe all firearms are visible on zombies?

full bane
#

i'm probably gonna delete this after I just wanna get a model loaded

tranquil kindle
#

You have no errors with failed to load?

bright fog
tranquil kindle
#

When you right click and place, does it show mesh with random texture?

full bane
#

nope

bright fog
#

It could be extremely small

kindred dagger
bright fog
#

I meant created just before

bright fog
full bane
#

yeah nah still nothing, ill try 0.0000001

kindred dagger
full bane
#

do i need to restard the game every time i change something

bright fog
#

So when you received OnZombieDead, the loot is already created in the zombie

kindred dagger
kindred dagger
bronze yoke
#

only visible items on the zombie are added as loot at that stage

tranquil kindle
bright fog
bronze yoke
#

after

bright fog
#

Wasn't sure

full bane
#

its still not showing up by the way

bright fog
bronze yoke
#

random items on a zombie corpse only appear when a player has entered looting range of the corpse (so usually immediately after it becomes a corpse, unless they're using a gun)

kindred dagger
#

Well in any case I got my function to work and I'm too scared to break something by playing around with it so I'll keep it like this

full bane
tranquil kindle
#

I found that if you have models in custom modules it can cause issues, so usually have custom module with import base and there I keep item scripts, but models are module Base and separate file.

full bane
#

yeah nah still not working

tranquil kindle
#

Did you rename your model and texture from Item_kitty to just kitty and checked if it's same as in model.txt

kindred dagger
#

Another question if you don't mind. What governs the durability on items found in containers? I'd like to simulate it for my own item so it's not always 100% when found.

full bane
#

the texture 100% loads

#

nevermind it might not

#

nevermind it does

tranquil kindle
#

Why do you have static=true there? It's not needed

#

Now show items.txt again

full bane
#

dont ask why its food, i was messing around

full bane
#

is my situation hopeless

round notch
#

Anyone know if PZ has lua profilers. I want to see if my mod has performance improvements but its hard to tell without one zombie

tranquil kindle
#

Are you sure your model file is not empty?

full bane
#

ty ty :D

tranquil kindle
#

As it actually contains model

full bane
#

i got a low poly model if it matters

tranquil kindle
#

Does it have single material?

bright fog
#

Shouldn't matter tbf

#

I mean there's not a lot of chances that breaks it besides it not having the right texture I guess

tranquil kindle
#

It can't have more than one material

#

For some reasons

#

Shouldn't matter, yes. Does it matter in PZ case? Also yes

shy silo
#

why do I keep getting this error

#

I used to play with my twin sis like year and half ago, 330 mods no problems
suddendly i cant launch the game even after just adding car mods

#

which is barely anything

bright fog
full bane
#

i just downloaded it

#

it only has one texture if thats what you mean

tranquil kindle
#

Can you send it to me?

tranquil kindle
#

Its Huge

#

I think even with your 0.19 scale you had it would still be way bigger and would simply be out of screen

#

Try with this one.

#

Once you download it let me know, ill delete it

full bane
#

done

#

yoooo it worked

#

tyty

#

now the texture just needs to go on

tranquil kindle
#

Mean that texture pathway is wrong

#

check for typos in texture

full bane
#

its right

#

I know because I chose the same png for the icon

#

and if i comment out the mesh it loads the texture as a big box

tranquil kindle
#

IF it can't find mesh/load model it will show ICON instead

#

Here you have mesh, but do not have texture

#

If you were to not have both, it would cause the item to show icon when on ground

full bane
#

I am using the same texture as an icon

#

actually maybe

#

wait hang on

#

commented out the icon now it gives me error -2 in the corner

#

when i drop it

#

says ...:getTex() is null

tranquil kindle
#

Why would you do that?

#

I told you that your pathing to texture is most likely wrong

full bane
#

the icon file was just the texture file

#

i thought maybe it was having trouble opening the file while it was already opened somewhere else

tranquil kindle
#

again, show me your model.txt and folder in which you have said texture

full bane
#

minus the static

tranquil kindle
full bane
#

I thought you needed the item bit at the start, hang on

#

yeah nah still broken

tranquil kindle
#

You only need it for icons

#

Restart Game

full bane
#

still broken

#

omg

#

i got it to work

#

for some reason adding the icon back fixes it

tranquil kindle
#

As uncommenting icon?

full bane
full bane
tranquil kindle
#

IM not sure why you did that in first place

full bane
#

shows up as this

#

but i have both Item_... and without item

#

ah well it works enough

tranquil kindle
#

because you need "Item_yourIconname" and then in script file you just write icon =Youriconname without "Item"

full bane
#

yeah

#

wait so every item needs an icon?

tranquil kindle
#

Yeah

full bane
#

that explains it

#

ty for your help :D

tranquil kindle
#

Try eating that cat now

full bane
#

yeah that works too

#

kinda

tranquil kindle
#

well, thats where origin point for that model is

full bane
#

yeah i saw that

#

ill fiddle with the coords tomorrow, i'm off to bed!

#

ty for your help :D

bright fog
drifting ore
#

Hi all! I have a server with Discord integration configured. Recently the bot just went crazy and started doing unpredictable things. Spam messages, duplicate them, and so on. I found out that the bot's code was written using an outdated library. That's why he behaves this way. I want to rewrite it from scratch, can anyone tell me where the integration code is and if there are ready-made solutions?

lost marsh
lost marsh
ashen mist
#

is it possible to stop specific guns from lighting up an area when shot?

#

or is the light just baked in and unremovable

timid scarab
#

Got a question for anyone with experience using Procedural Distribution
I'm assuming the item number between these two lua files is a one to one, so any numbers higher than the average will have higher chance of spawning when rolled based on; no. of items & weight value

tranquil kindle
timid scarab
#

Just want to make sure I don't start breaking the current loot system so I can keep it in line with vanilla, will keep the weights to a similar value to prevent it being too common

tranquil kindle
#

You can always make your airgun melee, but use gun animations? Unless that light up is maybe tied to animation itself?

timid scarab
#

Also a version of the mod that uses foraged stones you can throw to attract zombies via noise would be a pretty dope one to have if it's possible

#

nvm it's already a mod

surreal canyon
#

Does anyone have a snippet of code for a debug print helper to print out table data?

ancient grail
ancient grail
frosty estuary
#

How can I get the coord of a vehicle drivers side tire ? like the square coor where is part of the car it is..., can someone helpme with that ?

topaz tangle
full bane
nimble badger
full bane
#

love him and eat him

topaz tangle
full bane
#

how can I add things to the graffiti you do on walls?

mighty delta
#

i dont think u can'

full bane
#

shame

next shell
#

Is it possible for normal players (by my choosing) to have a custom tag in front of their name?
So that something like this could say "Booster, donator, ruby, golden, etc"

grizzled fulcrum
#

I don't believe so (using the same method as the vanilla game does) as it seems to be hardcoded in Java

#

You could do it in Lua via a UI element but that would require some effort

tranquil kindle
timid scarab
bright fog
kindred dagger
#

How would you remove the magazine type of an existing weapon (so it has an internal magazine, basically)? I know how to edit that sort of stuff with ScriptManager but not remove it entirely

kindred dagger
#

Well, if anyone knows how to use DoParam (or something else) to remove item parameters I'm all ears. Can't figure it out.

full phoenix
#

Is there anyone here that I can hire for a commission for a simple Helmet cosmetic and make available for any starting character?

sour island
full phoenix
sour island
night iron
#

Is it possible to disable / override vanilla or other mod recipes and items?

bronze yoke
#

yeah, just redefine them in your script

#

if it's from another mod make sure your file is alphabetically later than the original definition file

night iron
#

hummm so how does the override occur is it by it's name? or file name? and if instead of override if i wanted to completly supress it?

bronze yoke
#

by its object name

#

you can override files too with the usual rules (multiple mods have a file with the same filepath = only the file from the mod latest in the load order runs)

#

if you want to remove it entirely some script objects (afaik all the ones that it would be useful for) have an obsolete = true, property

#

otherwise you can fall back on overriding the file

#

i do recommend avoiding file overrides since load order isn't something people usually have much control over

night iron
#

kk thanks for the info @bronze yoke

bright fog
#

Just need a way to identify the recipe, either by knowing its name, or possibly automatically if you manage to find a way to do that

chrome veldt
bronze yoke
#

event means it uses an fmod event rather than linking directly to a sound file

#

so when you ask how it's mapped to the actual file, well it probably isn't, i don't think fmod events use sounds from outside of the banks

#

many of the loose sound files are old and now unused

night iron
bright fog
#

๐Ÿ‘Œ

bright fog
night iron
#

yeh i know on the other end i leave it moddable ๐Ÿคท

chrome veldt
#

hmm I see. Thanks for your answer
Is there a guide of some sort regarding sounds? the modding guide on github does not expand on the matter

bronze yoke
#

instead of using event use file = media/sound/whatever.wav

night iron
#

does the mod load order influence recipe / item override or only file name alphabetic order?

bronze yoke
#

only file name

night iron
#

hummm that is a problem then

bronze yoke
#

there is a lot of misinformation about load order, literally all it does is resolve file name conflicts

night iron
#

hummmmmm

bronze yoke
#

it doesn't actually in any situation change the order in which anything loads ๐Ÿ˜“

night iron
#

i understand i might actualy switch to the code override instead then

chrome veldt
#

Thanks albion, I'll try that

chrome veldt
#

Also, I have this issue I have trouble wrapping my head around, it feels simple but somehow I have a weird thing going on
I'm trying to register and update specific cells, the active cells with player inside. But everytime I call player:getCurrentSquare():getCell(), the same cell is returned, even when I drive far away and I'm not sure why

Here is what I do, am I doing it wrong?

RegisteredCells = {}

-- given the players in the game, get the cells they are in (MP and SP)
local getPlayersCells = function()
    local players = getOnlinePlayers()
    if (players == nil) then
        players = ArrayList.new()
        players:add(getPlayer())
    end
    if (players == nil) then
        return {}
    end
    local cells = {}
    for i=0, players:size() - 1 do
        local player = players:get(i)
        local playerSquare = player:getCurrentSquare()
        if (playerSquare == nil) then
            return {}
        end
        local cell = playerSquare:getCell()
        if (cell == nil) then
            return {}
        end
        table.insert(cells, cell)
    end
    return cells
end

-- register a cell to be updated
local registerCell = function(cell)
    local cellHash = tostring(cell)
    print("registering cell "..tostring(cellHash))
    if (cell == nil or cellHash == nil) then
        print("cell is nil")
        return
    end
    if (RegisteredCells[cellHash] ~= nil) then
        print("cell already registered")
        return
    end
    table.insert(
        RegisteredCells,
        cellHash
    )
    print("Cellhash "..tostring(cellHash).." registered")
end

local refreshPlayersCells = function()
    local cells = getPlayersCells()
    for i=1, #cells do
        registerCell(cells[i])
    end
end

Events.EveryTenMinutes.Add(refreshPlayersCells)

I also saw there was chunks, but not sure how they work or what they are precisely

bronze yoke
#

there is only one cell

#

IsoCell has nothing to do with the 300x300 areas in maps also called cells, those have little relevance at runtime

#

IsoCell is an object that stores the entire currently loaded area

chrome veldt
#

Damn, I got this fully sideways. Thanks for the info.
Then, could chunks be what I'm looking for?
Given my idea might not be performance friendly, I'm trying to limit the affected area to what player can see, 300x300 felt like it was convenient (when I thought they were isoCell) but I could do smaller

bronze yoke
#

chunks are 10x10 areas, they're the units the game actually saves/loads in

#

(so a chunk will never be partially loaded, it's either loaded or it isn't)

chrome veldt
#

So I could get the chunks around players in a 5 chunk radius or something

night iron
#

humm not having any luck with disabling recipes by their name... unless i also use the same file name but this requires me to include all recipes not just the ones i want to disable.... tried scripts/zexclude_recipes.txt and scripts/zexclude_recipes.txt

#
module Base {
    imports { Base }

    recipe Make Stone Axe {
        IsHidden:true
    }
(...)
}
#

but if i name the file scripts/recipes.txt then it disables those recipes but unless i include all the other orinal ones it also removes those :/

bronze yoke
#

ohh for recipes you need to use Override:true actually

#

i forgot, multiple recipes with the same name is valid

#

if you want to override a vanilla recipe with multiple definitions like that you need to use lua because they did not think that out at all

night iron
#

kk i'll try that then

#

Worked like a charm thanks @bronze yoke

#

btw what is that import for?i did see it on someone else's mod and hoped that would fixe my issue but now i'm a bit confused what use is that import for

bronze yoke
#

it doesn't do anything

#

all imports do is let you reference objects from that module by their short type, you can already do that for same module objects so it doesn't do anything

#

i think people do this because there's a common error message "WARNING: module <module name> may have forgot to import module Base", which often says Base forgot to import Base, because they literally wrote the error wrong

night iron
#

๐Ÿ‘

bronze yoke
#

it shows up when a recipe references an item from another module without importing it, but instead of saying 'module <recipe module> may have forgot to import module <item module>', it says 'module <item module> may have forgot to import module Base'

#

so the information the error gives you is quite literally always wrong

night iron
#

i see, thanks for the explanation

modern hamlet
#

Hello frens ๐Ÿ™‚
I've been working on a mod (I think it should be simple, but who knows) all it is, is a piece of furniture (like a vending machine) there's no inventory or anything special about it, i've just been trying to get it to work while getting my feet wet in modding, but i've been on it for two days, and have good portions complete and working-ish, but i would love some help if anyone would be willing to msg me ๐Ÿ™‚

outer crypt
#

If a mod changes a base item, for instance Base.Money is there a way to tell that it is not the original one and which mod it came from?

bronze yoke
#

item:getModID()

outer crypt
#

oh, that's genius. Thank you, Albion. ๐Ÿ™‚

#

You always know the best checks

grizzled fulcrum
bronze yoke
#

just script overwrites

#

if you wanted to catch doparams you'd have to patch the function

ancient grail
#

i know we are not suppose to delete lua files when updating a mod
but can we delete other files? like animsets ?

bronze yoke
#

only scripts and lua are checksummed so only they will break servers if deleted

#

however leaving other kinds of files could cause unintended behaviour in some cases, animsets seem likely to

outer crypt
bronze yoke
#

i don't think i see where that's defined

outer crypt
#

Class WorldDictionary

bronze yoke
#

that isn't exposed

outer crypt
#

ah okay

#

thank you ๐Ÿ™‚

ancient grail
bronze yoke
#

probably yeah

night iron
#

anyone here knows where the dig grave action is defined? i found the shovel ground timed action but this one only seems to be used to fill sacks with dirt, sand and gravel, and i am able to find similar timed actions for filling graves, bury bodies and empty graves, but the actual grave digging is elluding me so far

#

hummm could it be this? ISEmptyGraves:new ?

ancient grail
#

client/TimedActions/ISBuryCorpse.lua

#

maybe

#

server/BuildingObjects/ISEmptyGraves.lua

client/TimedActions/ISFillGrave.lua

night iron
#

i think i found it... it doesn't have a specific timed action instead it uses the generic one

#

lua\client\Tests\TimedActionsTests.lua

#
Tests.dig_grave = {
    run = function(self)
        local square,x,y,z = getSquareDelta(2, 2, 0)
        local square2,x2,y2,z2 = getSquareDelta(1, 2, 0)
        removeAllButFloor(square)
        removeAllButFloor(square2)
        square:getFloor():setSprite(getSprite("blends_natural_01_21"))
        square2:getFloor():setSprite(getSprite("blends_natural_01_21"))
        local item = newPrimaryItem("Base.Shovel")
        local bo = ISEmptyGraves:new("location_community_cemetary_01_33", "location_community_cemetary_01_32", "location_community_cemetary_01_34", "location_community_cemetary_01_35", item)
        bo.player = PLAYER_NUM
        bo.build = true
        bo.canBeBuild = bo:isValid(square, bo.north)
        bo:tryBuild(x, y, z)
    end
}```
#

my idea is to have any action involving my new improvised tools to have a large chance to break it... i wonder if i can find a central place where i could do this check only once :/. so far i have been placing the check on individual recipes and timed actions

#

this is promising:

function ISShovelGround:perform()
    (...)
    ISBaseTimedAction.perform(self);
end
night iron
#

guess i could check the characters equiped items on this one: ISTimedActionQueue:onCompleted :/

#

i wonder if crafting recipes are considered timed actions

ancient grail
#

i dont think so but that im also not sure

ancient grail
tranquil kindle
#

Has anyone ever tried using, "Fixing" scripts for items diffrent than weapons?

bronze yoke
#

vehicle parts are repaired with fixing too

#

so it should work for any item

tranquil kindle
#

I completly forgot about vehicle parts. Maybe because i haven't really touched vehicles yet. I need to check how does it work with clothing if it even does anything. For things like Bulletproof vests and such tailoring system isn't the best, unless there is a way to add more than 3 base "Fabric Type" so maybe Fixers would be better.

grim cedar
night iron
ancient grail
night iron
# ancient grail what are you trying to do anyways?

as i've explained earlier today i'm making a mod that allows you to craft improvised tools but these are very flimsy (really low condtion) and now i wnat them to have a high chance of breaking whenever they are used

#

since there isnt any onUse sort of trigger that i know related to items i need to find a place common to all usages of said tools and trigger a chance to brea them there

ancient grail
#

i think you can just hook on the perform

#

and just manually add damage to it

or just make the usedelta set to 0.5 or something

#

that way it will break after used twice

ancient grail
night iron
#

yes, based on vanilla ones but with new names and defenitions

#

eg:

module Base {
    item ImprovisedSaw {
        ConditionLowerChanceOneIn=1,
        ConditionMax=2,
        DisplayCategory=Improvised,
        DisplayName=Improvised Saw,
        Icon=Hacksaw,
        MetalValue=35,
        StaticModel=Hacksaw,
        SurvivalGear=TRUE,
        Tags=Saw,
        Type=Normal,
        Weight=0.7,
        WorldStaticModel=HacksawGround
    }
}
#

and the recipe to create it is:

module Base {
    recipe Improvise Saw {
        TreeBranch/MetalBar=1,
        Twine=1,

        Result:ImprovisedSaw,
        Time:5000,
        Sound:PutItemInBag,
        Category:Improvised Tools,
        OnCreate:ImprovisedTools.recipes.OnCreateTool,
        OnGiveXP:ImprovisedTools.recipes.OnGiveEXPImprovise
    }
}
#

i have some bespoke creation code which records what materials were used to create it, among other things, to later on be potentially recovered through a salvage recipe

night iron
#

actually after some more in depth testing it seems like this ISTimedActionQueue:onCompleted is def being triggered by all actions including dig graves (ISBuildAction) as well as the shovel ground and any crafting action... so i think i'm going to try to patch it and see if i can find a way to affect any of my new improvised tools used in the action

craggy delta
#

is it common to not namespace a module? I kind of figured Base was for the core game and we should name our mods something else

night iron
#

btw is it possible to have a recipe auto equip a tool on a character?

bright fog
#

Oh I see what you're trying to do, like equip a tool that is used in the craft ?

#

I think so, something to do with prop

bronze yoke
small topaz
# craggy delta is it common to not namespace a module? I kind of figured `Base` was for the cor...

when using "Base.something" for your new items, you should ensure to give the "something" a very unique name (ideally containg your mod's name or a unique shorthand for it). With a generic name like "Base.LongShirt" you may run into the problem that another mod uses the same name for one of its items and you get mod compatibility issues.

But as long as you use very unique naming conventions with "Base." it should be somehow ok. (At least I hope so...)

bronze yoke
#

but why do that?

#

there is at least one case where you're forced to use base but aside from that, the game provides modules as a solution to this problem

small topaz
bronze yoke
#

i have no idea how true that is as it doesn't point to any specific reason or source

#

i can imagine reasons why it might run ever so slightly slower but i can't think of a reason it'd be something worth thinking about

digital basin
#

Is it possible to add another section to the F1 Help menu Would like to add Car Claim Info aswell as Safehouse Claim Info?

small topaz
topaz tangle
#

Hey would anyone know how to fix this issue with damage textures?
I know I fixed it in the past but I canโ€™t remember how

small topaz
craggy delta
#

I feel like the lua is pretty straight forward. the guide I am still looking for is modeling. every game I mod I fall short because I have not fancy graphics.

grizzled fulcrum
grizzled fulcrum
#

Hi, I've just got a Project Zomboid poll here. I want to know what people want the most in the game. And no it's not a scam link or anything like that, I am not a bot lol
https://www.surveymonkey.com/r/NXSP3KR

THIS IS NOT SPAM I just wanted to post it in two channels for various reasons
Nor am I employed by TIS, I am a modder!!!

gloomy temple
#

is there something im doing wrong with putting on the vinyl covers for the true music mod on solo? it keeps showing me the generic ones.

peak nymph
#

hi all, not touched a mod I made in ages, downloaded from the steam workshop and when i tried to host a server with it it kept aborting the launch, and in the logs was saying it was downloading mod 0/0 and it was failing to download. I copied the contents over to my C:/users/name/zomboid/mods folder and it works fine, just wondering if anything had changed on how to upload a mod to steam, and if not is there a guide anywhere in case I did something wrong

night iron
#

Morning yall, is it safe to assume the global getPlayer() always returns the active player? specially in scripts under the client folder?

bronze yoke
#

it returns the latest added player local to the process calling it

#

so if you're not playing splitscreen yeah

night iron
#

hummmm

#

I mean that means it's not reliable guess i'll check if all actions handled by ISTimedActionQueue.onCompleted have the player property and use that instead

#

which seems to be the case to all 3 actions i'm curently focusing one, ISBuildAction, ISShovelAction and ISCraftAction

small topaz
bronze yoke
#

i don't really get what you want to happen there, who is the 'actual player' in splitscreen?

peak nymph
# ancient grail what version?

Iโ€™m not sure but I posted it 312 days ago, is there a more up to date guide on uploading it to the workshop, cause planning on reworking the mod anyway, so will reupload when that bit is done

night iron
#

i mean when you publish it from the ingame workshop menu

#

also this should be on the mod.info file at the top of your mod file structure right?

small topaz
# bronze yoke i don't really get what you want to happen there, who is the 'actual player' in ...

Ok... so I am not 100% sure how split screen works in general so I don't know whether my question makes sense at all.

But if 2 people playing split screen, isn't it the case that each of them has their own client code? If not, how is the UI for each of the player managed?

For example, doesn't each player get their own health screen or their own inventory window?

(I never played split screen and therefore don't know how it looks like. But I know that at least one of my mod doesn't work in split screen...)

bronze yoke
#

yes but they aren't separate lua environments, there's just multiple ui objects

night iron
#

maybe it's on the workshop.txt instead i cant recall

bronze yoke
#

writing for splitscreen generally comes down to *not* using getPlayer() or any equivalent as it's generally unnecessary and makes your code weird

night iron
#

ok so i was hoping adding the prop1 and pop2 to my recipes would automagically make the game equip which ever items are used in the recipe unto the characters primary and secondary slots but such is not happening so is there anything else i need to do on the recipe for this to happen or does the actual prop1 and prop2 equip have to handled on a recipe by recipe basis through lua events?

#

as reference this the recipe i'm trying this on:

module Base {
    recipe Salvage Improvised Tool {
        keep [Recipe.GetItemTypes.Scissors]/[Recipe.GetItemTypes.SharpKnife],
        ImprovisedAxe/ImprovisedHammer/ImprovisedKnife/ImprovisedNeedle/ImprovisedPickaxe/ImprovisedSaw/ImprovisedScissors/ImprovisedShovel/ImprovisedSledgehammer/ImprovisedTongs/=1,

        Result:UnusableWood,
        RemoveResultItem:true,
        AllowDestroyedItem:true,
        Time:120,
        Sound:PutItemInBag,
        Category:Improvised Tools,
        OnTest:ImprovisedTools.recipes.OnTestIsImprovised,
        OnCreate:ImprovisedTools.recipes.OnCreateSalvage,
        OnGiveXP:ImprovisedTools.recipes.OnGiveEXPSalvage,
        Prop1:Source=1,
        Prop2:Source=2
    }
}
bronze yoke
small topaz
night iron
#

It looks like from going through the ISCraftAction code that props are only used for animation purposes :/

main ridge
#

hey maybe soomone have or know mod that could make logs with actual date / time / weather on server in to logs ? so i can make bot for discord that will show it on channel?

craggy delta
craggy delta
#

I assume your OnCreateSalvage is custom. somewhere in that function you need something like

    if not player:getPrimaryHandItem() then
        player:setPrimaryHandItem(result);
    end
    player:setSecondaryHandItem(result);
end```
this checks if the player has something in there primary hand, if not equip.. otherwise equip to the secondary hand
night iron
#

OnCreate is invoked after the crafting action is completed i'm trying to force the props to be on the character hands while crafting

#

so at the moment i'm trying to pull it off by patching ISCraftAction:start

#

but i'm struggling to manage to figure out how to reference what items are actualy being used by the recipe

#

playing with RecipeManager.getAvailableItemsNeeded right now...

sour island
night iron
sour island
#

You want the items being used in the recipe to appear in-hand during the crafting?

craggy delta
night iron
#

no I'm trying to force any prop item used on the recipe to be equiped during the crafting process so that i can check if any of those equiped items is one of my improvised tools so that when they are i can roll to break them

sour island
sour island
night iron
#

only the ones i introduced with my mod but yeh that's about it

sour island
#

There's another param called OnCanPerform

#

Either this, or OnTest should fire every tick during the recipe

#

I forget which

night iron
#

onTest is used to build contextual menus

#

OnCanPerform i havent played with yet i may have a go at it

sour island
#

๐Ÿ‘ I just remember one fires every update() tick for the crafting

#

You could probably break your tools in there - and abort the crafting

night iron
#

nah i wana do it at the end but in any case it could be a good place to keep any used improvised tool equiped

#

so that at the end i can get any primary and secondary equiped tool and check if those are improvised and if so then roll to break them

sour island
#

Looking at the java - seems like canperform is only checked once - but no harm in testing it yourself

sour island
night iron
#

still trying to solve the "what items are currently being used in the recipe" problem though

sour island
#
-- When creating item in result box of crafting panel.
function Recipe.OnCreate.TorchBatteryRemoval(items, result, player)
    for i=0, items:size()-1 do
        local item = items:get(i)
        -- we found the battery, we change his used delta according to the battery
        if item:getType() == "Torch" or item:getType() == "HandTorch" or item:getType() == "Rubberducky2" then
            result:setUsedDelta(item:getUsedDelta());
            -- then we empty the torch used delta (his energy)
            item:setUsedDelta(0);
        end
    end
end
#

The items param is an array

#

The order is the order in the recipe

#

so [1] and [2] would be your tools being used

night iron
#

again that's after the recipe completes

sour island
#

You just said after?

night iron
#

i want test after but i want to equip any keep indient of type improvised before

#

so unless the canperform event also receives the same items array i will keep persuing my current investigation using RecipeManager.getSourceItemsNeeded

sour island
#

Not really sure what you're asking for. You want to roll for breaks after, but what does "equip before" mean?

craggy delta
#

just use a function for the items

#

look at recipe Create Spear

#

you can create a function that declares what items it will use for the recipe

#

then use the function I mentioned early to only allow the items you want to allow

night iron
#

ok to recap, i want to when starting the crafting session look at the keep sources and check if it is using an improvised tool, one of my new items, if so i want it to be equiped while crafting. Then when it finishes i want to roll for a chance to break it

#

caviat: I want this to be applied on any recipe not just my mod recipes

craggy delta
#

'any recipe' will probably be higher in the code. not sure if that is lua exposed.

you can still use a function to check what you have in hand and only allow items if you are holding a specific item.

you can use Tags on items to tag each of your created items, then check if holding an item with that tag.

but this all still relies on changing each recipe you want to affect.

night iron
#

I know about tags already, which i'm in the process of implementing to my new tools already, giving them a new tag called "Improvised"

craggy delta
#

you should namespace your tags

night iron
#

as for the onTest i would rather not since that will hide the recipe away from the context menu making it hard to know why it can't be built

craggy delta
#

to reduce conflicts with other mods

sour island
night iron
#

in any case i'm very close to want to achieve by patching ISCraftAction:start combined with RecipeManager.getSourceItemsNeeded

craggy delta
#

in vanilla it still requires the item equipped. I think cutting leather stips requires scissors

#

but that still hides the recipe, obscuring it

night iron
#

in fact right now i'm already able to check wich keep source is curently being used in any recipe, so i guess my next step is cross reference this with the prop1 and prop2 and when these match force the item to be on the character hands

#

for as far as i could tell prop1 and prop2 is really only a visual animation thing it never actualy equips the items

sour island
#
function ISCraftAction:getPropItemOrModel(propStr)
    if not propStr then return nil end
    if propStr == "" then return nil end
    if not propStr:contains("Source=") then return propStr end
    local sourceIndex = tonumber(propStr:sub(propStr:find("=") + 1))
    if not sourceIndex or (sourceIndex < 1) or (sourceIndex > self.recipe:getSource():size()) then return nil end
    local items = RecipeManager.getSourceItemsNeeded(self.recipe, sourceIndex - 1, self.character, self.containers, self.item, nil, nil)
    if items:isEmpty() then return nil end
    -- It would be best to use the item instead of the model, so any blood/etc appears as expected.
    -- But things like flashlights have animation masks which break the "Dismantle Flashlight" animation, for example.
    -- So return the model name instead of the item.  Returning the item does work, though.
    return items:get(0):getStaticModel()
end

There's this under craft action

#

But you mentioned start() already

#

Could just dump the vanilla start event in favor of your own - but it could create problems with other mods doing safer overwrites

#

Out of curiosity - why does it matter to equip the item?

craggy delta
sour island
#

I don't think the items are already equipped

#

He wants them to be

night iron
#

exactly

#

i am patching start but i am only intercepting it to do my code and then continue on with the original implementation

#

not actually replacing it

tranquil kindle
#

Can't you get "onCreate" that would get items you made it with, take its tools and give zombRand to decrease condition?

night iron
#

Nik i have already answered this, onCreate happens after the recipe is done, i want to equip the items before the recipe completes

tranquil kindle
#

I know what you mean, but is that really necesarry if prop 1 and 2 can display items used with recipe?

night iron
#

but guys thank you a bunch for the discussions if nothing else it was an awesome rubber ducking session but i'm very close to what i want just need to nail down a few details

tranquil kindle
#

And you want the tools to lose condition and i don't think its needed for them to be "equiped"

night iron
#

it's hard to tell which of the items i want to decrease the condition from unless i cross reference it with the props, for example my salvage recipe both sources can have improved tools but only one of them is used as an actual 'tool'

small topaz
# night iron ok to recap, i want to when starting the crafting session look at the keep sourc...

Have you already tried to equip your improvised item when the vanilla function ISInventoryPaneContextMenu.OnCraft is called? That is actually the first function which is called when player chooses to craft smth from the inventory menu (right click on an ingredient -> craft recipe). This function is also the function which then calls the ISCraftAction TimedAction. Equipping stuff in your hand is in vanilla game in most cases also realized by a timed action.

night iron
#

thats a good point I'll have a go at it after i'm done with my current experiement

small topaz
night iron
#

i'll take a look at it later thanks @small topaz

#

nailed it ๐Ÿ˜„

#

my initial strategy paid of and i was able to equip the recipes prop1 at the ISCraftAction:start

#
local function getUsedSources(recipe, character, containers, item)
    local sources = recipe:getSource();
    local sourcesCount = sources:size();
    local usedSources = {};

    for i = 0, sourcesCount - 1 do
        local source = sources:get(i);
        local isKeep = source:isKeep();
        local items = RecipeManager.getSourceItemsNeeded(recipe, i, character, containers, item, nil, nil);

        usedSources[i] ={
            sourceID = i,
            items = items,
            isKeep = isKeep
        }
    end

    return usedSources;
end
#
local function getPropItem(usedSources, prop)
    local getTableSize = ExtendableItemInventoryUtils.getTableSize;

    if prop:contains('Source=') then
        local sourceIndex = tonumber(prop:sub(prop:find('=') + 1)) - 1;
        local source = usedSources[sourceIndex];

        return source.items:get(0)
    else
        local sourcesCount = getTableSize(usedSources);

        for i = 0, sourcesCount do
            local source = usedSources[i];
            local items = source.items;
            local itemsCount = items.count;

            for j = 0, itemsCount do
                local item = items[j];
                local name = item:getName();

                if name == prop then return item; end
            end
        end
    end

    return nil;
end
#
local originalISCraftActionStart = ISCraftAction.start;

function ImprovisedTools.overrides.ISCraftAction:start()
    local sources = getUsedSources(self.recipe, self.character, self.containers, self.item);

    local prop1 = self.recipe:getProp1();

    if prop1 then
        local item = getPropItem(sources, prop1);

        if item then self.character:setPrimaryHandItem(item); end
    end

    originalISCraftActionStart(self);
end
bright fog
night iron
#

it wont actualy equip the item as far as i could tell only animate with the model in it's hands @bright fog

bright fog
#

ah yeah

night iron
#

now i just need to unequip any currently equiped item first so I dont delete it he he he

bright fog
#

It won't delete the currently equiped item

night iron
#

oh yeh your right just needed to update my inventory it wasn't showing there, probebly need to mark it as dirty

bright fog
#

Throw a container update after modifying the inventory

night iron
#

humm how do i do that again?

bright fog
#

triggerEvent("OnContainerUpdate")

night iron
#

cool let me try that, but shouldn't i also mark the container inventory as dirty?

night iron
#

there is a dirty property for the inventory panels

#

typically to mark it as in need to be redrawn

bright fog
#

uh

#

Never heard about that and never needed it

night iron
#

ISInventoryPane:renderdetails

bright fog
#

Just whenever you add or remove items, throw a OnContainerUpdate bcs if the player doesn't move it doesn't update the containers and thus he can actually still move/pick up items that were moved

night iron
#
   if doDragged == false then
        table.wipe(self.items)

        if self.inventory:isDrawDirty() then
            self:refreshContainer()
        end
    end```
bright fog
#

Never used it, never had any problems for now

night iron
#

i did mess with this code let's see how it goes he he he

#

yep that worked like a charm thanks @bright fog

bright fog
#

๐Ÿ‘Œ

kindred dagger
#

Is it possible to check the module of an item and use it as a condition?

#

Like "base" or "farming", etc

night iron
#

try item:getFullType()

bronze yoke
#

item:getModule()

kindred dagger
#

It's that simple? O_o

night iron
#

๐Ÿคท i'm just guessing to be honest

kindred dagger
#

Doesn't hurt to try

night iron
#

and apparently there is a better way lol

#

thanks @bronze yoke

kindred dagger
night iron
#

albion just gave you a better answer i think @kindred dagger

night iron
#

hummm there isn't anything equivalent to AllowDestroyedItem just for a specific recipe source is there?

bronze yoke
#

the best equivalent is enabling it and then filtering out the other items with an ontest

night iron
#

i am a bit lost about onTest item argument though, is this invoked for every possible item available for each source in the recipe or is the item the focused item to which the system checks which recipes apply to it?

bronze yoke
#

every possible item availabe for each source, assuming it hasn't already been filtered by something else

night iron
#

hummm so what happens if the same item matches 2 sources but for one is fine to be broken but for the one is not?

#

and is there a way of knowing to wich source the ontest is being triggered to?

bronze yoke
#

it'll fire twice (all sources are evalulated completely independently, which means there is no duplicate prevention, one item can fulfill any amount of sources), and i guess there isn't really a way of distinguishing it

night iron
#

hummm is it done on the squence as they declared on the recipe though?

#

nvm this wouldnt work if i have multiples of this item right?

topaz tangle
#

Question: where would be an acceptable place to link the mod Iโ€™ve just finished re-working?

topaz tangle
#

Oh sweet!!

grave rapids
#

Hi, did you find a solution for this? I'm trying to get the closest zombie to the player but like you said those methods don't seem to work ๐Ÿ˜•

finite owl
#

(That runs on the client side, BTW)

grave rapids
modern hamlet
#

does anyone know what i need to do to change the icon of a placed container?

topaz tangle
bold pawn
#

Hi,
I am looking for a PNG in my files. I have searched everywhere without success, even though a path is indicated in my file. But it leads nowhere. If anyone has a solution, I would appreciate it.

It is the image of Spiffo in the survival guide. In my SurvivalGuide_FR, a line indicates the path to this PNG:

SurvivalGuide_entrie1txt = " <CENTER> "SIZE:large #1 - STAY CALM <LINE> IMAGECENTER:**media/ui/spiffo/control_yourself.png**<LINE> SIZE:medium You won't last long if you don't take some deep breaths and learn the basics."

"media/ui/spiffo/control_yourself.png"
Unable to find this PNG in my server files

bronze yoke
#

it's probably in the texture packs

#

you can extract them with tilezed

winter bolt
#

yeah it is in texture packs i remember seeing it

winter bolt
#

it should be in ui or ui2 in media\texturepacks

#

then you can export images

bold pawn
#

ok I see I hadn't considered this possibility, I stupidly looked for a .png in my files, but now that you say it it's clearer, I thank you very much, the hope of finishing this damn guide comes back thanks to you two ๐Ÿ’ช๐Ÿค˜

topaz tangle
topaz tangle
#

Hey Iโ€™m having some sort of issue with adding in a new vehicle, it shows up in the list but It wonโ€™t load the model and Iโ€™m not sure why

pale aurora
#

what the clod

topaz tangle
#

Peridot moment!!!!

#

The file is identical to my others too itโ€™s odd

ionic jolt
#

from what ive gathered, table.insert(ProceduralDistributions.list["ShelfGeneric"].items, "item"); table.insert(ProceduralDistributions.list["ShelfGeneric"].items, 1); is the way to make a modded item spawn in the world, in the examples' case, "shelf generic". would the following code work to randomly spawn set items in "ShelfGeneric", without having the copy and paste the line for each item added ```local "MusicSpawn" = MusicSpawn ={
rolls = 2,
items =
{
"CassetteVanHalenUnchained", 5,
"CassetteBornUnderABadSign", 5,
"CassetteTheRooster", 5,
"CassetteLeroyBrown", 5,
},
},

table.insert(ProceduralDistributions.list["ShelfGeneric"].items, "MusicSpawn");
table.insert(ProceduralDistributions.list["ShelfGeneric"].items, 1);```
night iron
#

Evening peeps

bronze yoke
night iron
#

My Improvised Tools mod is nearly ready only got 1 more detail i would like to learn how to do before i push out it's first version.... item inventory icons... what's the process to get my self some bespoke icons in them? i suspect it has something to do with the textures folder and the icon definition icon property but the files i see on the textures folder seems to be used for 3d models

bronze yoke
#

the vanilla ones are in the texture packs, if you want to look at them spongie was showing how to extract them just a couple messages ago

#

though you can just download them from the wiki which is usually easier

#

but basically Icon = MyIcon will set the icon of the item to media/textures/Item_MyIcon.png

night iron
#

ok ok so prefixing them with 'Icon_' does the trick

#

and what are the restrictions on the files? size etc?

bronze yoke
#

they should be 32x32, i think there's some weird issue with specific bit depths or something too...?

night iron
#

kk good to know

#

is transparency ok?

bronze yoke
#

necessary!

#

i mean i'm not sure if it'll reject a non-transparent texture but it'll definitely look very weird if it isn't

night iron
#

Yep got it working using gimp to produce a 32x32 png with transparency, prefixed Item_ to it and bang worked like a charm thanks @bronze yoke

kindred dagger
#

Very stupid question but how do you remove a specific item from an item container? This function doesn't work. I was running it as a test to see if I could get it to empty item containers before adding conditions.

`local function GalloViking_OnFillContainer(roomName, containerType, itemContainer)
local items = itemContainer:getItems()

for i = 0, items:size() -1 do
    local item = items:get(i)
    itemContainer:DoRemoveItem(item);
end

end
Events.OnFillContainer.Add(GalloViking_OnFillContainer)`

The way I see it item here is an inventoryitem, so DoRemoveItem should work?

#

It tells me this line is borked

itemContainer:DoRemoveItem(item);

bronze yoke
#

this is the correct way to remove an item, the mistake is that you're deleting items while looping through it

kindred dagger
#

I'm looping through the items in the container, or at least I think I am. I reused some code I wrote a while back

bronze yoke
#

if you imagine there's two items in the array, then your code:

  • gets item 0
  • removes it
  • array is now length 1
  • gets item 1 - but wait, there is no item 1 because the array is only length 1 now, so an error is thrown
kindred dagger
#

Mhmmmm

bronze yoke
#

you should loop backwards if you want to remove items from an array you're looping over

#

for i = items:size() - 1, 0, -1

kindred dagger
#

Aaaaaah I get it know. The array gets smaller each time so it breaks

#

If I add conditions later that could become a headache

night iron
#

just store the item during the iteration and remove it after it loops out

#

you can also break if you want to stop the iteration once you found the only item you need

kindred dagger
#

I'll remove items at random to replace them with others

#

Wait so actually if I add an item every time I remove one, the array size wouldn't change

night iron
#

you're still messing with the next Item you get of the list, again if you only want to do this once to one item in the list you can either store a reference to it and do the switch after the loop is over or break the iteration once you find the item and act on it. if you want to manipulate the list as you iterate through it i would recomend use 2 lists instead, the original one which you iterate over and a buffer list to which you add items from the original one

bronze yoke
#

alternatively just loop backwards

#

adding/removing items only modifies later parts of the list so looping backwards is safe

craggy delta
#

secondly.. looping backwards moves the count() method

#

first part of a for its the initial, second is the compare, third its increment.

looping forwards inplies you count on each iteration because the count is in the second clause.

looping backwards moves the count to the first clause, executing only at the start of the loop and not on each iteration.

bronze yoke
#

no, the count is only executed once in either case

#

that's why looping forwards over an array while removing from it is an outright error rather than just causing unintended behaviour

#

the list gets shorter but the size was already evaluated at the start of the loop so you go out of range

craggy delta
#

because the control variables are local to the loop. lua is strange. other languages don't do that lol.

#

you see the same issue in other languages but instead of going out of bounds, you end up skipping parts of the array.

bronze yoke
#

yeah that's what i was referencing with unintended behaviour

#

though it's not the standard i've honestly always thought this was the more intuitive implementation

craggy delta
#

standards are not always made because something is intuitive. some times standards are for readability. to help future proof code.

bronze yoke
#

in this case i think it's more readable

#

the loop conditions are visually separated from the loop itself so it's misleading for them to actually be part of it

kindred dagger
#

I'm glad I asked. All of this is rather informative

bronze yoke
#

of course this only fits into lua because its for loops are strictly(*) numeric

craggy delta
#

lua actually specifies there are 2 types.. numeric and generic

bronze yoke
#

yeah you can use an iterator too but they break that syntax entirely anyway

bronze yoke
craggy delta
#

if you make a function that returns an iterator of the items you want instead of the actual items, then you can use a generic for on the second. and your iterator is reuseable else where

#

its because lua has a completely different for structure than other languages lol.

I agree with this being informative. that would have been annoying to stumble upon later.

night iron
#

a bit crude but but i think this will do for now :x

timid scarab
#

Heyo, I want to learn how to start tinkering with the superb survivors mod, does anyone have any tutorials / information regarding where to start with regards to coding / understanding how to alter the current mod?

#

Mainly adding capabilities to give them a bit more flavour when in the base, sitting down / reading / sleeping etc. at certain intervals so they seem a little less robotic

stable marsh
#

Question regarding changing the in-game icon for a modded item with or without ItemTweaker, whichever is most compatible with other mods.
Currently, trying to use ItemTweaker I have the following (with actual names etc. but for example's sake different): ```lua
if getActivatedMods():contains("ItemTweakerAPI") then
require("ItemTweaker_Core");
else return end

TweakItem("ModuleName.ItemNameOne","Icon", "TextureNameOne");
TweakItem("ModuleName.ItemNameTwo","Icon", "TextureNameTwo");

The items I want to change being from another mod, different file location, and the supposed replacement texturefiles being within the mod this `.lua` is in.

This does not seem to work however. Do note, I haven ever worked with ItemTweaker before, nor done trying to change an item's data this kinda way.
ionic jolt
#

do i have to just do it the standard way of adding each object to each container 1 by 1

bronze yoke
stable marsh
bronze yoke
#

item tweaker is not hugely recommended as it's associated with some performance issues and compatibility issues

#

(and it doesn't really do anything so it's hard to recommend in general)

stable marsh
bronze yoke
#
local item = ScriptManager.instance:getItem("Module.Item")
if item then
    item:DoParam("Icon = NewIcon")
end
```is equivalent to a TweakItem call
peak nymph
#

sorry for replying to an old message, but does anyone know where in the code this would be? Im struggling to find it, maybe itโ€™s just me being stupid

Iโ€™m trying to create my own global object (a container) that updated an item inside (and eventually replaces when the updated value gets high enough but thatโ€™s a separate issue)

bronze yoke
#

i don't believe freezers are global objects

ancient grail
bronze yoke
#

they aren't simulated globally, that's why they can be buggy

#

they just simulate all the time since they were loaded when they load

#

that's probably the preferred method for anything using a container really, update it when the player checks the container

#

with freezers/fridges it causes a noticeable bug where it assumes the current power state was true for the entire time you spent away, so for example if you left your base for a week, and came back just a minute after the power goes out, it would assume the power was out for the entire week and all your food would be rotten

peak nymph
#

hmm, would that still be the recommended method then, on player check and update based on current state and time since last update
or is there a better way

#

and do you know of any mod/base game examples of anything similar I can view just to see how it works, as my last attempt worked single player but was incredibly buggy multiplayer

bronze yoke
#

i don't think the game really implements anything like this in lua

peak nymph
#

fair enough, couldnโ€™t find any mods that did anything similar when Iโ€™ve looked either, as a rough guess, do you think this is possible? just before I start going down this rabbit hole again

bronze yoke
#

i don't know exactly what you're doing but what you've described sounds possible

peak nymph
#

long story short I was making a kiln, so functionally you put in a item with the โ€œfirableโ€ tag, a fired property on the item ticks up while the item is in the kiln and the kiln is on, and after it reaches 100 it gets swapped out for a different item (a fired version of whatever was put in)

It basically works the same as cooking, but only for certain items

timid scarab
#

I assume there's code somewhere that checks / allows for certain parametres to be included in certain "types" but I have zero idea where it is or how to go about finding it

kindred dagger
#

Is there any way to automatically calculate the age of an item like the game does when spawning food in containers?

#

Nvm, looks like setAutoAge does exactly that

ancient grail
cold dove
#

Does anyone have a list of the skill codes used in VHS's?

ancient grail
bright fog
ancient grail
#

like boredom?

bright fog
#

He might want to know all the possibilities available

night iron
bright fog
#

Congrats, there's some potential, too bad it uses the terrible crafting system

peak nymph
#

hi all, how do I go about making my new tile consume electricity, I can't see an option when setting the tile definition in tilezed, or is this handled just through the lua? if so does anyone know of an object that I can check the file of, as i'm clearly searching for the wrong thing

night iron
bright fog
#

Not sure what you mean

night iron
#

when you say it uses the terrible crafting system

bright fog
#

Just the current b41 crafting system is the worst shit ever made. It's only benefit is its simplicity but I try to use it as less as possible

#

The B42 crafting system looks good

night iron
#

yeh that's what i meant

#

well who knows when that actualy get's pushed out of the door though

bright fog
#

When b42 releases

night iron
#

exactly who knows when ๐Ÿ˜›

bright fog
#

But yeah I would really see a more modulable system for your mod, which ignores the limited crafting system and allows you to either use context menu or a custom UI where you put the materials to improve your tool in and then craft a modulable item. Tho idk in detail what your mod does or tries to achieve

bright fog
night iron
#

that's a should(tm) right along side soon(tm)

bronze yoke
#

the first half of this year without a doubt

night iron
#

it's just a shortcut to get key tools with very low condition, chance to injure you when constructed/salvaged, and have a chance to give back each of the materials used when salvaged

bright fog
night iron
bright fog
bright fog
night iron
#

a few thousend if i remember correctly or maybe just hundreds

night iron
bronze yoke
#

perhaps a nibirubian year

bright fog
night iron
bright fog
#

Automatically too

night iron
bright fog
#

Like:

  • go through every recipe scripts
  • check the ones with results as tools/weapons
  • verify those are "Improvised" (weapon category)
  • verify the craft doesn't use the same tool in the needed items (repairs for examples ?)
  • access materials used to craft the tool/weapon
night iron
#

then my mod does that

bright fog
night iron
#

if a hammer can use a hard stick, metal bar or pipe to be built and you use a pipe, when salvaging you can get that pipe back

#

i could eventualy extend my mod to also try to guess other items materials.... but that was not my focus this time around

bronze yoke
#

i don't really see why recipes wouldn't be appropriate for this

night iron
#

i mean i could even pull a random item from their recipes cource lists

bright fog
#

Or at least have made new crafts to make the same thing as other crafts

night iron
#

yes, based on the vanilla ones i changed their names and categories

#

and icons

bright fog
#

Such as making your improvised axe when there's already a vanilla one for that

#

Also your crafts are limited to a set of materials

night iron
#

i did but it is my mods version when created it adds data to it

bright fog
#

You can't have:

  • make an axe using metal scraps
  • make an axe using rocks

with the same craft, or the display won't be great anyway

night iron
#

Hummm you lost me @bright fog

#

her's one of my recipes example:

module Darkhounds {
    recipe Improvise Sledgehammer {
        WoodenStick/MetalPipe/MetalBar=1,
        Stone=2,
        LeatherStrips=2,

        Result:ImprovisedSledgehammer,
        Time:5000,
        Sound:PutItemInBag,
        Category:Improvised Tools,
        OnCreate:Darkhounds.ImprovisedTools.recipes.OnCreateTool,
        OnGiveXP:Darkhounds.ImprovisedTools.recipes.OnGiveEXPImprovise,
        Prop1:Source=1,
        Prop2:Source=2
    }
}```
bright fog
#

I think I just don't have the same vision of what your mod was supposed to do

night iron
#

when building this if a MetalBar is used then the resulting Improvised Metal will keep that information

#

when salvaged only a MetalBar can be retrieved not the WoodenStick or MetalPipe

bright fog
#

Yea I really feel like that could have been literally applied to any tool/weapon being created

#

Which is basically what I saw the mod would do, but you absolutely didn't go that way and just made new items, which use your salvage system

night iron
#

i would have to change every recipe even if programatically going through every loaded recipe sure

#

dude this was my first mod i have no idea if doing something like that wouldn't mess up all kinds of stuff

bright fog
#

I mean it's an interesting concept, just I'm thinking if that can be applied to any tool/weapon craft and I feel like it could

night iron
#

i tried to keep it contained

bright fog
night iron
#

if anything i can use it as the foundation to try something bolder

bronze yoke
#

you mean the idea of crafted items being able to be scrapped into their ingredients? yeah that's pretty universal but it's obviously just one part of what this mod is

bright fog
#

Mostly me thinking about the technical aspects being it

night iron
#

hell i already went out of my way rewriting the entire item inventory to make it more moddable

#

and i did tweek it so any recipe containing a prop1 and/or prop2 to force those to be actually equipped

bright fog
night iron
#

though the item inventory reqwrite mod is not mandatory for this one

bright fog
#

And add such a function OnCreate for any weapon/tool craft

bright fog
night iron
#

i can see that happening for sure, again i just ddidn't feel confident enough to to do it as my first mod

bright fog
#

Of course

#

The system I'm thinking of would actually be quite technical I feel like

night iron
#

yeh man you guys (and galls) have been invaluable! thanks a million!

bronze yoke
#

it'd be simpler to just hook perform

bright fog
bronze yoke
#

i mean what you call decorating

#

you can mass hook oncreate (i do this with ontest) but it's kind of just overcomplicating it

#

hooking the craft action's perform action does the same thing but has way less points of failure

night iron
#

there are a few details that could make this be universally applied a bit tricky though, unless i drop one of the concepts

bright fog
#

You are right actually

#

I keep forgeting it uses a timed action

#

Tho you need to access the recipe script

#

Is it sent to the craft action ?

night iron
#

originaly i had a single salvage recipe, that required a scissors or sharpKnife kind of tool but also accept broken items to be able to salvage broken tools, that however meant i could use broken scissors and knifes to salvage other tools

#

and i couldn;t figure out a away to use the onTest to verify if the evaluated item was coming form athe Keep source, where i dont want to allow broken items, or frrom my second source where i wanted to allow broken items

#

so in the end i ended up having to have individual salvage recipes for each of my new improvised tools

#

of corse if i remove the requirment to have a "sharp" tool to salvage the other ones this problem goes away

bronze yoke
#

applying it universally does run into a few issues generally

#

some ingredient items aren't really 'in' the product item but are just used to create it, and some items just logically shouldn't be recoverable

#

so i feel at some point the hand crafted recipes become necessary regardless

night iron
night iron
#

like it doesnt make much sence to salvage a stew

bronze yoke
#

you wouldn't expect to get glue back for instance

night iron
#

also regarding the onCreate vs perform i acntualy used the start method instead of the perform, since that one is called at the end of the process

night iron
#

disregard what i just said about using start instead of onCreate, i did use perform, used start to force prop items to be equiped

night iron
#

is this the best channel to self promote a new mod? i mean this channel seems target mostly those developing mods not the player base in general ๐Ÿ˜•

bright fog
#

You can list items that can be retrieved

#

Do you have an example of weapon or tool craft which has materials which shouldn't be retrievable ?

ancient grail
night iron
bright fog
#

Nice, what kind UI marker is that ?

mellow frigate
peak nymph
#

hey all, has anyone added custom spawnFunc's for custom forageables
despite matching how the vanilla ones work to the best of my knowledge the spawnFunc doesn't appear to be working
heres my definitions file and custom spawnFunc

that log isn't coming through on discover or collect item
neither am I getting a Log

past radish
peak nymph
past radish
#

Huh, my bad then

#

Does your dologchancespawn function return _items array?

peak nymph
#

yeah, its at the top of the first screenshot

#

but it doesn't seem to be running at all

past radish
#

hmm, try to uncomment -- if ZombRand(100) + 1 <= logChance then

peak nymph
#

will do, but had that first, commented it out to make sure it wasn't the check against random number than was broken, without that line it should add the item guaranteed right?

past radish
#

I'm far from very experienced in lua. I can refer you to the PZ modding discord, they are usually very good at helping

bright fog
bright fog
#

Are you getting any errors ?

#

Also you are adding an item to an item

#

You need to add it to the inventory

peak nymph
#

not sure why this was the case, but removing the doGenericItemSpawn func allowed mine to work

#

ohh, I had only required forageSystem, not forageDefinitions, so the generic/existing functions don't exist, so i think it gives up, but didn't give me and error so might not be right

peak nymph
bronze yoke
#

requiring vanilla files doesn't do anything

peak nymph
#

i think it might just be because the function isn't exposed tbh, don't need it for mine so not an issue, but wonder if there is a way to use the vanilla spawnFunc's or if its better just to copy paste them into your own file

night iron
#

ok this is weird when i deployed my improvised tools mod to a dedicated server , there were no errors spinning the server up, there are no errors on my client when connecting but i get stuck on the loading screen after the this how you died message no ui no read sound but the cursor is rendered and the game in general does not look like it's frozen ๐Ÿ˜•

dry chasm
night iron
#

pretty sure it's stuck... when i remove my mod it's almost instant

bronze yoke
#

it happens every time? that's really weird

night iron
#

yeh

bronze yoke
#

it's pretty difficult to cause a problem like that without outright freezing or crashing the game

night iron
#

this are the last lines on my server log

LOG  : Network     , 1729004234743> 2,292,497,682> [15-10-24 16:57:14.743] > ConnectionManager: [receive-packet] "login-queue-done" connection: guid=18014961009955052 ip=[REDACTED] steam-id=[REDACTED] access= username="[REDACTED]" connection-type="Steam"
LOG  : Network     , 1729004234743> 2,292,497,682> [15-10-24 16:57:14.743] > ConnectionManager: [send-packet] "checksum-packet-1" connection: null
#

and my client log:

LOG  : General     , 1729004234989> 0> game loading took 10 seconds
LOG  : Network     , 1729004234989> 0> [15-10-24 16:57:14.989] > ConnectionManager: [send-packet] "login-queue-done" connection: guid=1729004163327433 ip=[REDACTED] steam-id=[REDACTED] access="" username="[REDACTED]" connection-type="Steam"
LOG  : Network     , 1729004235022> 0> [15-10-24 16:57:15.022] > ConnectionManager: [receive-packet] "checksum-packet-1" connection: guid=1729004163327433 ip=[REDACTED] steam-id=[REDACTED] access="" username="[REDACTED]" connection-type="Steam"
cold dove
# ancient grail skill codes?

For what its worth I found these going through the code in some other mods, I think there are a few more (like Short Blade is in one of the real tape in the game)

BOR-1 --boredom
ELC+1 --electric
MTL+1 --metalworking
TAI+1 --tailoring
MEC+1 --mechanics
DOC+1 --first aid
CRP+1 --carpentry
COO+1 --cooking
FRM+1 --farming
FIS+1 --fishing
TRA+1 --trapping
FOR+1 --foraging
PAN+1 --panic
UHP+1 --unhappy