#Leaf (forked from FabricMC/fabric)
1 messages ยท Page 4 of 1
it's likely something to do with the way the sources are stored inside of a .jar rather than text but i don't really know tbh
sighs.
scope is just LUA files...
anyone? how to find.. anything in the decompiled source?
CTRL + n
^^^
It might not apply to finding in files for sources
change to Scope > All Places and use the cog thing to add the tickboxes like search overrides and whatever else it shows
here let me bring it up, one sec
ok now I can't find what I did before...
Yay I found carController
Thank you :0
I ltierally wrote that up here...
The cookie cutter way to search for something in the decompiled code is to open up any decompiled class using CTRL+N, and then search using the Project and Libraries filter (if the external game sources aren't showing up here, you might have run into the known bug with it: https://github.com/aoqia194/leaf-loom/issues/9#issuecomment-3265949621)
Didn't knew about the ctrl + shift +F
it will automatically place the directory to look inside the -sources jar
think of it like CTRL+F is find in active file, CTRL+SHIFT+F is find in all files
i always use ctrl-shift-f and do all places to get started heh
Actually I did I put it in the wiki lmao
jvla can you please pin the message I wrote above (with the reaction on it)
thx
Man I hate all this code, and only half because it uses unnamed variables.
Like how you get a 4x+ engine force buff if your towing in 1st gear...
now just have to figure out how to override the whole private void control_Forward(float f) function...
So, the ExampleMixin is.. injecting itself into the 'return' part of getVersion (that I can't seem to find anywhere?)
so how do I get the example mod in the game?
where do I find leaf to install into PZ?
Pinned messages ?
... download .jar, download jarfix, download java...
... 'A java exception has occured'
did I download the wrong java or something?
trying to run installer-1.1.0.jar
if you have java 17 already, JarFix will use the first java version on the path, so you will probably need to move java 17 up to the top
Yeaaaaa. your really gonna need to work on that installer if you want anyone to use this...
??? Not works for you != not works for everyone
It's not my fault you're using the wrong java on the path, thats something the user has to change
needing to install the right version of a software that doesn't even come up as the first result in google to install your software to install a mod = nobodies ever getting around to installing my mod
fabric was looking at platform-native binaries for every operating system, but they still haven't gotten that fully complete because its a pain in the ass to do
Blame that on fucking oracle lmao
But a link to the latest Java version alongside the installer is a good idea I suppose
You can't copy some files into pz's directory without using java?
And also, no one wont install your mod because of the installer requiring java to use, no one will install your mod because leaf isn't popular yet. 99% of people don't even know this exists
actually, this has been the most active the thread has been since I created it
using a standalone installer would be a 10x better idea
I'm not familiar at all with the installer but does it need Java yea ?
Thought Java was going to be needed for Leaf itself to work
yes it uses java
@fresh nexus also you need to chill a bit, it's been a one person project and like aoqia said the chat hasn't been this active ever. Some stuff are not fully fleshed out that's normal
I mean, you can even run the installer with the java version bundled with the game, ProjectZomboid\jre64\bin\java.exe -jar path\to\installer-1.1.0.jar
obviously it's not as simple as a double click though
https://sourceforge.net/projects/nsis/ try this, iv had good success with it.
Download NSIS: Nullsoft Scriptable Install System for free. Windows installer development tool. NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.
But can the installer be made to not use Java, that's the remark from Black Moons
Or is Java needed for Leaf to work anyway ?
yeah im not using some windows-specific installer for a program that essentially downloads 3 jar files and creates some text ina file
yes, read what I said above: here
^
And an installer for windows would cover 80%+ of your users...
and it wouldn't be cross platform?
More seriously I trust you if you say it's needed
So the other people can do it the other way.
Java is needed to use leaf yes. If you want to develop it, or a mod, or use it in the game
people just installing to the game don't need java to run the game with leaf. But running the installer they do, as it uses java
Can't Leaf be made to hook to the game's Java like you mentioned ?
nah thats not how it works, you can't just say "but but people aren't going to use my mod because leaf uses java!" and then say "lets isolate leaf to only one platform and let the rest just figure it out"
So if I understood right, Java is mandatory for the installer due to how the whole thing works ? It's not just a personal choice of using Java to create the installer right ?
if you want adoption in any capacity, it's basically a one-size-fits-all or nothing imo
Agreed
Ah yes, perfection, the arch enemy of doing anything at all.
the only thing I've dropped support for so far was 32 bit systems, which isn't even fully removed, just disabled
you're contradicting yourself before when you were complaining about having to install jarfix and use java to use the installer...
It's not perfection, it's common sense
The game works natively with Linux
I think it does with Mac too
people want convenience, I understand, but what im saying is making the installer fully cross platform isn't going to happen overnight
So why tell a part of the player base to go fuck themselves
i do think installation could be improved, from this thread it seems like you've had to personally debug for basically every single person who's tried to install leaf
Im saying a jar is fine for linux users (Who are more technical on average), mac users (all 2 of them), but windows users are going to prove more problematic.
Wait so the installer DOESN'T need to have Java and could be made without it ?
Since I didn't get an answer to my question
consider this: Many people working on Fabric in the community, they've only just started to make installer native for Windows, but it's not fully ready yet. I'm simply following in their path. Once they finish their installer, I'll fork it like everything else and convert all of my code from the java installer to their native one. But I want to at least support win/linux first before I convert over from the cross-platform solution which is Java
everything in Leaf currently uses java
literally everything
You just said Leaf doesn't need the users to install Java for it to work
so does fabric
99% sure the installer, like all installers, copies a couple files to the target.
That's why I'm asking my question
when did I say that???
Nvm I missread that
these are dev issues in the IDE with bugs in loom, not the installer which is only for prod users trying to install leaf
Let me try to install Leaf really quickly to see if it's terrible or not
and I said like a few days ago that I don't recommend anyone using the installer for now in prod because its buggy I still want to add server support
if you're doing it to just test your mod locally thats fine, but I wouldn't go out to a random PZ user right now and say "hey use the installer and install leaf" because it's not quite finished yet
K, I think I misunderstood the project then.
Like I told others many times, it's a promissing project that can only grow if it gets attention but aoqia here is a one man army doing everything on it and so the project goes at a logical rythm based on that and shit won't work with a finger snap
That's why check your attitude a bit here dude
I wonder, does drag and dropping onto java.exe with a JAR work?
yeah thats what I normally use
I don't think it works, it's trying to find the main class and failing some reason. Not sure why
turns out doing this requires all the compiled classes to be in the classes/ folder in the jar
The installer worked, just one weird thing with my PZ installation idk if it's me or Steam doing weird things for Linux but my game location, to the folder Leaf wants isn't common/ProjectZomboid but common/ProjectZomboid/projectzomboid
Well I was told to come try this out to make a mod only to find it very confusing, frustrating and exceptionally difficult compared to all the other modding iv done, where everyone here expected me to know terms in some IDE iv never used before and got mad at me for asking too many questions and talking too much here.
So idk what black magic fuckery is going on but eh it works
If I remember right you had expressed wanting to do Java modding ?
And now im told the whole thing was a bad idea and even if I made a mod with it, I shouldn't even try to get other people to attempt using it.
Not if I could avoid it...
Like I told ldlework the other day, the project is promising, but not proven working here, there isn't any mods that have been made with it that are on the Workshop
I'm not saying it's a bad idea, but it's not fully finished and bugs will happen. I haven't really had many people in the past to test it except gigawatte up until very recently when idlework and snejk joined.
there is literally the example mod on teh workshop, I already mentioned this
it works, but I need to upload a newer jar to the workshop, because I put something wrong in the mod json
By "proven working" I mean proven to be usable by the player base
oh if you mean a proper big project then yes that is true
That's where the missunderstanding from the other day came from
I'm hoping they fare well with the npc mod, as that will help me squash more bugs
that runs java jar.jar, you need java -jar jar.jar
yea I was just curious if it worked, since I never tried it before
you're specifying the file as the name of a main class instead of as a jar file absically
but yeah, actually you dont even need java at all to install leaf. You can use purely the jre bundled with the game
Maybe I will recommend that over jarfix in the installer readme
Actually aoqia I just noticed something with the installer, the task never seems to end in the console when running the jar tho I did get the popup that it is installed
Most people couldn't execute a command line with proper paths to save their lives.
Double clicking usually works
(On Windows at the very least)
im guessing the first error isn't an issue? just misconfigured path or something?
but yeah that is odd, it should quit
is the UI closed too?
unless you've ever had java 8 on your system
Not if you've had no reason to install java yet.
I literally installed java 8 after javafix told me to go find a java
yep, I had to move java 17 on top of path when I did this
I have the .leaf folder in the media folder
I didn't know there still offering java 8 as the first result in google 'updated 2025'
java 8 hogs the file association forever and the normal methods of changing it don't even work
Got leaf-1.4.1 etc.json inside media
what???
it should not be in media ata all
what path did you enter into the installer?
For the PZ json files I have that on my end
Yea no no sorry like I confused myself quickly lol
Same for .leaf it's alongside media
there can be problems when messing with the game files on linux since the file structure is slightly different to windows
basically the only files that installer relies on to install the game is ProjectZomboid64.json file
they have nearly everything inside an extra ProjectZomboid/ProjectZomboid/ for some reason
you can "install leaf" to an empty folder with just the ProjectZomboid64.json file and it will work
Wait
yes, that is annoying too, had to handle it separately on loom
I know why there's the error
It was the previous error I had
When giving common/ProjectZomboid like I said a bit earlier
I had to give it common/ProjectZomboid/projectzomboid instead
but the ProjectZomboid64.json isn't inside the second projectzomboid folder is it not?
Also I need to remove that .leaf, seemed to have created it when I got that error
where is it on linux
wherever the ProjectZomboid64.json launcher config lies, thats the folder you need to install to
oh, what
I don't think it's normal
two zombie folders...?
^^^
I wonder if it's a quirk on my side yea
only the inner one should exist afaik
I'm gonna be honest I don't know myself why the fuck that's a thing
that's the one zomboiddecompiler targets for decompilation
I even reinstalled PZ yesterday and it did that too
I remember reading the steam depot to see where it was on linux, I was almost certain it was either in the inner projectzomboid folder or in the outer one, I dont know which one it is
I don't remember if the decompiler worked by clicking
I think I had to run it with command lines
i don't remember if it can autodetect the game path on linux but it didn't work at all on linux before i changed that
I'll go try wait
Wait albion I just found that repo
https://github.com/drandarov-io/zomboid-decompiler-template
no idea what this is
Yea the decompiler doesn't do anything when clicking on it
it looks like it might be related to storm or something
What is storm ?
pzstorm, I remember looking at it when I was seeing if there was a java modding for pz
This works here
wasn't a bad solution, just some things I didnt like personally
It seems it works
it was made by the same guy as capsid so you can imagine its general quality ๐
What's capsid
Yea the whole thing seems to work when feeding it the path manually, but my path wasn't the default one aoqia has set in the leaf installer either
So maybe it just doesn't find the steam path idk
basically the predecessor to umbrella, insanely difficult to set up and pretty crappy output
how bad it was is how i got into making all this stuff ๐
yeah I did need to update the default path, I believe it was snejk or idlework that told me google gave me the wrong default steam install path
who would've though there was like 3 different areas steam can install to?
Yea I guess Linux in a nutshell on that one
In case you're curious this is my game path
/home/simon/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid
tho I have no idea about the second pz folder lol
idk if that's normal or not
Wait I know who to ask
I thik the debian-installation folder is not normal, probably debian-specific as the name implies
but the .steam folder in user home is standard I think
@stiff depot what's your game install folder ?
currently in loom I've got it to .local/share/Steam
thats why it's so annoying for linux, it can be in .steam/, .local/share/Steam, some flatpak paths, and more specific paths like debian-installation folder that you have
I just gave up basically and rely on the user picking the folder, thats the best option to avoid issues imo
Though I should probably either specify in the readme to choose the folder with ProjectZomboid64.json in it, or to detect the inner folder
yes
.
Although I guess that could be applied to the installer too, so it would be more beneficial
That's fine, tbf if it's an issue for users it means they
- either are on Windows and manually chose a custom installation path, so they should know it
- are on Linux and already are not too retarded and should be able to find their game install folder
im not really interested in java code for leaf right now, im trying to get this stupid cmake stuff resolved, then I do docs for leaf

This is what I do for context
public static Path getDefaultSteamLibraryPath() {
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
return Path.of(System.getProperty("user.home"), "Library/Application Support/Steam");
} else if (OperatingSystem.current() == OperatingSystem.LINUX) {
return Path.of(System.getProperty("user.home"), ".local/share/Steam");
}
return Path.of("C:\\Program Files (x86)\\Steam");
}
I've yet to find someone with a mac, but thats I think I got the mac location from just lurking in the PZ discord or something
/home/my_username/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid
ok that looks like its debian-based distro specific too then
which theres nothing bad to that btw, just means auto detection wont work.
Aaah so you do have the secondary pz folder too haha
Thank you
How about just searching the location of the ProjectZomboid64.json
@valid nova do you ask because of your borderless window issue?
No no has nothing to with that ๐
You're in the thread of a tool to mod the Java
And it has an installer which needs the game path
searching on Windows is super super slow and not even guaranteed to find it if it's not indexed, so I dont think its viable
And in my case my game path a tiny bit weird due to the projectzomboid at the end that Windows doesn't have
Isn't there any PATH for Steam stuff actually ?
you can set it as the user, which will show up in installer and for loom, but no not for Steam
https://github.com/NPBruce/valkyrie/issues/1056 How to detect steam install dir
Ok and what about this part lmao
find Steam installation folder
You can find Steam InstallPath in windows registry:
the annoying part is libraryfolders.vdf
i already do this for windows, aoqia probably does too, but it is literally windows specific ๐
I did have it working in loom before, but I removed it, it's not worth it and windows specific yes
it increased time for loom to configure, and I don't think it's worth it, especially when you don't always want to use Steam's game folder like in Idlework's case
Viewport
Nice good start !
Nice. Long has man asked the question: "But does it run doom?" And soon, PZ will be doom complete.
The program halts at
LOG : Mod f:0, t:1755618010701> The game starts!
In this part of the constructor :
public ViewportUI() {
super();
this.visible = this.defaultDraw = true;
createTexture();
cells = new ArrayList<>(); // <--- Makes the program crash!!
}
Why I cannot instantiate a simple array list ?
My bad, It was not the new ArrayList<>(); wich caused the crash, I'm investigating, I can't find the bug
Maybe it's my mixin
@Mixin(IsoCell.class)
public class IsoCellMixin {
@Inject(method = "render", at = @At("RETURN"), cancellable = false)
private void render(CallbackInfo ci) {
System.out.println("Rendering iso cell Mixin");
IsoCell cell = (IsoCell)(Object)this;
System.out.println("AAAAAAA");
ViewportUIWrapper.renderCell(cell);
System.out.println("BBBBBBB");
}
}
LOG : Mod f:0, t:1755642211453> The game starts!
LOG : Mod f:0, t:1755642211503> Viewport instantiated
Can you not run the game in debug mode and see where the program crash happens?
I'm already running with the -debug parameter
I mean debug in the IDE. -debug is only for the in-game lua debugger
yeah
assuming your crash is crashing the jvm, you should be able to debug the Zomboid Client run configuration which debugs the game jvm
And is there a stacktrace anywhere in the log?
My first guess was it's probably was the unchecked cast you're doing from IsoCell to Object to IsoCell (?) which creates a runtime exception, but it's hard to say for sure since I don't know everything you're doing
That is the correct way to cast this to the calss's this object, but I think it can still fail sometimes, though im not sure on the details about that
anyway, posting a stacktrace would help if one is generated
No error message
Just crashing
How should I cast this object ?
LOG : Mod f:0, t:1755642604569> The game starts!
LOG : Mod f:0, t:1755642604587> Viewport instantiated
LOG : General f:0, t:1755642605281> Rendering iso cell Mixin
LOG : General f:0, t:1755642605281> AAAAAAA
LOG : General f:0, t:1755642605282> Adding cell
LOG : General f:0, t:1755642605282> Cell added
LOG : General f:0, t:1755642605282> BBBBBBB
My methods are okay (?)
For non-void injected methods, should I return a value ??
Like for render
I said you are doing it the correct way
Are you cancelling the original method in your inject or not?
No, I'm using the Mixin @Inject
At = RETURN
Yes, are you using CallbackInfo or CallbackInfoReturnable
Yes I'm using CallbackInfo as parameter but I do not use it
First off, basically all inject mixin methods should be void, and use the returnable to return and or cancel the original method
If it's just a normal inject then I don't see why you would need to return a value in a void function...
render is void right
You only return values in mixin class methods if you're doing redirects or using ModifyArg etc
are you talking about this?
Yes
You are using cancellable there without even using a CallbackInfoReturnable, im not sure what the behaviour for that is
usually, you cancel the original method if you want to return your own value
but here you are not, so what is the point?
It's maybe this (I'm actually on phone rn)
also cancelling a render method sounds like a bad idea anyway
But cancellable is false?
oh it is too, I misread it
but don't specify it at all
You're not using a returnable, there's no point in having cancellable there at all, especially if it's false (it defaults to false)
Ok
And your methods inside the mixin class should always return void if they are injects
It does not return anything
yes, I'm just saying that to make sure
So what can cause the crash? I just added minor changes
We won't know until it's fixed
I'll come back fix it tomorrow
Keep in mind that injecting at RETURN injects at every return statement in the method, not just the last one
I need to call it once
If you can comment out all your render mixin code and remove cancellable = false and it still crashes, probably an issue with where you are injecting to, or some other specific thing probably
Okay
@Inject(method = "render", at = @At("RETURN"))
private void render(CallbackInfo ci) {
System.out.println("Rendering iso cell Mixin");
IsoCell cell = (IsoCell)(Object)this;
/*
System.out.println("AAAAAAA");
ViewportUIWrapper.renderCell(cell);
System.out.println("BBBBBBB");
*/
}
Doesn't crash
When I uncomment this snippet, the output is
LOG : General f:0, t:1755680675902> Rendering iso cell Mixin
LOG : General f:0, t:1755680675902> AAAAAAA
LOG : General f:0, t:1755680675902> Adding cell
LOG : General f:0, t:1755680675903> Cell added
LOG : General f:0, t:1755680675903> BBBBBBB
And the game crash
Here is the Wrapper code with a static ViewportUI
package com.example;
import zombie.iso.IsoCell;
import zombie.ui.ISUIWrapper.ISUIElementWrapper;
public class ViewportUIWrapper extends ISUIElementWrapper {
private static ViewportUI viewport;
private static ViewportUIWrapper wrapper;
public ViewportUIWrapper(double x, double y, double width, double height) {
super(x, y, width, height);
}
@Override
protected void instantiate() {
viewport = new ViewportUI();
this.table.rawset("javaObject", viewport);
viewport.setTable(this.table);
viewport.setX(this.getX());
viewport.setY(this.getY());
viewport.setWidth(this.getWidth());
viewport.setHeight(this.getHeight());
}
public ViewportUI getViewport() {
return viewport;
}
public static void addToUI(double x, double y, double width, double height) {
wrapper = new ViewportUIWrapper(x, y, width, height);
wrapper.initialise();
wrapper.addToUIManager();
}
public static void renderCell(IsoCell cell) {
viewport.renderCell(cell);
}
}```
And the actual render function is just
public synchronized void renderCell(IsoCell cell) {
/*IsoWorld isoWorld = IsoWorld.instance;
IsoCell currentCell = isoWorld.CurrentCell;*/
System.out.println("Adding cell");
this.cells.add(cell);
System.out.println("Cell added");
}
So I don't understand
But if I remove this line in renderCell ...
this.cells.add(cell)
...It works
private final List<IsoCell> cells;
public ViewportUI() {
super();
this.visible = this.defaultDraw = true;
createTexture();
cells = Collections.synchronizedList(new ArrayList<>());
}```
You see the list is thread-safe
What's my mistake?
Hello
I tried in enter but it crashes the game in the end
@Inject(method = "enter", at = @At("RETURN"), cancellable = false)
private void enter(CallbackInfo ci) {
LOGGER.println("The game starts!");
ViewportUI.addToUI(100, 100, 512, 512);
ViewportUIWrapper.renderCell(new IsoCell(0, 0));
ViewportUIWrapper.renderCell(new IsoCell(1, 0));
ViewportUIWrapper.renderCell(new IsoCell(2, 0));
ViewportUIWrapper.renderCell(new IsoCell(0, 1));
ViewportUIWrapper.renderCell(new IsoCell(1, 1));
ViewportUIWrapper.renderCell(new IsoCell(2, 1));
LOGGER.println("Viewport instantiated");
}```
LOG : Mod f:0, t:1755685025056> Viewport instantiated
ERROR: General f:0, t:1755685025064> ExceptionLogger.logException> Exception thrown
java.lang.NullPointerException at ArrayDeque.addFirst(ArrayDeque.java:286).
Stack trace:
java.base/java.util.ArrayDeque.addFirst(ArrayDeque.java:286)
java.base/java.util.ArrayDeque.push(ArrayDeque.java:579)
knot//zombie.audio.parameters.ParameterInside$FloodFill.push(ParameterInside.java:261)
knot//zombie.audio.parameters.ParameterInside$FloodFill.calculate(ParameterInside.java:171)
knot//zombie.audio.parameters.ParameterInside.calculateInsideFraction(ParameterInside.java:128)
knot//zombie.audio.parameters.ParameterInside.calculateCurrentValue(ParameterInside.java:48)
knot//zombie.audio.FMODParameter.update(FMODParameter.java:41)
knot//zombie.AmbientStreamManager.update(AmbientStreamManager.java:291)
knot//zombie.SoundManager.Update(SoundManager.java:1106)
knot//zombie.GameWindow.logic(GameWindow.java:403)
knot//zombie.GameWindow.frameStep(GameWindow.java:916)
knot//zombie.GameWindow.mainThreadStep(GameWindow.java:642)
knot//zombie.MainThread.mainLoop(MainThread.java:76)
java.base/java.lang.Thread.run(Thread.java:840)
why is it crashing in sound manager update loop??
I don't know how can I deplay System.out.println without (?) the Mixin in the sound manager update loop?
can you please reword that, I dont understand
Ordinary it crash without any exception
I'm on phone I cannot check the stack trace
hmm crashing without any exceptions at all either means something really went bad or for some reason the loader didnt catch it
But it works when I remove the List.add call in my code
The bug come from my source but I'm doing very basic things ! Did you read it?
where did you post the code that you are using right now
Here
And the wrapper code with the static instance of ViewportUI here
I think it's an access/instantiation problem
But the ViewportUI is not null at renderCell, neither the inner List
@floral sluice what do you think
Can the parameter of renderCell be null?
you dont do any checks, thats my only though right now
actually, but you construyct the cell. Maybe something is going wrong with the cell construction?
but the fact that it either gives no stracktrace or one in SoundManager update method is very weird
Also, I am pretty sure you aren't even meant to construct multiple IsoCell, @full mountain would know much more about that than me
I'm not constructing the cell, I'm sending the IsoCell through his render method via a cast or something.
^ you create new IsoCell(0, 0)
absolutely not
I'm not already sure if I need an IsoCell or a more specific class
you will definitely crash the game doing that
That was a test
Actually I take the instanciated "this" IsoCell inside his render method
Maybe I'm more looking for IsoGrid I don't know
Did I post the Mixin already?
So you mixined IsoCell#render?
Yes
What do you plan to use the IsoCell for
As I was saying I'm looking for the game squares/tiles top class that contain every extended assets
Especially the one being visible by the game character
Ok, getting the cell is a start, but it's a singleton as far as I am aware, meaning it's only meant to be instantiated once only.
An IsoCell is the 256x256 grid of loaded squares around players. Each player has one
It's more an IsoGrid si?
Okay that's a kind of chunk
Could be useful tho
I don't know what IsoGrid is. All I know is about isoGridSquare which is the small 1x1 square you think of, with the tile image on it
Perfect it sounds exactly what I'm looking for. Let's Mixin the render method and see what append !
yes, the game will likely immediately crash if you try to instantiate another during gameplay
Maybe just from the name, you can look at IsoChunkMap.processAllLoadGridSquare() too
in singleplayer/on the client a single instance is shared by the local players, on the server a single isocell represents every area that is currently loaded by any player
it's not 256x256 either but i don't have the exact values on me: it's 200x200 in b41 and smaller in b42
oh I thought they upped it to 256x256 because memory alignment or whatever
no, they decreased it so they could say they optimised the engine ๐
l.l
Lol
they use powers of two in other places now but i don't think the cell size could be as small as 128x128
If I successfully build my mod it would be interesting to have a long distance of view
But anyway, I would look at IsoCell#getChunkMap and other methods in IsoCell. It's the best place to start to get square around the player.
Even has methods in it like getGridSquare(x, y, z)
I don't think it would be good with how slow it is currently
I'd imagine if you increase the cell size past 512x512 most peoples games would probably die
it does actually seem to be 256x256 ...???
i wonder what it was before, i was always only able to scan out 100 tiles from the player as far as i can remember
thats what I got told at the start, I assumed it was 300x300 from mapping, then I got corrected by somebody saying it was 256x256 and now I've just been using that for the time
Yeah but what if we load the game IsoGridSquares differently to match a 3d frustum instead of a big isometric square
people used to say it depended on your resolution but i was sceptical that that was actually true
Listen, you got a lot on your plate, and I don't have a lot of time in my day to help with browsing their codebase, you're going to have to get good at searching!
oh well that's pretty definitive
In all seriousness though, if you want it to be a faithful implementation, take a feature like molotovs or other throwables which are sprites, you now have to make it 3d too...
i'll never doubt you again
please doubt me again ๐ญ I'm wrong a lot of the time
First I'll display walls without textures. Computer time, I'll try to inject IsoGridSquare#render and come back to you in a few minutes
But I'm pretty sure it will keep crashing
In any case, if you know for sure it's something to do with adding a cell to the list, it's either the cell or the list that's the problem, and since lists usually work fine I'd bet it's something with the cell. I wouldn't even personally have a list of cells at all
I have to keep track of cells because I must draw my canva at #render in ViewportUI, not in another thread
Hummm there is no render method inside IsoGridSquare ...
private final IsoGridSquare[][] gridSquares = GameServer.bServer ? null : new IsoGridSquare[4][IsoChunkMap.ChunkWidthInTiles * IsoChunkMap.ChunkWidthInTiles * 64];
It stopped crashing I found the bug
IsoGridSquare cell;
for (int j = 0; j < 5; j++)
for (int i = 0; i < 5; i++) {
cell = isoCell.getRelativeGridSquare(i, j, (int)IsoCamera.frameState.CamCharacterZ);
ViewportUIWrapper.renderCell(cell);
}
But the array is filled with null values
LOG : General f:1106, t:1755767614096> CELL : [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]
epic
thanks to chuck and jvla we now have a Java channel, so please move any non leaf related topics there. When asking questions specific to leaf, you might have to specify that you are using leaf but it should be ok regardless.
I'll still be active in here though, it will be only for leaf topics like bug reports (though id MUCH rather people use github), suggestions, etc
I'm struggling with raycasting I think I will change method
It wouldn't be so hard if the game started in less than 5 minutes each time.....
your game is taking more than 5 minutes to start?????
with a fresh cachedir, it shouldnt take that long
additionally, using a mini map like MicroMap would help your loading times too.
2-3 min actually
Developping a mod = waiting years before the game load
is that to load a save, or the first start of the actual game?
mine does not take this long. are you on a hdd?
also, you should be using hot reloading where possible
I finally got this working a few minutes ago, thanks for putting in the work
I had a few hiccups but got through most of it by reading the thread
I'm on HDD
It's almost working, in fact it SHOULD work but some obscure geometry bug persists ..... 
looks like IA are useless polluting shit
WTF is wrong with my code ????????
Also colors are fucked up
Red become yellow
private int OLDgetColor(byte r, byte g, byte b)
{
return (((int)r << 24) + ((int)g << 16) + ((int)b << 8) + 0xff);
}
private int getColor(byte r, byte g, byte b) {
return (0xff << 24) | ((int)r << 16) | ((int)g << 8) | (int)b;
}
I already said to move this to #java
"my code isn't working" isn't related to leaf, id like to know here when bugs come up
ok
one you resolve the user error with mixins (which seems like you have), it is going to be work on your own
I cannot post on #java
it probably requires you to link your Steam to discord or something like all the other channels
How
It's almost working!!!!
#linked-roles
#linked-roles
Ooh nice
How do I get the mod's jar? I ran the publish gradle job, but I don't see any /dist or /libs folder in the project structure on IDEA It was Build, not Publish, sorry
I don't understand how to deploy the jar with mixins to the game.
I checked the readme at https://github.com/aoqia194/leaf-example-mod.
This explains how to distribute the mod to the workshop, but not how to actually use the file.
I tried copying the generated mixin's class file from the jar into the game's folder that would match the package, but that did nothing.
I also tried to copy the whole original class file, tweak it, compile it and then replace the original .class file in the game folder with the output file, but the compiler won't let me use the same class name twice in the same assembly, and it won't let me compile a source file without the other references to classes in the assembly that the class depends on so, that went nowhere.
So the changes work fine when launching the game from the IDE on the dev env, but I can't deploy them to my regular steam installed game instance to test them on a saved file, and I wouldn't know how to write install instructions since I can't install them on my own game instance either
If you want to install it in the prod environment like a normal user, the leaf-installer is what you want to look at.
It's not fully finished, and has some bugs I want to fix, so I don't recommend relying on it, just for testing or seeing how it works is fine though.
Well I'm not planning to distribute anything to the store, I want to finish the whole cycle of development, like, "this is how I would do things at go time"
I think I can omit the part where the jar is uploaded to steam and not miss out on anything of substance
Yes, you can use it locally. The mods/ModId/leaf/mods/ folder in the game folder can be used to manually load mods
let me double check the path though, im not sure what i set it to
Yup, going through the git repo's notes right now.
I'm very new at this so it's throwing me on a bit of a loop
thanks again for putting in the work to make this work at all though
it's a cool idea, even if it's still a work in progress
actually it's not in the git notes, since I didnt think anyone would use it
turns out its the same as the workshop ones, just in the mod folder
for example, ZomboidGameFolder/mods/YourMod/leaf/mods/YourLeafMod.jar
Follows traditional PZ mod structure
But you shouldn't need anything else, juist that folder structure and the jar at the end
I'll take a crack at it after food, fingers crossed it's all smooth sailing
Thanks for the help!
I just thought how I don't have any support for the B42 modding structure where there's multiple version folders. It's possible though. I'll add it to the issues so I dont forget
If I find anything of note during the process I'll chime in here
Please do, I can't think of everything because im biased, so naturally there are oversights
Really looking forward to leaf becoming bigger. I sooo don't want to do a java file replacement for editing baseVehicle.java (12,000 lines long) as it would almost guarantee my mod breaks every update.
imagine you just want to change one or two things, now you have to fix(!!) and also recompile the whole thing
There is some classes in the game that are impossible to do without leaf or using a bunch of different compiler as trial and error
Yea, there is literally just a few tiny functions in baseVehicle.java, mainly related to how the vehicle starts atm, that id love to tweak. (make it fail more with poor starter condition, maybe play different sounds, etc)
take longer with a poor starter (hence more battery draw)
But replacing a 12,000 line file for that? haha.. just no.
This is why I suggested leaf in the first place, then you called me stupid
More I didn't want to use chatGPT, since chatGPT generally fails at modding games and you proceeded to overcomplicate things.
In my view using steamcmd is a simplification. I asked GPT for steamcmd commandsโฆ
The only thing it got wrong, aoqia a human, also got wrong
A numerical id, something they are particularly bad at, that I even anticipated in that very conversation would be wrong
You overreacted
Sorry. I was exhausted and I had been up to late.
np
Also @full mountain when you are not busy (and anyone else that can chime in), I need the rundown for B42 mod structure. Mainly the caveats, as most of the actual general information I can get from the wiki page. I have a feature idea where leaf can load the correct mod based on the version folder, instead of just one folder. Not sure if this is a good idea for Java mods, but it seems logical if there is say a b41 and b42 mod. Obviously this would rely on the game's mod structure (notably because of how non-existent it is on B41). I also thought about having my own structure in the leaf/mods folder like leaf/mods/41.78.16 and leaf/mods/42.11.0-unstable.30715, but I'll need more people's thoughts about that.
there's not too much to say about it
when trying to load a file, the highest version folder that doesn't exceed the current version is queried, and if there is no file with that path in that folder, then common is queried instead
the version and common folders are structured exactly like the root mod folder would be in b41
So if you are on 42.11.0 and only a 42.10.0 folder exists, it will load the older version?
as long as there isn't a 42.11.0
hmm ok
to be honest, most people haven't done much with it still, because older versions aren't available anyway
In my case, it's independent of the game, so I'd just be replicating what the game does
it'll probably be more meaningful after mp comes out (41 had many builds remain available for servers) and between builds
yea, I do see the appeal for it too. many people having their separate [B42] version of their mod lol
Wait, what is the behaviour when you load a b42-structured mod in b41? like does b41 load common too, or does it just expect a media folder like normal
b41 won't load anything from the new structure and vice versa
the files are still there of course and some things that take file paths might be able to reach them, b41 doesn't do anything to explicitly ignore them, but since the root folder is different it just never looks in there on its own
the reason people do this is so they can get on the front page again ๐
i figured as such
because of the versioning system there's no actual need to do that, it's just to get a second initial release
Maybe it's a feature to be added once b42 releases it's stable version? I don't know how they will change the structure in the future anyway
i wouldn't expect them to change that but the modding features in b42 are very wip
basically none of the new mod.info stuff works, mod options is a liiiiitle rough, and the ongoing workshop id thing
oof
i don't see them doing 'break every single mod' changes though
I really do have better things to focus on though, such as the installer needing installer script editing
i suspect that's the reason they haven't fixed the workshop id thing even though it's a one-line change
yeah, imo this is not very important, even lua modders don't really use it
it's a nice to have
I'm working on trying to get the loader to use log4j, because I don't like the current logging system, namely it's cluttered, looks ugly, and if the game halts or crashes then no logging can be output, even if there is an exception @jagged scarab found this edge case.
I tried in the past, but I didn't have enough knowledge about the logging system to do it. Also, a challenge will be keeping it compatible with every version of Zomboid's logging system, so it means I probably will have to ditch reflection calls to the game's logging classes (yet again more effort needed).
It's just a huge pain to do, but I think it will be worth it.
โ โ โ โ This article is about modding structure of Project Zomboid.ย For game files of Project Zomboid, see Game files.ย For explanations of file formats, see File formats.
Local mods are recognized in two different folders which each have their own rules and structure and are both in the cache folder:
โข Zomboid/mods/ - place to put mods to install manually โฆ
Mod folder
The files of your mods are placed in the folder Contents/mods/ alongside a mod.info file which is the core of your mod. The folder structure of your mod folder should be as follows:
Build 41
Build 41 uses the following modding structure.
Contents/
โโโ mods/
โโโ MyMod1/
โ โโโ media/
โ โ โโโ ...
โ โโโ mod.info
โ โโโ poster.png
โ โโโ ...
โโโ MyMod2/ <--- for extra mods, simply add a new mod folder
โโโ media/
โ โโโ ...
โโโ mod.info
โโโ poster.png
โโโ ...
Build 42
Build 42 uses the following modding structure.
Contents/
โโโ mods/
โโโ MyMod1/
โ โโโ common/ <--- common folder is mandatory, even if emptyย !
โ โ โโโ media/
โ โ โโโ ...
โ โโโ 42/
โ โ โโโ media/
โ โ โ โโโ ...
โ โ โโโ mod.info
โ โ โโโ poster.png
โ โโโ 42.1/ <--- for extra versions, simply add a new version folder
โ โ โโโ media/
โ โ โ โโโ ...
โ โ โโโ mod.info
โ โ โโโ poster.png
โ โโโ 42.1.5/ <--- same here, another different version
โ โ โโโ media/
โ โ โ โโโ ...
โ โ โโโ mod.info
โ โ โโโ poster.png
โ โโโ ...
โโโ MyMod2/ <--- for extra mods, simply add a new differently named mod folder
โโโ ...
@floral sluice this might interest you regarding the general mod structure
Albion explained everything I needed to know regarding it, there's not many downsides as I expected, but again it's extra work on top of an unstable release, so I wont prioritise it right now
Especially when I've already got an unstable system in the loader already which I dont like, using reflection to access the game's logging system. It's not ideal at all, and is very shaky for future releases. I'm honestly not quite sure how I will circumvent this, it might require a complex bytecode patch to automatically find the functions necessary and redirect them.
in fact, it already broke twice before, just because TIS decided to change function names and move them to different classes, etc
I tried to install leaf-loader and the jar errored out because the main class couldn't be found
I checked the jar manually and there is a main class in it though
Reflection isnโt intrinsically unreliable, if you are doing the standard things itโs probably not a catastrophic situation
Did you use the installer?
I ran the jar like a normal executable as per the instructions on the readme.md state
What java version?
23.0.1
no idea
I think maybe the project didn't set the main class correctly and that's why it can't be found on the jar
because it is in there
Maybe I can specify it manually via args, lets try that
Nope, and the main is in the manifest
There were several jars in the maven, maybe I got a bad one, I'll try a different jar
You need to use java -jar jarname.jar
it is expecting a class name without -jar
It's unreliable in my case because the devs seem to like to change the logging system enough, and theres not enough guarantees
It's worse that the downside to them changing it isn't just "the game doesn't work in this one specific area" but the fact that you wont get any logging
It kinda seems like Leaf versions should have targetted compatibility with specific game versions anyway
I am not doing the similar version system as fabric where they maintain pretty much all versions from 1.3 to 1.12 etc, im doing it so that the latest version should be able to be used on every game version
It ends up being less maintenance overall, and I like it better. Also, I cant update previous versions even if I wanted to.
Well "all versions" is an overstatement, since I cant test them all, but as many that makes sense, eg I plan on 41.78.16 upwards
TIS only includes some previous versions in the beta testing anyway, like, AFAIK we can't roll back to 42.6 for instance, so that seems like that effort wouldn't justify the payoff
it's not like minecraft, mods don't really tend to break between most updates so nobody plays on older versions in the first place
it'll mainly be between the latest stable release, and unstable release, though im questioning to support unstable either
im only doing it right now because its so popular, 42 unstable
I guarantee if I didnt support 42 unstable, I'd probably get ridiculed for it lol
Seems like latest release should support the latest stable, and our dev branch should be working towards unstable support.
"our", you know what I mean
good point also
dev is mainly an intermediary branch for feature branches to sync to, wihch then gets merged to main. I don't think a separate branch for unstable release support is necessary, when I can include it in the main release. If the features aren't fully stable, I can only enable them if an unstable version is detected (what I do for the b41 logger and b42 logging system patches separately)
Right now I don't use any feature branch yet, because im "rushing" to get it to a good point, theres not that many commiter other than me currently, its not necessary now
as long as i've been following the game, as long as it's a major build ahead, the unstable branch has always been far more popular
why cant they just go back to closed testing exclusively ๐
it even generates more hype
because then people start calling the game a scam ๐
people load up the public unstable release and expect it to be the "full" release version, then hype dies quickly
"im on b42, whers the NPCs!!!!" like this
and you tell them "its not finished yet" and they dont like it
true, maybe thats saying something for how inefficient the devs are working, maybe not their fault fully, but look at the state of it all
they probably make more money overall then I will in my lifetime, yet it feels like I could add some of these features in a day...
as we all know, their codebase is absolute disarray
i imagine the struggle is actual and real
unironically with leaf I probably could actually add some of these features in a day, maybe I'll live stream it for proof or somethin ๐
Maybe I'm biased from lack of skill, but I've seen their codebase and I wouldn't want to commit to release dates for anything either
i'm not sure what features you're referring to but please don't feed the scam crowd ๐ญ
nah they seem allergic to basic nominal refactors
accessors and mutators are implemented and not used, code is commented out on a distributed branch, I can't see DI being applied anywhere
but, they have no one to blame. They can say "well it's not our fault it's the previous devs fault" but maybe they look back and see it was them who made the system before them
game devs don't know what DI is
there's lots of code that could be refactored into functions but is instead copy-pasted all over
tbf the accessor/mutator spam is for lua
and for the life of me I still don't understand the point of the PZ helper "Clamp" function
it's not even about duplication. refactoring a long function as a high-level composition of calls to smaller well-named functions is worth doing even if you're not reducing duplication
Same with large classes that compose and delgate to other smaller well-named single purpose classes
A basic NPC system could be done in a day or two (with their shitty class tree), but they need a whole build 43 for it upcoming? If they maybe refactored their entity classes properly, it could be done sooner.
and there's so many classes that are essentially DTOs while a few class files are like, 5000+ lines long
Most of the small bugs in their c ode like the fields in mod list not being implemented could be done by junior on 2$ hour in like 2 hours
Why dont they hire just a person to only fix the bugs? and a person for features, split the tasks, its beyond me
I agree that if they just hired a young nerd who found the joy of nominal refactoring early, they would have quite the boon
it's also weird that they have what looks like systems interacting, but instead of having them neatly divided and have APIs defined for them, it's all just globbed together haphazardly
they will struggle in the future too. Their features and bug fix wont be able to be released fast enough, probably the game will lower in players since b42
But I don't get it, some of the people will completely forget every bad thing they did previously when they release a flashy feature, like ragdolls. Ok cool, the zombies have physics, a good feature imo. But then they act like the game is now bug free and they've fixed it
I mean, I remember when people praised ragdolls for a couple of weeks
and then they started complaining that ragdolls broke cars and guns
because now you have to step on zombies to double tap them or you can miss several shots at point blank range
gamedev is really really hard. it's wildly multi-disciplinary and i appreciate the challenge for any gamedev
but they make it so much harder by writing the kind of code they do
it's typical in the industry
I don't mind bad game dev, everyone starts from somewhere. I don't like not owning your shit code and knowing when it hurts you more than helps
I don't feel competent to critique that, because I know I don't understand the reason behind these choices
to be fair this is a professional challenge for all software engineers
i'm not entirely sure they have been ignoring the problem
enterprise software is rich in that kind of (maybe overly) robust engineering, but also, pretty much nobody cares about performance in that like 99% of the time
but then they've been just bandaid fixing the issues that come up instead of fixing them properly.. that's ignoring it imo, or not wanting to deal with it now
and then it probably makes issues in the future too, you could probably name a situation where this happened, im not knowledgable enough in their update history though
we don't need to know specific examples not really
when you have a long functions that's immersed in the low level details of the overall objective
then every time you don't read that function for a few weeks, you have to reverse engineer it the next time you come to it
if your whole codebase is like this, you're just asking for regressions
it's entropy
you have to actively spend energy to work against it
you don't have to be a genius super programmer either
reminds me of what I think jab posted a screenshot of, "When I wrote this, only God and I knew what it meant. Now, only God knows."
I mean it's called technical debt because it also accrues interest until it becomes unmanageable
just some standards around nominal refactors, and vertical segregation like haiscod was saying, it only takes a little gardening
you can actually have IDE's like IDEA do this kind of nominal refactoring automatically
highlight some lines and move to local method, and it'll move take all the locals and make them parameters and replace the lines with a call to the new method
I still think they need to go away from Java. Or convert lots to natives, even with there interop cost too. this is my opinion though, im ok with them not doing this, its their game not mine
Java's not my favorite, but there's nothing particularly wrong with it, and it's all implemented in Java now anyway
it's come a long way since the 90's ๐
Reading the Lua scripts made me appreciate Java tbh
I don't know if it's bad per se, I just don't like the quirks I've been running into
maybe if I actually learned to use it I'd also learn to appreciate the quirks in context
it's not like php in the 90's bad, where it's like broken
or maybe that's just Stockholm syndrome by another name
it's more like it's just wayyy too primitive experience with the panoply of great choices today
i don't think lua works well at scale, particularly pre-type annotations
there are so many ways to embed javascript today, with so many transpilation choices, it feels like lua is riding a deprecated momentum and mindshare for gamedev scripting
Lua is ok, just you have to make it a simple interface with the game. If you make it too complicated, not user friendly enough, it will turn into its own thing
not that js is the only choice, i'm just saying lua is silly choice
yeah but that's like how all embedding works
Oh my God thank you, someone jumped on my throat the other day for daring to suggest vanilla JS would be an improvement
you expose some interface to the scripting runtime
i'm very fond of lua personally
I think its good because its very lightweight. And if you use luaJIT, or luaU, very performant
Javascript I dont know about how the GC works
js is just a more featureful langague with a lot of great transpilation options
and so many libraries...
at least with v8 and spidermonkey, not many language runtimes has had more manhours and dollars invested into it
we're talking billions of dollars
v8 is one of the most optimized pieces of software that exists
i have a little altar/shrine in the corner of my room
where i do daily prayers, that Jab will bring pipewrench back to life
๐
๐
Jab is such a Chad at PZ modding. Hi everyone
The mod's not getting picked up.
Is the location for the leaf mods folder configurable?
I think that's matching the location given
The console shows the debugger working on the dev env and the hutches are at 0 dirt,
on the actual game instance ("Prod" IG, but it makes me feel a bit pretentious), no messages and dirty hutches
I also tried to set it up as if it were a lua B42 mod, that's not fixing it either
hmm I haven't tested it in a while. It's possible I broke it somehow
either that or it's not actually loading it from the mods folder for whatever reason
I tried checking the leaf config json but I don't see any directory paths to /mods in it
I'll try the other mods folder
I might've messed up, it's possibly looking for a cursed path
hmm no, it should be looking in the mods folder
try the mods folder in the cachedir yes
Just to confirm, it's normal for it not to show up on the mods menu right? Because it's injected Java not lua scripts and assets with a manifest, yes?
and since it's getting injected at runtime I need to shut down and restart the game every time I test
correct
actually, there is a way to get hot-reloading working
check the pinned comment
I'll take a look when I get the mod to load
Turns out there's two Zomboid directories with a .leaf subdirectory
Ah nope it was neither
the .leaf processedMods folder is normal, it's the loader extracting mixinextras jar at runtime
Though I don't need to do it at runtime for prod (only dev), I can do it at install time, now that I think about it.
You will have to assume it's broken right now. I will test it tomorrow when I can.
Yeah, might be something wrong with my env too, I've noticed Steam makes multiple mod folders for PZ.
I've tried those too though, I've just about tried everything I could think of atm. :/
Better walk away from it for a bit
I can usually tell when it's a user issue vs loader issue, this is probably the loader not you
Doing C++ I always looked for a way to reactor around 1000 lines and felt like I was doing something wrong at 2000 lines.. I dunno about java.. but BaseVehicle.java is 12000 lines and covers everything from physics, to user interactions with starting the car, to saving/loading the vehicle to savegame
Dunno if this helps but, I tried the installation for server option and it errored out
Yes the server installer section is not done
Wdym multiple mod folder ?
These are all "mods folders"
@valid nova Pick a mod folder, they all work in one way or another
Isn't that where the examplemod included when you install the game is loaded from?
it's not actually loaded from there, the game copies that entire directory to your local mods folder if it doesn't already exist
That seems needlessly convoluted
it was probably the easiest way to create a default but it endlessly confuses people
Ok. What's the deal with the other two?
steam/steamapps/content/108600/ is where steam installs mods, ProjectZomboid/steam/steamapps/content/108600/ is where in-game hosted servers install their steam mods (it's not clear why it's separate but it doesn't seem to be considered a bug), Zomboid/Workshop/ is where local mods are stored, ProjectZomboid/mods/ is nothing
Guess I didn't read that part of the wiki
Thank you
that backup copy of the mods is why zomboid is literally the only game in existence that would commonly give me 'mod mismatch error' with the server I was hosting on my own pc, every single time a mod updated
had to delete it, validate files and run it again..every..single.. mod..update
yeah, i really don't get it
Come to think of it, couldn't you just symlink the two directories? -_-
that's what i've done
rofl.
hard drive manufactures hate this one simple trick to half your zomboid install size!
I guess I can make a section about it, that's a good remark
Might help lessen the confusion
Hu.. I think if I had access to basevehicle (without having to overwrite the entire file), I could add burnouts (visual) and raised suspensions... Looks like wheel rotation is line 4356
an alternative is to modify the class bytecode directly. depending on how much you need to change, this can be not viable.
Id rather write you a C++ or nullsoft script installer or something for leaf ๐
If its changing an if statement or field value, is within reason. doing multiple function calls and branches is annoying though
yea I need to add some new logic so meh.
@floral sluice how do you run the leaf-loader project? I'd like to know what's happening here
But I can't find a Main in the project to run
Sorry, it's been on my mind and I couldn't leave it alone
gradle build it via build -x test and the leaf loader isn't ran as a standalone project, you run it from other projects like loom or using the loader in your mod
getModsDirectory0 will return path/to/zomboid/mods if you dont override it with leaf.modsFolder=C:\path\to\mods
Thanks
Yaknow, mods download steam\blahblah.. and zomboid is (generally..) installed in steam\blahblah. There should be nothing stopping you from having a .bat file be the installer for leaf that is just copy stuff/*.* ../../../common/project zomboid/
(for end users)
That'd at least reduce it down to finding the right directory, clicking thing, no other installs? (Assuming installing leaf for the end user can be done by just copying the files to the correct directory?)
Sure: doesn't work on linux/mac, but Im sure they have their own simple script.
(idea is basically: use relative paths to bypass the whole 'figuring out where the hell steam/zomboid is actually installed')
Steam can install to any path, not just C:\Program Files (x86)\Steam
On Mac/Linux, completely different paths, can be user specified too
Zomboid can also be located at any location and still work
Getting the user to put the path of zomboid in isn't hard. Most people already know where their PZ install is anyway
And why would I get the user to manually copy files to the install? That's one of the purposes of the installer
Not to mention that the installer doesn't just copy files to the game folder..
If downloading Java is such an issue for people, I will make it a point in the readme to use the game's JRE which comes downloaded with the game. If you want to use it, it's as simple as:
cd "path/to/zomboid"
"./jre64/bin/java.exe" -jar "path/to/installer-1.2.3.jar"
I did also think about forking PrismLauncher so that Zomboid can have a launcher, because Steam is unreliable and replaces files which makes the install/maintenance step harder
But I didn't follow through with it because most people are used to Steam, and I would still need to worry about Steam replacing files too
Unfortunately, nothing is going to be as pretty as an official implementation of Java modding. Of which, I am not sure they will do in the future.
I don't think it's necessary to stick with the current game workshop to distribute Java mods.
For example, Satisfactory has a completely separate launcher for the game with mods, which allows users to browse and download them. However, this approach comes with additional infrastructure costs.
Another example is Terraria. tModLoader is a completely separate Steam title with its own workshop.
Oh, and I remember the early days of Minecraft modding - no workshop, no launchers. Just manually installing mods by copying and praying the game would launch ๐
Those who truly want to play with Java mods will find a way to install them
ah k
Why make their life hard like that when we currently already use the workshop ???
That's so stupid
Idk man all of your ideas seem to be more centered around frustration that a system is being made to make it easy and just pure hate of having to download Java ?
I don't get the point of not sticking to the workshop lmao this is so stupid
It's the sole reason players don't use Java mods, bcs they need to manually install them and they aren't viable
The goal of Leaf is to simplify all of that for both the users and the modders
If we don't utilize the workshop, no java mod loader will ever be viable ...
Players are too used to the click and play. Making a whole different system would need one or more extremely impressive mods for the community, like Bandits level of impact on the community
I don't mean to overcomplicate things with Leaf. What I'm trying to say is that there are options to work with, and players will likely use whatever you create if they really want to.
Itโs not very hard to install another Steam title or launcher to make managing mods easier, even if itโs only used once. It also provides an opportunity to update the launcher and mod loader without needing to download and reinstall it from the repository. So basically, you need to consider all the pros, cons, and requirements. Currently it's too hard to predict what would be simple or not with java mods
Yea having a steam title for it, so steam handles all the required installs whatever they might be for whatever OS, would be a great option. Yes some users will definitely jump through whatever hoops to use a java mod, but it would be great if it was 'steam workshop' simple!
It could even use mods on PZ's steam workshop, just installing the java portion. Just having steam for updates, ease of install and legitamacy when mod authors say "Go download and install this!", its a bit easier sell when a steam workshop mod just directs to a tool hosted on steam (And presumably would have been removed quick if it was something bad)
(Id say keep the mods on PZ's workshop, so PZ can still easily handle the LUA part of mods, and so java mods will have visibility on the main workshop)
Exactly!
Java mods can also have some LUA part that opens a dialog box telling users to install leaf with a nice steam URL if leaf isn't installed.
That is not the problem. The problem is that Leaf isn't picking up the modded jars in the folder where it's supposed to. A different installer could have the same exact issue
Ah.
I tried different folders because I guessed the mod loader might be checking those since aoqia said it's meant to follow the normal PZ mod structure
But because the normal PZ mod structure is kind of ass, this meant checking multiple places
None of them worked anyway, so I figured I'd give it a shot myself and see what leaf was doing
Maybe aoqia will have time to find out what the issue is first, maybe I'll get lucky first
That's the beauty of open source
You can't do dialog boxes or any native UI code from lua
The entire mechanics panel is LUA
oh you meant in game UI, ignore me then
Yea im just saying, someone installs java mod, PZ style, loads it, LUA detects leaf isn't installed, opens SOME kinda dialog box mid-game saying "hey this mod isn't properly working cause X!"
Im already figuring out how to do it for the java files in my mod.
(right now im thinking java code that sets a LUA global in my mod? or something.)
Since the java class im editing isn't exposed to LUA ๐ข
Yes that is definitely possible.
I could bytecode patch somewhere good that does rawset on the global table, I just don't like doing too much bytecode patches because its a point of breaking
That might be something for the leaf api (??)
Erm, isn't there just java (kualua?) for editing the LUA tables?
I know they can be read by java..
But then again, you can reasonably tell when a leaf mod is installed based on the class. For example if you have an exposed class Foo and it has a method named bar which is also exposed, checking if Foo and or bar exists means the leaf mod must've been loaded correctly
Mmm good point. Sadly I can't do that.
though I do understand that's a bit of a hard point to make when you don't have to expose anything. An api function like isLeafLoaded or something, alongside getLoadedLeafMods
(with my java file replacement of a non exposed class)
Yea good to support installed mods easily for cross-compat code
Also, I know Gigawatt mentioned it with good intentions, but using Steam as basically what is the github page for leaf now, for hosting leaf installer is out of scope for even me
Like I said, if someone wants to go that route, they can always fork PrismLauncher and do that, but that would be another thing to maintain that I probably wouldn't have time for
I'm fairly certain that having your mod files spread in two different mods is absolutely not the way to go, and having two different methods of installing mods isn't either
You end up having multiple systems to load mods, instead of sharing common grounds between Leaf mods and game mods. Also Leaf mods are not meant to replace normal mods, they complete each others
Unless I'm missunderstanding your idea
But like every mods that modify the mod menu etc would still apply too
Leaf is just too independent of Steam to have it on there also, especially only in Steam. Ideally you can install leaf to a GOG version of the game, or to an install of PZ that doesn't use Steam, etc
same. I need a guide on how to use it -_-; and more of a use case then '.. airbag/raised suspension parts!'
(although completely rewriting the startup code for engines to involve setting your starter on fire if you hold the key to long would be fun)
That was not a feature request, just some points to consider
Indeed. Anyway, we will see how things with Leaf modding evolve. If the PZ Workshop is not enough to make the whole process of using mods convenient, alternatives will certainly appear
We probably donโt need to call other peoples ideas stupid, itโs a boon that anyone takes an interest in Leaf
You're right I'm sorry, I don't know why but I've been very tense in my reactions and embittered for the past week and I don't know why, while I had managed to chill
@vital bloom Turns out im incredibly stupid, I made the mods load from the cachedir folder...
I made it this way so it's gamedir independent, I don't know why I thought otherwise anyway
So if you put your mod in cachedir/mods/YourModID/leaf/mods/YourModJar.jar it will work
Also, you can put it directly in cachedir/mods/leaf/mods/YourModJar.jar but I would recommend following the normal zomboid mod structure
I'm glad you chimed in now, I was trying to figure out how to add a logger to the leaf-loader project and try to diagnose from there.
Which honestly might not be a bad idea on principle anyway
at least to add an optional -withLogging arg at launch and have it generate logs to a folder to troubleshoot stuff
I did forget to mention, the loader has a test run configuration that mimics a mod environment, so you can breakpoint the loader and stuff. It's :zomboid:zomboid-test subproject. If you're using IDEA, it should automatically show up once the gradle is synced
Oh, I figured how to set breakpoints in the library code from IDEA, which was doing kinda the same thing
Side note, I also saw that the env is loading the mod classes themselves and skipping any jars, at least on my machine
I figured this was intended behavior but I literally just started messing with this about 30 mins ago
im going to double check here in a minute that the mods are actually being loaded properly
I'm going to do the cachedir workaround, just out of curiosity
wait. When you say "cachedir", do you mean steamapps/common/{pzinstall}/cachedir ?
no, by default its in %USERPROFILE%/Zomboid
I still dont think its loading them correctly. I wonder what I did to break it, since it was loading correctly when I added this
I don't recall a logging system in leaf being there by default
really wish I had logs to at least get clues because I don't have any concrete ideas as to what's wrong
What was the last working version you recall?
Uhhh I think I tested it ages ago on like 1.3.0 or 1.2.0 when I added it, but I wouldn't recommend going that far back
In the meantime, there's already a system to load mods externally. Do it via:
-Dleaf.addMods=C:\path\to\mod.jar;C:\path\to\another.jar
You can add that to the Zomboid Client run configuration's JVM args
Ok so not this way, add it via the game startup args in steam using this last format, got it
Not the normal way until I can figure out why it broke
It broke because we displeased the machine spirits by using the wrong sacred incense
It's crashing on startup without an error message
lemme see if I can find some logs in steam
Uh the order of the args doesn't matter right?
You can't put JVM args after normal game args
needs to be in this format:
-Dsome=123 -Danother=456 -- -debug -pzexeconfig ...
Wait, you are trying to load mods from prod environment and they aren't working?
Also I got it to work fine, I was putting it in the wrong folder myself...
Yes.
The mod I made worked fine in dev (from IDEA using the run client job).
I installed leaf-loader with the installer, put in the args from the launcher on the steam args, started the game, and it ran fine, but it didn't apply the mod
I placed the mod in the folder that you specified before, and it's not working in the game, so I figured it's not picking up the mods and it's probably a path issue
(When I say before, I mean last week when I ran into this issue)
I can show you what's happening on call if that'd help eliminate ambiguity, if it's convenient for you
No, scratch that, sorry, I see a new log file
Yeah no it's my fault, the mod's using java 23 and apparently 17 is required
It'll probably work when I change that, gonna do that now
It's working.
It's not logging anything to console, but that's a minor gripe.
Yea thats why I got java 17 when I was told there was different versions lol
"But the java 23 compiler can target 17" "OK but till I get things working, Im'a do it the easy way"
Yay ๐
what was the mod for? just curious
Disabling dirt accumulation on hutches.
It was more of a way to test the leaf fork and how easy/hard it'd be to make Java mods for PZ
I wanna do other stuff, but I figured I should start as simple as possible
I'm not quite sure what to do next, because the things I keep thinking about imply a lot of changes that'd just get wrecked by the devs, so I'll just keep fiddling with the code making changes here and there to get my feet wet
The first thing I'd really like to do is find a way to fix the driving stutter, but that might be a bridge too far
Yes that is generally the best way to start, but jumping in to the deep end can work sometimes too, you probably want to get really familiar with mixins in general though if you plan on replacing full systems
I had a taste before, I used to do Minecraft mods, though I haven't touched that in months
and I mostly stayed away from mixins for simplicity reasons
Once you learn mixin, it feels like getting all of the infinity stones
You basically have the power to modify any class any way you want
Choosing the best mixin type for the job will help you as well
I'd tell you what I'd like to do on impulse is break up all those damned 5k plus classes in the game but that would just be rewriting half the damned game
it triggers my ocd like mad but it's a blatantly bad idea
Yes I wouldn't bother with that, you're basically doing dev work for no reason. If you want to retain compatibility with the standard game, it would be hard to
No matter how aggravating the original code is, not much we can do about it from a modder perspective to rewrite it all.
Yes, at that point it'd just be an alternate engine for the game
and that's infeasible and pointless
yeah at that point we just make a new github repo community game ๐
That's probably how that other game that was "inspired" by PZ started
the one about plants in a space station
anyway I think I'll start by actually documenting the process of getting this thing running in case something messes up
I'm actually going to improve the example mod's readme some more. I am trying to think of what more to add, and I will scroll up in this chat later to see what else I can add to it
For now, I've done a quick edit on it
I think iv rewritten about 50% of car controller.java atm.. ๐
it has better logic and is shorter now.
Mail it to them
๐
Do you think they'd care?
Maybe, but they tend to want to handle it themselves. At least from past examples.
shrugs
Although if you go back even further, they've adopted mods too. And even hired modders to integrate their work directly into java. So ๐คท๐ปโโ๏ธ
Cars have been on the agenda for reworking for a while - the render depth changes and z heights, ramps etc, were cited as reason for delays.
Might help that im only altering 1 file too..
... completely altering.
But hey, I added in (less annoying and constantly on) tire squeals (the built in ones where turned down crazy low because they are CONSTANTLY occuring, with the front wheels slipping like 90% of the time in a turn) (I'll not spam here lol..)
@floral sluice I wrote down some of the stuff in this thread along with the docs you wrote down on the readme for the leaf-loader and the mod template. Hope it can be of use at some point.
this will be helpful. it's good to get user perspective
If someone asks what leaf is currently in terms of progress, its basically in the "Do it live!" stage where everyone gets to be a QA tester ๐
Happy to contribute in whatever capacity is needed
Feel free to commit anything to the readme (or anything else) to help it if you want. I will accept all PRs. The only thing I ask for people to follow is conventional commits which is a straightforward specification for commit messages: https://www.conventionalcommits.org/en/v1.0.0/#summary
I will admit to not having worked on actual feature/fix commits to leaf for a week or two, because IRL stuff catches up to me slowly, and in the meantime I'd rather deal with the stress of things by playing games and not coding, because coding makes me stressed more when I'm already stressed enough
As much as I'd like to have everything done immediately, I can't without at least some financial security so IRL has got me occupied, and I'm moving places in a few days, long story short it's just been a hassle with lots of things at once.
It's a free volunteer thing, I don't believe anyone seriously expects this to be priority 1
Or at least nobody who should be taken seriously expects this
I've set up a github project specifically to get more transparency if I didn't have enough already. https://github.com/users/aoqia194/projects/6/views/1
Also, the not being able to see decompiled game sources properly is a bug. You shouldn't need to search filter via directory, it should just show up under "Project and Libraries" general search filter. I'll look into this soon
@vital bloom I read the attached PDF. Do you know what you mean by the "Run zomboid client gradle job failure"? If you could provide an example or two, this would be great. I personally haven't experienced this yet.
Most likely what is happening is that when the game version changes, IDEA doesn't refresh these run configurations, so the version stays on the old one. This has been an issue for some time, and it's on my todo list to manually recreate/refresh the run configurations where needed, though I'm still trying to figure out a proper mechanism to do it.
Unfortunately I can't say what triggers this, but it seems not to be tied with game version changes.
I've only tried to use leaf with B42.11, and it still breaks occasionally.
I didn't document the issue at the time, I'll do it if it happens again.
Specifically, the IDE says it can't find a Main class, despite having the correct fully qualified class in the config. There's no way to make it recognize the class either. The only fix I found was what's in the PDF, delete the .idea folder and let the IDE recreate it
hmmm ok, let me know when it happens again. assuming it's something related to the run config, you only need to delete the .idea/runConfigurations folder
Also I just realised that the run config also doesn't follow GRADLE_HOME, so if you have it set then it gets ignored.
Something even Fabric overlooked I guess
I keep mixing these up. For reference, if I ever refer to GRADLE_HOME as the user directory's .gradle folder, I meant to say GRADLE_USER_HOME
I actually can't wait for the day I can add unit tests back, with maybe more unit tests specifically for zomboid runtime, similar to how fabric has it
so many issues though purely from TIS not having the game publicly downloadable, which wouldn't even be an issue normally
I didn't actually get anything done thanks to crippling migraines :/
Well they are trying to sell it
How is this coming along now?
From my understanding, aoqia has been occupied in the past days
I have not asked in about 2 months haha
Ha well maybe there's been some changes lol 
Project got a lot of attention in the past weeks
Which led to the creation of #java
Yassssss
What finally sparked the interest
Idk a few random people getting into pz modding with java experience
Thank the gods
Now to untangle the entire lua side of the codebase into a java api. And then we will have truly peaked ๐
Gonna be that scene from lord of the rings where gandalf purges saroman from the theodean ๐
The Lua side of the code:
"If i go, the UI logic dies"
The Java Devs:
"You did not kill me, and you won't kill them. I Will draw you out Lua like poison from a wound"
๐
yeah there's been bug fixes and some small things over the past month or so but nothing too crazy, I've been preparing to move and some other irl stuff over that time period, and I just moved majority of my stuff yesterday, so I don't have anything set up currently. As you can probably imagine, everything is on hold right now
also, i dont think the converting lua to java is a good idea, mainly bc lua is so integrated into pz that every update you're going to have to manually like merge changes from game lua to java, means uploading the games lua to a repository to track changes etc
if you really hate lua, i think a better p
options is maybe to use jab's typescript to lua transpiler
though i still think the idea of building some kind of demo ontop of PZ minus all its lua, would be kinda funny just for fun
Challenge accepted ๐
@rugged fog When you can, please pin this ^
Can I suggest putting it in the readme of the main repo?
Like a link that is
i've added a little note for it on the main leaf repository, but there's not really anywhere specific to put it
for a couple reasons like:
- the board isn't repository specific, it covers every issue/pr on every repository (though i have to add them manually for now, i will be able to eventually set up an action to auto label it)
- the information on the board is, for the most part, available on any issue you click on, so if someone wanted to work on a certain issue, the board isn't much use
and, unironically, the main gathering point for leaf as a project is currently only here. i haven't my own discord or anything of that nature. though i leave discussions on the repositories open, most people dont use them and find leaf through the modding discord
i just want to take a small amount of chat space to say thank you to everyone who's been nice to me since i started modding for this game. you all are the only reason i mod this game at all, seriously.
Same here and I am looking forward to leaf blowing up! So much cool stuff could be done with java modding.
I'm still very conflicted, should log4j logging be a separate mod or be integrated into the loader?
actually no it kinda has to be in the loader (because of some of the game's libs including only some old log4j classes), ignore me
the only downside I can think of is that everyone will have log4j logging (which imo isn't a downside). I could make it a switch to turn it off though too.
When I finally get my other separate PC running so that I can add back unit tests, I might have an idea for how to do the whole game not being available easily issue for github workflows
I can eventually have my runner pc have a py script that runs steamcmd periodically and checks for game updates, and if one is found it updates the game and then generates and uploads manifests for the game to leaf automatically (which would be super nice), and then store an archived version of the game
that only came to me now, and I'm still wondering how I can do it without making things too complicated
a few downsides to that though, mainly the fact that the runner pc I have to keep online 24/7 if I want any testing done. could separate it so that only local pc does testing, while the github runners do building without tests?
also my pc would be less reliable than a datacenter
Just thought of one while I was adding it, if the game suddenly decides to add log4j/slf4j, it will break the loader, so maybe I should do it in a separate mod (though im still conflicted, such an annoying decision)
I think it would work nicely as a separate mod. The average player doesnโt care about logging, but developers could install the mod if necessary
Ok but then you could update the loader on the one off chance that PZ devs remove massive technical debt.
I mean, chances are stuff is going to break every other update, so I wouldn't worry about having to fix stuff on an update...
because.. your gonna have to reguardless of your decisions as you just don't know what TIS is gonna do to their code
its hard to decide because every time I make a decision some roadblock comes up lol
like now, my issue is that game libraries (at least in dev anyway) take precedent on the classpath over loader libs, so it's loading a half-baked log4j version that's shaded in a lib they use called javacord
in prod I do remember making the installer force loader+deps first on the classpath to avoid this, but in dev it still happens
I also dont like the idea of log4j updating (like the infamous issue) and then having to update the entire loader to be able to get the benefit of that
It's either add it to the loader and download it when the installer installs stuff like mixin, or add it as a separate mod but we have to shade it
I think I will go with separate mod, but I still need to add support for it in the loader. the reason is because it is much more practical to nuke the in game logging and just redirect it to slf4j in a separate mod (and the loader just use a "log4j mode") than it is to do it from the loader and have it still use reflection to access game logging classes (which would essentially be hollow anyway), would be very painful otherwise
Anyone got any name suggestions for the log4j mod?
I thought of maybe just making it "zomboid-slf4j" but not sure
requires an update to the loader to actually use, but once I release that it should be fine
just for now, I've went with zomboid-slf4j but any recommendation is welcome
Make an interface layer for logging where you can swap the impl out at runtime
So if they do decide to do it, it won't screw the whole project up too badly.
And you can swap it out for another solution without massive refactors
As my papa once said "don't hold in a fart out of fear of shitting yourself" ๐
yeah leaf already has this with the different log handlers
it can support the old zomboid logger pre 42, the new one in b42, and soon to be slf4j/log4j (I removed them previously due to some issues)
Just running into yet again some more roadblocks, which I have to ask around about from the fabric maintainers
Oh aye? What roadblocks be that?
mainly the fact that as a separate mod, I need to basically shade/JiJ the log4j/slf4j into the mod, but they aren't being put on the compile/runtime classpaths
and also if something breaks in the loader relating to newer log4j/slf4j version, the loader would have to be updated too anyway (even with a separate mod) though it's unlikely. There's basically not a viable way to have it completely separate from the loader that I can think of rn
pz-java-logger
zomboid-logger
etc
I mean its a logger util, it would be unintended if seperate from the thing its logging.
Id take the L and cross the bridge when you come to it.
ah, another fabric using game provider
another?
i mean in general
I forked the major repositories for fabric, its not just a game provider for fabric loader
at least this loader has more of a separation from fabric
i thought that this community didn't have mixin capabilities and was still using https://github.com/pzstorm/storm
thankfully this has mixin support
I needed it to because my goals for it are different and I need to be able to change most of it at will.
PZ storm mostly abandoned now.
ah, i built my own multi use modloader from scratch to make it smaller and malubleable
I've only created this project recently (since 2024-09 roughly) and I'm only maintainer, its still in progress and not as production ready as I'd like it
ah, i made mine in ~2024-03(august)
rebuilt & modularized it to be easier to maintain and use
what do you need to add?
most notably server support in the installer, because I need to edit scripts for the server. currently I only wrote the code for client. Server is more frustrating because it doesn't use a bootstrapper like the client does
the active issues in the pinned message in the github project, that's all for now. I'm adding them as myself and others find the issues
I can't wait for this to be a major thing and me stop having to field so many install instructions.. Instead, that can be your job! bhwahaha.
But seriously. I have a lot of ideas for minor/major java mods and it would be sweet if I didn't have to make some kinda installer/updater thing so im chopping at the bit for this project to become the next big thing. Go leaf! im rooting for ya.
also, why does zomboid need mappings?
from what i have seen it doesn't need to be remapped as it is not obfuscated
it's not 'not obfuscated', it's just less obfuscated
its not less obfuscated?, its just in their 'style' which is a bit confusing until ya learn it
also i dont recommend making a de/reobfuscator by yourself, its painful
the names of local variables and method parameters are lost in compilation
the mappings would theoretically restore these, but afaik leaf's mappings are not actually populated with anything?
i'm not actually sure if this is strictly obfuscation or just something java bytecode doesn't bother storing to begin with but either way it's something mappings exist for
it can store it, but it just strips it during compilations, its not obfuscation its size optimization
well whatever purpose it exists for the result is the same
btw if you need help concerning bytecode or the class file format just ask since I did a bit of research on it when making this monstrosity https://github.com/Mr-Zombii/ClassConstructor
Id prob be willing to populate carcontroller.java if you ever need it.
(or at least, half of it)
you'd have to talk to aoqia about that, i have no idea if or how you can actually contribute
some variables I didn't really bother to figure out and just wrote my own stuff.
opps. late again for me.
@floral sluice if you ever want carcontroller.java mappings I can likely help with that.
worked enough with it I know most of the variables.
I dunno who that helps but I think more car physics mods would be awesome ๐
yes they are currently just test mapping to make sure yarn worked. I can later import any javadocs and be able to make mapping from them.
mainly because I don't have time to map everything. its definitely a super easy thing to contribute to, but there's a lot of code to cover even with importing other third party javadoc. most if the time you just grab some coffee and put on music while you rename "setInvisible(bl)" to "setInvisible(invisible)" or something like that
also, no remapping, I disabled intermediary layer. only remapping is done for sources in dev so that you can read param names
you can do whatever you want, though I wonder if some of it is already exists from a third party javadoc.
I think yarn has a good readme to explain it, i don't remember if I did add instructions though.
I would recommend no for the time being, unstable might change more than you like (assuming you're doing it in b42 and not b41), I'm not sure how easy it will be to remove invalid mapping entries
at the end of the day, mappings not being necessary for leaf to function, is more a quality of life thing. you can still mostly read what the function did from the decompile alone
k
btw how much have you had to change for fabric to become leaf?
i'd say most of the changes were stripping out intermediary/minecraft specific stuff
the rest was me just adding zomboid-specific stuff
like the game manifests which the game has none of
im not gonna act like it was a walk in the park, but it wasnt a project rewrite of fabric either
honestly a bit of issues with the development time is just me losing motivation for the game, then it comes back a little and repeat
yeah, i get that, motivation comes in waves
I think the only way I will be able to have consistent motivation is to eventually make my own games which is a goal I want to reach in my lifetime just in general
though literally every possible irl friend I have which is unsurprisingly not that many doesn't want to create any, and the one person that did want to was "envisioning" the next GTA 6 as a 2 person dev team like yeah no thx
yeah most my friends either dont know how to code, the ones who do are workin on drastically different things, or dont wana partake in gamedev
I'm on a similar boat actually. I haven't been looking at PZ mods for awhile, been learning Godot as I find time
I'd like to make something like a mix between Highfleet, Actriser 1 and FTL, with the simple vector graphics of DEFCON, but you know, that's just ideas and ideas are cheap
Figured if it's 2d (top down and side view) and the systems are built correctly, it's a lot easier to layer complex mechanics on top of relatively simple genres (side scrolling shooter, top down shooter, top down nodes view like cities in Highfleet)
I feel like I just need to add something fun to leaf to bring back some incentive for me
so im probably going to add some normal map support as a basic first thing
not like normal maps themselves are that fun, but anyway
Interesting, How is this going to differ from vanilla map support?
I was under the impression that hte game doesn't support normal maps (and others) for textures like vehicles/items
I understand that depth map support is available for tiles (unsure how that works though) but its different for texture, not the same
model shaders only get provided the one texture so you just can't do anything that needs a map
would probably be fairly easy to change with a java mod
shudders
starts babbling incoherently about PZ's render system
i mean all you need to do is send the texture to the shader, the rest is the shader's job which TIS can't really mess up for you
Iv written a 3d engine from scratch and their camera system alone (or lack thereof) scares the crap outta me.
I spent an entire day just trying to get it to stop moving stuff and best I could do is "Hey this works so long as you don't turn or anything"
Sure. Via completely decompiled opengl.
all the render code in the game uses hardcoded ints since its been decompiled instead of opengl constants anymore
I can actually fix that in the mappings too
and opengl OR's bitflags too.
that would honestly be amazing for anyone who wants to understand PZ's render code
there should be a way to get what enum each opengl function should be, and then just walk through the bitflags
(In C/C++ I think it was a giant file of defines...)