#mod_development

1 messages · Page 237 of 1

thick karma
#

Yeah I wonder how they'll allow us to determine the z's of an x, y position. Say we want to check all the z's at a given x, y -- will we do 31 - 31, or will there be a function that gives the correct range?

#

I dunno usually it won't come up I'm guessing

#

In most situations it will never matter because there will be subjectively plenty of space to work with in both directions... Players obviously won't have a way of knowing the height or depth limit of wherever they happen to be, and map makers might not even have to care until they hit 32 levels. Tools could flexibly adapt to whatever direction you build.

bronze yoke
#

i assume most chunks wouldn't even have a single negative level anyway so it won't usually be noticeable even if you were for some reason building at 32y

#

and those that do certainly won't have 31 basement levels

thick karma
#

So is the limit going to be chunk wide?

#

Like if rel 111, 65 goes to 28, whole chunk needs allocation for it?

bronze yoke
#

i had assumed it'd be on the cell level but the blog you linked seemed to say chunk, which i suppose makes more sense

thick karma
#

And chunk iirc is the 10x10 right?

#

Cell 300x300?

#

Or am I backwards?

slow hound
#

chunk is the smaller from what i've gathered

bronze yoke
#

yeah

thick karma
#

Then I'm p sure it's 10x10 in 41... Or that's the math I was told to use

slow hound
#

tile>chunk>cell

bronze yoke
#

they'll be 8x8 in b42 though

thick karma
#

When I rewrote position xy

thick karma
#

8x8 not bad

#

I could totally see someone doing it

#

8x8x31 custom bunker

#

Someone won't be able to resist

#

Hell, if nobody else makes a -31 level map, I'll probably learn to map

#

It just seems like a thing that must happen

#

Clearly

#

Doesn't even seem like a big deal compared to a lot of these maps.

bronze yoke
#

you could have a totally underground map that allows for digging

slow hound
#

could create a toxic map where people have to dig out the underground to create more livable space 😄 I have been thinking since i read these updates

thick karma
#

Exactly, someone has to do a fully underground map

slow hound
#

force people to live communal in a map also would be interesting

thick karma
#

It's too perfect

thick karma
#

Deep Vault Dweller

#

Spawn at z = -31

#

Escape the deep vault in which you were born

#

Fallout Knox Country

#

W.e. someone has to do it

bronze yoke
#

buried alive trait, spawn at -31 with a shovel

thick karma
#

Lol must have Dig Worms

slow hound
#

if only mapping wasn't insanely time consuming. i think fallout map has been being worked on for only a few years now by multiple people 🙂

#

I feel like mapping is cool until it isn't

drifting ore
#

hey has anyone here ever heard of any issues when modding + modeling on a mac?

#

ive been working on these models for a mod and they are invisible when i hold them

#

posted this in the wrong channel mb

sonic osprey
#

I am making a simple mod of a drink, but I have some problems: It drinks automatically from the inventory and when it is empty, an error appears when trying to refill it. Here is the script I made:

module AguaDeMadrid
{
    imports
    {
        Base
    }

    item AguaDeMadridFull
        {
            DisplayName = Agua de Madrid,
            DisplayCategory = Food,
            Type = Food,
            Weight = 1.3,
            Icon = AguaDeMadridFull,
            Packaged = TRUE,
            CanStoreWater = TRUE,
            UnhappyChange = -20,
            FatigueChange = -20,
            ThirstChange = -40,
            CantBeFrozen = TRUE,
            EatType = bottle,
            CustomContextMenu = Drink,
            FillFromDispenserSound = GetWaterFromDispenserGlass,
            FillFromTapSound = GetWaterFromTapGlass,
            IsWaterSource = TRUE,
            ReplaceOnUse = AguaDeMadridEmpty,
            ReplaceOnUseOn = WaterSource-AguaDeMadridFull,
            CustomEatSound = DrinkingFromBottleGlass,
            StaticModel = AguaDeMadridStaticModel,
            WorldStaticModel = AguaDeMadridFull_Ground,
            Calories = 12,
            Carbohydrates = 0,
            Lipids = 0,
            Proteins = 0,
        }
        
    item AguaDeMadridEmpty
        {
            DisplayCategory = WaterContainer,
            Weight = 0.2,
            CanStoreWater = TRUE,
            Type = Normal,
            Packaged = TRUE,
            DisplayName = Botella madrileña vacía,
            ReplaceOnUseOn = WaterSource-AguaDeMadridFull,
            Icon = AguaDeMadridEmpty,
            StaticModel = AguaDeMadridStaticModel,
            WorldStaticModel = 
AguaDeMadridEmpty_Ground,
        }

}
undone crag
#

I imagine you could get rid of a line. Maybe CanStoreWater or IsWaterSource. This might have other effects that you might want to compensate for with additional modding.

#

Nope I misunderstood you.

#

I thought you didn't want to automatically drink from it. Maybe the real problem is the error message that appears.

sonic osprey
#

No no, I don't want it to be drunk automatically

undone crag
#

:o

#

Two problems then?

#

Refilling and automatic drinking?

sonic osprey
#

Yeah

pine patio
sonic osprey
#

I put the Ñ after because the previous name I used was similar to the empty water bottle in the game. The name works fine in the game, will I have problems in other aspects because of that?

undone crag
#

Do the error messages logged to one or two text files somewhere give useful information about the refilling error?

#

One of them's in username\zomboid\logs on windows and the other's somewhere

sonic osprey
#

The only thing that appears there is this:

function: onTakeWater -- file: ISWorldObjectContextMenu.lua line # 3795 | Vanilla
function: onMouseUp -- file: ISContextMenu.lua line # 90 | Vanilla.
[06-05-24 23:04:17.075] ERROR: General , 1715029457075> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in onTakeWater at KahluaUtil.fail line:82..
[06-05-24 23:04:17.075] ERROR: General , 1715029457075> DebugLogStream.printException> Stack trace:.
[06-05-24 23:04:17.076] LOG : General , 1715029457076> -----------------------------------------
STACK TRACE

function: onTakeWater -- file: ISWorldObjectContextMenu.lua line # 3795 | Vanilla
function: onMouseUp -- file: ISContextMenu.lua line # 90 | Vanilla.

slow hound
sonic osprey
slow hound
#

so maybe that is the real issue

sonic osprey
#

I'm gonna change that

slow hound
#

i would make it drainable maybe? then give it liquid properties

#

then ReplaceOnDeplete instead of on use

#

also you may need to set a useDelta as well if you don't consume entire thing when drinking

#

oh i see replaceonuseon is good still also for letting it know what item is going to be used when there is liquid in it

#

in case it holds other liquids. like if you were to fill it with fuel

#

you can create an item that would display your item but also with fuel if you choose to do that

thick karma
slow hound
#

thats all i have for now 😄

thick karma
#

Making the item drainable

undone crag
thick karma
#

And giving it a proper use delta

slow hound
#

ah yes

#

i would make those changes first, then you can see what kind of error you run into from there. will be much more clear when you are using it as a drainable

#

mostly looks correct though outside of that

thick karma
#

I'm pretty sure not being drainable is the most likely reason the item object would exist without having getUseDelta as a function of itself

vestal gyro
#

I just had a thought, can it he because the poncho is in the GUID file table, but the module Base script only has the normal poncho in it and not the ponchoDown thing

sonic osprey
vestal gyro
#

Im not sure how it is in the vanilla zomboid code but do I have to add it to the Base script or remove it from the GUID table for it to work?

sonic osprey
#

I have no error when filling it now, but it keeps on drinking automatically

thick karma
#

Sorry, I did not see this somehow. Yes, please.

vestal gyro
slow hound
#

if you put water containers on the character it will auto drink them

sonic osprey
#

I only have water container when it is empty, should I specify it also when the bottle is full? or what parameter should I write to make it work, for example, as a beer?

slow hound
sonic osprey
#

oooomaga

#

gonna change that

slow hound
#

you can use CAnStoreWater, and i don't think that will happen

slow hound
# sonic osprey I only have water container when it is empty, should I specify it also when the ...

example of empty petrol can


item EmptyPetrolCan
    {
        DisplayCategory = VehicleMaintenance,
        Weight    =    1.6,
        Type    =    Normal,
        DisplayName    =    Empty Gas Can,
        Icon    =    Petrol,
        StaticModel = GasCan,
        SurvivalGear = TRUE,
        ReplaceInSecondHand = Bag_GasCan_LHand holdingbagleft,
        ReplaceInPrimaryHand = Bag_GasCan_RHand holdingbagright,
        WorldStaticModel = GasCan_Ground,
        Tags = EmptyPetrol,
        ReplaceTypes = PetrolSource PetrolCan,
    }
#

i use the zedscript extension in VScode so it explains a lot of this in there

undone crag
#

(slow)

bronze yoke
#

that's still most of the experience but i really recommend vscode to cut down on it

sonic osprey
slow hound
#

Kudos to @red tiger on that
There are many contributors but Albion and Jab seem to have put the most effort into providing out of game tools and guides to make overall modding more palatable

#

and Aiteron with documenting whatever they can when they have time also according to my research

slow hound
tepid rock
#

Starting out: "Man, this is easy. No sweat."
Once you get to making your own Distributions.lua: stressed

Though I'm doing this in VSCode, so it could be worse. I'm not messing with procedural stuff, only adding in my items, not overriding anything.

#

If I have any questions, I'll be sure to ask.

#

Finally getting my ideas off the ground.

mellow frigate
#

I'm currently working on blueprints to copy paste buildings ingame. It is still far from being ready but the base is there.

undone tapir
#

thats awesome

#

its fast too. the btse one kind of almost 3d prints it tile by tile

urban plaza
# thick karma Sorry, I did not see this somehow. Yes, please.
undone tapir
#

i've found out the issue isn't the trait remover mod i'm using its the respawn mod i'm using. if i remove the respawn mod, the traits get removed from the OnGameBoot trigger

urban plaza
slow hound
#

this is for devs of mods looking for help, that is for people who use mods looking for help

drifting ore
#

ah sorry, 2 am in my country

#

rn 4

nova socket
calm igloo
#

I want to see a mod that lets you experience the outbreak. Like, start from society being fully normal, then watch as the zombie apocalypse takes hold.

#

Like the opening scene of The Last of Us

rich reef
#

Hello All. I am trying to get a mod I'm creating to be compatible with another mod, but load order doesnt seem to matter. It seems their mod overwrites the "contextmenu_en" file, and my functions aren't registered at all in my script. Is their a way to force mine to load through code, or do I change location of the file from server to client or shared? Not sure how i'm going to fix this.

#

I think my code is invalid causing the error, and I think I need to use code injection to solve it, but am not sure the easiest way to do that. Does anyone have any advice? Issue Context: Trying to alter the context menu for Safehouse Claiming, and then run a function from that.

red tiger
#

Guess I'll be up all night.

#

=/

#

I don't think my brain has melted from coding more-so than writing recursive code for discovering relationships for Lua code.

rich reef
#

This is my function, by the way. Running from Events.OnFillWorldObjectContextMenu.Add(Context_safezone)

    for _, opt in pairs(context.options) do
        if opt.name == getText("ContextMenu_SafehouseClaim") then
                    opt.onSelect = ValidateSafehouseClaim
                end            
            break
        end
    end ```

Then some calculation code runs "ValidateSafehouseClaim", and finally runs the actual safehouse claim function from that.

``` function playerSafehouseClaim(worldobjects, square, player)
    local builddef = getPlayer():getSquare():getBuilding():getDef()
    SafeHouse.addSafeHouse(builddef:getX() - 2, builddef:getY() - 2, builddef:getW() + 2*2, builddef:getH() + 2*2, getPlayer():getUsername(), false)
end ```

The issue is that the code from the first function does not even run my "ValidateSafehouseClaim" function, and is bypassed.
slow hound
#

Starting to feel like this might be worth releasing soon. Everything changes color depending on if the range is within acceptable or not. Battery is built in and not replaceable. the chevron indicator on the device itself also gives you a more short term notice of how fast or slow you are gaining/losing weight. also thought it would be fun to know a more exact weight.

I'll take any suggestions or input.

#

open in browser if it looks blurry

rich reef
#

Update to my previous issue:

Upon further inspection, it seems the other mod is overwriting "ContextMenu_EN", but within their file it is only their few translations, which seem to omit the ContextMenu_SafehouseClaim = "Claim Safehouse", translation, which is what my code looks for. Is their a way to fix this? Sorry for the questions, I am desperate in figuring out the nuances of this kind of modding.

slow hound
#

load mod after their mod, replace same file in same directory with vanilla ContextMenu_EN is a simple way if you absolutely need that other mod

outer arch
#

when making a recipe and i want to use water=1, but i would like to allow any close watersource eg. Sink or river. how to i do that?

outer arch
#

recipe Clean Bowls
{
DirtyBowl,
Water=1,

    Result:Bowl,
    Category:Cooking,
   OnGiveXP:Recipe.OnGiveXP.None,
   Time:40.0,
   Sound:EmptyPan,
}
rich reef
# slow hound load mod after their mod, replace same file in same directory with vanilla Conte...

I did just this actually. The ContextMenu_EN is under lua/shared/Translate/EN on both of the mods. When running the function it does the foor loop, but does not cycle through to find the correct Translation to use the If statement with.

    for _, opt in pairs(context.options) do
        if opt.name == getText("ContextMenu_SafehouseClaim") then
                    opt.onSelect = ValidateSafehouseClaim
                end            
            break
        end
    end
slow hound
# outer arch recipe Clean Bowls { DirtyBowl, Water=1, Result:Bow...

this is from ISAddWaterFromItemAction.lua

ISAddWaterFromItemAction = ISBaseTimedAction:derive("ISAddWaterFromItemAction")

function ISAddWaterFromItemAction:isValid()
    return self.itemFrom:isWaterSource() and self.character:getInventory():contains(self.itemFrom) and
        self.objectTo:getObjectIndex() ~= -1 and
        self.objectTo:getWaterAmount() < self.objectTo:getWaterMax()
end
#

isWaterSource seems reasonable

outer arch
#

Thanks, now i just need to figure out how to use that code 🙂

slow hound
#

should look at pz modding wiki

slow hound
raw prawn
#

Perhaps I'm just a super noob but I cannot figure this out, so for custom modelled melee weapons, I'm assuming the origin point is where the characters hand goes right?
I had the origin point on the guard of a katana, and that's where the hand went, cool it thought, I'll just move the origin point to the 3d cursor and all will be well.

Well, I put the fbx back in and it's now just invisible? It seems changing the origin point just yeets the whole model in-game, I'm so confused lol

Sorry for jumping into the discussion here btw

slow hound
#

if you code it yourself no problem, but if you rely on script only for recipe code, then maybe not possible @outer arch

slow hound
outer arch
raw prawn
#

That actually does make sense, I shall give it ago! And if not then I'll jump over to the modeling section, thank you kindly!

slow hound
#

could be a fun way to learn to code it though

#

ISTakeWaterAction.lua seems like it has a vast majority of the inspirational code you'd need to get started @outer arch

outer arch
#

i will look into it

rich reef
#

Gonna pull my hair out over this one.. arghh..

slow hound
#

far from perfect but this should work

#

this is all global too so if you want to really use it in a mod I'd do some small changes. but this should most likely get you off the ground

mellow frigate
mellow frigate
rich reef
#

THANK YOU. This fixed my issues. Oh thank you like no other!

bright fog
coarse sinew
#

I wonder what the difference will be between the original bikinihorst's Blueprints and these two new ones

drifting ore
#

Can someone help me? I would like to know what each of these options in tileproperties.tiles is for

#

If there is already a tutorial or manual on this, please send it to me

drifting ore
#

There are many options in "???"

#

Some options that are used by the game original tiles, like this

#

Does anyone know what these options are for?

#

"FlatTextureOffset = -1"

#

-7 ???

gaunt meteor
#

What is the format for useDelta when creating it through recipes? For e.g. I made a recipe to create base.sugar=1 but this only gives partially used sugar (not completely full)

sonic osprey
sonic osprey
#

Thank u :3

sonic osprey
#

I am making the mod of a drink. There were things that if I interpreted them as a drink and not as a food, they didn't appear as I want them to. So, I treat the drink as a meal and when it is finished the container stays (Water container), which could be refilled again. The problem is that I get an error, the container cannot be refilled.

function: onMouseUp -- file: ISContextMenu.lua line # 90 | Vanilla.
[07-05-24 15:49:24.231] ERROR: General     , 1715089764231> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in onTakeWater at KahluaUtil.fail line:82..
[07-05-24 15:49:24.231] ERROR: General     , 1715089764231> DebugLogStream.printException> Stack trace:.
[07-05-24 15:49:24.232] LOG  : General     , 1715089764232> -----------------------------------------
STACK TRACE```

I talked about it here yesterday and was trying to figure out how to fix it, but no idea
austere sequoia
sonic osprey
#

I'll turn my computer back on and send the file to you

urban plaza
#

haha yeah this graphviz svg is terrible

#

anyone have a better method of doing dependency graphing than jdeps -> dotfile -> graphviz svg? Does intellij give one out of the box or anything

red tiger
#

I'm a bit of a freak though..

#

The UML-like world is very ugly IMO.

#

I'd rather have a clean, presentable and beautified result.

#

I can at least get something somewhat-good-looking in PlantUML but it takes a lot of work. >_>

red tiger
urban plaza
red tiger
#

Do you gradle?

urban plaza
#

I've used it but ignorantly to the actaul extent of the tool

#

I mean its usefulness. which is to say I've used it when following instructions in README.mds and have only looked through documentation to the ends of working with that

red tiger
#

I don't think that anyone can master gradle..

#

It's wild.

#

Especially in kotlin form.

urban plaza
#

lol

#

valid

red tiger
#

I had to write a solution where part of the code is private.

#

It took me 2 days of work to figure out.

#

Was a compile of a project-chain of about like 8 different projects.

#

It's amazing but it's so wieldy.

#

A good thing to know though for the Java industry.

urban plaza
#

I'm not quite sure I follow. Been placing calls through the morning by the privilege of being an american and changing healthcare insurance programs so my brain is kinda shot

red tiger
#

Oh you're fine. I am too. I also am a recovering patient from brain surgery.

#

My insurance passed 30 days 2 days before I went to the hospital and found out my situation.

#

And I'm American.

#

Wild shit.

glossy shore
#

Oof

red tiger
#

Apparently I'm also a rare type of diabetic and found that out there. xD

#

Like America, pls

urban plaza
#

I think what would work in terms of what I'm trying to do, is if I could somehow get jdeps output to get parsed into the jsonl files for jarviz I could do the crazy VR/3D dependency graph interaction stuff with all their neat physics

red tiger
#

Knox county is the least of my concerns lol

red tiger
#

It's rare to see here.

urban plaza
# red tiger My insurance passed 30 days 2 days before I went to the hospital and found out m...

yeah I was without for a few days this past week due to a clerical error (!!) and so I had to, in case anything happened, know the continuing care programs of my then-suddenly-terminated insurance.

as much as the situation was really stressful to deal with I was surprised at how much granularity and like, details there were about courses of actions for any given situation which was nice that it wasn't all FUBAR

#

but I think that was getting lucky with the insurance provider having been a Benefit Corporation.

urban plaza
#

I think it comes from having worked on foss projects and libraries while at diff companies in the past (pre-burnout)

urban plaza
#

god have mercy upon your soul

red tiger
#

I'm writing a library that spreads annotated types in Lua through parsing code.

#

I also just wrote a third-party documentation tool for the same stuff.

#
local _start = 1;
local _end = 10;
local _step = 1;

local function test()
    for i = _start, _end, _step do
        print(i);
    end
    for i = 0.5, 1.0, 0.1 do
        print(i);
    end
end

test();

Turns into

--- @type number
local _start = 1;
--- @type number
local _end = 10;
--- @type number
local _step = 1;

local function test()
    --- @type number
    for i = _start, _end, _step do
        print(i);
    end

    --- @type number
    for i = 0.5, 1.0, 0.1 do
        print(i);
    end
end

test();
#

The human documentation UI looks like:

grizzled sigil
#

i have an idea for a trait mod but idk how to, help?

red tiger
#

He had enough mercy to help me make sense of somewhat proper UI / UX design.

#

xD

#

"enough"

urban plaza
#

yeah but you remind me of the COBOL banking programmers I met when I first started

red tiger
#

I do crazy stuff though. I like these projects..

#

Like the fact that I can use JSX factories in PZ because of the TypeScript environment I wrote a few years ago.

#

xD

#

(Does PZ UI in HTML & CSS)

#

Just ya know.. You have to write a render engine for that from scratch but worth it.

bright fog
red tiger
bright fog
#

👌

red tiger
#

I also put static field entries there.

#

I do both that and the definition with the defined / default values there.

#

This is what Umbrella & Candle uses.

urban plaza
red tiger
#

It's both the web render engine prototype repo and the example mod.

urban plaza
#

🙏

red tiger
#

I'd like to work on this project again, adding radial menus in like how a <select> HTMLSelectElement works.

#

Radial menus gives people a lot of trouble due to the lack of first-party documentation.

#

Since there's no JavaScript engine provided by the game, this is a from-scratch API.

#

Opportunities everywhere.

#

I think what stops anyone from contributing to this project is the simple fact that they'd have to write out the full logic for how CSS rulesets work, or at least emulate them somehow.

#

Now if there were such a simple HTML render engine in there I'd bet that with the right environment for modders people would be writing their UI in HTML rather than the ISUI API that's provided by the game.

#

@urban plaza

urban plaza
#

yessir

red tiger
#

I planned to write it myself eventually.

#

You'll see some of that planned out in the repo.

#

I at least have the color stuff done.

urban plaza
#

radial/rose menus are always so fun but are kinda crazy to do with pure CSS. I felt inspired the other day about ux stuff though and took notes on how I'd implement stuff like the menu-pinning from Warhammer Total War 3 into web stuff

#

but like for actual ux stuff I tend to want to have multiple ways to do the same thing, like, having to wait a second for a pop-up to become static ('menu-pinning' as mentioned) as a little animation goes around the div would potentially be frustratingly limiting if there's not some other way of pinning the interaction (like clicking the thing causing the popup) that's intuitive

#

I tend not to work on these things if I haven't figured out the Norman-Door qualities

urban plaza
red tiger
#

By all means please use the right methods.

urban plaza
#

about that, I feel like a lot of companies/libraries/etc kinda do domain-specific variations so it'd be pretty wise of me to err on the side of investigating first b/c often times it's sort of a chesterton's fence kinda thing

#

domain-specific variations to react and all that. Like there might be reasons why a node application operates differently than a compiled frontend one etc

red tiger
#

I treated that repo as a tech demo / prototype.

urban plaza
#

oh nice

red tiger
#

And I also document my code. Heavily.

#

So understanding the why is not that difficult fortunately.

#

I might look like a COBOL programmer but I don't document like one.

#

If there's anyone I fear, it's the visual basic developers..

#

God help them.

#

They need it.

urban plaza
#

for different reasons and on different terms

red tiger
gaunt meteor
#

how do i make this uh.. spawn in full? O.o

worthy sparrow
#

Anyone dived into getting a list of servers and their description, player count etc?

gaunt meteor
worthy sparrow
#

Yeah, something like that

gaunt meteor
#

why do you need it for modding O-o

worthy sparrow
#

Im a web dev, you can kinda guess why i need it :D

#

oh no, its for „modding”

gaunt meteor
#

ohhh

worthy sparrow
#

I guess steam API might help with that..

gaunt meteor
#

no, zomboid servers are not hosted by steam

#

er but idk the answer to your Q honestly, i just got curious coz it sounds exactly like battlemetrics and that's a voluntary registration which is how i think it should be ^^ gathering a list of people's servers can be intrusive in a way, depends how you approach it

worthy sparrow
#

Well, they are dedicated servers so i only can think of one solution to this, like a scrapper mod that makes a file with all of the data.

#

It’s nothing against ToS and intrusive, just another kind of a metric i want to do for curiosity, like a activity map around the globe

red tiger
#

It'd be wild if someone had a problem with that. A lot of my anti-cheat traffic came from sites that scraped my Steam guides.

worthy sparrow
#

Im patiently waiting for some kind of super basic LuaHTTP library getting supported in pz, the possibilites…

red tiger
worthy sparrow
young pollen
#

Is there a way to know if you are inside a certain building, so for example to know wether you are inside a church?

red tiger
#

Heck if you pitched a few bucks I'd take a couple minutes to give you a basic API in Lua to do HTTP stuff / JSON stuff.

#

xD

worthy sparrow
red tiger
#

I think that the most recent version supports single-player RCON.

#

I did make one but I can't recall releasing that.

#

It was for custom commands.

worthy sparrow
#

Like a actual mod that uses rcon for singleplayer? Or it has to be multiplayer anyway?

red tiger
#

Yeah it worked on singleplayer.

#

Used the same config for MP.

worthy sparrow
#

okay. You got my attention xD

red tiger
#

I work on what people ask of me so if people want this I could work on getting it out so people can use it.

drifting ore
worthy sparrow
#

i will look into it first, havent even thought about using RCON.. if I get stuck or in need of something i can squeeze few bucks for a small help. :)

red tiger
#

Let me check on that project. I have another person whose waited patiently on me to do something with it for him as a commission.

coarse sinew
drifting ore
red tiger
#

It's probably deprecated.

drifting ore
#

Commander said the intention was to define which tiles meant the garage door was open, but that doesn't seem to be the case

#

Does anyone know how to set the open door tile?

gaunt meteor
uneven ore
#

Hey I know its been a while but I Figured it out, I'll probably work on making a Video Tutorial for other modders on how to work with ModData if I can

#

Thanks for helping

gaunt meteor
drifting ore
gaunt meteor
#

in that example, the "open" state of that garage door is 8 tiles away

#

thats why the offset is -8

coarse sinew
drifting ore
gaunt meteor
drifting ore
#

Did the developers never comment on this?

gaunt meteor
#

if its how that image that elyon posted is, its kinda like how making furniture tiles is in the same order (for rotating).. at least thats how it was last time i made a furniture tile

red tiger
#

Might work on this project again soon.

gaunt meteor
# gaunt meteor

would you happen to know how to make a recipe create 1 (whole) item? have this issue currently

red tiger
#

I wouldn't know. I don't write ZedScript. I only wrote the vscode extension. xD

gaunt meteor
#

that is an epic ext too btw

red tiger
#

Thank you. Do you currently use it?

#

I'm thinking about continuing to write the error-detection for it.

gaunt meteor
#

No, but I had no idea it existed xD i recently picked up modding again. ill look for it now 🫡

red tiger
#

Alright. Look up 'ZedScript' in the store. It's free ofc.

#

This is where I stopped on it.

gaunt meteor
#

do you have a group that is collaborating on it?

red tiger
#

No. I'm the only one that works on my projects, with the exception of Umbrella which is a union of three modders.

#

The code is FOSS and hosted on GitHub.

#

This is the syntax highlighting for ZedScript:

#

(Open in Browser)

gaunt meteor
#

i looooove it

#

ive been using html/css as the highlighter on txt files for so long lmao

red tiger
#

🤤

#

The documentation works on items mainly.

#

Also item-categories helps filter what should be used when writing out properties.

#

@gaunt meteor

gaunt meteor
#

ah, whats the hotkey for the context hover? o.o

red tiger
#

I don't know. Doing mouse hovers.

gaunt meteor
#

ohh

#

it was my settings

fading gate
#

Hello modders, I am new to modding and I started only this week. I have one question only.

I started reviewing the codes of other developers to understand how their mod works, so I can create one myself. However, what I don't understand about their scripts is that some items that they're adding to the game has WorldStaticModel or StaticModel and some doesn't.

Which items doesn't need it and which item does? Thank you so much for your answers!

coarse sinew
# gaunt meteor how do i make this uh.. spawn in full? O.o

in .txt file

    recipe Make Sugar
    {
        EmptyJar,
        JarLid,

        Result:Base.Sugar=1,
        Time:100.0,
        NeedToBeLearn: False,
        OnCreate:Recipe.OnCreate.MakeSugar,
        Category:Cooking,
        OnGiveXP:Recipe.OnGiveXP.Cooking10,
    }

in a .lua file in server/

function Recipe.OnCreate.MakeSugar(items, result, player)
    result:setHungChange(-1);
end
thick karma
#

Anyone happen to know how to make a world object unbreakable? One that already exists preferably?

vestal gyro
#

got the model to show up

#

and it doesn't delete the item anymore, does the hood down version need a seperate texture?

#

working now forgot to add a singular "s"

bright fog
#

Those are 2 different models, for reasons

rigid crane
#

I have been looking into making a simple -10 all skills trait, how would I go about doing this?
Tried adding a mod that adds a trait to the game which I modified to give -10 all skills. The .lua worked fine, however soon as i chose 'create player' it ran into the 'file doesn't match the one on the server' error.

flat panther
#

So we made a working claymore-like explosive, but now we need to somehow edit this and a world-placed sprite of something
And we don't know how to open a .pack file and get a sprite from it

bright fog
bright fog
rigid crane
bright fog
abstract cairn
#

im going to go insane

#

WHY DOES IT REFUSE TO UPDATE THE LUA

#

ive restarted, ive pushed to workshop, I've reloaded lua, every file has this change but in game it just doesnt exist.

rigid crane
# bright fog Why set every skills to 0 then ?

Because I was setting all my skills to 0 upon loading into the world, I mainly used traits to get the 'bonus' extra thing like extra foraging distance/slower endurance drain when swinging etc.
I didn't want to start with most/all of my skills @ or near 10, more or less a 'masochist' run, to offset how op some traits were I was using.

bright fog
bright fog
abstract cairn
bright fog
abstract cairn
#

because I know theres like 3 for some reason, one being the workshop one, one being local, and another being local but not used for some reason/just defaults

#

like i go C/Users/Username/Zomboid/Mods/ModName/Media/Lua/Client

#

and its the one that isnt bein used

#

and is like mark 1

#

but then we go
C:\Users\Username\Zomboid\Workshop\Modname\Contents\mods\Modname\media\lua\client

#

and its the one that looks like its bein used

bright fog
#

There's 2 locals, both are used

fading gate
bright fog
#

Just Steam/Workshop is online mods
Zomboid/Workshop is used to upload mods but in fact everyone uses it for modding bcs it allows to use Github easily + you can directly upload and you don't keep a second version in /Workshop if you mod in Zomboid/Mods

bright fog
fading gate
abstract cairn
thick karma
bright fog
#

Both are used, when I started doing mods I made my mods in Zomboid/Mods

#

Then quickly moved over to /Workshop for ease of use

thick karma
#

Doggy is right on this one, Chopie.

#

Just to settle pointless conflict early.

#

So please restate your issue so we can help figure it out.

gaunt meteor
abstract cairn
# thick karma <@468098653559717908> Chopie can you restate your problem? I'm unclear. I see th...

I change some code yeah?
Change isn't being made in the game files when im in the game.

As in, line 140, in game using debug I can read the lua file right it has the old check instead of the new one (old causes errors)
So I go to the files and im like "did I save it?" yes I saved it because when I reopen it it has the change. Every single file. Even pushed it to workshop and the workshop version has it.

Okay then just reload the lua. Reloading the lua doesnt work.
Restarting the game doesnt work.
Restarting the mod doesn't work.

bright fog
bright fog
#

If you are subbed to it

abstract cairn
thick karma
abstract cairn
bright fog
abstract cairn
#

I dont think so

#

but

bright fog
#

If so only keep one of those

abstract cairn
#

i will double check

thick karma
#

Check that.

abstract cairn
#

I do but the one in game that is being used, according to the debugger, is the one that isn't a "hello world" test.

abstract cairn
thick karma
bright fog
abstract cairn
thick karma
#

Do not run the same mod ID in both Zomboid/mods and Zomboid/Workshop

abstract cairn
#

why would having two stop the lua from reloading properly after restarting

bright fog
#

The game fucks up when you have 2 mods with the same IDs and end up fusing both together but keeps only one version of the fiels

thick karma
abstract cairn
#

yeah but thats the thing

#

thats not

thick karma
#

And loads the wrong one

abstract cairn
bright fog
abstract cairn
#

because there is only

#

okay look

bright fog
#

What do you want me to say more

thick karma
#

Slow down

bright fog
#

There's one version of the 2 local versions being used

thick karma
#

It's conceivable that it's not the problem, but only if both versions are identical.

bright fog
#

Some files are being used, some not, it ends up there that the version you modified the files and want to see in use is being overwritten by the second local version

thick karma
#

Is the version of your mod in /mods identical to the one in /Workshop

bright fog
#

So just remove that other mod

thick karma
#

Because otherwise there is extreme likelihood the wrong file is being loaded.

bright fog
#

Only keep a version in Zomboid/Workshop, delete the version in Zomboid/Mods

abstract cairn
#

File A - all the code right? all the code thats being run in the lua. Go to debugger. Thats the code.
File B - the one that I've had there for the past weeks of development that hasn't been moved or changed no issues. Literally a hello world from the first test.
Neither of them have merge conflicts right.
But the best part is even if they did, that doesn't make sense to me because the mod in teh game thats being used is File A. As in I can see File A, and NONE of file B. Even if File B IS conflicting, it's still not updating File A in the game properly. It's pulling out this old verison which literally does not exist on my computer anymore. As in the changes I've made to file A are NOT being propagated into the game.

thick karma
gaunt meteor
#

i have to agree, i am working on over 8 mods in /workshop and have 0 in /mods

abstract cairn
bright fog
#

I swear I will break my desk in two if you don't understand for the fifth time that mods with the same ids in mods.info will have their files all mixed together

abstract cairn
#

and i have

bright fog
#

Just delete one of the two

#

That's it

abstract cairn
#

the thing is, I dont care if the hello world gets added, which it isnt for some reason

#

its the fact that its not saving the changes

#

that shouldnt impact the way the game reads the file because the file has changed

gaunt meteor
#

one takes precedence over the other

abstract cairn
#

yes

#

and the one that has precedence is updated

#

but in game

#

its not updated

gaunt meteor
#

you might think its taking precedence when its not? try deleting one and see if it works

bronze yoke
#

just don't give yourself this entire precedence headache

abstract cairn
#

but

#

im gonna go insane

bright fog
#

Nah mate fuck this shit, I let you guys handle him

abstract cairn
#

the precedence is not what im talking about

bright fog
#

Just fucking delete one of the two versions

abstract cairn
#

thats not the problem here

#

its that the game

#

its not reloading the lua

#

even through restart

#

even through disabling and re-enabling

bronze yoke
#

that's not possible, there is an unmodified version somewhere that it is loading

abstract cairn
#

im about to restart my entire PC and see if that fixes it

abstract cairn
#

there is none

bright fog
bronze yoke
#

the game has absolutely no mechanism to cache lua files

abstract cairn
#

THATS WHY IM SO CONFUSED

thick karma
abstract cairn
#

HOW

#

IS IT DOING THAT

gaunt meteor
#

is it possible you uploaded your mod to the steam workshop, then deleted it?

#

off the workshop.

abstract cairn
#

and to my knowledge local takes over when on singleplayer

bright fog
abstract cairn
#

i am in game, in debug menu, looking at the lua file. I have reloaded it, and restarted, and refreshed, and reneabled.

#

This is what the ingame file says.

#

This is what the in game file does.

bright fog
abstract cairn
#

this is the saved file. as in this is the file I have saved. that it should be reading from.

gaunt meteor
#

i had an issue a long time ago - i still had a mod folder from a workshop mod even though i unsubbed. the folder being the modID number and hard to locate if not looking for it in the right place. if you ever uploaded your mod to steam workshop, and then unsubbed or deleted w/e, its possible its still in your pc. (not saying this is the issue specifically but just an example)

abstract cairn
#

even if

#

for some reason

#

it downloads the workshop one

#

I have updated my local changes

#

to the workshop one

#

meaning

#

it is updated

#

(and it was)

#

to this one

thick karma
#

At that line number.

abstract cairn
#

I already sent this in the original confusion/question

thick karma
#

The same file in /mods is literally just 28 lines?

abstract cairn
#

y e s

#

and its nowhere to be found in the debug menu in lua

thick karma
#

Okay. I am not saying this will solve your problem. I concede that it may not. But can I just ask why you have such a trivial and unrelated version of your mod in /mods?

#

@abstract cairn

bright fog
#

And delete that god damn version in /Mods even if it supposedly doesn't seem to be the source of the issue, you have no point in keeping it

abstract cairn
thick karma
#

Then it's a nonissue here.

#

In mod.info.

#

just fix that.

#

Then you can run the code one more time without two mods with the same id knowingly loaded in two separate places, try it once, and settle poor Doggy's anxiety at the very least, even if it doesn't fix your problem.

#

😉

#

If it still doesn't work with the name and mod id of the /mods version changed, that will tell us where not to look.

#

@abstract cairn To be clear, there are only 4 places that I know of to check for mods, and as far as I know only 3 are relevant to single player:

  1. %UserProfile%/Zomboid/mods/
  2. %UserProfile%/Zomboid/Workshop/
  3. Steam/steamapps/workshop/content/108600/
  4. Steam/steamapps/common/ProjectZomboid/steamapps/workshop/content/108600/
#

The 4th one to my knowledge is used for coop hosting only

#

But maybe we use it to connect as well.

#

I don't know, I coop host 99% of the time I touch Zomboid

#

albion will correct me if I'm wrong.

#

😎

bronze yoke
#

yeah it's only used by the co-op server process

thick karma
#

❤️

#

So, then, yes, for your purposes in SP, only 1, 2, or 3. @abstract cairn

bronze yoke
#

if you've seen people get file mismatches connecting to themselves in co-op that's why

thick karma
#

Oh right of course.

#

That makes sense.

#

Click.

#

@abstract cairn Point being, if you have a filename that is loading valid Lua code in a properly installed mod, it's coming from one of those three places, and if you change the code in that file in one of those three places and do not see the change in-game, then that's not the place it's coming from.

#

And if you follow this simple logic you will become unconfused.

abstract cairn
grizzled fulcrum
#

nice info

echo lark
#

if you remove a mod from a server, does the moddata get wiped? or does it persist, specifically player mod data

bronze yoke
#

it persists

#

mod data is just a table, it doesn't know where any part of it came from

echo lark
#

is there a way to wipe that?

bronze yoke
#

you can check for and remove it with an oncreateplayer handler

echo lark
abstract cairn
#

so does anyone know why the IsoPlayer hashitreaction is inconsistent when zombies attack you? (to my knowledge they always react to getting hit..?)
Still going to use it because i dont see a better alternative, just asking.

rich reef
rich reef
# abstract cairn i restarted my game a second time and it worked. I changed literally nothing. th...

From what I've seen, sometimes Java/Garbage Collection has memory leaks, and doesn't delete instances of files. Their could be a rare possibility that when you reload the game, the reference is still active to an old file with the same name in memory. I have sort of experienced this happening before, at least that's what it seemed to be, when I had a java hiccup and kept trying to restart>reload, and nothing seemed to fix it until I did a system restart, or memory trim, etc. Just an idea to ponder

bright fog
red tiger
#

Search ZedScript

bright fog
#

👌

#

Nice that's cool

#

Never heard about it before

verbal yew
#

@thick karma, bro, i need your help with decoration (again, yep...)

abstract cairn
#

how do I make a perk give a negative XP boost

slow hound
#

if you want to add or subtract xp is something like getXP():AddXP(Perks.Fishing, -1)
if you want to remove or add levels of certain perks. i think it's AddXPBoost(Perks.Woodwork, -1)

#

pretty much anything you'd want to know about how that works is in the MainCreationMethods.lua file

#

you can find the references in the class files themselves also

glossy shore
#

Is there a download or something for the vanilla game media folder files? I forgot to throw them in a private repo so I can always access them anywhere I go

vestal gyro
#

Can't you just browse local files (through steam) and copy and paste the folder

glossy shore
#

Else I would've indeed done that instead

vestal gyro
#

Ah, no not that I am aware of

#

Would certainly be a good idea to upload it to github or smth

glossy shore
vestal gyro
#

If someone else doesn't do it first I could do that this afternoon

glossy shore
#

Friend of mine is grabbing the files for me as we speak so I could also throw it in a repo within the hour probably

#

I was lucky enough he was still awake (other side of the world so yea)

thick karma
verbal yew
# thick karma What do you need to decorate

vanilla:

function Recipe.OnCreate.CutAnimal(items, result, player)
    local anim = nil;
    for i=0,items:size() - 1 do
        if instanceof(items:get(i), "Food") then
            anim = items:get(i);
            break;
        end
    end
    if anim then
        local new_hunger = anim:getHungChange() * 1.05;
        if(new_hunger < -100) then
            new_hunger = -100;
        end
        result:setBaseHunger(new_hunger);
        result:setHungChange(new_hunger);

        result:setCustomWeight(true);
        result:setWeight(anim:getWeight() * 0.7);
        result:setActualWeight(anim:getActualWeight() * 0.7);

        result:setLipids(anim:getLipids() * 0.75);
        result:setProteins(anim:getProteins() * 0.75);
        result:setCalories(anim:getCalories() * 0.75);
        result:setCarbohydrates(anim:getCarbohydrates() * 0.75);
    end
end
#

need put this:

local zBoneCounter = math.floor(anim:getActualWeight() + 0.5)
if zBoneCounter > 0 then
 player:getInventory():AddItems("Base.zReHCM_Bones", zBoneCounter)
end
thick karma
#

It looks like you're giving people bones when they cut up animals

thick karma
#

But the number of bones you give is based on the weight of a food item the animal drops?

verbal yew
#

yep yep

thick karma
#

Gimme a minute to open my pc

#

@verbal yew

local YourModule = {}

YourModule.originalCutAnimal = Recipe.OnCreate.CutAnimal

function Recipe.OnCreate.CutAnimal(items, result, player)
    YourModule.originalCutAnimal(items, result, player)
    local anim = nil;
    for i=0,items:size() - 1 do
        if instanceof(items:get(i), "Food") then
            anim = items:get(i);
            break;
        end
    end
    if anim then
        local zBoneCounter = math.floor(anim:getActualWeight() + 0.5)
        if zBoneCounter > 0 then
            player:getInventory():AddItems("Base.zReHCM_Bones", zBoneCounter)
        end
    end
end
#

@verbal yew Make sure this code is in server, because that's where Recipe gets created.

wraith hemlock
#

Hi I'm trying to make a weapon use a different set of animations than the base animation for for 2Handed which appears to be Bat.

Basically my problem is that the swing animations are limiting the speed that my character can swing their weapon. This can be solved with a sledgehammer approach of just installing a global faster animation speed mod, but that would affect all of the weapons.

What I am trying to do is basically just use the animations that already exist for Bat "SwingAnim = Bat" for example, but make a new tag that can be used, then have that tag be called for a unique set of anims.

#

The animations can just be a modified version of the basegame, just with their speed tweaked to allow for faster swings on weapons that use that tag. The problem is, I can't figure out how the game is calling for AnimStates, like, there doesn't seem to be a reference to "Bat", the game just kind of recognizes that "Bat" means use "2Handed".

#

MinimumSwingTime and SwingTime don't seem to have any effect in game, the fastest speed a weapon can swing seems to be related to the animations themselves.

#

The ideal solution is figuring out how to make a tag like:
SwingAnim = Fast2Handed,

And have that then use the custom AnimSets.

thick karma
#

Idr if it can be adjusted on primary attacks but this came up when dhert was working on timing of secondary attacks in Brutal Handwork (which adds dual wielding of blades and blunts, and hand-2-hand boxing attacks).

#

But when you 0 it we can attack much faster

wraith hemlock
#

I set MinimumSwingTime = 0.1
And SwingTime = 0.2
BaseSpeed = 20

None of those made any difference to swing speeds, or rather, none of them broke the usual swing speed cap.

#

Or do you mean changing the AnimSets?

thick karma
#

I recommend you review Brutal Handwork. He did a lot of work on attack speed matching and I expect the right fields and functions will get referenced throughout that mod when he deals with left hand attacks

echo lark
#

so i asked this question last night then looked into it and realised i do not know enough about mod data to even begin attempting it, so im hoping someone already has the code, does anyone know how to wipe a specific mods player moddata after removing that mod to clear that table? ive looked on the workshop and searched here in the discord and found nothing

#

basically we wana remove Autoloot cuz the table for the player moddata is like every item in game, but if we remove the mod the moddata will persist which probably wont fix our issue

neon bronze
#

You could take the entry for the whole Autoloot and then assign nil to it

#

Assuming it goes AutoLoot.itemName

#

Then you just do AutoLoot = nil

#

That should wipe the entry

echo lark
# neon bronze Assuming it goes AutoLoot.itemName

yeah thats what i was thinking, but my knowledge of lua if very limited, ive only started like 2 months ago and only have written successful code with the help from people here, and ive never touched mod data before and am unsure how badly i can mess things up if i screw up

neon bronze
#

Doubt you can really break the fabric of reality by messing up moddata

#

I mean if you remove the mod from the server new players joining wont have the entries

fleet bridge
#

unless you're wiping the global mod data table, it probably won't do anything terrible

neon bronze
#

Yea if its in tbe global moddata then you gotta be careful

#

If its player moddata then you wont have nig repurcussions by messing up

fleet bridge
#

if you're writing to the global mod data table, make sure you unique names so you don't overwrite an existing key

echo lark
echo lark
#

thats the auto loots player moddata. its literally 95% of the moddata list XD

#

and thats on a test server, where i have never used auto loot. so its that large by default

fleet bridge
#

player mod data is stored on the player object, when player dies all that stuff will go away so if you're using player object to store something that you want to persist you might run into issues

#

but everything would be contained to that player so it should be ok

echo lark
#

but if it goes away on death, then that would solve the majority of the issue

#

not many people live forever on PZ

fleet bridge
#

not familiar with the mod, i guess it automatically hoovers up items based on a table thats written to player mod data?

echo lark
#

and the issue occurs when we get like 15+ people online, or during events, when people start vaccuming up all the loot from dead zombies i assume

candid grotto
#

Hello, can anyone guide me on how to create a mod for the project zomboid?

fleet bridge
echo lark
# fleet bridge does the table change often?

probably only when people configure their auto loot settings to set items to true or false or something. i honestly dont know, kind of dislike the mod so ive never used it/configured it.

candid grotto
fleet bridge
echo lark
fleet bridge
#

the autoloot table needs to be indexed if there are a lot of entries

#

if the table is presumably large, it might just simply be crawling through the entire table each time you're next to an item

#

each time you're next to a container it's probably checking each item through the entire table, if you're on a pile of corpses it's probably checking the entire autoloot table hundreds of times

echo lark
fleet bridge
#

based on what you say is happening, its definitely not

echo lark
#

eveyrthing ive learned about lua coding is what i learned to achive the goals i wanted. everything else is a mystery to me

fleet bridge
#

its just checking the table for each item

wraith hemlock
echo lark
#

well i guess step 1 is removing the mod and hoping the issue goes away, and if not ill look into removing moddata with lua code.

mellow frigate
mellow frigate
fleet bridge
#

pretty sure server side, since you can wipe pz and fresh reinstall and still load in your MP char

mellow frigate
bronze yoke
#

the player object is saved to the data blob in the server-side player database

mellow frigate
bronze yoke
#

i don't know, i think it's done both periodically and when the player disconnects or the server closes

#

i don't know how player mod data gets saved, it isn't usually available on the server

red tiger
#

@urban plaza I think I spoke to you about my twitch commands.. might've been someone else. I lost the code for the client-side RCON support so I'm going to re-implement it.

#

Single-player RCON support for custom commands.

mellow frigate
#

anyone know how to get the closed door texture for a specific door (any between IsoThumpable and IsoDoor) from lua ?

mellow frigate
bright fog
#

Aaaah I see what you mean

#

Good question, I've worked on Thumpable and IsoDoors before but wasn't linked to textures

mellow frigate
#

when the door is closed, I have access to current sprite (closed) and open sprite (open)

bright fog
#

Tried IsoDoor:getTextureName() ?

mellow frigate
#

when the door is open, I have access to current sprite (open) and open sprite (open). not to the closed one

bright fog
#

hmm

#

that's fucked up, perhaps close the door before copying it ?

#

No idea if possible however

mellow frigate
bright fog
#

Understandable

bright fog
#

You could even copy the open state and apply it later down the line

#

When pasting

#

That would not be seen by the players since it's so fast

if IsoDoor:isOpened() then
    IsoDoor:ToggleDoor(IsoGameCharacter)
    --get sprites
    IsoDoor:ToggleDoor(IsoGameCharacter)
end
mellow frigate
#

ToggleDoorSilent()

bright fog
#

True, didn't see that

#

That's even better

#

That way that doesn't break the ears of everyone when copying xD

coarse sinew
#

for an IsoThumpable door the open sprite is the northSprite

mellow frigate
bright fog
#

Perhaps

#

Would have to check where it's used

mellow frigate
mellow frigate
bright fog
#

Nice

#

Yeah you could even make sure doors copy in the state they are, that would be cool

#

So open the door if it was tagged as open when copying it

#

Even an option for admins to copy doors in the state that they are in idk

#

You do your things

flat panther
#

But it blows up on the spot where it's actually placed

coarse sinew
bright fog
#

Now that I think about it lol

#

Why make it a tile ?

flat panther
#

though I don't think he made it a tile in the first place

bright fog
#

Well that's not a placed item here, that's a tile

#

No ?

#

Oh no it's not a tile

#

It's just not a 3D item

flat panther
#

Wait, so how do you make a 3D claymore work as a sensor mine?

bright fog
#

I'm not entirely sure but if you can get the rotation of the object placed then you're good to go

flat panther
#

What kind of rotation do you mean?

mellow frigate
bright fog
#

Placing a 3D item

deft star
#

How to fix it ?

#

Translation to UA

flat panther
# flat panther

So yeah, it was like this from the beginning, and the 3D model was the first thing my friend made because he had hoped it could work when the claymore is placed as a trap

dry ore
#

Hey does anyone know any modders taking commissions for clothing mods right now? Or a proper discord to ask this question in

deft star
flat panther
# deft star

Try using the KOI8-U/RFC 2319 encoding if it exists

#

And pasting the original text back to the script

bright fog
# flat panther

Bro I can't read your language, what action did you do ? Drop ?

flat panther
#

First he tried placing it down as an item, then he planted it as a bomb

#

The model doesn't show up in the latter case

flat panther
#

Plus, the placement is wrong for some reason

bright fog
#

That's a modded option

mellow frigate
# flat panther guess not

I mean use the same reference square but click it once with min zoom and once with max zoom :). once placed zoom has no effect.

red tiger
#

Good afternoon.

bright fog
#

AAAAAAAAA

bright fog
deft star
flat panther
deft star
bright fog
#

Tiles are absolutely not the same thing than items

flat panther
#

I am not sure myself what he's trying to achieve by editing tiles

bright fog
#

Also you can't rotate tiles

#

So your claymore will always point towards the same direction

#

Which is why I asked why you're using tiles instead of placing the item and just detecting where your claymore is pointing towards

#

If it was a simple mine, a tile would do the trick, but in your case it's a directional detection explosive

#

Also if your friend needs specific help it would probably better for him to be here with us

flat panther
#

He is here but he wants me to ask here for him

bright fog
flat panther
#

'Cause he's so confused rn

bright fog
#

Tiles ARE NOT items

#

THEY ARE NOT THE SAME THING

#

And they are not created the same way AT ALL

#

Tiles are defined in tile packs

#

Items are scripts which link to models if the item has one with stats etc

flat panther
#

The only issue with this right now is that it doesn't appear right under the character as it should when it's placed down as a trap

deft star
verbal yew
flat panther
manic magnet
#

Did someone ping me? On mobile, got a notification, but can't seem to tell...

thick karma
#

Bottom of screen

#

Only good thing about latest Discord updates

bright fog
#

That was already a thing before

manic magnet
#

Weird. I don't see anything. 🤣

bright fog
#

That has been a thing for over a year at a minimum

thick karma
#

When I say latest I mean it very loosely

#

I mean since all the updates began in the last 2 years to send Discord down the shitter

#

The one good thing is that immediate access to all notifications

bright fog
#

lol

thick karma
#

Everything else is garbage

#

Ever since they added that bottom panel Discord has been laggier lol but at least I don't have to find what notified me manually

wraith hemlock
#

Does the runspeed modifier on clothes just not work or something?

wraith hemlock
#

Nice.

#

I've figured out that Spears call for stuff like SpearDefault to be used and SpearMiss on misses, bats are using 2HMiss and 2H anims, when set to SwingAnim bat or spear. I can see the knife anims as well, all good. Can't tell why they are using those anims though.

#

The .xml doesn't specify clearly that something's listening for 'bat' for example.

#
        <m_Name>Weapon</m_Name>
        <m_Type>STRING</m_Type>
        <m_StringValue>spear</m_StringValue>
    </m_Conditions>``` I assume its related to this.
#

I'll try setting m_StringValue to something unique and testing if it uses a different animset.

bright fog
#

You can set it to something unique yes

#

To make custom weapon animations

wraith hemlock
#
        <m_Name>Weapon</m_Name>
        <m_Type>STRING</m_Type>
        <m_StringValue>2handed</m_StringValue>
    </m_Conditions>``` This is for every weapon that uses the Bat SwingAnim, so I assume that the game is just parsing 'Bat' as 2handed and it is just stumping me where that's happening.
bright fog
#

Or overall custom animations

bright fog
wraith hemlock
#

That's the thing, Crowbars use SwingAnim = Bat for example.

#

There's no unique anims for every weapon, its just broadly understood as "Bat means you are using the 2Handed anims for bat swings".

#

Even katanas.

#

The only unique animations are ones for one handed weapons, 2-handed, spears, knives, and for shoves.

#

oh yeah and heavy

#

TwoHandWeapon = TRUE for bat types and for sledgehammers, but they use different animsets due to the SwingAnim defined for them in their script (as far as I can tell).

#

Anyway lets just mess around and find out.

runic siren
#

heyoo

i'm hoping to commission someone for a QoL mod that affects sprinter audio?

runic siren
#

oh, i can't see that chat

bright fog
#

Click on it

#

It will actually make you go to it

runic siren
#

🙏

rain shard
#

Is there even a way to set a 'cooldown' of sorts if someone uses the context menu? I have an action settled in the context menu that lets people TP but I'd like to implement a cooldown.

#

No idea if that's even possible if it's not a timed action.

wraith hemlock
#

It turns out that changing 2Handed to 'katana' actually does affect all 2Handed weapons and breaks them, and the file doesn't read katana from the weapon script when it is set to SwingAnim, alright, so I've debunked myself, but not figured out what is causing some weapons to use the weapon anims that they do.

hollow current
# rain shard No idea if that's even possible if it's not a timed action.

Store the time the timed action was last used using getTimestamp(), and next time the context menu is used, get the current timestamp and subtract the stored one from it. If more than the cool down, then make the option available, otherwise, make it unavailable, and store the current timestamp again

rain shard
hollow current
#
--psuedocode
function onCreateContextMenu()
    local option = createOption("optionText", onClick)
    local cooldown = 5
    local lastUse = myMod.lastUse or 0
    local currentTime = getTimestamp()
    if currentTime-lastUse < cooldown then
        option.notAvailable = true
    end
end

local function onClick()
    myMod.lastUse = getTimestamp()
end```
rain shard
#

Very much appreciated, thank you!

hollow current
#

My pleasure!

empty flame
#

Hi everyone we are looking for modders/scripters who want to help us in our project, we can provide machines for testing and more.

bright fog
bright fog
#

np dw

azure pilot
#

I'm looking through the code for Zomboid, and am a bit horrified to see that Traits/Skills don't have a table defining their properties, but rather that these are broadly "added" to the player (with no immediate impact), and ad-hoc addressed in a hard-coded approach per function. For example:

"Resilient" trait is defined in MainCreationMethods.lua
TraitFactory.addTrait("Resilient", getText("UI_trait_resilient"), 4, getText("UI_trait_resilientdesc"), false);

However, the actual implication of that is all over the place. In BodyDamage.java, it's listed individually in pickMortalityDuration(), updateWetness(), and updateCold() for those respective features.

Has this been poked at? I recognize there are different coding styles, but this vastly inhibits maintenance & expansion. I'm new to modding in PZ, so I'd love to hear from other modders to see if I'm understanding the issue correctly, and perhaps if there are solutions already in place to hurdle this.

bright fog
#

welp

#

It sure isn't ideal but I can understand why that was done

#

The idea was just to have various tags on the player, which is great

#

And you can check for that tag at any time in your code to have effects differ

#

Like add a multiplier to damage taken or time to heal, to the time to build perhaps depending on your trait and shit like that

#

It can be more problematic for more specific things but I don't that's a trait system issue, just a PZ problem lol

azure pilot
#

I want to suggest to the developers another way, but I also realize that may undesirable feedback. Are they open to suggestions? I’d love to put together a coded alternative, if they’re receptive to that kind of thing.

abstract cairn
bright fog
#

Best way to suggest a profesional thing like is probably to email them if actually want to make that a serious thing

#

But even then, I suggest explaining your idea here so we can help you judge if that would actually be a better system

azure pilot
#

Fair enough. Filter it by consensus, before submitting it for serious consideration.

thick karma
#

You're welcome to get feedback here first but I think it's clearly fair enough and the question is not whether it has value or whether they'll understand it, but whether they have time to implement it in the context of doing everything else they have planned.

thick karma
#

@azure pilot Might also be worth exploring the forums or the Thursdoids to make sure your dream isn't already in the works behind the scenes for Build 42.

azure pilot
#

“Thursdoids”?

thick karma
#

They blog news about their work on Thursdays and call said blog posts Thursdoids

wraith hemlock
#

Does anyone know what lua file (if any) is being used when we do a melee attack?

thick karma
#

Depending on your goal you might consider an event like OnHitZombie.

wraith hemlock
#

Just like how using a weapon with SwingAnim = Spear, would use the SpearDefault.

abstract cairn
bright fog
#

Hmm I sort of use timed action, I mean basically what Susceptible did

wraith hemlock
#

Does anyone know why some sounds work for weapons and others don't? They're both ogg files, they're in the correct place, they're mentioned in the mod's sound file scripts, and they're called by the item.

#

Some of my items have working sounds already, and there doesn't seem to be much difference. Does the game not like some .oggs?

bright fog
#

I have no idea sry

slow hound
#

IsWashYourself is a great example since it's something you use often in game normally

abstract cairn
#

Could I use HaloTextHelper to display a custom client side message above the characters head?
If not how could I achieve this?

azure pilot
wraith hemlock
#

Bitrate is 1536 on the files that aren't liked, both ogg, exported in audacity.

#

Thing is one of the sounds that does play is 1536 bitrate, and also the game seems to actually play the sounds, they just aren't heard in the game.

#

Using debugger reveals its calling those sounds just fine, just no sound plays.

azure pilot
#

Perhaps if you run a normalize amplitude pass on your audio? That'd ensure they're both authored at a consistent volume.

wraith hemlock
#

I got them to play, but the game only accepted it by referencing the ogg file directly. Whilst this lets me play single clips, it seems like playing them as a category is broken for some reason?

#

At least the nokia is working fine.

#

    {
        category = Object,
        clip
        {
            file = media/sound/nokia_1.ogg,
            
        }
        clip
        {
            file = media/sound/nokia_2.ogg,

        }
        clip
        {
            file = media/sound/nokia_3.ogg,

        }    
    }

        sound 3310HammerSwingSounds

    {
        category = Object,
        clip
        {
            file = media/sound/nokia_4.ogg,
         
        }
        clip
        {
            file = media/sound/nokia_5.ogg,
            
        }
    }    
``` Works fine.
#
    
    {
        category = Object,
        clip
        {
           file = DemonHit.ogg,
        }
        clip
        {
           file = DemonHit2.ogg,
        }
        
    }``` No dice.
lunar ermine
#

anyone know how to handle THashMap from java in the lua part? if i print it it looks like this:
{GunCache2=zombie.inventory.ItemPickerJava$ItemPickerRoom@5292a23d, GunCache1=zombie.inventory.ItemPickerJava$ItemPickerRoom@587860a7, cafekitchen=zombie.inventory.ItemPickerJava$ItemPickerRoom@570f931b, hairdresser=zombie.inventory.ItemPickerJava$ItemPickerRoom@76616484, picnic=zombie.inventory.ItemPickerJava$ItemPickerRoom@31a5a33f, spiffosstorage=zombie.inventory.ItemPickerJava$ItemPickerRoom@2ac380f4, grocerystorage=zombie.inventory.ItemPickerJava$ItemPickerRoom@17f59fc, controlroom=zombie.inventory.ItemPickerJava$ItemPickerRoom@7c475813, donut_kitchenstorage=zombie.inventory.ItemPickerJava$ItemPickerRoom@60e7b0ff, ToolsCache1=zombie.inventory.ItemPickerJava$ItemPickerRoom@56155837, fishchipskitchen=zombie.inventory.ItemPickerJava$ItemPickerRoom@2d5e5bb0, jewelrystore=zombie.inventory.ItemPickerJava$ItemPickerRoom@6b9f09c8, clothesstore=zombie.inventory.ItemPickerJava$ItemPickerRoom@36a23c0c, medicaloffice=zombie.inventory.ItemPickerJava$ItemPickerRoom@4a8a1e0f, classroom=zombie.inventory.ItemPickerJava$ItemPickerRoom@15564f35}

 local test = room[1];
 print(test);``` 
and this gives me the error attempted index: 1.0 of non-table:
bright fog
#

Check its type

lunar ermine
#

print(type(room)); gives me 1715226651746>userdata

#

its a THashMap atleast in java

abstract cairn
#

why is there no PlayerDamageType for fire damage or for generator/gas damage?

bronze yoke
#

either they fall under another damage type or the event doesn't trigger for them at all

#

the event was added very close to the time the game stopped receiving updates, and the vanilla game doesn't use it whatsoever, so it's more likely to have omissions like that

verbal yew
#

Guys, time in recipe - it's ingame sec?

drifting ore
#

Hi guys, is anyone able to help me out? ive had this issue with my weapons for my mod being invisable ingame and i cant seem to fix it no matter what i do. ive come close a few times but no luck.
the models have been created by myself so im worried i have done something wrong with the models or the textures

#

i have no idea what is causing them to show up as invisible and its driving me a bit nuts

ornate sand
drifting ore
#

i do

#

would you like me to send you the mod?

hollow lodge
#

I just found this on the lua translation files

#

this doesn't affect real coding, does it?

#

It just add lines of text on items

ivory gyro
#

hey tis, can you release b42 tomorrow ? please

bright fog
hollow lodge
#

I'm revamping the boots and clothes expanded mod, and I wonder if I should delete the bomber jackets in it, since it conflicts with those from spongie jackets

#

I really want to make the mod more enjoyable and more compatible, but leave it as untouched as possible

#

any suggestions?

bright fog
#

My guess is it's the kind of mod that people who download it will also download Spongie's jackets

#

So yeah if you can make both compatible, probably go for it

hollow lodge
#

yeah I was doubting on it, but the mod has other strengths on it, like the shoes which is the main theme

#

it has other cool accesories too!

bright fog
#

Yeah

wraith hemlock
#

So I noticed that the animNode for weapons has a variable "CombatSpeed". The animations that follow have set scales, though. Would setting those to "CombatSpeed" allow combat speed modifiers to actually function?

hollow lodge
#

isn't is coded as combatspeedmodifier?

#

or that is just for clothes

wraith hemlock
#
    <m_Name>2HDefault</m_Name>
    <m_AnimName>Bob_AttackBat01_Hit</m_AnimName>
    <m_Priority>4</m_Priority>
    <m_deferredBoneAxis>Y</m_deferredBoneAxis>
    <m_Looped>false</m_Looped>
    <m_EarlyTransitionOut>true</m_EarlyTransitionOut>
    <m_SpeedScale>CombatSpeed</m_SpeedScale>
    <m_BlendTime>0.15</m_BlendTime>
    <m_BlendOutTime>0.25</m_BlendOutTime>
    <m_Scalar>AttackVariationX</m_Scalar>
    <m_Scalar2>AttackVariationY</m_Scalar2>
    <m_Conditions>
        <m_Name>Weapon</m_Name>
        <m_Type>STRING</m_Type>
        <m_StringValue>2handed</m_StringValue>
    </m_Conditions>
    <m_Conditions>
        <m_Name>AimFloorAnim</m_Name>
        <m_Type>BOOL</m_Type>
        <m_BoolValue>false</m_BoolValue>
    </m_Conditions>
    <m_2DBlends referenceID="1">
        <m_AnimName>Bob_AttackBat01_Hit</m_AnimName>
        <m_XPos>0.00</m_XPos>
        <m_YPos>0.00</m_YPos>
        <m_SpeedScale>0.80</m_SpeedScale>
    </m_2DBlends>``` example from 2HDefault.xml
#

It is implied that it takes into account combat speed (from somewhere) but the animations have fixed scales?

urban plaza
#

@red tiger are you getting the support for JSX (<element>/*stuff*/</element>) syntax via the @types/react library?

doing a bit of a dive into your code & I want to make sure I'm barking up the right tree

red tiger
#

I'd like to work on this project again.

urban plaza
#

this being PipeWrench-UI? yeah it seems neat as hell. I'm just trying to make sure I grok it more before giving suggestions about bringing more of react's design functionality over or discussing that sort of thing

#

so that I'm not just like, completely unhinged

#

@red tiger above is for u

bright fog
red tiger
#

What you're suggesting makes a lot of sense to implement.

wraith hemlock
bright fog
wraith hemlock
bright fog
#

Perhaps those scalar link to it

#

And then changes animation based on it idk

red tiger
#

@urban plaza Are you considering possibly contributing to this project?

urban plaza
slow hound
# wraith hemlock What does this have to do with combat speed?

have you attempted to look through DHERTS code to understand how he did this? i'm pretty sure he had to build it from scratch for the alternate hand based off the main hand. i'm almost certain all your answers are within that code for understand at least

urban plaza
#

I just know a lot of the magic occurs during the transpilation step

hollow lodge
#

any idea on it?

wraith hemlock
red tiger
slow hound
slow hound
slow hound
#

don't quote me but thats how it looks

gray void
#

hello everybody im new to modding and im having some issues with adding a recipe. its just a simple food recipe using vanilla items but for some reason the recipe doesn't pop up in the recipe tab. are they any common issues a new modder might run into here? my code is a 1 for 1 refrenced from another mod just sourcing the items im in need of.

slow hound
#

paste the recipe script

#

if its large just upload the file to discord

gray void
#

module base
{
recipe Make Pancake Mix
{
Flour,
BakingSoda,
Sugar,

        Result:PancakeMix,
        Time:20.0,
        Category:Cooking,
        OnGiveXP:Recipe.OnGiveXP.Cooking3,
    }

}

slow hound
#

not sure if you looked at that

#

calculateCombatSpeed()

#

that shows how it breaks down overall

#

what's considered when creating the combat speed

#
protected float calculateCombatSpeed() {
      boolean var1 = true;
      float var2 = 1.0F;
      HandWeapon var3 = null;
      if (this.getPrimaryHandItem() != null && this.getPrimaryHandItem() instanceof HandWeapon) {
         var3 = (HandWeapon)this.getPrimaryHandItem();
         var2 *= ((HandWeapon)this.getPrimaryHandItem()).getBaseSpeed();
      }

      WeaponType var4 = WeaponType.getWeaponType(this);
      if (var3 != null && var3.isTwoHandWeapon() && this.getSecondaryHandItem() != var3) {
         var2 *= 0.77F;
      }

      if (var3 != null && this.Traits.Axeman.isSet() && var3.getCategories().contains("Axe")) {
         var2 *= this.getChopTreeSpeed();
         var1 = false;
      }

      var2 -= (float)this.getMoodles().getMoodleLevel(MoodleType.Endurance) * 0.07F;
      var2 -= (float)this.getMoodles().getMoodleLevel(MoodleType.HeavyLoad) * 0.07F;
      var2 += (float)this.getWeaponLevel() * 0.03F;
      var2 += (float)this.getPerkLevel(PerkFactory.Perks.Fitness) * 0.02F;
      if (this.getSecondaryHandItem() != null && this.getSecondaryHandItem() instanceof InventoryContainer) {
         var2 *= 0.95F;
      }

      var2 *= Rand.Next(1.1F, 1.2F);
      var2 *= this.combatSpeedModifier;
      var2 *= this.getArmsInjurySpeedModifier();
      if (this.getBodyDamage() != null && this.getBodyDamage().getThermoregulator() != null) {
         var2 *= this.getBodyDamage().getThermoregulator().getCombatModifier();
      }

      var2 = Math.min(1.6F, var2);
      var2 = Math.max(0.8F, var2);
      if (var3 != null && var3.isTwoHandWeapon() && var4.type.equalsIgnoreCase("heavy")) {
         var2 *= 1.2F;
      }

      return var2 * (var1 ? GameTime.getAnimSpeedFix() : 1.0F);
   }
red tiger
#

Just wrote & documented my type-stubs for part of the API for my custom server & singleplayer RCON commands mod.

slow hound
#

is there a way to make that smaller without putting into a file and uploading

#

jeeeeez

red tiger
gray void
slow hound
#

i dont think that's how it's writen but i'd have to double check

gray void
#

it was just there when i copied it over from so im not sure.

slow hound
#

Also don't remember is Base has to be caps

wraith hemlock
slow hound
#

something like that but based on
moodles, perks, traits, injuries, thermoregulator, and weapon type.

wraith hemlock
#

either way base speed is capped by anims, and it does not seem to increase the anim speed scale.

slow hound
#

I don't know a ton on it but that stuff is where dherts code would come into play

#

if you are needing to alter things like that

wraith hemlock
#

you can see that a weapon with base speeds of like 20 and no swing delays set will basically be capped to the speed that the anim is set.

slow hound
#

also it seems the final calc is randomize slightly also

wraith hemlock
#

Yeah but he basically rewrote primary attacks it looks like.

#

His code mentions using his custom anims here;

#
    local prone, stand = BrutalAttack.GetAvailableTargetCount(self.character, self.weapon)
    if stand == 0 and prone > 0 then
        self:forceStop()
        -- Fall through to doing the character stomp or main attack
        self.character:DoAttack(self.chargeDelta)
        return
    end
    
    local atype = "bash"
    if self.unarmed then
        local hands = (BrutalHands.TOC and BrutalHands.TOC.getHands(self.character)) or 11
        local rand = 4
        local randoff = 1
        if hands == 00 then 
            self:forceStop()
            -- Fall through to doing the character stomp or push
            return self.character:DoAttack(self.chargeDelta)
        elseif hands == 01 then -- right only
            rand = 2
        elseif hands == 10 then -- left only
            randoff = 3
        end
        local num = ZombRand(rand)+randoff
        if num==1 then 
            atype = "rpunch1"
        elseif num==2 then
            atype = "rpunch2"
        elseif num==3 then
            atype = "lpunch2"
        else
            atype = "lpunch1"
        end
        --atype = (ZombRand(3) == 1 and "lpunch1") or "rpunch1"
    elseif self.weapon:getSubCategory() == "Stab" then 
        self.maxHit = 1
        atype = "knife"
    end

    self.character:setVariable("LCombatSpeed", self.speed)
    self.character:setVariable("AttackAnim", true)
    self:setActionAnim("LAttack")
    self:setAnimVariable("LAttackType", atype)```
#

but when he is doing those attacks he is calling his own custom attack codes in BrutalAttack.

#

All I'm trying to do is make code that checks SwingAnim for example "CustomWeapon" and then uses the animNodes for that with what I guess would be:

self.character:setVariable("CustomCategory")
self.character:setVariable("AttackAnim", true)
self:setActionAnim("CustomWeapon")
self:setAnimVariable ? ? ? Not sure about this line.

#

And it would basically use the same attack as the game does normally, just with the addition of using that anim.

#

All of this could also be solved by the ability to just 'turn off' the speed cap somehow and allow basespeeds to push it.

#

e.g I know that player:getWornItems():getItem("Shoes"); will give me the worn shoes but what is the term for hats, jackets, etc

slow hound
#

sorry been testing underclocks and computer crashed lol catching up

wraith hemlock
#

basically the combat speed scale for my purposes is only relevant if it can go past animation speed and it can't, what i need is specifically animations that have a higher animation speedscale for the weapons

slow hound
#

ahh

wraith hemlock
#

the weapon should basically tell the game "use this anim set" when its being held, and that can theoretically work with SwingAnim

slow hound
#

so the item multi can't exceed the base?

#

or am i understanding what you are saying wrong

wraith hemlock
#

there's no weapon modifiers that will make you swing faster than the limits of the animations

slow hound
#

gotcha. what's your goal btw? maybe that's part of my confusion

wraith hemlock
#

i just need a weapon which can go past the normal speed limits, but to do that i have to make that weapon successfully call a custom animNode

#

damage calcs, etc, they can all be the same.

#

me and a friend were looking all day yesterday for which file or part of the game is handling how weapons work, e.g, what makes the game use the SpearDefault animNode when swinganim = spear, but we couldn't find it, at least not in any of the vanilla Lua files.

slow hound
#

its not in lua i thought

#

let me look. i'm pretty sure it's all in some directory of xmls or something

wraith hemlock
#

the actual process of making the animations should be simple, we just plan to use the pre-existing files, copy and rename them and set their speedscales higher to make the actions faster, and then figure out how to make the game use the customized files instead of the normal ones

#

in fact if we can find the java for weapon attacks the only difference would be to change the set anim lines.

slow hound
#

it's mentioned about using custom

wraith hemlock
#

yeah we looked at that one

#

but it doesn't tell us exactly how SwingAnim is working to called Spear or anything

slow hound
#

i do have some info on that from looking myself reecently so if you can't figure it out by the time im back in a couple hours. i'll look into

wraith hemlock
#

Anyone can make any weapon use "SwingAnim = Spear" and it will use this node. What makes it do so when a spear is used? 🤷‍♀️

#

This question has also been asked for years by others looking for answers as well, from my looking.

humble roost
#

could i implement a system where the water is never cut off, and certain water sources eventually become "tainted"

#

im still working on how tainting would work, i just need tainted water to exist independently from normal water

#

instead of the water cutting off, sinks n stuff would start filling bottles with the tainted water

urban plaza
#

if you have to reinvent the wheel at all there that would suck

red tiger
urban plaza
#

idk if you have like a design document/notes/wiki for development

#

oof

red tiger
#

We can work together to do the best we can.

#

Like I said we have nothing to reference other than the white papers.

urban plaza
#

iirc the thing with doing some of the react-hook type stuff is that it tries to take advantage of browsers abiliites to do things better than clientside code would sometimes be able to directly....

#

but otherwise it's often to reduce state-machine changes and stuff by codifying them for the virtual dom/the transpiler/etc

#

but yeah I'll draft up some notes on your overall setup once I get a handle on it and pester you endlessly with messages and pulls. Hopefully I can look at your todos and relieve some of your mental load here

red tiger
#

We'll need to work with what PZ provides with their UI rendering. I can cover for this. This is where my niche is.

#

I made this in it back in 2016.

#

It's gotten better since.

#

So I can package and do render calls for it.

#

I can also extend the UI mod optionally to work with advanced features of Crowbar, my client Java patch that adds more functionality and API to the game.

#

👍

#

Like GLSL Shader support for UI and Shader-uniform API for Lua.

wraith hemlock
#

Someone with experience in Java, if I wrote a code with two variables that I just want to add together, like basic addition, would I write that as:

SetVariable(var1, var2)? I'm not experienced in java, so I don't know if that would add the variables together or multiply them.

wraith hemlock
#

thanks

red tiger
#

Just made a template file for the custom Lua commands patch I'm rewriting.

#

Going to get that cleaned up and tested tonight and release it.

wraith hemlock
#

Is this an acceptable command?

runSpeedModifier = (shoeItemSpeed:getRunSpeedModifier() + hatItemSpeed:getRunSpeedModifier())

#

If anyone's curious I'm using speed framework mod and trying to make a mod that will sum the speed bonuses from all items to be used to set the player's speed.

wraith hemlock
#

It feels good when something you are trying to get working actually works.

#

Shoe runspeed mod is taken into account, jacket runspeedmod is added to the total, you can see the effect subtly

#

i made a stack trace error because the only coding knowledge i had was basic C++ from 5+ years ago and thought I could just write a line like

runspeedmod = jacketspeed + shoespeed; and it'd run

#

but that got sorted out

slow hound
#

nice job

red tiger
#

For the sake of convenience I think that the game should ignore the .git/ folder for loading & overriding files. It's definitely not important but I think it'd make sense to add this as an exclusion for file paths in the Mod API in the Java-side. @tame mulch

#

xD

wraith hemlock
#

thanks

wraith hemlock
#

There was an attempt. I tried to see if I could use setVariable to edit CombatSpeed and put that in all of the speed scale lines for 2HDefault. Nothing happened.

#

I'm not sure if I'm checking the player's weapon right or not, but it is trying to read the string for SwingAnim there.

#

maybe if self.weapon instead

dry chasm