#mod_development

1 messages ยท Page 96 of 1

fast galleon
#

you can simplify this by putting you script in server folder and name it something like ~zZZzzzzz.lua
then execute the function right before java logic, one of the merge distribution events.

#

this way most things will be already loaded

drifting ore
#

ok i see

sour island
#

Apologies for the confusion regarding onFill - I forgot I change/mess with two different events for namedLit ๐Ÿ™

#

I conflated the two

#

renderdetails was the other one - which as you can guess is done on render

#

Reminds me - I wish there was more flexibility in that function - I had to overwrite the whole thing to allow for books to stack by type rather than name

#

unfortunately alot of variation items are different types but share names

#

creates a weird situation where some items benefit from stacking with name and some with type

#

VHS would be something that could look nicer with type stacking for example

bronze yoke
#

community patch could use some hooks in there

#

i had to do some weird stuff to overwrite item names instead of just doing it the way tis does since i didn't want to override the function

sour island
#

yeah I tried to go in after and make changes after the fact but it wasn't panning out

bronze yoke
#

yeah, problem is that function does a lot of stuff and the only way to 'avoid' overwriting it is to just copy most of the function anyway, which sort of misses the point of avoiding overwriting things

sour island
#

yeaah

#

I'll toss up another issue on the repo

bronze yoke
#

patching getname turned out to be pretty elegant for my uses but i don't even remember what weird solution i had to use for splitscreen

fast galleon
#

Another option I see for this is to set the item script as obsolete then it will not be added as a possible item, and should print warning in debug only.

That would be simpler to remove items but it's risky to set obsolete:false after as other mods might complicate things.

sour island
#

you have to require the filename

#

and to avoid pointless 'require failed' warnings you'll have to identify the modID as active first

#

I do this for namedLit for this exact issue

local crossRefMods = {
    ["CatsWalkWhileReadMod"]="ReadFasterWhenSitting",
    ["CatsReadMod"]="ReadFasterWhenSitting",
    ["CatsReadMod(slower)"]="ReadFasterWhenSitting",
    ["SnakeUtilsPack"]="tooltip",
    ["Worse Searching"]="ISUI/Worse_PASearch_RefreshContainer_ISInventoryPage",
}
local activeMods = {}
local activeModIDs = getActivatedMods()
for i=1, activeModIDs:size() do
    local modID = activeModIDs:get(i-1)
    if crossRefMods[modID] and not activeMods[modID] then
        require (crossRefMods[modID])
        activeMods[modID] = true
    end
end
fast galleon
#

that's just bad since you'd need to check every workshop mod

sour island
#

Oh he's trying to remove magazines

#

mods really need a load priority system :\

#

if not a setting modders can set like 'priority=6' in modInfo allow people to reorder loading manually

#

which servers can do - and which also causes issue

drifting stump
#

what annoys me most with the version issues is steam clearly has a version control system yet does not make use of it

sour island
#

๐Ÿคทโ€โ™‚๏ธ

#

no money to be made

drifting stump
sour island
#

they barely make update requests

sour island
#

Sorry to anyone using the community patch - I rebranded it a bit and changed the modIDs ๐Ÿ˜…

fast galleon
#

yeah I unsub thank you very much ๐Ÿ˜…
I will fork it instead.

sour island
#

Only 4 subs and its unlisted - thought now would be the best time

bronze yoke
#

better to smooth everything out while that's still an option

sour island
#

also noticing an issue with my upload action - doesn't catch the workshop content stuff

#

very strange

zinc pilot
#

Update part 2, since I'm a giant dum dum:

#

that was not the issue, but how I was messing with the order of body locations

#

even if it seemed to work, some stuff just breaks

sour island
#

unlisted for anyone interested in using the debug tools

#

I set up the upload action to go off every Friday 11:59 (so bugs can be worked on over weekends ๐Ÿ˜… )

#

as well as setting up a hotfix branch that will force uploads too

#

having some issues with that though as PRs from dev to main to hotfix causes main to want another PR back

vital sedge
#

getPlayerCamera doesnt work

bronze yoke
#

the class isn't exposed

#

it can't be accessed

vital sedge
#

so what i can do? Create new one? but i want to access object of playercamera that is clearly used in game already!

fast galleon
#

IsoCamera is exposed
Lua interacts with core for zoom levels

bronze yoke
vital sedge
#

oh

#

where can i find indicator whats exposed and what not?

faint jewel
#

where the hell is the "move to floor" option?

#

it's apparently being used to dupe stuff

fast galleon
bronze yoke
#

there are a couple things that are partially exposed within their own class, no easy way to find those unfortunately

fast galleon
sour island
#

container:remove(item) doesn't handle those other cases

thick karma
#

Update schedules are not a solution when you're talking 400-500 mods by different modders; not like all the modders are going to agree to update all of their mods at the same time every week. I think a soft update flag is a more realistic solution than this, but if there simply are no realistic solutions and server owners just need to "deal with it", it is what it is

vital sedge
#

i see that the player:getX() gives a precise float coordinates, but didn't PZ operate on grid based system? I can'

faint jewel
#

no i mean the are duping the whole ass item.

vital sedge
#

i cant spawn object that can fly through float coordinates, but by int grid system right?

faint jewel
#

and i can't find the commands they are using.

thick karma
#

This seems like a good alternative

bronze yoke
thick karma
#

If we could sign up to push on scheduled update time or something, that would be more realistic

summer acorn
#

Hey guys, as far as I've seen, to make just 1 car model have different skins and that they randomly with one of them, you should do this.

        skin
        {
            texture = Vehicles/skin1,
        }
        skin
        {
            texture = Vehicles/skin2,
        }

But this doesnt work, it only spawns cars with the first skin. Not with the second one.
I should also say that I'm trying to do this with a vanilla car. Do vanilla cars not support two skins?
If you could help me I would appreciate it!

Thank you in advance!

hot patrol
thick karma
sour island
#

sweats

bronze yoke
thick karma
bronze yoke
#

and because lua can intentionally be mismatched to create cheats

thick karma
#

But clientside code does not have to be equivalent to run safely.

#

yes true

#

Obv it would open a new avenue for exploiters

bronze yoke
#

any server with a single 'soft update' mod would be completely open to clientside cheats

thick karma
#

But they are always going to find a way... hence the need for password protected servers

#

Cheaters gonna cheat

bronze yoke
#

on steam's end they could just use the version control system they literally already have

sour island
#

They could also make it so failed checksums downloaded a temp version from the host - but this would be more work for the devs for an issue that isn't that big of a deal tbh

bronze yoke
cosmic condor
#

enable download from a host is dangerous

hot patrol
#

honestly making unlisted mod packs is probably the best answer. I'm not quite sure have the workshop handles unlisted mods but so long as users aren't openly posting other peoples mods to the public making a modpack so you don't have to worry about updates and even make small changes for your server should be ok imo.

cosmic condor
#

one can set up a malicious server

sour island
#

one could follow the question of responsibility from modders to not update so often to hosts not having restart tools to players not really being willing to test stuff in the first place for beta branches - it's all extra work for anyone for mods

#

that'd be kind of another issue

thick karma
#

Fair enough. I definitely see the cause for concern, but perhaps I underestimate it. It seems to me like there are already problems with cheaters and such, i.e., cheating can't be entirely prevented in the presence of cool mods, so other than stopping cheaters from joining with good password protection, idk what can be done about that.

sour island
#

I really wish you could checksum/download off those restorable versions

#

but a mod itself could be malicious to begin with ๐Ÿคทโ€โ™‚๏ธ

bronze yoke
#

it seems like the simplest solution, all the infrastructure is there

thick karma
#

Since modders are already inherently capable of changing their mods maliciously...

#

I don't understand how allowing a modder to push a specially unchecked update would allow that much greater malice to be practiced.

#

Also I feel like cheaters and people who upload popular mods to the workshop are not identical? Sure, people could be fooled into downloading a couple bad mods from one troll, but that seems already possible to the a similar minor degree.

sour island
#

the issue is if TIS steps in and makes a change it becomes their liability

bronze yoke
#

if there's no checksum i can just swap the files with whatever i want

sour island
#

right now Steam would be on the hook and have to deal with a modder doing shady shit

tardy wren
#

Which they deal with to my knowledge

sour island
#

Yes, but I don't think TIS would want that on their plate just to placate mod mismatching

thick karma
bronze yoke
#

yeah that's fine, we really can't stop mods themselves from being malicious

thick karma
#

I'm not saying 0 checking of the mod, but a softened check for mods that flag themselves as soft-updating.

sour island
#

that'd cause issues if there was a change though

#

like a bug fix even

fast galleon
thick karma
#

But, yeah, my brain is pretty mediocre, so if it's a stupid idea, no offense taken, haha, I was just trying to think of realistic ways to address the problem (obviously I am aware of the viability of the "oh well" strategy)

bronze yoke
#

there's definitely a limit to how useful that could be, but there are times it would make sense

thick karma
#

How many people are really gonna run a workshop mod that lets someone autokill them?

#

Invincibly?

bronze yoke
#

especially stuff like burryaga's ui mods, no harm can really come from users using different versions, so long as we can confirm it is a real version of the mod

fast galleon
#

@thick karma
well he wouldn't advertise that part probably?
It's somebody you help regularly.

sour island
#

If I'm not mistaken Barotrauma checksums the workshop content the server says it has with the player's and downloads off the host if it doesn't match

thick karma
thick karma
#

Or is that just part of that mod?

sour island
#

Barotrauma is another game entirely

thick karma
#

Ohhh

#

Got it, yeah, don't play it obv

bronze yoke
#

that's correct

sour island
#

They also have an interesting modding license/EULA

bronze yoke
#

i've started modding that recently

#

the game is source available which is quite refreshing

sour island
#

yeah, source is "open" strictly for its own betterment or for making mods - any distribution or forking is strictly prohibited

#

basically if you find a bug and know how to fix it you can make the direct suggestion

#

discuss it was a dev, etc

#

not to mention changes to features for QoL

thick karma
#

Well, I g2g but I just felt inclined to float that at someone official to see what they would say. If the official policy is "mod community's problem," that is fair enough. It just seemed like an issue that could be alleviated pretty easily to me, but I may not see all the consequences properly.

sour island
#

It's been brought up (at least by me personally), my impression from replies was the cost benefit is just not there

#

hours of work to maybe sort of alleviate 1 problem while also creating a few more

#

can't speak to their intentions or future plans though

vital sedge
#

so why this doesn't work? i use local cam = IsoCamera.cameras to get PlayerCamera array, and then try to print(cam[1]) and it doesnt work, while print(cam) works, but i can't access fields of the camera, when i try to print cam.zoom it shows error, when i try cam.getTOffX() also show error, try : instead of dot and also error. Is there any way to get camera zoom factor through lua code or its impossible?

bronze yoke
#

you usually can't access fields

vital sedge
#

so if theres no getter then how?

bronze yoke
#

not really sure what the pattern is for whether you can or not, but usually only the getter works, and if there isn't one you're out of luck

vital sedge
#

i want to modify my zoom ๐Ÿ˜ฆ

#

increase or decrease ingame zoom

bronze yoke
#

do you want to add new zoom levels? i'd heard this was only possible through java modding

vital sedge
#

i have a problem with advanced trajectory mod

#

the crosshair has different size depending on zoom level

#

i wanted to change that so its equal

#

ive already modified it to be affected by range and moodlets

#

this one stuff irks me and i cant get it fixed

#

the easiest would be to scale it by zoom factor of camera

#

so its equal

#

maybe there are somewhere known values for zoom?

#

like constants, that would do too

#

i would just do a curve between min and max

bronze yoke
#

you could grab them from the java

#

i don't think you'd be able to do much with that cameras field anyway, it's an array of playercameras and they're not exposed

vital sedge
#

ahhh, grabbing from java is probably hard, like decompiling code or what? i will read the guide

#

im the meantime

bronze yoke
#

yeah pretty much

vital sedge
#

nah im not gonna make my own jar files and attach hook to the game

#

way over my level

bronze yoke
#

you don't need to do that, i just don't think you'll be able to find the constants anywhere else - they shouldn't change or anything really so you don't need to live get them

vital sedge
#

i would need to find another way to know at what zoom level im, viewport resolution of x and y doesnt change after all

#

maybe fov?

bronze yoke
#

oh, try getCore():getZoom(playerIndex), where playerIndex is 0-3 (splitscreen player number, 0 usually)

#

it returns a float so it might be the scaling factor

vital sedge
#

it works

#

i get 0.5 for highest zoom and 2.0 for lowest

#

wonder why i couldnt use player:getPlayerIndex() where player = getPlayer() but i had to use IsoPlayer:getPlayerIndex()

bronze yoke
#

getPlayerIndex() is a static method, not really sure what it returns, getPlayerNum() is the instance method

vital sedge
#

is there a way to spawn moving physical projectile in PZ, other than spawning object on a grid, remove it, spawn it in x+1 or y+1 grid, remove it, add collision detector, and thats basically all until we have gun overhaul mechanics from devs? This is very limiting, and it shows in Advanced trajectory mod, game has float coordinates, but grid system basically prevents free aiming, you just need to aim on the grid, not necessarily on the target correctly

#

its a really cool mod, but game limitation prevent further improvement

fast galleon
#

If you want to get into that you can look up things that extend IsoMovingObject, like cars, players, thrown weapons.

vital sedge
#

so its possible to have collision detection not based on grid but coordinates? maybe ive misunderstood the mod inner working

#

but then how to spawn sprite on coordinates and not on grid?

#

sprite or object

fast galleon
#

I have very little experience with that, IsoMolotov extends IsoPhysicsObject

vital sedge
#

you can make collision, but what its good for if the bullet is misaligned on the screen

#

i will have to tinker with it

ancient grail
#

can sprite contain moddata

sour island
#

if it is an isoObject sure, but I don't believe it would be an object that gets saved

ancient grail
#

hmm.. idk why but i just found out from someone that my safecracker mod 's moddata isnt perssitent.. the owner isnt stored so it automatically gets disowned

bronze yoke
#

sprites don't sound like a save-safe object

sour island
#

store the owner? an IsoPlayer?

sour island
fast galleon
#

I haven't used it much.

fast galleon
sour island
#

Ah - that's all there is atm - apologies if it kept updating prior, I was testing out the upload action

fast galleon
#

It was expected

sour island
#

Unrelated, anyone know of something that I can dump a list of words into to get synonyms en masse - can't google this as it just gives me synonyms to 'en masse' . _ .

bronze yoke
#

LOL

sour island
#

it's google hell

#

I wanted to jam namedLit titles into something to see if it makes the titles humorously sound like knockoffs

bronze yoke
#

moby dick is going to cause problems ๐Ÿ˜…

sour island
#

if I do it manually moby dick = colossal agent

#

๐Ÿค”

bronze yoke
#

LOL

acoustic dust
#

hi, i got a question. i played around with the game files but now that i want the go back to default. i forgot the original values, anyways i can reset them or find the values online?

bronze yoke
#

you can verify the integrity of your game files through steam

#

it'll redownload any changed files

acoustic dust
#

how do i do thta

#

that

bronze yoke
fast galleon
#

there's some results for a python library

paraphrasing sites?

drifting stump
sour island
#

can't google that either tho

fast galleon
sour island
#

I'll just have to offer a penny per title pun

drifting stump
sour island
#

I want a mass dump of words

#

searching thesaurus/synonym gives me the actual synonyms for 'en masse' or ' alot of words'

thick karma
#

Is there an easy way to forget your safehouse if you can't find it because it was some random house you found during mod testing?

ancient grail
#

kidding

acoustic dust
#

it fixed it i think

drifting ore
#

now i got it to use random options for context as well

#

just trying to figure out why the third option comes up blank. but so far i got so it doesn't choose the same option twice when you right click the item

ancient grail
#

Show your code

drifting ore
#

nmp

#
local previousPhrase = ""
local bookItem = ScriptManager.instance:getItem("Base.Lightswitches_fordummies")
local function readOrNot(player_num, context)
    if not bookItem then return end
    local player = getSpecificPlayer(player_num)
    local bookLevel = SandboxVars.Nipswitch.Booklevel
    local zapLevel = player:getPerkLevel(Perks.Electricity)
    local lowLevel = zapLevel <= bookLevel
    local contextRead = context:getOptionFromName(getText("ContextMenu_Read"))
    local dumbText = getText("ContextMenu_Three")
    local smartText = getText("ContextMenu_Four")
    local toolTip = contextRead.toolTip or ISInventoryPaneContextMenu.addToolTip()
    if bookItem and contextRead and lowLevel then
        toolTip.description = dumbText
        local rand = ZombRand(1, 3) -- generate a random number between 1 and 3
        local newPhrase = ""
        while newPhrase == previousPhrase do -- continue generating new phrase until it's different from previous
            if rand == 1 then
                newPhrase = "You go cross-eyed trying to read..."
            elseif rand == 2 then
                newPhrase = "I should tinker with some electronics"
            elseif rand == 3 then
                newPhrase = "Your brain hurts trying to read"
            end
            rand = ZombRand(1, 3)
        end
        previousPhrase = newPhrase
        local contextRead = context:insertOptionAfter("Read", newPhrase)
        contextRead.toolTip = toolTip
        contextRead.notAvailable = true
        context:removeOptionByName(getText("ContextMenu_Read"))
    else
        if bookItem and contextRead and not lowLevel then
            toolTip.description = smartText
            local contextRead = context:insertOptionAfter("Read", "Read, you Smartypants!")
            contextRead.toolTip = toolTip
            contextRead.notAvailable = false
            context:removeOptionByName(getText("ContextMenu_Read"))
        end
    end
end
Events.OnFillInventoryObjectContextMenu.Add(readOrNot)
#

the third option appears only blank

ancient grail
#

Your zombrand is wrong btw

drifting ore
#

it's working kinda?

ancient grail
#

Its going to be 1-2 only

drifting ore
#

ohhh

#

how does it work?

ancient grail
#

You need to plus1

fast galleon
#
local function addOrGroupContextOption(context, name, ...)
    local subMenu
    local identifier = "M' "..name
    for i,option in ipairs(context.options) do
        if option.name == name then
            if not option.subOption then
                local newOption = context:allocOption(name)
                newOption.id = option.id
                context.options[i] = newOption
                subMenu = context:getNew(context)
                context:addSubMenu(newOption,subMenu)
                option.id = 1
                subMenu.options[1] = option
                subMenu.numOptions = 2
            else
                subMenu = context:getSubMenu(option.subOption)
            end
            break
        end
    end
    if subMenu then
        subMenu:addOption(identifier,...)
    else
        context:addOption(identifier,...)
    end
end

local function addOrReplaceContextOption(context, name,...)
    local identifier = "M' "..name
    for i,option in ipairs(context.options) do
        if option.name == name then
            table.insert(context.optionPool, option)
            local newOption = context:allocOption(identifier,...)
            newOption.id = option.id
            context.options[i] = newOption
            return newOption
        end
    end
    return context:addOption(identifier,...)
end
ancient grail
#

Cuz by default zombrand starts at 0
So even if you declared 1 as starting point the max is still doing a minus 1
So we just add 1 to the max or in your case that you specified the integer you can just say 4 which means 3
Hehee funny aint it

drifting ore
#

can i just change it to 0 then?

#

atm it's working exactly how it should except blank for third

#

every right click is a new option

#

and never the same twice

ancient grail
#

Then u dont have to specify the start

#

Just go ZombRand(4)

#

Thats 0-3

drifting ore
#

ahh

#

ty

#

ill show a little test after lol just for fun

#

i love overcomplicating simple stuff ๐Ÿ˜„

bronze yoke
#

either shift your values to start from zero or do ZombRand(3)+1

ancient grail
#

You dont need tk use the while loop
Like blair said it will run the code once

So whenever you open it will change
But if you open twice the second time wont change it cuz uve already spawn the item

cosmic condor
#

Can we combine the spawn location into one? Or is it necessary to keep it this way?

`table.insert(ProceduralDistributions.list["WardrobeMan"].items, "myshirt");
table.insert(ProceduralDistributions.list["WardrobeMan"].items, 0.1);

table.insert(ProceduralDistributions.list["WardrobeWoman"].items, "myshirt");
table.insert(ProceduralDistributions.list["WardrobeWoman"].items, 0.1);`

drifting ore
#

i have a feeling making the recipe item count is going to be tricky via sandboxvar

#

i havent seen a single example of it yet or im blind

ancient grail
#

Thats how it is afaik

#

Its the table structure

bronze yoke
#

if it's the latter, no :(

ancient grail
#

No dice

cosmic condor
drifting ore
#

i did mine this way if it helps

ancient grail
#

You can iterate

#

To keep it short

drifting ore
#
require "Items/ProceduralDistributions"

local function nipswitchBook()
local list = ProceduralDistributions.list
local targets = { BedroomSideTable = .000000001, BookstoreStationery = .00000001, LibraryCounter = .00000001,
                 OfficeDeskHome = .00000001 , LivingRoomShelf = .000000001}
local item = "Base.Lightswitches_fordummies"

for k,v in pairs(targets) do
    local items = list[k].items
    table.insert(items, item)
    table.insert(items, v)
        table.insert(items, "Base.Lightswitches_fordummies")
        table.insert(items, SandboxVars.Nipswitch.Bookchanceplace * 0.0000001)
    end

targets = {inventoryfemale = 0.000000001, inventorymale = 0.000000001}
for k,v in pairs(targets) do
    table.insert(Distributions[1].all[k].items, item)
    table.insert(Distributions[1].all[k].items, v)
    table.insert(Distributions[1].all[k].items, "Base.Lightswitches_fordummies")
    table.insert(Distributions[1].all[k].items, SandboxVars.Nipswitch.Bookchancezombie * 0.0000001)
    end
    ItemPickerJava.Parse()
    end
Events.OnInitGlobalModData.Add(nipswitchBook)
#

this works exactly as intended (thanks to albion)

ancient grail
#

What the f is the .0000001 lol the imposible to get books mod

Also why mention that alot instead of using a var

It looks like its prone to human error via typo or accidental copy paste mistake

drifting ore
#

this is sandbox option

#

no it spawns

#

i tested with vanilla

#

if you set integer in sandboxvar to 1 its VERY rare

#

if you set to 500 its 65%

#

depending on which container

#

and also second section is if you want to spawn on zombies ofc

#

i also tested like 4 different variations of ways to do this and this was the cleanest and worked exactly how I'd* hope for distro lol

cosmic condor
#

sandbox is too complicated for me as for now ๐Ÿ˜…

drifting ore
#

you can just replace the sandboxvar with a number

#

it will be static

ancient grail
#

Ah the vanilla sandbox?

drifting ore
#

what you mean

chrome storm
#

Any Item/Weapon modder up to do a couple commissions? DM me and ill give all the details and money talkayayapink

pseudo thistle
#

So Iโ€™m

#

Anyone know how to make character models for project zomboid

#

Soo

#

No

#

Fuuuuuck

weak sierra
#

authentic peach has done this, and some others have done it by making full body outfits of diff models

faint jewel
#

the dog mod does it

vast nacelle
cosmic condor
high citrus
#

hi, I'm trying to store information on zombie trough the mod data but I keep loosing the data. I've recreated the issue in a very simple scenario:

On the server side I generate a random number for every zombie:
Events.OnZombieUpdate.Add(function (zed) if not zed:getModData().testNum then zed:getModData().testNum = ZombRand(1000) end end)

on the client side I print it above the zombie head:
Events.OnZombieUpdate.Add(function (zed) zed:addLineChatElement(tostring(zed:getModData().testNum), 1, 0, 0) end)

why:

  • the number changes every time I move away from the zombie?
  • different users on a dedicated multiplayer server see different numbers over the same zombie?
wet sandal
#

First problem is that ZombRand(1000) will return different numbers on each computer

high citrus
#

but that runs on the server

wet sandal
#

Ah, my bad

high citrus
#

and it should store it in the ModData

wet sandal
#

I don't know about networking mod data actually, I'll leave this for someone else to answer

#

And take notes since Imma need to network moddata soon

high citrus
#

this "the number changes every time I move away from the zombie?" happens also in SP

sour island
#

Made addXp grab the selected skill similar to level up and level down

#

not sure if I should instance lock that pop up though

wet sandal
sour island
#

lmao

#

I don't want to spend too much time polishing the vanilla debug tools

#

but the drop down menu for adding xp bugged me in testing

wet sandal
#

I think the client runs server code, I've seen lots of places in vanilla lua code where it checks if its the server or client

#

if isServer() or isClient() then

#

maybe try adding those checks as needed

high citrus
#

even if that's the case it should still work in SP

nimble spoke
#

Are you going far enough from the zombie that the area might be unloaded? When you go back to an area it technically isn't the same zombie as before

high citrus
#

a few screens away is enough

#

I guess 50 tiles or maybe a bit more

drifting ore
#

pretty sure its 150-175

high citrus
#

it's possible I'm pretty bad at estimating distances

wet sandal
#

I'm testing if zombies can even store persistent mod data now

nimble spoke
#

Zombies unloaded in that case, trying to add persistent data is pointless because of things like that

high citrus
#

uhm, but shouldn't the clients all have the same moddata?

#

if the moddata is created by the server

sour island
#

modData is tied to the object itself when saved

#

not all objects save the same way

nimble spoke
#

My trick for zombies is to usually attach a token item

jaunty marten
wet sandal
#

Ye, no persistent mod data in my test scenario

nimble spoke
#

but it has the same issue with loading/unloading areas. As soon as the zombie is gone it was all pointless

jaunty marten
#

client runs client and server folders

nimble spoke
#

only in SP

faint jewel
high citrus
sour island
#

As it turns out player zombies save modData

#

or atleast retain it

#

let me test unloading chunks

jaunty marten
sour island
#

so it seems like dead players turned zombies retain their moData

#

(?)

nimble spoke
#

yes, those are marked as survivor zombies, they are saved differently

wet sandal
#

Zombies aren't even maintaining their ID between unloads for me

sour island
#

I teleported across the map and teleported back

#

So if you want your zombies to save modData just flag them as dead players

#

testing reloading the game

#

seems to save

high citrus
#

I should do it for every zombie. Probably it will bee to much load on the server

sour island
#

depends what you want this modData for - you're probably overthinking needing it on every zombie

nimble spoke
high citrus
sour island
#

ah

high citrus
#

also I'm introducing some new types of zombies

nimble spoke
#

There is a mod for that already..... and it went great lengths to save zombie "ids"

high citrus
#

yes, I was wondering why they were doing all that work ๐Ÿ˜„

nimble spoke
#

Because the game isn't made to keep track of every single individual zombie? It is unnecessary

sour island
#

Outfits or token wouldnt really work for randomized stats would it?

#

I use outfits for special zombie stats/AI

nimble spoke
#

if all zombies of a certain outfit are special in the same way it works, I use it for mine too

sour island
#

But randomized stats would require persistent bReanimatedPlayer=true modData

#

I wonder how busted it'd be to apply that too every zombie

high citrus
#

I would have still expected that the moddata would have been the same for every client. But I guess that also get lost even without unloading the zombie

#

yes, maybe I could use the outfit

sour island
#

you can avoid the unloading modData with what I mentioned

#

undeadPlayers retain their modData

nimble spoke
#

uhhh, there might be complications. For example loot is only created on death, but not for a player zombie

sour island
#

ah

nimble spoke
#

so if I had to guess, zombies marked like that would spawn nothing beyond their clothes

sour island
#

I believe on Dead handles the zombie

#

could flip it back

high citrus
#

maybe I could use the outfit as a random seed to generate the stats

sour island
#

would highly depend on the timing of the event

high citrus
#

the outfit stores everything? The specific clothes, their color? Or is just the outfit name?

sour island
#

OnZombieDead is fired before the body is placed - should work

sour island
#

One would have to have an additional flag for actual player zombies though

nimble spoke
#

and I think attached items? I don't remember

sour island
#

attached are their own definitions pointing to the same outfitID

nimble spoke
#

yes, but I think the game saves that. So if you go back to an area a zombie with the same outfit would have an attached item just like before

sour island
#

I might refactoring my AI to use breanimatedPlayer

#

kind of hate the outfitID attached weapon token method

high citrus
#

so maybe a fake item would do. But it feels very hacky

sour island
#

@high citrus would you consider 'setReanimatedPlayer' ?

#

Seems like you'd be able to use your old code if you have any

high citrus
#

reanimated players gets special treatment that might cause additional load on the system

#

thanks to all for the help. I'll check the various options ๐Ÿ‘

fast galleon
#

@sour island
any thoughts?

sour island
#

that's actually what I was going to attempt / suggest

#

could get around people not using APIs by hijacking the methodcall

#

as long as it's done with a non-user in mind

willow estuary
sour island
#

Perhaps a boolean can be added for that purpose?

#

IsoZombie.bSaveModData ?

#

Actually, why don't zombies save modData ๐Ÿค” - was it a performance choice or just an oversight with trying to keep saves small?

bronze yoke
#

from what i've seen of the code zombies just aren't really persistent

sour island
#

yes, but there is some information saved

#

items for example only save a handful of values AND moddata

bronze yoke
#

of course, but it's definitely the bare minimum to stop players from noticing

willow estuary
#

There's a lot of fakery and recycling of existing zombie data with handling zombies, for optimization purposes, that I am absolutely incapable of explaining adequately, but zombies do not work the way people would assume in many ways.

#

And I'm sure if people started spamming persistent mod Data onto zombies there would be all sorts of undesired trickle down effects.

#

I would suggest using custom outfits or tokens to implement special zombies or mod zombies flags, as, AFAIK, they handle the tasks adequately, although I'm sure someone could break a save by spamming enough tokens.

stone garden
#

still waiting for my mod ideas happen im almost at 2nd month

#

thats the sad reality

drifting ore
#

this isn't a channel where you make an idea and it happens. its where you make the idea happen and get help

bronze yoke
#

that's the reality of expecting other people to do hard work for you for free?

stone garden
#

well this the correct channel

stone garden
#

in my country

drifting ore
#

you problem not me problem bro.

dull moss
#

just stop

drifting ore
#

you post this often also. its sad really

#

just understand that if you give a good idea there, you have to see if it will happen, but please don't expect. so much hard work from so many people. unrealistic of you

stone garden
#

i have been asking for like 100 modders

drifting ore
#

now you wait

sour island
#

that's not how that works

stone garden
#

and most of them said no

drifting ore
#

forever maybe

stone garden
drifting ore
#

don't keep asking over and over though.. at least not here

fast galleon
#

please ask once per version at least 42,43,...

dull moss
stone garden
drifting ore
#

actually quite rude when you consider what the purpose of this room is

stone garden
sour island
#

You're probably going to just get more frustrated asking that way anywhere - you could have attempted your own idea by this time.

drifting ore
#

you can learn. i have very little experience and it's working okay for me!

stone garden
#

when will anyone will make my idea?

drifting ore
wet sandal
#

People can't make the idea unless you share it

bronze yoke
#

probably never? suggestions are fine and appreciated but you can't actually expect anyone to make a mod for you

stone garden
#

but i will be waiting until someone make it

drifting ore
#

you literally havent shared it LOL

#

EVER

stone garden
#

until day 8

#

because of the lore

drifting ore
#

i can't imagine why so many aren't jumping on it lol

sour island
dull moss
stone garden
#

well the reason i want that to happen is because of lore

bronze yoke
#

this would be a really large scale mod

sour island
#

The chances to run into someone who shares your vision is very small, the fact that you can't really contribute makes that partnership chance even smaller.

bronze yoke
#

and for all we know it could be b42 content anyway

stone garden
#

probably

bronze yoke
#

oh that's right

#

that's still very discouraging if someone did intend to start such a large project

sour island
#

If you want your mod to get made you're better off trying something (and showing buggy code here) rather than stomping your feet.

stone garden
ancient grail
ancient grail
#

Your solution doesnt solve any problem

stone garden
#

because

#

i dont know coding

bronze yoke
#

time to learn

ancient grail
#

Yes

#

Why do you shy away from learning

when everytine you advertise your idea and fish for partners
you always recieve the same comment anyways

We here to help but u have to do it.

drifting ore
#

if i replace the "Read" context menu, what is the best way for me to add that option to read back to the custom context menu? i have tried like 5 diff ways and none seem to be triggering it, or throw an error.... lol got all the way to the end of doing all that context menu stuff but forgot that it still actually has to read the book after

ancient grail
#

We will just provide you what you need to learn and figure out possible solutions. If you have gon and learn it when u started asking you by then have learned what you need to do for that mod you want us to build for you

drifting ore
#

do i have to rewrite the ISReadABook:start() didnt work since i changed the context menu lol. i'm not gonna have to rewrite it will i?

ancient grail
#

It doesnt take long to learn it. Meanwhile your solution is something you have to wait forever before it materialize .

bronze yoke
#

you shouldn't need to rewrite it

ancient grail
#

Ahm eat book

#

Hehhehe

#

Konijima made a consumable book i guess the idea isnt farfetched . But why did u want to change it

drifting ore
#

well i'm about to scrap it and just leave it out at this point but i changed the context to say something else instead of read

#

but it stopped functioning since it's appearing to not be tied to anything now

#

looks good just does nothing

bronze yoke
#

i wonder if you can change the name of the original option instead? never tried that

#

otherwise calling the same function as the original should be fine

ancient grail
#

What about turn into sheets of paper but then the scripts are said to ... Ooo nvm its possibl

bronze yoke
ancient grail
#

The quest is still the same why tho

drifting ore
#

the function itself checks for the context_read though is where it keeps erroring for me using it

#

at the time i need it, it's already removed it from the context

ancient grail
drifting ore
#

i may scrap it lol.... i really dont want to but so minimal

ancient grail
#

I thought could have finished the new teleporter mod im doing but i guess ill finish it tom

sour island
#

added options return themselves if you want to crack into the original function that adds it

#

you should also be able to pick the option out from the context menu

bronze yoke
#

i would be surprised if he hadn't tried just renaming it before doing it that way, so i would assume that doesn't work

drifting ore
#

it works perfect visually

#

just not the actual action from click

sour island
#
require "ISUI/ISWorldObjectContextMenu"

---@param waterObject IsoObject
local function isNaturalWaterRemoveOptions(waterObject, context)
    if not waterObject or not context then return end
    
    local isInventoryObject = instanceof(waterObject, "IsoWorldInventoryObject")
    local bHasProperties = (waterObject:getProperties() ~= nil)
    local bStringStartWater = luautils.stringStarts(waterObject:getSprite():getName(), 'blends_natural_02')
    
    if not isInventoryObject and bHasProperties and bStringStartWater then
        context:removeOptionByName(getText("ContextMenu_Drink"))
        context:removeOptionByName(getText("ContextMenu_Fill"))
    end
end

local original_ISWorldObjectContextMenu_doFillWaterMenu = ISWorldObjectContextMenu.doFillWaterMenu
function ISWorldObjectContextMenu.doFillWaterMenu(source, playerNum, context)
    original_ISWorldObjectContextMenu_doFillWaterMenu(source, playerNum, context)
    isNaturalWaterRemoveOptions(source, context)
end

local original_ISWorldObjectContextMenu_doDrinkWaterMenu = ISWorldObjectContextMenu.doDrinkWaterMenu
function ISWorldObjectContextMenu.doDrinkWaterMenu(source, playerNum, context)
    original_ISWorldObjectContextMenu_doDrinkWaterMenu(source, playerNum, context)
    isNaturalWaterRemoveOptions(source, context)
end
#

if you have the context menu in question you can manipulate the options

drifting ore
#

lemme show what i have atm since im passed this point

sour island
ancient grail
sour island
#

I'm noticing a lot of my textures are getting artifacts - what am I doin wrong . _ .

ancient grail
#

Ow ive tried to delete a corpse but it work
I even tried removeeverythingbutfloor function lol

#

And the timeactio. But no ๐ŸŽฒ

drifting ore
#

it shows no problem, read is gone, but no function

bronze yoke
#

could you post the option code again?

drifting ore
#

yes

#

ill post entire. its going to my github for example share after anyways

#
-- This sets requirement for Electrical level from SandboxVars as well as randomized context menu replacement for "Read".
local function readOrNot(player_num, context)
    if not bookItem then return end -- if book is not in inventory, exit function
    local player = getSpecificPlayer(player_num) -- get player
    local bookLevel = SandboxVars.Nipswitch.Booklevel -- Required Electrical level from SandboxVars
    local zapLevel = player:getPerkLevel(Perks.Electricity) -- get player's Electrical level
    local lowLevel = zapLevel <= (bookLevel - 1) -- set lowLevel to true if player's Electrical level is too low
    local contextRead = context:getOptionFromName(getText("ContextMenu_Read")) -- get "Read" context menu option
    local dumbText = getText("ContextMenu_Three") -- get text for dumb context menu option
    local smartText = getText("ContextMenu_Four") -- get text for smart context menu option
    local toolTip = contextRead.toolTip or ISInventoryPaneContextMenu.addToolTip() -- get tooltip for context menu option
    local previousPhrase = "" -- set previous phrase to blank
    if bookItem and contextRead and lowLevel then -- if book is in inventory and player's Electrical level is too low
        toolTip.description = dumbText -- set tooltip to dumb text
        local rand = ZombRand(1, 4) -- generate a random number between 1 and 3
        local newPhrase = "" -- set new phrase to blank
        while newPhrase == previousPhrase do -- continue generating new phrase until it's different from previous
            if rand == 1 then
                newPhrase = "You go cross-eyed trying to read..."
            elseif rand == 2 then
                newPhrase = "I should tinker with some electronics"
            elseif rand == 3 then
                newPhrase = "Your brain hurts trying to read"
            end
            rand = ZombRand(3) -- generate a new random number between 1 and 3
        end
        previousPhrase = newPhrase -- set previous phrase to new phrase
        local contextRead6 = context:insertOptionAfter("Read", newPhrase) -- insert new phrase into context menu where "Read" was
        contextRead6.toolTip = toolTip -- set tooltip for new phrase
        contextRead6.notAvailable = true -- set new phrase to not available
        context:removeOptionByName(getText("ContextMenu_Read")) -- remove "Read" from context menu
    else
        if bookItem and contextRead and not lowLevel then -- if book is in inventory and player's Electrical level is high enough
            toolTip.description = smartText -- set tooltip to smart text
            local contextRead5 = context:insertOptionAfter("Read", "Read, I am a Smarty Pants!") -- insert custom text into context menu where "Read" was
            contextRead5.toolTip = toolTip -- set tooltip for "Read"
            contextRead5.notAvailable = false   -- set "Read" to available
            context:removeOptionByName(getText("ContextMenu_Read")) -- remove "Read" from context menu
        end
    end
end
Events.OnFillInventoryObjectContextMenu.Add(readOrNot) -- add readOrNot function to context menu on book right click
#

sorry I commented every line for teaching

bronze yoke
#

oh, your new option doesn't call anything - let me pull up what you need

drifting ore
#

ty yea i wasn't sure how to use it to add back in after replacement

ancient grail
#

Did your sandbox function worked. Hou could try and add = sandboxvar.something or "somedefaultvalue"

drifting ore
#

it works. which one you mean?

#

i'm doing them for every single thing the mod offers

#

well almost

sour island
#

png and the icon size is the same afaik

ancient grail
#

Ow hi polt

fast galleon
#

I mean in-game option

drifting ore
#

yea if your compression or max texture size is smaller than texture could cause issues

#

im honestly just stoked to have a concept to blocking item use in some form, based on perk level

#

i am not a huge fan of being able to read a book that i wouldnt understand lolol

bronze yoke
#

you need to add items as a parameter to your functionlua local function readOrNot(player_num, context, items) and then use ```lua
context:insertOptionAfter("Read", "Read, I am a Smarty Pants!", items, ISInventoryPaneContextMenu.onLiteratureItems, player_num)

drifting ore
#

ahhhh omg i was so close before thank you! oh instead of items can i just call the item local?

#

i forgot its at the top of my script

#

local bookItem = ScriptManager.instance:getItem("Base.Lightswitches_fordummies")

fast galleon
wet sandal
bronze yoke
drifting ore
#

ohhhhhhhhhh

#

CLICK

#

suddenly i understand things

sour island
drifting ore
#

so many other things make sense now lol... wowzers

fast galleon
#

if you ever want to change only the text of an option in context menu under specific conditions it should be safe to do.

drifting ore
#

is there a better way to replace it than removing and readding the way I did? since i lost the original function this way?

#

this is working perfect btw ty @bronze yoke

fast galleon
#

no reason now that's it's working

drifting ore
#

wooo

fast galleon
#

I was trying to think what would prevent that but nothing came to mind so far.

#

nice, looks good

drifting ore
#

fair enough. this will make its way to my github haha. i hope you all are okay that any of my code you help me with goes into a public github so others can learn from examples

#

i plan to pretty much release it all the same way and explain what everything does

#

after i finish this mod i'll put it all up

wet sandal
#

Anyone know where the FileWriter saves to?

fast galleon
#

which one

wet sandal
#

The one you get in lua by calling getFileWriter(filename)

fast galleon
#

that seems to be the one goes to Lua folder in Zomboid

wet sandal
#

Ah, yep that seems right

#

Thanks

fast galleon
#

@dull moss I thought people would get errors when they enable both mods, turns out they get errors because game auto enabled the second mod for them stressed

wet sandal
#

Sizing items will no longer be super painful

jaunty marten
#

@wet sandal how do u calculate size from actual weight?

#

or maybe u uses tags

wet sandal
#

The just a combo of the item category and weight.
Lots of items need more accurate size, hence the manual sizing i'm going to be doing for lots of them

jaunty marten
#

u mean it will be hardcoded? not some calc by formula

wet sandal
#

A mix

#

Most items work fine with formula, but some I'd rather just specify their size

#

And mod items will need the formula obviously

jaunty marten
#

will by painful to resize backpacks and etc when it changes weight by adding items into them

wet sandal
#

Backpacks will have a set size

jaunty marten
#

oh

wet sandal
#

They will be the same size inside/out

jaunty marten
#

so empty backpack and full one will have same cell size?

wet sandal
#

Might add an ability to fold them though

wet sandal
#

Also equipped items will not take an inventory space when im done

thick karma
#

Friend getting these... anyone know what the heck these imply?

LOG  : Lua         , 1674956145909> Loading: media/lua/client/XpSystem/ISUI/ISSkillProgressBar.lua
LOG  : General     , 1674956145912> OnLoadSoundbanks
LOG  : General     , 1674956145913> texturepack: loading Tiles2x
LOG  : General     , 1674956145959> texturepack: loading Overlays2x
LOG  : General     , 1674956146140> texturepack: loading JumboTrees2x
LOG  : General     , 1674956146447> texturepack: loading Tiles2x.floor
LOG  : General     , 1674956146451> LOADED UP A TOTAL OF 16 TEXTURES
ERROR: General     , 1674956146488> RenderContextQueueItem.invoke> java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null thrown during invoke().
ERROR: General     , 1674956146490> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null at Invokers$Params2$CallbackStackItem.run line:91.
ERROR: General     , 1674956146491> DebugLogStream.printException> Stack trace:
java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null
    at zombie.util.lambda.Invokers$Params2$CallbackStackItem.run(Invokers.java:91)
    at zombie.core.opengl.RenderContextQueueItem.invoke(RenderContextQueueItem.java:77)
    at zombie.core.opengl.RenderThread.flushInvokeQueue(RenderThread.java:397)
    at zombie.core.opengl.RenderThread.renderLoop(RenderThread.java:170)
    at zombie.gameStates.MainScreenState.main(MainScreenState.java:226)
ERROR: General     , 1674956147440> RenderContextQueueItem.invoke> java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null thrown during invoke().
ERROR: General     , 1674956147441> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null at Invokers$Params2$CallbackStackItem.run line:91.
ERROR: General     , 1674956147441> DebugLogStream.printException> Stack trace:
java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null
    at zombie.util.lambda.Invokers$Params2$CallbackStackItem.run(Invokers.java:91)
    at zombie.core.opengl.RenderContextQueueItem.invoke(RenderContextQueueItem.java:77)
    at zombie.core.opengl.RenderThread.flushInvokeQueue(RenderThread.java:397)
    at zombie.core.opengl.RenderThread.renderLoop(RenderThread.java:170)
    at zombie.gameStates.MainScreenState.main(MainScreenState.java:226)
ERROR: General     , 1674956147442> RenderContextQueueItem.invoke> java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null thrown during invoke().
ERROR: General     , 1674956147442> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null at Invokers$Params2$CallbackStackItem.run line:91.
ERROR: General     , 1674956147442> DebugLogStream.printException> Stack trace:
java.lang.NullPointerException: Cannot invoke "zombie.util.lambda.Invokers$Params2$ICallback.accept(Object, Object)" because "this.invoker" is null
    at zombie.util.lambda.Invokers$Params2$CallbackStackItem.run(Invokers.java:91)
    at zombie.core.opengl.RenderContextQueueItem.invoke(RenderContextQueueItem.java:77)
    at zombie.core.opengl.RenderThread.flushInvokeQueue(RenderThread.java:397)
    at zombie.core.opengl.RenderThread.renderLoop(RenderThread.java:170)
    at zombie.gameStates.MainScreenState.main(MainScreenState.java:226)
#

Okay, error is gone... he thinks he may have added some mods twice or something.

jaunty marten
late hound
faint jewel
wet sandal
faint jewel
#

is there going to be a default items file that has pre tetris'd items?

#

length and width etc.

wet sandal
#

The item sizing is just a dev tool

faint jewel
#

also, a "rotate" option would be neat.

wet sandal
#

You can rotate

#

press R while dragging (remappable)

faint jewel
#

so we can turn a 1x4 axe into a4x1 axe

#

lol groovy

sour island
#

mouse wheel?

wet sandal
#

Ye thats probably a good option as well

faint jewel
#

my question is how are we getting the default sizes for the items?

wet sandal
#

I am making them

#

I wrote a formula to size all the items automatically. I am manually overriding the sizes of certain items where I feel the formula has failed.

thick karma
#

Knowing some object somewhere was nil doesn't exactly narrow things down...

placid hinge
#

Hey, by chance anyone know of a way to update a items model within lua? Like changing the alice pack model to be the hunting backpack one.

thick karma
#

Idk but I think the models are usually defined from .txt scripts in an entirely different folder... i.e., not from Lua. @placid hinge

finite radish
#

if the model is encapsulated then you'll probably have to use that, but you'll have to get the current value for the other args (aka everything except the mesh)

bronze yoke
#

you can just DoParam the model

#

if all you want to do is change the model to another already defined model

finite radish
#

DoParam?

bronze yoke
#

oh, actually, clothingitems probably need some special work

finite radish
#

i don't see a DoParam anywhere thonk is there something I don't have decompiled?

bronze yoke
#

Item:DoParam()

#

you can probably just doparam the clothingitem to the hunting backpack clothingitem actually, i don't think the clothingitem defines anything but appearance

#
local item = ScriptManager.instance:getItem("Module.ItemName")
if item then
    item:DoParam("ClothingItem = OtherClothingItem")
end
finite radish
#

oh it's a scripting thing, that makes more sense now

#

would that change it during runtime though, or would it need a restart? haven't worked with those functions before

bronze yoke
#

depends on what exactly it is, usually it'll only affect items loaded from then on (so mostly useful before the world loads)

ancient grail
bronze yoke
#

some things are always read directly from the script though so those will be fine

finite radish
#

if anyone remembers the discussion of coroutine the other day, turns out I was wrong: it probably works as intended, and you could totally use it
turns out (even in normal Lua) it's not meant to be multithreading, but you can use it to make shit like pseudo-asynchronous state machines

#

haven't actually played around with it, but from what I can see the functionality is there (from Kahlua, but never actually used in the vanilla game as far as I can see. it's globally exposed though)

drifting ore
#

@idle dawn

#

funny I literally was going through looking for something and was right around that convo and came back to this

#

your timing

idle dawn
#

That's what I was thinking initially ye.

#

I said in the convo somewhere it's single-thread async.

#

The whole purpose of it primarily is to do a bunch of things without the main game thread waiting for it.

#

On 500 zombies, my explosions effectively freeze the game as they all die. Without the delay, they all die in the same frame and take a literal 1-2 seconds before all exploding at the same time.

jaunty marten
idle dawn
#

coroutines solve this, however of course the game thread is always prioritized so it's not guaranteed to happen immediately as asynch stuff happens.

#

It's mostly the terminology.

#

It's not technically another thread, it's the same one but treating it as it's own away from the "primary" one.

#

This actually causes a VERY important interaction if you plan to use coroutines. If you create one and fire it on the next line, it potentially does not run before the other lines below it due to this asynchronous nature.

#

tldr, async tasks from coroutines are not guaranteed to run on any specific frame at all.

#

As an example, lets say when a zombie dies, I want to make a coroutine to make the explosion happen on the zombie location.

#

This wouldn't work.

#

The zombie only exists on the exact frame of the zed death event, before it is potentially null. You'd be referencing a null.

#

I had to actually store it's location outside of the scope of the coroutine then pass it to it.

#

(Or rather the queuing system I used.)

#

I think the best case use for most people here with co routines is if you're trying to do a lot of things at once. Like spawning a weed and bong item in every container. Instead of holding up the game thread until it's done, put it in a coroutine. As long as it's not something dependent on timing/event triggers, it helps with prioritizing performance.

The only potential artifact you might see is if you do this with game tiles. Put a weed and bong on all tiles on the map? You'll actually see it spawn like a wave in batches, instead of all at the same time.

#

This is my ted talk.

finite radish
#

it's actually fully synchronous, using the main "game thread," it's just used to hotswap between tasks

#

which I think is basically what you were saying above but just making sure

idle dawn
#

Fake threading in essence yep yep.

finite radish
#

also the gameloop runs fast enough that it won't block the main loop, even for stuff like game tiles (my tile animations work on this premise, although I don't even use coroutines, because it's fast enough without them)

idle dawn
#

Try to use it anyways, see if nothing happens.

#

I think it assists the game loop a lot if stuff that can benefit from coroutines uses it.

finite radish
#

it might actually end up making it slower tbh, initiating those and swapping between them is probably only efficient once you get to a certain number of iterations. otherwise the overhead isn't worth it
it's probably miniscule in either case, but still, if you benchmarked it out I bet that'd be the case

idle dawn
#

The example paints a good picture.

#

Imagine I want to download a bunch of files. It requests, waits for confirmation, yadayada, then goes to the next file.

#

coroutines effectively lets you tell it to do it all at the same time, independantly of the main thread. (Although not off the thread.)

#

In this case it's not of use to you if it works fine without one.

finite radish
#

sorta. it's not "all at the same time" though, you're just swapping from the "main thread" to a different one, then swapping back (or swapping to another one, and so on). it's all 100% synchronous on the game loop though, so it happens in sequence - it just allows you to leave certain tasks unfinished until a later time when it'll return and finish them

#

the use cases are pretty slim, tbh. it'd be a nice way to set up a state machine but I can think of easier ways

#

(which is why it isn't used at all in the vanilla Lua, or any mod that I've seen)

idle dawn
#

I think it's best use is in cases where you want to do something that takes time, multiple times. OR you want to do a lot of something and it has no connection to specific frames or timings nor cares about the initial state of any references.

#

So I made a mistake above and said the opposite actually.

#

If you make a code where you change every single tile in the map to a grass tile, it'l form a wave as it changes each tile one by one.

#

Because it's acting sequentially and waits for every tile.

#

If you code it with coroutines, it will effectively change every tile at the same time, as fast as the game loop/thread allows it.

#

What you're saying on it being syncronous is incorrect, but I'm thinking you're talking about the fact that the main game loop is cooperative to it.

weak sierra
idle dawn
#

Yeeep.

#

I'm not a programmer I don't know these fancy words.

weak sierra
#

or cooperative multitasking rather

#

windows 3.1 used that to go between tasks in the old days

#

:p

#

before threads

finite radish
weak sierra
#

perhaps they brain derp and thought u meant asynchronous

idle dawn
#

Being in the same thread doesn't mean it's asynchronous.

finite radish
#

right, that's what I said

weak sierra
#

synchronous = stuck in order with each other.. asynchronous = can operate independently

#

in case anyone is confused

finite radish
#

right, exactly

weak sierra
#

What you're saying on it being syncronous is incorrect

#

not sure what this part was getting at

#

otherwise everyone seems to agree fine

#

:p

finite radish
# idle dawn If you make a code where you change every single tile in the map to a grass tile...

also, in regards to the tile thing: this would be true on lower-level hardware, but there's a ton of operations per-tick, so it actually happens "at the same time" in terms of what the player notices.
if you manage to make something that can't happen across the span of a tick though, that's when you'll start to see issues (and where a state machine would be necessary, in the way you described) but even doing thousands of tile operations doesn't cause that to be necessary, thankfully

idle dawn
#

For some tile based games you can have a ton of interactions or changes happen on a single tile.

weak sierra
#

goes to bed

#

gn

idle dawn
#

GOOD

#

NIGHT

#

See space station 13, where every single tile is simulating a literal atmospheric system consisting of exact pressures that move between every tile, with an air mix that can possibly combust.

#

The shit that happens on a single tile is insane in that.

#

As for PZ, I wouldn't know exactly, but it's mostly in the potential.

#

With my explosion issue, one explosion is fine.

#

But when 500 zombies are literally dying at the same exact frame because I coded it so when they die they generate said explosive which is programmed to kill the zombies nearby...

#

You do have to control when the coroutine yields though. You CAN check when a coroutine is stopped, then start it again, but you can never guarantee WHEN it's going to stop.

#

The reason it's asynchronous and why I say it's wrong to call it synchronous is because when a coroutine is created, it's treated independantly in the main thread. Both of the code effectively run along each other and actually disregard all order. Ideally they both alternate in the thread because there's no actual priority unless you program a dispatcher.

#

It's quite literally what the coroutine creates.

#

If the main game loop decides hey I'm gonna take 10 extra cycles to do something brb mom is calling, then it comes back and runs some code, the coroutine could have done it's processes at any point during all that, and be in it's process anywhere if it took long enough.

finite radish
# idle dawn The reason it's asynchronous and why I say it's wrong to call it synchronous is ...

that's not how it works, though. it's entirely dependent on the main thread - because it has to be called by something. you can't call code without a thread, and in our case there's only one accessible thread, period - so it has to run on that thread
they don't run alongside each other at all, they'll run until they're finished unless you specifically use the coroutine.* commands to manage their state
you can always guarantee when it's going to start, stop, etc. because it either 1) finishes and executes a callback, or 2) you stop it manually

#

if there's no callback, it'll just go on to whatever's next on the stack, outside of the coroutine

#

(as usual)

bronze yoke
#

am i understanding this right? they just seem like functions you can pause to me

idle dawn
#

Some research, you are right that they are ran in order of call stack, but the reason they're called asynchronous is because of how coroutines can yield and resume at any time and during the time they are paused then resumed changes to values can be made without the coroutine actually knowing.

drifting ore
#

my understanding is if game performance>mod performance then use coroutines?

idle dawn
#

"Technically" asynchronous? w/e.

#

Nope.

drifting ore
#

or at least in the context you guys were using it

#

lay it on me

idle dawn
#

Don't listen to what I said regarding performance actually. The shit I was talking about was me assuming coroutines were automatically under a scheduler.

drifting ore
#

oh

idle dawn
#

You'd have to make your own, and the only use for that is if you want the main thread to have priority over something you're doing.

#

This is too low level shit I shouldn't be pretending I have authority over reeeee.

idle dawn
drifting ore
#

has anyone used the lightRoom boolean before? and if so, what context?

#

it seems like what trigger lighting up a room by roomdef or room id

pulsar heath
#

any event for game closing? Cant seem to find it

#

i think is OnAiState

#

but cant seem to find much info about

#

how to use it

drifting ore
#

you want to trigger game close or quit server?

#

i'm trying to understand what would happen after the game closed

pulsar heath
#

when i say on game close, on quit to menu or quit game

drifting ore
#

OnDisconnect ?

pulsar heath
#

so that i can save the mod settings

#

hmmm might as well try it

bronze yoke
vague raven
#

Anyone know what could be causing this? ERROR: General , 1674979779092> 0> zombie.world.WorldDictionaryException: Warning client has no script for item PZRPRadio.WalkieTalkie6 ERROR: General , 1674979779093> 0> at zombie.world.DictionaryDataClient.parseCurrentItemSet(DictionaryDataClient.java:42) ERROR: General , 1674979779093> 0> at zombie.world.WorldDictionary.init(WorldDictionary.java:213) ERROR: General , 1674979779093> 0> at zombie.iso.IsoWorld.init(IsoWorld.java:2450) ERROR: General , 1674979779093> 0> at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:268) ERROR: General , 1674979779093> 0> at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:225) ERROR: General , 1674979779094> 0> at java.base/java.lang.Thread.run(Unknown Source) LOG : General , 1674979779094> 0> WorldDictionary: Warning: error occurred loading dictionary! ERROR: General , 1674979779094> 0> ExceptionLogger.logException> Exception thrown zombie.world.WorldDictionaryException: WorldDictionary: Cannot load world due to WorldDictionary error. at WorldDictionary.init line:255. ERROR: General , 1674979779094> 0> DebugLogStream.printException> Stack trace: zombie.world.WorldDictionaryException: WorldDictionary: Cannot load world due to WorldDictionary error. at zombie.world.WorldDictionary.init(WorldDictionary.java:255) at zombie.iso.IsoWorld.init(IsoWorld.java:2450) 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)

#

It crashes my game, it's presumably caused by this code.```
item WalkieTalkie6
{
DisplayCategory = Communications,
Type = Radio,
Icon = WalkieTalkiePolice,
Weight = 0.1,

    DisplayName        = Radio Tracker,
    
    UseDelta        = 0.1, 
    UseWhileEquipped    = FALSE,
    DisappearOnUse        = FALSE,
    TwoWay            = TRUE,
    TransmitRange        = 500,
    MicRange        = 0,
    BaseVolumeRange        = 14,
    IsPortable        = TRUE,
    IsTelevision        = FALSE,
    MinChannel        = 10000,
    MaxChannel        = 500000,
    UsesBattery        = TRUE,
    IsHighTier        = TRUE,
    WorldObjectSprite    = appliances_com_01_40,
    Tooltip = Can be used to track radio broadcasts.,
    StaticModel = WalkieTalkieTactical,
    AttachmentType = Walkie,
}
#

It also only does this when connecting to my dedicated server.

drifting ore
#

what do the first 10 lines of your item script look like

vague raven
#
module PZRPRadio
{
    imports
        {
            Base, Radio
        }

/************************ MADE BY DEVOTAN FOR PROJECT ZOMBOID ROLEPLAY ***********************/

    item RadioRedGrid
#

Is that what you were asking for?

bronze yoke
#

has this file ran before?

vague raven
#

The only thing in the file that doesn't work is that part.

bronze yoke
#

first thing that jumps out to me is the comment, but if that was fine before it's not going to be that

vague raven
#

It's just the tracking radio that doesn't work for some reason.

bronze yoke
#

i'm guessing the broken one is the last in the file?

vague raven
#

Nope.

#

I'll post the file.

drifting ore
#

this is the right name? WorldObjectSprite = appliances_com_01_40,

vague raven
#

I copied directly from items_radio.txt in the game files.

#

And I didn't edit that part.

drifting ore
#

fair enough ๐Ÿ˜„

vague raven
#

I changed MicRange, TransmitRange, DisplayName, and UseDelta.

#

That's it though.

#

And of course, the item name.

bronze yoke
#

maybe a non-unicode character snuck in somewhere

#

that's caused a lot of unexplainable issues before

drifting ore
#

true. can just copy and repaste the script anywhere that lets you paste raw values. there is a hotkey for windows but i forget

vague raven
#

Not sure what I'd use to do that.

drifting ore
#

word works lol

#

i only use that stuff while working typically so im sure googel docs also

#

maybe notepad++

vague raven
#

I'm using notepad++

#

Trying Google Doc so I hope that works.

drifting ore
#

ctrl+shift+v

#

does it

#

then just copy and paste back into your script file and save

#

if that doesnt fix then it's a small detail you are missing

vague raven
#

aight

#

Must be a small detail because that didn't work unfortunately.

dark wedge
#

I don't know if its this picky, but there is a space after the comma here for WalkieTalkie6 :
UseDelta= 0.1, ^M$
No other line has that. i'm just guessing at this point though (^M$ is the line ending)

drifting ore
#

wow good catch. not sure if thats it either but damn good eyes lol

vague raven
#

I'll try that.

drifting ore
#

if it's that finnicky... haha. interested to find out

vague raven
#

I made the UseDelta higher on the tracker so the battery runs out quicker but it's not important so I hope that fixes it.

#

Misunderstood what you were talking about for I second but I get it now.

#

Nope, that didn't work.

#

still getting this

dark wedge
#

Does anyone know of a way to get the player to stop turning (even for just a moment), or to make the turn NOT delay TimedActions? I have tried to store the player's turnDelta, then set character:setTurnDelta(0), but the game still seems to think your character is turning so they just stand there until some sort of internal timeout. I'm not doing any sort of waiting if the player is turning, this seems to be something that the game just does.
But this currently causes my offhand attack to be stuck if the player is turning until the turn is small enough to do the attack.

vague raven
#

I had someone else test it and it works fine

bronze yoke
tame mulch
dark wedge
dark wedge
#

Cool! That seems to have mostly solved it more or less. I am instead using the {get,set}DirectionAngle() to force the forward position until the animation starts. Literally just needed a few ticks to pass for it to just start the animation, and this works. Thanks for the idea!

faint jewel
#

should i release my menu mod?

#

or should i try to get some music for it working?

drifting ore
#

the raining one? why not soothing storm sounds.. lol

#

i dont think it would need music though personally. what do i know though.

drifting ore
#

is it possible to change a tile's property

{
    Type = Integer
    Name = PickUpLevel
    ShortName =
    Min = 0
    Max = 5
    Default = 0
}
``` specifically, or any tile property after game load?
jaunty marten
faint jewel
#

it should just be raining on the side

#

and then the music

jaunty marten
#

why u want to spent 105 seconds of my life..

faint jewel
#

it's the music that matters?

pulsar heath
#

what do you guys think about this for the stats icon for fire kills?

#

is this fine ( a molotov ) or should i use something else?=

rain shard
#

Hey all, a question: I'm having a context action require a base.apple but I want to know if there is a function to check for freshness so players can't just use a rotten apple.

pulsar heath
#

need some honest opinions for the icons Zombie Kills total, time alive and fire kills

#

still thinking about the car kills

faint jewel
pulsar heath
#

ok ok

#

just a se4c

faint jewel
#

that IS just some unsolicated advice.

dark wedge
pulsar heath
#

Like this?

faint jewel
#

oh yeah!

#

way easier to tell.

pulsar heath
#

ill change the background on all the others

dark wedge
#

agreed, much better with the lighter background

faint jewel
#

do them all grey?

pulsar heath
#

shouldnt they match?

faint jewel
#

i think zombie will look great and the calender will not.

pulsar heath
#

since its the same mod?

#

thats a good point

#

maybe diferent backgrounds for each?

faint jewel
#

bnot as bad as i thought!

jaunty marten
dark wedge
#

i think that came out fine

faint jewel
#

though i think doing it as a single day... might look better

pulsar heath
#

i had a transparent background but in some situations... it wasnt so good

#

the calendar?

faint jewel
#

mor like the right one i mean.

#

people will understand it better. it kinda looks like a factory atm.

dark wedge
#

you must now make 31 calendar icons and have it update in real game days.

pulsar heath
#

....

faint jewel
#

HAHAHA

drifting ore
#

lmao

pulsar heath
#

was thinking about that dhert

#

๐Ÿ˜„

#

like make the calendar icon match the day

#

but i think ill just be lazy and pick a random number for the calendar

#

hehehe

faint jewel
#

what day did the outbreak start?

pulsar heath
#

dont know but thats a good idea

#

lemme google it

faint jewel
pulsar heath
#

ahaha

faint jewel
#

i like that one.

pulsar heath
#

so do i

drifting ore
#

The incident is considered to have begun on the 4th of July, 1993, American Day of Independence. Just two days later the military evacuated residences from around the affected area and set up blockades in what is now known as the Knox Evacuation.

faint jewel
#

shadows for them all!

#

so i'd go the 7th

#

since that would be the day the most died.

drifting ore
faint jewel
#

7/7

dark wedge
#

no one can complain if that's "m/d" or "d/m" that way too

faint jewel
#

they have like every date lol.

fast galleon
drifting ore
#

i'm just trying to redefine the place and pickup level in this case

#

yet again, using a sandbox option lol

fast galleon
#

that should be doable

drifting ore
#

once i can figure out if it's possible it should be quick from there. i thought of other ways but i may not even mess with it if it gets too complicated

#

okay sweet

faint jewel
#

okay so to figure out how to play a looping sound via the ui.

drifting ore
#

i'll check some java stuff

#

having trouble with the loop part?

faint jewel
#

well period. lol.

drifting ore
#

haha

fast galleon
#

I don't have the code now but it should be like

Sprite manager:getSprite():getProperties:set()
faint jewel
#

well if you can make one that plays a .ogg repeatedly on the main menu, that would rock.

#

lol

pulsar heath
faint jewel
#

nice!

#

july might pop better in white?

pulsar heath
#

the month?

faint jewel
#

yeah

drifting ore
fast galleon
#

there should be a setVal in there probably

pulsar heath
#

im still thinking if i should include car kills or not...,

#

fire yeah i can see why someone whats to follow that

#

car kills...

#

meh

drifting ore
#

is it like a sub counter?

#

to have a total kill and sub counter would be sick

pulsar heath
#

im piggy backing from killcount

#

if its installed and enabled

#

i use the stats from the mod

#

it its not

#

i just use the game stats

#

so its up to the user if they want more detailed stats or not

#

wnat more? install the other guys mod

#

and mine works in co-op with it

drifting ore
#

thats not a bad idea

pulsar heath
#

i actually made the fucntions to kill the fire kills

#

but then... why should i? its already done

drifting ore
#

if i saw my kills though, seeing what it's comprised of would be interesting for sure

pulsar heath
#

so this way i dont have to code it and if someone wants it also needs the other dude's mod

#

so i think its a win win

drifting ore
#

yea and it's a small mod as well lol

pulsar heath
#

mine was only meant to have a way to display some stats in obs

#

so ill just give the option to have more stuff, just install the extra mod

#

๐Ÿ™‚

#

now lets see if the icons look good ingame

faint jewel
#

hey nippy, you think you could write up a function to just loop an ogg in the hdlogo lua?

pulsar heath
#

i think im happy with the result

faint jewel
#

i agree!

tender trellis
#

Lookin good

pulsar heath
#

now to add the code to save the position and orientation

#

should be easy enough

#
 --GetModFileWriter(String modId, String filename, boolean createIfNull, boolean append)
local writer = getModFileWriter("Twitch-Stats", "media/ui/TWSTATSpos.txt", true, false)
writer:write("x:".. tostring(STATSTab.getX(STATSTab)) .. "\n" .."y:" ..tostring(STATSTab.getY(STATSTab)))
writer:close()
end
drifting ore
drifting ore
#

i mean i get the first part

faint jewel
#

i repurposed the lua from that

drifting ore
#

just to be clear also, you asking for help or seeing if i can? im sure it wouldn't be too bad

#

i see the file you mean also here

faint jewel
#

a little of both?

drifting ore
#

sounds good im checking

#

seems like base game file being updated to do this?

#

ZomboidMusic.bank i think

#

trying to see if im wrong there somehow

devout flint
#

Really nice btw

drifting ore
faint jewel
#

lol i always run into stuff that's like damn.

pulsar heath
drifting ore
#

i know sounds is in media but i don't know if it's reachable via a mod because it's deep

#

steamapps\common\ProjectZomboid\media\sound\banks\Desktop

rain shard
#

while all you modders are up, I'm trying to check a player's inv for a required item when they do an action via the inventory context menu via this: if self.invMenu.player.getInventory()

but then get the following lua error:

java.lang.RuntimeException: getInventory: Expected a method call but got a function call. Correct syntax: ItemContainer obj:getInventory()```

But I thought the function was the correct way of referencing it if it was the player?
fast galleon
#

you need a method call
obj:method()
not a function call
obj.function()

thick karma
pulsar heath
#

well im done for now with modding... gonna chill out for a bit. Thanks for the help

drifting ore
#

nice job man

rain shard
#

Okay, I think I understand. Thank you both, I'll try this again not at 6 am.

devout flint
thick karma
blissful canopy
#

hi can I ask how do I create a NPC

pulsar heath
#

hmm, im having a little problem with the UI "updates"

#

so im detecting the mod killcount by looking if the table that the mod creates in the player mod data exists

#

that table only exists after the players kills one zombie

#

so when the game starts, the ui will default to the simples stats, time alive and zombie kills

#

but then the table for the killcount mod is created in mod data and the code detects it, but when i remove the ui and add the ui again

#

it stays the same, only if i reload the save it will change to the extra info in the ui

#
    STATSx, STATSy = loaduiXY()
    local player = getPlayer()
    local KillModData = player:getModData().AKCModData    
    if KillModData then
    print("KillCount MOD detected")
    STATSTab.KillCount = true
    print(STATSTab.KillCount)
    else 
    STATSTab.KillCount = false
    end
    if STATSTab.KillCount then
    STATSTab = STATSTab:new(tonumber(STATSx), tonumber(STATSy), 360, 165)
    if leftside == "true" then STATSTab.leftside = true else STATSTab.leftside = false end
    STATSTab:addToUIManager()
    STATSTab:setVisible(true);
    else
    STATSTab = STATSTab:new(tonumber(STATSx), tonumber(STATSy), 360, 110)
    
    if leftside == "true" then STATSTab.leftside = true else STATSTab.leftside = false end
    STATSTab:addToUIManager()
    STATSTab:setVisible(true);
    end
end```
#

or do i have to force a render? doesnt it render when i call the new?

spare knoll
#

Does anybody have an FBX file for the large backpack?

#

for blender

spare knoll
# blissful canopy hi can I ask how do I create a NPC

its extremely hard to do. Even the devs are still working on doing some of that stuff. If you're looking for NPCs in game, then I would just suggest SuperB survivors mod and even that is a little janky so good luck ma brother.

thick karma
#

Anyone have any clue whether cars can be relocated somehow?

#

i.e. teleported?

#

(Tried setX/Y/Z/Lx/Ly/Lz)

pulsar heath
#

dunno but cant you just copy the car table despawn the car an spawn in new location using the table?

thick karma
#

I'm just not sure how, that's all. I checked the code for the debug tool that lets you spawn vehicles. It seems to grab the vehicle data (not at all clear if it grabs said data in BaseVehicle form or not) and then it sends this command:

    local command = string.format("/addvehicle %s", tostring(vehicle))
    SendCommandToServer(command)

My problem with that command is that it has no obvious place for telling the vehicle where to spawn.

#

I guess I could try setX/Y/Z/Lx/Ly/Lz and THEN trigger that command on a vehicle object

pulsar heath
#

check the cheat menu mod, it has a function to spawn cars despawn them and select veichle etc

#

maybe you can see something there that will help you out ๐Ÿ™‚

thick karma
#

I bet it uses the same menu functions that are built into the game... would be unnecessary for most cheat purposes to spawn a car on a location other than your own

#

But I will check it out!

pulsar heath
#

never read much of the code handling the cars, only checked the weather bit ๐Ÿ˜„

#

and yeah... the weather bit uses the vanilla menu functions

#

so prolly the cars will do the same, but youll never know without having a look

polar thicket
#

The mod I am working on is not showing up ingame. For now I am just trying to make a tileset work. Ive done it correctly "based on didericks videos" but the mod itself wont show up in the ingame modlist

#

Ive also added the craftable code to make it a craftable items

#

What am I doing wrong?

#

Is there any proper guide anywhere to make a mod for custom craftable furniture?

sour island
#

So 0,0 would be on top of the element?

wet sandal
red tiger
sour island
#

hm can't get it to appear

#

is this something requiring it to be done in render?

sour island
#

that'd explain it

red tiger
#

Feels like there's not sufficient docs and tutorials for UI.

pulsar heath
#

there isnt ๐Ÿ˜„

sour island
#

this would also mean the vanilla way buttons can be given images are not to scale or aspect'd right

red tiger
#

I know it from all the time I spent working with and on it internally.

pulsar heath
#

im still having problems reseting the ui to add more elements when a certain condition is met

#

if i reload all the lua ( same as reloading the save kind off ) it works

#

i even remove the ui from everywhere and start a new instance and still

red tiger
#

Work has been demanding lately... I'd really like to work more on my HTML engine for UI in PZ.

sour island
#

Hmm I managed to use the drawn texture but the issues are still there - probably osmething else going on as it's a child of another element

pulsar heath
#

well i fixed my issue...

#

... char case mistake ...

#

the var was KillCount and i had Killcount on the check... so nill = false ...

sour island
#

I used that

neon bronze
#

would be texture drawn correctly by a resizable ui element?

sour island
#

the size is right - just seems like the colors are getting blured

red tiger
#

Mag filter probably

sour island
#

Seems to be effecting vanilla buttons on the left too

red tiger
#

I think that there's a way to make mag filter use nearest in PZ API.. not sure

sour island
#

the size is being set to match the textures though

red tiger
#

Check and see what moodleUI is doing in Java

#

I think that is doing something to keep it from blurring but not 100% sure.

sour island
#

I'll take a look

#

could be related to me messing with the vanilla toolbar

red tiger
#

Unless the game or UI is drawing over the image I don't see what could be causing discoloration.

#

UI in vanilla code uses no shaders.

red tiger
# sour island

Maybe try saving your png in a different editor or a different bit format..

sour island
#

I'll try that - what's the recommended?

red tiger
#

The png decoder or something else might be reading it wrong.

zinc pilot
#

are multi line comments allowed in the scripts txt files/

#

?

cosmic condor
#

attempted to alter the icons, still not looking good ๐Ÿ˜ž

sour island
#

same issues as me or?

cosmic condor
#

this one doesn't involve coding

#

just replace the tilesheets

sour island
#

I am just swapping the debug icon as well

#

although I do it through coding

ancient grail
sour island
#

I think the icons look fine tho - what about them doesn't sit well?

cosmic condor
ancient grail
#

How do you use pack file for purposes other than tile.? I want to learn that

cosmic condor
#

use this one as an example

sour island
#

I feel less bad knowing the vanilla icons are also getting scuffed

#

I tried sampling down to 8-bit

#

Moodles don't seem to have this issue - so I don't think it's an issue with coding vs repacking textures

#

Might just have to toss it on the back burner

#

I suspect it's something to do with children or the UI for the left side buttons

#

probably related to me messing with it too

cosmic condor
zinc pilot
pulsar heath
#

after 3 days i think i finally know enough about UI to start making better looking mods... but damn the learning curve is weird...