#mod_development

1 messages ยท Page 379 of 1

bright fog
hot void
#

iam trying i swear T_T

bright fog
#

You have a problem, tell us what problem you are having

hot void
#

that both the items are adding

bright fog
#

Else why are you here in the first place ?

hot void
#

1 should add and 1 should remove

bright fog
#

Adding what ? Where ? How ? What is it supposed to do ?

#

Come on we don't know your mod

#

You need to tell us what you expect, how you do it and what's going on

hot void
#

using the vanilla makup system

#

so another tool which is an acid brush removes it by finding that item that is added in the player body but hidden and removes it

#

the problem is

#

they are both doing the same thing which is adding only

#

so i can't remove anything

#

iam lost, sry iam stupid

sonic needle
leaden glacier
#

guys how do i make custom recipes ?

knotty stone
#

whats a custom recipe, a changed vanilla recipe or a adjustable recipe with sandbox options? specifics are key ๐Ÿ˜„

leaden glacier
#

yeah sry im really new to this stuff, i was trying to create a mod that adds the recipe to craft a baseball bat somewhat easier but it didnt work. found out that i forgot a lot of "," at the end of the lines. (i now there are already workshop mods there) but i wanted to start something easy

bronze yoke
#

it doesn't really have to be updated, we don't have any new documentation to add to it

mint fractal
#

Hello everyone!

I'm new here, so please be kind to me, hehe!

I'm programming a software in Python to perform a soft wipe or soft reset. But I'm having difficulties deleting the correct areas from the map based on the location of mod safehouses or safezones (admin panel), even after identifying the areas using mapmeta.bin and map*.bin, the projected areas are still being deleted.

Can anyone help me?

Thank you for your time!

clear aurora
#

hey, im working in adding a custom furtniture, i have a model in blender but i dont know how can i convert it into a .pack archive for the game, is there any guide or someone who can teach me to do it?

willow tulip
#

Don't ask to ask to ask, just ask to ask and be told that no, you can't ask! but you can ask to ask to ask. Asking is 100% forbotten however.

dull moss
#

Are you drunk? xd

mellow frigate
#

Do we have any information on the url / Homepage from mod.info not beign available via "url=" setting? Is it a bug, design change, setting name change ?

bronze yoke
#

there is a url whitelist, only very specific domains are allowed

#

stuff like the forums, wiki, and steam i think?

red tiger
#

Or extracted this to a config file in the cache?

bright fog
mellow frigate
#

setting it to this discord is not valid. (and dont try to write it here like I just did or you will get banned temporarily)

red tiger
#

I also thought that discord invites / discord links were going to get domain-whitelisted at a point.

bright fog
# mellow frigate setting it to this discord is not valid. (and dont try to write it here like I j...
    public static boolean isIndieStoneUrl(String url) {
        return url != null
            && (
                url.equals("https://steamcommunity.com")
                    || url.startsWith("https://steamcommunity.com/")
                    || url.equals("https://projectzomboid.com")
                    || url.startsWith("https://projectzomboid.com/")
                    || url.equals("https://theindiestone.com")
                    || url.startsWith("https://theindiestone.com/")
                    || url.equals("https://pzwiki.net")
                    || url.startsWith("https://pzwiki.net/")
            );
    }
#

These are all the valid links

#

But yea I think they don't allow Discord links for security reasons

#

Bcs of some type of scams that make you join some specific servers

#

The way to add any link you want is to pass through the steamcommunity redirect

#

https://steamcommunity.com/linkfilter/?u=YOURLINKHERE

#

I'll add that to the wiki I guess

dull moss
#

In logs, does one of these numbers indicate # of a tick?

LOG  : Lua          f:1173, t:1774175691456, st:10,676,715,574>
#

by any chance

#

or something similar

mellow frigate
dull moss
#

assumed something similar, but what about tick number, i see that in st:10,676,XXX,YYY xxx goes up by 25 every time

#

but idk if its safe to assume that that means its different ticks

bright fog
#

But no there aren't any indicators besides what Tcherno said if I'm not mistaken

#

@mellow frigate regarding the URL parameter, did you manage to make it work actually ?

#

Even for one of the accepted urls ?

#

I think bcs I'm on Linux it's not working rn

mellow frigate
bright fog
#

Ok good to know that this is a me issue

#

The problem is most likely that they don't prioritize the overlay

bronze yoke
#

f is tick number, t is time in ms, st is server time in ms

bright fog
#

Compared to what I did with Wiki That for example

red tiger
#

Made progress in a feature for my Java patch allowing a thread-pool of Lua environments pass and calculate async worker tasks.

#

Workers in this design are stored in lua/worker and have their own API isolated from the game.

#

Large computation tasks stuff. Thought I'd share.

paper ibex
#

noice

jolly thorn
#

very noice

red tiger
#

I'd imagine that tasks requiring data-heavy, periodic or I/O tasks could benefit from this.

bright fog
knotty stone
#

@bright fog for ZedScript. For model, it sure can xD. items is needed to create mechanic recipes, and it doesnt seem to detect that its commented out. schobiPanic

wintry tree
#

I have another issue with my mod that I'm struggling to fix. The mod works perfectly fine with workshop mods, it's locally installed mods that are the issue. The mod locks traits to a specific occupation. It works by inserting a trait to all occupations that are not the specific occupation I want to make the traits for. Then it hides that trait in the selected traits box. With local occupation mods it inserts..something but it's not my trait. It doesn't block the occupation specific traits. At least, not on first game load. On the second load it has the mutually exclusive data but it will never hide the trait. Does anyone know why that might happen and how to fix it?

bright fog
#

If you ever feel like tweaking some of these

#

Also the table block is a bit weird ...

#

Bcs from my understanding, it can take any parameters and any sub blocks

#

Also don't take anything said by the extension as it saying it's a fact, it bases itself on a dataset that is incomplete because it is new and it needs the community to help document everything

#

Also the comment part is an oversight on my end lol

knotty stone
#

just wanted to get it out, bit annoying with all the false red warnings ๐Ÿ˜„

bright fog
#

Yea that's normal, the extension is in active development and needs people to test it out

#

Make a pull request

#

Don't hesitate to make feedback on the extension anyway tho

#

You can also open issues on the github repo of the extension

#

Makes it easier for me to track these problems

#

Just need to get onto it on my end

cloud hawk
#

Isn't it a bit weird that sendClientCommand will take an arbitrary IsoPlayer as argument? This way, any player can modify their own local mod and send commands for other players. Or am I missing something?

wintry tree
#

is OnWeaponSwingHitPoint still a valid event?

bronze yoke
cloud hawk
bronze yoke
#

it's to make clear which player from that client is sending a message in splitscreen

red tiger
#

I think it's old API left there for compatability.

bronze yoke
#

it's a little vestigial, especially since a responding command cannot do the same thing and has to specify the player through the argument table instead

mellow frigate
wintry tree
#

Okay, thank you

dry stone
#

I think I can confirm now that my mod will be super popular. Every time I jump in game to test, the zombies keep crowding around me to see

open drum
#

good day fellow developers~

#

Could anyone tell me if it's possible to port a character from one world(save) to another? Not in SP but in MP?

#

I tried copying and pasting player.db from one save to another and matching the "reset code" from the .ini file

#

still made me create the new char. maybe i need to copy and paste something from Client side as well?

wintry tree
#

is this the correct way to check if a player has a modded trait - if player:hasTrait(mymod.CharacterTrait.MODDEDTRAIT)

open drum
#

after that function

#

and if it produces True

#

then it's a correct way of doing it

bronze yoke
wintry tree
#

Thanks. I'm trying to do something beyond my ability again so I'm having Gemini help me and it keeps arguing with me that this is incorrect. I downloaded some other mods to look at as an example and they all do it this way. Gemini makes me crazy

cloud hawk
#

A Events.OnClientCommand.Add(onClientCommand) is passing a null player to local function onClientCommand(moduleName, command, player, args). Is this a bug? I'm trying to get the player that issued the command. I do get an instance of IsoPlayer, but it comes with all fields empty (username, etc)

#

Or maybe there is a trick I need to do with the received IsoPlayer to get the actual instance

bright fog
#

When are you running this ?

cloud hawk
#

A lua/client/foo.lua sends a command via sendClientCommand(getPlayer(), "foo", "bar", {})

bright fog
#

When ?

#

Not where

cloud hawk
#

Events.OnAddMessage

bright fog
#

You're not trying to access the fields are you ?

cloud hawk
#

No, I'm trying to get the inventory of the player via player:getInventory(). But it returns nil there, when I actually have items

bright fog
#

Server side it returns nil ?

cloud hawk
#

Yes, that is server side (maybe getInventory is client-side only?)

bright fog
#

I'd be surprised

#

Bcs the server should know about the player inventory

bronze yoke
#

are you in build 41 or build 42?

cloud hawk
#

41

bright fog
#

Bruh

#

Well then the server doesn't know about its inventory in Build 41 lol

bronze yoke
#

inventory was client auth in build 41, i don't remember what the server could see or not but i wouldn't try to modify it on the server either way

bright fog
#

If it returns nil then the inventory literally cannot be manipulated server side then

cloud hawk
#

It's a ready-only access tho. It doesn't work on 41 then?

bronze yoke
#

probably not

bright fog
bronze yoke
#

with items in build 41, do whatever you need to do on the client

bright fog
#

The inventory ? Server doesn't know about it anyway

cloud hawk
bright fog
#

Yes, client side

#

That's what albion keeps telling you man

#

The inventory is handled by the client in B41

cloud hawk
#

So this should work only in build 42?

bright fog
#

Bcs the majority of stuff are client-auth (which is why hacking in that build is so easy)

bronze yoke
#

don't worry about having a proper server auth security structure, build 41 is fundamentally not designed that way and any exploits in your mod will not be as bad as the exploits inherent in the game itself

bright fog
#

You're working on B41 ?

cloud hawk
#

Yes, current stable

bright fog
#

So deal with it with B41 methods

cloud hawk
#

I mean, wdym deal with methods lol. I'm trying to figure out what the premises are

bright fog
#

:|

#

Did you read albion's messages ?

cloud hawk
#

gzuz...

bright fog
#

Like that's the 5th time we've been telling you about it

#

Only the client knows about the inventory

#

6th time*

cloud hawk
#

ok, maybe I should learn how to count then. anw, thx for the info, will move the mod development to unstable

bright fog
#

Which game version do you want to mod for ? B41 or B42 ?

#

If you're on B41, the client handles its inventory

cloud hawk
#

whatever player:getInventory() works server-side is fine by me

bright fog
#

What mod are you making ?

#

Don't you care about the version ?

cloud hawk
#

Not a problem working with unstable for now (assuming it will become stable one day)

bright fog
#

Of course it will

wintry tree
wintry tree
#

I dunno man. I'll look through these. I hope they help but right now I just don't get it. my mods name is hockeyPlayerOccupation, the traits name is highsticker. Null at line "if player:hasTrait(hockeyPlayerOccupation.CharacterTrait.HIGHSTICKER)" I gotta go lay down. Nothing I'm doing is fixing it.

open drum
#

anyone has any idea on how to port a character from one save to another save world in dedicatedMP

#

??

#

i've tried copying and pasting the player.db

#

it didn't work...

wintry tree
#

Yeah

#

CharacterProfession.register("hockeyPlayerOccupation:hockeyPlayer")
CharacterTrait.register("hockeyPlayerOccupation:highsticker")

mellow frigate
wintry tree
#

Oh..so I haven't been registering my traits and occupations right this whole time? dang it

mellow frigate
#

you can store it the way you want, but as a globallly accessible variable.

wintry tree
#

THanks, I will try this

wintry tree
#

Hm, same error

#

I did something like this for my other mod. So that can use addGrantedTrait. That mod mostly works. For the time being, I'm just trying to say if they have this trait. Print that they have it when they swing the weapon, but I can't even manage that.

bright fog
#

ZedScripts 1.9.1

  • also now properly handles comments /* */
#

@knotty stone this last one will interest you a lot I think ๐Ÿ˜‰

#

Tell me if you get any issues since I haven't tested it deeply for now

silent zealot
#

I don't think there is any method to get a trait object from a name, and the vanilla traits are are in a nice handy pre-made variable form such as CharacterTrait.DESENSITIZED but your added traits don't get included in that.

bronze yoke
#

you can get them by name, but you probably shouldn't

silent zealot
#

Sneaky reflection, or actual API method?

bronze yoke
#

actual api method

#

there is no sneaky reflection anymore

silent zealot
#

looks at -debug flag only true for the 99.9% of players who have not unlocked their true potential to reshape the world...

bronze yoke
#

CharacterTrait.get(ResourceLocation.of("namespace:trait"))

#

i generally recommend not to do this, it goes against the entire point of registry objects

silent zealot
#

...actually that percentage is probably higher.

bronze yoke
#

but it can be needed for things like serialisation

wintry tree
#

It still didn't work after I assigned to global variable. I still get null

silent zealot
#

the global variable is nil?

#

or the return from hasTrait()?

bronze yoke
#

hasTrait cannot return nil

silent zealot
#

...I know but asking the questions means if they say that returns nil you have to step back to figure out what is actually happening

wintry tree
#

Can I just post it to you? All I'm trying to do right now is say if player has a trait then print yes

silent zealot
#

No, I'm wandering abck and forth doing various stuff - just post the code here (mainly the registries.lua entry and the line where you're using hasTrait()) and the actual error

wintry tree
#

hockeyPlayerOccupation.CharacterTrait.HIGHSTICKER = CharacterTrait.register("hockeyPlayerOccupation:highsticker")

#

hockeyPlayerMain = {}

hockeyPlayerMain.applyHighStickBonuses = function (playernum, character)
local player = getSpecificPlayer(playernum)

if player:hasTrait(hockeyPlayerOccupation.CharacterTrait.HIGHSTICKER)then
print("Yeah");
end
end

Events.OnCreatePlayer.Add(hockeyPlayerMain.applyHighStickBonuses)

silent zealot
#

from the in-game lua console, what do you get if you run print(hockeyPlayerOccupation.CharacterTrait.HIGHSTICKER)

#

Also, is there any error or it just doesn't work?

Adding a Print("in hockeyPlayerMain.applyHighStickBonuses") will help you confirm the event is triggering your function correctly, so you know if it's not being triggered at all vs. the if statement resolving as false

wintry tree
#

Callframe at: hasTrait
function: applySluggerBonuses -- file: hockeyPlayerMain.lua line # 4 | MOD: Hockey Player Occupation
ERROR: General f:1299, t:1774232144749> ExceptionLogger.logException> Exception thrown
java.lang.reflect.InvocationTargetException at DirectMethodHandleAccessor.invoke(null:-1).

#

wait...what?

silent zealot
#

the print is good, that tells us the global is set

wintry tree
#

it says apply sluggerbonuses...

silent zealot
#

which line is line 4?

#

Have you quit and restarted to make sure it not lua reload failing to pick up changes? It can be screwy when events are involved.

#

Or if a file had a syntax error that prevented loading.

#

normally the main-menu reload works, but... I just don't trust it 100%

wintry tree
#

omg...please don't hate me. sluggerbonuses is an old script...that I thought I got rid of. I'm sorry, I'm embarrassed.

silent zealot
#

Pretty sure we've all done that lol

wintry tree
#

The print script works

silent zealot
#

Huzah!

digital osprey
#

hey guys hope you all have been doing great. i am trying to work with the new tag system, i created a few tags today using strings, started doing the logic and everything worked great, but i started noticing some vanilla tags that i wanted to start using as well. then i noticed the tag system changed to an enum and trying to call the vanilla tags in the same way as my custom string ones throws errors all over. wondering if i should register my custom tags using the new system or just create new string tags for the items with base tags that i am interested in

silent zealot
#

You're talking about tags on items?

digital osprey
#

yeah

silent zealot
#

Same as traits that we were just discussing: when you add a new tag using registries.lua store it in a global veriable

#

then you can use that variable as the trait object in lua, in the same way the vanilla tags are all in ItemTag.SOMETHING

digital osprey
#

and then i can put it in an array and check a few tags against tags on an item right?

silent zealot
#

Yes, you can do all sorts of logic like that

#

but the core thing is when you create a tag assign it to a global variable, and that lets you reference it later. It can be a solo variable, in a table, whatever.

#

and you can make tables of tags later to iterate through, etc etc

digital osprey
#

is there a new special way of getting that value to compare? when i was doing it like that it was finding my custom tags but wasnt finding the vanilla ones:
for _, tag in ipairs(MasterFilterTagObjects) do if actualItem:hasTag(tag) then shouldHide = true break end end

#

i guess i need to find the global variable its stored in right?

#

instead of feeding it a string

bronze yoke
#

strings don't work at all

silent zealot
#

All the vanilla tags are in ItemTag.java (this is one of many reasons why using ZomboidDecompiler to have a copy of the Java code to reference is handy)

#

So the base:ammo tag ins scripts is referenced as ItemTag.AMMO in lua

digital osprey
#

tyvm i was confused it was working when using strings and :contains(tag). i will try the tags with this naming convention to see if it works using the new system, so basically i call it item:hasTag("ItemTag.AMMO")? InventoryItem resource says the method takes a string

silent zealot
#

Where do you see it taking a string?

#

That's decompiles 42.15.3, and teh 41.15.0 javadocs also have

#

Umbrella in your VS Code may not be 100% up to date

digital osprey
#

i was going by projectzomboid.com it says so there
hasTag
public boolean hasTag(String tag)
i need to decompile the game tomorrow i think

bronze yoke
#

that's from build 41

digital osprey
#

awesoome ๐Ÿ˜„

#

โค๏ธ thanks i knew ill get real help here all works now the docs even have the new item tag variable list

#

im surprised i got this far with b41 docs lool

willow tulip
#

@red tiger Honestly, I would love if something like that API permissions was applied to java mods even. Like just have the game attempt to detect if zombie is in use (or the classdirs have been changed) and pop open "Java mods detected, these can be insecure, Continue (Yes/No/More info)

#

Modding in general (for all games) lacks a lot of informed consent about access permissions. And it really should be on the developers to provide it. (Since relying on a mod to tell you it might be dangerous.. completely defeats the point if the mod is malicious)

bronze yoke
#

having a 'java mods are dangerous' popup that malicious java mods can just hide seems a little pointless

willow tulip
bronze yoke
#

it's not the entry point though

willow tulip
#

Or some kinda launcher?

bronze yoke
#

come to think of it, a malicious java mod can just not open the game

#

if you installed it they already got you

#

they don't have to wait for you to load in to start doing malicious stuff

willow tulip
bronze yoke
#

the game is 99% java, it just has native libraries for some super performance sensitive stuff

willow tulip
#

More and more I feel like this game could use a launcher. Especially with some Lua mods managing to brick the main menu when people are silly enough to add them to their main menu mod list

#

(even if the launcher does nothing more then check a few things, launch the game and give you an option to delete any persistant data that tends to muck up the game, like current loaded mods, UI window positions, zombie folder, etc)

#

Could let people configure ram allocated to the game while they are at it...

#

since thats like 90% of the reason people muck with the .json

dry stone
#

I did it ... I got the DOS filesystems in my classic PC mod to sync themselves to the server in multiplayer

#

It does 2 things.. "dedupe" manifest. Any file that is common and known to all clients, it's transmitted as just a hash code. Unique files end up in a zip file. Everything gets stored in the player's save folder (single player) or in the server's save folder (MP)

#

So if you open a DOS pc and its got like 50 megs of games on it... 99% of that comes with the mod. Server sends a zipped manifest of hash codes - like a few kilobytes to cover nearly all the data. Stuff like save games, high scores, those files are unique, so the server sends them separately.

#

When you finish using the PC and close its window, the client sends a new manifest and unique file zip back to the server

#

so in MP, if you install a buncha games, play with a computer. Later your buddy comes and uses it - he'll see all your files. It's tied to the hard drive ID installed in the computer.

willow tulip
#

'lua chucksum error' = 'I didn't bother to spend 1 day making a remote deduplicating file hash system thingy'

willow tulip
silent zealot
willow tulip
#

Basically how I did it back in the day was the server sent a 'file system' where each file linked to a 64bit hash (Trust me, 32bit hashes are not enough and you will get collisions! ask me how I know!), and if the client didn't have a file matching that 64bit hash it would request it from the server

#

then the client just had its own files (hashed on startup) and all the files in the 'cache' dir (named after their hash ids)

#

birthday problem is a pain in the ass ๐Ÿ˜›

silent zealot
digital osprey
willow tulip
#

I remember back in the early days of MP games, games like halflife would just.. download entire dll's to mod the game with lol.

silent zealot
#

Especially with so many games having no built in mod support so people have to use tools like Bepinex/ASI infiltrators/dll hacks

willow tulip
#

without so much as asking if you wanted to download mods

#

Just oh, you joined a server with a different gametype? lemme download and install that for ya!

#

TBH, what I really want is just zombie folder to be deleted on version change, or some other reminder to people to yaknow, update your java mods ๐Ÿ˜›

#

I feel a little bad about all the bug reports going to TIS because people forgot they installed realistic car physics and PZ updated ๐Ÿ˜›

#

maybe once they get that msgbox working on mac/linux i'll use it to alert people to running realistic car physics on the wrong PZ version

#

(Java mods can't do UI stuff, so its problematic alerting a user via a java mod)

red tiger
#

I'm going to add a config file that's user-defined for Sickle to allow domains.

#

I believe that this should be user-controlled.

#

Discord invites are something I think can be spammed from servers or mods but that shouldn't ruin the option to share and connect with servers / communities for mods / servers that are 99% of the time not malicious and nothing is automatically joined / transacted from opening those urls.

#

:(

#

That's how I grew my server back in 2015/2016.

#

It might be better to do a permissive / dialog for link requests based on policy. ๐Ÿค” It'd need to be a Java-side UI element because of malicious mods hooking into the accept button or modifying it to stay hidden.

paper ibex
#

https://steamcommunity.com/linkfilter/?u= is not good enough ? ๐Ÿ˜ฌ

red tiger
#

@paper ibex Just mocked a template:

#

I'd modify openUrl to be:

--- @param path string
--- @param policy string
openUrl('www.google.com/search', 'google.com/*');

Which could be prompted if not allowed for the user to accept once or add the policy to the file.

#

I'm going to write a Sickle API call requestOpenUrl(path, policy, callback) in the meantime.

#

It's good to know if the policy is rejected.

#

This could allow for configured third-party tools on the backend for servers to write advanced integrations with some security.

#

:)

paper ibex
#

cool concept, btw, will this be easy to upgrade on game version changes?

red tiger
#

Sickle has its isolated environment that hooks into PZ code.

dry stone
red tiger
#

I'm not using mixins to avoid abstraction.

willow tulip
red tiger
#

I just found out that ClickUp code-blocks doesn't support Lua syntax.

#

:(

willow tulip
#

its not a huge deal to implement. any MP game that supports mods really should support a hashed/versioned file system

#

with a cache so you don't have to constantly resend files -_-;

dry stone
willow tulip
#

the number of games that don't really have ANY support for when server-client files mismatch is sad -_-;

willow tulip
dry stone
#

When you close the PC it needs to compare all file hashes on disk to that to determine if its a dedupe or a unique file. So instead of hashing god knows how many files on the spot, I do it in a file monitor on the dos filesystem folder

#

by the time you close the PC, it already knows what's what and is mostly just putting the stuff in zip files to send off

willow tulip
#

modern windows caches files into ram, and ssd's do wonders on loading large files fast (on the order of 2~8gigbyte/second)

dry stone
#

Making a chunked download system through zomboid's api was what was a PITA

red tiger
willow tulip
#

but I also used raknet ๐Ÿ™‚

dry stone
#

I never modded before heh, I'm just sending server/client commands. I managed to get server commands sent directly from java. I'm catching them in lua tho and calling bridge functions

willow tulip
#

Having a seperate TCPIO link for mod files would have fixed soooo much but oh well

dry stone
#

Well, I have modded before - I did VRIK for skyrimVR.. I'ven ever modded ZOMBOID before

red tiger
#

I'd like to know what the security is there.

#

haha

dry stone
#

to be fair whatever I do its never going to be as hard as vrik.

#

this project is a cakewalk compared to that thing lol

open drum
#

hey guys, i know this isn't the right community to ask this question but it seems like mapping community is half dead... so I would b appreciated if anyone who knows this could solve my problem in resetting partial chunks in the map

dry stone
open drum
#

in Build41 you just had to delete map_x_y.bin

#

but in build42, it doesn't exist

#

anyone knows how?

dry stone
#

I'm gonna do some very careful validation, lets say.. that'll be probably another day or two of work

red tiger
#

My cat does not like the fact that I am modding at 2:15 AM

open drum
#

i've searched online and asked GPT for solution but they don't have any answer >><

red tiger
#

Made a full pot of coffee.

#

I think I'm going to work on this URL policy feature tonight.

dry stone
#

you can't work on it tho

#

you're too busy chatting in discord

red tiger
#

I can extend this to a GET / POST async request API.

red tiger
#

:)

#

I don't get anything done otherwise.

dry stone
#

haha I get it. I'm just winding down myself before I go to bed

red tiger
#

I'm going to be up all night.

paper ibex
red tiger
#

Twitch integrations without RCON, Discord bots, online player maps, admin tools, etc.

dry stone
#

Can you help me compress and stream dosbox video to other players with it? would be cool to look over someone's shoulder in game.

#

...stream through zomboid's api. of course.

red tiger
#

And again this is for a community patch to the game, not anything official for those who don't have context.

dry stone
#

heh I'm mostly kidding.. mostly.. I'd do it if I found a solid way

#

I could 100% use working dynamic textures myself

#

I couldn't get any of the stuff in zomboid to do it, so the slowest part of my mod is making 60 textures per second to put dosbox output in an in-game window

red tiger
#

I'd use shaders but the official API bars reflection so my 41 Lua method won't work.

paper ibex
dry stone
#

unless those shaders can get at something like a dynamic buffer I'd still be hosed tho

red tiger
#

Oh and funny thing: I made a logo today for Sickle.

dry stone
#

I know heh, I used to play with shadertoy a lot.. signed distance fields I'm assuming

red tiger
open drum
#

still doesn't work

paper ibex
red tiger
#

@dry stone The bigger bounty is vector maths drawing API

#

TrueType Fonts, SVGs, etc.

#

Then you could have faction banners.

dry stone
#

I've done some of that... and can confirm it's a giant PITA

red tiger
dry stone
#

if you're doing it, I can only cheer for you lol

red tiger
#

Like a HTMLCanvas2D

#

or java.awt.Graphics2D

dry stone
#

probably like 15 years ago I did a project that tried to take splines and stuff with different thicknesses and parameters at each point and render out shapes

#

its not the math really, its hard to do that and optimize it well

red tiger
#

That's why I believe that drawing and rastering a texture object is good practice.

dry stone
#

So I know enough to know its very much not trivial

red tiger
#

But what if you could create a decorative tile sprite layer for projecting textures isometrically on walls? Banners?

#

Would be cool to put flags on a faction base.

dry stone
#

I think people usually do that in screen space and use the depth buffer? Sorry if I sound dumb its been AGES since I did anything with decals lol

red tiger
dry stone
#

if you're doing this in zomboid you probably don't have a real depth buffer tho

red tiger
dry stone
#

I know they added it for some things but I've been assuming it's mostly faked still

red tiger
#

They used cached GL draw operations per tick using a object buffer.

dry stone
#

that makes sense, so its just down to draw order?

red tiger
#

Yeah.

#

I was thinking about writing some internal caching of draw commands for storing / caching pre-built draws to pass to the buffer to save some comp time.

#

But also drawing to a texture using FBO for a draw API would be insanely useful.

dry stone
#

Back around.. I wanna say 1999, 2000.. I did an isometric 2d game engine. Same idea - draw order - but I think that ran on like DirectDraw. This is like directx 7/8 era

#

well it was technically 3d I guess

red tiger
#

I prefer real 3D isometry over 2D-simulated isometry.

dry stone
#

after that I finally figured out how to math and did mostly direct3d/opengl projects

#

then at some point in mid 2010s I became too obsessed with world gen algorithms and haven't kept up with graphics tech

#

...I'm starting to sound as old as I feel

red tiger
#

I was doing stuff after you but not young either.

#

I started modding from a old PC game in the 90's called SubSpace.

#

Learned most of my trade just messing with that thing.

#

You had to be super-optimized because it was built for ancient technology.

dry stone
#

People hate when I say this but the best way to learn is by suffering.

dry stone
#

if you've struggled and fought and pulled your hair enough

#

eventually things start to stick

red tiger
#

I first learned programming in an ASM disassembler / debugger.

#

Trial by fire is a hell of a drug.

dry stone
#

I did some ASM for my qbasic stuff like back in the 90s... Call Absolute shenanigans

red tiger
#

Ended up learning spritesheet logic from that game too

dry stone
#

but I forget 99% of it, just been too long. I relearned it for VRIK

red tiger
#

Maxed quality from my Blender skills.

dry stone
#

vrik had a ton of just straight up code injections, hooks, vtable hooks, and so on

red tiger
#

If you get tortured enough, you can make your own games. :)

dry stone
#

Its easier these days.. Grab godot, unity, unreal, and just go lol

red tiger
#

But there's this need for the blank canvas moment for every potential developer.

#

Bootcamp for devs.

dry stone
#

I'm a big godot fan these days. It's free, the devs work hard, they seem to go in a good direction.. you can really see the software improve year by year

red tiger
#

I'm actually about to write a game in Godot.

#

I'm going to save around 4-5K USD for an initial budget for anything needed but basically been building my studio slowly.

#

I'm going to use Godot.js

dry stone
#

before half hte planet tells you that you must use C# ... Let me be the one to say: GDScript is actually decent

red tiger
#

Am a Typescript head.

dry stone
#

Here's the thing though, if it works it works.

#

just make really damn sure that it works

red tiger
#

Clearly define goals and discover boundaries.

dry stone
#

don't get lost in perfectionism or lose motivation if your way isn't "professional" or whatever. Just write your code so you can maintain it and so it isn't a performance disaster

#

and if you struggle that just means your learning lol

red tiger
#

There's no such thing as one-dimensional success.

#

:)

silent zealot
#

Defy expectation and build a one dimensal game!

#

Don't be like everyone else doung 2D and 3D!

red tiger
dry stone
#

here's my wisdom of the day.. Maintainable code is code you can actually read. That means its way less likely to have bugs!

red tiger
#

I have a cyclic / rotating schedule for code implementation and upkeep.

#

It's based on Feature, Maintenance, and Documentation phasing which has their rotating schedule.

#

Persistent code-patterns rotate into composed utilities.

dry stone
#

When I was younger I'd write some crap and pull out every C++ trick I knew to squeeze every last drop of performance. This is called being an idiot

#

because as soon as there was ANY problem.. holy crap

red tiger
#

Well back then you'd actually need a level of performance where now you have more room to fail.

#

When's the last time you've seen a for(short i = ..

dry stone
#

I'll tell you how to make your code fast. its not the 90s anymore, you don't need to move everything into ASM or whatever. You look at it and say "Oh crap this thing is O(N^2) this doesn't fly"

red tiger
#

A high-percentage of programmers don't even use signed and unsigned words effectively.

dry stone
#

I don't have a CS degree... I know that because I have suffered haha

red tiger
#

17-18 years of xp

dry stone
#

algorithmic optimizations are almost always the way

red tiger
#

I work with CS degree devs right now.

dry stone
#

My degree is in electrical. Don't go that route, you'll end up writing firmware for solid state power supplies

#

and then everyone will blame you when they catch on fire even if it was the board designers fault

#

don't ask how I know

red tiger
#

I do backend as is clearly evident in my work here but

#

I gravitate to the things that normal devs usually avoid hahaha

dry stone
#

Guessing mostly web dev stuff if you use a lot of JS and typescript?

red tiger
#

"Artist with strong language skills"

dry stone
#

thats a field I'm terrified of tbh

red tiger
dry stone
#

I like javascript, too. I went out of my way to learn it enough to be dangerous

#

my trouble with it is that every time I take another look at anything in that area, the entire landscape has changed

dry stone
#

thats a seriously clever name

red tiger
#

With readonly and type-restrictive checks in runtime and class / interface implementation

dry stone
#

vrik is definitely what I'm best known for. I hacked the game so the player body shows in VR, and I wrote an inverse-kinmatics animation system that directly modified the game's memory so the player body aligned to your real life movements.

paper ibex
red tiger
paper ibex
#

yes, golang is more fun

dry stone
#

basically writing my own full animation system into a c++ game engine that was already compiled and shipped

red tiger
#

It's insane that in Lua I can one-argument pass tailcall functions.

#

You can write a logic-mapper to existing API and write a subset language out of it.

#

And that's what I did there.

#

It'd be nice if Kahlua2 PZ was exposing debug tools for inspecting call chains.

#

Part of Coolua detects illegal calls or access to scopes.

red tiger
#

@paper ibex @dry stone if either of you are interested in Sickle I'll be working on it in my own Discord server. If you want an invite I can link you there.

paper ibex
#

sure

#

๐Ÿ™Œ

red tiger
jolly thorn
#

oh, hey, shoot me an invite as well please, interested to see where this project goes

open drum
#

Anyone knows how to partially reset map regions in Build 42?? map_x_y.bin doesn't exist in build 42... I tried deleting map/x/y folders but that doesn't work either

silent zealot
#

Same process as B41, but the filenames are different and are for smaller bits of the map

open drum
#

i've been trying to solve this for hours...

#

is it map folder?

silent zealot
open drum
#

map forder name is X coodinate right?

#

and what's inside that folder is Y coods?

silent zealot
#

Can't rmember

#

make a new game

#

note where you are

#

look at the files generated

#

look at co-ordinates

open drum
#

i tried this and deleting those folders...

#

but in MP dedicated server

#

the regions doesn't reset...

silent zealot
#

there's a correspondance there, I know because I've deletd things from there before.

open drum
#

i must b doing something wrong then..

silent zealot
#

MP might do weird different stuff.

open drum
#

or is it diff. in MP..

#

sigh...

silent zealot
#

But I would expect that to still work

open drum
#

hmm ill continue to keep checking then..

#

thank you, u at least made me confident that i was in the right track

paper ibex
#

iirc the folder name is b42 cells, not world coords (chunk)

open drum
#

what do u mean?

#

arne't these X coods?

#

they are cells?

quaint panther
#

sup guys, in b41 i can make the mod and just move folder into /user/mods
but in b42 that method still working? cuz i make the mod and put into mods folder, but ingame seems empty

open drum
#

it still works

quaint panther
#

why my mod can be not working? i double check about modding at new version like media folder and etc stuff, but inda menu seems nothing

open drum
#

is it overlapping with the one u uploaded at workshop?

paper ibex
#

1 cell = 32x32 chunks = 256x256 tiles/squares
1 chunk = 8x8 tiles/squares

try map/{wx}/{wy}.bin

quaint panther
#

huh? how you know what im upload in WS?

silent zealot
#

they are chunks.

#

take co-origates on map, divide by 8

quaint panther
#

also that mod is for only private use, like for my own save so.

open drum
silent zealot
#

Files are map/<x-chunk>/<y-chunk>

south bluff
#

if nothing is working out, try workshop folder

#

there should be one in Zomboid folder

open drum
#

so divide the X coordinate by 8?

quaint panther
silent zealot
quaint panther
silent zealot
#

good, in that case c:\users<username>\zomboid\mods\mymod\ is best

south bluff
#

workshop folder in Zomboid folder is meant for testing mods out and allowing workshop upload, but it does load the mods so do try that if anything doesnt work

quaint panther
#

yea as i said im already put mod there, but still nothing

silent zealot
#

if it does not show up make sure it has a common and a 42 folder, make sure there is a mod.info in 42, and if still no good check console.log for errors

quaint panther
#

so path is C:\Users\gudilator\Zomboid\mods, bla bla, etc onda screen so

silent zealot
quaint panther
silent zealot
#

Are you on B42?

#

that is not the folder structure for B42

quaint panther
#

Latest build 42 unstable

#

huh, i read pzwiki

silent zealot
#

Was this mod written for B41?

south bluff
#

seems like it

#

old structure and outdated translation files

silent zealot
#

Step 1 is make a 42 folder and a collon folder, move everything into the 42 folder.

south bluff
#

or file

silent zealot
#

that's easy.

#

Step 2 is fix everything that is broken because it does not work in B42.

quaint panther
#

lemme check the web first, thanks a lot

#

just i think 10 min is enough

silent zealot
#

hahahaha

#

maybe

#

or maybe weeks.

quaint panther
#

hahah

silent zealot
#

The translation change is easy at least

south bluff
#

if youre interested in actually fixing the mod, i recommend checking javadocs and luadocs

quaint panther
#

is there any another guide for modding for b42?

south bluff
#

as far as we know the one in wiki is the most comprehensive one

#

heck, i dont know if theres any other guide

south bluff
#

you can also find a github repo that has old zomboid lua scripts

#

if youre interested in reverse engineering

quaint panther
#

my mod is only for like hundred lines, i dont think so what is a problem for me

south bluff
#

shrug

silent zealot
#

will likely be a matter of finding B42 equivilents for everything that changed.

south bluff
#

theres also a discord server for modding, they should have better answers for your questions when it comes to modding

quaint panther
#

wuw, is most impressive community ever

#

i never seems comm like that

south bluff
#

its also the most insufferable one, i gotta tell you

silent zealot
#

Ask here if you get stuck, a lot of us have been deep in the B42 code and have a good chance of knowing where to look

quaint panther
#

and another question, is any hot-load for mods? example: i put new mod, i need to fully restart game or no?

silent zealot
south bluff
#

should be colored blue

silent zealot
quaint panther
#

see nothing tbh

south bluff
#

oh

silent zealot
#

And option 2, bring up the debug screen (I can't rmeember default key) look for file on lower right, double click, in upper right you can reload it

south bluff
#

you need to be in debug mode

quaint panther
#

i can make it in eng lang for you

#

how to be? fukk im dumb sorry

silent zealot
#

BUT if you have things like events in your code that can cause problems

south bluff
#

or something like that

silent zealot
#

Since that reload button is more like "rerun the lua script"

#

for recipes, main menu & reload lua (also be in debug mode, which will also help you debug recipes)

south bluff
#

and do this, its written in other language but youll see it right away

quaint panther
#

just -debug?

#

oh thanks

silent zealot
#

A bad recipe will probably stop the game loading, but console.txt & search for exception to find outt what is breaking.

quaint panther
#

wow, korea?

south bluff
#

hello from south korea

quaint panther
#

salam alleikum

#

hahah

silent zealot
#

hahaha

#

I feel so unclultered knowing only English when there's somone caually chatting in English while they debug a Russian mod on a Korean computer.

quaint panther
#

seems gucci man

small topaz
#

Does anyone know whether some of the sync commands like sendClothing now triggers a ClothingUpdate event on client side?

red tiger
#

I use batch files for normal and debug mode.

#

I swap between steam and non-steam mode too.

#

It's also better to control RAM caps based on your machine for smoother play.

quaint panther
#

i cannot understand, i try to make a mod for like:
you have a book, you read it, you gain 2 lvls of perk.
aaaaaaaaaaaagh please make a tip for me guys, which event's i need to use.
before i make every10minute addxp

cloud hawk
#

Is there anywhere in the docs an updated list of events, and if they are triggered server-side or client-side?

silent zealot
#

I'm not sure where exactly that will be, but I suspect all reading of books is now under a general "literature" action with different results at the end.

#

media/lua/dahred/TimedActions/ISReadABook.lua

#

ISReadABook:update() handles stuff while reading, complete and perform handle end of reading, and anything to do with skillbooks will probably have a reference to LvlSkillTrained which is a skillbook only thing

#

If you need to disable the vanilla skillbook effects you can adjust the item scripts instead of hacking up all the code, if that is easier.

paper ibex
bronze yoke
#

documentation about whether events are clientside or serverside may be outdated as that was collected in b41 (in particular expect many things that were client only to either be both or server only now) but every event that exists is at least documented with its argument types

jolly thorn
#

is it possible to contribute to this documentation? It seems auto-generated, right?

bronze yoke
#

yeah, it's stored in a yaml file in the pz-rosetta-source repository

jolly thorn
#

man, yaml syntax sure does look... interesting. Anyway, will note down things I come across that are lacking in documentation

bronze yoke
#

yeahhh i was on team json but yaml was more supported by the other contributors

jolly thorn
#

got muted for using link formatting ๐Ÿ™„

bronze yoke
#

ahh right, our build script broke so i've been running things manually and skipped over events since i didn't remember anything changing

jolly thorn
#

got it, will just check there then

jolly thorn
#

I just can't see any structure when I look at it ๐Ÿซฃ

red tiger
#

I'm adding a planned feature for my Java patch to have the option to load YAML for ZedScript.

#

Been jabbering about it for years since YAML and JSON both support schemas in modern editors.

#

:)

#

Glad I'm not managing that ZedScript vscode extension anymore.

#

It might've been a good idea to run scripts as Lua files on load to get the function-reference support they built into the format.

bronze yoke
#

i've seen this discussed, they want to do it that way but it'd just be too slow

red tiger
#

Load slow or during tick?

bronze yoke
#

the impression i got was 'loading times are already way too bad, we might consider it after we significantly improve them'

red tiger
#

Ah I see. Async loading would fix a lot of this since the idea is that Lua is ran to compile to objects.

#

@bronze yoke Now I'm curious to see if such a setup work scale / work well on my async worker API.

#

Yeah loading times are still quite the hit but I've noticed it being slightly better as of 41 to 42.

#

IIRC the most time is spent loading textures, 3D models, sounds, and shaders.

#

I'd imagine that at a point things would be async-loaded on threads during init for anything not needed to load on the main thread.

#

Beyond script-loading I think this would be too much for my patch and beyond my goals for the project but it's worth considering at some point.

knotty stone
mellow frigate
knotty stone
#

it was easily clipping through the ground before

#

it was really strange that the coe truck was working well and this one not, i even copied the suspension setting

small topaz
#

In a previous game version (B42, multiplayer), there was a vanilla bug where dirt and blood from all your worn clothing items magically disappear when you (un-)equipped a single clothing item.

The vanilla bug seems to be fixed by now. However, whenever I manually equip clothing via player:setWornItem(bodyLoation, item) on server-side, it still sometimes removes dirt and blood from certain clothing items for me.

Is there anything special I need to do to make it work properly like using additional sync commands?

ebon chasm
#

you guys are probably the best people to ask... does anyone know what home and end keys do when working in debug mode? I accidentally hit them and now my game is unplayable (figured if anyone knew debug mode it would be mod devs) nvm I figured it out it toggles search mode

digital osprey
#

good afternoon. how can i access the debug console? i want to force scroll it to the bottom after a print

bright fog
#

Or the file ?

digital osprey
#

the in game one, output log i should say, with the lua command line

bright fog
#

You need to be in debug mode

digital osprey
#

i am, it doesnt scroll to the very bottom, always 1 or 2 entries are hidden until u manually scroll, i want to simply mod its scroll function to force scroll to the bottom but cant find where the game keeps the logic

digital osprey
#

scratch that, i moved the prints to onmouseup instead of down and it scrolls correctly now, it will have to be a mystery to me where those files live ๐Ÿ˜„

sour cargo
#

Hello! Does anyone know what conditions require the 'Initial Infection' radio broadcasts to play in-game? https://pzwiki.net/wiki/LBMW_-_Kentucky_Radio#Initial_infection

Does it only run if someone is playing the Initial Infection preset? Or legacy leftover dialogue? As far as I can make out, the player wakes up some time on 9 July and these radio broadcasts are supposed to air in the morning of the day before?

Whenever I start a game I hear something from the 9 July list: https://pzwiki.net/wiki/LBMW_-_Kentucky_Radio#July_9_1993

bright fog
bright fog
#

Bcs it uses strict dates

digital osprey
#

usually i do too but this time i wanted to write a little helper print to show me item tags for the item i click on so i can adjust things on the fly when testing in game, oh well onmouseup is the superior solution anyway so happy days

willow tulip
#

return transparent/whatever texture while loading, only load textures when requested

bronze yoke
#

what confuses me is the game freezes for several seconds when you get in game so it's still using a significant amount of lazy loading

willow tulip
#

If .dds was supported you could even load lower mipmaps, though with .dds as there is 0 decompression time its generally not needed with todays SSD's

#

(png is slooowwwwwww to decode)

red tiger
#

This is due to how the renderer works.

willow tulip
red tiger
#

It doubles itself when capped so it keeps loading in more sprite calls, caps, then doubles.

willow tulip
#

so that you don't get a 0.1s stutter on enter of first car

#

png loading is slooowwwww

bronze yoke
#

i haven't played in a bit but i definitely used to get a big stutter on enter of first car

#

was that solved with that or do we have both

red tiger
#

pre-loading textures would be ideal but there's so many.

willow tulip
bronze yoke
#

i don't use summer car ๐Ÿ˜…

willow tulip
bronze yoke
#

i probably observed this before you made the mod so it could be fairly outdated information

willow tulip
#

and start it off at like, 10, but need 10,000, so it copies, doubles, copies, doubles, etc a dozen times over -_-

#

im 90% sure this is why fwrite(50megs) is actually wayyyy slower then for(50) fwrite(1meg); (At least, when I was coding brutal nature, doing that dropped my save times from like 30 seconds to 0.3 seconds..)

willow tulip
willow tulip
#

@placid bobcat Im'a just piggyback a little on your request there -_-;

cloud hawk
#

Do we have a way to issue a server command (example: OnClientCommand) using RCON? The goal is to invoke a mod function via RCON

cloud hawk
red tiger
#

I'm going to integrate this one to my new Java API patch project.

#

I'm also a vetaran Java modder in PZ for 12 years so dw I won't try to install any malware on your PC.

#

I submit zero-day exploit reports when I see them to get things more secure. :)

cloud hawk
#

Oh no, I didn't mean in an exploit way. But for example, if my extension requires yours, we would need every server to go through the process of unzip/replace the projectzomboid.jar . Besides, the *.class on your extensions might be outdated to whatever version the project is using, causing conflict.

I really would like my extension to just be a simple + installation

#

I just joined the ecosystem, so idk how hard it is for the official package to incorporate yours. Would be great if it happened tho

red tiger
cloud hawk
#

Yes, that makes sense. I considered making a dumb patcher script (python or whatever) that will apply that on the server. But dunno, is the alternative of incorporating that into the official distribution too out of reality?

bronze yoke
#

you mean them adding his patch to the game? that doesn't happen

cloud hawk
#

Well, one must ask: why not? xD

bronze yoke
#

at best there would be a TIS-made alternative, they don't accept community code

cloud hawk
#

Ah, a pity. Ok, gotcha, thanks

willow tulip
#

You can copy loose class files to the \zombie\ folder and it still works in B42.15

#

Also, every major update you need to reinstall java mods

placid bobcat
willow tulip
#

(Sometimes, even minor) because the java files always need updates when the files they modified changed

bronze yoke
#

does that patch actually work in b42 though? isn't it from b41?

willow tulip
#

Java modders are 100% used to updating and releasing a new version for every PZ version

willow tulip
#

and tagged B42.. says there was a B41 version though

willow tulip
#

they override the .jar even

#

and give players a clean place to delete your mod (though I guess putting them into the jar lets people validate to remove em?)

bright fog
#

The problem with putting them into the jar is that your mod can't be installed alongside other Java mods tho ?

bronze yoke
#

these raw class java mods have that as an inherent limitation

#

you need to use a patching framework like zombiebuddy if you want compatibility

#

otherwise it's just impossible for two java mods to modify the same class

bright fog
#

Yea that too

#

Tho I mostly meant if you made a .jar replacement it's even worse

bronze yoke
#

you don't upload the jar, you make people put the files into their jar manually

#

distributing a modified jar would be illegal

bright fog
#

Oh ๐Ÿ’€

red tiger
#

Jar load order

#

You can overload matching signatures

willow tulip
red tiger
#

Just drop a jar and execute it as a library.

#

Because the game is now jar'd you can put it in loading order.

#

Java modding became way easier the moment that zomboid things were distributed as jars.

buoyant violet
paper ibex
#

I hope that they can change it to load in an oval area and hide more small detailed object.

silent zealot
# bronze yoke distributing a modified jar would be illegal

It's probably OK (legally) if done for a mod, in the same way copying vanilla lua code and changing it and distributing it in your mod is OK.

But from a technical viewpoint distributing a jar is not OK, and there are much better ways to distribute java mods.

bright fog
#

For people having problems with ZedScripts 1.9+ about "_DOCUMENT" not being a valid parent script block

This issue is because I changed how the whole system works for document handling, to fix it you need to:

  • ctrl shift P > search "ZedScripts" and select the option to force fetch the last data
  • ctrl shift P > restart extension host (or restart VSCode)
cloud hawk
#

I'll have a couple of state files stored on ./common, and I'll need a routine to read from these files and post them to a webservice HTTP API. I have two options

  1. create a python daemon that will do everything, but will have to be started by the server owner (just a simple start tho, even docker users can call a bash script to spawn the daemon). The script would be distributed as an asset of the mod (i.e. ./common/foo.py)
  2. create a Java mod that will have some threads reading the files and doing the whatever HTTP stuff (I'm not sure if there is a jaillock to prevent java mods from accessing external HTTP resources)

I like option 1 more because I don't need to worry about synchronizing my java mod with whatever projectzomboid.jar version we have. Plus, it's less invasive. However, it will require this additional step of spawning the daemon.

What do you folks think? Is 1 an acceptable practice?

willow tulip
silent zealot
cloud hawk
silent zealot
#

If admins can't run a script, they probably can't manage copying a java file to corerect place.

#

Unless there are hosting providers who offer systems with no python

dry stone
#

I'm trying to make a simple item with an fbx model that shows when you 'place item' ... but no matter what I do, I just get an icon...

I've got this in my PZDos_models.txt

module PZDos
{
model Motherboard386
{
mesh = motherboard,
}
}

And that's the name of my fbx. It's in 42/media/models/motherboard.fbx

I'm 99% sure it's the right fbx version for zomboid... made in blender.

If I change that line to mesh = WorldItems/Bottle, then that mesh shows (found in PZ's own models_items.txt)

wintry tree
#

so..I haven't used long blunt in a long time. Long Blunt weapons have a chance to knockdown the enemy on every hit or does the knockdown only happen on crits?

#

Reddit says it's impacted by both the skill level and weapon

dry stone
# dry stone I'm trying to make a simple item with an fbx model that shows when you 'place it...

I got it to display without a texture so far. If anyone is searching to find a fix, I'm sorry in advance for how dumb this is:

  1. The game won't load models from 42/media/models. Rename the folder to 42/media/models_X
  2. Make sure FBX export is only exporting geometry. I stripped all extra vertex attributes except position/normal/UV. I'm not sure if this was part of what fixed it or not.
  3. Zomboid operates on more of a "cosmic" scale. 1 unit is about the size of rosewood or something. If you're seeing giant flickery buggy polygons, this is the cause. In your model setup, do something like this:
    module PZDos
    {
    model Motherboard386
    {
    mesh = motherboard,
    scale = 0.01,
    }
    }
#

Finally.. I have a computer part. And texture is just texture=name in the model

willow tulip
#

My summer computer!

#

Now for the crossover mod: My summer ECU

dry stone
#

I'm totally not just finding pictures of disks on google images, scribbling on them, and then making an AI tweak the camera angle. No sir.

willow tulip
#

(Actual blue version)

#

Was the shit back in the day

#

also lol at phone numbers on a floopy disk

#

Back in the day having a floopy with multiple whole games/etc on it was wild lol

dry stone
#

The 1986 date surprises me, I wasn't aware of magazines with disks before about 1990

#

of course I was like 4 in 1986 and I didn't even start coding until a couple years later

#

because I'm 100% counting code that printed "farts" until it filled the screen.

silent zealot
#

Often with cheats added, which is probably how I got started with my attitude towards cheating/modding games

silent zealot
dry stone
#

It was a long time ago, but I'm still just as classy

#

I remember digging through some pretty terrible book with my brother.. we eventually got a sprite moving left and right on the screen with arrow buttons.

#

that was on an old TI-99A PC.. the one with the cartridge slot

willow tulip
#

I reprogrammed it to run a gwbasic program in the autoexec

#

the program did nothing except clear the screen, wait for input, upon input it would write "Don't f$%^ing touch me!" (uncensored) and beep for 3 seconds and then clear the screen again

dry stone
willow tulip
#

Needless to say lots of kids would start poking at the PC every time they walked by until the teacher got upset and demanded I 'fix' it so that the computer would.. resume never being used again by anyone ever.

dry stone
#

Definitely not as well known as the commodore but it was good for its time

silent zealot
# dry stone

My first computer too, except with a cassette recorder instead of a box & floppy drive.

silent zealot
#

Nostalgia...

dry stone
#

reminds me of an ancient game I played where you moved around in a little helicopter.. screen by screen

silent zealot
#

Rescue Raiders?

willow tulip
silent zealot
#

you have a helicoptor, you also buy tanks/troops/missile carriers that slowly move towards teh enemy base, while you fly above supporting them

dry stone
#

I think it had rescuing people? I'm sorry this memory is SO hazy lol

#

I was really young at the time

silent zealot
dry stone
#

That's not it ... it's close... it didn't scroll I don't think and it had like a solid green terrain and I think a black background

#

it was ancient and might have only existed on that ti-99a computer for all I know

silent zealot
#

Doesn't help that back then games would come out with complely different graphics on different platforms... I remember that game as black & white on a mac for example.

#

And there were plenty of helicotor games so it might be hard to narrow it down!

silent zealot
willow tulip
#

Bro had green? Lucky. I only had amber.

dry stone
#

no it was color. exact same monitor as the grainy image of it I found

willow tulip
#

At one point I got a CGA emulator, 4 color... of amber! to play simcity

sonic needle
#

so how long until we can emulate N64 games in pz ๐Ÿฅน

willow tulip
#

Yes, a color.. emulator.

silent zealot
willow tulip
#

actually had one that took 5 BNC connectors and you could unplug em at will

silent zealot
#

That was Dad's work PC, and it was a lot less exciting than the Amiga 500 with 4096 colors.

willow tulip
#

later turned that 5 BNC connector cable into 5 oscope probes

#

like SVGA is just RGB + H/V sync

#

(plus some ID lines that are rarely used for much)

#

so you can just have an SVGA->5 BNC connector cable

silent zealot
#

"Select VESA mode" memory unlocked.

willow tulip
#

(iv seen some DVD players that would also accept/output 5 connector BNC for high def)

willow tulip
#

256 colors of 320x200 glory.

silent zealot
#

I can't rmember any of the actual VESA numbers, but I do recall I used to know 3exactly which ones were best on our graphics card.

#

32767 possible colors!

dry stone
#

I'm sure this is getting old by now but -- floppy disks!

silent zealot
#

Nah, keep it coming... it's nice seeing progress

dry stone
#

I need to make at least one mesh for every type of pc part... that's my goal for a V1.0

#

still a lot of meshes

silent zealot
#

How about a disk with HOTTIEZ written on it in marker that contains EGA pictures of women in bikinis?

dry stone
#

lol, I'd basically have to make that software myself.

#

am not against custom software for the mod, its more the overall workload. my wishlist is massive

#

and I need to be really careful - any software I include with the game has to be freeware/shareware. I'd rather not get sued

#

and that puts a lot of stuff I REALLY want like QBasic into the "nope" zone.

silent zealot
#

Fair.

dry stone
#

I'll probably make it super easy to add your own stuff, though ...

#

Because sure shareware's fun, but some of these games I own the full version

willow tulip
silent zealot
#

..I can't remember what program we used to use to view low-res 256 color gifs of nude women (back when "gif" didn't imply "animated", it was just a better file format than .bmp)

dry stone
#

I plan to. There's lots of out-of-era software that makes me sad if I can't include it

#

like Daggerfall. Game is fully free, I can totally include it --- but it's 1996

willow tulip
dry stone
#

I'd write basic instructions too, but it'll probably come down to "make any mod and name a folder like this. done"

#

because I can iterate installed mods and just look for that folder. If I find it, I hash it's contents and make a dedupe manifest

willow tulip
#

Yea

dry stone
#

Well, there might be a bit more.. if you want discs for stuff, that'd be some separate files

#

Maybe an installers folder, every folder in there becomes a disk.

digital osprey
#

how should i access settings i made in the mod options menu? do i just include the file where its needed or is there an onApply/onAccept function i can use from the menu?

digital osprey
#

but no onApply? figures thats what i was trying

willow tulip
digital osprey
#

thank you missed that part

silent zealot
#

Let people try the game that taught Bethesda valuable lessons about making open world games woth huge maps and shallow meaningless autogenerated content that they gradually forgot until we got Starfield.

willow tulip
#

and IIRC they just abstracted the world map away too because.. why would you ever wanna walk thata much

full star
#

idk if this is relevant to in here but idk how to cehck this

bright fog
silent zealot
#

Did this happen after you changed/added something in your mod? High chance it's a typo in an item or recipe script, or improperly formatted json

full star
silent zealot
#

#mod_support is a better place to get upport for mods, this channel is focused on writing them.

#

So the default assumption here is you're writing a mod and encountered a problem.

buoyant violet
#

since the last update, has anyome experience, that your character is unable to attack? happens randomly

shut robin
#

I am not a developer but I am interested if anybody here wants a helicopter into a game...a good one..most like blackhawk or something that have like...5-7 seats for passages.

alpine zenith
#

im trying to find the lua code that shows the image on tv's

#

or the images

main pasture
dry stone
# silent zealot Let people try the game that taught Bethesda valuable lessons about making open ...

No, Daggerfall was Julian Lefay, and newer Bethesda titles are all Todd Howard. DF invented most of the systems that the later games used and slowly chipped down into hollow shells. I can forgive DF for lacking good procedural world stuff in 96, but Starfield with insanely more money behind it barely put forth an effort... There's good reasons why fans worked so hard for years to create DF Unity - there really is something special to it.

#

Sadly Lefay passed away last year. There's still many interviews and such with him around that are pretty interesting

mellow frigate
vast pier
#

How would I go about making it so a recipe lets you "pour" delta uses into an item ?

#

I want to be able to pour uses from an item that has 20 uses, into an item with 8 uses

#

They are both different items

bright fog
#

Idk if I'd be able to find it

#

Check the recipes for drying stuff

#

Maybe smthg to do with that ?

cunning rune
#

lua question for the blokes if possible.. having some problems trying to get lua events to fire in game. it appears my lua file is initialized as I see when on main menu the [PIRCHSPZ][INPUTTEST] script loaded and the [PIRCHSPZ][INPUTTEST] listeners attached... however once I load into SP it seems like the middle events are getting swallowed or something because they just never fire? All im trying to do is print "this key was pressed" and nothing ever fires in game. What's interesting is when I quit back to main menu, the initialization step reoccurs? Am I doing something widly wrong here? Excuse the large amount of tests, was trying to get anything to fire.

file is being stored \Zomboid\mods\PirchsPZDBI\42\media\lua\client

print("[PIRCHSPZ][INPUTTEST] script loaded")

Events.OnKeyPressed.Add(function(key)
    print("[PIRCHSPZ][INPUTTEST] OnKeyPressed key=" .. tostring(key))
end)

Events.OnKeyStartPressed.Add(function(key)
    print("[PIRCHSPZ][INPUTTEST] OnKeyStartPressed key=" .. tostring(key))
end)

Events.OnCustomUIKeyPressed.Add(function(key)
    print("[PIRCHSPZ][INPUTTEST] OnCustomUIKeyPressed key=" .. tostring(key))
end)

Events.OnMouseDown.Add(function(x, y)
    print("[PIRCHSPZ][INPUTTEST] OnMouseDown x=" .. tostring(x) .. " y=" .. tostring(y))
end)

Events.OnRightMouseDown.Add(function(x, y)
    print("[PIRCHSPZ][INPUTTEST] OnRightMouseDown x=" .. tostring(x) .. " y=" .. tostring(y))
end)

print("[PIRCHSPZ][INPUTTEST] listeners attached")
jolly thorn
#

when you quit to main menu, the mods reload, so that's fine. Not sure what is up with the events

dapper kayak
#

So Im extremely new to both modding and Lua in general and am having an issue with a vehicle unstick mod Ive built and throws false successes when I run the command. Would moving the fix to run client side instead of server side improve the situation, or would I just be running in circles?

I dont really have any lua errors or stack traces to give as the only return is that it ran successfully (but clearly didnt)

mellow frigate
dapper kayak
#

Ill add that and see if that gives me more to work with

jolly thorn
cunning rune
#

when you say "Normal Saves" just like a sandbox save or? i.e. if i create a new save rn your saying they should fire?

#

talk about frustrating.. i just spent like prolly a good 15-20 hours debugging that alone and a new save is what fixed it. fuck me. lol

jolly thorn
#

yeah, just a normal save. Not necessary new, just not a debug one? Not sure, when I load the basic debug scenario it doesn't seem to work, but any normal save seems to work fine for me

#

what I tested:
load any normal save created from solo tab - ok
load any "basic debug scenario" save - nope
create any new save, including debug scenario - ok
I'm not sure what is up with this and I don't want to dig more right now ๐Ÿคทโ€โ™€๏ธ

cunning rune
#

yeah i mean at this point im cool having access to it on the side of solo. at least lets me test some stuff.thank you very much for making me think of that

#

got it working on my end too so phewwwwww

#

finally can make some progress lol

jolly thorn
#

no problem. Good luck with your mod

dapper kayak
#

Good news, I guess moving the scripts client side and adding a missing synccall fixed the issue. Now I just have to fix the cars sometimes floating and I think that project is a wrap.

willow tulip
dapper kayak
onyx scarab
#

I have question can someone give me feedback abt my mod

#

its b41

digital osprey
bronze yoke
#

there's no way to do that

#

tags don't belong to the inventory item but to the item script

#

custom things that are meant to vary per-instance would be stored as moddata instead

willow tulip
digital osprey
#

im doing a loot filter basically, categorizing items using tags, i add them no problem through code on a per item basis and use them to filter the loot table. its fast like that

willow tulip
digital osprey
#

but i am...

willow tulip
#

Via getTags()?

#

Post your code that 'adds' a tag

digital osprey
#

using getTags():add()

willow tulip
#

As Albion said, tags are part of the item script that defines all items

#

getTags returns thta

digital osprey
#

sorry was looking for it

willow tulip
#
    public Set<ItemTag> getTags() {
        return this.scriptItem.getTags();
    }
#

Your adding them to the scriptItem that is shared between all items of that type

#

it also won't persist across save/load

digital osprey
#

yeah it gets done on game load

#

not even a half second hickup

willow tulip
#

Why are you adding/removing tags?

silent zealot
digital osprey
#

for customization, lists get built based on mod options, tags are added dynamically

willow tulip
digital osprey
#

you can modify the filter oon the fly

willow tulip
#

abandond tags entirely.

digital osprey
#

tags were way faster than when i was doing strings

willow tulip
digital osprey
#

i end up with a single tag to hide

silent zealot
#

How often does the loot table get rebuilt? Taking a few seconds once per server start is fine

digital osprey
#

just when you change the options. its all local bth

#

btw

#

just hiding items from the loot panel

silent zealot
#

What do you mean by "loot panel"?

digital osprey
#

the part of the inventory panel

#

where loot is displayed

silent zealot
#

Oh, the container inventory, right

#

you can set things to hidden.

digital osprey
#

yeah just the right side

silent zealot
#

It's meant for hiding cosmetic items that you don't want to show in player inventory, but it might work for the other inventory windows.

#

But... shouldn't your mod stop the items spawning instead?

#

If the goal is to change generated loot.

digital osprey
#

no i wanted a mod where u can just filter whats there, to use in MP but handled locally, and very customizable

#

so one player can decide he doesnt need some things that another one will

silent zealot
#

Ah, so the final goal is a "filter the items in this inventory" feature

digital osprey
#

yeah

silent zealot
#

you don't want to alter tags/item scripts then because that will affect everyone

digital osprey
#

im using categories which are built from subcategories that the user selects

#

ah i see its not per user

main pasture
#

Isn't there a "set unwanted" or something like that option in the context menu

silent zealot
#

What about using the "set unwanted" feature

digital osprey
#

unwanted only greys it out

silent zealot
#

you could change that to hide instead of changing color

digital osprey
#

wow thinking outside the box there ๐Ÿ˜„

silent zealot
#

...and then figure out how to let people unhide when they can't just right click.

digital osprey
#

there must be a container for those items somewhere too i might just be able to add things there through code as well

silent zealot
#

But that gives you a pre-made feature that is already tracked per user, and also means your mod can be added/removed midgame and not lose the "do not want" list

digital osprey
#

thank u ill go research this

silent zealot
#

First though: look for :isHidden() in the Inventory UI code, and change that to :isHidden() or :isUnwanted()

#

Actually letting people unset unwanted just needs a way to toggle the hide feature on/off

digital osprey
#

yep the methods are there isUnwanted setUnwanted and getUnwantedModDataString

#

oh yeah i see the isHidden as well i think i used it before and it did not work

silent zealot
#

Related: the unwanted feature is great not just because of it's obvious use tracking which books you have collected already but because I can set something useful to unwanted to help remind myself YOU DO NOT NEED ANOTHER ROLL OF DUCT TAPE JUST LEAVE THAT!

#

GReat for that automated hoarder mentatlity

jolly thorn
silent zealot
#

I almost never use transfer all so did not realize that

jolly thorn
#

never did too, until discovered this

digital osprey
#

yeah its handy i only realized its there after i started working on the mod ๐Ÿ˜„ but would be nice to expand its functioonality

jolly thorn
#

now I just basically only click transfer all because I know that it'll mostly loot the items I want

#

yeah, it's a bit raw, so I think expanding on it would be cool

digital osprey
#

damn too bad those tags dont work i spent 2 days perfecting the setup lol

silent zealot
#
ISInventoryPane:refreshContainer():

...
    local it = self.inventory:getItems();
    for i = 0, it:size()-1 do
        local item = it:get(i);
        local add = true;
        -- don't add the ZedDmg category, they are just equipped models
        if item:isHidden() then
            add = false;
        end

Bad news is that is in the middle of huge function so annoying to change/will break mods like CleanUI. But the good news is you can override the isHidden() function.

#

Since you can hook into LUA -> Java API calls, and in this case we only care when it's being called from lua.

digital osprey
#

there is no setHidden either, i still didnt decompile i think that should be my next step

silent zealot
#

Don't use setHidden, just something like:

local index = __classmetatables[InventoryItem.class].__index
local old_isHidden = index.isHidden
index.isHidden = function(self)
    if MyModActive and self:isUnwanted(getPlayer()) return true
    return old_isHidden(self)

end
#

Assuming that still works in 42.15, but it's not reflection but just a lua metatable thing so it probably does.

#

that way when the UI checks "is this item meant to be hidden?" it gets told yes if your mode is active and the item is unwanted, otherwise it gets the default answer

vast pier
silent zealot
#

...I probably have too many tire repair kits though.

jolly thorn
#

do servers have some sort of unique id?

#

or worlds, maybe

digital osprey
#

all decompiled now too finally

vast pier
#

Diminishing returns on item repairs? Pshhhh, made up by the government

digital osprey
#

even with just this check
if self:isUnwanted(player) then return true

#

and i know that returns true

dry stone
#

I added hard drives and floppy drives to my set of computer parts for my mod! Next up: ISA cards...

topaz tangle
#

transcom livery upgrade

silent zealot
dry stone
#

Now with an ISA card.. and my crappy icons

quasi jewel
#

What other items can be used when placed while even on the ground?? Ik radio's can (and obviously TVs but those are movable furniture items not really regular items that can just be placed or dropped normally)

digital osprey
#

but yeah b42 doesnt like these tricks i remember in b41 i would just make a zombie folder override classes test theories ๐Ÿ˜„

silent zealot
#

It's been so long I forgot that once upon a time we had to get used to PCI cards being upside-down because it let a PCI and USA slot share the same rear case case slot. (You could obviously only use one, but gave you more options without making the motherboard bigger)

topaz tangle
#

makes me wanna finish the electrinics mod i was given...

torn igloo
#

Is it possible to programmatically create item instead of using item scripts?

dry stone
#

Added a monitor... I know it's not perfect, but I think it's decent enough?

#

I'm not really an artist, blender is hard D:

#

But that's probably the most difficult model I'll need to do

dapper kayak
dry stone
#

I think I still need to do a keyboard and mouse... More floppy disk styles... Disk case box is on my list. Ram (SIMM memory sticks). CPU should be easy. Drawing a blank beyond that, maybe that's it for V1.0

#

Then I get to try to make my own vehicle-like UI for computers. That's probably gonna be hard lol

willow tulip
#

Ultra fun minigame to get the two XT power connectors in the right order or the motherboard vaporises itself?

dry stone
#

I actually thought about that.. I'm thinking I'll just require a small electronics skill for anything that needs jumper placement

#

like if you've got some shitty packard bell mobo with junky onboard serial and want to put in a real serial adapter with an actual hardware buffer... usually there's a secret jumper

#

and I'll penalize dosbox cycles if you don't because those old things interrupt the cpu constantly

willow tulip
#

lol.

dry stone
#

am I going too far? I honestly have no idea.

willow tulip
#

Nah thats cool, the motherboards need some kinda differential between em

#

Just release a steam guide that is like motherboard X < Y < Z

#

Like at the end of the day, your motherboard is what, 10~20% of your performance?

dry stone
#

I do wanna do computer cases..eventually.. but thinking I should push that to V2.0. Instead I'll just give those radio shack machines limited ISA slots cuz they usually had to use a riser to fit in their tiny boxes

#

heh old school mobos were like, here's some ram slots, some isa slots, cpu slot, a bios/cmos, and a keyboard plug + a chip for it. That was IT

willow tulip
#

It will be cool hunting down cpus and coprocessors(?) though.

dry stone
#

like no on board sound, no on board mouse, no on board IDE* or serial or anything

#

ALL of that you used to need expansion cards

willow tulip
#

lol at later motherboards that gave you 1 combo mouse/keyboard ps2 slot like "thanks, totally useful"

dry stone
#

yeah they did start appearing... 486 mobos I think usually had a mouse plug