#mod_development

1 messages · Page 291 of 1

vast pier
#

you can also send requests to the group on their github and the could possibly make them and add them to the collection

mellow frigate
#

in all correctly coded games, ever. you have to differenciate simated time and real time

vast pier
#

nah, connect everything to the framerate. Nothing bad has ever happened from connecting functions to framerate

#

Space invaders? what's that

bronze yoke
#

surely you will not regret tying your game speed to framerate

vast pier
#

surely this won't increase the reload speed in fallout 76 for players with absurdly high framerates

#

Yknow what, build the entire game with the expectancy that it will run at 15 frames per second. Now optimize the game so well that it can reach hundreds of fps on a toaster. Nothing bad could ever happen

winter bolt
#

marvel rivals has stuff tied to fps 💀

tacit pebble
#

but yeah I was wrong

vivid imp
hidden compass
#

Sorry, I have a question. I am having a problem with my own 3D objects depicting textures that do not exist. I have reviewed the settings and textures and there is nothing wrong with the implementation. The attached shows a texture that does not exist anywhere, and even after deleting this texture image, it still shows up. Also, disabling “Texture Compression” improved the problem, but at some point this problem came back again even if compression settings is off.

Does anyone know why? Maybe it's a cache or something, but restarting the app or PC doesn't solve. Or do I need to explicitly delete the compressed images, do you know where they are stored?

winter bolt
late hound
sour island
#

Hey @vast pier sorry to bother you, but it's been killing me, you used 🌈 🍖 a few hours or so ago, and I glanced at it and it's been bothering me. What does that mean??

vast pier
silent zealot
#

Anyone got aany ideas how to tell if an inventory belongs to a world object? I can tell if it's the player's inventory (inventory:getParent() == playerObj), if it's an eqpped bag (inventory:getCharacter() == playerOb) or if it's part of a vehicle (instanceof(inventory:getParent(),"BaseVehicle")) but I can't figure out a check that works for world objects.

hidden compass
# winter bolt what happens if you delete all the textures?

@winter bolt @late hound @vast pier
Thanks for the great suggestions. I did indeed remove only the relevant textures and did not experiment with the others. I deleted all the textures to try and only one model remained textured.

However, I think I may have found the cause.

vivid imp
#

They look like candy canes now 😄

silent zealot
#

Are those magical crowbars?

vivid imp
#

Its the almighty Excalibar

silent zealot
#

If so, brilliant idea.

sour island
#

I'm kind of apprehensive to google it tbh...

vast pier
#

Stuff the average person is probably against

hidden compass
# vast pier What's the cause

I thought the problem might be the texture settings in the FBX file, but I tried removing the settings from the FBX and exporting again, but that did not solve the problem.

The mod is not subscribed in the Workshop, but is placed in the ″\user\Zomboid\Workshop" folder for development. Do you have any other tips?

winter bolt
sour island
#

I wish to return in time

winter bolt
#

i know what proship means but the way this is worded is incomprehensible

sour island
#

Why do you know what proship is

winter bolt
#

internet discourse moment

sour island
#

Why do I know now pain

vast pier
winter bolt
#

so it just means proship

vast pier
#

Proship, pro para, stuff like that typically

mellow frigate
#

It is an exemple of something contextualized as a definitions but not being a definition

sour island
#

So generally illegal activities

#

Objectively wrong

vast pier
#

I mean I don't think proship is illegal

#

But sure

winter bolt
#

any parts of the mesh that uses a 2nd material should just be invisible ingame i think

vast pier
winter bolt
#

if its still happening when all the textures are deleted then something is overwriting it

vast pier
#

Or cache didn't clear correctly

winter bolt
#

if its still happening after restarting the game it cant be a cache thing

#

ive never seen anything like that happen

hidden compass
#

I am very sorry, everyone. It was a simple mistake on my part. I had been testing this model on a prototype with another experimental mod, and apparently the same texture was left there. So it seems that even after deleting the texture from the mod itself, the texture of the same name contained in another mod was hit and displayed.

Sorry for using everyone's time for a simple mistake, but thanks for the advice.

sour island
vivid imp
#

Agreed its a massive QoL

#

Also no need to feel like you gotta apologize, we all like modding here 😎

ornate sand
#

So custom oncreates just entirely break the whole game if they're anywhere but lua/server

#

Good to f**** know (lol)

ebon dagger
#

Hahahahah,
That sent me through a loop.

During OnRightMouseDown, player:isAiming == false.

During OnRightMouseUp, player:isAiming == true.

hidden compass
#

Thanks to all of you, I was able to make a major update to my Excalibar (Legend of Holy Crowbar) mod. Please laugh at them! 😊

ornate sand
ornate sand
#

When you don't know what a magazine tube is but you definitely know that sawn-off shotguns fudging rule

silent zealot
#

My Super Shotgun idea won't work - the game crashes if you set ProjectileCount higher than 9.

ornate sand
ornate sand
silent zealot
#

You could make a pump action that only holds 3 rounds... but that's a lot less fun.

silent zealot
#

How am I supposed to add a punt gun with projectiles capped at 9!

ornate sand
#

Sawn-off Punt Gun
ProjectileCount = 781239 (approx),

silent zealot
#

Maybe go back to non-physics firearm logic and just make every zombie is a big triangle explode.

#

Ammo Recipe: [nuts and bolts;nails;screws] [gunpowder] [emptyCan]

ornate sand
#

[gunpowder/handcraftedblackpowderfromdung]

#

Give that muzzleflash a yuge black cloud too

#

Lol StartEvent:verythickfog

silent zealot
#

for (k,v) in Bodyparts do v.MuscleStrain=YES end

bronze yoke
#

if it jams it explodes

ornate sand
#

I saw what happened to Kentucky Ballistics when his .50 BMG break-action had a catastrophic failure. I don't need to even think about what would happen with that thing ^ 😄

crisp fossil
#

Does anyone ever tried to change weapon sprite mid game? This is my code

print(item:getWeaponSprite())
item:setWeaponSprite(spriteName);
getPlayer():resetModelNextFrame();
getPlayer():resetEquippedHandsModels();
getPlayer():resetModel();
triggerEvent("OnClothingUpdated", getPlayer());
print(item:getWeaponSprite())

Sprite not changing and no errors

ancient grail
#

anyone know how to forget learned recipe?

getPlayer():getKnownRecipes():remove("Craft LightBringer Boots")

this doesnt seem to work, i lost my snippet

tulip valve
silent zealot
#

If you want something slightly more practical, look up the Russian KS-23 4-gauge pump action shotgun.

ebon dagger
#

Anyone have any good examples, guides or even just an overview of the best way to disable a specific context menu?

So far, the couple of ways I tried are blocked by scope.

bronze yoke
#

i don't have a guide or anything, but if you can't prevent the context menu from being added by hooking or something, you *can* remove it afterwards, there's a function in ISContextMenu that removes them by name

ebon dagger
#

Just to make sure I'm not crazy, I can't override a single method in a timed action right? Using:

Old_IsValid = TheTimedAction:IsValid

function TheTimedAction:IsValid()
  --My code here
  return Old_IsValid
end```
bronze yoke
#

you can, just reference it as Old_IsValid = TheTimedAction.IsValid

#

: is only valid for defining/calling functions

ebon dagger
#

That would explain the troubles I have had 😄

ebon dagger
#

That worked-ish, mostly because I'm hooking to the wrong part lol

#

IsValid lets you perform the action but then just doesn't do anything when its finished 😄

ancient grail
ancient grail
ebon dagger
ancient grail
ebon dagger
#

Oh, I didn't doubt it would work, I've just been using something different as well.

#

Only a couple more steps and this Modding Library is done. I've been working on my documentation as I go, if anyone is interested in how it would work as a library, I would love feedback on the docs.
https://docs.google.com/document/d/15BPjL49EyfD5d61_NRtU1lQ9yP47cm4m44nDOhkDcDY/edit?usp=sharing

ebon dagger
#

OMG that is tight.

tranquil kindle
#

Back when i worked on my bow

#

All i did since i can't code for sh*t

ebon dagger
#

I hope to implement much better animations in a future release.

#

But I have a LOT to learn on that side 😄

tranquil kindle
#

Bow and crossbow reload animations

#

Technicly all i needed was code to recover arrows from bodies

undone elbow
ancient grail
tranquil kindle
#

I think i could give you those animations, but the thing is that bow is held in right hand and uses handgun idle animations

#

So its up to you

ebon dagger
tranquil kindle
#

I heard that bows are meant to be added in PZ by devs, but at this point im not sure if those are just rumors

ebon dagger
bronze yoke
#

they are

tranquil kindle
#

heard something about b42, but its not here

bronze yoke
#

they'll be part of the later crafting expansions

ebon dagger
#

Even if they release them the day after I get this out, I learned a LOT from this.

tranquil kindle
#

Let me see if i can find them

bronze yoke
#

i don't want to criticse the hypothetical design of an unreleased library too much, but if you're going to use globals, a two letter acronym is a bad idea

tranquil kindle
#

BAC stands for Bows and Crossbows, it was supposed to be my module but as i said, i kinda gave up on it

#

So feel free to use it,

ebon dagger
ebon dagger
silent zealot
#

I start my globals with "Nep" because I'm more worried about conflicting names than longer, uglier function names.

bronze yoke
#

i just use modules so i don't have to think about it

silent zealot
#

I confuse myself and make a giant mess when I try to get fancy with lua, so global starting with "nep" will do for now.

bronze yoke
#
-- shared/MyModule.lua
local MyModule = {}

function MyModule.foo()
    print("bar")
end

return MyModule
``````lua
local MyModule = require("MyModule")

MyModule.foo()
silent zealot
#

function NepFoo()

#

😂

#

I'll put using modules properly on the "do this one day" list.

ebon dagger
#

GREAT, NOW I WANT TO REFACTOR

#

lol, but seriously, that is awesome. and I appreciate the expertise, I will add that to my workflow when needed.

ebon dagger
#

If animations are held in one mod, but used from another, is there another step to linking them? Like, how with items you would "ModName.Item" do you need to specify any sort of module?

Or is it supposed to just be as simple as making sure that the string listed in condition from the XML matches?

slim swan
#

I want to make a new strike and swing sound effect for my modd weapon, how can I make this weapon play several sound randomly as the original B42 does when it strikes

late hound
#

Are recipe craft times capped? I want to make certain craft times a very short duration (like around a second) but I can't seem to make it less than 5 seconds. For instance, "Time:2," has no difference than "Time:10". in my testing. Just wondering if anyone has found a workaround for this.

undone elbow
# late hound Are recipe craft times capped? I want to make certain craft times a very short d...
function ISCraftAction:getDuration()
  if self.character:isTimedActionInstant() then
    return 1
  end
  local additionalTime = 0
  if self.container == self.character:getInventory() and self.recipe:isCanBeDoneFromFloor() then
    local items = RecipeManager.getAvailableItemsNeeded(self.recipe, self.character, self.containers, self.item, nil)
    for i=1,items:size() do
      local item = items:get(i-1)
      if item:getContainer() ~= self.character:getInventory() then
        local w = item:getActualWeight()
        if w > 3 then w = 3; end;
        additionalTime = additionalTime + 50*w
      end
    end
  end
  return self.recipe:getTimeToMake() + additionalTime
end
clear oar
late hound
undone elbow
#
local old_getDuration = ISCraftAction.getDuration;

function ISCraftAction:getDuration()
  if (......) then -- your condition
    return self.recipe:getTimeToMake()
  end
  return old_getDuration(self)
end
#

I'd recommend a condition like self.is_ignore_additional_time that you can set on action creation.

umbral ingot
#

Do event registrations persist through each game session?

undone elbow
#

No

#

Actually, the question is not entirely clear

silent zealot
#

Who needs a welding mask when you have...

lyric plaza
#

does anyone know what this means, im trying to understand what this is pointing too,

#

didnt ping the user but its something like this

#

it seems to happen like they say as im walking and i guess im just very curious what this even is telling me

undone elbow
#

Let's say...

local old_fn = SomeClass.fn
function SomeClass:fn()
  ...
  return old_fn(self)
end

And what if i RELOAD this file using F11?

bright fog
#

For decorations you need either to reload the original file that created the function alongside your file, to reset it, or you need to reload every games files from the menu

#

For easier reload of multiple files, I suggest you use the community debug tools which allows reloading multiple files without having to look for them in the F11 menu

undone elbow
#

I hope there is a way to make the file just reloadable

#

e.g.

if (SOME_GLOBAL.is_patched) then
  -- remove decoration
  -- set decoration again
end
bright fog
#

Every users of your mod will not need this

#

Simply check out the method I just described to you, it does the trick....

#

Unless you want to replace the decoration of another mod sure

#

But I think you're better off reloading the Lua file instead of trying to remove the decoration, but that could break other mods decorations

undone elbow
#

Is there something like OnFileIsToBeReload?

bright fog
#

What for ?

#

An event to detect the reload of a file ?

undone elbow
#

For turning the decoration off

bright fog
undone elbow
#
local is_patch_active = true

local old_fn = SomeClass.fn
function SomeClass:fn()
  if is_patch_active then
    ...
  end
  return old_fn(self)
end

Events.OnUnload.Add(function()
  is_patch_active = false
end)
bright fog
#

OnUnload ?

undone elbow
#

I just want to be able to simply reload a file 🙂

bright fog
#

I just told you how to do that lmao

crisp fossil
#

Hey guys I have been trying to use setWeaponSprite but some items' sprites cant be change and I figured out why. Its because of this line

/*WeaponSprite = WoodAxe,*/
WeaponSpritesByIndex = WoodAxe;WoodAxeForged,

they are using WeaponSpritesByIndex instead of WeaponSprite. Anyone know how to handle this kind of case?

bright fog
#

Did you not read my explanation of how to do it ?

bright fog
#

Reload the original file and then your own file

#

With the community debug tools you can do that super easily too

#

The link I sent

sly monolith
#

hey @tranquil kindle, could you share with me a secret, how did you make that thumbnail for you hairstyles mod? is this a blender render, or smh else

bright fog
#

Renders yea

winter bolt
tranquil kindle
#

Render

winter bolt
#

me and a few other people have been getting it as well

bright fog
lyric plaza
lyric plaza
winter bolt
#

i havent had it spam like that but ive seen it occasionally so its probably fine

bright fog
#

Might be linked to specific files and if you have more of these it throws more of these

#

But eh

sly monolith
#

b42 throws like a whole wall of errors on loading the game heh

north rain
#

Has anyone figured out how to edit the mod.info mod to list incompatibilities?

candid egret
candid egret
#

np

#

i'll probably use that too

undone elbow
#

I think the calorie system is a bit wrong. Hunger should be dependent on calorie levels, not built up at a constant rate.

sour island
#

Alot of food's calories are way off too

tranquil kindle
#

Don't confuse being hungry with calories. You could stuff yourself with low calorie food and be feeling full. You could also eat small but deep fried thing and have lot of calories, but it won't really take alot of space in your stomach so you will still feel hungry.

slim swan
#

Why does my model have to be invert normal to display properly? Normal normals will look like this

#

when I invert normal,it will display true

tranquil kindle
#

Maybe your export settings changed?

slim swan
slim swan
#

But i use other 3D modeling Tools like 3Dmax ,The Normal is correct

winter bolt
mellow frigate
#

Do vehicles have tags and properties or equivalent features ?

slim swan
#

but i dont konw why the blender recalculate normal cant fix this problem

undone elbow
winter bolt
ornate sand
# undone elbow At least hunger shouldn't cause death if you keep drinking.

While this is true, it's also true that if you eat only very lean meat or low calorie food, you can quite literally stuff yourself with that food and still be actively starving to death.
In PZ rabbit meat is extremely calorie and protein rich, while in real life rabbit meat is one of the best examples of how to starve to death while eating well.

sour island
#

I'm pretty sure you also still get hungry despite being full of food given a few hours or so lol

#

Appetite can be really silly that way

ornate sand
#

Yup.

slim swan
ornate sand
#

Have you started troubleshooting the gun light thing yet Chuck?
I kinda wanna check out Swap It too now 😄

true nova
#

anyone know how to make context appear red when it cant be done?

sour island
undone elbow
#

And if it's your option, just:

option.notAvailable = true
#

You can add these functions to your mod. But you still have to inject if you need to modify the vanilla context menu

local function newToolTip()
  local toolTip = ISToolTip:new();
  toolTip:initialise();
  toolTip:setVisible(false);
  return toolTip;
end
local function DisableOption(option, text)
  option.notAvailable = true
  local tooltip = newToolTip();
  tooltip.description = text;
  option.toolTip = tooltip; 
end
bright fog
#

I should make a wiki page about context menu

ornate sand
bright fog
#

I'm prioritizing making small pages for various different small aspects of the Lua API instead of improving the page of Lua API itself bcs it's kind of hard explaining more than I wrote or at least I don't have much inspiration for it, which is why working on smaller pages is more interesting to me rn

#

I'll note to make that one

true nova
ornate sand
#

Does anyone know how the WeaponUpgrades table is handled in the game? I'm guessing it's a java thing because there's only one lua entry for it, at SuburbsDistributions
I'm asking because I'd like to use that exact same table to attach possible weapon upgrades on the zombies' guns. Such as a scope on a rifle, a gunlight on a 9mm, etc.
The developer of Guns of '93 whose name escapes me gave me a great tip of trying to do it with an OnCreate, but I'd rather see if there's a way to slap that WeaponUpgrades table from both serverside - as in vanilla, to shared as well - as in zombie attached guns.

bright fog
#

I've heard about guns now using an attachment table instead of being limited to 6 yea

#

I got no idea about the technical aspect of it tho

ornate sand
#

Oh yeah Fenris told us all it's like 130+ slots now 😂

#

But the WeaponUpgrades table has been there since B41

bright fog
#

No idea what that is then

ornate sand
#

It's obvious that the WeaponUpgrades is using some sort of randomness to see whether or not anything is pre-attached, because you can find an M16 with nothing on it, or you can find an M16 with a scope, recoil pad, sling, suppressor, etc etc etc, and anything in between.
But because it doesn't show up anywhere except as that table, I'm assuming it's a java thing

sour island
#

Seems like they just condensed the fields to an array

#

the part slot names didn't change

#

you can now just add your own

ornate sand
#

I mean Arsenal[26] is gonna have a field day adding literally anything he wants

sour island
#

For sure - I wanted to make a universal spear mod - where you could attach any other weapon on it - don't think it's possible still cause I rather dynamically generate those models/attachment points -- but maybe I'll have chatgpt spit out a conversion instead lol

sour island
ornate sand
#

Yeah I feel for him. I've "studied" his stuff and I couldn't make heads or tails of any of it except for the script.txts 😄

#

I can only imagine the mountain he has to climb to fix all that lua

sour island
#

I'm not a fan of how they flood the loot tables - so I literally have never used britas for an extended period of time.

#

I know they have launchers?

ornate sand
#

Everything's optional though. I admin'd a server where it was free-for-all, and yeah I for example looted a GAU-17 Electric Minigun at the Riverside PD 😂
On my single player runs though I'd just disable anything after '92 and all that fancy stuff

sour island
#

Yeah just seemed like alot

#

Also around that time something broke on modOptions with 41MP so he was promoting everyone to make a sub-mod for modOptions to hold their custom options, and man that was not the best lol

ornate sand
#

Try mine lol

#

No but yeah, I don't know how I'd even look at the java part of it, I don't want to decompile the entire game.
I guess I'll leave that one open about the upgrades for now. Maybe I'll try throwing something together that uses both OnCreate and the randomness check that's in vanilla lua

sour island
#

Do you use an IDE?

ornate sand
sour island
ornate sand
undone elbow
#

Is it possible to play a world sound locally in multiplayer? I mean that a local player can hear it somewhere in the world but other players don't hear it.

sour island
#

Decompiling the game isn't not all that hard - and offers alot more insight into modding. Sometimes things are using old names from prior refactors, so you can't rely on on things are named + there's alot of moving parts ( 🥁 )

sour island
ornate sand
#

I've spent an ungodly amount of IRL hours just staring at PZ's ISTimedActions for example

undone elbow
true nova
#

Is there a way to get the texture names directly off item models? I made my sprites exactly the same name thinking it would be an easy swap but i cant seem to find out how

sour island
#

The 2nd argument can be a IsoGridSquare, IsoObject, as well as null (?)

ornate sand
true nova
#

i need to be able to get the texture name from the item

#

getting the texure gives the icon

sour island
#

weaponsprite and staticModel return strings

#

you'd have to dig around the model manager

severe jay
ornate sand
undone elbow
ornate sand
#
    item Pistol
    {
        WeaponSprite = BerettaM92F,
    }

    model BerettaM92F
    {
        mesh = weapons/firearm/BerettaM92F,    
        texture = weapons/firearm/BerettaM92F,
    }

Like that?

true nova
#

i suppose i can just name the sprites the items, but some items use the same textures and have different names

ornate sand
true nova
#

this is for my clothesline mod. i have almost all of the clothes items with a sprite but since i cant get their exact texture name its hard to sort 😢

ornate sand
bright fog
#

Need some feedback on updating the Lua events wiki page. Which one do you guys think is better ? New one (table like) or old one (list) ? With such a list with multiple columns visible in the category of Lua events

late hound
outer crypt
#

Been using this format for a vehicle spawn in the game, is there any way I can set the direction of the vehicle upon spawn? vehicle = addVehicle(spawnV, spawnSquare:getX(), spawnSquare:getY(), spawnSquare:getZ())

outer crypt
#

The table feels too busy for my eyes.

bright fog
#

I agree

outer crypt
#

But it's all opinion, all get the job done

bright fog
#

It's too compact

#

Sadly I can't use the thing on the bottom right screenshot

outer crypt
#

darn

bright fog
#

So I got no choice but to use one of the two formatting (or maybe a different one if there's another one)

#

But anyone can use the third screenshot categories, the problem is that some of the events might not be in that list until all the pages are created for every new events

ornate sand
bright fog
#

What do pigs give you in B42 ?

#

Do they not give chops ?

ornate sand
#

No idea, haven't tried

bright fog
#

bruh

ornate sand
#

😂

#

I'd imagine they only give (poor) pork chops until Butchering 6 like all the rest of the animals

#

I just really, really enjoyed the lard I got from wild hogs using your mod in B41.78

bright fog
#

Yea it was useful since some survival recipes from other mods used it

ornate sand
#

And yeah from the common complaints, Butchering really sucks in B42.
I can confirm that it is really bad at levels 1-4. I think I got my first average cut at level 5.
Poor cuts are 1-per-cooking-recipe, so that's unacceptably bad unless you spam traps like I do

#

And people have killed entire cows and got less than 2 meals out of 'em

bronze yoke
#

and livestock farmer starts with level 3 😐

red tiger
#

You immediately die when you smell a pork chop.

ornate sand
ornate sand
red tiger
ornate sand
red tiger
#

Eating only rabbit should kill you like IRL.

ornate sand
true nova
#

i fee like being a vegan is impossible unless you're just eating constantly

#

youll lose too much weight and die

bright fog
#

true

ornate sand
true nova
#

im talking in game

ornate sand
#

Oh lol

true nova
#

ive tried

#

always have to eat fish or something sometimes

#

or my weight drops dangerously low

ornate sand
#

Wait no

#

The dried beans

#

They're super high calorie

true nova
#

oh yeah. i always forage

#

foraging food seem like they have no calories

ornate sand
#

Which is kinda half true btw, if you get some dry lentils and soak 'em and then boil 'em for a soup or a stew, they're really good for ya

true nova
#

yeah lentils do got a lot of protein

ornate sand
#

Green lentils are a bit of a hassle but red lentils rock

lapis moth
bronze yoke
#

oh, for what it's worth, the 'starving to death from just eating rabbits' thing is sort of a myth - you do die but it's not from starvation

outer crypt
bronze yoke
#

rabbit is very nutritionally weird and if it's all your eating over a long long time it ends up literally poisoning you

lapis moth
#

yes

ornate sand
lapis moth
true nova
#

after forever searching. to get clothes texture it is item:getClothingItem():GetATexture().

slim swan
#

I made an ICON, but why is my ICON blurry in the game

#

I use asprite to make it

#

it should be like that

hybrid tiger
#

Someone before had a similar issue ill link their post

#

ive never done icons so idk

#

here

#

that might help?

tranquil kindle
#

I do my icons with 64x64 in gimp so....

#

Used to 32x32 but they do get blurry.

ornate sand
slim swan
slim swan
hybrid tiger
#

Not sure havent touch .packs /icons was just linking something I read earlier

slim swan
#

if it work ,i dont need to pack the icon

tranquil kindle
#

So thing is, ICONS will scale down, the only one exception was when item could be attached to hotbar it would not scale. Not sure if they did change it.

#

So you can technicly put 1920x1080 icon and it will scale down ( at least in b41), but the moment you attach it to hotbar (again, it happend in b41) it would display it in full size and not scale down.

polar gyro
undone elbow
#

I think the exported icon was 64x64.

red tiger
ornate sand
red tiger
#

I think it'd enrich the RP community.

slim swan
#

if I put a 64x64 icons in the game ,it work fine except the hotbar

red tiger
#

It's doable.

#

(Unless this is in Java)

#

There's a hope I have that eventually in some future build the only UI code in Java is the engine, not the implementation.

#

Moodles would not be a thing to fight over otherwise.

vast pier
hybrid tiger
#

lmao

slim swan
#

I want to know how to pack the icon to be a .packs files,and how it connect to the item

brazen loom
true nova
slim swan
bronze yoke
#

Icon = Electric_Baseball_Bat looks for Item_Electric_Baseball_Bat

slim swan
#

Is this the correct script expression

bronze yoke
#

oh my bad you have that there

#

do you have the texture pack set in the mod.info?

true nova
#

you have added the pack into your mod.info?

slim swan
#

like this?

bronze yoke
#

there's no tiles in your pack so you don't need a tiledef

unreal ginkgo
#

I'm trying to make a trait mod that has the player start with a (**not **dead lol) rat in their inventory. I have gotten as far as starting with generic 'Base.Animal' but am unsure how to pass traits to that. Sorry if this is the wrong place to ask but there's very little techincal info on the wiki about variables and other animal info

true nova
# unreal ginkgo I'm trying to make a trait mod that has the player start with a (**not **dead lo...

here is the constructor for an isoAnimal. im not sure what all of the parameters are

--- @public
--- @param arg0 IsoCell
--- @return IsoAnimal
--- @overload fun(arg0: IsoCell, arg1: integer, arg2: integer, arg3: integer, arg4: string, arg5: string): IsoAnimal
--- @overload fun(arg0: IsoCell, arg1: integer, arg2: integer, arg3: integer, arg4: string, arg5: AnimalBreed): IsoAnimal
--- @overload fun(arg0: IsoCell, arg1: integer, arg2: integer, arg3: integer, arg4: string, arg5: string, arg6: boolean): IsoAnimal
--- @overload fun(arg0: IsoCell, arg1: integer, arg2: integer, arg3: integer, arg4: string, arg5: AnimalBreed, arg6: boolean): IsoAnimal
function IsoAnimal.new(arg0) end

unreal ginkgo
#

Interesting, I might be able to make some progress with this. Thanks!

errant bluff
#

Does anyone know what is the name of the star texture/icon that is put on the items when they are applied as favorites?

#

And where can I download it?

bright fog
ebon dagger
#

I need to hijack the XP gained from ranged weapons with a specific tag. Vanilla treats all ranged weapons with the Aiming skill, but I want to make bows and crossbows use a custom skill. Which of the following would be less prone to messing with other mods:

  • Intercept the XP in Events.OnWeaponHitXp subtracting it from Aiming and adding to Archery

  • Hook into XpUdate and exit out if Archery is gained, preventing Aiming from ever being gained. This would mess with "Favorite Weapon Data", unless I duplicated that code, which I could.

coarse sinew
# errant bluff Does anyone know what is the name of the star texture/icon that is put on the it...

It's in ProjectZomboid\media\texturepacks\UI2.pack, sprite sheet UI23 and it's called FavoriteStar or FavoriteStarChecked. To open the .pack file you need TileZed (it's in the Project Zomboid Modding Tools, you can find it in your Steam Library). In TileZed to export the image go to Tools > .pack files > Pack Viewer. In the new window Open > Open .pack > Select the UI2.pack from the game files. Then Open > Extract images.. > In the prefix field you can write the name of the texture (you can see it when you hover over the image on the right panel), in this example FavoriteStar and in the output directory the folder where you want your texture to be exported (make sure that folder exists). I'll also attach the images.

#

Ok, I didn't expect them to be so big unhappy

errant bluff
#

The thing is that I was looking there too but I didn't find anything about it. Thank you very much for your comment!

true nova
dense orchid
#

Does anyone know if there's anyone putting together a mod for horses or dogs yet?

ebon dagger
#

Just checking, because suddenly, even though I don't have any code effecting, I'm not gaining any weapon XP.

Does -debug mode prevent XP gain?

dense orchid
ebon dagger
#

Its part of why I have been teaching myself how to do modeling. I want to run around in Zomboid with my faithful dog companion SO DAMN BAD lol

slim swan
#

The icon blurred seems to be a B42 issuse,I test other creators' mods have the same problem,even they already pack the icon

#

I think is because the outdated Tiled's issuse,it cant pack the files fit B42

ebon dagger
#

Anyone see any reason why this hook wouldn't work?

local Old_xpUpdate_onWeaponHitXp = xpUpdate.onWeaponHitXp

xpUpdate.onWeaponHitXp = function(owner, weapon, hitObject, damage, hitCount)
    print("DEBUG >>> LOOK I GET CALLED")
    return Old_xpUpdate_onWeaponHitXp
end

no errors, but no print line either.

bronze yoke
#

you aren't calling the original function

#

i don't see why you wouldn't see your print but this isn't a successful hook because of that

#

from the name, this looks like an event handler? you need to remove the original handler before hooking it, and then re-add it

ebon dagger
#

Ah ok. That makes sense.

bronze yoke
#

the event has a reference to the function so hooking it (which really just replaces it with a new function, that takes over its old name) doesn't affect it

bright fog
bright fog
#

Reseting the cache folder fixes it

#

It must be an option somewhere

bronze yoke
#

no it's just not being called

#

read the rest of the convo

ebon dagger
#
Events.OnWeaponHitXp.Remove(xpUpdate.onWeaponHitXp)

local Old_xpUpdate_onWeaponHitXp = xpUpdate.onWeaponHitXp

xpUpdate.onWeaponHitXp = function(owner, weapon, hitObject, damage, hitCount)
    print("DEBUG >>> LOOK I GET CALLED")
    return Old_xpUpdate_onWeaponHitXp
end

Events.OnWeaponHitXp.Add(xpUpdate.onWeaponHitXp)

This worked! Thank you.

bright fog
#

Ah

#

tho there's still people having such a problem anyway

#

And I haven't seen anyone who found what disables prints

ebon dagger
bright fog
#

Yea understood that

ebon dagger
#

Kbam, archery weapons grant Archery and Firearms grant "Aiming" Ty again @bronze yoke

bright fog
#

👀

burnt kite
#

hi, i’m new to modding. How can i make an item spawn 100% of the time in a container? setting the chance to 100 doesn’t seem to guarantee it, thanks! should i use lua functions instead of distribution tables?

bronze yoke
#

just make it a stupid big number, spawn chances aren't out of 100

burnt kite
#

so if i put 10000 will it guarantee the spawn?

bronze yoke
#

yeah, should do

burnt kite
#

thankyou 😉

pearl prism
#

Does anyone have any tips on how to code a type of custom cursor?

bronze yoke
#

do you mean like the build cursor?

pearl prism
#

Yes

#

it could be

eager imp
#

"vehicle editor" this is for hit boxes? i looked in it and thats the best i could guess about it

pearl prism
#

You need to click on the debug icon

#

than go to "Dev" menu

eager imp
#

alrighty thank you, im snooping around to try and learn a few things its been slow going

pearl prism
#

Don't worry too much, we all start like this.

eager imp
#

i appreciate the kind words : )

sharp plinth
wooden falcon
#

Super rusty just trying to update one of my mods for b42. If I have a variable container that is a Container object

Base.Wallet:zombie.inventory.types.InventoryContainer

how do I simply ask "is this a wallet?"?
Edit: maybe it's simply item:getType() == "Wallet"? Testing now.

cosmic ermine
#

How do I remove fog of war?

vast pier
#

Does the thimble do anything? It seems to have its own tag

silent zealot
#

Seems to do nothing.

#

As far as I can tell there's no "this tool makes a recipe faster/better quality output" which is where I'd expect to see a thimble show up - a small speed boost to sewing.

silent zealot
#

World map knowledge?

cosmic ermine
#

Zombies in the fog aren't visible unless you look in that direction.

silent zealot
#

Eagle eyes trait, keen hearing trait...

cosmic ermine
#

I want to completely remove it for screenshots.

silent zealot
#

Hmmm... maybe a piece of modded headwear with negative vision penelty?

#

ScriptManager.instance:getItem("Glasses_3dGlasses"):DoParam("VisionModifier = 10") helps but it seems vision is capped at 180°

#

...but those modded glassed are a big help at night when your vision cone is reduced to a 30° arc

tacit pebble
#

Which is better for Performance? (resource price(?))
any tips?

first example

  local speedMultiplier = gameSpeed == 2 and 5 or gameSpeed == 3 and 20 or gameSpeed == 4 and 40 or 1
  bodyDamage:setFoodSicknessLevel(currentLevel - (adjustmentForce * speedMultiplier))
end

second example

  local gameSpeed = getGameSpeed()
  local speedMultiplier
  if gameSpeed == 2 then
      speedMultiplier = 5
  elseif gameSpeed == 3 then
      speedMultiplier = 20
  elseif gameSpeed == 4 then
      speedMultiplier = 40
  else
      speedMultiplier = 1
  end
  
  bodyDamage:setFoodSicknessLevel(currentLevel - (adjustmentForce * speedMultiplier))
end
silent zealot
#

Trust the lua compiler to optimize it for you when it compiles.

faint jewel
#

are dependencies broken?

tacit pebble
silent zealot
#

I'm not sure gamespeed is even a function call/API, as opposed to a LUA global variable... either way it won't be noticable calling it three times every tick comared to the other thinking the game is doing.

faint jewel
#

i have the updated common library and it's enabled but the mod i'm working on says it's not there.

tacit pebble
silent zealot
#

The second is probably better, but it's a "technically better" type of thing.

#

Dependencies are working in general

tacit pebble
silent zealot
#

There's probably a programming term for "overoptimizing specific bits as you write"

#

...and then some guy release a mod with 8k texttures on a 20 bajillion triangle model that calls intensive API calls every tick even though it only needs update every hour, and you wonder why you bother at all. tired

crystal oar
#

has umbrella been updated or is there a new documentation page?

tacit pebble
tacit pebble
silent zealot
#

If you use them just add a counter so the code only runs every X ticks.

#
function NepOnUpdate
   if NepElapsed < NepMaxTicks
      NepElapsed++
      return
   end
   NepElapsed = 0
   <code here>
end
#

not that lua supports ++, but you get the idea

#

A function call & integer comaprison is insignifigant load

tacit pebble
silent zealot
#

When I made my "slower discomfort" mod I made the number of tick that elapsed a sandbox variable, because if you have a discomfort meter from a mod it flickers around unless you run every tick but running every tick feels so excessive.

#

...and in my game I'm having it run every tick with no performance impact.

bronze yoke
#

almost everything is technically modifiable in some way at runtime so the language really has to work exactly how it looks like it works instead of optimising things secretly

silent zealot
#

Also in this specific case it can't assume GameSpeed() will return the same value each time it is called

bronze yoke
#

the thing is even if it could determine that, it couldn't determine that it wouldn't be changed to one that doesn't, so it can't optimise anything

red tiger
#

JIT script cannot optimize just as you said for those reasons.

bronze yoke
#

i constantly toy with the idea of a lua preprocessor to get around some of these limitations

#

but i've got enough on my plate 😅

red tiger
#

This is how it's done.

#

This is what Jython does

silent zealot
#

Good thing lua has other advantages such as allowing faster development to get a game out sooner. 😂

bronze yoke
#

i'd intend to do it in pure lua - in particular the ability to use macros/just inline functions would avoid a lot of the performance vs style tradeoffs and could easily be implemented in pure lua

red tiger
#

If future Project Zomboid builds can distance itself from dependency on Kahlua-specific API, then it becomes more of a reality for LuaJIT and other implementations to be used.

umbral ingot
storm patio
#

Hey guys! Any tips on why I can't delete recipe output with
local result = craftRecipeData:getAllCreatedItems():get(0)
character:getInventory():Remove(result)

tacit pebble
storm patio
#

yeah got it working, swapped to result:getType()

slim swan
#

How can I make the 2or1 hand weapon get zombie on fire

cosmic ermine
undone elbow
storm patio
#

Recipe always outputs this item, function deletes it after if ZombRand and/or getFullType dictates there should be different output
I.e recipe inputs Silver necklace, outputs are:
goldpiece - gets deleted
metalpiece or silverpiece, whatever zombrand rolls

Should be working alright I think?

south bear
#

Hey there! First timer here!

I was poking around for the solution to this and I am confused. I am attempting to use a lua script from server side to grab a player's position (x, y, z).

I am passing getPlayerFromUsername() the player's account name, but I get this error:

attempted index: getX of non-table: null

What am I doing wrong?

Also - thanks in advance! After reading a ton over the last bit, it's clear this community rocks! kardchalice

storm patio
bright fog
#

Also this error means your player variable is nil

south bear
#

I saw something about getPlayerByUsername() as opposed to getPlayerFromUsername()... Could this be a thing?

Also, the server must know where the players are in the game world, right? Is there truly no function that will get the server itself to provide that information?

Basically, what I want to do, is provide the player's username and in return get their x y z coords in the game world, if that makes sense! 😄

undone elbow
storm patio
#

But tbh even in cases where result is 1 Goldpiece, Istill delete it and then AddItem it back just in case atm💀

undone elbow
#

Why delete/add?

storm patio
#

To consolidate pretty much 7 recipes into 1

#

My only issue is it wont delete single istance of result(if it's the only one in inv).
Probably has to do with function looking for a thing to delete DURING craft, and actual thing being added to inv AFTER it

undone elbow
#

If you can't delete it at the first time, it's not added to player's inventory. So you need to check it later or prevent it from adding to the inventory.

bright fog
#

GetPlayerByOnlineID

#

And client side send to the server the client onlineID

storm patio
#

Tbh the only reason I'm even bothering is because it's basically a duping bug, even tho extremely tedious and long

undone elbow
#
  1. Find a place in vanilla code where a result is added to inventory.
  2. Make a decoration (injection)
  3. Profit 🙂
storm patio
undone elbow
#

Ah.
Where did you try to delete the item from? What is the code now?

storm patio
#

Using
local result = craftRecipeData:getAllCreatedItems():get(0)
character:getInventory():Remove(result:getType())
To get whatever the recipe output is set to, tried putting type/fulltype into Remove() and always got errors so using variable for now
So that's where output is deleted, doesn't delete first one as I said.
Than just a basic for cycle with my if conditions

#

From is character inventory then?

undone elbow
#

I mean where in the code.

storm patio
#

OnCreate then?
Recipe calls for OnCreate, OnCreate deletes the item

#

character:getInventory():Remove(result:getType())
Just in case, me dumb

undone elbow
#

output{} works just fine

storm patio
#

Oh snap, literally was going to try to leave outputs blank lol

storm patio
#

Straight to next question - what's the code for forcing recipe icon?

#

nvm literally just icon = iconhere, worked

hushed harbor
#

if you wanted to go the extra mile I'd love to see it reduce your vision cone while driving at night with it on. Having one of those on in the car always makes it way harder for me to see out at the road

umbral ingot
# hushed harbor This is super nice

Thank you! Yeah that would be realistic too. Currently the mod is just spawning a set of car headlights at the back of the car so that the tile the player is sitting in has light. I'll have to check out how player vision works to control it

random finch
knotty stone
#

anyone can tell me what "zombieType = Farmer," does? its in the livestock trailer.

#

my guess would be some kind of distribution ref?

bright fog
#

No idea

outer crypt
#

I was trying to update my pack files and tiles yesterday with tilezed and it kept breaking up my single tiles into 4 pieces. My guess is something changed or i fat fingered something. anyone run into this issue?

outer crypt
weary matrix
#

Hi, any clue how to use a recipe programmatically? For example I want to use the recipe "Open Box" when someone double click on a box of nails

weary matrix
slim swan
#

Where can I find the ‘baseballswing ’sound ,I check all the .bank files,but didn’t found it

bronze yoke
#

it's a remnant of a weird mechanic they had where you could drag a wheelie bin around anywhere with you

pearl prism
#

Is there any good item distribution tutorial for b42?

mortal copper
#

anyone here can help with making a custom spawn point?

pearl prism
mortal copper
#

I made a custom spawn point mod and got it to appear on the mod activation menu, activated it, but it doesn't appear on the spawn selection menu

had to make a "common" folder and it fixed it

bright fog
vast pier
#

how would I go about increasing the storage capacity of tiles like ovens, campfires, or cabinets?

vast pier
# sour island So generally illegal activities

lol looks like they got banned from the discord, and their mod was taken off the workshop. They have a comment on their profile saying it's cuz the devs are "queerphobic" even though there are other pride mods on the workshop

sour island
grand cloak
#

is the "force action" button in the craft menu of the debug mode supposed to give the output items of the craft?

grand cloak
#

mine isnt working wtf

#

is it only for me?

#

it doesnt add the items to my inventory

bronze yoke
#

i never managed to get it to do anything

grand cloak
#

weird

bright fog
#

I think it worked for me when I tested it ?

#

Idk

grand cloak
#

i need to force some recipe crafting in my mod here but without the force craft idk how

bright fog
#

Can't you give yourself the ingredients to just do it ?

grand cloak
#

not really

#

i guess i will just use code to give the outputs

bright fog
grand cloak
#

bc i need the player to be bleeding in order to make the recipe

#

but i will check for the bleeding part and replace the common crafting button with the force one

#

and then i will fix the code to give the outputs since it doesn't work

vast pier
bright fog
#

No need, you can make your character bleed with the health panel debug tools

silent zealot
bronze yoke
#

it definitely doesn't need to be discussed any further

silent zealot
#

in that case, moving on.... VS Code/Umbrella question: Can the "duplicate lua function" check be disabled? Without pasting ---@diagnostic disable-next-line: duplicate-set-field in front of every override function?

bronze yoke
#

i think you can disable it for your entire workspace, i think quick fix will suggest that as one of the options?

silent zealot
#

ah, the wording made me think it was shutting off all diagniostics not the specific thing -0 I re-red and you're correct.

icy night
#

Is this the correct way to override the official SawLogs recipe?

umbral raptor
#

Is it possible for models or textures to crash the game?

#

I can't even launch the game and have nothing but scripts

#

I have these scripts

#

And my LUA file has translate and a bunch of files related to locations

#

I am trying to update one of my fav mods to B42 but the game crashes whenever I launch it

#

is there any specific aspects that need to be updated for a B42 mod to work?

icy night
#

Crashes while your trying to launch a new game?

#

or when youre in the middle of the game

umbral raptor
#

There was a lot of LUA files that I deleted to try and get just the items into the game

umbral raptor
#

you know the black screen before it starts

icy night
#

Yea. That happened to me over a simple misspelling of peaches in one of my recipes

umbral raptor
#

the thing is

#

it worked for B41 perfectly

#

I took the files and organized them into the new B42 way

tacit pebble
#

for my case, wrong = crashed game.
it had to be :

umbral raptor
#

WARN : General f:0, t:1736819818031> TaggedObjectManager.createTagBits > manager-> new tag discovered that was not preprocessed, tag: keyduplicator
WARN : General f:0, t:1736819818049> TaggedObjectManager.createTagBits > manager-> new tag discovered that was not preprocessed, tag: recipes_stone_anvil
WARN : General f:0, t:1736819818052> TaggedObjectManager.createTagBits > manager-> new tag discovered that was not preprocessed, tag: advancedfurnace
ERROR: General f:0, t:1736819818162> GameWindow.uncaughtException > Unhandled java.lang.RuntimeException thrown by thread MainThread.
ERROR: General f:0, t:1736819818163> ExceptionLogger.logException> Exception thrown
java.lang.RuntimeException: java.io.IOException: Script load errors. at GameWindow.mainThreadInit(GameWindow.java:705). Message: Unhandled java.lang.RuntimeException thrown by thread MainThread.
Stack trace:
zombie.GameWindow.mainThreadInit(GameWindow.java:705)
zombie.GameWindow.mainThread(GameWindow.java:599)
java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Script load errors.
zombie.scripting.ScriptManager.Load(ScriptManager.java:1566)
zombie.GameWindow.initShared(GameWindow.java:156)
zombie.GameWindow.init(GameWindow.java:1442)
zombie.GameWindow.mainThreadInit(GameWindow.java:701)
... 2 more
LOG : General f:0, t:1736819818163> GameThread exited.

umbral raptor
#

Like the model name or in the code?

#

Could it be the recipes crashing it?

tacit pebble
# umbral raptor What do you mean? Can you show me an example?
-- this was my mistake
SkillRequired:[Perk]=[Level]
-- and I fixed like this (i can't remember cuz too long time ago)
SkillRequired:[Perk]:[Level]

above is an example, i tried to say: wrong characters such as = : seems to be able to crash your game

These were all i could see in console is.. so maybe if you are having similar issue mine, searching for these keyword would help you.

Remove script due to load error = [YourCraftRecipeName]
~ craftRecipe error in [YourCraftRecipeName] at CraftRecipe.Load ~
#

the one thing i can be sure is: wrong script can crash your game without any notice and they doesn't leave much tracks.

bronze yoke
#

it should be SkillRequired=[Perk]:[Level]

tacit pebble
#

if you are making a mod for B42, most of those parameters are also outdated and not to be used anymore.

vast pier
#

If it's what he was asking me about, he's trying to port an out of development mod from 41 to 42

tacit pebble
#

oh thats make a sence.

vast pier
#

I'm assuming english isn't your first language, but it's funny for you to edit the sentence and it still be wrong

#

I think the first step in porting the mod should be getting the models working, recipes and item stats can come later

hallow spade
#

Hello. Quick question - is there some practical example on how to replace part of a recipe without copying the whole thing? Or some way to overwrite without the result being a merge of both the changed recipe and the original one.

tacit pebble
bronze yoke
#

it'd be 'that makes sense'

vast pier
#

oh that makes sense.

tacit pebble
#

ugh now i won't forget that

vast pier
#

All good man, I still understood what you meant

bronze yoke
#

come to think of it, 'that makes sense' is quite a strange expression - you just don't question these things as a native speaker i guess

vast pier
#

what's strange about it

bronze yoke
#

it 'makes' sense?

#

it creates the state of being logical?

vast pier
#

yes

bronze yoke
#

it's not outright gramatically incorrect but it's definitely not how anybody speaks

#

i guess we say things like 'make peace' though

vast pier
#

I will proceed forward with speaking in that manner from now on. Purely led in my path by spite alone.

tacit pebble
#

you guys are better than my English teacher 10 years ago.

vast pier
hallow spade
#

Parts. I want to change a few values in some of the recipes around eg. adding more clothes to the sheet rope crafting recipe, but if I copy it in my own mod the result is a merger of my changed recipe and the original one. That is, it now takes twice the amount of clothes for twice the output.

vast pier
#

and is this for build 41 or 42

hallow spade
#

It was just an example in that case. I've several recipes I want to change but don't want to just clutter the menus with my own versions. B42

vast pier
#

well what's one of the recipes?

hazy lava
#

does anyone know how to convert b41 mods to b42, I made a alcoholic drink mod that works in b41 but I have no clue how to get it to b42

hallow spade
#

Pins will have data on the folder structure. If you have recipes they need to be changed too. Probably a bunch of other stuff, specially fluid items.

hazy lava
#

no i made the mod specifically for b42, followed the lua for the items etc and it only works in b41

#

i just got into modding

hallow spade
# vast pier well what's one of the recipes?

The sheet rope is the example I gave, but also one I want to change it to accept any cotton tag clothes. Wanted to add missing pieces to the rip denim/leather recipe too. Want to change some of the timers on a variety of recipes. Easy to do, just undesirable results.

icy night
hallow spade
#

I looked at a few mods and in theory it should work by copying/pasting and making my own, but well, it doesn't work well.

vast pier
#

Unfortunately I think recipes are loaded out of sync with lua, so the only way to modify a recipe would be to outright replace it?
Same with an item missing a tag, adding a recipe tag to an item via lua means it won't load the tag in time for the recipe to be made.

#

correct me if I'm wrong ofc

hallow spade
#

It is what it is. I'll see if the author of that mod that fixes food recipes has any advice they're willing to share.

hallow spade
#

Sure thing

vast pier
#

I mean, have you tried just replacing the recipe

#

By using the base module and identical recipe ID

hallow spade
#

Yes. Doubles input, doubles output. It's strange

vast pier
#

even with the same module id and recipe id?

hallow spade
#

Pretty much copied the vanilla file and deleted the unneeded parts

vast pier
#

could you send me the recipe file?

bronze yoke
#

recipes cannot be overridden anymore

vast pier
#

what

#

why

#

????

#

😭

bronze yoke
#

🤷‍♀️ they probably just didn't think of it, it's not like they need to do it

hallow spade
#

That's certainly something

vast pier
#

So you just, can't remove recipes?

icy night
#

oof

bronze yoke
#

i figure you can probably do some weird hack with lua but not in a simple way no

vast pier
#

💀

bronze yoke
#

the api around craft recipes is a lot more complex than the old recipes and i haven't had time to look too deeply into them - at the very least these kinds of hacks are probably a bit harder than they used to be

vast pier
#

new solution, duplicate and replace every item in the recipe 😈

#

remove them from the loot pools

#

(this is a very bad idea, don't do this)

hallow spade
#

Velkiel's mod does have a lua part, and if that's the solution then I'm toast

vast pier
#

what's the mod?

hallow spade
#

Manual edits are a go lol

vast pier
#

why would you be toast, if it works then just copy it?

hallow spade
#

Velkiel's fixed baking recipes

icy night
#

I was looking at his script. Its mostly cooking fixes.

#

yea

hallow spade
vast pier
#

No I do not know how.

hallow spade
#

Well, time to copy other recipes and see if maybe it was some fluke due to stupidity on my side

hazy lava
#

i think i did the script right but my mod just wont load into b42 and will for b41? Does anyone know how to fix this I wasnt even trying to make a b41 mod

hazy lava
#

Lmao uhm is that literally all i need to do

vast pier
#

possibly

#

the common folder is required tho, don't know why.
you can leave it empty

hazy lava
hallow spade
#

common is for stuff like art files from what I understand

bronze yoke
#

you can and should use it for things like art and translations, but it being hard required to exist is a bug

silent zealot
#

Since you can't see workbench specific recipes without clicking on that workbench

ebon dagger
#

I assume that its a limitation from the engine, but has anyone been able to change an equipped weapons ammotype and not have it crash the game?

silent zealot
#

While equipped?

#

Or in general?

ebon dagger
#

Yeah. While equipped

silent zealot
#

I have never tried, but given the way setting projectileCount > 9 works I would not be suprised if it crashes.

#

Also, are you changing the weapon item, the "template" for the weapon, or both?

ebon dagger
#

The item, not the template.

random finch
#

I want to get an IsoMovingObject that is under the mouse cursor. I have a solution but it uses squares and checks all the objects on given square. Seems cumbersome and only captures a players or zeds from the waist down.

Any tips or direction on getting a player being hovered by the cursor a better way?

ebon dagger
#

I've made a radial menu that finds al "applicable ammo" that you can swap to. Then using this code:

function ISAmmoSwapRadialMenu:onSwapAmmo(item)
    local weapon = self.character:getPrimaryHandItem()
    local current = weapon:getCurrentAmmoCount()
    if current > 0 then
        weapon:setCurrentAmmoCount(0)
        weapon:setRoundChambered(false)
        print("we should add one ammo back to inventory")
    end
    local newAmmo = item:getFullType()
    weapon:setAmmoType(newAmmo)
weapon:setAmmoBox(ammoBoxes[newAmmo])
end```
silent zealot
#
getPlayer():getPrimaryHandItem():setAmmoType("Base.Bullets9mm")
print(getPlayer():getPrimaryHandItem():getAmmoType())
ebon dagger
#

it swaps over on the items UI, but if you fire the weapon, the game freezes, crashes, and outputs this in the log:

ERROR: General      f:1458, t:1736830470829> ExceptionLogger.logException> Exception thrown
    java.lang.NullPointerException: Cannot read field "projectileRed" because "<local4>" is null at IsoBulletTracerEffects.createEffect(IsoBulletTracerEffects.java:227).
    Stack trace: ```
silent zealot
#

it loaded and fired the bullets just fine.

ebon dagger
#

Interesting.

silent zealot
#

What might matter is the "projectile" fired by the gun likely did not change in any way.

#

Since the bullets in a gun is just an int, and ammoType only matters for reloading when it delted ammo items and increments the gun's ammo int.

#

but if you're using this for a crossbow, are you trying to have the new ammo type change the graphics or projectile?

tacit pebble
#

Do you use custom effect for projectile? I had similar issue, the problem was from custom(modded) blood effects.

silent zealot
#

No, I just did that in a no-mods test game

#

one lua call to setAmmoType (exact command a few comments up)

ebon dagger
ebon dagger
#

I removed my functions that change appearance on fire, but it still did the same thing 😄

onyx valve
#

Hello, I'm trying to increase the protection by 20 points by eating what I named "Stone Skin", at the moment I'm trying with the torso, at least I don't crash the game but in console I got this message "no such function" OnEat_StoneSkin1Effect", could someone give me a hand?

#

I don't know what I'm doing jajaj

plucky junco
#

hi, i'm doing a translation of the mod "Week one", basically at the beginning of each day at 9 it show the text on the middle of the screen with the exact day of the week. It is not exactly a text, but it recall a .png in the texture. Now, they didn't set it in a way that you get a different png based on the language you are using, but you always get the english one, how can I modify it in a way that it get the link to the png files from a txt in the translation folder?

#

I don't know how to share the code here on discord

#

-- params: [day]
BWOEvents.StartDay = function(params)
local player = getSpecificPlayer(0)
player:playSound("ZSDayStart")

BWOTex.tex = getTexture("media/textures/day_" .. params.day .. ".png")
BWOTex.speed = 0.011
BWOTex.mode = "center"
BWOTex.alpha = 2.4

end

#

for example friday

tacit pebble
#

what is the name of png that you wanna call

plucky junco
#

i'm still thinking, maybe add a "_"and "gettext" and based on the language add for example "IT" for the italian translation

#

so if I have the file called day_friday_IT.png it goes to pic that one

polar gyro
#

Anyone know how i can launch sneeze or cough sound based on character's voice?
So, other people should hear it too

plucky junco
#

mind that i'm not good at all with lua, i just understand a little XD

tacit pebble
#

maybe this will work but i dont know what will be returned. (English or ENG or EN or whatever.. i've never used this one)

BWOTex.tex = getTexture("media/textures/day_" .. params.day .. "_" .. getCore():getOptionLanguageName() .. ".png")
plucky junco
#

i see what you want to do

#

i'll test it

sly monolith
#

guys how would i go about assigning a base game world model and then my textures to that model, to a modded item, i added:
WorldStaticModel = Holster_DoubleShoulder_Ground,
in the script that adds the item, and then:

{
    model Holster_DoubleShoulder_Ground
    {
        mesh = WorldItems/Clothing/ShoulderHolster_Ground,
        texture = ShoulderHolster_Red;ShoulderHolster_Black,
        scale = 0.125,
    }
}``` in a separate file for adding the ground mesh, but that didn't do anything heh
tacit pebble
#

so if it returns EN then you can name your file
day_friday_EN.png

plucky junco
#

great

tacit pebble
#

then that's what you exactly wanted. congraturation!

plucky junco
#

thank you

#

you do mods?

tacit pebble
plucky junco
#

i'll mention you on the mod

tacit pebble
slim swan
#

I add multiple sound files,but it only can play the last one,WHY?

winter bolt
sly monolith
#

but what if the ground model is different than the one on character, and have different textures

winter bolt
#

it just uses the texture anyway i guess

#

the ground models for clothing are different from the character ones anyway

sly monolith
#

so what, you just have to make the character texture fit the ground model one?

#

oh well nvm, removing that texture line made it work as intended lmao, thanks !

worn mica
#

Does anyone know the possible reason why a persons all modded .pack icon files are blurry but base game icons arent, unable to replicate on my end

#

It couldn't be related to the settings since they tested it fresh off

winter bolt
#

modded icons always have texture filtering when theyre scaled for some reason

iron hatch
#

Does anyone know how to get the current players UI zoom level? I'm trying to upgrade a friends integration mod and I've got it spawning in the direction player is facing:

    local facingDirection = player:getLastAngle()
    local distance = 15
    
    px = px + (facingDirection:getX() * distance)
    py = py + (facingDirection:getY() * distance)
    
-- bonz tweaks ended```

But I want to make distance be dependant on the zoom so that it always happens just off screen
#

I looked at the Class LuaManager.GlobalObject on the modding reference, which has the getPlayer(), but not something like getPlayerCamera(), and I checked out the playercamera object which has some maybe useful things but I don't know how to reference/get it

crisp fossil
deft wave
#

Hey guys, I made a mod for a hat which can be worn in different ways. Because Im new to modding I used other mods and vanilla hats as reference. Everything seems set up correctly. But somehow its not working even the actionbar appears.
Does anyone know about this issue? Thanks in advance 🙂

umbral raptor
#

Hey guys I am having trouble with a mod. Whenever I try to select it in the mod selection screen (only it) it causes the screen to freeze in a forever “reloading lua” before it brings a broken main menu

#

I am not sure what’s causing it. I looked over the code several times.

drowsy pumice
#

Hello, I'm looking to commission someone to make a mod for me. I would like a mod which let's us craft fried chicken from a recipe based off the fried shrimp craftable recipe in the game right now.

Essentially I need someone to copy the recipe and replace the shrimp with chicken (raw) and small foul meat (raw) as well as change the result into fried chicken.

Ideally I'd like the mod to be compatible with B41 and B42 if possible.

If anyone is interested please dm me (or ping me here) and tell me your rates. Thank you.

umbral raptor
#

This is the mod.

umbral raptor
#

Yeah alot and a broken main menu

umbral raptor
#

Plus long reloading lua time when selecting the mod

bright fog
umbral raptor
#

Question, how does one set how the clothing item will go on the player model?

umbral raptor
#

DEBUG: Script f:0, t:1736860243499> ScriptManager.LoadFile > media/scripts/clothing/supportcorps-clothing.txt
DEBUG: Script f:0, t:1736860243529> ScriptManager.ParseScript > Parsing...
DEBUG: Script f:0, t:1736860243529> ScriptManager.CreateFromToken > Adding new module: SupportCorps
DEBUG: Script f:0, t:1736860243529> ScriptManager.LoadFile > media/scripts/supportcorps-models.txt
DEBUG: Script f:0, t:1736860243543> ScriptManager.ParseScript > Parsing...
ERROR: General f:0, t:1736860552004> ExceptionLogger.logException> Exception thrown

#

Here's the file in question

winter bolt
#

then it points to an xml file in media/clothing/clothingitems

#

but you also need to add it to media/fileguidtable.xml

umbral raptor
#

i did

sour island
winter bolt
umbral raptor
#

Fixed several errors in that file

#

lemme try now

#

Now it works! Thanks alot!

#

i added backpacks but the models aren't showing

umbral raptor
#

None of the models are showing on the player.

#

They show up in the hand normally.

random finch
#

Any ideas on how to obtain the screen coords that a players model occupies?

#

I want to display information when a mouse hovers over a player. We have access to IsoObjectPicker, however it's not accurate. In the case of ContextPick, it uses squares, so hovering over a player above the waist detects nothing. Pick & PickTarget doesn't like players and looks at sprites, probably meant for pre-B41.

#

Currently, the most accuracy I can get is by using a static hitbox of 64x128.

bright fog
#

You can scale that box with zoom, at least that I know

#

As for getting what's exactly under the cursor, there might be some tricks

random finch
bright fog
#

I'm not aware of any exact method to get objects in your cursor

random finch
#

IsoObjectPicker is the only thing I could find.

umbral raptor
random finch
#

This is what is used when get a players display name when hovering them. But, it's extremely inaccurate.

bright fog
#

I had used a fairly imprecise way of getting zombies on my cursor, but exactly the model I didn't use that

#

I'm not familiar with what IsoObjectPicker is

random finch
#

May I ask how you did it?

bright fog
#
-- Zombies that are around the client radius cursor will be valid to show their nametags.
-- This takes into account zombies on different levels.
---@return table
ZomboidForge.GetZombiesOnCursor = function(radius)
    local zombiesOnCursor = {}

    local aiming = client_player:isAiming()
    if not Configs.NoAimingNeeded and not aiming then return zombiesOnCursor end

    -- get cursor coordinates
    local mouseX, mouseY = ISCoordConversion.ToWorld(getMouseXScaled(), getMouseYScaled(), 0)
    mouseX = aiming and mouseX + 1.5 or mouseX
    mouseY = aiming and mouseY + 1.5 or mouseY

    -- TODO: this probably needs some tricks to optimize now that it checks for 65 levels instead of just 8
    for z = -32,32 do
        for x = mouseX - radius, mouseX + radius do
            for y = mouseY - radius, mouseY + radius do
                if (x - mouseX) * (x - mouseX) + (y - mouseY) * (y - mouseY) <= radius * radius then
                    local square = getSquare(x+ z*3, y+ z*3, z)
                    if square then
                        local movingObjects = square:getMovingObjects()
                        for i = 0, movingObjects:size() -1 do
                            local zombie = movingObjects:get(i)
                            if zombie and instanceof(zombie,"IsoZombie") then
                                zombiesOnCursor[zombie] = true
                            end
                        end
                    end
                end
            end
        end
    end

    return zombiesOnCursor
end
random finch
#

Very similar to my initial method:

-- Detect if a player is being hovered over by the mouse
local function detectHoveredPlayer(self)
    local clickObject = IsoObjectPicker.Instance:ContextPick(Mouse.getXA(), Mouse.getYA())
    if not clickObject then return nil end

    local clickObjectTile = PlayerConstructionZone.getClassFieldValueByName(clickObject, "tile")
    if not clickObjectTile then return nil end

    local clickSquare = clickObjectTile:getSquare()
    if not clickSquare then return nil end

    for x = clickSquare:getX() - 1, clickSquare:getX() + 1 do
        for y = clickSquare:getY() - 1, clickSquare:getY() + 1 do
            local square = IsoCell.getInstance():getGridSquare(x, y, clickSquare:getZ())
            if square then
                for i = 0, square:getMovingObjects():size() - 1 do
                    local isoMovingObject = square:getMovingObjects():get(i)
                    if instanceof(isoMovingObject, "IsoPlayer") then
                        return isoMovingObject -- Return the hovered player
                    end
                end
            end
        end
    end
    return nil
end
#

My best bet is to find a way to get the pixels that player model occupies.

#

If that's impossible, get on my hands and knees and pray to the devs for an IsoObjectPicker method that works with players. I tried to write one myself, but there are too many things that are inaccessible.

vast pier
#

is there a way for a piece of clothing to have an affect on your carry weight or have attachment slots without it being a container?

bronze yoke
half pelican
#

Hi. In one of my mods I use the code:
local addPain = 13.5 head:setAdditionalPain(addPain); --variable initialized above MoodlesUI.getInstance():wiggle(MoodleType.Pain);
The pain moodle appears and wiggle, but after a while. I would like to know how to make it appear immediately.

sly monolith
#

@fading horizon hey, sorry to ping you but I saw you talking about getTexture earlier. Do you happen to know why when I craft an item the texture for the icon and the item itself gets picked correctly, but the ground model has a random one from the available pool? I use the same file structure I did for my other mod and there it works just fine, but here it's like I said, random

sly monolith
#

after further testing it seems i was wrong, it only applies the correct texture to the icon, but both the item worn and the one on ground have random texture, but it's consistent on both player model and the ground one, just randomly picked when crafted

#

I went through the files multiple times and I can't find any difference between one mod and the other, idk why it's happening 😵‍💫

robust locust
#

Hiya... would anyone know if.... I add a new tag to an item (i.e. Tags = Guitar)... do I need to add code anywhere else to "add" this tag to the game?

#

so that I can use it in a recipe?

winter bolt
#

if you replace the item script and add the tag there i think that works?

fading horizon
#

What does your xml file look like?

#

What does your models_items look like?

#

That's where I would expect issues

robust locust
winter bolt
#

that should work then i think

fading horizon
#

I'll pull up an example of what one of my backpacks looks like in a sec for you

sly monolith
#

i could update the mod and you'd download and check inside? if that would be best

#

or should i just paste the text here

umbral raptor
#

Hey, has anyone added backpacks before?

#

Is the model file in the scripts supposed to contain just the worldstaticmodel (worlditems) or does it include the clothing models too

bronze yoke
#

clothing models don't go through scripts

umbral raptor
#

ight

fading horizon
#
item Bag_Coffin_Bat{
                DisplayCategory         = Bag,
                Type                    = Container,
                DisplayName             = Goth Bat Backpack,
                ClothingItem            = Bag_Coffin_Bat,
                CanBeEquipped           = Back,
                WeightReduction            = 85,
                Weight                  = 1,
                Capacity                = 22,
                IconsForTexture         = Bag_Coffin_Bat;Bag_Coffin_Bat_Pink;Bag_Coffin_Bat_Lavender,
                OpenSound               = OpenBag,
                CloseSound              = CloseBag,
                PutInSound              = PutItemInBag,
                EquipSound              = EquipBackpackSmall,
                SoundParameter          = EquippedBaggageContainer SchoolBag,
                OnCreate                = gothBags_onCreate,
                BloodLocation           = Bag,
                RunSpeedModifier        = 0.99,
                CanHaveHoles            = false,
                AttachmentReplacement   = Bag,
                BloodLocation           = Bag,
                ReplaceInSecondHand     = Bag_Coffin_Bat_LHand holdingbagleft,
                ReplaceInPrimaryHand    = Bag_Coffin_Bat_RHand holdingbagright,
                WorldStaticModel        = Bag_Coffin_Bat_ground,
        }```
#

this is the item script

umbral raptor
#

i added everything related to a backpack

fading horizon
#

the relevant part here is IconsForTexture = Bag_Coffin_Bat;Bag_Coffin_Bat_Pink;Bag_Coffin_Bat_Lavender, for icons @sly monolith

umbral raptor
#

the item script, the model script, the clothingitems, the textures, etc.

fading horizon
#

the xml is as follows <?xml version="1.0" encoding="utf-8"?> <clothingItem> <m_MaleModel>Skinned\Backpacks\Bag_Coffin_Bat_M</m_MaleModel> <m_FemaleModel>Skinned\Backpacks\Bag_Coffin_Bat_F</m_FemaleModel> <m_GUID>a8dd1b1f-92c0-4c60-a999-05f2b2f99dc9</m_GUID> <m_Static>false</m_Static> <m_AllowRandomTint>false</m_AllowRandomTint> <m_AttachBone /> <textureChoices>clothes\backpacks\Bag_Coffin_Bat</textureChoices> <textureChoices>clothes\backpacks\bag_coffin_bat_Pink</textureChoices> <textureChoices>clothes\backpacks\bag_coffin_bat_Lavender</textureChoices> </clothingItem>

#

this is where textures are also defined

umbral raptor
#

does it use the model texture or icon texture?

#

in the itemscript

fading horizon
#

the only thing related to the ground model is related to the worldstaticmodel parameter in the item script, which is defined in your models_items script, as follows

        {
            mesh = WorldItems/Bag_Coffin_Bat_ground,
        }```
#

in terms of file structture

umbral raptor
#

no scale?

fading horizon
fading horizon
umbral raptor
#

wb texture?

fading horizon
#

i dont like fucking around with the scale. its annoying

#

these are the file paths to both the item textures and icons which should correspond to the filenames yyoyu see in the XML

sly monolith
#

omg i just found what was wrong

#

thank you so much

fading horizon
#

awesome! sometimes posting a relevant example can help more than anything i feel.

sly monolith
#

look that's the ankle holster

#

IconsForTexture = Holster_Evil_Red;Holster_Evil_Black;Holster_Evil_White,

#

now this is the shoulder holster

#

Icon = HolsterShoulder_Black,

#

😂

fading horizon
sly monolith
#

i was confused why the ankle one worked just fine heh

fading horizon
sly monolith
#

thank you again! :3

fading horizon
#

of course! Happy to help

sly monolith
#

now i can carry 6 handguns on me, who needs reloading, right 🤣

ancient grail
#

question is it possible to add gun attachment even if the attachment may not be installed cuz its from other mod?
lua i can use activated mods

but what abt scripts?

this is a b41 question

umbral raptor
sour island
bronze yoke
#

it's not accidental, the context menu is meant to only find specific objects

#

it deliberately searches for each of some specific objects

#

for players i've resorted to searching a 2x2 area with the clicked square in the northeast corner and that seems to work well enough

#

there is an event for clicking on an object but i don't know if it has similar limitations

sly monolith
round thorn
#

Is there anyway to bypass the need to put everything into inventory first, before putting it into hands/held slot?

fading horizon
sly monolith
#

same issue, random texture on crafting

#

like nothing changed

fading horizon
#

Hmm

sly monolith
#

but for whatever reason the ankle holsters work as intended, just the belt and shoulder ones don't, and they are set up exactly the same, or i'm missing something

fading horizon
#

So in your item script, make sure your iconsForTexture are in the same order as <texturechoice> in the xml

#

If they're not in the same order, they'll be off

sly monolith
#

it is, but when i craft it's once red, once black, once white, randomly, it's not consistent

fading horizon
#

There's one more thing that might help your issue I forgot to mention lemme go get it

#

I think it might be the key

#

You may need an on create function in the item script

sly monolith
#

yeah i don't have that

fading horizon
#

I have one that takes the item and rename it and assigns texture iirc

#

Lemme go to my pc one sec

sly monolith
#

but like, it just worked fine with my backpacks, without it

fading horizon
#

Did that one have multiple textures?

sly monolith
#

yeah like 9

#

and they always corresponded

fading horizon
#

and all of the icons work? none of them turn into the circle with question mark?

sly monolith
#

ok now i got paranoid, let me recheck that

sly monolith
#

that go random

fading horizon
#

hmm

#

can you paste your xml / also item script here

#

lemme take a look

sly monolith
#

could i send you the file ?

fading horizon
#

check filenames too if you havent, a capital letter can screw you over easilyyy

#

yeah sure feel free to send it and ill take a look

#
-- !! oncreate function to set item names based on texture
function gothBags_onCreate(item)
    item:setName(
        gothBags[item:getType()][item:getVisual():getTextureChoice()].name
            .. " "
            .. gothBags[item:getType()][item:getVisual():getTextureChoice()].color
    )
end```
#

this is my oncreate function

#

i guess its just for setting name i forgot lol, been a couple days

#

however

#

this next part at least may be able to help you debug

#
local function changeTex(item, texture)
    -- >> set new texture
    item:getVisual():setTextureChoice(texture)

    -- >> set new name corresponding to texture
    item:setName(gothBags[item:getType()][texture].name .. " " .. gothBags[item:getType()][texture].color)

    -- >> get player object
    local player = getPlayer()

    -- >> update textures if equipped
    player:postUpdateModelTextures()

    -- >> get icon object for new icon from filepath
    local tex = getTexture("media/textures/" .. gothBags[item:getType()][texture].icon)

    -- >> set new icon
    item:setTexture(tex)
end

-- !! Hook for when inventory context menu is called
local function OnFillInventoryObjectContextMenu(player, context, items)
    for _, item in ipairs(items) do
        if not instanceof(item, "InventoryItem") then
            item = item.items[1]
        end

        if item:getModule() == "gothBags" then
            -- # Check if item has multiple textures by checking if it has "iconsForTexture"  parameter
            local icons = item:getIconsForTexture()

            if icons ~= nil then
                local gothBagsOption = context:addOptionOnTop("Change color")
                local gothBagsMainMenu = ISContextMenu:getNew(context)
                context:addSubMenu(gothBagsOption, gothBagsMainMenu)

                for i = 0, #gothBags[item:getType()] do
                    -- add context menu option for each color of the bag
                    gothBagsMainMenu:addOption(tostring(gothBags[item:getType()][i].color), item, changeTex, i)
                end
            end
        end
    end
end

Events.OnFillInventoryObjectContextMenu.Add(OnFillInventoryObjectContextMenu)```
#

this my code for adding a context menu for changing the backpacks texture at will

#

you could modify this and add it to yours, which would allow you to cycle through the texture choices which may help you narrow down the issue

#

it pulls from a table with a structure as follows

    Bag_Coffin_Bat = {
        [0] = { name = "Goth Bat Backpack", color = "(Black)", icon = "item_Bag_Coffin_Bat.png" },
        [1] = { name = "Goth Bat Backpack", color = "(Pink)", icon = "item_Bag_Coffin_Bat_Pink.png" },
        [2] = { name = "Goth Bat Backpack", color = "(Lavender)", icon = "item_Bag_Coffin_Bat_Lavender.png" },
    },
{same structure for next backpack} etc```
sly ivy
#

heya, sorry im new here, where would you guys recommend starting on learning to create a weapon mod?
I have a 3D model fully created with versions, and all the details planned and such, but i would like to learn how to add it into a game

ornate sand
#

I learned weapon modding by studying the ones in the workshop

sly ivy
#

so, what kinda tools do you use to make them?

ornate sand
#

Blender, some .txt files and some lua

#

Notepad+ is rad

sly ivy
#

oh fair enough then, so would you say just to look into the files and poke around a bit then?

ornate sand
sly ivy
#

and, thank you for being so welcoming and helpful,

#

tried learning how to mod reforger and figured dear god enfusion was a pain,
hope this turns out easier for me

ornate sand
#

Feel free to ask questions.
If you're planning on a melee weapon mod, your road is easy

sly ivy
#

sorry for derailing but i find that a bit funny, the exact opposite of the norm

#

usually modding melee is harder from what i've seen XD

ornate sand
#

Nope, try gun modding XD

#

Actually don't. The world has enough brain injuries

sly ivy
#

mind if i show my little rifle? i originally intended it for reforger so im probably going to have to redesign the whole thing to be lower poly

ornate sand
sly ivy
#

fair! brain blanked and forgot that existed

ornate sand
#

Also what's wrong with Notepad+ @bronze yoke ? 😮

bronze yoke
#

it just doesn't do much, especially for lua it's not very helpful

#

i'll always recommend vscode for pz

ornate sand
#

I use notepad+ and lose some hair every time I try to figure out LUA

bronze yoke
#

i get why people are reluctant to try a 'proper' ide but either way you're just typing text into a text editor

ornate sand
#

Like why custom AnimSets are still broken

random finch
#

I need to research how context menus are determined exactly. I was looking more into IsoObjectPicker to see how hovering player for display name works. It seems to be similar to context menus. I really do no like the way the 'hitboxes' are produced based off of squares. For example, this is kind of how a context menu hit box looks visually:

#

@sour island meant to respond to you

#

It may be what Albion was referring to with 2x2. It get's the job done, but, IMO, not good enough.

#

I can get a hitbox that looks that this now - much better.

#

Although, I am trying todo one better by only determining the pixels that the player model is currently occupying.

#

But, I am having hell with it - no doubt

north rain
#

@winter bolt hey, what bones for your player model were causing crashes due to the zombies sharing the same bone? I have a male model and it's causing crashes. It's using the b41 fbx that was pinned.

low shell
#

heya I do have question

#

so I rember that in item script

#

there was ability to offest model

#

to move it x,y,z cordinates on the world plain

#

but can I offest model by degrees?

ancient grail
#

addWorldInventory() i think

ancient grail
low shell
low shell
ancient grail
bronze yoke
ancient grail
#

like position them on the ground?
or on the player?

old ginkgo
old ginkgo
#

Frankly the context menu is flawed at its core and I’m very glad TiS is moving away from it for most things.

low shell
#

and I look for class that wil allow me to tranform this object by 180* on z plain

sly ivy
#

hey, sorry, i was poking around another mod file to learn how to order and create the files, but im confused, in the models_x part there's just a file with the extension .x im a bit confused about it

#

is this a form of 3D model file?

low shell
#

I hope this will work

ancient grail
#

its not possible
x and y positions its offset and height is how high it is

#

theres no rotate for that
you would have to make another item

ancient grail
low shell
#

ah i get ya

#

well It appears I will have to do it manualy in blender

#

Thanks for help

fading horizon
#

Hey yall i have a question on mod update distribution for B42.

I finally have finished the update for my goth backpacks mod. Since this mod adds a lot of models and higher res textures, its pretty big.

The original file on the workshop for b41 is 117 MB.
The updated b42 version is 77 MB.

My question is should I update the b41 mod to also have the b42 files so theres only one workshop listing for the mod, or since the filesizes are large should I make a separate workshop listing for the b42 version? The b41 version isnt updated with all the new stuff the b42 version now has, as I've basically remade the mod from the ground up including remaking every model, so using the common folder isnt really an option unless i go and remake the b41 version as well.

I dont really know what is proper etiquette here so i would appreciate some insight

low shell
#

I think "common" is meant for both game versions

fading horizon
#

yes i understand the filestructure thats not my question

#

im asking

#

do i have
1 200mb workshop listing for the mod, compatible with b41 and b42

or

2 individual workshop listings at smaller sizes, one for each build

#

to conserve the users space so they dont have to download everything if theyre only using one version

#

im not sure which is the proper etiqutte

low shell
#

well the best would be to optimise 1 file to lowest file size while still being compatebile to both, but go with "fork" first

#

its just easier

north rain
#

I just found the fix to B42 player model crashes :)

bronze yoke
#

up to you really, i haven't forked any of my mods because they're tiny but people will appreciate if you do - ignoring file size you don't have to worry about potentially needing to update the b42 version and forcing server hosts to restart even though their version of the mod didn't even update

fading horizon
#

but yeah causing b41 to update when theres a b42 only update would piss people off so i will make a separate version for the time being and maybe combine them when b42 is more stable and more congruent with b41

low shell
#

also if something breaks in b42 ,complains will be kept only at b42 fork

#

not on main page

fading horizon
#

another very good point

#

thanks yall, I appreciate it