#mod_development
1 messages ยท Page 379 of 1
iam trying i swear T_T
You have a problem, tell us what problem you are having
that both the items are adding
Else why are you here in the first place ?
1 should add and 1 should remove
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
so the tattoo needle adds a texture on top of the player body using a custom body location and its supposed to add tattoos on the player that are not removable
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

you made the mistake of asking people who dont make those types of mods.
guys how do i make custom recipes ?
whats a custom recipe, a changed vanilla recipe or a adjustable recipe with sandbox options? specifics are key ๐
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
it doesn't really have to be updated, we don't have any new documentation to add to it
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!
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?
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.
Are you drunk? xd
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 ?
there is a url whitelist, only very specific domains are allowed
stuff like the forums, wiki, and steam i think?
Would this be a touchy thing to modify if I formulated a permissive structure to editing this whitelist?
Or extracted this to a config file in the cache?
You can use the Steam redirect for that too
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)
I also thought that discord invites / discord links were going to get domain-whitelisted at a point.
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
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
t:1774175691456 is getTimestampMs() if I remember correctly
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
That doesn't appear everytime tho
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
yes, with your steamcommunity link redirection
Ok good to know that this is a me issue
The problem is most likely that they don't prioritize the overlay
f is tick number, t is time in ms, st is server time in ms
Compared to what I did with Wiki That for example
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.
noice
very noice
I'd imagine that tasks requiring data-heavy, periodic or I/O tasks could benefit from this.
Added a new wiki page about these
https://pzwiki.net/wiki/URL
Also updated the mod.info page to link to it
@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. 
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?
Thanks for the feedback, a lot of these can be directly tweaked in the pz scripts data repository
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
just wanted to get it out, bit annoying with all the false red warnings ๐
Yea that's normal, the extension is in active development and needs people to test it out
But yea if you ever see wrong information, feel free to patch it in the dataset
https://github.com/SirDoggyJvla/pz-scripts-data
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
In fact, I had one about the comments
https://github.com/SirDoggyJvla/ZedScripts/issues/9
Just need to get onto it on my end
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?
is OnWeaponSwingHitPoint still a valid event?
messages not sent by a player from that client are rejected
Ah ok cool! Thanks
it's to make clear which player from that client is sending a message in splitscreen
I think it's old API left there for compatability.
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
it still exists and is called from java.
Okay, thank you
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
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?
is this the correct way to check if a player has a modded trait - if player:hasTrait(mymod.CharacterTrait.MODDEDTRAIT)
seems like it's a boolean function... so maybe if you use print()
after that function
and if it produces True
then it's a correct way of doing it
if mymod.CharacterTrait.MODDEDTRAIT is the CharacterTrait you registered for that trait, yes
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
I invite you to read this
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
When are you running this ?
A lua/client/foo.lua sends a command via sendClientCommand(getPlayer(), "foo", "bar", {})
Events.OnAddMessage
Wait, wdym by "all fields empty" ?
You're not trying to access the fields are you ?
No, I'm trying to get the inventory of the player via player:getInventory(). But it returns nil there, when I actually have items
Server side it returns nil ?
Yes, that is server side (maybe getInventory is client-side only?)
are you in build 41 or build 42?
41
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
If it returns nil then the inventory literally cannot be manipulated server side then
It's a ready-only access tho. It doesn't work on 41 then?
probably not
read only what ?
with items in build 41, do whatever you need to do on the client
The inventory ? Server doesn't know about it anyway
Wait, this is a bit confusing. Is it ok to player:getInventory() on build 41?
Yes, client side
That's what albion keeps telling you man
The inventory is handled by the client in B41
So this should work only in build 42?
Bcs the majority of stuff are client-auth (which is why hacking in that build is so easy)
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
Yes but why do you care ?
You're working on B41 ?
Yes, current stable
So deal with it with B41 methods
I mean, wdym deal with methods lol. I'm trying to figure out what the premises are
gzuz...
Like that's the 5th time we've been telling you about it
Only the client knows about the inventory
6th time*
ok, maybe I should learn how to count then. anw, thx for the info, will move the mod development to unstable
Why do you feel the need to move to B42 ?
Which game version do you want to mod for ? B41 or B42 ?
If you're on B41, the client handles its inventory
whatever player:getInventory() works server-side is fine by me
Not a problem working with unstable for now (assuming it will become stable one day)
Of course it will
at this point, I probably could've taken a lua boot camp class. AI argues things are incorrect that I already know are correct so fiercly that I start questioning my own understanding of things
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.
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...
Did you register those ?
Yeah
CharacterProfession.register("hockeyPlayerOccupation:hockeyPlayer")
CharacterTrait.register("hockeyPlayerOccupation:highsticker")
--in registries.lua
hockeyPlayerOccupation = {}
hockeyPlayerOccupation.CharacterTrait = {}
hockeyPlayerOccupation.CharacterTrait.HIGHSTICKER = CharacterTrait.register("hockeyPlayerOccupation:highsticker")--this creates your variable hockeyPlayerOccupation.CharacterTrait.HIGHSTICKER and affects the java registration result to it.
Oh..so I haven't been registering my traits and occupations right this whole time? dang it
you can store it the way you want, but as a globallly accessible variable.
THanks, I will try this
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.
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
player:hasTrait(x), but the x needs to be a trait object not a string. So the only way to do that is to assign the trait to global variable when you register it, then use that global in hasTrait()
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.
you can get them by name, but you probably shouldn't
Sneaky reflection, or actual API method?
looks at -debug flag only true for the 99.9% of players who have not unlocked their true potential to reshape the world...
CharacterTrait.get(ResourceLocation.of("namespace:trait"))
i generally recommend not to do this, it goes against the entire point of registry objects
...actually that percentage is probably higher.
but it can be needed for things like serialisation
It still didn't work after I assigned to global variable. I still get null
hasTrait cannot return nil
...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
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
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
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)
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
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?
the print is good, that tells us the global is set
it says apply sluggerbonuses...
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%
omg...please don't hate me. sluggerbonuses is an old script...that I thought I got rid of. I'm sorry, I'm embarrassed.
Pretty sure we've all done that lol
The print script works
Huzah!
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
You're talking about tags on items?
yeah
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
and then i can put it in an array and check a few tags against tags on an item right?
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
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
strings don't work at all
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
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
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
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
that's from build 41
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
@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)
having a 'java mods are dangerous' popup that malicious java mods can just hide seems a little pointless
I mean, the game does have a C++ aspect does it not?
it's not the entry point though
Or some kinda launcher?
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
... that kinda blows my mind that the C++ part isn't the entry point
the game is 99% java, it just has native libraries for some super performance sensitive stuff
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
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.
Thank you very much for proving my point that its literally a 1 day excercize for PZ to do that with mods ๐
'lua chucksum error' = 'I didn't bother to spend 1 day making a remote deduplicating file hash system thingy'
But yea, thats pretty sexy, will dedup all the multiply floopy images.. Hell, it will dedup all the copies of dos that are the same on multiple bootable floopys and stuff.
Bookmark the B42 Javadocs: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/
I still fidn having decompiled Java open in a "reference VS code" along with the games media folder very helpful, because the javadocs don't tell you whatt anything does and sometimes it's not obvious. (Also, not every public method is available to lua)
package index
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 ๐
C# games and Harmoney patching have the same issue, but it's not been a huge problem... yet. I'd like to think games are all running with reduced permissions but that probably isn't true, and it's just luck there hasn't been a huge mod malware scandel.
yeah the docs are already helpful really saved me there but will decompile soon enough, tried already but i dont have zomboid in a default location so it will have to be tomorrow im too tired at this stage to multitask ๐
Honestly im amazed it hasn't become one yet, its a huge underexploited vector thankfully.
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.
Especially with so many games having no built in mod support so people have to use tools like Bepinex/ASI infiltrators/dll hacks
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)
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.
https://steamcommunity.com/linkfilter/?u= is not good enough ? ๐ฌ
It can be better than this.
@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.
:)
cool concept, btw, will this be easy to upgrade on game version changes?
I maximize isolationist coding practices and keep injections minimal.
Sickle has its isolated environment that hooks into PZ code.
This makes me feel a bit dumb because this was like my entire weekend since friday for that lmao
I'm not using mixins to avoid abstraction.
Erm well yea weekend project, depends if you have all the hash libs/etc handy or not ๐ just the dedup part though
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 -_-;
Oh, dedupe was the easy part. I made a folder where I copy all the files I bundle in (like all the installed shareware files)... Java does a recursive iteration on the tree and dumps SHA-256 hashes into little HASH=PATH list on disk. Skips it if it already exists.
the number of games that don't really have ANY support for when server-client files mismatch is sad -_-;
Yea exactly. dedupe + sending files is programming 101 stuff.
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
modern windows caches files into ram, and ssd's do wonders on loading large files fast (on the order of 2~8gigbyte/second)
Making a chunked download system through zomboid's api was what was a PITA
And I thought I was insane.
Yea, Not murdering the networking API not designed for file transfers with your file transfers was also my biggest issue!
but I also used raknet ๐
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
Having a seperate TCPIO link for mod files would have fixed soooo much but oh well
Well, I have modded before - I did VRIK for skyrimVR.. I'ven ever modded ZOMBOID before
blood_pressure++
I'd like to know what the security is there.
haha
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
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
the fact that clients can send arbitrary files to the server? you already spotted my greatest weakness
in Build41 you just had to delete map_x_y.bin
but in build42, it doesn't exist
anyone knows how?
I'm gonna do some very careful validation, lets say.. that'll be probably another day or two of work
My cat does not like the fact that I am modding at 2:15 AM
i've searched online and asked GPT for solution but they don't have any answer >><
Made a full pot of coffee.
I think I'm going to work on this URL policy feature tonight.
I can extend this to a GET / POST async request API.
Actually doing this motivates me.
:)
I don't get anything done otherwise.
haha I get it. I'm just winding down myself before I go to bed
I'm going to be up all night.
nice, i need this
Yeah this is planned. With policies in-place this will keep things secure while opening up the floor to integrations.
Twitch integrations without RCON, Discord bots, online player maps, admin tools, etc.
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.
I also want to make constructor / drawing API for Textures in-game so maybe?
And again this is for a community patch to the game, not anything official for those who don't have context.
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
Jeez
I'd use shaders but the official API bars reflection so my 41 Lua method won't work.
No clue. I gave up last time. There were over 1.6mil files created in the save dir after 1 month (MP)
unless those shaders can get at something like a dynamic buffer I'd still be hosed tho
You can render geometry in a shader using ray-marching
Oh and funny thing: I made a logo today for Sickle.
I know heh, I used to play with shadertoy a lot.. signed distance fields I'm assuming
yea, i deleted what's in the Map folder, metagrid, chunkdata
still doesn't work

@dry stone The bigger bounty is vector maths drawing API
TrueType Fonts, SVGs, etc.
Then you could have faction banners.
I've done some of that... and can confirm it's a giant PITA
(Draw to texture)
if you're doing it, I can only cheer for you lol
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
That's why I believe that drawing and rastering a texture object is good practice.
So I know enough to know its very much not trivial
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.
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
I don't believe anyone has done what's needed for this to work unless they add their own tile defs or try to project on screen-space which would be.. yeah not good.
if you're doing this in zomboid you probably don't have a real depth buffer tho
You have a buffer with passes only in Java.
I know they added it for some things but I've been assuming it's mostly faked still
They used cached GL draw operations per tick using a object buffer.
that makes sense, so its just down to draw order?
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.
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
I prefer real 3D isometry over 2D-simulated isometry.
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
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.
People hate when I say this but the best way to learn is by suffering.
I live by that
if you've struggled and fought and pulled your hair enough
eventually things start to stick
I first learned programming in an ASM disassembler / debugger.
Trial by fire is a hell of a drug.
I did some ASM for my qbasic stuff like back in the 90s... Call Absolute shenanigans
but I forget 99% of it, just been too long. I relearned it for VRIK
Maxed quality from my Blender skills.
vrik had a ton of just straight up code injections, hooks, vtable hooks, and so on
Its easier these days.. Grab godot, unity, unreal, and just go lol
I both hate and love it.
But there's this need for the blank canvas moment for every potential developer.
Bootcamp for devs.
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
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
before half hte planet tells you that you must use C# ... Let me be the one to say: GDScript is actually decent
I'm using the third option here hahaha
Am a Typescript head.
Here's the thing though, if it works it works.
just make really damn sure that it works
Clearly define goals and discover boundaries.
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
Balance is a keystone to living.
There's no such thing as one-dimensional success.
:)
Defy expectation and build a one dimensal game!
Don't be like everyone else doung 2D and 3D!
"Toolbar: The Game"
here's my wisdom of the day.. Maintainable code is code you can actually read. That means its way less likely to have bugs!
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.
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
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 = ..
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"
A high-percentage of programmers don't even use signed and unsigned words effectively.
I don't have a CS degree... I know that because I have suffered haha
Same.
17-18 years of xp
algorithmic optimizations are almost always the way
I work with CS degree devs right now.
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
I'm a frontend dev mainly.
I do backend as is clearly evident in my work here but
I gravitate to the things that normal devs usually avoid hahaha
Guessing mostly web dev stuff if you use a lot of JS and typescript?
"Artist with strong language skills"
thats a field I'm terrified of tbh
I also write transpilers or language augmentations.
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
thats a seriously clever name
With readonly and type-restrictive checks in runtime and class / interface implementation
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.
im backend js and sticks with common js for years ๐
I might go golang
yes, golang is more fun
basically writing my own full animation system into a c++ game engine that was already compiled and shipped
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.
@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.
Can't DM you or friend-request.
oh, hey, shoot me an invite as well please, interested to see where this project goes
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
Same process as B41, but the filenames are different and are for smaller bits of the map
hmm? pls give me more detail...
i've been trying to solve this for hours...
is it map folder?
Can't rmember
make a new game
note where you are
look at the files generated
look at co-ordinates
i tried this and deleting those folders...
but in MP dedicated server
the regions doesn't reset...
there's a correspondance there, I know because I've deletd things from there before.
i must b doing something wrong then..
MP might do weird different stuff.
But I would expect that to still work
hmm ill continue to keep checking then..
thank you, u at least made me confident that i was in the right track
iirc the folder name is b42 cells, not world coords (chunk)
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
it still works
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
is it overlapping with the one u uploaded at workshop?
1 cell = 32x32 chunks = 256x256 tiles/squares
1 chunk = 8x8 tiles/squares
try map/{wx}/{wy}.bin
huh? how you know what im upload in WS?
also that mod is for only private use, like for my own save so.
oh hold on.. ok
oh??
Files are map/<x-chunk>/<y-chunk>
mods folder also worked for me
if nothing is working out, try workshop folder
there should be one in Zomboid folder
so divide the X coordinate by 8?
okay ill try inda mods and ws folder
Best practice is only have a mod in one place; don't subscribe on workshop AND have it in your local mods folder
nah, i doesnt publish mod on WS, its only for mer
good, in that case c:\users<username>\zomboid\mods\mymod\ is best
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
yea as i said im already put mod there, but still nothing
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
so path is C:\Users\gudilator\Zomboid\mods, bla bla, etc onda screen so
What's inside SkillBookGiveLevels?
check pins in this channel, or https://pzwiki.net/wiki/Mod_structure
Was this mod written for B41?
Step 1 is make a 42 folder and a collon folder, move everything into the 42 folder.
or file
that's easy.
Step 2 is fix everything that is broken because it does not work in B42.
hahah
The translation change is easy at least
if youre interested in actually fixing the mod, i recommend checking javadocs and luadocs
is there any another guide for modding for b42?
as far as we know the one in wiki is the most comprehensive one
heck, i dont know if theres any other guide
but the guide only tells you about how to set up the structure, so do check those and reverse engineer a lot
you can also find a github repo that has old zomboid lua scripts
if youre interested in reverse engineering
my mod is only for like hundred lines, i dont think so what is a problem for me
shrug
will likely be a matter of finding B42 equivilents for everything that changed.
theres also a discord server for modding, they should have better answers for your questions when it comes to modding
eyup
its also the most insufferable one, i gotta tell you
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
and another question, is any hot-load for mods? example: i put new mod, i need to fully restart game or no?
very helpfuk: B42 javadocs https://demiurgequantified.github.io/ProjectZomboidJavaDocs/
package index
theres Reload Lua button in main menu
should be colored blue
two options: main menu, reload lua button, very reliable other than assets like images
see nothing tbh
oh
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
you need to be in debug mode
BUT if you have things like events in your code that can cause problems
i reckon its for recipes?
or something like that
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)
in steam, go to properties
and do this, its written in other language but youll see it right away
A bad recipe will probably stop the game loading, but console.txt & search for exception to find outt what is breaking.
wow, korea?
hello from south korea
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.
seems gucci man
Does anyone know whether some of the sync commands like sendClothing now triggers a ClothingUpdate event on client side?
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.
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
Is there anywhere in the docs an updated list of events, and if they are triggered server-side or client-side?
Found this, but it seems outdated (i.e. last commit 3 months ago): https://github.com/PZ-Umbrella/Umbrella/blob/main/library/events.lua
This here is on 42.13
https://demiurgequantified.github.io/ProjectZomboidLuaDocs/md_Events.html
You don't need an event handler. If you want to outright grant levels on completeing reading you want to find the timed action that handles reading skill books, and hook in your code to add levels on the perform and/or complete functions.
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.
if the new version has Events changes, that file will be updated. imo
P/S Umbrella is already at pz 42.15
https://github.com/PZ-Umbrella/Umbrella/releases/tag/42.15.0
they just don't change much
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
is it possible to contribute to this documentation? It seems auto-generated, right?
yeah, it's stored in a yaml file in the pz-rosetta-source repository
man, yaml syntax sure does look... interesting. Anyway, will note down things I come across that are lacking in documentation
yeahhh i was on team json but yaml was more supported by the other contributors
got muted for using link formatting ๐
how often is this pulled into umbrella? I see the documentation for OnPlayerMove, for example, was updated like 2 months ago, though umbrella still has the old description
https://github.com/PZ-Umbrella/pz-rosetta-source/commit/e6b3c7c689f4dd3262416c7c03aef716240e916d
ahh right, our build script broke so i've been running things manually and skipped over events since i didn't remember anything changing
got it, will just check there then
I just can't see any structure when I look at it ๐ซฃ
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.
i've seen this discussed, they want to do it that way but it'd just be too slow
Load slow or during tick?
the impression i got was 'loading times are already way too bad, we might consider it after we significantly improve them'
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.
Its bouncy !!! finally found the issue, after so many hours of tweakin
and it was just a model/tire offset issue 
what was the initial problem ?
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
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?
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
good afternoon. how can i access the debug console? i want to force scroll it to the bottom after a print
In game debug console ?
Or the file ?
the in game one, output log i should say, with the lua command line
You need to be in debug mode
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
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 ๐
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
Yea that's why I directly read from the console file usually
I think the game just cannot handle the starting date change for the lore
Bcs it uses strict dates
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
Lazy load FTW
return transparent/whatever texture while loading, only load textures when requested
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
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)
Well this is actually because of the SpriteRenderer operations array buffer allocating objects.
This is due to how the renderer works.
lol part of that is loading the entire vehicle hud on startup
It doubles itself when capped so it keeps loading in more sprite calls, caps, then doubles.
so that you don't get a 0.1s stutter on enter of first car
png loading is slooowwwww
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
pre-loading textures would be ideal but there's so many.
Yes, you will with summer car since summer car doesn't preload its dashboards, but the normal game dashboard definately preloads on game start
i don't use summer car ๐
My fav is when programs do this.. BUT COPY THE ENTIRE ARRAY OVER ON CAP REACH
i probably observed this before you made the mod so it could be fairly outdated information
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..)
Yea. There was comments about it being there for preloading too
@placid bobcat Im'a just piggyback a little on your request there -_-;
Do we have a way to issue a server command (example: OnClientCommand) using RCON? The goal is to invoke a mod function via RCON
Seems we have this great extension here: https://steamcommunity.com/sharedfiles/filedetails/?id=3243738892
Would be great if the dev team could incorporate that into standard. This is a very useful functionality that it seems its completely unsupported by the vanilla. I'm a bit uncomfortable installing the extension tho as it will override some classes of ./Server/projectzomboid.jar
Hi. That's me.
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. :)
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
That's what people did for build 41 servers and my anti-cheat. It was hell telling people how to do it.
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?
you mean them adding his patch to the game? that doesn't happen
Well, one must ask: why not? xD
at best there would be a TIS-made alternative, they don't accept community code
Ah, a pity. Ok, gotcha, thanks
Not needed
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
Itยดs fiiine! ๐ I never did requests before, and eh, I mean, doesnt hurt to ask! ๐
(Sometimes, even minor) because the java files always need updates when the files they modified changed
does that patch actually work in b42 though? isn't it from b41?
Java modders are 100% used to updating and releasing a new version for every PZ version
Last updated 6th of jan
and tagged B42.. says there was a B41 version though
But yea, loose class files work fine still
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?)
The problem with putting them into the jar is that your mod can't be installed alongside other Java mods tho ?
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
you don't upload the jar, you make people put the files into their jar manually
distributing a modified jar would be illegal
Oh ๐
You can do this way cleaner
Jar load order
You can overload matching signatures
Yea or that if you wanna edit the json
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.
had to do my own take of a w1887
They load everything within the circular area. But the game lags when zooming out or driving at high speed.
I hope that they can change it to load in an oval area and hide more small detailed object.
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.
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)
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
- 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) - 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?
yea definately don't wanna distribute the projectzomboid.jar. A standalone jar (that overrides SOME but not all projectzomboid.jar content) would be OK
Unless you already require a java install avoid adding one; a python script sounds like a much nicer idea.
Cool, thx for the feedback. Yeah it sounds more natural to me, but since this is my first mod, I'm not sure how much of a trauma it will be for server admins to have to spawn a new daemon (zero security concerns tho since the script will be transparent)
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
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)
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
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:
- The game won't load models from 42/media/models. Rename the folder to 42/media/models_X
- 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.
- 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
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.
(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
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.
We had an Amiga 500 and a lot of pirated games, and since most games were less than 1.44MB the disks would be full of multiple games.
Often with cheats added, which is probably how I got started with my attitude towards cheating/modding games
10 PRINT "FART"
20 GOTO 10
iconic first program.
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
there was a PC in one of my classes, unused for years because it was so outdated
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
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.
Definitely not as well known as the commodore but it was good for its time
My first computer too, except with a cassette recorder instead of a box & floppy drive.
that's hysterical lol
Nostalgia...
reminds me of an ancient game I played where you moved around in a little helicopter.. screen by screen
Rescue Raiders?
I remember a few of those.. one where you had to rescue people while shooting the absolute shit outta everything, that one was A++
you have a helicoptor, you also buy tanks/troops/missile carriers that slowly move towards teh enemy base, while you fly above supporting them
I think it had rescuing people? I'm sorry this memory is SO hazy lol
I was really young at the time
haven't played that one
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
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!
Or you played on a monochrome green monitor ๐
Bro had green? Lucky. I only had amber.
no it was color. exact same monitor as the grainy image of it I found
At one point I got a CGA emulator, 4 color... of amber! to play simcity
so how long until we can emulate N64 games in pz ๐ฅน
Yes, a color.. emulator.
We had a 286 with... get this... a VGA monitor that had a little knob that swapped to monochrome amber, monochrome green or monochrome white!
I Had that too but it was just a faulty SVGA cable. /s
actually had one that took 5 BNC connectors and you could unplug em at will
That was Dad's work PC, and it was a lot less exciting than the Amiga 500 with 4096 colors.
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
"Select VESA mode" memory unlocked.
(iv seen some DVD players that would also accept/output 5 connector BNC for high def)
13h forever.
256 colors of 320x200 glory.
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!
Nah, keep it coming... it's nice seeing progress
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
How about a disk with HOTTIEZ written on it in marker that contains EGA pictures of women in bikinis?
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.
Fair.
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
Protip: release a mod thats just a minimal 'addon software' to show people how its done
..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)
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
I feel like the truemusic approche is a good idea
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
Yea
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.
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?
there is an onAccept yea
but no onApply? figures thats what i was trying
https://pzwiki.net/wiki/ModOptions see 'apply function'
thank you missed that part
Close enough.
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.
Pretty much yea
and IIRC they just abstracted the world map away too because.. why would you ever wanna walk thata much
idk if this is relevant to in here but idk how to cehck this
It tells you everything you need to know
If an error tells you to look at c:\users\hazza\Zomboid\console.txt then I suggest looking at c:\users\hazza\Zomboid\console.txt is the first step.
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
added some mods, turns out it was common sense?
#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.
since the last update, has anyome experience, that your character is unable to attack? happens randomly
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.
It seems to implemented in java: iso/objects/IsoTelevision.java
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
the meaning is behind the eye of the watcher
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
I believe there's smthg special you can use in craftRecipes
Idk if I'd be able to find it
Check the recipes for drying stuff
Maybe smthg to do with that ?
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")
when you quit to main menu, the mods reload, so that's fine. Not sure what is up with the events
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)
You may wanna add logs to your mod to see what is working as you intended and what is not.
I honestly should have done that from the start, yeah. I recently did that for one of my mods but have yet to do it for this one.
Ill add that and see if that gives me more to work with
seems like a bug. When I launch the game and load into an existing debug scenario, these events don't seem to trigger. If I create a new one, they do, though they won't when it's loaded again. Normal saves seem to work all right
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
thank you for this
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 ๐คทโโ๏ธ
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
no problem. Good luck with your mod
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.
Car physics is kinda client side once you get into the car. The server does have ways to force a clients vehicle to move but yea.
Yeah, it was a rookie mistake on my part. Just glad I finally got it working for MP now
guys im trying to remove tags from items but according to the javadocs there is no native function for it. i would have to write my own right? here is the link to the inventory item page https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/inventory/InventoryItem.html
declaration: package: zombie.inventory, class: InventoryItem
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
Convert whatever your doing to using modData
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
You can't add them per item...
but i am...
using getTags():add()
As Albion said, tags are part of the item script that defines all items
getTags returns thta
sorry was looking for it
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
Why are you adding/removing tags?
I'm not clear how removing tags helps you make loot tables.
for customization, lists get built based on mod options, tags are added dynamically
Just make a table of item fullTypes that access a table of whatever parameters you wanted to add
you can modify the filter oon the fly
abandond tags entirely.
tags were way faster than when i was doing strings
do proper table accesses
i end up with a single tag to hide
How often does the loot table get rebuilt? Taking a few seconds once per server start is fine
just when you change the options. its all local bth
btw
just hiding items from the loot panel
What do you mean by "loot panel"?
yeah just the right side
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.
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
Ah, so the final goal is a "filter the items in this inventory" feature
yeah
you don't want to alter tags/item scripts then because that will affect everyone
im using categories which are built from subcategories that the user selects
ah i see its not per user
Isn't there a "set unwanted" or something like that option in the context menu
What about using the "set unwanted" feature
unwanted only greys it out
you could change that to hide instead of changing color
wow thinking outside the box there ๐
...and then figure out how to let people unhide when they can't just right click.
there must be a container for those items somewhere too i might just be able to add things there through code as well
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
thank u ill go research this
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
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
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
it also doesn't tranfer them if you use transfer all option in the container
I almost never use transfer all so did not realize that
never did too, until discovered this
yeah its handy i only realized its there after i started working on the mod ๐ but would be nice to expand its functioonality
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
damn too bad those tags dont work i spent 2 days perfecting the setup lol
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.
there is no setHidden either, i still didnt decompile i think that should be my next step
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
Lies.
You always need another roll of duct tape
That used to be true when duct tape was how you repaired KI5 runflat tires. Now... I have so much duct tape, because of my "I NEED THIS FOR MY TIRES!" learned behavior
...I probably have too many tire repair kits though.
thanks i really appreciate the help !
all decompiled now too finally
Think about all the tool repairs you can do with rhat extra roll of duct tape
Diminishing returns on item repairs? Pshhhh, made up by the government
hmm i cant seem to get this to work, the function never returns true, no matter how i try to call it, and it never prints a debug line i added either
even with just this check
if self:isUnwanted(player) then return true
and i know that returns true
I added hard drives and floppy drives to my set of computer parts for my mod! Next up: ISA cards...
transcom livery upgrade
Add a print to make sure your hook is getting called in the first place, that's teh first thing to check - if it is then you can figure out why the logic is not working. If it is not, we work on why it is not getting called.
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)
when i was trying it even the print in the first line of the function did not fire, and was calling it all over with mouse clicks, but i think ill move away from that approach for now, im exploring the other avenue for now with the unwanted system
but yeah b42 doesnt like these tricks i remember in b41 i would just make a zombie folder override classes test theories ๐
Looks like a PCI card to me, assuming the closer edge is the metal contacts and the card is upright.
(But with Zomboid abstraction all expansion cards being the same model/item is perfect)
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)
this is really cool!
makes me wanna finish the electrinics mod i was given...
Is it possible to programmatically create item instead of using item scripts?
I based it on an ISA card.. heavily modified.. the connector is a bit wider (ISA can be 8 or 16 bit, that ones a 16, so it's got the little gap)
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
I mean, I think it looks good, especially for zomboid's style. I dont think a ton of players are going to be zooming all the way in on assets mid game, either
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
stupid minigame to get the header connectors on the motherboard correct? /s
Ultra fun minigame to get the two XT power connectors in the right order or the motherboard vaporises itself?
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
lol.
am I going too far? I honestly have no idea.
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?
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
It will be cool hunting down cpus and coprocessors(?) though.
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
lol at later motherboards that gave you 1 combo mouse/keyboard ps2 slot like "thanks, totally useful"
yeah they did start appearing... 486 mobos I think usually had a mouse plug