#mod_development

1 messages ยท Page 234 of 1

bright fog
#

But you can link a lua function to a call of a java function right ?

bronze yoke
#

no

thick karma
bronze yoke
#

you can link a lua function to a call of a java function by lua

bright fog
#

well nvm understood that thing wrongly that Crystal showed me a while ago then

bronze yoke
#

it's not the same and it means most times it isn't useful

bright fog
#

I see

thick karma
#

Only in tutorial

#

Steps is some kind of tutorial file

bright fog
#

Java modding requires manual installation of files by people right ?

vocal gulch
bronze yoke
#

yeah

bright fog
#

Could it be handled server side to only have the server download it for servers and in solo have players download it manually ?

#

Thinking of the pros and cons

#

And I see too many cons in that

bronze yoke
#

if you only need the java mod to affect the server, yeah

bright fog
#

I really don't like the idea of manual installation of files for people who just download the other mods that simply require the framework

#

People won't read the mod page of a framework

thick karma
#

That's an interesting question... where does createZombie get called? Serverside, clientside, or both?

bronze yoke
#

i'm guessing serverside

hot void
#

people can now tattoo each other >_>

bronze yoke
#

well actually, it never gets called

#

createZombie is specifically lua api

thick karma
#

Oh it's only for the Lua to call it in tutorial?

bronze yoke
#

java would go through something else

bright fog
thick karma
#

I see.

thick karma
hot void
#

me and shuru been fighting with code XD

bright fog
#

I think java modding isn't the solution here. I'm probably better off updating the stats of zombies every N ticks like I'm doing. Also considering some stats don't get updated because they are checked that they are already good

thick karma
hot void
#

both

thick karma
#

Sheeeeit... I am afraid to ask, but gamepad support?

bright fog
#

Like I have 7 stats I believe I update ? And half has a check to verify if it's good, if it's good it skips it so I would only have 3-4 stats getting updated every N ticks

bright fog
hot void
#

it does use the same old tattoo ui

#

but we edited that

thick karma
# hot void soon tm

lol I respect that it's being worked on. I asked because tattooing each other is 100% something my friend will want to do, meaning I'll need to do your gamepad support if you don't.

hot void
#

a lil

thick karma
bright fog
bronze yoke
#

when my cooking mod comes out i want you to know the gamepad support was created entirely in honour of you

hot void
#

still have to hook tattoing animation and sound to it

violet shell
thick karma
thick karma
#

I have never tried them. Except when I did.

#

Or seen them Except when I used them.

violet shell
#

Should I write ItenName_biocodedCureExp or ItemName_Asilar_Biocoded_Cure_Kit.biocodedCureExp ?

#

IG the translation works, but seems that the module name is not required right ?

thick karma
#

ItemName_biocodedCureExp seems right.

#

No wait

#

I'm crazy

#

Items have a weird format that I had entirely forgotten

#

Because I haven't touched them in awhile

#
ItemName_EN = {
    ItemName_TrueMusicJukebox.InstructionManual = "Jukebox Instruction Manual",
    ItemName_TrueMusicJukebox.StarterKit = "Jukebox Starter Kit"
}
#

You actually did it correctly afaik

#

ItemName_ModID.Translation apparently. @violet shell

gleaming sorrel
#

Ok ok

I've got someone who is willing to do some voiceacting for some of the zombies in my mods

I need to know how to access the .bank file that appears to hold all the sounds

bright fog
#

Know that bank files need to be manually installed

#

But anyway I can link you to the right resources

gleaming sorrel
bright fog
#

I haven't tried modifying the files tho since I already had it

thick karma
#

God why are item name translations so weird

bronze yoke
#

what's so weird about them?

thick karma
#

lol just that they are different at all from the others.

#

No dots in any of our other 5 translation files.

#

Just feels odd

bronze yoke
#

actually, why don't recipe translations include the module? isn't that bad?

verbal yew
#

it's translate by fullItemType.
Someone is translating by DisplayName

thick karma
#

It does make a certain sense to require mod id to distinguish common noun translations

#

Just weird to me to switch between underscores and . as delimiters from file to file and even within the variable name

#

If they could've been using . why even make me look at underscores ๐Ÿ˜ญ (they're so ugly)

bronze yoke
#

there's not much point having modules if some systems just don't recognise them

thick karma
#

For sure. It's just the punctuation that throws me.

bronze yoke
#

i guess the more descriptive naming conventions for recipes protects them from this being much of an issue

#

i have always thought it looks a little ugly but it's consistent

thick karma
#

Do they not use the module at all in determining which recipe translations to grab? They are declared within modules after all

bronze yoke
#

my recipe translations don't have a module

thick karma
#

I don't use them in the name of the variable but I figured another mechanism could be used to sort translations between mods.

bronze yoke
#

mod id ~= module

thick karma
#

True.

#

Might deviate there

#

That makes sense

bronze yoke
#

i'm curious if it's just so unlikely of a clash it's never come up

thick karma
#

I use my mod id for my recipe modules but realize now that might not be the case in a mod

verbal yew
#

if im not wrong, here exist stuff like if zombie has target

#

how about apply params to zombie only in this situation

thick karma
#

Figured I'd ask before we brought him in.

#

I could read the code but I know you're here and figured ya might know off the top.

bronze yoke
#

i think right now we don't expose anything you could do this with

#

i think it's all local tables

thick karma
#

๐Ÿ˜ญ No worries.

bronze yoke
#

the unreleased version of the mod automatically grabs all tapes for them

thick karma
#

Sick

#

So excited.

#

Someone fix that out-of-bounds error that happens <1 % of the time? (lol)

bright fog
thick karma
#

I use the mod so much that I still see it occasionally and wonder.

bright fog
#

There will be frames where zombies could have the wrong speed

#

Like open a door to a building, zombie gets loaded right behind because the building didn't get loaded before. Starts with massive speed, runs at player

#

Or have zombies switch speed visible by player

#

Is never a good experience even if it doesn't affect them in terms of danger at least

vocal gulch
#

just starting out with exploring the modding options. If I've connected to a server and downloaded mods that way through, where are they stored locally so I can potentially edit them?

#

continuing on that line, if I download any mods from the workshop, where are they stored in my root directory?

bright fog
#

So you can simply look on google where workshop mods are stored and that will give you hundreds of guides

bronze yoke
#

Steam\steamapps\workshop\content\108600\

bright fog
#

More general answer:
C:\Program Files (x86)\Steam\steamapps\workshop\content\108600

bronze yoke
#

look who installs games to their c drive...

bright fog
bright fog
thick karma
bright fog
#

I should

bronze yoke
#

i have a miniscule c drive that i have to desperately avoid putting anything on

bright fog
#

Does the job well enough for what I do with it

vocal gulch
#

I was lead astray for a moment

bronze yoke
#

it's not going well ๐Ÿ˜…

bright fog
#

OOF

#

Clean it lmao

bronze yoke
#

i do regularly!

vocal gulch
bright fog
#

Sure looks like it Eheh

bronze yoke
#

everything loves putting things on the c drive without asking you

bright fog
#

I always check these kind of things haha

#

I have this issue on my laptop

thick karma
#

I have so much space and it still fills up so fast

#

๐Ÿ˜ญ

bright fog
thick karma
#

I just want all the games ready to go

#

Is that so much to ask

bronze yoke
#

i know with just a little more i'd be fine

thick karma
#

Literally all of them?

thick karma
#

I now know I'll never be fine.

bright fog
#

Thinking about the stat updates for zombie again. It sounds like I might need to do some partial updating to zombies

verbal yew
bright fog
#

Update zombie stats from OnTick and access every zombies in the cell and update only a part of it

bright fog
# verbal yew :3

Too bad it's in russian or whatever that way we don't actually know how much space you have :>

verbal yew
#

lol

bronze yoke
bright fog
bronze yoke
#

i used one per tick for an application that affected zombie appearances and the change was never visible to the player

hot void
#

funny part is to add a tattoo it takes btween 30 mins to 4 weeks

hot void
#

but to remove it from 6 to 10 weeks

bronze yoke
#

i'm guessing they load far enough offscreen that no player can actually see a zombie before that would've reached them

bright fog
#

How did you cycle through the list of zombies ?

bright fog
hot void
#

pz players will die in 1 session XD

bright fog
#

You can go quite fast in vehicles

thick karma
#

currentIndex = (currentIndex + 1) % numberOfZeds

bronze yoke
#

it's been public in a popular addon for a year and received no reports

bright fog
thick karma
#

@bright fog

#

Use a current index that survives the function

hot void
thick karma
#

Increment it like that.

bronze yoke
#

yeah, that's the approach i took

hot void
#

and cut it into 3 timed actions

bright fog
hot void
#

itll be more work than fun

bronze yoke
#

yeah

thick karma
#

Right right, although I'd init it to 0

bright fog
#

Yeah

#

of course

thick karma
#

I assume local currentIndex inits to nil

#

Idk though

verbal yew
# bronze yoke yeah

do you know what contain here:
public int zombie.characters.IsoZombie. -- all params?

bright fog
#

modulo numberOfZeds ?

verbal yew
#

OH OH

#

javadoc

bronze yoke
#

looks like i took a slightly different approach actually```lua
ClothingOverrides.zeroTick = 0
-- this gets initialised somewhere else
local zombieList

function ClothingOverrides.OnTick(tick)
local zombieIndex = tick - ClothingOverrides.zeroTick
if zombieList:size() > zombieIndex then
ClothingOverrides.overrideOutfit(zombieList:get(zombieIndex))
ClothingOverrides.fixOutfit(zombieList:get(zombieIndex))
else
ClothingOverrides.zeroTick = tick + 1
end
end

bright fog
#

umpf

bronze yoke
#

it's the same idea either way though

red tiger
#

The UI is pretty solid now.

#

Things are clean.

bright fog
bronze yoke
#

during an OnGameStart handler

bright fog
#

But it should be updated dynamically ?

thick karma
bright fog
#

The list of zombies around a player constantly changes ?

thick karma
#

where numberOfZeds = zombieList:size()

bronze yoke
#

it's the same list though

red tiger
#

Also @thick karma

thick karma
bright fog
red tiger
#

You can poke at the uhh yeah UI stuff.

bronze yoke
#

the elements in the list change, not the list itself

thick karma
#

modulo forces it to be in the current range of the array

bright fog
bronze yoke
#

you can grab the zombie list once during OnPostMapLoad or OnGameStart and never have to grab it again

#

it's a waste to grab it every tick

bright fog
#

oh zombieList already changes by itself

red tiger
thick karma
thick karma
#

Not an issue.

bronze yoke
#

almost all arraylists can be cached like this without trouble

red tiger
#

Still, keep this in mind for future development.

thick karma
#

Valid

red tiger
#

Division is slower than multiplication so you can use an inverse operation for speed.

#

=)

thick karma
bright fog
#

So you never come back to the start ?

bronze yoke
#

local zombieIndex = tick - ClothingOverrides.zeroTick

#

ClothingOverrides.zeroTick is the tick at which it last looped around

verbal yew
#
local modData = zombie:getModData().zReRANDOMZOMBIES = {}
    modData.MyFlag = true

it's right construction?

verbal yew
#

from cringe

#

._.

bronze yoke
#

no, lua doesn't support passing through values like that

bright fog
#

You really need to fucking ditch the mod data on IsoZombie, seriously bro

bronze yoke
#

basically, tick - ClothingOverrides.zeroTick will always result in a number between zero and the length of the arraylist

verbal yew
#
zombie:getModData().zReRANDOMZOMBIES = {}
local zModData = zombie:getModData().zReRANDOMZOMBIES
zModData.MyFlag = true

?

bright fog
bronze yoke
#

number of ticks since the game started

thick karma
bronze yoke
#

when we reach the end of the arraylist we set zerotick to the next tick so that on the next tick that operation will start counting from zero again

bright fog
#

oh tick + 1

#

hmm

#

Can't that cause issues if the values goes too high ? I'm not familiar with that but that number go to billions of billions technically but the game can't handle that can it ?

bright fog
bronze yoke
bronze yoke
#

it would take far too long for this to be important to design around

bright fog
#

The game already doesn't handle it anyway

thick karma
bright fog
#

Tho that's an interesting thing, that means the game can crash eventually lmao ?

bronze yoke
#

iirc lua numbers are represented by doubles

bronze yoke
#

it just takes way too long to happen to matter

bright fog
#

And no one found a magic solution ?

bronze yoke
#

why solve it? it's not really a problem

bright fog
#

I guess

thick karma
# bright fog Tho that's an interesting thing, that means the game can crash eventually lmao ?

Also, if albion's method is unclear to you, here's an alternative that avoids modulo, assuming you grab numberOfZeds from some list at the beginning of tick and have a currentIndex:

-- this gets initialised somewhere else
local zombieList
local currentIndex = -1 (Will become 0 immediately)

function exampleOnTickFunction() -- Don't really need tick doing this.
    local numberOfZeds = zombieList:size()
    currentIndex = currentIndex + 1
    if currentIndex >= numberOfZeds then currentIndex = 0 end
    etc()
end
#

Does the same thing as modulo but maybe easier to understand (and possibly faster but Idk?)

#

Also then your counters never get enormous so if you're worried about big numbers crashing your game at the end of all time, well, you won't be the reason it happened.

verbal yew
#
  local square = zombie:getCurrentSquare()
  local squareXVal = square and square:getX() or 0
  local squareYVal = square and square:getY() or 0

  -- NOTE(belette) we have to include X and Y in the check to catch zombies that have been recycled
  -- from _intended_ default state (i.e. RZ happened to assign it to default bucket) to _unintended_
  -- default state (i.e. RZ would not assign it to the default bucket, even though it's the same zombie)
  -- see IsoZombie::resetForReuse and VirtualZombieManager::createRealZombieAlways for more info
  local shouldSkip = speedTypeVal == modData.BLTspeed and
      cognitionVal == modData.BLTcog and
      crawlingVal == modData.BLTcrawl and
      math.abs(squareXVal - modData.BLTx) <= 20 and
      math.abs(squareYVal - modData.BLTy) <= 20
#

lol

#

perfect notes

#

xD

bronze yoke
#

just checked, at 60fps it will take 4.8 million years to crash from this

bright fog
bronze yoke
#

so i'm not really worried

thick karma
bright fog
#

Let's see each others in 4.8 million yeah when Project Zomboid 30.9.1 is out

#

Actually nvm, when b43 is out

thick karma
bright fog
thick karma
#

I'd imagine so but I'm unsure tbh

#

(I think it's similar to avoiding a single modulo on a tick, regardless. Most likely not worth it ever.)

bronze yoke
#

addition is constant time

thick karma
#

Fair enough.

bright fog
#

what does that mean exactly ?

bronze yoke
#

it (should) always takes the same amount of time regardless of the input

bright fog
#

๐Ÿ‘Œ

#

Perhaps verify that ? ๐Ÿ‘€

bronze yoke
#

i say should because computers are not consistent

bright fog
#

You know how kahlua seems to act differently from your various theories now lol

bronze yoke
#

sometimes things just take longer and that's fine

#

you're free to test it, it'd be absolutely perplexing if addition worked differently in lua though

#

this isn't really implementation specific, this is fundamentals of computer science

bright fog
#

I'm not familiar with the way to test these stuff out tbf so I'll probably not bother with it too much lol

spring niche
#

hey yall, how likely is it for mods that add cities for them to spawn on top of each other

bright fog
#

One overrides the other

spring niche
#

ah i see

#

thank you

bright fog
#

But that can cause issues

#

With the player map + foraging zones

spring niche
#

hm

thick karma
#

I ran this code many times with different inputs:

function increment(number)
    local now = 0.0 + os.time()
    for index = 0, 1000000000 do
        local newNumber = number + 1
    end
    return 0.0 + os.time() - now
end

local theInput = 100
print(increment(theInput))
#

And it's actually slower for small numbers every time

bright fog
#

wat

thick karma
#

doing 0 + 1 over and over takes longer than 9999999 + 1 over and over

#

I am very confused by this

bright fog
thick karma
#

don't shoot the messenger

#

lol

bronze yoke
#

it could be because they're represented as floating point numbers

bright fog
#

So transform them in int before ?

thick karma
#

I'm consistently getting 8 when I run small numbers like 0, and consistently getting 5 or 6 with large numbers.

#

Idk why they would be... I'm sending it an int and never casting it

#

Only the durations are cast as floating points...

bronze yoke
#

number is a double

#

lua doesn't represent them differently

thick karma
#

Just automatically, I see

#

I figured Lua automatically handled integers in a way that would be more efficient for integers.

#

Wasn't sure what went on behind the scenes

vestal gyro
#

yeah its not getting initalized as in I can't actually see it in the item list ingame

bronze yoke
#

lua 5.3? i think introduces an integer type

vestal gyro
#

dunno why it wouldn't

thick karma
#

I seeeee

vestal gyro
#

All the files are named correctly and in the correct place

bright fog
#

I don't think you need to do that

vestal gyro
#

I did it for all other ones as well and it works flawlessly for them

bright fog
#

hmm

vestal gyro
#

yeah it's not appearing at all

#

its also got the right files in the zomboid mods folder so I really have no idea

pine patio
mellow frigate
neon bronze
vestal gyro
#

yes I did

#

the other items for the mod show up

mellow frigate
vestal gyro
#

yep

mellow frigate
vestal gyro
#

nope

mellow frigate
#

do you have multiple versions of the mod on your computer ? ๐Ÿ˜„

vestal gyro
vestal gyro
pine patio
#

Does the guid in that file match the one in the guid table?

vestal gyro
#

yep

#

this is in both xml files which I'd have to add, but they should still show up on the itemlist

mellow frigate
vestal gyro
#

I'll try some stuff and let you know if it's that

#

jsut changed the mod.info thing to distinguish

#

if it's that istg

vestal gyro
#

yeah the one in zomboid is 1.01 while the one im working on rn is 1.10

thick karma
#

That was the only guess I had about that issue as well. Never seen it for any other reason.

verbal yew
# thick karma The way you're making your table is correct. Good luck with the zombie mod data ...

https://www.youtube.com/watch?v=r2QWTccBduM

local zModData = zombie:getModData() -- idk why, but stuff with {} not work for me lol(((

local square = zombie:getCurrentSquare()
local squareXVal = square and square:getX() or 0
local squareYVal = square and square:getY() or 0
-- and we can skip this IsoZombie, if they mess somewhere else, but another coordinate 
local shouldSkip = 
  math.abs(squareXVal - zModData.BLTx) <= 20 and
  math.abs(squareYVal - zModData.BLTy) <= 20
if shouldSkip or (not square) then
  return true
end
-- DO STUFF WITH SPEED
-- and
zModData.BLTx = squareXVal
zModData.BLTy = squareYVal
-- I guess it's not ideal, but it's a good method to work with moddata on zombie
thick karma
#

@verbal yew I'm unclear on what the video shows... Same zombies getting speed edits (after you teleport)?

#

I play random zeds with sprinters lol nothing in that video is obviously modded to me

#

I am probably oblivious

verbal yew
#

zombies changes like isoZombies, but still contain their moddata.
Coordinates check for exclude this isoZombies something else (to generate speed again)

#

like, old zombies be changed like isoZombies, but in moddata contain my speed setting, zombies get it back

thick karma
#

I missed the part of the convo where someone explained the difference between a zombie and an IsoZombie. I thought the zombies chasing me and eating me were all IsoZombie objects, as I am an IsoPlayer object. Aren't they?

#

When you say "zombies changes like isoZombies", I have no clue what that means.

#

I think something is being lost in translation or I just don't know enough about zombie management to process this.

verbal yew
#

i think they sawpped

#

or something else

#

before teleportation
after teleportation

bronze yoke
#

seems that way yeah

thick karma
verbal yew
#

but now it's work like with coordinate X Y in moddata to exclude this isoZombie mess something else on another isoZombie

#

not perfect

#

but work

#

if not use teleportation

bronze yoke
#

to explain how zombies work:
when a zombie is unloaded, the IsoZombie has its values reset and added to the reuse pool
when a zombie loads, if there are any IsoZombies in the reuse pool, that IsoZombie is spawned with the appearance and other stored properties of the new zombie. only if there are no zombies in the reuse pool a new IsoZombie is created

thick karma
#

"Sometimes your zeds just feel like crawling around, and other times they sprint after you and rip off your face. Enjoy Moody Zombies!"

bronze yoke
#

the bug with moddata is that when IsoZombies are reset for reuse, their moddata doesn't get cleared, so when the new zombie is created it inherits the moddata

verbal yew
thick karma
#

Or Really Random Zombies!

#

"PZ of course has random zombie settings, but what if zombies could be randomer!?"

#

"What? That zombie we saw earlier is walking again? So random!"

verbal yew
#

As if, yes, when we come to a point where three zombies are different (pink runner, blue crawler, yellow walker), we will always get different zombies, but the essence will remain the same - there will be a runner, a crawler, a walker.

And these zombies will be excluded elsewhere by checking the coordinates from the moddata

thick karma
#

Get Really Random Zombies Today!

bright fog
#

People could use it to make maps no ?

thorny kayak
#

maybe you can look at cdda zombies mod

verbal yew
#

In fact, just by playing, hardly anyone will understand the difference.
Only like this at the level of code and tests, knowing the ins and outs

thorny kayak
#

it has also random zombies

mellow frigate
thick karma
#

Unless people are in the habit of befriending specific zombies.

#

And looking for them.

bronze yoke
#

this is basically how zombies work anyway, the fine details are fuzzy

thick karma
#

And caring for them.

bright fog
bronze yoke
#

and this problem is literally unavoidable

#

the pid method that's been mentioned a few times isn't actually unique

#

it's just nearly unique

#

there is absolutely no truly unique persistent id for zombies

bright fog
#

Yeah but it definitely is unique enough

thick karma
#

Can someone please publish this so I don't have to do it?

local AutomaticGod = {}

AutomaticGod.deifyMeBaby = function(playerIndex, player)
    player:setGodMod(true)
end

Events.OnCreatePlayer.Add(AutomaticGod.deifyMeBaby)

return AutomaticGod

I wanted to send a mod for this to someone the other day but it seems to not exist? To help people who are in near-screwed situations and would rather cheat than die and keep playing lol.

bronze yoke
#

i actually was in that situation before, before i was a modder, i ended up using some weird cheat menu for it

thick karma
#

I feel like it will come up again

#

And being a simple workshop item would be useful

bronze yoke
#

i was editing the database to revive my character but they'd instantly die from wounds

thick karma
#

I see I see.

#

That is exactly what this would be for I imagine.

#

Anyone please take it and publish it

#

I do not want to do the file structures and workshop desc and talking to users lol

#

and link me so I can use it in mod support lol

bright fog
#

I guess I can do it if you want

#

Make me some cool images to explain what it does

verbal yew
#

hmmm... no one create predying state... when you down on knee and can crawl so slow with bleeding bar, but after dead you just lose consciousness and respawn somewhere +-more xy cooridinates, in this case something may disappear from the backpack...

bronze yoke
#

this has been done but it ends up buggy as hell

#

i was maintaining a mod that does this and it was such a nightmare

verbal yew
#

hmmm

#

ok, if you already had problems. I definitely won't take it... xD

uneven vessel
#

@verbal yew seems to work now

#

and the zombies seem nice and snappy now

#

less clunky

verbal yew
thick karma
bright fog
verbal yew
# bronze yoke this has been done but it ends up buggy as hell

but how about lose consciousness, just like teleport player somewhere by coordinate and remove zombies ~10-20 tiles around, with some kind of screen shading and animation of getting up from the floor (bandage wounds, if any, restore health to 20%)

bright fog
#

dw I found something

thick karma
#

It just makes you invincible immediately

bright fog
#

Yeah thx for explaing those 2 lines of code to me, idk what I would do without you

thick karma
#

Probably need to figure out what anti-cheat to tell them to disable

verbal yew
#

lol)

thick karma
#

I'm like wdym how could it be more obviously

bright fog
bright fog
thick karma
verbal yew
thick karma
#

Say you're playing with 2 friends and all trapped

thick karma
bright fog
#

It does actually lmao

thick karma
bright fog
#

It looks nice

#

Whatever, people will figure it out xD

thick karma
#

Lmao

#

They will not

bright fog
#

I took this for the image

thick karma
#

They are so horrible at figuring it out

bright fog
#

Perhaps the other is better ShibaNom

thick karma
#

No matter what it is

#

It takes people so long

#

To figure it out

#

๐Ÿคฃ

verbal yew
#

think user, think!

thick karma
#

That Zeus-like god is classic

#

I mean listen people love mythology about gods probably a billion perfect pics for it

thick karma
verbal yew
#

HOLY MOLLY

thick karma
#

Unsure

verbal yew
#

my loved car from gta sa

bright fog
#

@thick karma

verbal yew
#

do you know best thumbnail on workshop zomboid?

thick karma
verbal yew
#

best, ever

thick karma
#

lol that's not bad but best is strong

#

There are many good ones

verbal yew
#

this is on the second place

vestal gyro
#

I fucking hate how icons work

bright fog
#

@thick karma (ups need to wait a bit)

bright fog
thick karma
#

Awesome @bright fog

vestal gyro
#

can't make a good texture because each icon has only a few set colours

thick karma
#

It'll take a second, always does that for longer when you drop it quick, it'll fix itself.

bright fog
#

yeah ik

verbal yew
#

uhh... should to go make my trophy fish

thick karma
#

Perfect

#

Community served

bright fog
#

:D

thick karma
#

I hope it sets a precedent and everyone gives the mod more hot sauce

bright fog
#

You should check out the single lua file in the mod

bright fog
thick karma
bright fog
#

:)

verbal yew
bright fog
#

Since you didn't want any comments, here ya go

thick karma
#

Lol you bastard

#

โค๏ธ

bright fog
#

:D

#

Barely anyone will check the file lol

thick karma
#

Lol I know

#

Hopefully none of the worst people

bright fog
#

Gotta change name now I guess

#

So people can't find you

thick karma
#

Lol totally.

verbal yew
#

renamed into Sir Doggy Jvla

#

OR WAIT WAIT WAIT! We all renamed into Burryaga

uneven vessel
verbal yew
uneven vessel
#

So I must lower it

small topaz
#

Hey! Anyone happens to know a lua command with which you can set a ui tick box to true or false (i.e. showing a tick or remove one)? I mean the tick boxes which you can create in lua via
local myTickBox = ISTickBox:new(...)

coarse sinew
slow hound
#

Would a Nutrition testing mod that lets you know when your nutrition is within a reasonable range, as well as detect when you have bonus STR xp or penalty xp based on protein levels, be a mod that is worth releasing?

bronze yoke
#

didn't tcherno make a protein moodle mod?

slow hound
#

no idea. Lots of mods to dig through to find stuff

#

I'll share a snip of what i have so far. far from finished and the text isn't lined up perfectly

small topaz
slow hound
#

@bronze yoke this is where i'm at so far

slow hound
#

seems to have issues but can see in browser

bronze yoke
#

oooh that's a much better way of displaying it

slow hound
#

i'm using a different way

#

i'm tryin gto make it more fun

bright fog
#

your gif is broken as hell lmao

bronze yoke
#

i didn't really like the moodle, it feels out of place

untold orbit
#
error: cannot find symbol
                return var1.getFileName().toString().matches(var1);
slow hound
#

hate discord not me ๐Ÿ˜ฆ

bright fog
#

Why would you make your gif so huge

slow hound
#

no idea working for me. sorry

bronze yoke
#

it worked fine for me

slow hound
#

because my monitor is 3440/1440

#

i dont hav a choice]

bright fog
slow hound
#

tyty

bright fog
#

But yeah that could be nice

#

That was with you we were talking about those too ?

#

Could be the solution lmao

slow hound
#

i'm learnin UI

bright fog
#

That's not bad

slow hound
#

thanks to umbrella and zedscript

#

made this insanely easy

#

Well thank you I shall continue development

#

last question does this ground item look too shit?

#

when i see some mods like hydrocraft. my goal is not not have icons that look this way

verbal yew
#

Zoject Promboid xD

vestal gyro
#

why isnt this using the model

#

there also is no proper model for a t-shirt (atleast not in the skinned folder)

#

can I just use
<m_MaleModel>skinned\clothes\bob_jacket</m_MaleModel> <m_FemaleModel>skinned\clothes\kate_jacket</m_FemaleModel> <m_GUID>c819248b-8cf4-474e-824f-379f8b542149</m_GUID> <m_Static>false</m_Static> <m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomTint>false</m_AllowRandomTint> <m_AttachBone></m_AttachBone> <m_Masks>13</m_Masks> <m_Masks>14</m_Masks> <m_Masks>3</m_Masks> <m_Masks>5</m_Masks> <m_UnderlayMasksFolder>media/textures/Clothes/Jacket/Masks</m_UnderlayMasksFolder>

earnest minnow
#

Would anyone mind sending me the .java for the vehicle events? It should be where RVSChangingTire.java is located

earnest minnow
red tiger
#

Unless you're asking as a small commission.

#

This is my area of expertise for PZ modding / general modding.

earnest minnow
red tiger
#

Feel free to shoot me what you need and for how much via DMs.

bright fog
earnest minnow
slow hound
# red tiger Okay. Good luck.

Thank you for all your efforts in making tools for modders. I know Albion and Omar deserve thanks for Umbrella too so thank you both, but I can see you are about helping modders succeed and it's no small undertaking. Thanks

red tiger
untold orbit
#

Hey Jab

Why do I get this error when I try to play around with LuaManager?

error: cannot find symbol
                return var1x.getFileName().toString().matches(var1);
                            ^
  symbol:   method getFileName()
  location: variable var1x of type Object
        private static void deleteSavefileFilesMatching(File var0, String var1) {
            DirectoryStream.Filter var2 = (var1x) -> {
                return var1x.getFileName().toString().matches(var1);
            };

            try {
                DirectoryStream var3 = Files.newDirectoryStream(var0.toPath(), var2);

                try {
                    Iterator var4 = var3.iterator();

                    while(var4.hasNext()) {
                        Path var5 = (Path)var4.next();
                        System.out.println("DELETE " + var5);
                        Files.deleteIfExists(var5);
                    }
                } catch (Throwable var7) {
                    if (var3 != null) {
                        try {
                            var3.close();
                        } catch (Throwable var6) {
                            var7.addSuppressed(var6);
                        }
                    }

                    throw var7;
                }

                if (var3 != null) {
                    var3.close();
                }
            } catch (Exception var8) {
                ExceptionLogger.logException(var8);
            }

        }

I didn't touch this method but its still complaining about getFileName()?

#

This is from LuaManager.java

verbal yew
#

Guys

slow hound
#

what's the name of the file?

#

maybe this is the problem

verbal yew
#

how changed icon name for burnt, rotten or another food?

slow hound
verbal yew
slow hound
#

you suffix the name with the parameters

slow hound
#

i'll show how it says in zedscript

verbal yew
#

like
item_myfood_burnt?

#

cooked

#

etc?

slow hound
#

yes

verbal yew
#

thanks

slow hound
#

i wanted to make sure i worte it correct ๐Ÿ˜„

red tiger
#

I'm being distracted by the tornado outbreak rn.

#

So that method in LuaManager.. Are the right objects / params passed?

untold orbit
#

I never used the method its just when I try to compile the IDEA complains about getFileName() not being recognized

red tiger
#

Oh.

#

This is a generic thing that you may not know.

#

So for the lamdas in there, most of them use <Path>

#

Try adding this to those objects. This should fix those.

thick karma
# slow hound

I think that looks pretty cool. I say keep up the good work and if you need help adding a basic close action for gamepad players, ping me.

slow hound
untold orbit
#

I'm sorry but I don't understand what you mean by adding <Path>

red tiger
slow hound
#

thank the gods. multiplayer joypad stuff seems easy once you get it but there is alot to it

red tiger
#

I also worked on radial menus as a DOM element for the JSX factory I was writing in January of 2023 for TypeScript TSX modding.

#

Yeah it's actually possible to write HTML for UI with that prototype.

#

Was a fun experiment / tech demo.

#

Roughly anyone writes mods in TypeScript here so it isn't worth pursuing unless I wrote a HTML & CSS parser.

slow hound
#

that's crazy

red tiger
#

My project this week is Mallet, a program that imports & exports JSON data that compiles into Lua typings for Umbrella.

untold orbit
#
DirectoryStream.Filter var2 = (Path var1x) -> {
                return var1x.getFileName().toString().matches(var1);
            };

Incompatible parameter types in lambda expression: expected Object but found Path

untold orbit
#

aah that fixed it, why was it not included in the decompiled file? Is it a problem with the decompiler missing this?

red tiger
#

Yeah it's generic. Generics are erased when compiled to bytecode.

#

The JVM doesn't see anything generic. It doesn't need to because the compiler ensures any generic logic is consistent with the rules of the language.

#

This is also why you sometimes see boolean values assigned to integer local vars.

#

Compiler optimization.

#

Once you know what needs to be generic and their types, fixing these files becomes trivial.

untold orbit
#

oh so I just need to learn that Filter uses <Path> etc?

red tiger
#

Filter uses anything IIRC.

#

You need to know what the implemented code is calling and assign the correct type.

#

So you'll see HairStyle and BeardStyle code erroring out below that. You'll know that they'll need to be placed as generic types in that code.

#

You should also take the time to optimize the iterator while loops as foreach loops.

#
    @LuaMethod(name = "getAllBeardStyles", global = true)
    public static ArrayList<String> getAllBeardStyles() {
      ArrayList<String> var0 = new ArrayList<>();
        if (BeardStyles.instance != null) {
            ArrayList<BeardStyle> var1 = new ArrayList<>(BeardStyles.instance.m_Styles);
            var1.sort(
                    (var0x, var1x) -> {
                        if (var0x.name.isEmpty()) {
                            return -1;
                        } else if (var1x.name.isEmpty()) {
                            return 1;
                        } else {
                            String var2 = getText("IGUI_Beard_" + var0x.name);
                            String var3 = getText("IGUI_Beard_" + var1x.name);
                            return var2.compareTo(var3);
                        }
                    });
            for (BeardStyle var3 : var1) {
                var0.add(var3.name);
            }
        }
        return var0;
    }
#

When decompiling, generic redefinitions will be the majority of your work.

untold orbit
#
@LuaMethod(
                name = "getAllHairStyles",
                global = true
        )
        public static ArrayList<String> getAllHairStyles(boolean var0) {
            ArrayList var1 = new ArrayList();
            if (HairStyles.instance == null) {
                return var1;
            } else {
                ArrayList<HairStyle> var2 = new ArrayList(var0 ? HairStyles.instance.m_FemaleStyles : HairStyles.instance.m_MaleStyles);
                var2.sort((var0x, var1x) -> {
                    if (var0x.name.isEmpty()) {
                        return -1;
                    } else if (var1x.name.isEmpty()) {
                        return 1;
                    } else {
                        String var2 = getText("IGUI_Hair_" + var0x.name);
                        String var3 = getText("IGUI_Hair_" + var1x.name);
                        return var2.compareTo(var3);
                    }
                });
                Iterator var3 = var2.iterator();

                while(var3.hasNext()) {
                    HairStyle var4 = (HairStyle)var3.next();
                    var1.add(var4.name);
                }

                return var1;
            }
        }
error: variable var2 is already defined in method getAllHairStyles(boolean)
                        String var2 = getText("IGUI_Hair_" + var0x.name);

Didn't touch, not sure why I get that error

red tiger
#

Check my code.

#

I named one as var1x

#

The decompiled code is optimized here for the JVM by reusing that var2.

vestal gyro
#

kinda weird that every clothing type has a somewhat different syntax when it comes to the xml file

untold orbit
#

I assume I can just rename the var2 inside the lambda to var2q for example?

red tiger
echo lark
#

does anyone know if you can attach weapons to bones?, trying to make a clawed glove type of weapon and use the bat swing anim. but it kind of floats off of the hand when walking/swinging and its impossible to line up, was wondering if its possible to attach it to the hand bone

#

asking cuz i noticed this on the wiki

#

but doesnt seem to do anything, so wondering if its just not possible or im doing something wrong

untold orbit
#

If I want to add a method from Java to Lua can I just do it like this?

        @LuaMethod(
                name = "testMethod",
                global = true
        )
        public static void testMethod(String var0) {
            ...
        }

I tried to do so but when I use it in Lua it says its nil? Do I need to register it elsewhere too?

red tiger
#

Hahaha.. Redis.

#

Okay yeah that should work if it's in the globalobject.

#

You can add it externally but it's a couple method calls.

untold orbit
#

All right but why do I get nil then ๐Ÿค”

red tiger
#

If you're expecting a return you made the method void.

untold orbit
#

lmao I haven't slept enough ๐Ÿ˜‚

#

Thanks!

#

Wait a minute ๐Ÿ‘€
I am not expecting a return, I am running a method and not returning anything

#
Object tried to call nil in OnServerStarted
#

could it be because of this:

Illegal/unsupported escape sequence
String[] var1 = var0.getAbsolutePath().split("\\" + File.separator);
red tiger
#

Those errors didn't stop my copy from working.

untold orbit
#

Forgot to upload the .class files

#

Works now!

small topaz
#

When I call getText("ConextMenu_TrimBeard_For") the game outputs Trim Beard for %1 where %1 seems to be a place holder for another string by which it can be substiuted. Is there a way to delete the %1 from the output so that I just get Trim Beard for? I already tried the gsub command:

text = string.gsub(text, " %1", "")```
but this resulted in an error for me.
slow hound
#

maybe don't use %

#

or use " %%1" lol

small topaz
slow hound
#

cuz lua uses % already

#

so two cancels out

#

i look on lua website quick also just now

thick karma
#

You can send it a variable to sub into a marked position of the string

slow hound
#

would be what lua uses % for normally i thinks. still new ish to lua

small topaz
thick karma
thick karma
#

I'm sure a lot of my lazy concatenations will look like Yoda-talk in Japanese

sonic needle
#

hand model's? yeah. plenty

verbal yew
#

trophy fishing with low chance

sonic needle
#

BIGGER.

verbal yew
red tiger
#

A landlocked state with fish bigger than gators.

verbal yew
#

xD it's commission

untold orbit
#

bruh why is

public static Faction createFaction(String var0, String var1)

Not actually used? The constructor is but this function isn't called from anywhere?

#

I can use the constructor to check when a faction is made but how do I check if its removed?
This does not seem to be used either:

public void removeFaction()
red tiger
#

A lot of hands in the pot that have differing philosophies / code-practices.

#

There's a bit of code in there that's 10 years old.

thick karma
#

I'd have to review the code.

untold orbit
#

I guess they just edit the arraylist from some other class lmao

red tiger
#

Or Lua.

#

A cheat exploit came originally from this fact.

thick karma
#

There's a Lua function that can be hooked

#

I just forget which

red tiger
#

It was a safehouse teleport packet which was client-auth so hackers teleported players to a spot and killed them instantly with another exploit.

#

Was really bad. This exploit is what pushed me to write my anti-cheat originally.

bright fog
untold orbit
#

Do we know or is there anywhere to read about planned changes code wise for B42?

red tiger
#

The best I can do is update PIpeWrench which is generated Java API typings and it'll show all the literal differences.

#

PipeWrench is cool because it shows the differences through Git commit diffs.

sonic needle
bright fog
#

You need to link the model to a bone right ?

#

The guy was saying he was trying to get his fbx to x

#

To have the item in hands

sonic needle
#

OH FOR ANIMATION

#

seperate issue.

sonic needle
bright fog
#

Just to have the item in hands lmao

#

@violet shell

sonic needle
#

๐Ÿ‘‰ ๐Ÿ‘ˆ ๐Ÿฅฐ

violet shell
#

Hi ๐Ÿ™‚

#

I got a clue by AuD

#

Seems I need to add in my item def : primaryAnimMask = HoldingTorchRight, secondaryAnimMask = HoldingTorchLeft, but couldn't try it yet

sonic needle
#

i was about to type all that, but now ill type 75% of it

violet shell
#

Lol ๐Ÿ™‚

#

I'm still reading you ๐Ÿ™‚ I am very curious about that ๐Ÿ™‚

sonic needle
#

item ScrapMetal
{
DisplayCategory = Material,
Weight = 0.1,
Type = Normal,
DisplayName = Scrap Metal,
Icon = ScrapMetal,
MetalValue = 30,
SurvivalGear = TRUE,

    StaticModel = ScrapMetal,                            <-------------------Make sure items have this for in hand in world usage in recipes as well as a secondary source

    WorldStaticModel = ScrapMetal,
}
bright fog
#

you don't have to use .x models, that's at least confirmed

#

Just like I told you, don't even aproach .x

#

If you can just not use it, don't use it

sonic needle
#

recipes that load a model,

prop = MODELNAMEHEREPLS
prop1 = MODELNAMEHEREPLS

these go in a recipe, so the player will, do the Human thing and HOLD the item

#

Remember, Anyone can always @ me, for related things / insight for PZ,

violet shell
#

what are prop & prop1 ?

sonic needle
sonic needle
# violet shell what are prop & prop1 ?

when you craft something, you cna instruct PZ's engine to attach a model, in each hand, these coincide with a marker on the male and female body FBX model's placed by the dev's

#

this is ALSO why EVERY animation mod that does POSES is Wrong. All the TIME.
Annoys. me. to. HELL.

#

when you make a pose anim, or anim in general, the Marker assigned to each hand, left and right MUST BE MOVED WITH THE HAND

sonic needle
#

Highlighted for you.

Wherever these go in an animation. Your GUN, ITEM, ETC WILL FOLLOW AT ALL TIMES DURING IT.

#

this does mean you can break the system and chuck a firearm, football etc by yeeting the marker.

bright fog
#

zombies don't have items in hands thanks god hahalol

sonic needle
#

they CAN tho.

bright fog
#

I completely ignored these for my zombie animations

bright fog
sonic needle
#

you can make those zombies fire guns, etc. Anything you can do ingame. They can TOO

sonic needle
#

just doesnt make sense in default unmodded pz ๐Ÿ™‚

But Modding wise? yeah you could

sonic needle
#

Sure can. uno momento~

violet shell
#

tyvm

sonic needle
#

recipe Saw Logs
{
Log,
keep [Recipe.GetItemTypes.Saw],

   CanBeDoneFromFloor:true,
   Result:Plank=3,
   Sound:Sawing,
   Time:230.0,
   Category:Carpentry,
   OnGiveXP:Recipe.OnGiveXP.SawLogs,
   AnimNode:SawLog,
   Prop1:Source=2,
   Prop2:Log,
}
  • EXAMPLE ABOVE ^
#
  • Prop1:Source=2,
  • Prop2:Log,

These refer to the MODEL of the Log itself and not the ITEMNAME ID

#
  • Further INFO

CanBeDoneFromFloor:true,

Bypasses the XML AnimationLock system.
Allows the player to do as stated. interact directly with ISOworld during an animation

but probably isnt limited to that

bright fog
#

You've got an issue with spaces I swear lmao

sonic needle
#
  • ANIM SELECTION

  • AnimNode:SawLog,

[ SawLog ] is the anim name for the action used, an x file has the data.

#

i type. way. too fast.

#

adhd meds

bright fog
#

I mean, you can just not put that many spaces no ? BriarHaha

sonic needle
#

i run with it, at this point

bright fog
#

Me when I see Ashe modpages:

violet shell
#

Ok, I start to get it. Can I use those prop & prop1 without an animNode ?

sonic needle
#

oh he wants more SEETHROUGH.

bright fog
#

ono

sonic needle
violet shell
#

ok, my goal for now is just to have the character actually have the item in hands when they use it

thick karma
sonic needle
violet shell
#

at least for the first one. For the second, it's a serynge, my dream would be that the character actually use it like we use a serynge

sonic needle
violet shell
#

I just took the granolabar model and changed the texture

bright fog
bright fog
#

Have to go slowly do things

#

I'm getting back to TLOU Infected rn

sonic needle
bright fog
#

nah

sonic needle
#

ill be looking into the patches for PFO soon

bright fog
#

Last time I stopped on the fence animations

#

This shit made me go crazy

#

But here I'm getting back to the coding part, the part I love most to change a bunch of stuff I marked

#

Got a bunch of interesting stuff to do

red tiger
#

I'm happy. Already having code that detects Lua classes and their properties, building profiles in my software to document.

sonic needle
#

anims are hard work. i know.

i hope the dev's truly fix the flaws for us.

the flaws ?

direct X ".x" Locked anim files.

the fix? make them .fbx

bright fog
#

I'm pretty they are not going to change how animations are made in the game

#

That definitely is not changing

sonic needle
#

was planning to invest to Full MoCap, to help modder's get Easy anim's for things.
Still the plan

bright fog
#

The fact they didn't mention anything about that and that they keep adding stuff to the system, doesn't give me hope they'll do any improvement on it

sonic needle
#

i doubt they can mention it,
Counts as Spoiler info, of which there would be a great deal we have not seen

#

i would, assume B42 would have a seperate NDA at this rate, based on how much is inside it

sonic needle
#

nondisclosure agreement, document

#

effectively Zomboid Perjury

#

if broken.

violet shell
#
    {
       myItem,
       CanBeDoneFromFloor:false,
       Result:recipeResult,
       Sound:mySound,
       Time:120.0,
       Category:Health,
       Prop1:myItem,
       Prop2:leftHand,
    }```
@sonic needle This should do it or not ? how I can point to the second hand ? or a arm for example ?
sonic needle
#

each prop, is a Hand

#

prop2 is right hand
prop1 is left

#

your item, is in the left hand ๐Ÿ™‚

#

i may have just thought on how to juggle an item. by breaking the system XD

violet shell
#
    {
       myItem,
       CanBeDoneFromFloor:false,
       Result:recipeResult,
       Sound:mySound,
       Time:120.0,
       Category:Health,
       Prop1:myItem,
    }``` This ?
sonic needle
#

yep, item held in left hand,
can you paste the item statblock ? ( its script )

violet shell
#

item Autotest_Knox_Infection
{
DisplayName = Biocoded Autotest,
Icon = Autotest_KnoxInf,
DisplayCategory = FirstAid,
Weight = 0.1,
StaticModel = Autotest_KnoxInfStatic,
WorldStaticModel = Autotest_Ground,
}

sonic needle
#

recipe Use my item
{
myItem,
CanBeDoneFromFloor:false,
Result:recipeResult,
Sound:mySound,
Time:120.0,
Category:Health,
Prop1:Autotest_KnoxInfStatic,
}

#

a working one, would be this ^
so long as the Modelname, that is loaded, is called "Autotest_KnoxInfStatic"

violet shell
#

model Autotest_KnoxInfStatic
{
mesh = Autotest_KnoxInfStatic,
}

model Autotest_Ground
{
mesh = WorldItems/Autotest_KnoxInf,
scale = 0.4,
}

sonic needle
#

model Autotest_KnoxInfStatic
{
mesh = WorldItems/Autotest_KnoxInfStatic,
texture = WorldItems/Texturenamehere,
scale = 0.4, "<--- not needed: is optional"
}

#

^ example, but do your own testing ๐Ÿ™‚

violet shell
#

yeah, but I named my textures strictly the same as the model so it applies it seems

sonic needle
#

yes that works fine

violet shell
#

Can I bother you more ?

violet shell
#

My other item is a serynge, and I would like that when the character uses it, it have it in right hand, and move the serynge to the left arm. Can I do that without an animation, just with props ?

#
        keep biocodedCureExp,
        Result:BiocodedCure_Result,
        Sound:BreakAmpule,
        Time:120.0,
        Category:Health,
        CanBeDoneFromFloor:False,
        NeedToBeLearn:False,
        OnCreate:injectBiocodedCure,
        RemoveResultItem:true,
        Tooltip:Tooltip_Inject_CureExp,
    }
item biocodedCureExp {
        Type = Normal,
        Icon = Biocoded_Cure_Exp,
        Weight = 0.1,
        DisplayName = Biocoded Experimental Injection,
        Tooltip = Tooltip_Biocoded_Cure_Exp,
        StaticModel = Biocoded_CureExp,
        WorldStaticModel = Item_Biocoded_CureExp,
    }
model Biocoded_CureExp {
        mesh = Biocoded_CureExp,
    }

    model Item_biocoded_CureExp {
        mesh = WorldItems/Item_Biocoded_CureExp,
        texture = WorldItems/Item_Biocoded_CureExp,
        scale = 1.2,
    }```
sonic needle
#

this would require an animated file to help sell it,
hmm.

violet shell
#

I cannot tell that prop1 = the left arm ?

sonic needle
#

pz is simple. and that is its Greatest asset.

Meaning a simple thing, can often get you most of the way there creatively speaking,
A player wont look as close as you will,

  • for the Arm thing, you can make it use the left Hand, atleast
#

it is, the dev's themselves, that need to hook function tag's to the bones to support full body Location Usage,
Which, i would imagine, B42 will have, if not, Then, it should probably have that added

violet shell
#

ok so recipe Inject_Biocoded_Cure { keep biocodedCureExp, Result:BiocodedCure_Result, Sound:BreakAmpule, Time:120.0, Category:Health, CanBeDoneFromFloor:False, NeedToBeLearn:False, OnCreate:injectBiocodedCure, RemoveResultItem:true, Tooltip:Tooltip_Inject_CureExp, Prop2=Biocoded_Cure_Exp, } should do the trick ?

sonic needle
#

this needs an animnode call

sonic needle
violet shell
#

Sorry, you lost me lol ๐Ÿ˜„

sonic needle
#

AnimNode:SawLog,
AnimNode:Disassemble,
AnimNode:RipSheets,

add one, of those lines, to that script

#

you will see what i mean

#

"Disassemble" is a solid choice

violet shell
#

ok

#

let's try this ๐Ÿ™‚

sonic needle
#

general results, of this should be,

"eh its fine, as is"

or,

" does a better animation exist or can i make it?"

violet shell
#

ok ๐Ÿ™‚

#

Is there an animation catalog/list somewhere ? so I can try with trial & error ?

sonic needle
#

i beleive the wiki has that, or atleast a wiki thing,

i dont use any of those. for good reason

violet shell
#

Side question : does VOIP attracts zombies in MP ?

sonic needle
#

there's a mod for that now ๐Ÿ™‚ but in vanilla no

violet shell
#

ok thanks :)=

#

gonna find the mod then ๐Ÿ˜„

#

this is better, but not good enough ๐Ÿ˜„

#

I would need to have it smaller, and horizontal rather than vertical

#

is it where I have to add attachement world { numerical values I don't understand } in the model script ?

sonic needle
#

add your own syringe model, and have it edited to ONLY be loaded and used by this recipe,

Angle it for the exact Anim etc

violet shell
#

this is not the serynge ๐Ÿ™‚

#

this is the Autotest

#

This is Autotest Static Model, with primaryAnimMask = HoldingTorchRight, how can I fix that so it's smaller and oriented as it should ?

sonic needle
#

rotate the model in blender. ctrl + A > apply transform's export model to wherever it was.

the above ^ assumes you are following my, recipe only, seperate model info

violet shell
#

at least scale is working, but I still need to rotate it ๐Ÿ™‚

#

but I don't understand, the scale didn't apply to the recipe

#

Also, do you know what number is for what in this : attachment world { offset = 0.0000 0.0000 0.0000, rotate = -90.0000 0.0000 0.0000, }

#

it's in models scripts

violet shell
sonic needle
#

am hungry, Ignore Comment Clothing uses a seperate model loading system

violet shell
#

I don't use clothing models. I think I'm lost lol ๐Ÿ™‚

sonic needle
#

me too. need to eat xD

violet shell
#

Gonna go to sleep, thanks for you help and maybe you'll be around later. Thanks again !

sonic needle
#

i'm always around

slow hound
#

Am I going crazy?

the weight moodle's are

    o.weightIncTexture = getTexture("media/ui/chevron_up.png")
    o.weightIncLotTexture = getTexture("media/ui/chevron_double.png")
    o.weightDecTexture = getTexture("media/ui/chevron_down.png")

but I do not seem to find chevron_double?

any idea what i'm missing here?
this seems to be how it's done in game or what am I missing?

self:drawTextRight(getText("IGUI_char_Weight"), self.xOffset, z, 1,1,1,1, UIFont.Small);
    local weightStr = tostring(round(self.char:getNutrition():getWeight(), 0))
    self:drawText(weightStr, self.xOffset + 10, z, 1,1,1,0.5, UIFont.Small);
    if self.char:getNutrition():isIncWeight() or self.char:getNutrition():isIncWeightLot() or self.char:getNutrition():isDecWeight() then
        local nutritionWidth = getTextManager():MeasureStringX(UIFont.Small, weightStr) + 13;
        if self.char:getNutrition():isIncWeight() and not self.char:getNutrition():isIncWeightLot() then
            self:drawTexture(self.weightIncTexture, self.xOffset + nutritionWidth, z + 3, 1, 0.8, 0.8, 0.8)
        end
        if self.char:getNutrition():isIncWeightLot() then
            self:drawTexture(self.weightIncLotTexture, self.xOffset + nutritionWidth, z, 1, 0.8, 0.8, 0.8)
        end
        if self.char:getNutrition():isDecWeight() then
            self:drawTexture(self.weightDecTexture, self.xOffset + nutritionWidth, z + 3, 1, 0.8, 0.8, 0.8)
        end
    end
grizzled fulcrum
slow hound
#

from media is where by chance?

grizzled fulcrum
#

You have to open media/texturepacks/UI.pack in TileZed

#

If you have the game on Steam, install the Project Zomboid Modding Tools (comes with game purchase) and you can use TileZed easily

slow hound
#

ah crap it's packed? Can I call it using the same naming conventions or will I need to use those graphics in my mods specifically?

#

does it pull from base game when i use
getTexture("media/ui/chevron_double.png")
or will it always only look in the mod directory?

#

np I don't mind doing it if I have to. but I may just make custom ones

#

sometimes you need that push to do it and this might be that for me

grizzled fulcrum
slow hound
#

ooo okay good to know TY so much

grizzled fulcrum
grizzled fulcrum
#

What are you trying to do with the chevron png? If you want to load it like normal, just do it how vanilla lua does it like above. If you want to override it/replace it, try overriding that path in getTexture function.

slow hound
#

not famliar with how to make that smaller sorry

grizzled fulcrum
#

I am not sure you can xd

slow hound
#

goal is that it dynamically handles the values and color codes based on the range of the values

grizzled fulcrum
#

I see, is that to change the colour of the icon or something?

slow hound
#

middle is sweet spot except for proteins

#

the text changes color on tick essentially

#

and is smooth transitions between red/orange/yellow//green

#

so if fat/carb etc go out of wack it will tell you

#

and also let you know what is causing your weight to go crazy, also lets you know when you are getting bonus xp from proteins or less xp from low

#

overall goal is something similar to a device that is drainable with 5 uses for testing nutrients without using moodles or other methods. something that feels more built in. has some sandbox options also atm. may tie it into nutritionist trait

#

more levels, more features, not sure

#

mainly i'm barely learning to mod zombid and lua and also want to learn the UI

grizzled fulcrum
#

good luck! I have yet to do much UI stuff and I hope I don't have to, it looks scary lol

slow hound
#

Thank you! appreciate ya.

desert kelp
#

Hello good day! Anyone know what else can we use to permanently persist an object moddata from client to server? transmitModData only seem to persist when you're within the chunk but gets removed when you get away from that chunk

verbal yew
#

but for isoDeadBody

desert kelp
#

ohh so there's really no way to persist it to the server?

verbal yew
#

i think if we take body and drop it

#

be same things

slow hound
#

if you use search you will find lots of into around it over time

#

i see diff methods depending on usecase

desert kelp
#

I was thinking once you took a blood sample you remove the zombie from the server so you won't have to worry about persisting the moddata ๐Ÿคฃ

verbal yew
#

i think drop samples around body after you kill zombies, like in State of Decay 2

desert kelp
#

Just need to tweak where it skips the zombie that is not valid for autopsy then we're good to go

desert kelp
#

But yeah the autopsy mod data can be a problem when players got an RV Interior because they can exploit the autopsy

verbal yew
#

i think I remade it like loot around zombie after dead

desert kelp
#

ohhhh

#

sorry i was not using the 2.0 haha

verbal yew
#

no no, 2.0 use old system for it

#

i mean i should do it in future

#

like loot

#

not autopsy

#

workaround for abuze with moddata

red tiger
#

Good morning. (3:50 AM)

#

So yesterday I wrote some code that dives into Lua class definition code and extracts methods, functions, fields, and static fields and builds JSON data for documentation.

#

=)

desert kelp
#

Hi Jab, do you have a link?

red tiger
#

Make sure to read the greeting modal and you'll get a good understanding of the basics of the tool.

#

If you want to try out the Lua wizard I'm writing, it's the fourth button on the top-left. Open up uhh the ISUIElement.lua file to test. It's in media/lua/client/ISUI/ISUIElement.lua

#

I'll be working on the Lua wizard today.

desert kelp
#

Will do thankss!

red tiger
coarse sinew
red tiger
#

I wrote a project over a year ago that is a sort of middleware for documentation called PZ-Rosetta. It works with Lua typings, not specific to PZ. Mods should work in this case yeah but you can also write your typings in your code.

#

PZ-Rosetta is designed to document PZ's Lua and Java API.

coarse sinew
#

I see, I can't seem to open a class file from my mod

red tiger
#

Mallet is currently limited to a specific type of Lua class that PZ implements but PZ-Rosetta has full support for Java and Lua stuff.

red tiger
#

The Lua Wizard is limited too.

#

I provide a link to an example json file to load in the greeting popup when loading the page.

coarse sinew
#

I opened it with lua wizard, it didn't work because I had 2 classes in the same file 2_anxiety

red tiger
#

Haha yeah I haven't tested what happens with those cases lol.

#

The wizard is for speeding up getting a classes' properties loaded in so I can spend more time typing out human documentation than clicking to add the elements manually.

#

I don't see many people using the tool directly. I do however see people using the fruits of the tool's labor.

#

=)

bronze yoke
#

just annotate your mods when you're writing them ๐Ÿ˜… this is more complex and less accurate than manual annotation, it's only necessary because it's a gigantic codebase entirely unannotated

coarse sinew
#

definitely, I annotated fully my mod, I just found it interesting to maybe use this tool

red tiger
#

I plan to first document the entire ISUI library.

verbal yew
#

thumbnail moment

tiny wolf
#

Hello guys, is there a way to block the inside-building-zombie-spawn ?

brittle dock
tiny wolf
crisp fossil
#

hey guys is it possible to convert .x files to .fbx?

torn igloo
#

Erm...
item:getID() value will change as you modify the item?

On MP, if you use sendClientCommand to send item:getID() to do something on server-side
Then immediately after that line do item:getModData().something = "hello" on clientside
The item:getID() value seems to change thus become invalid, well, the server-side fail to obtain the object

On SP, no such issue

tiny wolf
bright fog
violet shell
#

Hi ๐Ÿ™‚

#

Will this work ? ```function SpawnPoints()
local randomX = ZombRand(299)
local randomY = ZombRand(299)

return {
    unemployed =     {
        {worldX = 44, worldY = 15, posX = randomX, posY = randomY},
        {worldX = 43, worldY = 27, posX = randomX, posY = randomY},
        {worldX = 34, worldY = 24, posX = randomX, posY = randomY},
        {worldX = 32, worldY = 23, posX = randomX, posY = randomY},
        {worldX = 31, worldY = 27, posX = randomX, posY = randomY},
        {worldX = 27, worldY = 36, posX = randomX, posY = randomY},
        {worldX = 23, worldY = 23, posX = randomX, posY = randomY},
        {worldX = 22, worldY = 35, posX = randomX, posY = randomY},
        {worldX = 19, worldY = 29, posX = randomX, posY = randomY},
        {worldX = 16, worldY = 22, posX = randomX, posY = randomY},
        
    } --end unemployed
}

end```

tiny wolf
#

Need to delete the last โ€˜,โ€™ of your code I think

violet shell
#

Thanks for the typo. But the thoery about calling for ZombRand and using it's result in posX & posY values is ok right ?

thick karma
#

Not sure if you want that

bronze yoke
#

trailing commas within tables are fine

violet shell
thick karma
#

Well

#

It depends

violet shell
#

ok, so I should put the ZombRand(299) directly in the posX and posY ?

thick karma
#

How often are you going to call that?

violet shell
#

My idea is to have the players spawn more randomly every time they spawn (after each death)

bronze yoke
#

map spawn points define themselves in files like this, i have no idea what the call condition is but i imagine it's cached when the game loads

thick karma
#

Whenever you call that process it'll randomize again but all of the world positions will have exactly the same posX posY

#

I don't know whether your randomization will be applied

#

But that is what would happen to the table

violet shell
#

    return {
        unemployed =     {
            {worldX = 44, worldY = 15, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 43, worldY = 27, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 34, worldY = 24, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 32, worldY = 23, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 31, worldY = 27, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 27, worldY = 36, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 23, worldY = 23, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 22, worldY = 35, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 19, worldY = 29, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 16, worldY = 22, posX = ZombRand(299), posY = ZombRand(299)},
            
        } --end unemployed
    }
end``` better ?
thick karma
#

Yes that would give them all random posX posY

#

Again unsure if changing it in game would be too late

violet shell
#

and SpawnPoints is called on character creation right ?

thick karma
#

Idk

violet shell
#

SpawnPoints() is called by SpawnRegions()

#

I have to find when SpawnRegions() is called then ๐Ÿ™‚

thick karma
#

Yyyyyep

#

And so it begins, enjoy becoming increasingly crazy.

violet shell
#

lol ๐Ÿ™‚ any hint where to search ?

bronze yoke
#

eugh, looked at it myself and it's not even sandboxed

#

it literally does goes load file -> call SpawnPoints() in a loop for every spawnpoints file

#

affecting the global namespace when it could literally just return the points directly ๐Ÿ˜ญ

#

anyway from my best look it seems like this will be called only once when the game starts?

#

if you want to be sure, you could add a print to your function and see how many times/when it prints

violet shell
#

ok ๐Ÿ™‚ I'll do that, thanks ๐Ÿ™‚

#

This ?

    spawnpointsLoop = 0 = spawnpointsLoop
    print("Number of Loops = "..spawnpointsLoop)
    
    return {
        unemployed =     {
            {worldX = 44, worldY = 15, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 43, worldY = 27, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 34, worldY = 24, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 32, worldY = 23, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 31, worldY = 27, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 27, worldY = 36, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 23, worldY = 23, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 22, worldY = 35, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 19, worldY = 29, posX = ZombRand(299), posY = ZombRand(299)},
            {worldX = 16, worldY = 22, posX = ZombRand(299), posY = ZombRand(299)}
        }
    }
end```
bright fog
thick karma
violet shell
#

typo, second = is a +

frank elbow
#

0 + x = x. Best case a no-op (in an arithmetic sense), worst case an error if the variable is nil

#

I assume you mean x = x or 0

frank elbow
violet shell
#

so as I want to increment it each time the function is called, I should write :
x = x+1 or 0 ?

bright fog
#

square doesn't exist

#

You badly gave the square for the player spawn

violet shell
#

I erased all the spawns possible besides mine

#

and mine was defined, so it means that my spawnpoints() has not been called right ?

#

Game doesn't like the ZombRand call in spawnpoints.lua ๐Ÿ˜ฆ

#

is there an Event I could add a function call at character creation ?

#

OnCreatePlayer ?

violet shell
#

Damn, I found the bug and it works now !

#

so you can run lua stuff in spawnpoints.lua ๐Ÿ™‚

violet shell
#

@thick karma but according to coop-console.log, the SpawnPoints () function is called only 1 time at the server load, and not after. Is it possible to call it back with a require call for the spawnpoints.lua and then a Events.OnPlayerDeath.Add(SpawnPoints) ?

#

function resetSpawnPoints ()
    return
end

Events.OnPlayerDeath.Add(resetSpawnPoints)``` If I put that un a lua file in /lua/shared/ will it work ?
violet shell
#

it assigns 0 if x is nil, else it uses x, right ?

frank elbow
#

Yes. Note that that'll start the variable off at 1

#

You could also do an if statement, if preferred. I didn't notice this was just a debug thing anyhow until after I sent the message before

violet shell
#

I need a hint about the "require" (again)...
I have a file in media/lua/shared/myFileWithRequire.lua
And I want to call for a file in
media/maps/myMapFolder/myRequiredfile.lua
I tried require("maps/myMapFolder/myRequiredfile") but the server doesn't load, and I don't have a trace in logs