#mod_development

1 messages · Page 246 of 1

drifting ore
#

it's a fricking double it works automatically, how do you even screw this up?

lost slate
#

thanks

autumn pumice
#

@fleet bridge

fleet bridge
#

Base.Crisps

autumn pumice
dull moss
#

Is there a way to force getText() to use specific language?

dull moss
#

👀

autumn pumice
dull moss
#

why not here? but sure

autumn pumice
#

whatever you want

dull moss
#

better here so other can find it later

autumn pumice
#

you need to use notepad++

drifting ore
#

holy frickin crap this is not OK. imagine thinking that this is the correct way to calculate modulo and deciding that you're qualified to make a Lua implementation.

On top of everythign else wrong with it, Java just has a modulo operator % defined for all basic types.

autumn pumice
dull moss
#

??

#

You're talking about encoding

autumn pumice
dull moss
#

I asked if I can force getText() to use specific language, it has onothing to do with file encoding

autumn pumice
#

it can have some errors

dull moss
#
self.labelColdIllnessSystem = ISLabel:new(barStartPosition - lineStartPosition, y, FONT_HGT_SMALL, getText("Sandbox_EvolvingTraitsWorld_ColdIllnessSystem"), self.btnTextColor.r, self.btnTextColor.g, self.btnTextColor.b, self.btnTextColor.a, UIFont.Small, false)```

this will always use game language or english if said string doesnt exsist in translation
#

Im asking how to force it to use english

autumn pumice
#

you mean translations or what?

#

cuz im stupid to understand

dull moss
#

do you know what getText() does?

autumn pumice
dull moss
#

then you can't help much sadeg
I'm talking about coding here, not really translations

autumn pumice
#

i hope someone will help you

dull moss
#

getText() returns a string from tranlsation files

dull moss
#

I need to force it to use specific langauge

#

instead of game language

frank elbow
#

Which is, needless to say, a bit much 😅 What's your actual goal in doing this?

dull moss
#

oof

frank elbow
#

If you always want it to be the same string, why not hardcode it?

dull moss
#

I'm making UI and it's very clean in english but in other languages it's suffering so I was hoping to make a toggle to always have it in English

frank elbow
#

I have an alternative suggestion, if you're open to hearing it

dull moss
#

ofc

frank elbow
#

You can use MeasureStringX on TextManager to determine how much space the string will take up & dynamically resize as needed

#

getTextManager():MeasureStringX(UIFont.Small, text) (assuming that's UIFont.Small)

dull moss
#

ye it is

#

hm

#

lemme try to cook this

frank elbow
#

Best of luck

drifting ore
#

the best part is that all you need to do is to swap out int for long

fleet bridge
drifting ore
#

the issue here is that this implementation has a bug in its math routine

#

and I mean really, it's a double-precision floating point number. Why would one think that an integer would have sufficient capacity and/or accuracy to store the intermediate division result? It should be another double.

fleet bridge
#

-- % operator doesn't work with big numbers, confirm with 2^37%100 and 2^38%100

#

Not sure where it stops working but yea with big numbers it no work

drifting ore
#

it techically works, but the intermediate division result must fit in 32 bits

#

which is a bit of an issue when doubles have 53 bits of integer capacity

fleet bridge
#

That note was from belettes code iirc

#

For making a hash id for a zomb

drifting ore
#

well anyway I stumbled upon this bizzare bug in a very very edge case, it was silently working on the brink of failure to me

#

see, I was using the 53 bits of double's integer storage for spatial caching of tile coordinates

#

it's heck of a lot less resource-intensive than generating strings

#

and it worked fine because x and y each got less than 24 bits, well within bugged modulo capacity

#

but then I tried to use this spatially cached number as a source of cheap RNG, by taking a modulo by a prime number, and then I got these outlandish results because the resulting intermediate value had well over 32 bits of length and it was overflowing

#

Anyway I think my problem here can be solved by first taking the modulo by a 30-ish bit multiple of the prime, and then taking the modulo by the prime itself.

bright fog
#

Oh boy prepare to get traumatized

frank elbow
#

Tbf Kahlua is at fault for that

drifting ore
dull moss
#

Hm, anyone knows how to solve this?

self.labelWeakStomach = ISLabel:new(barMidPosition, y, FONT_HGT_SMALL, getText("UI_EvolvingTraitsWorld_Minus") .. " " .. getText("UI_trait_WeakStomach"), self.defTextColor.r, self.defTextColor.g, self.defTextColor.b, self.defTextColor.a, UIFont.Small, true)
self.labelWeakStomach.center = true;
self.labelWeakStomach:setTooltip(getText("UI_EvolvingTraitsWorld_LooseTooltip"))
self:addMainGroup(self.labelWeakStomach)

I create label and make tooltip for it, but I also center it around the X, and it looks fine as intended but tooltip only appears in selected red area (I assume because that's the initial poistion of the label)

bright fog
#

We modders constantly use that code, indirectly

#

And fucking hell are there quite the problems

drifting ore
#

modding is a privilege, not a right :^)

sour island
dull moss
#

hmm

#

I did something else PepeLaugh

#
        str = getText("UI_EvolvingTraitsWorld_Minus") .. " " .. getText("UI_trait_pronetoillness")
        self.labelProneToIllness = ISLabel:new(barMidPosition - strLen(textManager, str)/2, y, FONT_HGT_SMALL, str, self.defTextColor.r, self.defTextColor.g, self.defTextColor.b, self.defTextColor.a, UIFont.Small, true)
        --self.labelProneToIllness.center = true;
        self.labelProneToIllness:setTooltip(getText("UI_EvolvingTraitsWorld_LooseTooltip"))
        self:addMainGroup(self.labelProneToIllness)
#

center it manually PepeLaugh

#

works

dull moss
frank elbow
compact tinsel
#

Hello~
I have two questions regarding lua (but I'll start with one of them)
I have made 2 functions which's purpose it is to give exp

    player:getXp():AddXP(Perks.MetalWelding, 1);
end```

in the recipe I am calling upon the function like this:

```    recipe Make Hinges
    {
        SmallSheetMetal,
        Nails = 4,
        Screws = 16,
        BlowTorch = 1,
        keep [Recipe.GetItemTypes.Saw],
        keep BallPeenHammer,
        Result:Hinge = 4,
        Time:200.0,
        Category:Welding,
        SkillRequired:MetalWelding=4,
        Sound:WeldingNoise,
        OnGiveXP:Recipe.OnGiveXP.LegacyMetalWeldingEXP5,
        AnimNode:Craft,
    } ```

and I am getting the error that the function isn't found in the RecipeManager
I tried following the folder structure I've found for the give exp thing, which is: \media\lua\server

I am still quite new to PZ programming and very inexperienced to lua, maybe someone else has made a function to add exp and could give me a nudge in the right direction?
dull moss
#

hate that word

mellow frigate
compact tinsel
#

it is on the server side of things, since I thought that's where it needs to go (due to finding the recipecode.lua in the server folder)

mellow frigate
#

another possibility (that would include red box errors) would be that you did not have Recipe.OnGiveXP table valid.

#

another possibility would be that LegacyMetalWeldingEXP5 is not defined, only LegacyMetalWeldingEXP1

compact tinsel
#

Both are defined, the command console spat out the following

mellow frigate
#

or check the first error in your console.

compact tinsel
#

that one is... also in there, I'll try checking the first error

mellow frigate
#

if there is no error before the RecipeManager one, it may be that your definition is not loaded by the game. add temporarily a print in your file, reload the game and ensure your new print is visible in the logs.

mental jackal
#

hey folks! thanks for all the awesome mods you make!
I have a question tho - where can i find the code that deals with refrigeration and cooking of foodstuffs?

compact tinsel
#

just checked
the first error it gives is, that there is no such function

frank elbow
neon bronze
mental jackal
compact tinsel
neon bronze
#

ah ok

frank elbow
# mental jackal thanks a lot! im kinda new to this so would you mind kindly telling me where i c...

In the game directory, there's a zombie subfolder. Food.class is at zombie/inventory/types. You'll need to run a decompiler on the source to analyze it; fernflower works & is what I used, I think most people use beautiful-java. See https://steamcommunity.com/sharedfiles/filedetails/?id=2748451514

This step by step guide should make it easy to access java code and therefore increase your modding capability and speed....

compact tinsel
#

but it does look like the whole file isn't loaded in
just did the print test, that showed nothing as well
and the file is at media\lua\server

mental jackal
#

i got this, should work too 😄
thanks so much!

compact tinsel
#

okay... it turns out that the first lua didn't work, because of an issue with the other thing I had a question about...

    local item, itemType;
    local ropeItems = {};
    for i = 0, items:size() - 1 do
        item = items:get(i);
        if item then
            itemType = item:getFullType();
            if itemType ~= "Base.Log" then
                table.insert(ropeItems, itemType);
            end;
        end;
    end;
    result:getModData().ropeItems = ropeItems;
end``` the base game uses this function to save the ropes used (so the same ropes can be returned once the log stack is unbundled)

Of course, since I'm bundling other things than logs it creates a bug, where not only the ropes are saved, but also all the planks, metal etc.
I tried to get the function to only save the rope
```function Recipe.OnCreate.CreateStack(items, result, player)
    local item, itemType;
    local ropeItems = {};
    for i = 0, items:size() - 1 do
        item = items:get(i);
        if item:getItemsTag("Rope") then       -- it breaks on this line
                table.insert(ropeItems, itemType);
        end;
    end;
    result:getModData().ropeItems = ropeItems;
end```  my best guess is, that the I'm using the if function wrongly, I also now see that the itemType variable is missing, so I'll have to get that one back in there as well

the easiest solution would be just using the basegame function and deleting the result, but then spawned in stacks would only give rope upon being unbundled

Edit: disregard this, I just made four different functions for four different items, not pretty, but it works
dull moss
#

Hooked it up to existing translations to not make my translators wanna kill themselves with slightly editing 500 existing lines KekW

bright fog
distant vortex
#

Hello, Does anyone have experience in creating mods that can modify Project Zomboid the text on the game's TV, I would like to ask if you can help me create a mod for the game Project Zomboid that allows me to change the color and background of the game displayed messages on the game TV.

I studied a little about the RadioData, ISRecordedMedia and RecMedia functions, but I didn't understand how I can create the mod.

If necessary, I will pay to teach me.

dull moss
#

do you mean subtitles that are shown when TV is on or do you mean UI for it, where you change volume and such?

distant vortex
#

Yes, the subtitles that are shown when the TV is on

dull moss
#

It's most definitely possible, atm gaming but can help after, ETA 30 min

distant vortex
#

I know I could change the color of the text by changing this parameter, but it is unfeasible due to the number of lines of code.

And I also don't understand how to change the background

drifting ore
distant vortex
#

Yes, the problem is that everything I tried to create a script didn't work, that's why I'm here asking for support

dull moss
#

I am not sure about background but you I think could have those broadcast IDs in code and then just change colors on the fly. if it's from your broadcast

unreal pewter
#

does anyone know about this?

dull moss
distant vortex
#

I tried something like this in Python

#

def modify_colors(file_path):
    tree = ET.parse(file_path)
    root = tree.getroot()

    new_text_color = {"r": "255", "g": "0", "b": "0"}
    new_background_color = {"r": "255", "g": "0", "b": "0"}

    for voice_entry in root.findall(".//VoiceEntry"):
        final_color = voice_entry.find("FinalColor")
        if final_color is not None:
            final_color.attrib.update(new_text_color)
        
        background_color = voice_entry.find("BackgroundColor")
        if background_color is None:
            background_color = ET.SubElement(voice_entry, "BackgroundColor")
        background_color.attrib.update(new_background_color)

    for line_entry in root.findall(".//LineEntry"):
        line_entry.attrib.update(new_text_color)
        line_entry.attrib.update({
            "bgR": new_background_color["r"],
            "bgG": new_background_color["g"],
            "bgB": new_background_color["b"]
        })


    tree.write(file_path, encoding="utf-8", xml_declaration=True)


file_path = 'RadioData.xml'  


modify_colors(file_path)```
#

OK It worked

#

Thanks for the support

unreal pewter
#

im trying to do the same thing

distant vortex
#

I just ran the code above in the Python terminal

Just don't forget to put the correct path to your RadioData.xml file in:

file_path = 'RadioData.xml'

unreal pewter
#

i found RadioData so im guessing i gotta rewrite it and stuff for my mod

unreal pewter
unreal pewter
distant vortex
#

This was the idea above, an automation to change all parameters in the RadioData.xml file

unreal pewter
#

ah

#

too complicated for me ill just brute force it

distant vortex
#

In this case it will change everything to red.
r = '255'

unreal pewter
#

also all the radio broadcasts are in RadioData, but wheres the tv broadcasts?

bronze yoke
#

also in radiodata

#

tvs are just radios with different channels

unreal pewter
#

huh

#

well i searched words that i know are in life and living and none of them showed up

#

oh i found it, huh, nevermind

keen silo
#

Would there be a way to fix this?

Like, telling the game to load newRadioData.xml instead of RadioData.xml, or Using a Mod Manager in a specific way?

keen silo
austere sequoia
#

wasnt there a mod that added more means of extinguishing fires? For the life of me, I cant find it

sullen basin
dull moss
#

Well I give up, I can't make it so UI removes children on runtime and then rebuilds it, guess the structure will be updated to remove redundand elements between character loads

#

(╯°□°)╯︵ ┻━┻

dull moss
#

Anyone knows if Joypad.LBumper is equivalent to M1?

#

There's a problem with base game that if you select tabs in character window it registes both pressing down and releasing M1 as triggers to switch tabs

#

So if you press While your M1 is on Health and release on Temperature, it'll switch to Health and when you release switches to Temperature

#

Which is dumb and something I thought can be fixed

#
function ISCharacterInfoWindow:onJoypadDown(button)
    if button == Joypad.LBumper or button == Joypad.RBumper then
        if #self.panel.viewList < 2 then return end
        local viewIndex = self.panel:getActiveViewIndex()
        if button == Joypad.LBumper then
            if viewIndex == 1 then
                viewIndex = #self.panel.viewList
            else
                viewIndex = viewIndex - 1
            end
        end
        if button == Joypad.RBumper then
            if viewIndex == #self.panel.viewList then
                viewIndex = 1
            else
                viewIndex = viewIndex + 1
            end
        end
        self.panel:activateView(self.panel.viewList[viewIndex].name)
        setJoypadFocus(self.playerNum, self.panel:getActiveView())
    end
end```
#

found this in character window code so was thinking about maybe overwriting it to fix it

#

but not sure if that's what I need nor if Joypad.LBumper is equivalent of M1

#

but then again onJoypadUp doesnt even exist so idk how this could even be prevented

bronze yoke
#

no, the bumpers switch tabs left/right when pressed

dull moss
#

Any thoughts on where should I take a look?

#

ISCharacterInfoWindow is derived from ISCollapsableWindow but I don't really see a solution there either

late merlin
#

Hey folks, relatively new to modding Zomboid [I've gotten a small mod running already, and know the basics of modding Zomboid], not new to modding in general. I use the Anthro Survivor mod (a mod that adds a new clothing layer at the very bottom of the layer stack where, essentially, the equivalent to a fursuit is placed) and am slightly miffed that head hair does not show through the "fur" layer. Is it at all possible to make hair visible through a clothing layer like this, or is this impossible?

dull moss
#

Sounds like something folks in #modeling would know better shrug

late merlin
#

you think? I was hoping there was some way to make the hair render after (or "above") certain clothing layers edit: this'd only work if the game were made up of 2D sprites. my next message is the 3D equivalent

#

or even offset the hair objects upward by a certain amount, which would be even better

late merlin
bronze yoke
#

they aren't independent objects

late merlin
#

oh, dang. so to do what I'm looking to do, I'd have to override each individual model to offset higher upward..?

grizzled fulcrum
#

If loading of these files are done in Lua you could hook the function that loads them and specifically load yours in a certain spot

#

If it's done in java then uhh I'll have to look at it I guess

bronze yoke
#

it's definitely not lua, i know model scripts can have offsets but i have no idea specifically if hair goes through that (and if it would use them since it probably doesn't get rendered the same way)

rancid barn
#

IT IS DONE! BIG BILL HELL'S SHALL GRACE KNOX COUNTRY!

#

question first tho, if the profile pic/thumbnail for the mod is a big "GO TO HELL" from the actual BBH vid, would that go against PZ's mod policy or can it just be laughed off?

#

eh why risk it ill change it

drowsy fjord
#

Hi, I just started trying to mod this evening and am getting a little frustrated at ItemZed. I was hoping one of you lovely people could help me out.

#

None of the tabs are accessible when I try to create a new mod 🥲

drowsy fjord
#

Nvm... I wish I had seen this earlier:

rancid barn
#

the classic blunder

#

tbh happens to us all

drowsy fjord
#

It's just a bump in the road. Not gonna stop me from developing my mod that only 1 or 2 people will ever use! 🤩

rancid barn
#

what mod is that

drowsy fjord
#

I'm gonna try to create a new medical item. Melatonin gummies, for when you wanna sleep and drink and not die.

rancid barn
#

nice

drowsy fjord
#

I want to do more eventually, but I figure it will be a good "starter mod" for me to learn how to make them in the first place.

rancid barn
#

hey we all gotta start somewhere. My first mod (which u should totally download btw no pressure) was a VHS tape mod of Big Bill Hell's

drowsy fjord
#

lol watching a VHS tape that gets your drunk? does it work every time or just the first time?

junior blaze
#

how to make a custom hairtyle mod? any fguides?

graceful pasture
#

does anyone know how to get a vehicle texture in the game? i’ve already made the one i want using the texture map and everything, but very few tutorials have been helpful to me in getting the mod to actually Work. not sure what steps i’m missing

drifting ore
drowsy fjord
# rancid barn no clue!

😂 sounds like you did some solid testing on it. Once I figure out how to test my gummies I'll DL your mod and answer that question. 😘

sour island
grizzled fulcrum
#

Should trait creation be done in the shared part of Lua? I currently do it on the client but I was just looking over my previous code and found it odd.

dull moss
#

yes

tacit carbon
#

does anybody know if there is a trigger like onGameBoot for when you confirm sandbox options?

dull moss
#

From top of my head dunno

#

there's this now also apperently from Albion

#

looks sick

#

think you need this

tacit carbon
dull moss
#

and yes I have a solution for you

#

had to figure out same thing for myself

#

best solution i found to disabling traits is to do it via submods

#

because they are added to traits at game boot

#

so not really any other way

#

or I haven't found one

tacit carbon
dull moss
#

you make a submod with id something like EvolvingTraitsWorldDisableAxeThrower and then in your main mod when creating traits you check if it's enabled and if it is you don't create the trait

    if not activatedMods:contains("EvolvingTraitsWorldDisableAxeThrower") then
        local AxeThrower = createTrait("AxeThrower", 4);
        AxeThrower:addXPBoost(Perks.Axe, 1);
    end```
tacit carbon
#

ohhh so you make another mod just to disable one trait?

dull moss
#

yep

tacit carbon
#

i see, i see

dull moss
#

there's framework to adjust trait price in sandbox and I guess you coudl use that to set trait price to 9999 if you dont want ppl to be able to pick it but it's kind of a bandaid

#

as you see modid list is quite big in 2nd mod KekW

Mod ID: EvolvingTraitsWorldDisableAVClub
Mod ID: EvolvingTraitsWorldDisableAxeThrower
Mod ID: EvolvingTraitsWorldDisableBloodlust
Mod ID: EvolvingTraitsWorldDisableBodyWorkEnthusiast
Mod ID: EvolvingTraitsWorldDisableFogTraits
Mod ID: EvolvingTraitsWorldDisableFurnitureAssembler
Mod ID: EvolvingTraitsWorldDisableGunEnthusiast
Mod ID: EvolvingTraitsWorldDisableGymRat
Mod ID: EvolvingTraitsWorldDisableHoarder
Mod ID: EvolvingTraitsWorldDisableHomeCook
Mod ID: EvolvingTraitsWorldDisableKenshi
Mod ID: EvolvingTraitsWorldDisableKnifeFighter
Mod ID: EvolvingTraitsWorldDisableLightStep
Mod ID: EvolvingTraitsWorldDisableLowProfile
Mod ID: EvolvingTraitsWorldDisablePainTolerance
Mod ID: EvolvingTraitsWorldDisableRainTraits
Mod ID: EvolvingTraitsWorldDisableRestorationExpert
Mod ID: EvolvingTraitsWorldDisableSojutsu
Mod ID: EvolvingTraitsWorldDisableStickFighter```
tacit carbon
dull moss
#

so i'd recommend separating it in 2nd mod

chrome veldt
#

Hey! I'm making a mod and I believe I have to mod the java side but I'm not sure about the tools, I stumbled upon pzStorm but it doesn't seems to be up to date. Is there a prefered way of doing it?

bronze yoke
#

there isn't a mod loader in usage or anything, people just recompile the classes they're interested in editing

chrome veldt
#

Ok, does it change anything to the distribution via the workshop? Like dependencies or whatnot

sour island
#

Unless it is just changes to the host/server stuff then I guess only the host would need it.

chrome veldt
#

Hmm, that’s not ideal. I’ll keep searching for a LUA solution. Thanks for your answers

red tiger
red tiger
#

I'd make it in Kotlin.

#

It'd be fun to introduce Kotlin to the client-side of PZ.

#

With developers specifically tasked to work on Lua code, I'm surprised that (at least publicly), this sort of experiment hasn't been a topic of discussion.

#

Kotlin would give more of a script-like language to what is a Java environment.

#

I've used Kotlin with server mods I authored in the past and it was quite nice personally. =)

#

(Leaving this thought here, just in-case anyone special were to see it)

drifting ore
#

There's a good reason people use Lua and not Javascript, Python, LISP, or any number of meme languages.

red tiger
#

You'd be surpised how good JavaScript is when standards for coding are applied.

#

Python is really good for people who are not interested in in-depth programming.

#

LISP is a meme.

drifting ore
#

Lisp is less of a meme than Kotlin. When you use a language on top of a language on top of a language, you know you messed up somewhere along the way.

red tiger
drifting ore
#

The solution here is to just not use Javascript and its derivatives.

red tiger
#

Kotlin actually did do a lot in steering Oracle's perspectives on certain dated Java language features that then were included in later releases.

drifting ore
#

It's not a be all end all language, there are other better options.

red tiger
drifting ore
#

It's extremely popular because it has a 100% monopoly on the web, but it doesn't mean it should be used, especially as a videogame scripting language.

red tiger
#

I use TypeScript because it marries similar approaches to many languages I've used.

#

It's also a purposely-designed middle-language where it's supposed to be compiled to another language to run.

#

It's mainly designed around JavaScript but can become a powerful tool when transpiled to Lua, for example.

#

Lua and JavaScript ES5 are very similar functionally.

drifting ore
#

The easiest way to mess up your developer base is by splintering it.

red tiger
drifting ore
#

So the correct way to approach this kind of problem is to pick a solution and declare that everything else is not supported.

red tiger
#

You are correct if your focus is solidifying what you have as a priority over trying newer things.

drifting ore
#

Think of it this way. Why do you go to YouTube and not a million of other video hosting services?

red tiger
#

So it's up to the developers' priorities here which might side with you because it's much less work for what could be seen as little to no benefits.

red tiger
drifting ore
#

You're looking at it from the wrong angle. I'm asking a question straight up, in a very literal fashion. Why do you personally choose YouTube over everything else?

red tiger
drifting ore
#

Or for example why Discord? Why Reddit?

#

You're missing the forest for the trees here so I'll spell it out, in the example of Reddit. You go there because there's the most content. Which in turn is because there's the most users. Who, like yourself, go there because there's the most content. The relationship between userbase and attractiveness of the platform is exponential, and is in a positive feedback. This means that if you do it in reverse, that is by splitting the userbase into 2 completely separate realms, both of them will be much less than 1/2 as valuable as the original. You effectively kill everyone's desire to participate, and you gain nothing.

red tiger
#

I'll make sure to keep things like my anti-cheat patch in Kotlin because it provides additional security.

drifting ore
#

Surely you bore witness to some unfortunate videogame who had too many gamemodes for the amount of players it had, and it only expedited its downfall because it's too hard to find a lobby.

red tiger
drifting ore
#

It will have the same effect on the modder base.

#

There will be a lot less than 1/2 as much support for either scripting language.

#

Best case scenario, nobody cares and you just wasted a lot of time adding proper support.

red tiger
#

So Kotlin is a custom Java bytecode compiler with library support that integrates cleanly with Java environments.

drifting ore
#

If it was meant to do java mods, you should've said so. That's even worse.

red tiger
#

It isn't itself a mod to Java. It works cleanly with any vanilla Oracle HotSpot! (TM) VM.

drifting ore
#

Well it can either be used to make java mods, or to be compiled to Lua. Either way is not great but for different reasons.

red tiger
bronze yoke
#

you're putting a lot of stock into jab's ability to singlehandedly kill the modding scene

red tiger
frank elbow
red tiger
#

If this were true, PipeWrench was a nuclear bomb.

frank elbow
#

That is, people would still be able to discuss the API regardless of the language used

drifting ore
frank elbow
#

I don't know where here is because I haven't touched Unity in a bit, but I'm pretty sure it's the same situation I described? At least it was like 6 years ago or so lol

drifting ore
#

Except Unity is a huge thing, they can kinda afford having 2 languages. They didn't originally had Javascript but pretty clearly they want to cash in on many people being familiar with it.

#

Importantly, it was a deliberate choice on their part, they didn't do it because they thought Javascript was a new cool thing.

frank elbow
#

Fortunately, profit generally isn't a huge consideration for PZ modding

drifting ore
#

Having heatlhy modding scene is probably a pretty big consideration for PZ devs though.

frank elbow
#

Sometimes trying new things for the sake of trying new things is enough of a reason 😄

frank elbow
drifting ore
#

Well if that presumption is true, then Jab can go right ahead I guess. Though I will say that causing splintering is generally not ideal. Just look at Minecraft's Fabric and Forge.

#

It doesn't just makes development less convenient since information is harder to come by since less people know it, it also affects mod users since the modloaders cannot be mixed and matched, so if devs of your favorite mods decided to use different modloaders, you're SoL.

frank elbow
#

That'd be another example of an entirely separate API. I see your point for that case like I mentioned, but in this case it's harmless & an interesting thing to do imo

bronze yoke
#

i don't think jab is going to break all lua support

frank elbow
#

Not yet. His evil villain Lua destruction arc is just around the corner

red tiger
#

It's fun to note that I was one of the first people to mod that game and my account is a n c i e n t. I had modded since before and during mod loaders and packs. People would rather have 5 options than one official option. It does work and people are glad to have those options. (Speaking strictly here in Minecraft land)

drifting ore
#

99% of the reason new modloaders even appear is sheer teenage drama surrounding the inner clique. (I do know that vast majority of these people are adults but they still act like this)

red tiger
drifting ore
#

Probably more to do with Microsoft than with the suggestion.

#

I wouldn't trust them with that either.

red tiger
#

And I consequently have fun making tools for them to extend and improve that experience.

drifting ore
#

Also a lot of the reason devs choose one modloader over another is poltitical zealotry, so there was bound to be shit hitting the fan. (props to whoever just picks highest mod compatibility loader)

red tiger
#

If your concern lies with the social aspects of changes to modding in games on a commuinity-level that's one thing, however this isn't a good perspective when looking at it from an engineering perspective.

#

I really hope you enjoy your modding experiences.

drifting ore
#

And then it happened again with NeoForge, and mods like Sodium had alternatives developed for the same reason. Sodium was probably created in the first place because people wanted a cut of OptiFine's pie.

red tiger
#

I think Kotlin would help TIS in some ways with their devs who may be limited to the Lua side of their operation. I say this even in spite of the fact that Kotlin would limit my ability to mod their game due to the code not being decompiiable in Kotlin's current state & tools publicly available.

drifting ore
# red tiger I think Kotlin would help TIS in some ways with their devs who may be limited to...

If it's your hobby it's your hobby, I can't tell you what to do. I can only remind you that sometimes even innocent actions have big consequences. It's kind of a modding scene equivalent of genetic engineering, or playing God if you will. But more importantly, it doesn't strike me as a useful endeavor to start with, since it seems to me like the reason you want to even do this is purely because you think it's cool, and if I'm guessing this correctly, it's mainly because Kotlin is your language of choice. Without a real, valid, useful reason. I'm sure you can come up with a good rationale, but rationale is not the same as motivation. It's one of those "do because you could without thinking if you should" kind of deals.

#

And yes I do see how this makes me a hypocrite because I did basically the same thing. My only defense is that I offered my code wholesale to the original developer and they didn't take it. And because the original was, to be blunt, complete dog water and the devs didn't do anything about it.

red tiger
#

For reference here I've modded games since 2003. I've done it both as a job and a hobby.

#

Please don't make assumptions about people.

#

Like what is the point of this conversation though? I'm absolutely lost.

drifting ore
#

I didn't make such assumptions, you did so about me. All that was purely in reference to implenemting a hypothetical alternative modding environment in a whole different language, as opposed to fixing problems in the original, as an isolated event.

red tiger
#

Alright. I'm going to disengage here. This is becoming a toxic situation.

#

Again, Hopefully you'll find your enjoyment in modding.

drifting ore
#

You know, my flabbers are a little gasted. You make a hurtful accusation that I assume bad things of you, and when I say otherwise you call the situation toxic, as if you blame me for hurting your feelings by assuming bad things of you. And you top it of with a cookie cutter "have a nice day" passive-aggressive remark. These remarks don't make people feel better. You already decided to disengage, so there was no reason to write that. I know people don't usually take kindly to being opposed, but I didn't say anything negative directed at your persona. I do apologize for the distress and feeling of toxicity, but I feel like being toxic to me in return was unwarranted.

austere sequoia
left plank
#

So anyway

dry pier
#

Hello, is there a way to disable spawn locations introduced by another mod?

drifting ore
dry pier
#

What about controlling the spawn location names that show up when selecting the spawn point?

drifting ore
#

barring that, you can add a modified spawnregions.lua that overrides the previous file.

dry pier
#

Before the game is even started.

#

Do you have to have the same folder structure as the previous mod?

drifting ore
#

I don't know.

dry pier
#

ok thanks... I'll try to go down that path. Thanks

dry pier
#

Yup

thick karma
# dry pier Yup

You can just edit your spawnregions file to exclude the files of certain mods

#

Just snip lines you don't want

#

If your goal is to completely disable spawn points of this or that mod

dry pier
#

Thanks.

dull moss
#

the game refuses to take sandbox integers below 0?

{
    type = integer,
    min = -500000,
    max = 0,
    default = -20000,
    page = EvolvingTraitsWorldComplexPerks,
    translation = EvolvingTraitsWorld_AsthmaticCounter,
}```
ERROR: IntegerConfigOption.setValue() "EvolvingTraitsWorld.AsthmaticCounter" 20000 is greater than max=0
#

Or am I missing something?

bright fog
#

Hmm

#

Idk I have never set sandbox options below 0

thick karma
dull moss
#

this game sometimes makes me wanna punch somebody

#

🙃

thick karma
#

Why make it a negative value out of curiosity?

thick karma
#

There's argument to be made for not allowing negatives; a signed integer needs to spend a bit on the sign of the integer.

#

Maybe they want to be able to store larger numbers idk

dull moss
# thick karma Why make it a negative value out of curiosity?

Sandbox_EvolvingTraitsWorld_AsthmaticCounter_tooltip = "What value on counter you should reach to gain asthmatic trait. Running or exercising in cold temperature decreases counter, the colder it is, faster the decrease. If you're outside, it decreases even faster. If you have smoker, it decreases even faster. Additionally, having smoker slowly decreases the counter when you run even if weather is fine. Reaching opposite of counter removes the trait. Counter slowly increases by itself as long as you're not running or sprinting and breathing air warmer than 0 degrees Celcius. On top of that, it increases based on your Fitness level and current endurance level. Having smoker halves increases rate. Having asthmatic halves it again.",

#

Which means either I have to make all my translators fix translations or flip the value myself

#

Which means I have TO REMEMBER that it's flipped

#

which is bad

bright fog
#

eh

#

You should survive

thick karma
bright fog
#

Yeah

thick karma
#

counter represents need for oxygen or something

bright fog
#

Offset it

thick karma
#

If need for oxygen crosses threshold set here, asthma stuff

dull moss
#

i mean obv there are solutions, im just sad that i can't do what i was doing

thick karma
#

Idk fully what you're doing, but any situation involving negative numbers can be reframed as one involving positives.

#

But fair

#

For sure

#

Sorry for your loss lol

dull moss
bright fog
#

o7

frank elbow
#

Which is signed

dull moss
#

^

thick karma
#

I was throwing out guesses obv

#

Haha

#

Weird in that case that it restricts use of negatives.

dull moss
#

int is int

drifting ore
#

one of those bizarre problems that devs create for no reason purely because they think it's a smart thing to do

#

anyway just use double

dull moss
#

bruh when you will stop bitching, any time I see you in chat you bash engine or devs or whatever else is wrong with the game.

#

nothing is perfect

#

deal with it

drifting ore
#

bro take a chill pill. I'm not even talking to you.

#

Oh wait, I guess I am! Haha. I didn't register anyone's names. My bad.

#

anyway just use double

#

(unless you want to bitch about signed ints not working with negative values 😛)

#

I gotta check if they're really signed though. The error looks suspiciously like sign overflow.

frank elbow
#

Probably not overflow, more likely that the parser just ignores the character

bright fog
frank elbow
#

A sign is +/-. Signed numbers can be positive or negative

chrome veldt
#

Does anyone know what the radius in IsoLightSource refers to? I would assume it's how far it lightens the area but changing it doesn't seem to do anything.

thick karma
chrome veldt
#

I'm trying to change it using the setRadius method, I'm not creating a lightsource

thick karma
#

Mmmm never did it that way

chrome veldt
#

I guess i'll keep trying things, thanks for you answer 🙂

dull moss
#

1.2k lines of UI

#

and i'm not done yet MichaelDespair

drifting ore
#

It's just at this point I've seen so many times some dev intentionally added a smart feature that ended up just causing issues for no reason, it became a force of habit to think like this. It was really bad faith on my part.

drifting ore
dull moss
#

no because you have to update those

drifting ore
#

I don't get it.

dull moss
#

all of those are updated on render() and to update specific child you have to know what you're updating

#

also way too many variables to make it a table, it'd be a mess to manage

#

and on top of that, not all of them are generated every time, when they are no longer needed they are gone

drifting ore
#

looks like you just have to bite a bullet, and you only get to choose which

#

i guess it's easy for me to say when the best examples of my UI look like this lmao

drifting ore
#

Eh I dunno. Even if every element on the screen was using a custom getValue function averaging 100 lines, it would still be half as much code. I misread that as 12 000 lines oof

#

though 20 lines per element is still a lot of boilerplate

#

my entire code responsible for keeping track of separate corpse piles and stitching them together with a lot of optimization is less than 500 lines, with comments, and I'm one of those people who stick to 80 columns

#

aaand it just came to me that I'm using inefficient optimization method, while simultaneously using a much better method for a different subsystem in the same code.

frank elbow
#

I said it earlier but I imagine it's not some deep bug & it's just the script parser not handling the character

#

Which could be considered a bug, but with how the parsers are written in the game code it was probably intentional

drifting ore
#

i checked all code relating to parsing scripts and sandbox options in particular that I could find, and I found absolutely no infractions

frank elbow
#

Must resist the urge to get out of my comfy spot to go to the computer

unreal pewter
#

So I'm new to coding completely and I need a little help making it so a list of books I've made will generate ingame, heres's what I have but its not working and I'm pretty sure i have formatting wrong:


local function addProjectGurashiLiteratureItems()
    local items = {
        "ProjectGurashi.TheDancingGirl",
        "ProjectGurashi.CollectionofHagiwaraSakutaro",
        "ProjectGurashi.CollectionofNakanoShigeharu",
        "ProjectGurashi.CollectionofKanekoMitsuharu"
    }

    for _, category in pairs(SuburbsDistributions) do
        if category.category == "book" then
            for _, item in ipairs(items) do
                table.insert(category.items, { item = item, count = 1 })
            end
        end
    end

    print("Project Gurashi literature items added to distribution tables.")
end

Events.OnPreDistributionMerge.Add(addProjectGurashiLiteratureItems)```
#

is this wrong and what about it is wrong

drowsy fjord
#

@rancid barn I was able to find the VHS at one of the video stores, but it didn't make me drunk 😭

drifting ore
unreal pewter
drifting ore
unreal pewter
#

i see

drifting ore
#

Anyway look at vanilla media/lua/server/Items/Distributions.lua code to see a working example.

unreal pewter
#

im doing that right now and im even more confused

thick karma
unreal pewter
#

nope

drifting ore
thick karma
#

All your subbed mods get downloaded to Steam/steamapps/workshop/content/108600. Idk where you installed Steam of course. Go sub to Meditation and you can refactor what I do to distribute the books in the Mastering Yoga submod.

#

@unreal pewter

#

You use a command called table.insert twice to insert the item you want followed by the unadjusted probability of spawning it per roll into the procedural distribution tables that make sense for your item.

thick karma
bold yoke
#

What would you do if you added computers to projects on board?

unreal pewter
drifting ore
#

or in Lua selects whatever is on the left, unless it's false or nil, in which case it selects whatever is on the right

#

if you can please abstain from creating global variables because they will intrude into everyone else's mods too. To make a local variable simply preface it with local

unreal pewter
#

will do

unreal pewter
# thick karma You use a command called table.insert twice to insert the item you want followed...

I tried this and it just doesnt work


ProjectGurashi.truncate = function(number)
        return math.floor(number * 100) / 100
end

ProjectGurashi.calculateLiteratureAdjustment = function()

    local setting = tonumber(getSandboxOptions():getOptionByName("LiteratureLoot"):asConfigOption():getValueAsString())

    if setting > 3 then
        return 1.25
    elseif setting > 4 then
        return 1.5
    elseif setting > 5 then
        return 1.75
    elseif setting > 6 then
        return 2
    end
    
    return 1

end

ProjectGurashi.addBooks = function()
    
    -- Base Rate
    local rate = 4

    if SandboxVars.PG.literatureFrequencyMultiplier then
        rate = rate * SandboxVars.PG.literatureFrequencyMultiplier
    end

    local literatureAdjustment = ProjectGurashi.calculateLiteratureAdjustment()

    local rate = ProjectGurashi.truncate(rate * literatureAdjustment)

    table.insert(ProceduralDistributions.list["ClassroomDesk"].items, "ProjectGurashi.TheDancingGirl")
    table.insert(ProceduralDistributions.list["ClassroomDesk"].items, ProjectGurashi.truncate(rate))

    ItemPickerJava.Parse()

end

Events.OnInitGlobalModData.Add(ProjectGurashi.addBooks)```
#

i vaguely understand whats happening in this code but I don't know what's wrong

#

ah i see the issue

#

yeah nope still not workin

rancid barn
#

thats very good

rancid barn
#

wait i figured out the problem

rancid barn
#

mods been updated

wet sandal
rancid barn
#

literally me

edgy agate
#

Mod idea: button that cleanly crashes your game.

reason: super lazy save scum system. Doing this correctly should create a seperate [save name]_crash file that can be loaded whenever.

north drift
#

All the tabs should now work I'm sure you are past it now, but for some changes to take effect in the ui it appears you have to save and reload the mod.

compact elm
#

Can anyone help me with animated popup lights for a vehicle? I have no clue about the lua functions

chilly ermine
#

local function OnWeaponSwing(character, handWeapon)
local weapon = getPlayer():getPrimaryHandItem()
if (weapon:isTwoHandWeapon()) then
end
Events.OnWeaponSwing.Add(OnWeaponSwing);

how to ensure every weapon swing from a specific weapon from a mod pack has the uppercut animation, assuming its 2 handed.
Is there a var that can change the current animation set, and animation speed?

grizzled fulcrum
#

otherwise I have no idea

chilly ermine
#

its defined as bat already, like the default value for 2h wep, but i just want a specific animation type for when it does swing

#

thanks regardless

thick karma
# unreal pewter yeah nope still not workin

Sorry, I passed out, two immediate recommendations: when you make your module local, you do not need ProjectGurashi or because it is not going to exist before you use it in that file. You should also add return ProjectGurashi as the last line of your file so that your mod is patchable.

#

I always return local modules, because I never know how someone might want to patch them, and I like to make sure my mods either already play nice with others or can be made to do so by someone else when I'm gone.

#

Now, once you've straightened your module, if you want some more help, you need to clarify exactly what isn't working if you expect further help. Posting code and saying "why doesn't this work" is not likely to get much support beyond someone like me telling you to provide more information. You need to say exactly what isn't working and how you know. Are errors being thrown? If so, what are the errors? If not, what do you mean by not working, and how have you attempted to determine whether it's working?

#

When you refactor a mod you need to figure out what you do and don't need by reading it. One thing you may not realize you need are some of the sandbox variables that are declared in the parent mod's sandbox options file

thorn brook
#

hey, how hard would be adding a pause and rewind tape function to the true music mod as an addon (i want to be able to make mixtapes, instead of putting each song on a seperate tape)? i'm pretty much a beginner in modding but i do have some lua experience if that helps, or maybe does a mod like that already exist?

thick karma
thorn brook
thick karma
#

What would definitely be possible would be making a mixtape object that loads a queue of songs into True Music Jukebox. Then you could jump from song to song freely. I'd just add an export mixtape button that people could use at the jukebox to make their saved queue portable. I have been thinking about adding that as a new feature. You're welcome to attempt it yourself.

#

Jukebox already had custom queues

#

So turning them into mixtapes would be a small step

#

But not as one sound file

#

Turning them into a reference to the multiple sound files needed by the jukebox is something I know could be done

#

Combining them into one new sound script or file from in-game is beyond my knowledge

thorn brook
#

the same thing could be done with tapes

#

what i would also like to achieve though is so it also remembers at which point the tape has been stopped (like a real life tape and you'd have to rewind it)

thick karma
#

Nor a way to set it to that level of progress

thorn brook
thorn brook
#

and possibly add it to the jukebox mod

thick karma
#

I wanted it in the mod before we released if it was possible

#

That particular problem defeated me

#

I was just telling you in fair warning of its difficulty

#

I.e., if writing True Music Jukebox seems hard to you, prepare for that to be harder... Haha and if not hell yeah good luck let me know if you solve it

thorn brook
thick karma
#

Mixtapes not pausing

#

Exporting a mixtape for people would be a smaller step

#

Sorry I misunderstood what you meant by this

#

I thought you meant solve partial song progress

#

The tapes you could export easily from TMJ would only be easy to play from other jukeboxes to be clear.

thorn brook
thick karma
#

Making a cassette item for a single-item player from TMJ would be more difficult because you would have to patch and redesign TM's players or find a novel way of combining tracks into one sound clip

thick karma
#

It will already let you mass dump all your cassettes and vinyls and make a queue out of both of them and play that queue serverwide

#

If you just want to be able to mix and match songs and listen to them while you hunt

#

And you can shuffle them and jump to random and they'll loop forever and you can lock or unlock your queue (so it plays each song once and returns to the main playlist, or it repeats the queue)

#

And you can add or remove tracks from the queue easily if you get bored

thorn brook
thick karma
#

You can turn up the range

#

In Sandbox Options

#

Up to 110000 tiles

#

You will hear it everywhere at that setting

#

Read through the mod page and its sandbox option tooltips for a better idea of all your options

#

It provides many ways to use it

#

Also lets you remotely access loaded boxes

#

To skip tracks and such

#

Or queue new ones

thorn brook
#

well yeah it is useful for that purpose, but still i think it would be better if you could put multiple tracks on one tape and then you can play it in your car, walkman etc. (just like it's done in the immersive cd players mod)

#

or what would be even cooler if the same thing could be done on vinyls

#

then you can have a whole album with a cover

#

on one vinyl

#

and then you can have a lil vinyl collection

chilly ermine
#

how does someone command the player to preform a specific animation using lua?

thick karma
#

I may review ICD to see what could be done but I doubt it's possible without majorly rewriting True Music files. Afaik the immersive CDs are all fixed state - you can't make custom CDs - and I bet that's because they also found it prohibitively difficult to combine sounds into a single item that the music player would recognize in game

thorn brook
thick karma
#

ChatGPT is not helpful to me historically at this level of modding.

thorn brook
#

yeah, it might be a bit helpful with smaller scale stuff but not this i guess

thick karma
#

It's always babble that experienced modders have to correct

drifting ore
#

It helps to know that ChatGPT is at the core a random text generator.

thick karma
#

It's awful at problems that have never been solved before and problems that are only ever solved in private spaces.

#

Most modding goals fall into the latter category.

#

This is one of those times where I would recommend believing in yourself. You can do things ChatGPT cannot through the much more boring power of patiently learning new skills over time. @thorn brook

dull moss
#

I used chatgpt few times for modding here and there, it's helpful

#

that is if you have an idea what you're doing

#

but as Burr said, it depends on how deep you go

#

it can help with simpler stuff

drifting ore
#

Large language models learn by example. If there's no example, they can't learn it.

#

They can and will however make up stuff on the fly and pass it off as a real answer.

#

It's one of the open problems in AI research, is that LLM AI cannot gauge its own confidence, it's always at 100%.

dull moss
#

I'm just saying that it can help with modding

#

It solved few problems for me

bronze yoke
#

it can be effective for questions that are more general or if you have the knowledge and time to tell it what it's doing wrong (but at this point i think you're better off doing it yourself)

#

but overall you're just using google search with an additional high chance to make things up completely and look quite convincing while doing it

dull moss
drifting ore
#

Nothing says its output can't be correct. But nothing says it's output is correct. At the end of the day it just generates random text, using a randomization function that mimics human text probability distribution.

dull moss
drifting ore
#

Using AI for answers it kind of like looking at a broken clock to tell which time it isn't. It's mostly right, but only through sheer happenstance.

dull moss
#

Well idk what to tell you, I used chatgpt for coding related things hundreds of times and majority of times it was helpful, even sometimes with pretty complicated things shrug

drifting ore
#

There's no contradiciton there.

dull moss
#

oh I misread ur msg

drifting ore
#

Majority of the time it works. And there's a minority of the time where it fails.

#

Well, the reason there is such minority where it fails, is because fundamentally it produces text simply by selecting what's the next most probable best word to autocomplete the text, one word at a time.

#

(with an asterisk, I can elaborate if you wish)

dull moss
#

I'm fairly sure you're hyperbolizing here the simplicity of chatgpt but I'm not really interested in the discussion nor do I know the subject well enough. But I am damn well sure it's not an asterisk fill

half remnant
# drifting ore Majority of the time it works. And there's a minority of the time where it fails...

Yeah lmao, just like with "real" coding, the majority of the time your code works and then there is a minority when your new code fails and you dont know why and have to debug.

AI is doing good work but only as long as it knows the context of your code and your prompt is right. Just like in real life, if you ask other senior devs the right answers and they know the context they can help you.

drifting ore
drifting ore
#

This has nothing to do with programming of course. But I bring this up to illustrate that ChatGPT doesn't produce real data, only text that looks like real data.

#

To anthropomorphise. Think of ChatGPT as that one know-it-all who read a lot of wikipedia and reddit and stackoverflow, will always answer anyone's questions, and doesn't knows the meaning of the words "I don't know" or "I'm not sure"

half remnant
dull moss
#

He's not a chatgpt enjoyer

half remnant
#

Mhm 😅

drifting ore
half remnant
#

The overall conclusion is that you can use ChatGPT for certain tedious tasks and even get help with very complicated coding sprints as long as ChatGPT knows the context. I dont recall how many times I got a decent codebase out that I had to rewrite a bit ofc but it was pretty decent.

Its just a tool that cuts your worktime, nothing more and nothing less.

dull moss
half remnant
#

The thing is that it doesnt need to think and it would be fckng scary if it could. Its just a TOOL, similar to excel etc, just with a different usecases.

drifting ore
#

It's more like Google, if it had the ability to make up fake data if it didn't find the exact match.

#

You know if it actually could mark which text is not real, it would be outstanding.

#

But as I said, it's an open problem in AI research, as AI will always gauge its own text as 100% real

#

Same reason BTW why AI can't discern AI text from human text.

dull moss
#

Will you ever do mod or something so your msgs are on topic PepeLaugh

#

Anyway fixed a problem myself PepeLaugh

drifting ore
#

Who says I'm not modding?

half remnant
#

Yeah, the thread is about programming and mod development so we should stop flooding it with unrelated topics 🫡

drifting ore
#

Anyway I'm basically giving you a warning against putting any trust in ChatGPT's outputs. Its modus operandi is hallucinating text, and that's it's the only modus. It can and often does have large overlap with reality, but don't make the mistake of thinking that it says the truth.

#

As a LLM afecionado who runs their own AI locally, I'm acutely aware of these problems, and I feel like I must warn people against overlooking them in a commercial model running on someone else's computer for profit.

forest lodge
#

quick question, i'm adding some new color variants to the Lumberjack Shirt. i have the textures all set up, icons and everything, and i created a Shirt_Lumberjack.xml in my /media/clothing/clothingItems/ folder (screenshot 1). made sure the GUID was the same as the original game's file.

the issue i'm running into is when trying to add the icons to the item. if i don't do anything else, there is one entry for Lumberjack Shirt with all the colors, but the new colors lack an icon.

so, i made a text file in /media/scripts/clothing/ and added this (screenshot 2). now there are two entries for the Lumberjack Shirt - one has all the colors without the icons (as before), but now there's an additional one with the correct icons.

instead of making a new entry in the base clothing, is there a way i can just overwrite the IconsForTexture field in the existing Shirt_Lumberjack entry?

#

screenshots didn't attach, one sec lol.

#

there we go

drifting ore
#

Do you end up with separate vanilla and modded jackets?

forest lodge
#

yep

solar rover
#

@sour island Just wanted to check in and see if the EHE mod team every responded with perms to use the old heli model file?

drifting ore
#

From 2nd screenshot looks like you add a XYZclothes.Shirt_Lumberjack while Base.Shirt_Lumberjack also still exists

#

my advice is to override Base.Shirt_Lumberjack clothingitem, it might work but I'm not 100% on it

sour island
forest lodge
#

i'm importing the Base, so i assumed just writing a new Shirt_Lumberjack would overwrite it, but i'll try rewriting it

solar rover
forest lodge
#

i'll give this a try

drifting ore
#

Also I think when you add modded files, you don't need to keep the original's GUID. The game only cares about definitions inside the file. I'm not sure what it even does exactly, only that fileguidtable and xml file GUID values are enforced to be matching.

forest lodge
#

well, i have a completely custom clothing item so that XML has a custom GUID and is added to the fileguidtable
for the lumberjack shirt, i did not add it to the fileguidtable, and it works

#

i'm not really a professional with zomboid modding as you can tell lol, so im just going off of what i've seen others do

forest lodge
drifting ore
forest lodge
#

i was typing "yeah the lack of documentation is astounding" but if someone asked "who wants to write documentation" i'd be the first person putting my hand down

#

at least it's... somewhat intuitive

drifting ore
#

Even when it was part of my job description to write documentation, I almost never did it.

forest lodge
#

with single-player tarkov we have like zero modding documentation as well so

#

the curse of modding games that are still being actively worked on...

bronze yoke
#

the tools for documentation are coming along

drifting ore
bronze yoke
#

to be honest i don't think it would help much

#

the javadocs seem to automatically integrate any in-code documentation, which shows us that there is almost none, at least for things like class and method declarations

#

decompiles can be a little messy but i don't think we're really that far off from having the full picture

grizzled fulcrum
#

as long as we can see decompiled java, we can write our own documentation on what functions do

#

so thats good I guess

drifting ore
bronze yoke
drifting ore
#

cool, thanks. Odd that I found a whole bunch of random ones working off decompiled code, but not this one.

grizzled fulcrum
#

yeah I saw zomboid-javadoc website but it seems that it's off decompiled code too

bronze yoke
#

the official one is technically a version behind

#

but it has named parameters so i find it much more useful and have to this day only found one difference in api

red tiger
#

If not I can look to see if my datasets could be used for this process for third-party builds.

bronze yoke
#

i wonder how much work goes into it, i figured it wasn't much but they'd probably do it more often if so

red tiger
#

It's an easy process actually.

bronze yoke
#

before this version came out the docs were like b40, b39?

red tiger
#

Assistance tools in IDEs makes it incredibly easy to run.

red tiger
#

You can hit F12 on JavaDocs sites and they'll show the render times in the HTML.

#

Rosetta started as a response to this issue however since then the issue went away thanks to Build 41 JavaDocs showing up.

#

What's even cooler is the products PipeWrench and Candle transparently show all of the API changes on the Java-side with every update so people can use the Git diffs there on the repositories for guidance on all API changes.

#

Methods digested through JavaDocs in previous versions of the game with matching method signatures can be forwarded through Rosetta as well.

#

So if the method's parameters and name don't change and its location to call is the same then you could forward the same JavaDocs information through to the next version, even if the JavaDocs isn't available for that version. =)

drowsy fjord
unreal pewter
#

again i dont know much about coding so i dont really know whats happening here at all

thick karma
unreal pewter
#

Yes, I checked that and they worked fine. So I know its an issue with the distribution

thick karma
#

I think it belongs there

unreal pewter
#

yes

thick karma
#

Well if they're in item viewer and error free, maybe share distribution code and we can make sure it looks right, but in all probability if you followed my code as a template you just gotta look around a bit for your book

#

Might need to go to a library

unreal pewter
#

for testing i just put it in school desks

#

because the map is centered around a school

north drift
#

Is it wrong that I can't wait for Build 42, not because of its features but its breaking changes will bring a whole swath of new errors disocover and fix.

thick karma
#

Word code?

unreal pewter
thick karma
thick karma
unreal pewter
unreal pewter
thorn brook
north drift
#

🚫

thick karma
#

I can check the file but I don't know the details of properly flagging locations for procedural distribution, I only know it has to be done

thorn brook
# drifting ore geez what did you even say

to him? i just asked him if he knew of any true music addon or something that added the functionality i was talking about earlier, and if not if he could look into adding it himself if it wouldn't be too much trouble

#

he just straight up blocked me after that

north drift
small dust
#

Hate to derail anything here, but I and my State of decay overhaul team are wondering how we go about publishing our vehicle liveries for the UH-60 mod to the workshop

thorn brook
thick karma
drifting ore
#

well my best explanation is that the guy has far too much solicitors so to him it's easier to instantly block anyone he doesn't feels like engaging with. It's extremely rude but I don't think it's malicious in nature.

thorn brook
north drift
#

Yeah just sounds like effort outweighed his interests

thick karma
#

He has well over 100k users

#

More than some standalone games

north drift
#

I would just take it as a no and not worry about it.

thorn brook
#

most of those users are just that, users

#

they won't have any reason to write to him directly

#

so i doubt he gets that many messages

#

especially on telegram

#

and it doesn't seem like he's answering on discord either, except on a channel for patreons maybe

thick karma
#

I needed to wait for a very long time before he responded to a bug fix I offered via his Discord, but he did reply.

#

He seems busy

north drift
#

Yeah sounds like not the best way to answer, but I don't think he has any moral obligation to be nice. And we don't really have any high grounds to fully understand or judge his behaviours. It possible he could of just ghosted the messages just read them and never reply.

thorn brook
north drift
#

But getting a response is better than. Waiting for none, so you gotta take the little w

thick karma
#

He might just not want to be pingable by strangers in that app

thorn brook
thick karma
#

I wouldn't friend people on Steam I didn't want to be able to ping me for the same reason

thorn brook
#

or for anything else too really

thick karma
#

No I reported via his Discord

#

I pinged him on his server

#

And left the message alone

#

Didn't ban me...

#

Took literally weeks to reply lol

thorn brook
#

yeah i'm talking about the discord, there is a tech support channel on there for reporting bugs but it seems you need to be a patreon to be able to write on it

thick karma
#

But he probably silences those pings on Discord and gets to them when he finds time

thick karma
north drift
#

"When we put all this out to the public beta we intend to do so alongside a comprehensive modding guide" from latest thursdoid, how comprehensive have previous guides been?

fleet bridge
unreal pewter
#

no clue, copied someone else’s code

dull moss
fleet bridge
#

do you have an error when you run the function then?

unreal pewter
#

listen he told me to so its okay lmao

thorn brook
unreal pewter
fleet bridge
#

are you in debug mode?

unreal pewter
#

no

fleet bridge
#

start in debug, press f11 in-game, then on bottom right window search for your lua file

#

chances are, its not loading hence its not adding to distribution

unreal pewter
#

well in the past i added a print to it to confirm the script was running, and it was

#

ill try again when im home in like 20 mins

drifting ore
#

it's a bit of a misnomer since it just converts Lua table entries to internal Java objects, it doesn't parse any text

fleet bridge
#

so does it reload the vanilla distribution?

drifting ore
#

it reloads ALL distributions

#

you probably should never use this function

fleet bridge
#

so... any inserted entries disappear?

drifting ore
#

no, they're inserted into the game's memory

fleet bridge
#

dont see that being used in any vanilla files, hence i am wondering what it does and why it is necessary

drifting ore
#

i checked in Java source code and it appears to be an internal function responsible for actually loading the distribution data

#

but as a mod code, it probably should just use the merge distributions callback

bronze yoke
#

you need to use it to change distributions if you edit them after they're parsed

#

mostly useful for sandbox options affecting item spawns since sandbox options don't load until after the game parses them

drifting ore
bronze yoke
#

i.e. if you did it in the only order you possibly can

fleet bridge
#

private static void ParseProceduralDistributions() {
ProceduralDistributions.clear();

drifting ore
fleet bridge
#

in the context of Nekomair's code, ItemPickerJava.Parse() is after the insertion and would just remove the inserted entries - that's my understanding

drifting ore
#

no it forces the game to respect the newly added changes

#

in the java routine right in the next few lines it fills the distributions object from Lua tables

drifting ore
bronze yoke
#

it's because you set the sandbox options on the options screens for creating a new game

drifting ore
#

I wouldn't expect that to make a difference though.

bronze yoke
#

it'd have to deliberately reset your settings and then load them again

drifting ore
bronze yoke
#

yeah, it should ideally do that as early as possible, it causes nightmares and there's no need for it

#

it's not possible to always load sandbox options before lua runs though, lua doesn't always reset when loading into a game

#

though i think that might be worth changing too

drifting ore
#

Yeah pretty sure Lua state just needs to be reset when loading a level.

#

Like, why would you want your main menu bits and bobs intruding into actual game?

#

Then again, it depends on master design. But in case of running a Java compiled binary with Lua purely for scripting, seems like this would be the way to go.

#

Eh. It's not a system library, so can't complain that the design is not entirely sound.

true pollen
#

hello brothers! Would you be able to help promote a channel? is aimed at the Brazilian mod community! the community is lacking and there are simply no videos on YouTube on how to create mods! I would be very grateful if you would sign up! https://www.youtube.com/@tiagocuru

orchid notch
#

progressing well on the Easy Packing for GunFighter[2.0]/brita ammo

empty flame
#

Anyone knows who is the creator of PAbuilder?

coarse sinew
unreal pewter
#

@fleet bridge theres this error in the console, not sure if this might be it:

STACK TRACE
-----------------------------------------
function: addBooks -- file: ProjectGurashiDistribution.lua line # 83 | MOD: Project Gurashi: Megurigaoka City

ERROR: General     , 1719946895194> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: literatureFrequencyMultiplier of non-table: null at KahluaThread.tableget line:1689.
ERROR: General     , 1719946895194> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: literatureFrequencyMultiplier of non-table: null
    at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
    at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
    at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
    at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
    at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
    at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
    at zombie.Lua.Event.trigger(Event.java:64)
    at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:92)
    at zombie.world.moddata.GlobalModData.init(GlobalModData.java:53)
    at zombie.iso.IsoWorld.init(IsoWorld.java:2438)
    at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:268)
    at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:225)
    at java.base/java.lang.Thread.run(Unknown Source)
LOG  : General     , 1719946895196> -----------------------------------------
STACK TRACE```
fleet bridge
#

literatureFrequencyMultiplier of non-table: null

unreal pewter
#

yeah, i just have no idea what that means lmao

fleet bridge
#

did you create a sandbox var?

#

it means it doesnt exist

unreal pewter
#

i didnt

fleet bridge
#

so the entire thing wont execute until you add a sandbox variable

unreal pewter
#

to be honest burryaga just said to copy his code and i tried to so im just trying to figure out how to put his code in

unreal pewter
#

that makes sense

mellow frigate
unreal pewter
#

i assumed the frequency multiplier was the sandbox setting in the base game for loot rarity

fleet bridge
#

you can set that entire var to 1 just to test and see if the rest of it works, but ideally you'll create a sandbox variable for it

unreal pewter
#

i think that section is


    local setting = tonumber(getSandboxOptions():getOptionByName("LiteratureLoot"):asConfigOption():getValueAsString())

    if setting > 3 then
        return 1.25
    elseif setting > 4 then
        return 1.5
    elseif setting > 5 then
        return 1.75
    elseif setting > 6 then
        return 2
    end
    
    return 1```
#

im not sure if i even need this?

#

can i just like delete this entire section?

#

and should i get rid of ItemPickerJava.Parse()

warm vector
#

How come I get told that my mod is missing a mod.info file when I try to upload it - but my folder has it?

C:\Users\NAME\Zomboid\Workshop\NAMEOFMOD\Contents\mods - is the path I put the mod.info file into

unreal pewter
warm vector
unreal pewter
#

huh, thats weird

#

i know you also need a poster file, but itll specifically say that

warm vector
#

Yeah it has worked fine before - made a few changes to it and wanted to update - now it just doesnt work somehow

unreal pewter
#

oh

#

well thats what i was told at least lmao

#

and it works fine

thick karma
#

Those will overwrite other translations otherwise

unreal pewter
#

i dont want any sandbox options

thick karma
#

Then delete references to them 🙂

unreal pewter
#

so im trying to find what part of your code messes with sandbox options

warm vector
unreal pewter
#

im stupid

thick karma
#

Search SandboxVars

#

All references to SandboxVars in the code are referencing sandbox options

unreal pewter
#

right, i think its just this part, right? the part i commented out, i mean

thick karma
#

Also (obviously) you don't need the sandbox-options.txt or corresponding translations in Sandbox_EN

unreal pewter
#

yeah i just copied some of your text from MasteringYoga-Distributions.lua directly into my distributions file

#

thats all i copied

thick karma
#

Also 33 if I'm reading it right

unreal pewter
#

still seems to not be spawning, though

thick karma
#

33 34 35

unreal pewter
#

what?

#

oh lines

thick karma
#

Yes

unreal pewter
#

33-35 of your code?

thick karma
#

Use Search

#

Ctrl + F

#

Search text i.e. Find

#

Find "SandboxVars"

unreal pewter
#

so in my code thats lines 83-89 i think

thick karma
#

All code relying on those must be deleted or reworked

unreal pewter
#

right?

thick karma
#

Yes I couldn't see first number in the other ss

unreal pewter
#

ah alright

#

okay ill try this

#

reloading lua by enabling or disabling another mod should make this reload right?

thick karma
#

Are you not in debug mode yet?

unreal pewter
#

i got confused how debug mode works lmao

thick karma
#

I recommend debugging in debug mode.

unreal pewter
#

will do

thick karma
#

It has a reload Lua button

#

Among other advantages

unreal pewter
#

how do i just get to the main menu in debug mode?

thick karma
#

If you're firing errors before you get to main menu and it opens the big debug window, you close that (or reopen it) with F11

unreal pewter
#

oh i see, thanks

warm vector
#

@thick karma You know by chance why the game keeps telling me why I'm missing a mod.info file perhaps?

bronze yoke
#

your mod.info is missing or in the wrong place

unreal pewter
#

where it says no category set, could that have something to do with it?

#

(still not spawning it seems)

warm vector
unreal pewter
#

oph yeah

#

thats the wrong place

bronze yoke
#

it should be in C:\Users\PROFILE\Zomboid\Workshop\MyModIsHere\Contents\mods\MyMod\mod.info

unreal pewter
#

yeah

unreal pewter
#

by the way, is the rate the spawn weight?

#

you set it to 4 by default, whys that? is that the spawn weight of books or what?

thick karma
#

Just the likelihood that felt good to me subjectively in testing at normal book rarity

#

Feel free to adjust as desired

warm vector
thick karma
#

And balanced around that

unreal pewter
#

well

#

still theyre not spawning at all

thick karma
#

They in item viewer?

unreal pewter
#

yeah

#

still not spawning

thick karma
#

Can you manually add them to inventory

unreal pewter
#

at least in the desks, which is what im testing

unreal pewter
#

the items themselves exist and function properly

thick karma
#

What's your book rarity setting

#

In your server

unreal pewter
#

im trying a couiple things

#

ive been testing on the default, rare

bronze yoke
#

you can check the container in lootzed to see if the issue is chance or if it's not being added at all

unreal pewter
#

just put it at abundant and still nothing

bronze yoke
#

you need to enable it in the debug menu's cheat menu and then right click the container icon in the inventory panel

unreal pewter
#

i see

thick karma
# unreal pewter i see

You may want to make a secondary server with vanilla map and check Louisville's library

unreal pewter
#

what specific tiles are included in ClassroomDesk and ClassroomShelves?

thick karma
#

And just confirm your distribution code is good

#

If items spawn in Louisville then your problem is your map data

#

#mapping may know more about fixing item spawns on the map level

bronze yoke
#

i think lootzed will tell you what container definitions a container is using

unreal pewter
#

oh, huh

#

interesting

#

so does that mean its just chance?

#

is the fact it has no name there an issue?

bronze yoke
#

i notice in your previous screenshot there is no ProjectGurashi module tab in the itempicker

#

is your item in Base instead?

unreal pewter
#

PG is it

#

i just shortened it by my friend's suggestion

#

to have the module and mod names different things

thick karma
#

What's your item script look like?

bronze yoke
#

ah, you've given the distributions the old name then

#

that's why it's not spawning anything

unreal pewter
#

the only thing thats not working is the unhappiness change

#

i may have the wording wrong

thick karma
#

PG.TheDancingGirl when referencing item from Lua

unreal pewter
#

im gonna change the module name, then

#

holy shit yes it worked

#

finally, i learned how to not be stupid

#

so another question, is there a way to have a list of items and say to run the distribution code thingy for every item in the list?

drifting ore
#

You can straight up write down the items as a list. And then pass it to a function that iterates over each item in the above list and adds it to the distributions.

#

list = { "PG.TheDancingGirl", "PG.Kokoro", "PG.TheCrabCanneryShip" }

#

for _, bookItemName in pairs(list) do customFunctionToModifyDistributions(bookItemName) end

grizzled fulcrum
#

^ saves so much time and effort

unreal pewter
#

something like this?

grizzled fulcrum
#

and you can have another list of all the containers it should add it to

#

then loop in a loop

grizzled fulcrum
unreal pewter
#

cool, thank you all a lot

#

so happy i finally got this working

grizzled fulcrum
#

but you don't need your mod name in front of it, when you go to add it to the distribution you can just append your mod name to the text like MOD_ID .. books[i]

#

assuming MOD_ID is a string with your project name local MOD_ID = "ProjectGurashi"

drifting ore
#

that's a coding style optimization I'd reserve for later

unreal pewter
#

oh but also, the distributions like ClassroomDesk and ClassroomShelves, where can i find a list of all those?

unreal pewter
#

dear lord thats a lot

drifting ore
#

or you can look at the original game file, in steamapps\common\ProjectZomboid\media\lua\server\Items\ProceduralDistributions.lua

#

there's even more. But it's all real game items from current version.

unreal pewter
#

oh also i wasnt able to get unhappiness reduction working, is UnhappinessChange = -40, the wrong format?

drifting ore
#

It could be? Check out a regular book script text. Those also reduce unhappiness.

unreal pewter
#

alright

drifting ore
#

Yeah apparently you're using wrong identifier.

unreal pewter
#

does something like this look right though?

unreal pewter
drifting ore
unreal pewter
#

where would i put pairs..

drifting ore
#

i mean the in pairs(list) do

#

pairs is a function that enumerates everything in the table that you put in it

thick karma
#

pairs(books) if you uncomment

unreal pewter
#

i see

#

and lastly how do i change the function itself

#

like what would i put instead of ProjectGurashi.TheDancingGirl

drifting ore
#

change the fisrt line to function(book)

#

and then change the actual book title string to book

thick karma
unreal pewter
#

you mean books?

thick karma
#

Based on earlier script

unreal pewter
thick karma
#

Oh

#

Ok

unreal pewter
#

i got it to spwan ingame im just trying to make it so i can insert an item into a list and itll spawn

drifting ore
#
rate = 4
table.insert(ProceduralDistributions.list.ClassroomDesk.items, book)
table.insert(ProceduralDistributions.list.ClassroomDesk.items, 10 * rate)
end```
#

and put ItemPickerJava.Parse() after the loop from which you call this function

thick karma
#

I would declare rate and Parse() out of function but mostly yeah that looks right

thick karma
thick karma
unreal pewter
#

with the distribution quoted

drifting ore
# unreal pewter shouldnt it be like this?

yes but take note that you're using plural books as the item name. Put it in the argument list brackets of the function definition (as in function() => function(books) )

unreal pewter
#

its like that, yeah

drifting ore
#

It technically doesn't matter but the programming language will absolutely not allow any misspelling.

unreal pewter
#

this is how the whole thing looks

thick karma
#

I think you a more fundamental naming issue

drifting ore
unreal pewter
#

okay so thats weird

thick karma
#

Idk I would just say addBook

#

And book

#

Personally

unreal pewter
#

upon trying to make a solo run the base game's map no longer exists lmao

thick karma
#

Each iteration adds a new book to the distribution

#

Idk

unreal pewter
#

yeah ill do that

thick karma
#

I mean the distribution does go on to add books

#

So sort of fuzzy I guess

unreal pewter
#

ignore that

thick karma
#

But it's definitely a singular title

#

Maybe addTitle

#

Haha

#

Idk

drifting ore
unreal pewter
#

oh sorry lmao

#

local ProjectGurashi = ProjectGurashi or {}

ProjectGurashi.truncate = function(number)
        return math.floor(number * 100) / 100
end

local pairs(books) = {
        "ProjectGurashi.TheDancingGirl",
        "ProjectGurashi.Kokoro",
        "ProjectGurashi.Yoakemae",
        "ProjectGurashi.TheCrabCanneryShip",
        "ProjectGurashi.NatsunoHana",
        "ProjectGurashi.NoLongerHuman",
        "ProjectGurashi.FiresonthePlain",
        "ProjectGurashi.TheSilentCry",
        "ProjectGurashi.TheLegendofTono",
        "ProjectGurashi.JidaiheisokunoGenjo",
        "ProjectGurashi.AnAutobiography",
        "ProjectGurashi.ListentotheVoicesoftheSea",
        "ProjectGurashi.ParadiseintheSeaofSorrow",
        "ProjectGurashi.RedLightsShakko",
        "ProjectGurashi.ACollectionofHagiwaraSakutaro",
        "ProjectGurashi.ACollectionofNakanoShigeharu",
        "ProjectGurashi.ACollectionofKanekoMitsuharu"
 }

    for _, bookItemName in pairs(list) do ProjectGurashi.addBook(bookItemName) end





ProjectGurashi.addBook = function(books)
    
    -- Base Rate
    local rate = 4

    table.insert(ProceduralDistributions.list["ClassroomDesk"].items, books)
    table.insert(ProceduralDistributions.list["ClassroomDesk"].items, ProjectGurashi.truncate(10 * rate))
    table.insert(ProceduralDistributions.list["ClassroomShelves"].items, books)
    table.insert(ProceduralDistributions.list["ClassroomShelves"].items, ProjectGurashi.truncate(10 * rate))

    ItemPickerJava.Parse()

end

Events.OnInitGlobalModData.Add(ProjectGurashi.addBook)```
drifting ore
#

ok so

#
        "ProjectGurashi.TheDancingGirl",
        "ProjectGurashi.Kokoro",
        "ProjectGurashi.Yoakemae",
        "ProjectGurashi.TheCrabCanneryShip",
        "ProjectGurashi.NatsunoHana",
        "ProjectGurashi.NoLongerHuman",
        "ProjectGurashi.FiresonthePlain",
        "ProjectGurashi.TheSilentCry",
        "ProjectGurashi.TheLegendofTono",
        "ProjectGurashi.JidaiheisokunoGenjo",
        "ProjectGurashi.AnAutobiography",
        "ProjectGurashi.ListentotheVoicesoftheSea",
        "ProjectGurashi.ParadiseintheSeaofSorrow",
        "ProjectGurashi.RedLightsShakko",
        "ProjectGurashi.ACollectionofHagiwaraSakutaro",
        "ProjectGurashi.ACollectionofNakanoShigeharu",
        "ProjectGurashi.ACollectionofKanekoMitsuharu"
 }

ProjectGurashi.addBook = function()
    
    -- Base Rate
    local rate = 4

    for _, bookItemName in pairs(books) do 
        table.insert(ProceduralDistributions.list["ClassroomDesk"].items, bookItemName )
        table.insert(ProceduralDistributions.list["ClassroomDesk"].items, ProjectGurashi.truncate(10 * rate))
        table.insert(ProceduralDistributions.list["ClassroomShelves"].items, bookItemName )
        table.insert(ProceduralDistributions.list["ClassroomShelves"].items, ProjectGurashi.truncate(10 * rate))
    end

    ItemPickerJava.Parse()

end

Events.OnInitGlobalModData.Add(ProjectGurashi.addBook)```
#

there we go

unreal pewter
#

ill test that quickly

thick karma
#

Well now it IS an addBooks function lol

#

But fair enough

drifting ore
#

hey i'm not refactoring anything, just getting it to run 😛

thick karma
#

Bahaha I feel that

#

I was just telling Neko tbh

unreal pewter
#

uh got an error with a big debug screen then it disappeared

thick karma
#

To keep plurality in the front of their mind

drifting ore
#

check out console.txt log

unreal pewter
#

ah right

drifting ore
#

there's a humongous wall of text but error messages blocks of text stands out so it's easy to find

#

also ctrl+f error might work

unreal pewter
#

yeah i did that u

#

uh

drifting ore
#

nah that's not it

unreal pewter
#

yeah i assumed not

#

but ctrl f isnt gonna work

thick karma
#

Okay

#

First of all

drifting ore
thick karma
#

Please for your own sake

unreal pewter
#

i just dont have txt files to open up in that

#

lazy

#

but anyways that code didnt work

thick karma
#

Second as CS said, Ctrl + F for "Stack trace"

unreal pewter
#

the books arent showing up in the distribution

drifting ore
#

you've renamed the module to PG right?

unreal pewter
#

no

thick karma
#

No the other way I think

unreal pewter
#

i changed the module name to ProjectGurashi

drifting ore
#

well the Lua code didn't crash so something else must be the issue

#

try adding something like print("Project Gurashi: adding books to distributions") to the adding books function

#

then you can search for it in the log and see if any errors immediately follow it

unreal pewter
#

ill put it in the loop

#

huh

#

interesting

#

i cannot pause the game

#

yeah heres what popped up

#

idk if that means the green line is what caused an error?

drifting ore
#

no the error is caused by copy pasting the original text which contained a few errors

#

i quickly revised it but it didn't make it into your actual code

unreal pewter
#

oh oops

#
    "ProjectGurashi.TheDancingGirl",
    "ProjectGurashi.Kokoro",
    "ProjectGurashi.Yoakemae",
    "ProjectGurashi.TheCrabCanneryShip",
    "ProjectGurashi.NatsunoHana",
    "ProjectGurashi.NoLongerHuman",
    "ProjectGurashi.FiresonthePlain",
    "ProjectGurashi.TheSilentCry",
    "ProjectGurashi.TheLegendofTono",
    "ProjectGurashi.JidaiheisokunoGenjo",
    "ProjectGurashi.AnAutobiography",
    "ProjectGurashi.ListentotheVoicesoftheSea",
    "ProjectGurashi.ParadiseintheSeaofSorrow",
    "ProjectGurashi.RedLightsShakko",
    "ProjectGurashi.ACollectionofHagiwaraSakutaro",
    "ProjectGurashi.ACollectionofNakanoShigeharu",
    "ProjectGurashi.ACollectionofKanekoMitsuharu"
}

ProjectGurashi.addBook = function()

-- Base Rate
local rate = 4

for _, bookItemName in pairs(books) do 
    table.insert(ProceduralDistributions.list["ClassroomDesk"].items, bookItemName )
    table.insert(ProceduralDistributions.list["ClassroomDesk"].items, ProjectGurashi.truncate(10 * rate))
    table.insert(ProceduralDistributions.list["ClassroomShelves"].items, bookItemName )
    table.insert(ProceduralDistributions.list["ClassroomShelves"].items, ProjectGurashi.truncate(10 * rate))
end

ItemPickerJava.Parse()

end

Events.OnInitGlobalModData.Add(ProjectGurashi.addBook)```
#

okay so THIS should be good?

#

wait no

#

wait yes

thick karma
unreal pewter
#

too late i closed it to try to load again

#

if it happens again ill do that

thick karma
#

I'm speaking in general I knew I was late

unreal pewter
#

ah

thick karma