#mod_development

1 messages ยท Page 135 of 1

sour island
#

I kind of gave up on scripts

#

My mod that converts a bunch of items into weapons just uses Lua and doParam

red tiger
#

Template Vehicle IMO is an incomplete idea put into production.

sour island
#

I made it use a giant table with templates that get applied first before getting other variables

ancient grail
#

Hard to read

sour island
#

file 1 is read, then whatever else you defined gets applied over it

red tiger
sour island
#

I think what I'd have done differently (or maybe it is possible but I couldn't get the syntax right) is that 1 vehicle could be a template for another. As I understood templates had to be kind of standalone

red tiger
#

template wraps VehicleScript

#

I do the same in my API.

#
import { VehicleScript } from './VehicleScript';

/**
 * @author Jab
 */
export class VehicleTemplateScript extends VehicleScript {
    get label(): string {
        return 'template vehicle';
    }
}
#

Well @sour island If you want to form some kind of focus group with me on discussing ways that ZedScript could be better for vehicles, I'm for it.

#

I'm going to look at writing a language that will compile to ZedScript and ideas for things like vehicles would be welcome.

sour island
#

I'm a bit strapped for time as of late - I will say if by the end it is easier to make cleaner vehicle scripts then you did great

red tiger
unreal pawn
#

Insurgent.Vest_BulletArmyInsurgent, Insurgent.Hat_ArmyInsurgent, Insurgent.Hat_GasMaskInsurgent, Insurgent.Hat_BeretArmyInsurgent, Insurgent.Jacket_ArmyInsurgent, Insurgent.Trousers_Insurgent, Insurgent.Bag_ALICEpack_Insurgent, Insurgent.Gloves_LongInsurgent, Insurgent.Gloves_FingerlessInsurgent

ancient grail
#

Just so you know

#

What the actual F* just happened

sour island
#

?

ancient grail
#

Vs code has an extension

#

O damn i was replying to old posts . My mobile is cursed

#

Ah cuz i clicked some reply thing

Lol

ancient grail
#

When you use pairs

bronze yoke
#

idk exactly what happens in which versions of lua but pairs is not meant to give a consistent order

sour island
#

pairs should be consistent if the keys are the assumed default I thought

#

i.e.: 1, 2, 3, in order

#

using non-numeric keys or 0 to negative is kind of like riding the fence

#

Lua is so freeform is just kind of vibes with it

#

Weirdly 3 is getting lost with the non-numerics, so I have ot assume internally Lua is grabbing the next key to see if it's in order

#

๐Ÿ‘๏ธ ๐Ÿ‘„ ๐Ÿ‘๏ธ

ancient grail
sour island
#

I guess it just hates odd numbers

bronze yoke
#

i think pairs usually does go ordered when the indices are but it's never meant to guarantee anything like that

sour island
#

I understood it was ๐Ÿคทโ€โ™‚๏ธ

ancient grail
#

Wtf lol
But if you run it multiple times it print same order?

bronze yoke
#

(and if your indices are ordered just use a for loop)

sour island
ancient grail
#

Whats faster in terms of benchmark

sour island
#

But it's highly advisable to not mix key behaviors and expect normal behavior

bronze yoke
ancient grail
#

Ok gotcha

sour island
#

This could be useful if you're limited to 1 table - but outside of that doing this is mostly for giggles

#

Note # still works but only for the numeric

worldly olive
#

Is someone aware if the spriteName of a tree should change based on the sprite it is currently using? The three with or without snow is returning the same spriteName :ded

sour island
#

snow is probably an overlay

worldly olive
#

Almost one hour reviewing tree by tree sprite with snow in the pack viewer to have this table:

WinterTreesDefinitions = {
"e_americanhollyJUMBO_1_2",
"e_americanhollyJUMBO_1_3",

"e_americanlindenJUMBO_1_2",
"e_americanlindenJUMBO_1_3",

"e_canadianhemlockJUMBO_1_2",
"e_canadianhemlockJUMBO_1_3",

"e_carolinasilverbellJUMBO_1_2",
"e_carolinasilverbellJUMBO_1_3",

"e_cockspurhawthornJUMBO_1_2",
"e_cockspurhawthornJUMBO_1_3",

"e_virginiapineJUMBO_1_2",
"e_virginiapineJUMBO_1_3",

"e_yellowwoodJUMBO_1_2",
"e_yellowwoodJUMBO_1_3",

"dogwoodJUMBO_1_2",
"dogwoodJUMBO_1_3",

"e_easternredbudJUMBO_1_2",
"e_easternredbudJUMBO_1_3",

"redmapleJUMBO_1_2",
"redmapleJUMBO_1_3",

"riverbirchJUMBO_1_2",
"riverbirchJUMBO_1_3",

}

And in the game I just found the 1_0 and 1_1 ded

sour island
#

there's separate sprites for snow covered and not?

worldly olive
#

Look at the names

#

I assumed yes

#

But looks like nope, the game is handling them somehow different

sour island
#

zombie/erosion/categories/NatureTrees.java seems to do some checks

#

also has references to an ErosionIceQueen

#

this is where it might be swapping the sprite

#

What are you using to get the spritename?

worldly olive
#

local spriteName = isoTree:getSprite():getName();
print("spriteName: " .. spriteName)

#

Checking those two files

#

Hope I get something useful

sour island
#

I know erosion also uses attachedsprites and overlays

#

But that wouldn't really make sense as the leaves of the other tree would show

worldly olive
#

I think that I will handle this based on world temperature, will be easier probably

hot patrol
#

are there any guides to create an accupation with special trait?

rancid panther
#

the easiest way i think would be to use profession framework, but it would still have some limitations i think. it has support for making special traits tho

#

without it, as long as you make the occupation and make the trait, then it is easy to just make it exclusive to the occupation

wide oar
#
<outfitManager>

    <m_MaleOutfits>
        <m_Name>Goblin Slayer</m_Name>
        <m_Guid>6ff05a3c-c20a-4807-a428-b5bcda17b623</m_Guid>
        <m_Top>false</m_Top>
        <m_Pants>false</m_Pants>
        <m_AllowPantsHue>false</m_AllowPantsHue>
        <m_AllowTopTint>false</m_AllowTopTint>
        <m_AllowTShirtDecal>false</m_AllowTShirtDecal>
        <m_items>
            <itemGUID>69bbbe30-cd3f-49e0-a5ca-cdf21ddfe4ba</itemGUID>
        </m_items>
    </m_MaleOutfits>
<m_MaleOutfits>
        <m_Name>Deidara</m_Name>
        <m_Guid>fb83e37f-ad01-4130-9bc1-8c2257947fd6</m_Guid>
        <m_Top>false</m_Top>
        <m_Pants>false</m_Pants>
        <m_AllowPantsHue>false</m_AllowPantsHue>
        <m_AllowTopTint>false</m_AllowTopTint>
        <m_AllowTShirtDecal>false</m_AllowTShirtDecal>
        <m_items>
            <itemGUID>6926ed0b-b251-4253-abca-2a5813fee67c</itemGUID>
        </m_items>
    </m_MaleOutfits>
    <m_MaleOutfits>
        <m_Name>Itachi</m_Name>
        <m_Guid>3efece14-819b-47b1-ac1e-804c8132ffc6</m_Guid>
        <m_Top>false</m_Top>
        <m_Pants>false</m_Pants>
        <m_AllowPantsHue>false</m_AllowPantsHue>
        <m_AllowTopTint>false</m_AllowTopTint>
        <m_AllowTShirtDecal>false</m_AllowTShirtDecal>
        <m_items>
            <itemGUID>196693e2-19c9-4e6c-a00e-a44bb608d22f</itemGUID>
        </m_items>
    </m_MaleOutfits>
</outfitManager> ```
#

can someone help me understand why my outfits arent appearing in game

#

i cant select them in the character screen

#

the itemGUID's (ignore deidara and itachi) are the same as the GUID in clothingItems

hot patrol
#

plus it's goofy

rancid panther
#

i have a furry trait on my mod too ๐Ÿคฃ

hot patrol
#

This is my WIP prof description "Never had a job, dwells inside of their mothers basement, lives and breathes anime and hentai and collects the most degenerate material known to man. Some would say your way of life makes being undead preferable."

#

thoughts?

rancid panther
#

i dont think you can force enable certain facial hair unless it is a clothing option from a mod, like how authentic Z has wigs

#

if you have that then it sounds good

hot patrol
#

lol

rancid panther
#

ah

hot patrol
#

I meant more a fedora, trench coat and fingerless gloves

rancid panther
#

well that seems easily doable with profession framework, since the trait only gives you skill points and an item.

#

i thought you meant a trait with special features

sour island
#

Anyone familiar with tracking if the player enters/exit aiming?

#

rather not do onplayerupdate

hot patrol
bronze yoke
#

maybe onkeypressed?

rancid panther
hot patrol
rancid panther
#

oh so u already have some stuff? u just need to make it as an occupation/trait?

hot patrol
#

yep

rancid panther
#
local burglar = ProfessionFactory.addProfession("burglar", getText("UI_prof_Burglar"), "profession_burglar2", -6);
    burglar:addXPBoost(Perks.Nimble, 2)
    burglar:addXPBoost(Perks.Sneak, 2)
    burglar:addXPBoost(Perks.Lightfoot, 2)
    burglar:addFreeTrait("Burglar");

TraitFactory.addTrait("Burglar", getText("UI_prof_Burglar"), 0, getText("UI_trait_BurglarDesc"), true);

jaunty marten
rancid panther
#

in vanilla, you still need a separate function to add starting items, starting clothes, and any special effects

#

in profession framework it is handled pretty well in one place for the occupation and in one place for the trait, depending on how complex the trait effects you wanna make are

hot patrol
#

How would I spawn in an item with low condition using prof framework?

#

so like a katana with like 3 hits before broken

wide oar
rancid panther
hot patrol
#

hmmm, damn.

rancid panther
#

but using the events feature with profession framework it is probably possible

#

i just have never been able to get it to work and ended up making some things without using profession framework, and some things with

#

should have no problems like that, with how nicely profession framework is handled

#

and might be better so you can add compatibility with the daki mod

hot patrol
rancid panther
#

ohh

#

you made the daki mod?

hot patrol
#

sure did

#

kinda

#

mostly the idea

#

got a lot of help with the rest

rancid panther
#

wow!

#

then i think you should just make it without using profession framework, as it will mess with other servers that use the mod probably

hot patrol
#

Yep I am working on getting it updated to improve a few gripes I have with it plus add a few more features.

rancid panther
#

i have p much done nothing but make traits so far in my modding experience so far

hot patrol
rancid panther
#

it's really easy, i'll just give you some of the functions you need to use

#

here's an old sample of how i made a furry trait start with skills and items before i moved to profession framework

hot patrol
#

well my idea was for it to be a profession that gives you an exclusive trait

rancid panther
#

yea, you make the profession and trait separately

hot patrol
#

ah

rancid panther
#

for a profession you can do the same thing p much but using ProfessionFactory.addProfession

#

then you can use addFreeTrait

#

for a profession exclusive trait, you need to make it cost 0 and set the thing at the end to true

#

profession framework also tells you how things would be done in vanilla, so i'd look at that too, even if ur not gonna use it

#

this would be done in shared/Definitions/

hot patrol
#

alright, good call.

#

I see addXPBoost but how do I also just add a level. So like 2 levels in long blade plus a 1 XP boost

rancid panther
#

if you wanna do that then you need to make them gain 1 level on spawn and 1 level on creation

#

i think more traits has a trait that gives u maintenance levels on spawn but not in the character creation menu

sour island
hot patrol
#

alright. I'll have to put a bookmark on this. Gotta get some sleep before work. Thanks for your help. I'll crack at it some more tomorrow but I'm thinking this is beyond my skill level. aPES_LulLaugh

rancid panther
#

kk. good luck!

hot patrol
rancid panther
#

im a complete beginner at modding too, but making traits is not too hard

hot patrol
#

maybe not the process itself but I don't know anything about lua

#

๐Ÿ˜…

sour island
#

The results show a matching n and k(of t) 500 times

rancid panther
#

can i use debug mode to force a function to be performed without its requirements being met?

#

like the whole function

jaunty marten
sour island
#

Yeah, that's all I was saying -- what I guess is weird/new to me is that you can blend the styles of keys

#

but I guess internally pairs is looking for [1] first then scanning for n+1

#

non numeric keys end up at the end of the list with out any order expected

#

This all started cause someone found [0] used in superbsurvivors lol

#

Wait, what did I do wrong

#

This should have came back with a jumble of 789, no?

jaunty marten
#

works only with 1, 2, 3, 4 .. n

jaunty marten
jaunty marten
sour island
#

but the print for the tests is random

#

am I storing the results wrong?

jaunty marten
sour island
#

oh, the entries are coming back out of order but ... not if it is within the same for loop

#

that's peculiar as hell

jaunty marten
sour island
#

My best guess is because the for is inside of another for it's maintaining the order?

#

abc varies at 1 2 and 3

#

but within each test it's the same for all 5000 runs

jaunty marten
#

it's just the random order so u just 5000 times iterate all table and add +1 each time

#

u adding value but it won't change the memory address

#

so pairs be in random order but memory address of tables didn't changed

#

lua didn't change address of table just for nothing

sour island
#

n is just supposed to count each entry not really be concerned with an entry

#

my expectation was each new pair call would have a different n for k..v

#

so the results would be
1_abcabc 800+
2_abcabc 800+
3_abcabc 800+
1_xyz 800+
etc

#

or do you mean memory within a function

#

and not the key

frank elbow
#

pairs does not guarantee any order by definition, but some implementations may end up preserving some sort of order. Some things can lead to table order getting wonky-fied, like adding a key

#

Something to do with the table hash

jaunty marten
sour island
#

ah

jaunty marten
small topaz
#

How are the map corrdinates calculated? Sometimes, they have a formal like x = 10951, y = 9490 In other cases, you have smth like cellX = 36, cellY = 31, x = 151, y = 190 How are those data related to each other? And is there a way to see those "cell-coordiantes" in game (in debug mode ofc)?

Edit: Just found out what happens.

wooden lodge
#

Does anyone know how to mod/edit the permission levels for Observer Moderator etc.

#

Like, how does one add a new permission level, rename or adjust their rights?

#

For example, I want to make Observers be able to use the "adduser" command ingame. Any ideas?

bronze yoke
#

permission levels are totally hardcoded

red tiger
#

aaaaaaaaaaaaaaa-hi.

#

Falling asleep at the speed of syrup.

rancid panther
#

kinda like how discord servers have bots with the admin role

hollow current
#

Is there a way to return the current client language of the player?

#

I thought of a way by adding your usual translation files, each file has for example a currentLanguage with the value of corresponding language, and using getText(currentLanguage) to return the current language. Was wondering if there's a more direct way though

bronze yoke
#

getCore():getOptionLanguageName()

hollow current
#

oh lovely

#

Thanks!

wooden lodge
rancid panther
#

not sure, but since permissions are hard coded this is the only way i can see it being done

hot badge
#

How difficult would it be to make a mod that replaces the death sound with MORTIS from Faith? And how would I go about it?

true vault
hot badge
#

nevermind

#

I found it

#

Now I just need to navigate this list for the mod I just installed

#

Wowee

true vault
hot badge
true vault
#

mhm; and most workshop items also have the ID listed at the bottom of the description too

hot badge
#

Well, the mod ID was supposedly 2915074844& but that just leads me to ModTemplate, which is... strange

true vault
#

That's... not the mod ID then.

#

What mod are you using as reference?

hot badge
#

That's what it says on the mod page

#

I directly copied the ID from the bottom of the page

true vault
#

Hmm, yep that's the ID then..

bronze yoke
#

if it takes you to a modtemplate, they just didn't rename the folder

hot badge
#

Modder just forgot-

#

Yeah what she said

bronze yoke
#

she ^^

hot badge
#

She, sorry

#

Looks like they just have the mod's icon, title and description in the folder, then a wav file of the sound with a really basic script, so it seems pretty trivial

#

Thanks guys

#

How do I actually upload this to the workshop? Like how do I format it

hot badge
#

(I'm making this for someone else to upload, but they don't know what to do and neither do I)

rancid panther
hot badge
#

I have the script and mod working, just need to get it into format for workshop

rancid panther
#

User > Zomboid > Workshop > YourWorkshopFolder
in this folder you should have preview.png and workshop.txt and a folder named Contents
Contents > Mods > YourModFolder

#

ModTemplate shows the exact way you should do it. just copy it and replace the mod contents with your mod folder

#

and change the preview and workshop.txt to your mod preview and details

hot badge
#

Wait hold on I forgot something

rancid panther
#

u should rename those folders to actual relevant names to your mod

hot badge
#

I will make sure to do that, I forgot to add the contents folder when I sent that link so one sec

hot badge
rancid panther
#

looks good. just change the workshop.txt to fit the proper formatting of a workshop file

#

i think when you try to upload it, it will just tell you to fill that in yourself and it'll automatically update the .txt file

#

it'll ask for a title, a description, visibility, and tags

hot badge
#

Alright, now where do I actually upload this bad boy?

#

I may not be able to, but I can at the very least have someone else do it

rancid panther
#

you put it in your workshop folder and go in game and select the workshop option in the main menu

#

then click upload

hot badge
#

Wow that's easy

rancid panther
#

yep

hot badge
#

The workshop folder in common/projectzomboid, right? Not the big one with all the downloaded content

rancid panther
#

and when ur uploading u can fill in the Title, Details, etc

#

no

#

Users/Zomboid

hot badge
#

Uhh

rancid panther
#

Users/YourUserName/Zomboid

hot badge
#

Found it

#

But thank you

rancid panther
#

np

hot badge
#

Alright so I just paste it here, click workshop, then upload?

rancid panther
#

yep

hot badge
#

Awesome, will try now

rancid panther
#

you can check if your folder matches the ModTemplate folder

hot badge
#

Seems to

#

If I can't upload it I guess I'll just send it in chat for someone else to do it

rancid panther
#

no reason for you to be unable to upload it. if you cant do it someone else will walk you through it

#

u already did 99% of the work. no reason for someone to take the credit

hot badge
#

I assume the workshop is included

rancid panther
#

for zomboid?

hot badge
#

No, but a community ban is global for steam

#

Interesting problem, it says that the preview png could not be loaded, but when I click on it, it opens fine

#

Could it be the wrong image size?

rancid panther
#

it needs to be the right size

hot badge
#

What size is that?

rancid panther
#

256x256

hot badge
#

Thank ya

rancid panther
#

np

#

congratulations on your first mod

hot badge
#

I cannot upload it, so I'm just going to share it with the person I made it for

rancid panther
#

alright

#

complaint that my mod doesnt give enough free points

bronze yoke
#

LOL?

rancid panther
#

ofc i considered that some ppl would be using my mod with immune mods and cures and stuff, which is why it is only worth 10 points

zinc pilot
#

quick question, how do you pass to an Event the instance of an object?

local function HandlePushOption(_, handler, direction)
    handler:startPushingVehicle(direction)
    Events.OnTick.Add(handler.updateVehiclePosition)

end

Handler is an instanced object, but when it gets called through the OnTick.Add it seems it's not getting the instance itself

rancid panther
#

i have no knowledge in this subject. hope u get the answer soon!

bronze yoke
#

Events.OnTick.Add(function() handler:updateVehiclePosition() end)

fast galleon
hot badge
rancid panther
#

i agree. they might as well if they want free points anyways

#

just thought it was funny

#

also i didnt realize there actually was another bitten mod.

#

i swore there was but couldnt find it cuz they dont have bitten or bite anywhere in the name or description

fast galleon
#

oh Albion answered

zinc pilot
#

about that, I was wondering, if I wanted to remove that event, how would I do it? I'm referring to the anon function one

fast galleon
#

that's impossible. You need to at least make a local reference.

zinc pilot
#

I'll keep steering away from them then

#

thanks again

bright atlas
#

Would anybody want a mod that lets you create armored cars, mad max style?

#

Execution is pretty simple but I can't make 3d assets

I would appreciate if someone could point me to free armored car or tank assets

#

I really like the idea of turning a car into a giant bulldozer with scrap metal to massacre hordes

#

Parts that increase the amount of damage you do when ramming into zombies, durability, multihit bumpers...

#

Equipping things like machine guns to the back of trucks

#

Would be fun playing with zombies on insane mode

gaunt meteor
#

anyone know where the trait functions for vanilla are? ๐Ÿ™‚

rancid panther
#

MainCreationMethods.lua

gaunt meteor
#

not that one

#

im seeking the trait functions (e.g. where it defines what a trait does)

rancid panther
#

like how burglar can open windows easier?

gaunt meteor
#

yeah ^^

#

i have looked through client folder i think im blind

rancid panther
#

they can be anywhere between client, server, or shared

gaunt meteor
#

oh, thank you Sadge

rancid panther
#

i think some are hardcoded in java or scattered around multiple files

wispy basalt
#

I've been thinking about making a mod to nerf tall fence climbing so that whenever you climb over a tall fence your character goes slower and has a higher chance of falling

#

What file would I need to edit?

chrome egret
#

Good morning all

#

@fast galleon did you get a chance to look at those notes on the inventory transfer action issue?

warm prawn
#

I tried to get one of my custom mods working (The beginning of a project), but it wouldn't run. So I tried again with an example mod. Not working. For some reason, it's like my mods just simply don't run. I've enabled them in general and for my modding test world, but I can't get my mods to work. Not even a simple print("Loaded").

I put my mod structure as following

Typicxl
|Zomboid
  |mods
    |modname
      |media
      |-|lua
      |- -|client
      |- - -|script.lua
      |mod.info

Nothing loads in the command console.
I'm running in debug mode.

fast galleon
#

You said it's on server but I don't see it.

warm prawn
chrome egret
warm prawn
chrome egret
warm prawn
fast galleon
#

if you hook to transfer action maybe you need to check that the item was actually transferred, I'm speculating here

warm prawn
#

It doesn't work even on singleplayer.

chrome egret
# fast galleon can you tell me which files has the functions that you mention?

In my mod I start from ItemSearchPanel, which creates a SearchInventoryAction or SearchRoomContainerAction. When the searched item is found in either of these, they'll spawn an ISInventoryTransferAction (if the player has selected to take the item). ISInventoryTransferAction contains the doActionAnim function which calls the global createItemTransaction (which defers to ItemTransactionManager.createItemTransaction). Is that what you were looking for?

chrome egret
warm prawn
fast galleon
chrome egret
#

Nbd

chrome egret
warm prawn
#

And 2 other small buttons.

#

But they're default.

chrome egret
#

Right, but when you load the world it goes to a black screen right?

#

Usually if there are Lua errors, a red box will appear in the lower-right corner of the screen

warm prawn
warm prawn
#

Thanks for helping, by the way.

chrome egret
#

Sure thing. It can be hard to get started.

warm prawn
#

I'm gonna have a rough time if I can't even get a script to work, huh?

chrome egret
#

You'll get there!

#

So in console.txt I have some very basic lines that the game outputs about loading mods

warm prawn
chrome egret
#
LOG  : Mod         , 1679255735072> 0> refusing to list examplemod
LOG  : Mod         , 1679255735072> 0> loading ItemSearcher
#

Can you search for "loading" and see if your mod comes up by name?

warm prawn
#

Does console.txt just load from the command console?

chrome egret
#

Mmm not usually

#

You can find it under *\Zomboid\console.txt

warm prawn
#

Alright, then it's worth looking,

#

Yes, it found loading mod

#

I confused myself for a moment.

#

Sorry.

chrome egret
#

np

#

If you scroll down the file from that spot, do you see any stack traces?

warm prawn
#

I don't believe so.

#

No.

#

Does this have anything to do with anything?
LOG : General , 1679313888101> MISSING in SettingsTable: Mods

chrome egret
#

doubtful

warm prawn
#

Okay.

#

Otherwise, no, basically nothing.

chrome egret
#

Let's try something else. Wrap your test print in a function like:

function testPrint()
   print("[Your Mod Name Here] - Things are happening");
end

Then add a line at the bottom of the file:
Events.OnGameBoot.Add(testPrint);

warm prawn
#

Alright.

chrome egret
#

Just to see if things are happening ๐Ÿ™‚

warm prawn
#

Never had such trouble developing a mod before.

#

Should I load my save to test the function?

chrome egret
#

I usually load singleplayer if possible since it's so much faster

warm prawn
#

I do, too.

chrome egret
#

Same with launching the game in -nosteam mode

warm prawn
#

Would it show the print in the command console?

chrome egret
#

It'll happen before you get in the game, so checking console.txt is likely easiest

#

I just keep a continual tail of that file running while developing

warm prawn
#

Okay.

#

This is just part of the development process, I guess. Running and tweaking till it works.

chrome egret
#

Right. Either it's working or there is some hangup keeping it from engaging, and if it's the latter it's a bit of a painstaking process to figure out where and what it could be.

warm prawn
#

It printed properly.

#

So the code IS working.

#

I'm gonna give a script, and I want you to tell me if I did it correctly.

#

function onKeyDown(key)
if key == Keyboard.KEY_APOSTROPHE then
local player = getSpecificPlayer(0)
player:Say("Hello")
end
end

chrome egret
#

That's sort of similar to how I have Item Searcher's UI bound

warm prawn
#

Interesting.

chrome egret
#

But if you look at line 632 I have it bound to an event

warm prawn
#

Alright.

odd fjord
#

not sure if this type of question is allowed here, but i'll shoot my shot. sorry in advance!

is there any item in game that checks if it's in the players inventory? if yes, what is it? if no, how do i do that?

chrome egret
#

What do you mean the item checks that it's in the player's inventory?

odd fjord
#

i wanna make a mod wherein the first time a player grabs the modded item, puts it in their inventory, it'll do something only that one time and never again.

chrome egret
#

Item Searcher is updated! https://steamcommunity.com/sharedfiles/filedetails/?id=2789003239

GitHub

Hello, first thanks a lot for this mod! I would like to ask if it is possible to restrict a search specifically to the safehouse area the player is in as this would be useful for multiplayer and de...

odd fjord
chrome egret
chrome egret
warm prawn
chrome egret
#

https://github.com/FWolfe/Zomboid-Modding-Guide this guide is pretty good and then I used a lot of MrBeast's references for custom UIs https://github.com/MrBounty/PZ-Mod---Doc

GitHub

Guide to modding various aspects of Project Zomboid - GitHub - FWolfe/Zomboid-Modding-Guide: Guide to modding various aspects of Project Zomboid

GitHub

Contribute to MrBounty/PZ-Mod---Doc development by creating an account on GitHub.

warm prawn
#

MrBeast? lol

#

Why did I laugh like that?

chrome egret
#

lol whoops

#

That's the YouTuber I think, didn't learn much from him xD

#

MrBounty**

warm prawn
#

ik

warm prawn
#

Besides the point.

chrome egret
#

I'm happy to keep helping, but I will have to start work here in a few minutes, so I'll become much less available.

warm prawn
#

Alright, I think you helped enough.

#

Thanks a ton!

upper lynx
#

Hello, I was just wondering if anyone can help me with getting started on vehicle modding for the game? I know of two tutorials on the forums, but was just curious which is the best to follow along with since they're dated now, plus I'm wondering how things like pop-up headlights work (if possible) as well as extra bits for vehicles like spare tyre slot, spoilers, armour etc

chrome egret
faint jewel
#

Dr. Gustavo made a rather well done tutorial.

frank lintel
#

arbitrary? you mean specified time or you just talking random() also unless there an event for 'onPickup()' or something equal ya gonna have to check every tick to make sure someone doesnt pick something up.

upper lynx
chrome egret
upper lynx
frank lintel
#

why I was saying you'd need like an onpickup event so you can then 'assign' one but getting that pickup time to start it all is where the real difficulty going to be (dont think there is an event triggered when someone picks something up albeit there should be one...)

chrome egret
#

Well you don't "need" it, if you build in the logic to clean up your event and such, but yeah it is more work than a prebuilt.

upper lynx
#
sour island
#

Aside from using events you can also just use the Lua functions. If you're safely overwriting them, there shouldn't be any issues.

@chrome egret

faint jewel
#

the first one by tube is actually really good.

warm prawn
#

It remains relatively unchanged.

upper lynx
#

Ah, was just unsure cause this game has had a lot of versions, in another game I modded there was different bits of info needed for things to work correctly, good to know then

warm prawn
#

I know because 5 year old videos still worked somehow.

frank lintel
#

coughs... API

warm prawn
#

I have the feeling modding is gonna be easy, yet difficult to get into.

upper lynx
#

It's going to be a steep learning curve since it's a lot more complicated than I'm used to ๐Ÿ˜…

hearty rain
#

Mod upload file structure is giving me headaches. How do I upload and maintain separate mods? Every time I try and upload a new one, it keeps pulling up the info of the previous mod and I'm afraid of overwriting it on the workshop.

#

Oh, hey Sycholic lol

frank lintel
#

honestly the coding isnt the hard part, setting up the enviroment and having a fully working IDE is the hard part...

chrome egret
#

Do you use much IDE support?

frank lintel
#

well dont know anyone who doesnt...

#

I mean if everything was annotated and there was some kind of javadoc-like reference it might happen.

sour island
chrome egret
#

I'm not saying it doesn't help, just that I mostly work in VS Code without very good IntelliSense for PZ modding.

sour island
#

Fairly easy to set up, wish it was even easier but I don't have the braincells to learn Gradle or recreate what it's doing inside

frank lintel
#

gradle just a batch process in basics

#

the whole decompile process etc

sour island
#

I imagine it is, but it is hosted somewhere online

#

And I don't have that level of know-how

frank lintel
#

well I havent looked at gradle in years but no its all done on your box. the how to do is stored remote

#

it'll def run faster or slower depends on your rig ^_^

sour island
#

Yes, from what I could tell it's lifting the instructions

chrome egret
#

Not necessarily

sour island
#

The original author was a bit of a weirdo, left the community pretty quickly

frank lintel
#

no but this instance (without opening it up and diving in more) it is

sour island
#

My best guess is he didn't want people to easily reverse engineer what he'd done (?)

frank lintel
#

it totally reminds me of nothing more then a MC craftbukkit/spigot creation

sour island
#

That's what he cited as his goal/inspiration

frank lintel
#

oh I could do that just by looking at it... I was totally following it along as it was running

sour island
#

Oh? Well you'd be doing the community a big service -- if the process was more streamlined.

frank lintel
#

someone said it uses JD and Im like no... that def fernflower working here

#

okay chuck open up any .class file in IJ

sour island
#

Alot of people use VsCode as well, I've never tried as I'm happy with IntelliJ. But would the libraries be somehow usable for them?

#

IntelliJ can open java files, yes

#

The pzdoc program does more than just decompile though

#

It runs through the exposures and creates a Lua friendly library

frank lintel
#

yeah there actual functions that do this.

sour island
#

Allowing for intelliSense, autocompletion / suggestions as you type.

#

Not at my computer atm

frank lintel
#

I mean I could try and tear it open more and look see exactly if that is actually an issue I thought it ran pretty well didnt know there a issue

sour island
#

There's only 1 issue after it's setup, and that's classes don't have proper inheritance of methods

#

But you can circumvent that by using EmmyLua to typecast multiple classes

#

---@type IsoObject|IsoMovingObject|IsoGameCharacter|IsoPlayer

#

But as you can tell, this is a pain and if you're new to PZ modding you won't know these classes by memory

#

Other than that, I feel like the setup is a bit steep for people.

#

The fact that Konijima had to rewrite the setup guide to make more sense is a testament.

#

Passed that, it's a pretty bare bones tool, so not much room to improve it I imagine.

frank lintel
#

well gonna take some digging. this is also involving maven so...

#
    id 'groovy'
    id 'io.pzstorm.capsid' version '0.4.2'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}```
#

and lulz at the default group and version

chrome egret
#

mavenCentral is just a default place to look for artifacts too

#

so it may not be used at all

sour island
#

Afaik the documenter stuff is hosted on maven

#

The decompiler is one tool, the pzDoc is another

#

He wrote a prototype called pzMod but he didn't understand mod file structures and the implementation would require installing the decompiler and documenter on every mod

#

Capsid is the 2nd iteration, and just requires decompiling/documenting once to set up as libraries in IntelliJ

#

Repeated runs are needed as the base game is updated.

mental harness
#

Hey Modders. Just getting into modding with a simple Cooking Expansion with some requests from friends on an MP server. My question: How would I go about extending base items to allow them to be included in a new EvolvedRecipe? For example, making Soft Tacos with Tortillas. I would essentially want the same functionality as the Taco EvolvedRecipe, we're just starting from a Tortilla instead of a Taco Shell.

sour island
#

That's more or less all the context I can give

frank lintel
#

well the last part you totally summed it up

#

like I said its just like back in MC, when we were decompiling getting fernflower to gen the source, saving them different jars adding in annonations so IDE's to use... it really doesnt look much different then that

sour island
#

The first iteration of the decompile tool also points to a hosted documenter that is hard locked to java 8. And so I broke with the recent change of PZ.

#

I'm worried something similar was done for the current version lol

mental harness
#

Or would it be simpler for me to make a Taco Evolved Recipe that replaces the base Taco Evolved Recipe and just make the starting ingredient Taco Shell or Tortilla?

frank lintel
#

yeah why I keep seeing this java 8 limit Im like why...

sour island
#

You might be looking at the old version, the current setup doesn't seem to have that issue

#

The game is on 15(?) But the tools still work with 17 or 18, and infact shouldn't be on 15(??)

frank lintel
#

17

sour island
#

I wonder if the version change working was a fluke then

frank lintel
#

the custom java they using their version # is 15 but its Java 17

sour island
#

Ah ok

frank lintel
#

why they named it like that I have no clue...

sour island
#

That would explain the fact 17 or 18 is needed

#

The thing is the author of capsid wasn't active then, so I wonder if he came back to change the version ๐Ÿค”

#

Or maybe it matches whatever the game has-- and only the old version was hardlocked to 8

frank lintel
#

I actually have that JDK installed lol

#

but yeah there programs that take source look at it in java and auto add in your annotations in a basic form follow what types args are return etc and it just builds your function help/Intellisense stuff

#

so basically fernflower decompile, build class/source jar, run thru exposed functions, make annotations in a nutshell

sour island
#

Well if you're able/upto the task I would be grateful. Messing with it isn't in my current wheelhouse and I don't have time to learn.

frank lintel
#

I can keep digging its my day off my work sched sucks, on off on off rinse repeat.. what day is today?

red tiger
#

Good morning.

#

I've noticed a couple of bugs with my syntax highlighting extension for ZedScript. It's otherwise performing well. =)

frank lintel
#

does the name jboss mean anything?

red tiger
#

It's public and anyone can use it right now.

frank lintel
#

guess I was just the one raising the anchor :P

#

and chuck... umm lemme just post it.... <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="17" project-jdk-type="JavaSDK"> unhappy

#

not sure if thats like global or what but just seen that in one of the xml configs

red tiger
#

For a sec I thought that was HTML from my PZ HTML project.

#

xD

#

Was like.. Oh..

frank lintel
#

nah thats from misc.xml in capsid

#

and yep compile config is 1.8 also.... so got a plan... rubs hands evilly

#

ah.. now it makes sense.

red tiger
#

What are you trying to do?

frank lintel
#

thats capsid and its because of groovy.

red tiger
#

???

#

I've read up and it looks like you want to upgrade compiled Java from 1.something to 1.something.

frank lintel
#

I was looking to try but since seem groovy dont like higher levels of java not sure even the point of doing so

red tiger
#

What uses groovy? What are you trying to modify?

frank lintel
#

umm everyone here does?

red tiger
#

I'm curious because this is the kind of work I used to do a lot.

frank lintel
#

that thing that makes your library/source stuff for IDE's.. PZ-Libraries

red tiger
#

But I have no idea what you want to do.

#

Oh you want to create a compliable project for modifying PZ bytecode?

chrome egret
#

All gradle scripts are written in Groovy

red tiger
chrome egret
#

Okay, that's a bit persnickety

red tiger
#

I'm one of those people.

frank lintel
#

lol

chrome egret
#

There has to be a way to make it work with higher Java versions though, there's no way Gradle stopped supporting with 9+

frank lintel
#

yes but again stop talking 'if's when we talking about something static.

red tiger
#

This project is in Gradle and works with PZ directly.

#

Maybe that'll help?

frank lintel
#

so decompile, source, annotations the whole schpeel?

red tiger
#

I use it for modern Java versions.

#

Also IIRC IDEA uses an outdated (Maybe not anymore) version of gradle.

#

I had to install a later version and set it up.

#

You need to be at least JDK 16 IIRC to function with current stuff?

#

It's been a year since I messed with and solved these same issues.

#

It was a technical issue for my end when setting up gradle to work for my Java projects.

frank lintel
#

jab from what I can tell the PZ-libraries everyone using right now is brought down to 8 that was what I was trying change. but groovy apparnetly doesnt like 17.

red tiger
#

PipeWrench's Java transpiler uses gradle too however that's closed source so I can't reference that as another example. xD

red tiger
#

I remember this being something that I did.

frank lintel
#

why... if our code is in 17...

red tiger
#

Are you using 17's features?

frank lintel
#

do you know that by looking at the bytecode well I dont..

#

so if you gen source from bytecode on a lower level how you ever gonna know.

red tiger
#

Java can run legacy bytecode. There can be issues however the JVM is designed to support older compiled code going forward.

#

It's when libraries are removed or missing that the old compiled code fails.

frank lintel
#

well given Im looking at 17 JRE I doubt thats an issue

red tiger
#

The reason why PZ was in Java 1.7 for a long, long time was that they used sun libraries that were removed in JDK 1.8. (Lock objects) and this took time to replace.

#

=)

#

Anyways. I thought I'd at least share working projects in gradle that works with current versions of PZ. Maybe something in there might shine a light on your current issue.

frank lintel
#

well thats the point Im trying to seeif there limitations and thus if there is well Im gonna take a stab at making it over.

red tiger
frank lintel
#

because Ive been down that road with MC 3rd party server development

red tiger
#

I'm at work so I'm quickly going through my stuff to see if I can provide more info

frank lintel
#

Im just brainstorming and digging thru capsid atm. and that dont help cuz says my gradle plugin is version 223.xxx lol

#

basically jab, the whole process of making the library jar stuff looks just like back when we were decompiling MC. then topic turned as apparently there still issues with it so then topic went to looking into fixing or something better.

red tiger
#

Yeah custom in-house tools were built then that turned into MCP.

frank lintel
#

lol MCP mmm

red tiger
#

I wrote a mod before that was a thing. It was over 100 class files extra.

frank lintel
#

yeah talking when craftbukkit came about as a 3rd party multiplayer server

red tiger
#

I worked on HMod.

#

=)

#

I'm not Hey0 but I knew em. <3

frank lintel
#

but you know what Im refering to the whole decompile, gen source, make javadoc annotation etc

red tiger
#

So you want to generate or manually add annotations?

frank lintel
#

well its done somewhat but there issues (and dont ask me Im too newbie ref this game)

red tiger
#

That's totally fine.

faint jewel
#

I was a 5th party developer.

#

XD

frank lintel
#

there the whole whats exposed checking etc there more too it but the whole basic workings reminds me totally of back then

red tiger
#

I need to find a picture to show you just how insanely interested I am in your problem a year back.

faint jewel
#

I'm the reason Minecraft has AO lol.

red tiger
#

@frank lintel =)

#

I went so far as to write a software program that allows people to write their own documentation as a third party.

#

PipeWrench has generated documentation that shows all method variants and their Java-specific types for each parameter.

frank lintel
#

yeah there programs that do that. why this whole automated system using capsid I was looking into to see exactly what its doing

red tiger
#

Maybe I could be more help after working hours. =/

frank lintel
red tiger
frank lintel
#

right now I was just gonna change the XML's and force it to use a higher level see what happens but then ya woke up :)

red tiger
#

Good luck.

frank lintel
#

oh its either gonna work or the jar's are gonna be blabla bla

#

thing I was atm trying to figure out is...

#

a valid languageLevel="JDK_1_??" entry

red tiger
#

1_ is for old versions.

#

Usually, modern configurations use the whole minor version without the major version.

frank lintel
#

well exactly right now its 1_8...

brave ruin
#

Is there a way to have function checking how long a player have driven a car?

red tiger
#

Oracle changed their conventions on versions after 1.8

frank lintel
#

why I was trying to look up the valid field for it

red tiger
#

try JDK_16

frank lintel
#

k

#

oh this gradle build trying to use 7.3 so likely no issue there just seen it in another xml

red tiger
#

I'm using a newer version of gradle IIRC.

red tiger
#

That only works up to JDK 17

#

(7.3)

frank lintel
#

I'll prob have to install a newer version but thats okay

#

azul is 17

pulsar rock
#

Hey hi

#

What are the available types for sandbox options?

#

integer, boolean

#

string?

#

text?

red tiger
#

enum too.

pulsar rock
#

What's the exact name of the string type though?

#

"string"?

red tiger
#

Here's an example of a sandbox-options

pulsar rock
#

Neat, thanks!

#

Wait, crap

#

strings can't contain commas?

#

They can contain spaces though, right?

#

And ;?

red tiger
#

, is illegal IIRC.

#

Yeah the format isn't great. =/

frank lintel
#

escaped... isnt it?

#

and btw jab you'll know this strings for us in lua are what UTF?

frank lintel
#

nvm

red tiger
#

You should be able to use \uXXXX IIRC.

frank lintel
#

yeah how ya'd do a comma right?

red tiger
#

charmap. one sec.

#

It'd resolve when digested by a buffered reader as a comma though.

frank lintel
#

or any of the other special characters..

red tiger
#

It'd be digested the very same.

#

Yeah maybe a special comma.

frank lintel
#

but yeah ignore the utf thing I was thinking something else

red tiger
#

โ€š

frank lintel
#

and build successful? O.o

red tiger
#

\u0130

#

That's a special char that's basically a comma.

#

Not sure if the game will render it if that's the goal.

#

zombie.scripting and zombie.scripting.objects is where the parsers are located.

frank lintel
#

Ive seen escaped characters in SS so I know they used somewhat

sour island
#

Sandbox options should have IDs for translation purposes

#

You can include special characters there

frank lintel
#

interesting... capsid works fine with normal jdk but fails with Azul

scenic cradle
#

Anyone know why my mod isn't updating? The id and workshop number are correct, and the uploader says it is successful but the version on the workshop hasn't updated

#

nevermind, I'm an idiot

modern hamlet
#

Events.EveryHours or Events.EveryTenMinutes
Which one is called first?

frank lintel
#

whomever's time comes first? you have two different starting points...?

frank elbow
#

I ran into that problem when creating options for format strings used in interpolationโ€”initial design used commas to separate arguments in functions

frank lintel
#

why I thought ya can do \, for string stuff

#

double backslash.. etc

frank elbow
#

I don't think so based on what I remember the code doing, but I could be wrong (I'd check but I'm at work)

#

If my memory is accurate I think the parser looks for the comma first when parsing a block value

frank lintel
#

it might not even been a string I seen it in. right now just trying to figure out why I got azul15 when we dont even use it...

frank elbow
#

I'm talking specifically about sandbox-options.txt, to be clear

frank lintel
#

oh the topic came up earlier using ,'s in strings

frank elbow
#

In regular Lua strings it's fine (I think that was the relevant topic from earlier too; may have just been a misunderstanding)

modern hamlet
frank lintel
#

unless its set that way I dont think every10min runs like that.

#

I mean to me if ya tell me ya got a 10 minute event trigger that just means it triggers every 10 min 'when you started it' not related to the time of day...

frank elbow
#

I think they're asking which event is triggered first, which is a fair question

#

I can't check myself at the moment

#

In other words, if every ten minutes runs at minutes 0, 10, 20, 30, 40, 50, and every hour when the minute is 0. The question is which event is triggered first when the minute is 0 (unsure if the events actually run on those particular minutes or not, but that's the easiest way to conceptualize it)

frank lintel
#

dunno to me an event never would do that unless you lucky enough to call it by the exact time in seconds milisec? I forget the name of how time tracked... but if that the case whomever created first.

frank elbow
#

The events would always be triggered in whichever order they're set up to be triggered based on how to Java code invokes them, so not necessarily whichever event handler was added first between the two events

#

I think that's accurate for a single event, but this is concerning two separate events

frank lintel
#

why I dont think you can say which... is first...

frank elbow
#

I'm unsure what you mean

frank lintel
#

its two different events

frank elbow
#

Yeah, EveryTenMinutes and EveryHours

frank lintel
#

you just said what im saying in a better way. :)

frank elbow
#

I think I said something different, but I don't know that I care to elaborate any further unless you really want to know ๐Ÿ˜„

modern hamlet
#

Their invoke order is important i was asking that order

frank lintel
#

wasnt my question. I dont know how internally events are hooked

frank elbow
#

The question is answerable by looking at the decompiled code. I'd check if I were home

#

You could also just find out via testing, if no one answers

modern hamlet
#

I couldn't test it because my hand is a little full ๐Ÿ˜›

#

i will check it k

frank lintel
#

tbh prob best way to get your answer though

#

I mean I thought 0 or let alone negative # index's were not even possible.

frank lintel
#

well okay got if I see this Compiling exposed class zombie.ai.states.PlayerEmoteState... Expected to find missing API page for path zombie/ai/states/PlayerEmoteState that just meaning there no annotation or thats a non-exposed class?

sour island
#

You can confirm with the LuaManager class

#

Some inherited classes are not exposed while their parent class is

frank lintel
#

Im not trying to dig hard just wondering if that was a quick sign Im now decompiling this with the exact java that the game using now

#

some how I had azul 15 dunno why... its Zulu(azul) 17

#

but either was yeah its def java17

#

now I wonder if lower lang level being used because of Kahlua...

sour island
#

That could be a strong possibility, I think the Kahlua is old as well

#

Could be why it's 17 but named 15

frank lintel
#

no I was wrong that was my fault some reason had Zulu 15 installed as a jdk (and no clue honestly where it came from)

#

I went back checked the JRE versions in the game and seen it is Azul/Zulu 17..

red tiger
#

Hehe.

#

I have to copy the expose code-block for PipeWrench to only expose the exposed classes.

frank lintel
#

every time so far capsid been running (which I didnt notice) was it was running off my default java jdk now I got it set to specifically use only the java the game uses

red tiger
#

Yeah that can be an issue.

frank lintel
#

now Im just trying to find the dang jar files so I can look at how it went...

fast galleon
#

remind me best way to add / remove items on server to a container

sour island
#

Check the debugtools

#

The vanilla ones have a remove/delete function

fast galleon
#

don't those work from client?

frank lintel
#

hmmm okay if you have java source not class's you can use that as a library right?

#

just wondering if IJ has some odd quirk that causing all the 'missings/unknown' cuz I went thru the steps fully and when adding zdoc-lua its like 'uh I dont know what this is...' then asks me to pick what this is.

sour island
frank lintel
#

ideas anyone? would classes be the right choice?

#

only asking cuz the docs dont tell ya this part.

red tiger
#

Hmm... I think this looks better:

frank lintel
#

mmmm cake

red tiger
frank lintel
#

what about you jab... you got a jar full of source code... what choice do you make?

frank lintel
#

because to me thats sources or sources archive dir... (cuz a jar is nothing more then that..) just want 2nd opinion

#

give a netbeans user a break ^_^

tawdry solar
#

i added a new item to my mod and it made my model for my other weapon dissapear

red tiger
#

woooo

#

I got capture Regex working.

frank lintel
#

๐Ÿ’ฐ

red tiger
frank lintel
#

okay well not sure if this right or gonna help but if I just renamed the jar to a zip I could instantly without problems have IJ see it as a Lua library now.

red tiger
#

Found a syntax error in recipes.txt...

#

lol

frank lintel
#

okay is this bad form? (IsoPlayer.getCoopPVP() == true) when getCoopPVP returns a bool? isnt this just adding more steps to check the == true ?

bronze yoke
#

if it's definitely going to be a bool, it just makes the code longer

frank lintel
#

so bytecode steps wont be just pointlessly added in from that?

bronze yoke
#

idk, it isn't exactly the same operation so the bytecode will be different, but never checked which is faster

frank lintel
#

ty that actually just gave me inspiration cuz I got a program just to check that derp...

wide oar
#

models-resource

#

xD

#

Question

#

Can items not have tooltips?

#
{



    item bakugo
    {
        
     
        Type                        =   Clothing,
        DisplayName                 =   (Outfit) Katsuki Bakugo (Hero Outfit),
        Tooltip                     = "If you think you'll be reborn with a quirk in your next life, why don't you take a last chance swan dive off the roof?!",
        ClothingItem                =   bakugo,
        BodyLocation                =   Shoes,
        BloodLocation               =   Head;Neck;Trousers;Jumper;Hands;Shoes,
        NeckProtectionModifier         =   1,
        Icon                        =   cosplay,
        StompPower                     =   2.5,
        CanHaveHoles                =   false,
        RunSpeedModifier            =   1.05,
        CombatSpeedModifier         =   1.25,
        ScratchDefense                 =   100,
        BiteDefense                 =   100,
        Insulation                  =   0.80,
        WindResistance              =   0.75,
        WorldStaticModel            =   gobslay,
    }
    recipe Katsuki Bakugo (Hero Outfit)
    {
        Money       = 50,
        Result         : bakugo,
        Time         : 50,
                Category    : Sankese,
    }
} ```
#

doesnt work in game

fading horizon
#

I just made my first mod ever. Am I allowed to post it here? I didn't see anything in the rules

drifting ore
#

Might be a stupid question but how to write an if that'll check if player is being chased by zombies?

bronze yoke
#

if getPlayer():getStats():getNumChasingZombies() > 0 then

drifting ore
#

Would ~= 0 work fine too?

#

But anyways thank you so much for helping

manic relic
#

anyone know where the textures are for these flags?

#

wanted to make a reskin of one of them or maybe even add custom ones

red tiger
#

Going to update my VSCode extension in a bit with some improvements to the syntax highlighting.

drifting ore
tawdry solar
#

more specifically heqre

manic relic
#

nah its not

tawdry solar
#

no clue sorry

#

they may be encoded

#

anyone know what this means

#

i added this weapon

#

and 2 of my models no longer work

wide oar
manic relic
#

what are decor images

tawdry solar
#

i assume

#

like tiles

manic relic
#

and how do I edit them?

tawdry solar
#

i havnt messed with that

#

this is a stretch BUT

#

oh hey

#

uh

#

yeah

#

i copied some of my other code

#

and changed it all

#

but it still doesnt work

#

๐Ÿ‘

ancient grail
#

the .pack files

#

if you want to learn how to do tiles you should ask #mapping

manic relic
#

k

ancient grail
#

๐Ÿ˜… youre welcome

keen silo
#

Hello, I need some help with my automation tool for my Voiced Radios & TV mod, I managed to programatically access the RadioData.xml, get the Lines and their voices and get the audiofiles and time tags.

Because of the way the mod is made, I need to add the sound to a script file.

It would look like

sound {BROADCAST_ID}
{
    category = Object,
    clip
    {
        file = media/sound/Broadcasts/{BROADCAST_ID}.ogg,
        distanceMin = 5,
        distanceMax = 50,
        reverbMaxRange = 10,
        reverbFactor = 0,
    }
}

Does anybody know what is the format name or if there is one for this type of file?

Im trying to automate the insertion of data using python, and I would rather us a good format library instead of writing a long string with every tab and newline to keep it formated

bronze yoke
#

it's an original format for pz, there are no libraries for it

keen silo
#

f*ck

#

well, worth a shot

#

i guess i'll have to write a very long string

#

(why couldn't they use json stressed )

tawdry solar
#

im sad now

#

can anyone help?

zinc pilot
#

does anyone here have experience with messing with vehicle physics in MP?

keen silo
chrome egret
red tiger
#

The problem is my API is in TypeScript.

#

I could translate it to a pure Lua lib.

#

I can see that being useful down the road.

#

Right now I'm working on VSCode extension support for ZedScript.

#

Generating it from Lua can be easy to write actually.

red tiger
#

I also have a modified JSON library that works with PZ.

chrome egret
#

@keen silo what would make it easy to integrate from a python app?

keen silo
#

I guess that we would need a way to store the different objects (sounds, items, whatever), get their contents, write their contents, add different tags acording to what they require, and then writing those changes to the file

#

currently, what im doing is just deleting the last } from my script file, and adding this long line of text that formats it nicely and closes it

#

since I only have one type of items on this file (sounds), and they are all the same, it is not a big issue to me, but it would probably be nice to have a way to make sure everything is formatted correctly

red tiger
#

This API is a deep-searching one. If you want a shallow, generic key->value API, Fenris_Wolf made one in Python 3.

#

IIRC it's a nested dictionary model.

frank lintel
#

now is the time I wish I didnt erase my freebsd install...

red tiger
#

My stuff is probably doing way more than what's needed.

frank lintel
#

lua.c lua.h .... basically sums the issue up atm

red tiger
#

Rewrite of Kahlua when?

frank lintel
#

no original lua

red tiger
#

lol

#

If I rewrote Kahlua, I'd call it Brandy.

frank lintel
#

I went that deep just to try and actually run lua

red tiger
#

People build their own kernels. (I don't know why)

#

I assume it's C programmer brain dialed up to 11.

frank lintel
#

no I was just wanting to test the actual speed of (bool) vs (bool == true)

#

well no cuz lua is C

#

11 would be making it in java :P

red tiger
#

11 would be writing in ASM.

frank lintel
#

tat going back a bit too far

#

it being in C is pretty down there as is

red tiger
#

You would've hated being near me as a kid then.. =P

#

I played a little with ASM.

frank lintel
#

oh I dont mind ASM

#

just saying for what lua is. asm might be way too low level

red tiger
#

Yeah

frank lintel
#

but tell you what in java there is a clear difference between a single boolean IF logic and using an == true

#

I found that alone just by playing with PZ's math.clamp

chrome egret
#

Say more?

red tiger
#

Give it ~5 minutes however the ZedScript VSCode extension is updated.

#

Fixed some highlighter bugs and what not.

ancient grail
#

@dark wedge you dont consider zedDmg as part? Its weird but it can ve considered as part i think?

frank lintel
red tiger
dark wedge
chrome egret
frank lintel
#

well found a code speed increase for clamp.

#

also doing so found that any >= <= == ~= is slower then just > < not

#

enough that just using System.currentTimeMillis() its measureable

ancient grail
#

But yeah like you said "under normal circumstances"

red tiger
#

!== 0

frank lintel
#

facepalms

#

Im gonna name something after you as I aim on someone in honor of that :P

red tiger
#

Nots with explicit integer literal expressions are fast.

frank lintel
#

well this is a bool compare in this case

red tiger
frank lintel
#

Im about to hop into a shikra

red tiger
#

I remember making a fast pi calculator using int math

#

The guy interviewing me was confused lol

frank lintel
#

so says the guy talking about ASM

red tiger
#

Registers my friend.

frank lintel
#

and you know Im right because I bet < 1 out of 100mil know asm

red tiger
#

Kahlua doesn't support bitwise and I am offended.

frank lintel
#

oh so am I. I was like wtf there is no ! like wth

red tiger
#

Lua 5.2 when?

frank lintel
#

well they got not... but they dont do !== like you said

red tiger
#

!== Is a JavaScript explicit not.

frank lintel
#

unless Im missing ya on bitwise meaning

#

well we are in java land too remember :P

red tiger
#

Pretty much !=

frank lintel
#

and this is why I am trying to compile lua atleast first with C...

red tiger
#

Js makes!= Implicit

frank lintel
#

Im glad they got short circuit logic atleast

red tiger
#

"1" == 1

#

1 !== "1"

#

Welcome to JavaScript.

#

I am the only human being that likes JavaScript

#

XD

#

I like how JavaScript handles null.

frank lintel
#

its null.

red tiger
#

Null !== Undefined

frank lintel
#

no null is just null

red tiger
#

Null == undefined

#

Undefined is so useful

frank lintel
#

okay back to flying ttl maybe I'll turn the stream on

red tiger
#

Null is a value in js

#

Cya

wide oar
#

Does anyone have the Katana model in .fbx

#

or just a pack with all the weapons in fbx so i can scale my own weapons better lol

hot patrol
#

anyone know if it is possible to to have a crafting recipe not appear in the crafting menu? one of my weapons has mechanic similar to opening and closing the umbrella and I want to hide that from the crafting menu as to not bloat the already laggy menu with more redundant crafts.

sour island
hot patrol
#

this is the function I am using for the craft function Recipe.OnCreate.DakiFlip(items, result, player, selectedItem, firstHand, secondHand) result:setCondition(selectedItem:getCondition()); if secondHand or firstHand then if not player:getPrimaryHandItem() then player:setPrimaryHandItem(result); end player:setSecondaryHandItem(result); end end

#

not sure if that's important

frank elbow
#

Perhaps unclear without checking the java, so short answer is that there's an IsHidden value on your recipe you can set to true which will hide it

#

I was messing around in the animation viewer & when I closed it I saw this

#

I assume I just hit some key on accident while in there, quite the surprise

drifting ore
frank elbow
#

That's why I shared it ๐Ÿ˜„ thought it was neat

keen silo
#

alright, I finished the automation script

#

I decided to make the transcript of the next program after the one I did

hot patrol
frank elbow
#

Should be, yeah

glass basalt
#

yeah it makes it a hidden recipe you can't see in the crafting menu

hot patrol
#

nice. I'm not used to things working out this well aPES_LulLaugh

keen silo
#

this is the script:
Welcome to Exposure Survival guys.
I'm Dean and I'm goin' back to nature.
This is a show that'll teach you the basics of outdoor life.
But before we get to survival - lets nail the basics.
Let's fish.
Now I'm sure you've got your rod...
But then: bait.
What bait should you get?
Well worms are common, right?
So dig, and get a bunch.
Or there's lures, or maybe smaller fish - ey?
Find your river, cast the line - wait a while.
Job done.
Until next time guys.

glass basalt
#

...this is AI generated, isn't it?

#

has that uncanny filter in the bg

keen silo
#

yes

glass basalt
#

still really cool, looking forward to it getting released ๐Ÿ˜

hot patrol
keen silo
#

im not gonna voice every line :v

keen silo
#

but

#

Im planing on improving the automation script

#

and what I want to do

#

is release the mod + automation script

#

then, everyone can start running the script with whatever voices they like, and adding to the mod

#

if they want, they can even add their own voice to the game

hot patrol
#

That's pretty cool.

#

I like it

keen silo
#

(Currently the automation tool is able to overwrite already made Broadcasts)

hot patrol
#

yep I would absolutely have rocket teaching me how to climb everest and make a campfire

#

Nobody ever expected this guy to be the host of exposure survival XD

weak sierra
#

can anyone help me locate the bit of code that draws the "Mod: XYZ" tooltip

#

i can't seem to find it

#

looked in ISTooltip and ISTooltipInv

#

searched all the lua files

#

can't even find a translation string for it

weak sierra
#

that's a news post tho

#

is it not

#

:P

glass basalt
#

it has the information you are looking for

#

ill paste it, one sec

weak sierra
#

i did find these

glass basalt
#
Fixed "Mod: XYZ" in item tooltips for mod items always displaying the name of the last mod loaded.
Added Tooltip.ModName debug option to control displaying "Mod: XYZ" in item tooltips for mod items.
[NODOT]<INDENT:40> This could be changed to a Display option if wanted (translations needed though).
weak sierra
#

searching for Tooltip.ModName yields nothing, however

glass basalt
#

so i'd look for Tooltip.ModName

#

ah

weak sierra
#

im guessing maybe it's in the java..

#

but that's weird

#

cuz the render code sure isn't

#

for the tooltip

glass basalt
#

weird to have something benign like this hardcoded

#

it makes it NOT benign

weak sierra
#

yeah.

#

i wanted to disable it, should have been easy

glass basalt
#

people are forced to be informed which mod an item comes from ๐Ÿ˜”

#

unimmersive as shit, I want to be confused lmao

fast galleon
weak sierra
#

is it?

#

says it is in debug

fast galleon
#

I like not knowing, It's always off. The colour is a bit weird and intrusive.

weak sierra
#

ah

#

it is in there

#

weird that i couldn't find anything for it by translation strings

frank elbow
#

Looks like it's untranslated; it's set in InventoryItem

#

By the way @weak sierra, what did you end up doing as a workaround for the sandbox options issue? After I noticed it I added a server + client command to grab & set updates but that feels less than ideal (a fix to the actual issue would be actually ideal, of course, but I'm wondering whether there's a better way nonetheless)

weak sierra
#

i haven't tested what i have right now to verify that it works

frank elbow
#

Something similar to what I've described, or no? Not looking for a full description, just an idea

weak sierra
#

not similar, automated

#

unless u meant automated via commands

#

i HAD been working on something that did that (store sandbox options in global mod data, clients pull from it)

#

but i was having trouble finding a way to set the sandbox options on the client end

#

then i stumbled across a trick that lets me automate it from just the server end

#

but i need to validate it

weak sierra
#

was hoping to just quietly patch it out

#

bah

frank elbow
# weak sierra unless u meant automated via commands

Right now I have it set up to grab sandbox options when clients join, so it's automated but if they change while the player is online they won't persist. I suppose it would be wise to have a way to push updates

weak sierra
#

how'd you do that

#

ill share what i have if u share what u have :P

#

that said, u could easily put that on a timer

frank elbow
#

I don't much care for how I did it honestly, it's just via server commands

weak sierra
#

yeah but i mean

#

the actual mechanism

#

the commands are not interesting

#

the code they call is

#

curious how u propagated it and set it

frank elbow
#

Ohh, just by setting it in SandboxVars directly

weak sierra
#

i tried to do that and found i had to convert them to ConfigOptions

#

and then that the relevant functions were non-existent

#

maybe i was using the old doc by mistake

frank elbow
#

Via the SandboxOptions global? I should clarify I have it set up specifically to sync my mod's sandbox variables, so not the same process

weak sierra
#

OH

#

i was making something that syncs everything

#

dynamically

frank elbow
#

Ahh, gotcha

weak sierra
#

so i had to account for unknown named vars

faint jewel
frank elbow
#

Dunno whether the same is true for whatever sets the values

weak sierra
#

well if the thing i found works it wont matter cuz it just triggers the native sync functionality

#

and i think it does work

#

when im 100% sure i'll release a little minimod that fixes it

frank elbow
#

Oh, nice

keen silo
#

@hot patrol Im trying to improve the automation script. I currently managed to make it output the text transcripts in roughly the same color as the game does. My plan is to add a config file, where you place the following information:

Your Elevenlabs API Key
The broadcast ID you are using
11 Voices (can be repeated)
Voices contain:
Voice number : 1-11 (just to know which is which, serves no purpose in script)
Voice name : the name of your voice in Eleven Labs
Voice stability : the stability value
Voice similarity_boost : the similarity boost value

Once Im done with this and I check that it works correctly, I'll try to voice a couple of programs in Life and living, and I'll upload the mod with the automation script. I guess I could finish by tomorrow

modern hamlet
#

I'm trying to repair walls and doors. I can see its health decrease when I damage to it, but when the zombies hit, the health I see with getHealth() doesn't change. I'm a little confused, are zombie damage and player damage different things?

wide oar
#

hey guys plewase help me im getign really fukcing frustartaed