#mod_development

1 messages ยท Page 226 of 1

outer crypt
#

This is the best information I could find on the subject.

#

I also tried to change them in MapObjects.OnLoadWithSprite() thinking I could bypass whatever was happening in TileDefs with no luck...

tough edge
hushed forge
#

can recipes give off two items?

tough edge
hushed forge
#

phuc

steady lagoon
#

Do you guys know if it is possible to add specific items to a profession? I mean, if you start selecting a specific profession, you have those items in the inventory.

#

or specific clothes

tough edge
small topaz
#

Hi! The OnKeyPressed event has the parameter "key":

 -- something
end

Events.OnKeyPressed.Add(onKeyPressed)```
"key" is an integer encoding the actual key you pressed on the keyboard. For example, for my keyboard I have

key = 17 <--> W 
key = 30 <--> A 
key = 31 <--> S 
key = 32 <--> D 

Is this the same on for every PC? (I guess yes???) Moreover, what if the player changes key bindings? Will "key = 17" for example still mean that the player pressed the move-forward key? Or does it mean always that player presses W, no matter of the key binding?

I know I can figure out the second question by just testing it changing the key binding in my game but maybe someone here happens to know... ๐Ÿ˜‰
small topaz
outer crypt
#

Might need to create a company called "Green Oven" just to make it work, lol! "When you want the best, buy Green Oven!" or "Green Oven generators, when your power is lean, you gotta go green!"

drifting ore
#

When creating items for mods, is their a character limit?

steady lagoon
coarse sinew
#

Green Oven: When life gives you bugs, make dinner.

fervent marlin
#

Is there something not working properly with the trip function?

#

Every time I call to trip the player it just freezes me in an animation

desert kelp
#

Anyone know how can I force tilepack file to get me some file format like this anhnpc_0?

It keeps forcing to name with an additional "_0". Got lucky once but I don't know what i did

Reference in the image

#

Because of this, I can't link it to the tile property ๐Ÿ˜ญ

coarse sinew
slow graniteBOT
#
thenewnamingsystemreallysucks has been warned

Reason: Bad word usage

desert kelp
coarse sinew
desert kelp
#

How do you do the second image btw? All I got is ??? when loading in the tile property

coarse sinew
#

Combine them in paint, PS, or whatever program you use

desert kelp
#

Wait let me try to combine first then check from there. Thanks again!

slow graniteBOT
#
thenewnamingsystemreallysucks has been warned

Reason: Bad word usage

desert kelp
#

worked now thanks @coarse sinew . sprite still needs to be polished but it's a good start

slow graniteBOT
#
w33dpanties has been warned

Reason: Bad word usage

slow graniteBOT
#
w33dpanties has been warned

Reason: Bad word usage

#
elnegrotruji has been warned

Reason: Bad word usage

sour island
#

I wonder what's going on

slow graniteBOT
#
stonednalone has been warned

Reason: Bad word usage

calm rose
#

Anyone know any mods that mess up foraging zones globally? I.e. overwrite modded foraging zones with vanilla? I'm desperately trying to find the cause for this (nothing obvious like ForagingZ is enabled)

bright fog
bright fog
steady lagoon
#

I noticed that if you create a custom clothing, by copying one from the base game, using the same "ClothingItem" parameter adds it to the game distribution and you can find it in game.
Is there a way to prevent this from happening, without creating an entire cloth item from scratch?

#

I mean Definitions not Distribution

bright fog
steady lagoon
#

this is the test item I made:
item SuperTankTop
{
DisplayCategory = Clothing,
Type = Clothing,
DisplayName = Super Tank Top,
ClothingItem = Vest_DefaultTEXTURE_TINT,
BodyLocation = TankTop,
Icon = Vest_White,
BloodLocation = ShirtNoSleeves,
ScratchDefense = 100,
BiteDefense = 100,
RemoveOnBroken = false,
CanHaveHoles = false,
Insulation = 0.55,
Weight = 0,
WindResistance = 1,
WindResistance = 1,
FabricType = Cotton,
WorldStaticModel = BulletVest_Ground,
}

#

The clothingItem seems to be shared with the base tanktop

#

and it replaces it in game

#

isn't the ID, in this case, SuperTankTop?

#

ahno, that's the type

#

I added all those parameters to see the behaviour, but it replaced the one in game, as I see zombies wear this and I don't want to.

#

I wonder if I need to write, yet another lua script, to delete all items of this type from the world.

bright fog
steady lagoon
#

can I just change the name directly or should I create another xml file? I see that Vest_DefaultTEXTURE_TINT has a .xml file.

#

This xml also has its own GUID which is used in the file clothing.xml.

steady lagoon
#

no no

bright fog
#

You need to create your own then yeah

steady lagoon
#

I see, let me try.

bright fog
#

For the GUID, use a GUID generator online

steady lagoon
#

should this GUID be added to the clothing.xml file or can I ignore that step?

bright fog
#

No idea

#

What's in clothing.xml ? That's the outfits ? Then no

grizzled fulcrum
#

This is my first time doing animations for Project Zomboid (and any game really) so I followed the Steam animation guide linked on pzwiki. I did everything correctly as listed but I am getting a warning in the lua console in game saying "Animation Clip not found: AQ_BrushTeeth". If anyone knows about this error, please let me know!

bright fog
#

BOb_RP or some shit like that, you need to rename that, it's this that defined the name of the animation clip

grizzled fulcrum
#

I may just be blind but I believe I have changed the name

bright fog
#

Did you restart your game when creating the animset with the animation clip ?

bright fog
# grizzled fulcrum

I can't look at Blender rn so I can't verify that what it's supposed to look like but what I can tell you is that it's not where I change the name of the clip nor at it

tough edge
bright fog
grizzled fulcrum
#

yes, in the third image I posted the green bar is the orange bar

#

green just means editing and orange means not I believe

bright fog
#

Didn't see the 3rd screen mb

#

Did you use the IK model ? Make sure your export settings are the same

grizzled fulcrum
#

maybe it matters where I put it?
I have it currently in media/anim_X/AQ_BrushTeeth.fbx but I tried in a subfolder named Kate as well

bright fog
grizzled fulcrum
bright fog
#

:|||||

bright fog
grizzled fulcrum
#

that is odd

#

I opened ANIM_TEMPLATE.blend not IK_ANIM_TEMPLATE.blend

#

ANIM_TEMPLATE.blend for whatever reason contains IK_R_Calf and IK_R_Thigh entries but they aren't linked to anything and no IK stuff shows up for modelling

bright fog
#

Use the IK model, why would use you use the non IK one ?

grizzled fulcrum
#

I thought it would be harder to animate lol

#

Ill reanimate it in IK model and come back

bright fog
#

It's wayy easier to animate with IK lmao

#

Like WAY WAY WAY easier

#

Bcs you don't just have to rotate every single bones, you just move the IK and the whole body parts follow the movement

steady lagoon
slow graniteBOT
#
drugon31 has been warned

Reason: Bad word usage

vast orchid
#

Do you need to do anything special to override vanilla recipes? Every attempt so far just seems to be ignored.

Nevermind, apparently I was editing the wrong function.

small topaz
#

When using commands like getTimestampMs() for getting the actual time the game is running, can't this result in overflow errors when the game is running for quite a long time?

coarse sinew
#

Nope, getTimestampMs() returns the current IRL time in milliseconds from the Unix epoch 1970. The long data type (type that function returns) in Java has a maximum value of 2^63-1, which means it can represent times up until about 292 million years from the epoch. So, overflow isn't a concern

vast orchid
#

Is there a way to edit entries in the vanilla (.txt) script files without fully overwriting said files? If there's no other option, what does one do for mod compatibility?
(Don't know if it's important to mention, but the files in question would be evolvedrecipes.txt and items_food.txt)

small topaz
# vast orchid Is there a way to edit entries in the vanilla (.txt) script files without fully ...

Not sure about the evolvedrecipes.txt but for items as in items_food.txt, you can use the following:


  local item = ScriptManager.instance:getItem("Base.MyItem")

  if item then
     item:DoParam("Weight = 5.0")
  end
end

Events.OnGameBoot.Add(changeMyItem)```
This shouldn't cause any mod conflicts (except for other mods which also modify the Weight parameter of the item or base their code on the expectation that it has a different value ofc).
vast orchid
#

Thanks, I'll try playing around with that.

bright fog
#

He finally fixed it, was annoying all these bugs

stable yew
random vale
#

I've been getting this error on line 14 in this mod I've been working on.
line 14 is just if player:getPerkLevel(Perks.Doctor) >= math.random(0, 10) then.
idk how it could be erroring, I checked the logs and it basically said Object tried to call nil?
I'm confused.

coarse sinew
random vale
#

ohh

random vale
zenith igloo
small topaz
zenith igloo
#

ingame changes in the bindings doesnt effect the integers there unless you add customizable bindings in mod options etc.

#

not %100 on it tho

small topaz
vast orchid
#
local sm = ScriptManager.instance

function OverwriteEvolvedRecipes()
sm:getItem("Base.Roasted Vegetables"):DoParam("MaxItems":"12");
end

Does anyone have an idea what I could do to edit MaxItems? It's formatted like this:

MaxItems:6

Instead of like this in evolvedrecipes.txt

MaxItems = 6
#

The function on the top seems to be meant for overwriting parameters in the latter format, I tried adapting it, but no dice

small topaz
#

Is there a java command to check whether a worn clothing item is currently hidden by another one which has been defined via the body location command "setHideModel()".

I know you could easily find out by writing a custom function for this but I am wondering whether the game as a simple predefined command instead.

bright fog
#

Where are defined Icon from script files ?

    item Hat_GasMask
    {
        DisplayCategory = Accessory,
        Type = Clothing,
        DisplayName = Gas Mask,
        ClothingItem = Hat_GasMask,
        BodyLocation = MaskEyes,
        Icon = GasMask, <-----------------------------------------
        CanHaveHoles = false,
        BloodLocation = Head,
        Insulation = 0.75,
        WindResistance = 0.60,
        WaterResistance = 1.0,
        Tags = GasMask,
    }
mellow frigate
bright fog
#

๐Ÿ‘Œ

#

What do I need to use exactly to unpack ?

bronze yoke
#

tileed

bright fog
#

Is that in the modding tools ?

mellow frigate
#

yes, Tilezed

bright fog
#

Am I supposed to put the .pack I want to view in a specific folder to see them in the pack viewer ?

#

yeah idk it's completely empty and nothing to select the .pack file

cold whale
#

Hello pals, it's me again. I am adding to my mod some zombies with custom clothes (these clothes are from vanilla). I defined the new type of zed with this specific clothes in the \media\clothing file (clothing. xml). The code is the following:

<outfitManager>
            
<m_MaleOutfits>
        <m_Name>Samplezed</m_Name>
        <m_Guid>514dd1c6-606d-4662-b94d-c23bb8dc3385</m_Guid>  <!--This code is unique, generated by an internet guid page -->
        <m_Top>false</m_Top>
        <m_Pants>false</m_Pants>
        <m_AllowPantsHue>false</m_AllowPantsHue>
        <m_AllowTopTint>false</m_AllowTopTint>
        <m_AllowTShirtDecal>false</m_AllowTShirtDecal>
        <m_items> <!--Hat_Cowboy -->
            <itemGUID>ae7791f9-a5df-48d8-882f-a0749b8af2b1</itemGUID>
        </m_items>
        <m_items> <!--Vest_BulletArmy -->
            <itemGUID>1a437dbb-cee9-4013-8e8a-e158acf98b62</itemGUID>
        </m_items>
        <m_items> <!--Bag_DuffelBag -->
            <itemGUID>b02d3217-b692-4035-8a61-8c4305998464</itemGUID>
        </m_items>
        <m_items> <!--Gloves_FingerlessGloves -->
            <itemGUID>cf0b766a-c273-49b0-bee4-5a0bb6496491</itemGUID>
        </m_items>
        <m_items> <!--Shirt_HawaiianRed -->
            <itemGUID>6067cc54-e9f1-4731-a163-ba8f9d55bc03</itemGUID>
        </m_items>
        <m_items> <!--Trousers_Denim -->
            <itemGUID>229b23f6-8e8f-4f16-837b-4fe950c48bfc</itemGUID>
        </m_items>
        <m_items> <!--Shoes_TrainerTINT -->
            <itemGUID>6fed6e2b-3a72-4bac-aac5-09585984493d</itemGUID>
        </m_items>
    </m_MaleOutfits>
</outfitManager>```
#

Also, in the media\lua\shared\NPCs folder I added the .lua file for distributions. The file is the following:

require 'NPCs/ZombiesZoneDefinition'

MAZombiesZoneDefinition = ZombiesZoneDefinition or {};

ZombiesZoneDefinition.Army = {
    Samplezed = {
        name = "Samplezed",
        chance = 90, --I added a high spawn just to verify if it's working or not
        gender="male",
        },
    }

ZombiesZoneDefinition.Police = {
    Samplezed = {
        name = "Samplezed",
        chance = 90, --I added a high spawn just to verify if it's working or not
        gender="male",
        },    
    }

ZombiesZoneDefinition.Prison = {
    Samplezed = {
        name = "Samplezed",
        chance = 90, --I added a high spawn just to verify if it's working or not
        gender="male",
        },
    }
    
MAZombiesZoneDefinition.Default = ZombiesZoneDefinition.Default or {};

table.insert(ZombiesZoneDefinition.Default,{name = "Militartenis", chance= 80});

Do you see anything wrong with this? Is there something that I am missing? I have been strugling with these for a couple days and I can't figure out what's wrong. PLEASE HALPPPP ๐Ÿ˜ฆ

bright fog
#

Put the code parts in code boxes at the very least please with triple ` start and end

cold whale
#

oh, sorry ๐Ÿ˜ฆ

bright fog
#

Thx, will help a bit in the reading of all this

cold whale
#

Thanks a lot! Please take into account that many zombies spawn without clothes (underwear), so it's definetly doing something

wheat kraken
#

today i make it possible to share mods recommendations in-game
(not only Discover)

cold whale
#

Hello pals, for those who read my problem, I already found the solution

drifting ore
#

zed crucifixion mod when?

drifting ore
#

YOOOOOO

grizzled fulcrum
#

Although I am glad I had to redo animation in IK model because I made a much better one ๐Ÿ˜„

hot void
#

hi

#

i need a lil help

#
if otherPlayer and otherPlayer ~= playerObj and not otherPlayer:isAsleep() then
    print("Print Other Player: " .. otherPlayer:getDisplayName()) -- Check that we've right-clicked a player and shows their display name.
    -- Create an option in the right-click context menu.
    local option = context:addOption(getText("Make Up"), worldobjects, ElliesTattooParlorContextMenu.AddMakeUp, playerObj, otherPlayer)
    if math.abs(playerObj:getX() - otherPlayer:getX()) > 2 or math.abs(playerObj:getY() - otherPlayer:getY()) > 2 then
        local tooltip = ISWorldObjectContextMenu.addToolTip();
        option.notAvailable = true;
        tooltip.description = getText("ContextMenu_GetCloser", otherPlayer:getDisplayName());
        option.toolTip = tooltip;
    end
    Trigger(otherPlayer, playerObj)
end
#

this now triggers the ui when i click rmb and now when i click the makeup option in the context menu

#

i also wanted to make it have a sub menu so i can allow all makup options to be in it

small topaz
#

Is there a way to check whether the game is played with a controller instead of mouse and keyboard?

mellow frigate
small topaz
#

A second question if someone happens to know: How do I find out whether the player presses one of the walk forward/right/left/backwards keys? I know I can use Events like OnKeyPressed and then work with the parameter "key" somehow. For example "key = 17" means player pressed "W" and thus move forward with default key binding. BUT the problem is: if a player changes the key binding, "W" and thus "key = 17" may not mean that the player pressed the move-forward key. So how do I figure this out properly taking into account that the player may have changed the key binding?

grizzled fulcrum
coarse sinew
small topaz
#

So JoypadState.players[playerNum+1] returns true if the game is played via controller and false otherwise?

Problem is that I don't have a controller by myself and thus cannot playtest

coarse sinew
#

When I added controller support to BM I installed an app on my phone, PC Remote (by Monect). Because I don't have a controller either.

mellow frigate
small topaz
mellow frigate
grizzled fulcrum
grizzled fulcrum
#

there are also a handful of java joypad functions that are in lua but im not sure how effective they are and what they do (isJoypadConnected(int index))

#

Take my words with a grain of salt though, I am not the best with controller stuff and I never use controller on PZ

thick karma
#

@mellow frigate Sorry just saw this

#

I use this @small topaz

#
    playerIndex = playerIndex or 0
    return JoypadState.players[playerIndex + 1]
end```
#

So if I need to get a specific player's data I can provide index, otherwise I can just go if ExampleModule.getJoypadData() then --> I know at least one gamepad user is connected

#

Also I can use playerIndex to get joypad data which for me often makes code look more intuitive... since joypad ids are offset 1 from player index.

small topaz
#

Do you know whether a command like
getCore():getKey("Forward")
also gives the numerical key value for a controller in case one is used?

sour island
#

TCG features are almost complete

scenic sinew
#

<@&671452400221159444>

#

hi

sour island
#

Why are you pinging the mods? @scenic sinew

mellow frigate
sour island
#

Trying to upload another gif on imgur and it's giving me issues lol

bright fog
#

Damn that's cool

grizzled fulcrum
#

Do vanilla files get overwriten if the name is the same of the vanilla file?
I am trying to get animations working and saw I need a player.xml file in media/AnimSets but I am not sure if my one will overwrite the vanilla one located at the same place.

bright fog
#

yes

grizzled fulcrum
#

I do not want to do that but if I do not specify my own name prefixes in the player.xml file, it wont recognise my action xml in media/AnimSets/player/actions so I am not sure how I will do it.

grizzled fulcrum
#

yes

#

because I want all my files to be distinguishable from vanilla files (except for ones I must name the same like ContextMenu_EN.txt for translation

bright fog
#

I'm sorry but what action are you talking about ?

#

I'm fairly certain there's no need for that to make custom player animations

#

And mods that add custom animations are all compatible so you probably don't have to touch that action thing ?

grizzled fulcrum
#

It is an animation I made, xml file is at media/AnimSets/player/actions/AQ_BrushTeeth01.xml

bright fog
#

Yes but that won't replace anything ?

grizzled fulcrum
#

The guide pinned doesn't say to anywhere and I couldn't find a single person that has any info on this but my only time the anim clip got recognised is if I had a player.xml file

#

I am assuming the player.xml file represents the folder beside it (being media/AnimSets/player)

#

And if I did not include this file, it would complain that the anim clip wasn't found

bright fog
#

Where is that player file located ?

grizzled fulcrum
#

I presume this to be because my anim clip has prefix AQ_ and not Bob_ or Kate_ like the base game has it, and so I have to specify my custom prefixes.

bright fog
#
<animSet>
    <animNodeFilter>
        <folderPrefixes>Bob</folderPrefixes>
        <folderPrefixes>Kate</folderPrefixes>
        <namePrefixes>Bob_</namePrefixes>
        <namePrefixes>Kate_</namePrefixes>
    </animNodeFilter>
</animSet>
grizzled fulcrum
bright fog
#

Why do you put a prefixe before ?

#

Don't put a prefixe and you won't have any issues

bright fog
#

There's really no need to do that and in fact is causing way more problems than anything else

#

And if you want to have them be distinguishable from vanilla, name it AQanimationName instead

grizzled fulcrum
#

How would it cause more problems than not? But I will have no prefix as I thought initially my animation might clash with another mod if they were to have the same name

bright fog
#

Did you check other mods how they add custom animations ?

bright fog
#

(go damn prefish)

grizzled fulcrum
#

No because I was sure that the animation guide would have covered everything I need to know about animations but it did not

bright fog
#

No it really doesn't

#

There's no correct guide out there that explains everything about animations and how they work

#

There really is no need to have prefixes and it causes you issues because now you are required to add your prefixe to player.xml

#

If you just don't use your prefixe you have no issues

grizzled fulcrum
#

fair enough

bright fog
#

Also the bob and kate prefixes are most likely to recognize male and female animations

#

(which usually are the same but there are one or two variations)

grizzled fulcrum
#

I presumed that as the game does refer internally to those

bright fog
#

So if you want your files to be unique, just name them another way

#

My zombie animations are just named clickerWalk and shit like that, that's unique enough tbf

grizzled fulcrum
#

I mean I could just do it without an _ but it doesnt matter anyway

#

Also I have to ask since there are like no resources on this, what is m_Conditions and where are they stored (I am assuming it's a table of conditions stored somewhere

#

I see a lot of actions' animation have a condition to be able to do the animation but I am not sure where these are stored

bright fog
#

You can access a condition on an IsoGameCharacter with getVariable()

#

There are variations of this function like

grizzled fulcrum
#

ty

bright fog
#

You can also use set instead of get to change the variable status

#

And you have nothing else to do to create a custom condition

#

You just add a custom variable name to the animSet

#

And set it elsewhere

grizzled fulcrum
#

are these variables persistent or no?

#

as in they get stored between sessions

bright fog
#

I don't think they are persistent no, if you mean like their status is saved after a reload

grizzled fulcrum
#

yes

bright fog
#

If you caught a zombie might animation and reload your game, then come back, it will not finish the animation so I guess no ? I haven't looked into that

#

But why would you care about persistence of animation variables ?

grizzled fulcrum
#

I was just curious if I needed to reset them when the user quits

bright fog
#

Nah no need for anything like that

#

The important part is making sure you trigger back the variable to false once your animation is done. I'm not familiar enough with this but you can setVariable via the animsets themselves

#

Depends if you want your animation to loop brushing your teeth until the player cancels it or just do the animation once and shit

#

But basically you could do a function that checks onTick that player is brushing its teeth via the getVariable and if you set your animation in a loop

#

And just do your happiness reduction like you currently do

grizzled fulcrum
#

Now I am getting something about a "did noto find node with condition"
So I added ```xml
<m_Conditions>
<m_Name>PerformingAction</m_Name>
<m_Type>STRING</m_Type>
<m_StringValue>BrushTeeth</m_StringValue>
</m_Conditions>

and it fixed the above but introduced a new warning (the same one I used to get) "Anim Clip not found: BrushTeeth"
slow graniteBOT
#
gammasnack has been warned

Reason: Bad word usage

#
adenor. has been warned

Reason: Bad word usage

grizzled fulcrum
#

Still have no idea after trying so much

#

Tried using Bob_ prefix like here, tried looking at other mods' xml files and using that as a base

austere sequoia
grizzled fulcrum
#

ill push and send u github link

austere sequoia
#

how do I download stuff on github?

grizzled fulcrum
#

You can click the green "Code" button in the middle-top-right-half (lol) of the screen and then "Download ZIP"

bright fog
#

You can also clone a repository

grizzled fulcrum
#

^ but I wouldn't require it for a one-time download imo

austere sequoia
#

anims_x

#

the folder is called anims_X, not anim_X

#

that is probably why the game says it cant find your animation, since it is in the wrong place

austere sequoia
austere sequoia
bright fog
#

Kind of told him about this

austere sequoia
#

I mean, brushing teeth (action takes quite some time), but animation stopping after the very first stroke (like 5% into the action time) surely is not on purpose ๐Ÿ˜›

bright fog
#

But if you tested it and the animation is just a single stroke well okay

austere sequoia
#

Dude could tell us, but I believe they had a stroke after realizing a typo in a folder name caused all those grey hair

grizzled fulcrum
#

also I do intend to loop it don't worry, that xml was placeholder to make sure I wasnt messing it up

grizzled fulcrum
# bright fog Kind of told him about this

To me, this comes off as "I told you so" mentality (might be just the way I interpret it). Yes, you did tell me about this prior but why do you figure you need to tell me in this manner? The XML data that I pushed was unequivocally placeholder data that I copied from vanilla game and modified so to make sure I wasn't being the dumb one. Yet here we are and I still end up being the dumb one for something so small as a folder name. Dergeissler took a swift look at the animation and even they could tell it was not intentional. That is all.

grizzled fulcrum
bright fog
#

Just told him I already told you about the loop stuff

austere sequoia
bright fog
#

Man if you knew the shitty mistakes I've made in the past and that I still make sometimes

grizzled fulcrum
bright fog
#

np man

#

Happens to me too

#

I understand the confusion tbf

#

I don't always use the right sentence for stuff, while I'm fairly fluent in english, it still isn't my main language and I tend to this kind of example happen where it means a specific thing

#

Reading it again I understood the confusion instantly

grizzled fulcrum
#

Regardless, it's still a pretty bad animation to begin with lol. Had to dust off Blender and come out of the code cave to muster up the courage to do anything related to Blender.

#

I figure it is better to see a bad animation rather then nothing at all though

austere sequoia
#

amazing to see that online disputes can end peacefully instead of as digital knivefights, lol. Good thing discord isnt reddit

bright fog
#

Yeah Reddit is a shitshow lol

grizzled fulcrum
bright fog
#

Right you're the guy I told about this

grizzled fulcrum
#

Yes I probably was the only person with this issue in a 100km radius considering there were 15 entries in this entire discord of the animclip log

#

The last people that asked about this were in the stone ages of like 15 BC.

bright fog
#

Yup, classic animation modding lol

#

There's barely any info about it

grizzled fulcrum
#

ok im just too much of a level 1 animation and not a level 100 animation boss to figure this out myself.
I wish to transition from animation A to animation B half way through a timed action.
I thought maybe I could just re-call setActionAnim half way through using the update function but I realised that I do not know how I would do that (I saw an onTick event mentioned earlier but I extremely hate using onTick for things like this (really) and I believe there has to be a better alternative

bright fog
#

Can you describe what your animations should do at what time exactly ?

grizzled fulcrum
#

So I have a timed action that lasts for 6 seconds and I want to use multiple animations during the action (aka use animation BrushTeeth for the first half of the action and then use animation BrushTeeth02 for the second half of the action)

mellow frigate
grizzled fulcrum
#

I will have a look when I get time, thanks!

swift onyx
#

Anyone know what could cause "Stack overflow (1283)
While performing: FBO.startDrawing zombie.core.textures.TextureFBO" crash?

thick karma
#

!console

slow graniteBOT
#

Help the people helping you by posting your console.txt from %UserProfile%\Zomboid.
For hosted servers, please also post the coop-console.txt from the same folder.

https://i.imgur.com/weyNseY.png

thick karma
swift onyx
#

It's a vehicle mod I have updated to include some door animations but the propblem is that it does not cause any issues with me. Seemingly only client who are connected to a dedicated server that has the mod.

#

Any time a client gets close to the vehicle or tries to spawn one in, they crash with 1283 code sometimes with the textureFBO and others from the drawVehicle java function.

#

But this doesnt effect everyone. Some server admins have said the mod works great while others have the problem

thick karma
#

All this info together would help someone narrow down the issue in theory

#

I unfortunately don't have time and energy to help further than suggesting you provide more detailed info and just leave it here to increase your odds of getting useful help.

#

I'm crashing soon

#

But best of luck; the bugs must die.

bronze yoke
#

the call stack would be very useful here, FBO.startDrawing is a low level part of the renderer, the issue probably originates from something incorrectly configured with the vehicle and something higher up in the call stack would probably indicate what that is

verbal yew
#

@bronze yokehi. what event i should use for this:

local function zReVAC2_SpawnRate()

    local specZombieSpawnChance = SandboxVars.zReV2.SpecZombieSpawnChance * 0.001;
    table.insert(ZombiesZoneDefinition.Default,{name = "zReVAC2_ZombieECO", chance= specZombieSpawnChance});
    
end
bronze yoke
#

OnInitGlobalModData

verbal yew
verbal yew
# bronze yoke OnInitGlobalModData
local function initZREVACATraits()
    local zReAntibodies = TraitFactory.addTrait("zReAntibodies", getText("UI_trait_zReAntibodies"), 10, getText("UI_trait_zReAntibodiesDesc"), true);
end

for this too? ^^'

bronze yoke
#

technically you don't need any event for traits, but OnGameBoot is commonly used

verbal yew
#

@bronze yoke

    local antibodyPowerRATE = {
    [1] = 0.8,
    [2] = 0.5,
    [3] = 0.2,
    };
    local antibodyPower = SandboxVars.zReV2.AntibodyPower;
    
    if LabRecipes_InfectionRate(player) > antibodyPowerRATE[antibodyPower] then

sandbox type like enum with 3 options.
it's right stuff in antibodyPowerRATE[antibodyPower]?

robust briar
#

Anyone here crack the egg of growing trees properly?

From what I can tell by reading through the java, trees are handled by some mechanism in ErosionMain. I am trying to figure out how to trigger the game to adjust my mod-placed trees to be in the right season (like adjust the leaves and stuffs, force them to grow up, etc).

Ideally, my end goal is:

Create a tool which allows staff on a server to select an area then "trigger" trees in that area, whether it be planting new ones, growing existing, etc.

#

Specifically, I found NatureTrees, which is an ErosionCategory that gets triggered during LoadGridsquare under some convoluted circumstances which appears to handle tree growth and season changes.. but I just can not figure out how to hook into it to force it.

mellow frigate
verbal yew
#

ZombRand(4, 12) - it's from 4 to 12 or from 3 to 11?

#

I keep forgetting...

bright fog
#

I don't remember either

#

You can just do print(ZombRand(0,1)) multiple times in the console and see what it gives you

bright fog
#

yeah as I thought

winter fern
#

hey all, i'm currently working on my first firearms mod and i've run into a problem.

I want to make my weapon compatible with existing attachments e.g. the x2 scope with a sniper rifle.
But as far as I understand it, you have to set the property for both the attachment (MountOn) and the weapon (ModelWeaponPart).

My approach would be to redefine the vanilla attachments in my mod to include my weapon.
but this seems very cumbersome to me and I wanted to ask if there is a better solution?

small topaz
# bronze yoke technically you don't need any event for traits, but OnGameBoot is commonly used

Are you 100% sure about that? Cause for professions, adding them only via OnGameBoot will not suffice. Reason is that if a character dies and the player chooses "Create New Character" in the in-game-after-death menu, the game calls the vanilla function "BaseGameCharacterDetails.DoProfessions()". This will delete all professions and completely reset them. Deletion also applies to modded professions, but not the reset (reset only applies to professions added in "DoProfessions()"). So, in case you add new professions only via OnGameBoot, the result is that new professions won't be available anymore if players choose the "Create New Character" option after death. To fix the issue, the creation of new professions should also be appended to the vanilla function "BaseGameCharacterDetails.DoProfessions()".

I am not sure if this also applies to traits but since the vanilla game treats them very similar to the professions via a function called "BaseGameCharacterDetails.DoTraits()", I am wondering...

grizzled fable
#

hi, how much i can lower condition for gasmask for example, what is the value, it is a integer or double? it is 10? or what?

steady lagoon
#

hey folks, does any one know where trait properties are defined? For example, I can't find the properties of SpeedDemon or Desensitized.

#

In main creation methods, I can see the traits created:
eg:
TraitFactory.addTrait("SpeedDemon", getText("UI_trait_SpeedDemon"), 1, getText("UI_trait_SpeedDemonDesc"), false);
But I can't see where the specific properties are set. Does anybody know?

bronze yoke
#

traits work backwards from how you're thinking, they don't really have properties associated with them, they just get checked for in relevant code

#

e.g. speed demon would be checked for in the part of the java that handles driving

steady lagoon
#

I see, so that's hard coded

bright fog
#

Some are hardcoded I guess yeah

#

Tho you could java mod anyway

grizzled fulcrum
#

In an animsets animation xml, what is the m_TimePc property? I have no clue what it is and I can only presume it triggers the event using that time but it is very confusing.

...
<m_Events>
    <m_EventName>EventName</m_EventName>
    <m_TimePc>0.50</m_TimePc>
    <m_ParameterValue></m_ParameterValue>
</m_Events>
...
#

It seems the event isn't triggered at all if the m_TimePc value is >= 1.00

hardy ingot
#

Anyone know if its supported to use the charge in Car batteries as a crafting component like water in a bottle?

rich reef
#

Hello all. I have a question that I'm hoping someone can enlighten me on.

I want to create a standard recipe, that is not evolved, but allows two basic ingredients, but also have the option of using a different modded ingredient without requiring the dependency for that mod to be required/installed. Basically allowing the recipe to work IF the mod is installed, otherwise it works with standard base game ingredients.

Lets say a Cheese Sandwich for instance, that only requires Base.Cheese, and Base.BreadSlices. But lets say a separate mod also has "Sourdough Bread Slices", or "Rye Bread Slices".

Is there a way to include these in recipe scripts/lua code to allow them to be optional, but not depend on those mods to be installed/ran on the server?

Trying to find an open ended way to make recipes for items with potential for other mods to work alongside without requiring them outright.

Please let me know if anyone has an idea, appreciate the help!

austere sequoia
mellow frigate
bronze yoke
#

i'm pretty sure you can just add the item to the recipe and it'll ignore it if the item isn't found (because the mod isn't loaded)

rich reef
#

I could add an ingredient such as "Base.BreadSlices/CustomMod.SourdoughSlices", as an option. But I am unsure if it will require the linked mod to be loaded if I do that, or if it will throw an error. If that makes sense?

rich reef
mellow frigate
rich reef
#

Well I want to include it as my own Module, not as part of Base game. Just meant that the recipe may use mostly Vanilla Ingredients, but would like to add options for modded ingredients as well, without it throwing errors, or requiring that mod to be loaded.

mellow frigate
#

so other modders can add the tag to their own items

rich reef
#

Any reference for using tags? I have not gotten so far into modding PZ yet, though I'm pretty well versed in programming in general.

#

Also, can anyone confirm what Albion said is true? That adding a modded ingredient to a recipe will just be ignored if the mod isn't loaded?

mellow frigate
rich reef
#

I'm assuming they are just Referenced as "Tag=" in the script files?

mellow frigate
rich reef
#

Alright, great. Thank you

mellow frigate
bronze yoke
#

i'm not actually certain about this one, but i do seem to remember it being that way

#

it should only take a few seconds to test, just add a completely fake item id to a recipe and see what happens

rich reef
#

Thats true. I guess I was curious where to look if an exception is thrown on that, or if it's just not shown/ignored in a recipe.

#

Thank you all for your help!

ocean marlin
#

I might add it to our server, tbh.

vast orchid
#

I'm in need of some assistance when it comes to editing an evolvedrecipe via script; specifically it's MaxItems value.

evolvedrecipe Roasted Vegetables
{
    BaseItem:RoastingPan,
    MaxItems: 6,
    ResultItem:PanFriedVegetables2,
    Cookable:true,
    Name:Place Ingredients in Roasting Pan,
}
local sm = ScriptManager.instance

function OverwriteEvolvedRecipes()
sm:getItems("Base.Roasted Vegetables"):DoParam("MaxItems","9");
end

I've tried formatting various ways within DoParam(), but nothing works. I suspect that getItems doesn't work for evolvedrecipes in the first place, but then the question becomes how do I edit the maxItems value in a mod compatibility friendly way?

mellow frigate
vast orchid
#

I've tried getRecipes as well, does just as little, getEvolvedrecipes doesn't exist as far as I'm able to tell.

mellow frigate
mellow frigate
bronze yoke
#

they're still read-only in my mod i'm afraid

vast orchid
#

So a file overwrite is the only option then?

raven zinc
#

Progress on an old PC UI mod

small topaz
#

When players sneak and are close to a wall, they automatically take cover behind the wall and use a different sneaking animation. Does anyone knows how to check whether a player is using this "close-to-a-wall-sneaking-animation"?

I know about the "player:isSneaking()" command to check whether player is sneaking but it does to tell whether they are close to a wall. Moreover, there is a command "player:checkIsNearWall()" but I am not sure what it does since it returns a float (not boolean). Seems somehow related to the problem but I am not able to figure out how exactly.

civic heron
#

Is there a way to get the angle of the playerโ€™s current FOV?

mellow frigate
mellow frigate
civic heron
mellow frigate
#

there are other options. I do not use them but others do around here.

civic heron
bright fog
#

One is updated, the other no

#

There isn't many differences tho

#

And to know what a method does exactly yeah you need to decompile, believe me you'll understand so much by doing that

#

You can guess what a method does by using it and seeing the result

civic heron
echo lark
#

i have a question someone here might be able to answer, i dont know anything about lua, ive read all the guides on here and checked the website and couldnt get my idea to work. so i figured ill ask here if its even possible.
i was trying to write code, that changes an items weight based off of its remaining use delta. kind of like how buckets of water change weight when they are half full, but to work for something like a pack of cigarettes that changes weight the more items you remove

#

does anyone know if thats even possible? or how hard it would be to pull off?

indigo pasture
#

or every tick but this one can be laggy

echo lark
#

so like you remove an item from the item with a usedelta, then it checks its weight and changes it

#

i tried for days, trying to learn lua/do it but i couldnt get it it work

small topaz
indigo pasture
small topaz
indigo pasture
#

damn how do i send code

#

lol

small topaz
#

Do you want to change the weight only after a recipe has been applied? Or are their other actions in game where you would like to change?

#

@indigo pasture you have to use the " ` " symbol three time at the beginning and at the end of the code

indigo pasture
#
function Recipe.OnCreate.Oncreate(items, result, player, selectedItem)
    local originalUseDelta = 0
    for i = 1, items:size() do
        local item = items:get(i-1)
        if item:getType() == "YourItem" then
            originalUseDelta = 0
        end
    end
    local newItem = player:getInventory():AddItem("YourItem")
    newItem:setWeight(originalUseDelta)
end```
echo lark
#

uuh, basicaly the idea is to have items called liked "Boxed Engine Parts" for exmaple. where you can bundle up like 100 engine parts, then use a recipe to remove 1/5/10 at a time. then have code that updates the boxed items weight

civic heron
#

And you can type lua after the first three ` to get syntax highlighting :)

small topaz
#

in case weight should only change after a recipe has been applied, than what Pallontras suggested is the way to go

indigo pasture
small topaz
indigo pasture
#

yeah didn't see the 0 there

#

fixed it

echo lark
indigo pasture
#

also need a new item for the result item if you remove it

echo lark
#

i hope this works

small topaz
indigo pasture
#

forgot to explain

echo lark
#

uuh well no. its gonna be box that has 100 uses, then i was going to make a few recipes to remove certain ammounts from the box.

#

so i would need to remove the item first then add the new one right?

indigo pasture
#

yeah

echo lark
# indigo pasture yeah

lol, so, first off. thank you very much for your help i appreciate it, but ive figured it out and it turns out its a vanilla feature, you just need to add the weightempty property to your item, figured it out cuz of a propane torch XD

small topaz
#

Does anyone knows how I get the actual framerate the player is playing with in the moment I check? There is the "getPerformance():getFramerate()" command but it seems to give me only the Framerate cap the player has set in the display options

harsh hawk
#

anyone got some kind of template for making signs? I wanted to make a sign so I could have a custom shop sign on a server I play on but idk how to go about it lol

#

i have the art itself just not like, isometric'ified or anything

#

i tried looking at dirkie's tutorial but he doesnt have a template linked for any uh, signs anywhere

late girder
#

Hey folks, does anyone know if a mod exists that muffles sounds from the outside of a vehicle, like the trigger when you enter a building? Does anyone know the particular event name/function for this that I could use?

tiny wolf
#

Hello guys
I want to create a mod to change a simple thing :
Vanilla -> When a player is hit by a gun, he receive a bullet wound
My mod -> When a player is hit by a gun, he receive a deep wound
Do someone know where is the PZ code about damages received/gave into the game ?
Can't find where this is managed ๐Ÿ˜ฎ

slow graniteBOT
#
bits_n_grits has been warned

Reason: Bad word usage

mellow frigate
slow graniteBOT
#
darksouls5 has been warned

Reason: Bad word usage

tiny wolf
#

I was looking into PZ lua code, on lua events list... i can't find something linked to the moment where player get the injury

mellow frigate
velvet forge
#

Good morning, could anyone help me with some information?

I'm trying to fix a bug in my zombie kill counter, but I don't know where this information is saved. I already looked in the players.bd file but without success. If anyone knows where it is, could you send me a private message. Thanks

small topaz
velvet forge
#

Exactly, I have a problem with a death counter mod..

#

I wasn't the one who developed the mod, I'm a developer and I'm trying to adjust this counter for the server where I play... but I've already looked in the .db files for this information and I can't find it...

#

But even though a mod is not used, where is this information saved in vanilla?

coarse sinew
#

In each player's blob in players.db. But you have to decode it.

velvet forge
#

What do I need to decode this file? Today I am using SqlLite to open the players.db file that is on the server. Would I have to get the player.db that is on the player's machine?

#

In the players.db file on the server, not in the kill information

small topaz
# velvet forge But even though a mod is not used, where is this information saved in vanilla?

In the vanilla game, the character screen including the vanilla death counter are controlled by the lua client/XpSystem/ISUI/ISCharacterScreen.lua . Also, there seems to be a java command which can be used in lua to get the player's kill count: player:getZombieKills() . I didn't test this command but the vanilla code uses it on the appropriate places, so I guess it works in this way.

velvet forge
#

cool, I'll check this file and command... thank you very much for your attention and help...

small topaz
velvet forge
#

interesting, I'll check the files saved on a player's machine... thank you very much my friend.

errant drum
#

Hi, my Titled is having a stroke dealing with 2x textures. I might've messed up somewhere but I can't remember. Can someone help?

slow graniteBOT
#
lee_seung_jun_787 has been warned

Reason: Bad word usage

slow graniteBOT
#
kweeyt has been warned

Reason: Bad word usage

brittle slate
#

Is anybody working on a tinnitus mod and hearing protection? I think it would be cool for gunshots to cause temporary hearing loss without protection

lusty karma
#

Anyone know what container correspond to "PlankStashGuns" ?

bright fog
#

Literally a plank in the floor

#

It's an hidden type of stash in the floor

lusty karma
#

ah yeah they spawn with events iirc?

bright fog
#

Perhaps

mellow frigate
strong hinge
#

Hi @pulsar heath Excuse me, can I ask you a question about Twitch integration?

pulsar heath
#

Hi there, sure

strong hinge
# pulsar heath Hi there, sure

I have installed your mod, and it works wonderfully, I congratulate you

everything works very well, what doesn't work are the traits and the car parts
My game is in Spanish, could there be a problem?

pulsar heath
#

I think it might be... I'm portuguese and the game doesn't like the punctuation used in languages like Spanish or Portuguese

#

I'll have a look when r get back from work and see if I can fix the issue.. Only been testing in english

#

Anything else feel free to dm me, I'll have some info for you tomorrow

strong hinge
lusty karma
nova socket
#

I wonder if there will be any sort of changelog to codebase before B42 drops.
Would be a nice thing to have to stash fixes beforehand.

bronze yoke
#

it'll release on unstable long before stable, that's your time to update stuff

outer crypt
bronze yoke
#

isn't that effect just accomplished by making it quieter? that's what i've seen in regular true music anyway

#

for a true muffle you'd want to pass it through a low pass filter, but i'm doubtful we have any power to do that from lua

echo lark
#

anyone know the lowest rate that something can spawn in a procedural distro? like is it 0.01 the lowest or can you go 3 digits past the decimal, so like 0.001

bright fog
#

Good question

#

Also you most likely don't need to go that low

echo lark
muted garnet
#

Is there any way to find out the distance from a zombie to a car window? I need a loop that will check the distance of each window to the zombie, but it only turns out that with one window the code reads the distance either from all windows in the car or from the entire car as a whole

boreal vigil
#

hey guys. I'm creating a mod where the client sends a zombie object to the server, and the server removes it from the map.

sendClientCommand("myMod", "removeZombie", zombieISO)

stressed ERROR: sendClientCommand: can't save key,value=1.0,zombie.characters.IsoZombie@17bf7d6

Can anyone do it?

bronze yoke
#

you can't transmit objects

#

an object is really just a memory address, it won't be the same between client and server

#

in this case i don't think you need to use a client command at all, zombies are usually handled by clients so you should just be able to remove it from there

#

but generally, you need to transmit something that can be used to identify the object on the other end, like some kind of id

boreal vigil
#

Thanks for the answer. So when a client removes the zombie, it will have an effect on other players.

bronze yoke
#

do your own testing but it seems likely to me

small topaz
#

Is there an event firing more often than OnTick? Tried OnRenderTick and OnPlayerUpdate but they seem to be the same for me.

bronze yoke
#

no, there isn't really a way to fire more often, that is the tickrate of the game

#

the best you could do is just run your code multiple times ๐Ÿ˜…

#

OnZombieUpdate will usually fire a bunch of times per tick

#

what do you need to call something so rapidly for?

small topaz
# bronze yoke what do you need to call something so rapidly for?

I am trying to time the equipment of a clothing item exactly with a certain movement of the player. An my current impression is that it might be be not possible cause OnTick doesn't fire often enough. XD But the whole thing happens in the range of milliseconds. So a super small delay shouldn't be a huge think... But I am still playing around with things trying to make it perfect, Maybe I have some kind of OCD don't know XD

bronze yoke
#

so something like 'equip this item the very moment the player crosses this tile'?

#

the game simulates in discrete ticks, so checking more often than once a tick won't actually give you more fine of a view into anything

#

nothing happens 'smoothly', just at a good enough tickrate that nobody can tell

small topaz
#

yeah. executing the code more often won't do the trick in my case

ornate cloak
#

I'm trying to make a minor change to a .class file but I'm really struggling, I come from powershell scripting so was expecting to just edit the line and put the file back in place but java doesn't work like that, is there a method I should be doing for this?

grizzled fulcrum
#

Anyone know what the m_TimePc event keyword in a animation xml file? It seems to trigger the event at a certain time but the metric I do not understand. I presume 0.10 may be a tenth of the animation's length?

bright fog
bright fog
ornate cloak
# bright fog Ngl java modding is a bit sus

Attempting to input a couple anticheat methods, this one being simply to add the steamid to the user at the point of user creation so the user we create is pre-bound to a steamid

#

We can do a python workaround to sideload it directly into the DB after the add but would rather the code takes both inputs and then that new file can be shared to server admins if they want it

bright fog
ornate cloak
#

Not directly in the server console, the steamid add command doesn't work, the normal add command doesn't accept extra variables

bright fog
#

Add command ?

ornate cloak
#

yeah theres an add command for steamid in the commands list

#

its just not exposed to the console it seems

bright fog
#

Wait so what's your plan exactly ?

#

You just want to add the steamID of a player and link it to the character he's playing ?

ornate cloak
#

No, we have a whitelisting process but it's very possible that applicants can just supply a steamid that isn't their own

#

So on whitelist add we want to bind it to a steamid before they even try to log in

bright fog
#

I see

#

Can you access the steamID via a function from the lua ?

ornate cloak
#

Haven't been able to check yet, was going off first bat at viewing the java and my standard scripting logic does not apply to java

#

I haven't touched lua

#

Also didn't fancy writing out the whole process again in lua when I could append two lines in two files and achieve the same result

bright fog
#

Bcs if your goal is just to kick players that are not in the whitelist steamIDs and you can access the steamID of a player via a lua function, you can handle everything from lua

ornate cloak
#

goal is, people apply for whitelist, we do /adduser username password steamid and bind it all together at creation

bright fog
ornate cloak
#

Yeah I'm noticing that it requires recompiling the whole thing

bright fog
ornate cloak
#

I can find it I'm sure

#

If lua is the answer I will dig there instead of java

bright fog
bright fog
#

Yeah was my idea

#

That he creates a lua command to add a steamID

ornate cloak
bright fog
ornate cloak
#

And thanks for the responses both

desert kelp
#

Hi I have a question - does the moddata persist for all zombies? I am trying this and it seems to persist across zombie

local modData = zombie:getModData()

modData.isSprinter = true
modData.hasSpottedPlayer = true

coarse sinew
grizzled fulcrum
#

I am trying to put the item in my character's hand while performing an animation but self:setOverrideHandModels(nil, self.toothbrush:getStaticModel()) doesn't seem to work. I've tried switching around the parameters so that the model comes first but no luck.

#

Nevermind it's because getStaticModel is returning nil but the item itself is a ComboItem so it's not nil
Using the string "Base.Toothbrush" worked fine weirdly enough.

bright fog
bright fog
nova socket
#

It doesn't know the speed, what it does, its animation state in some cases not even current square of the thing.

grizzled fable
#

hi guys, does anyone know why if I set the maximum condition of an item to 100000 it loses all the condition after restarting the server?

mellow frigate
grizzled fable
muted garnet
# bright fog What are you trying to do exactly ?

I am doing a fix that fixes zombies during the night, in sp, vanilla game zombies don`t attack player through an open window and I wanna fix it, but it turns out that the calculation system does not work correctly and calculates the distance from ALL windows or from the entire car if at least one is open, that is, if you stand against the wall and open the window that will be near the wall (let's say the back right one), then if a zombie will approach the left front window, which is closed, the code will assume that the zombie has approached the open window

mellow frigate
mellow frigate
grizzled fable
#

that's what i did

mellow frigate
mellow frigate
# grizzled fable that's what i did

restart a new game then or just create new instances of items. items compute their condition depending on max condition at item creation time.

grizzled fable
#

i did try to wipe the game

mellow frigate
#

what item are you using for your test ?

grizzled fable
#

Hat_GasMask or Hat_NBCmask

#

i overrided this items and added a MaxCondition value of 100000

mellow frigate
#

ok, then restart the game and create a new instance of Hat_GasMask.

grizzled fable
#

yeah but if players use this item and than i restart the server they lose all the condition from the item you know?

#

how can i solve this problem?

mellow frigate
grizzled fable
#

but i did wipe the game but every time i reboot the server the condition is gone, idk if i managed to been clear

gilded hawk
#

Is there a way to reload all LUA without having to go back to the main manu, and back in the game?

#

Cause i'm modding the inventory UI and this is painfull and distracting going back and forth every time >.<

thick karma
#

And your mod files...

#

Fwiw

#

I don't have the code but the chunk is available in Wookiee Gamepad Support

#

In the inventory and loot file

gilded hawk
#

Using the F11 menu reload the files for the vanilla INV UI and then my UI?

thick karma
#

Used for resizing it properly in game on gamepad

thick karma
mellow frigate
gilded hawk
#

Well, thank you, I need to investigate that.

On an unrelated note, did anyone try to use the Teal language to mod zomboid? I'm feeling very very tempted to use teal to write my mods instead of raw lua

thick karma
coarse sinew
thick karma
#

( @gilded hawk )

thick karma
gilded hawk
thick karma
#

Yeah like in that case you would need to copypaste your render to console, but first you would need to make the backup function global for testing, or better yet put it in a returned local module and import it to the console for global use during testing

#

If you just paste the override into console it won't be able to see old_ISInventoryPage_render

gilded hawk
#

Yeah that makes a lot of sense

#

Also, talking about something else, does anyone know a way to store the reference of a container to easily check it's content even when a player is far away?

#

Like, I have this shelf, and I want to make it so that I can remotely send items to it.

I found a way to move items remotely, but I haven't found a good way of easily store the reference to the ItemContainer

mellow frigate
gilded hawk
#

I'm not surprised to hear that someones as skilled as you already found a way to use GlobalObject in a simpler way

#

I'm still smashing my head against the wall with it

mellow frigate
#

I'm blushing

buoyant lotus
#

hello guys why mods dont work in server?

frank elbow
frank elbow
# gilded hawk Teal -> https://github.com/teal-language/tl

Looks neat, but I wouldn't use it for modding for the same reasons I don't use Moonscriptโ€”would involve a more complex workflow for testing (a build script is easy to set up, but still requires an extra step even if set up to build on save)

#

I prefer annotation comments for typing

gilded hawk
frank elbow
#

Oh, I meant for testing the mod in-game. I did use busted to write some tests for my library & theoretically you could do the same for mods but I haven't ever tried to

#

If done for mod files it'd probably be best to have them outside the actual mod directory so the mods aren't bloated with tests that'd have to be written to not run ingame anyhow

boreal vigil
#

Hey guys. I need server.lua to get the list of all zombies on the map. Can anyone do it?

This works in client.lua to get zombies from the player's current cell:

getWorld():getCell():getZombieList()

However in server.lua I need something like this:

getWorld():Cell[0]:getZombieList()

I've been searching for days but I can't find a solution.

sour island
boreal vigil
rough aurora
#

Hi guys! Anyone can tell me if I can transform an item in another one when is become rotten? Like making milk convert to yoghurt when it is rotten ๐Ÿ™‚

coarse sinew
# rough aurora Hi guys! Anyone can tell me if I can transform an item in another one when is be...

Check the ReplaceOnRotten script tag. For example Icecream

    item Icecream
    {
        DisplayName = Ice Cream,
        DisplayCategory = Food,
        Type = Food,
        Weight = 0.2,
        Icon = Icecream,
        Packaged = TRUE,
        ReplaceOnRotten = IcecreamMelted, --- it's replaced with melted ice cream
        DaysFresh = 1,
        DaysTotallyRotten = 1,
        HungerChange = -30,
        UnhappyChange = -10,
        Calories = 1680,
        Carbohydrates = 180,
        Lipids = 84,
        Proteins = 26,
        WorldStaticModel = IceCream,
        Tags = GoodFrozen,
    }
rough aurora
#

i will see! thanks ๐Ÿ™‚

sour island
boreal vigil
rough aurora
coarse sinew
#

Try without Base.

coarse sinew
#

in lua/client

local function onZombieUpdate(zombie)
  local onlineID = zombie:getOnlineID();
  sendClientCommand("ZoneProtection", "RemoveZombie", { onlineID = onlineID });
  zombie:removeFromWorld();
  zombie:removeFromSquare();
end
Events.OnZombieUpdate.Add(onZombieUpdate);

in lua/server

if not isServer() then return; end

local ZoneProtection = {};

function ZoneProtection.RemoveZombie(player, args)    
    local function deleteZombie(id)
        local zombies = getCell():getZombieList();
        for i = 0, zombies:size() - 1 do
            local zombie = zombies:get(i);
            if instanceof(zombie, "IsoZombie") and zombie:getOnlineID() == id then
                zombie:removeFromWorld();
                zombie:removeFromSquare();
                return;
            end
        end
    end
    --print("[ZoneProtection] RemoveZombie request from: "..player:getUsername())
    pcall(deleteZombie, args.onlineID);
end


local function onClientCommand(module, command, player, args)
    if module == "ZoneProtection" and ZoneProtection[command] then
        ZoneProtection[command](player, args)
    end
end
Events.OnClientCommand.Add(onClientCommand);
sour island
bright fog
#

Yeah you just need to make sure it gets updated for each clients

sour island
#

But I'm pretty sure removing the zombie on the client side will remove it for the server using remove from world etc

coarse sinew
#

protected call

bright fog
#

what does it do ?

#

Looks weird to define a function within another (I mean I do it too but in this case making it local in another function)

mystic vessel
#

A quick question, how do I make it so that when the character puts on a specific hat, his hair disappears?

mystic vessel
#

So that this stops happening

mystic vessel
bright fog
coarse sinew
mystic vessel
#

i put here?

boreal vigil
sour island
#

Did you use remove from world/square'?

#

zombie:removeFromWorld(); zombie:removeFromSquare();

boreal vigil
#

removeFromWorld()/client

bright fog
boreal vigil
mystic vessel
sour island
#

Looking at the debug stuff a command does seem to be needed - weird as you can kill and move bodies around without one

coarse sinew
#

What a error fixifier was supposed to be lol

bright fog
bright fog
coarse sinew
#

Some yes, depending on severity

rough aurora
bronze yoke
#

pcall doesn't work though

#

zomboid's custom error handler ignores it

bright fog
#

good to know

nova socket
#

It doesn't halt execution if there is an exception kek

compact mason
#

ะ’ัะตั… ะฟั€ะธะฒะตั‚ัั‚ะฒัƒัŽ ๐Ÿค
ะ•ัั‚ัŒ ะ ัƒััะบะพัะทั‹ั‡ะฝั‹ะต ั€ะฐะทั€ะฐะฑะพั‚ั‡ะธะบะธ ?

Greetings to all ๐Ÿค
Are there any Russian-speaking developers?

robust briar
boreal vigil
#

Is your mod public?

robust briar
mystic vessel
echo lark
#

does anyone know if you can use lua to override vanilla distributions of items? specifically the min/max

urban plaza
#

is there a particular reason to use Intellisense IDEA IntelliJ over Krakatau, Procyon, Vineflower, JD-GUI (github.com/java-decompiler), or others?

lethal dirge
#

Is it possible to make a recipe with a chance of failure or multiple items, such as 1-5?

urban plaza
bronze yoke
#

use what you want

#

the main reason guides point to it is just because a lot of people in the community already use intellij anyway

urban plaza
#

is it standard in academic circles or something? At the risk of derailing the channel

bronze yoke
#

to my knowledge intellij is the most popular java ide generally

urban plaza
#

oo I'll have to look into stuff. when I took DS&A in java aeons ago lots of people had to do extra tutoring/etc to try and get eclipse to work right

urban plaza
bronze yoke
#

oh, you can implement any custom recipe functionality in lua with the OnCreate recipe property

grizzled fulcrum
#

but that's my opinion of course

grizzled fulcrum
#

Also what does ISInventoryPaneContextMenu.transferIfNeeded do? What is the "needed" part of it mean? I thought using this function would transfer the item from a backpack (before I recursed the inventory for the item) to the main inventory if it wasn't already in the main inventory but it does not do that. Is ISInventoryPaneContextMenu.transferItems what im looking for?

wide oar
#

Can someone help me? i'm having several issues. my first issue is that his head is translucent, and my second is that clothes are not hiding his body parts.

indigo pasture
wide oar
#

how in the hell did that happen

indigo pasture
#

idk happen with me all the time

wide oar
#

so odd.

#

how do i fix it

indigo pasture
#

turn on face orientation

#

if its red you have to flip it

wide oar
#

ah

indigo pasture
#

select your faces and do this

wide oar
#

thank u gamer

indigo pasture
#

np

wide oar
#

that fixed it 100%

#

but how do i fix clothing clipping

#

i thought clothes hid your body parts ๐Ÿ˜ฆ

#

like

#

some clothes dont hide my body pa rts

#

then theres cases like tihs

#

i dont wear these pants but idk why this is even happening

#

most pants in general seem to hide his foot and arm??? but only one of them???

slow graniteBOT
#
vveysel has been warned

Reason: Bad word usage

slow graniteBOT
#
hamburgerw has been warned

Reason: Bad word usage

slow graniteBOT
#
teo1603 has been warned

Reason: Bad word usage

rough aurora
#

hi guys!
I am still trying to use the ReplaceOnRotten param to make an item to be replaced on rotten, but whenever the item is rotten it dissapear :S
First question, type Drainable cannot be rotten?
Anyone knows why the item is rotten and then it dissapear instead of been replaced? Could it be that chaging from a type to another is not allowed? (FOOD to DRAINABLE)

errant pier
#

Hello wonderful people. I was working on a little tool to parse and display the distributions. While making this I found some errors in the base game code. @tribal remnant Convinced me to turn this into something useful. I am not great at UI stuff, and noob to WPF, but I'm have a separate project for the logic, so if someone with some (Cross Platform? Not sure if AvaloniaUI for example is still a thing?) UI experience comes along, it won't be hard to switch the frontend. Enjoy the random screenshot of me failing to DataBind xD. Probably need to set templates for the rows or something. I'm also very new to PZ, so any suggestions on problem areas for modders that I could automate would be very welcome ๐Ÿ™‚

#

๐Ÿ˜Ž

wide oar
#

Can anyone help me

thick karma
#

If so, I don't know the answer, but you might have better luck in #modeling

#

I would dupe your questions over there

errant pier
sour island
#

this is MTG

#

Also had to google tabletopsim and felt dumb to realize it's table top sim ๐Ÿ˜…

echo lark
#

anyone know of an easy way to change the min/max of a procedural distribution?

#

i wana make all ammo have a max cut off that isnt 99. to limit the ammount of ammo that can spawn.

#

and i wana do it for like all guns storse/military bases but have diferent cutt offs for each place. so like gunstores only have a max of 10 while military bases can have 20/30 or wtv

sour island
#

You can modify it as you would a lua table

#

Using the OnGameBoot event, I modify the game's distro

#

This is what I do to add items, but nothing stops you from looking up the correct entry and modifying it.

                table.insert(ProceduralDistributions.list[distID].items, item..sealed)
                table.insert(ProceduralDistributions.list[distID].items, chance)
#

distributionTable.gunstore.locker.procList would get you to that table

#

but then the entries aren't keyed, so you'd need to forloop to check the name

wide oar
digital sail
#

Did you ever tried to add a custom trait to a player (not yourself) in multiplayer? I mean creating a trait with a mod and then right clicking a non-admin player to add the trait.
I'm starting to believe there is a bug in the base game.

#
  • I can add the trait to myself as an admin, I see it and it's still there after I relog.
  • If I add the trait to another player then I do see the trait in the admin window but the player can't see it. If the player relog, it's not there for any of us.
  • If the other player gets the trait from something (like a custom journal calling AddTrait() ), I don't see it as an admin, but he sees it. It's still there after a relog. If I add the trait from the admin panel then I see the trait in the admin panel but the trait disappears on the player side, even after relog.
slow graniteBOT
#
shiroyue has been warned

Reason: Bad word usage

thick karma
small topaz
# wide oar

looks to me that you are wearing clothing items which are configured to mask the right arm and foot (meaning they make them invisible). not 100% sure though

errant pier
wide bobcat
#

this is somewhat related, but does anybody know of a mod that despawns logs or what is so special about them that is doesn't allow them to do so?

sour island
#

You'd need to pick them up and drop them (rather than place) I imagine

wide bobcat
#

its weird since logs for some reason do not despawn even if they aren't placed

small topaz
#

Is there a way to see what TimedAction the player is currently doing?

bronze yoke
#

ISTimedActionQueue.getTimedActionQueue(playerObj).queue[1].Type

#

queue[1] will be nil if the player isn't doing an action

small topaz
#

many thanks!

mystic vessel
#

Please, how do I place an icon in my "submenu"?
ike in the mod building menu that has a hammer symbol

cerulean jasper
#

I wanna make a custom Background for my own personal use only (with my own art) but I have no idea where to begin

abstract cairn
#

how would one change the text for "click to begin" to something else? I'm stupid and I cant find it lmao

coarse sinew
lyric robin
#

making a chevalier primani

mystic vessel
#

Because I hadn't posted it anywhere, I tried to do it, but I couldn't, so I came here to ask for help.

coarse sinew
mystic vessel
#

When I tried to do this, there were some errors and I went backwards

mystic vessel
abstract cairn
#

dear indie stone please get rid of red pixel in e_riverbirchJUMBO_1_10.png thank you.

bright fog
abstract cairn
small topaz
#

Is their an easy or efficient way to execute code when the players completed all TimedActions which they had in the TimedAction queue?

Specifically, what I need is this:

  • if player is not doing a TimedAction, then execute some code (no problem here for me)
  • if player is doing TimedActions, then wait for all TimedActions to complete and execute the code then (that's my problem)

Only way to realize the 2nd part I could think of is to use something like the OnTick event and check every tick whether TimedActions are done. However, I am afraid that this might not be good performancewise in case the player has a lot of actions in the queue.

#

Ideally there is some kind of lua event which fires when the queue has emptied but I didn't found such an event yet...

bronze yoke
#

hook ISTimedActionQueue:onCompleted

#

if after that function is called self.queue[1] is nil the player has completed every action in their queue

#

you might need to hook ISTimedActionQueue:clearQueue and stopDoingActionThatCanBeCancelled (unqualified global function) to catch cancels too

languid cedar
#

Hello yall im looking to commission a mod for my single player world

small topaz
#

Many thanks again! Seems to be exactly what I need!

abstract cairn
#

If anyone knows how to get a retexture for the base trees to work let me know! I've tried packing the textures into a pack file but the trees look the same in game.

bright fog
#

Try replacing the base game file of the trees with your own and see if it changes them

#

If it doesn't, the issue most likely comes from you, if it does work but didn't work within a mod then that's probably due to the need for manual download (and you're fucked and have to make a guide on how to download your custom trees textures for people on your modpage)

abstract cairn
#

I'm pretty sure if I replace the base textures it will forcibly work when what im tryin to do is use the mod to change it like how other mods do

bright fog
#

I've never seen mods replace the tree's textures

#

so idk

#

also there isn't much info about .pack yeah

#

Perhaps you could ask in the mapping Discord

#

They probably know more

abstract cairn
bright fog
#

Nice

small topaz
jaunty kestrel
#

I am just getting started with trying modding for PZ.

I've made a new trait that starts you with a fanny pack full of maps, and I'd like to equip the map to the character. Having trouble finding info on this or other mods to reference for this particular step.

Any pointers?

Here's how the lua code is set up now...

local function onGameBoot()
    TraitFactory.addTrait("WellTraveled", getText("UI_trait_WellTraveled"), 3, getText("UI_traitdesc_WellTraveled"), false, false);
    TraitFactory.sortList();
end

local function onCharacterCreation(playerObj, square, profession)
    if playerObj:getHoursSurvived() == 0 then
        if playerObj:HasTrait("WellTraveled") then
            local fannyPack = playerObj:getInventory():AddItem("Base.Bag_FannyPackFront");
            local maps = {"Base.MarchRidgeMap", "Base.MuldraughMap", "Base.RiversideMap", "Base.RosewoodMap", "Base.WestpointMap", "Base.LouisvilleMap1"}; -- Add or remove maps as needed
            for _, map in ipairs(maps) do
                fannyPack:getItemContainer():AddItem(map);
            end

        -- equip the fanny pack to the front here?

        end
    end
end

Events.OnGameBoot.Add(onGameBoot);
Events.OnNewGame.Add(onCharacterCreation);
deft peak
#

is anyone here in charge of the modded mod manager series?

small topaz
# jaunty kestrel I am just getting started with trying modding for PZ. I've made a new trait tha...

To equip the fanny pack to the body, you can try
playerObj:setWornItem("FannyPackFront", fannyPack)
Morover, for adding your trait properly to the TraitFactory, you might append some code like

for i=1,traitList:size() do
        local trait = traitList:get(i-1)
        BaseGameCharacterDetails.SetTraitDescription(trait)
end```
to your ``onGameBoot()`` function . This is to ensure that your trait gets its correct description in the pregame-menu where you can select traits (or does your trait already has your description displayed??)
Another thing I would think about is to addtionally append your ``onGameBoot()`` function to the vanilla function ``BaseGameCharacterDetails.DoTraits()``. This is to ensure that your new trait is still shown in the trait selection menu in case a character dies and the player chooses the "Create New Character" option (i.e. playing with a new character in the same game world where you could find your old character dead/zombified). So using smth like
```local vanilla_DoTraits = BaseGameCharacterDetails.DoTraits
function BaseGameCharacterDetails.DoTraits(...)

    vanilla_DoTraits(...) -- execute vanilla function
    
    onGameBoot() -- execute your trait function
end```

Btw: for polishing your fanny pack stuff, you might also want to check whether the player already has another fanny pack in the inventory. Could happen if the player manually chooses a fanny pack during character creation. This shouldn't result in bugs but in this case, a character may start with 2 fanny packs. So in case you want to avoid such a situation...
jaunty kestrel
small topaz
# jaunty kestrel Thanks so much for the details and advice! The description is appearing properl...

Ok. Then you might not need the iteration through the traitList. I just thought about this cause you need this when creating a new profession, so I thought traits need it as well since the game treats them quite similarly.

For the thing about creating a new character, best idea is to simply check how your code works in this case. If your trait appears in the menu, then it is not necessary to append it to DoTraits . Just thought about this because again, this is necessary for creating new professions...

deft peak
# bright fog Wdym ?

the mods like, remake mod manager, mod load order fixes copy other players load order etc

jaunty kestrel
#

I am going to make the mod add some random maps instead of a set list, and I want to come up with something else for the trait as well.

Trying to add some 3 point traits to flesh out the list.

opal hound
#

Hello! I'm trying to add an "RequireInHandOrInventory = Base.Pen" parameter to the crosswords and wordsearch magazines so they will require it to use them, but I can't achieve that. Could someone help me with that, please?

#

also I just wanna know how to add any parameters to any items or recipes

bright fog
#

Also know that any load order mod you find doesn't actually do it right nor is there a point to it

#

Most cases, unless you use mods that keep replacing vanilla stuff you end up with mods rewriting the same thing, load order will matter but even then they might just be incompatible. Anyway in most cases you only need load order for maps

#

And that's it

tiny wolf
#

Hello guys !
Do someone know how to create a recipe which result into two items of different name please ?

vague raven
mellow frigate
#

@anyone Do you know how a mod can affect tile blending ? I'm having a hard time with double water blending recovering my grass tile see here: #mapping message

mellow frigate
#

has someone already added zones from lua ?

bright fog
mellow frigate
bright fog
#

uuuuh

#

idk what that is

cold path
final marlin
#

someone should do this

#

actually nevermind fuck you

#

jk ily

bright fog
#

wow

#

#Unexpected

rough aurora
bright fog
#

Just give your idea, or no one will ask you since we have no idea what your idea can be

#

No point in teasing nothing

grizzled fulcrum
#

hi, what is the difference between SandboxVars.MyModId and getSandboxOptions():getOptionByName()? I see them being used for similar reasons but why would they be interchangably used and not one or the other?

bronze yoke
#

there is no difference

#

the second one is much uglier and is probably only used by people who don't know about the other one or saw it somewhere and assumed it actually did something differently

deft peak
#

one of those addons should be a load order jumbler in order to load things properly, cuz yknow mods be all round the place especially with big load lists

#

something similar to rimpy's "sort" would be cool

bronze yoke
#

the original mod's creator has not been around for a long time, the addons are created by whoever wants to

quasi kernel
#

Today I will make tomatoes require tomatoes to grow. (Progress on the silly farming patch mod!)

#

Was mostly tampering with additional items required to sow a seed. Tomato just happened to be convenient.

bright fog
#

It matters also for dependencies but if the modder did its job correctly, it doesn't matter

#

Even if a mod adds a possible compatibility with another mod that's optional, the load order will not matter either if the modder wrote its code correctly (so like add a check for that other mod on save load and not on game boot, so that way if the optional mod wasn't loaded before it will still be detected)

#

Load order matters for maps tho here I have no idea how it should be handled and I doubt there are virtual rules on how to load maps between each others, or at least there's probably no info in the files itself

#

Maps that replace the same cells will be compatible, one or the other will be deactivated in the worst case and it could show the in-game map of the other one thus rendering in-game map useless (like spawn in the forest but on the map it says there's building there)

#

In the actual worst case, a map replaces only half the cells used by another map and you end up with half a map crossing another map, so let's say 2 city maps will just bend weirdly with others and will just be like those chunk bug of Minecraft

bright fog
#

Also back then when rimpy existed, it didn't actually properly order stuff

#

It was just fake load order and could even in fact cause more problems

deft peak
#

yeah but now its way better and the rimworld modding community pretty much recommends it all the time

bright fog
#

Unless you mean just an outside tool to manage mods, which we have mod manager sort of for that

bright fog
deft peak
#

and yknow the vanilla mod manager

bright fog
#

Hesitant to come back since it always took me days to order my modlists, perhaps I should look at it, also missing on so many new stuff

bright fog
#

It was basically mod manager but as an app outside the game

deft peak
#

oh u were refering to rimworld in that point

#

i thought you meant there was one for zomboid ๐Ÿ˜„

bright fog
bright fog
#

@compact mason

#

There's some info you can't retrieve on a zombie

compact mason
bright fog
#

Give me a sec

#

You can access:
-Speed
-Sight
-Hearing
-Cognition

You can't retrieve:
-Memory
-Strength
-Toughness
-Transmission

If I'm not mistaken

#

In my mod I access the stats of a zombie and if they are the right one I don't have to update them

#

But in the case of those 4 last ones I have to update them multiple times to make sure they are the right one and then I stop updating them

#

The way I do it is by accessing the classFields of a zombie

#

What this allows you to do is this

zombie --your IsoZombie
local zombieSpeed = zombie.speedType -- for some reason I don't use it I don't remember why)
local zombieSight = zombie.sight
-- etc
-- .hearing, .cognition

-- .strength exists I believe but I didn't use and I don't remember why
#

You might be able to use .strength and access the strength

#

I don't remember why I didn't use it tho

compact mason
bright fog
#

Oh yeah I remember now

#

.stength doesn't work

#

The reason is that the value of strength is modified by the toughness of a zombie

#

So you will not access the actual strength defined with sandbox options

#

You'll recieve a value of the strength that's defined based on toughness

#

toughness can't be accessed either

#

Your best bet is to make sure toughness stays the same for a zombie, or find out how the game defined the strength based on toughness (by looking in the java)

bright fog
#

You don't have to import anything in your lua files

#

Just make sure to require the mod if you end up using it

#

Also there might be methods to access the speed of a zombie a different way

hollow current
#

out of curiousity, why aren't classes fields accessible in the first place without mods? Is that intentional by the devs?

bronze yoke
#

i'm not really sure but it seems intentional

#

accessible fields is just a bunch of metatable hackery redirecting to the methods used by the debugging ui to show class fields, so the lack of it isn't an oversight at the least

#

the api that uses is really really unwieldy for literally any other application though, which is why i wrote accessible fields

#

i think those methods are just a wrapper over java's reflection library so it might just be that it wasn't something they needed until then, and that was the easiest way to do what they needed it for

#

the inability to write to fields is overtly intentional but i don't really know what the motivation for that is

#

i think they're just kind of afraid to expose any more reflection stuff than they have to, which is kind of fair

hollow current
#

Fair enough i guess. Accessible fields made my life so much easier on so many accounts so great job with that

fast walrus
#

Hi all
Iโ€™m trying to go about commissioning a mod, me and my group are having trouble finding any takers

Just a mod that adds PTT to radios while still being able to use voice activation for proximity chat maybe even some sound effects to the start and end of the message like a click, beep, static etc

And to be difficult some radio like effects to voices coming through radios
Thanks!

bright fog
reef cairn
#

when working with distribution files, what is the most number I can add for rarity? 0.001? or can make it even more rare?

bright fog
#

I set their HP very high and just keep track of the damage dealt to them and if it falls under 0 the zombie is killed

reef cairn
#

so looking at the rarirty in my distribution file

#

if it was 0.1 and i make it .001 im essentially making it 100 times for rare than before correct?

#

oh no that is 1000 times more rare

verbal yew
#

i drop that code after hour +-

#

not home at this time

verbal yew
#
zReJuggernautOutfits = {
    "zRe_Military_exo3",
}

local function zReZombieisJuggernaut(target)
    local zombieOutfit = target:getOutfitName()
    for _, v in pairs(zReJuggernautOutfits) do
        if v == zombieOutfit then return true end
    end
    return false
end

local function OnWeaponHitCharacter(attacker, target, handWeapon, damage)
    if not (target:isZombie() and zReZombieisJuggernaut(target)) then return end
    
    if not target:getModData().zReZFlag then
            target:setHealth(40)
            target:getModData().zReZAbsorb = 50
            target:getModData().zReZFlag = true
            target:transmitModData()
    end
    
    if target:getModData().zReZAbsorb > 0 then
        if handWeapon:isRanged() and target:isOnlyJawStab() then    -- if ranged, disable resist to instakill and damage stack
            target:setOnlyJawStab(false)
        end
        if not handWeapon:isRanged() and not target:isOnlyJawStab() then    -- if melee, enable resist to instakill and damage stack
            target:setOnlyJawStab(true)
        end
        
        local AbsorbDamage = 0
        if handWeapon:isRanged() then
            AbsorbDamage = 1        -- need improve for weapon category/type/caliber etc
        end
        if not handWeapon:isRanged() then    -- if melee, stagger on
            target:setStaggerBack(true)
            AbsorbDamage = 3        -- need improve for weapon category/type/one-twohands
        end
        target:setHealth(40)
        target:getModData().zReZAbsorb = target:getModData().zReZAbsorb - AbsorbDamage
        target:transmitModData()
        --target:DoZombieStats()
      else
        target:setHealth(2)
        target:setOnlyJawStab(false)
        --target:DoZombieStats()
    end
    attacker:Say( "zReZFakeHP: "..tostring(target:getModData().zReZAbsorb).."  Health: ~"..tostring(math.floor(target:getHealth()*100 - math.floor(damage * 100))) )
end
#

Events.OnWeaponHitCharacter.Add(OnWeaponHitCharacter)

slow graniteBOT
#
dizek11 has been warned

Reason: Bad word usage

sweet escarp
#

Hello, I'm trying to get what the player is looking at when holding down the right click the problem I encountered is that the code I made does not return a value between 0 and 360 so could someone help.

bright fog
#

Like yes the damage will ramp up, but not to such extremes

#

And surprisingly my damage was staying constant after a while

verbal yew
#

3-5 melee hit

bright fog
#

It's been a while I've worked on it now but I believe the reason might be that the damage increases based on missing health of the zombie or some shit like that ?

small topaz
verbal yew
bright fog
#

I'll have to check that out

#

But in my test of my function that allows higher HP amounts, the damage stopped increasing after a certain amount

#

I set my zombie health to like 5k

verbal yew
#

more then 300 hp (30.000 flat hp) not work in mp

#

zombies just like ghost something like this problem

bright fog
#

Really ?

#

That would explain many issues I got with Bloaters in the original mod then

#

Zombies having their outfit disappear and shit

#

by 300 hp you mean setHealth(3) or setHealth(300) ?

verbal yew
#

setHealth(300)

bright fog
#

hmm

#

I never went that high in the original mod

#

I don't remember to how much it's set wait

sweet escarp
brittle dock
#

I have an idea for a mod, but I was hoping to get some feedback on how plausible the idea would be to implement?

bright fog
#

There also:

player:getLookAngleRadians()
brittle dock
#

Something similar might already exist, or it might not quite work; let me know either way ๐Ÿ™‚

The idea stems from being disappointed that books & magazines disappear after reading, because if the world ended I would end up re-reading the same content time and time again, albeit with diminishing returns each time (as I do IRL).

The easiest implementation I've imagined would be after reading a book/magazine, remove it from the inventory and replace it with a "used book/magazine" item with reduced stats. The downside to this is that after you've read something, the leftover item will still only provide the reduced stats for any other players reading it for the first time.

The preferred implementation would be a system where books & magazines are randomly assigned an ID from an array on generation to determine the book/magazine title. After reading, the item would remain in the player's inventory, and a variable in the player file would record the amount of times that particular array ID has been read. The stats would be determined per-title, so a book that you've read 5 times would still be called "The Old Man and the Sea", and would still provide a full bonus to another player who hasn't read the book yet.

The second implementation might require some further work for balance, but I personally love the idea of gathering a library & knowing it won't suddenly disappear.

gilded hawk
#

How can I check if an IsoSquare is in a safehouse or not?

gilded hawk
brittle dock
#

Well shit, that's exactly it.

brittle dock
#

Oh man, it even refills to generate the same amount of boredom relief if you wait long enough between re-reads.

Part of me is bummed because I kinda miss coding, but it IS a beautiful feeling to have your dream mod simply handed to you.

gilded hawk
bright fog
#

ups

#

sry about that

#

here ya go

#

This mod makes it so magazines don't disappear and you can reread them

#

(sort of)

#

It's not perfect in my opinion tho

brittle dock
verbal yew
gilded hawk
brittle dock
bright fog
#

Doesn't reduces the stats the magazine gives but instead you get a new item that you can do different things with

brittle dock
#

That's crazy to get examples of BOTH implementations I had imagined. I think the biggest lesson I've learned today is how bad I am at searching for existing content.

bright fog
#

Know that a lot of stuff is possible in the game

sour island
#

Something about finding titles stimulates my brain idk why

#

Plus stuff like this can occur, which I know it's ground breaking gameplay, but made me laugh

gilded hawk
#

@sour island Do you remember me mentioning you the loot manager thingy I wanted to make?

sour island
#

Vaguely?

gilded hawk
#

Well, I'm almost done making it!

sour island
#

๐Ÿ˜ฎ

gilded hawk
#

I'm tidiy up the SP code, and then I'll work on the MP one ๐Ÿ˜„

sour island
#

Was this the loot randomizer thing? or

gilded hawk
#

The mod that allowed you to send your loot to a container in your base remotely

sour island
#

I don't think we spoke about that, or if we did it was long ago lol

gilded hawk
#

Yeah it was months ago

#

It was my mod to make it so that you throw all your look in a container, and it gets sent to the right container wirelessly, like minecraft's EC2 mod

sour island
#

Sounds neat ๐Ÿ˜ฎ

#

And gameplay aspect to getting to work?

gilded hawk
#

of FFS the clip is corrupted ๐Ÿ˜ (im remaking it)

brittle dock
sour island
#

Personally not a fan of scripting variations of the same item ๐Ÿ˜… - not to mention the mod features 3000+ titles

brittle dock
#

With this mod, you've made me an offer I can't refuse-- I hope you realize you've now become my Modfather.

sour island
#

Thank you for the kind words ๐Ÿ™‚

gilded hawk
#

@sour island Okay, so I finally got a good clip of how the loot manager sends items to a marked container.

This mod should make tidying up loot in the base so much easier, as it stops you from walking back and forth from your vehicle or loot pile.

And as you can see if your items stack is too heavy to fit in the container is also disables the option.

gilded hawk
sour island
#

Neat ๐Ÿ˜ฎ

gilded hawk
#

Yeah! Its cool ๐Ÿ˜„

brittle dock
#

I dig it; does it preserve item durability?

gilded hawk
#

A better example of how a "Loot Receiver" is set, and sending an item to it from a nearby container.

brittle dock
#

If I eat 1/2 an apple, then send the apple to the fridge, does the fridge spawn an apple with 50% remaining, or does it spawn a "full" apple?

#

Or if the crowbar is close to breaking, same thing

gilded hawk
#

It will send the exact item you want to send. So, if you have half apple, half apple will be sent

gilded hawk
#

Also, can anyone tell me how to check if a square is in a faction safe house? i think that I need to add this check to avoid griefing, but I don't know where to start ๐Ÿ˜…

bright fog
#

No idea, did you check the methods related to IsoSquare ?

sour island
#

Currently Testing: Game Night's Trading Card Game & Volumetric Rendering Update.

  • New Add-Ons: Magic The Gathering and Pogs
  • The update has impacts on all on the old add-ons too, so they've been bundled temporarily. Make sure to unsub from game night related mods before joining.
bright fog
#

@verbal yew Added compatibility for your zRe Armor pack with Susceptible via my Overhaul addon

steep vortex
#

Does anyone know where the zombie infection is handled in the files? Trying to modify the values of a zombie made from a player but not sure where to look for it.
Looking specifically for the code around killing a player and making the zombie.

errant bluff
bright fog
errant bluff
#

How difficult is it to create a fly effect around a player?

deft star
#

Good evening or afternoon, how can you translate your mod from English to Ukrainian ? โ˜น๏ธ . I don't understand how to make it

sweet escarp
bright fog
#

Or aim at the cursor ?

sweet escarp
bright fog
#

What's your issue with doing that exactly ?

sweet escarp
bright fog
#

Why can't you use the player angle ?

#

Hmm just tested it and I see the issue

#

It outputs cardinal directions instead of an actual angle

bright fog
#

Test values, see what it sets

#

Do a correlation with actual angle from player

#

You can do some basic trigonometry for this too

#

Get coordinate of cursor, get coordinate of player, calculate angle on your circle, do a correlation between your 2 angle values so they correspond

quasi kernel
#

Finally got this working, wheat from Soul Filcher's and LGR living in harmony with intercompatible seeds and seed packets.

#

I'm now at the point where I can accept mod compatibility requests. This is specifically for FARMING mods.

bright fog
#

๐Ÿ‘€

quasi kernel
#

If you have any requests, please feel free to shoot me a message.

#

Right now, Le Gourmet Revolution, Soul Filcher's Awesome Time / Farming Time, and 'Mo Crops are all compatible.

#

The mod may be experimental as it stands but at least it's more stable than the last version-

#

..which was 4,000+ lines of manual data entry.

#

This has been reduced to under 100 lines per patcher thus far, so we're vibin!

quasi kernel
#

I'll add it to the list, hopefully it doesn't brick the mod like it did in the last version!1

mellow frigate
#

brick ?

quasi kernel
#

Yeah like, in the old version it would always run into an error in the grow code and break everything.

#

Not entirely sure why, but this system is more stable anyways.

mellow frigate
#

I did not change anything so it will probably do the same.

quasi kernel
#

I'll make a quick patcher and test it soon.

mellow frigate
quasi kernel
#

Really easy for me to make patchers now, hence why I'm taking requests

#

All else fails, you can look into it if you wish for maintenance purposes. It's stupid easy to set up the patchers lol

mellow frigate
quasi kernel
#

Appreciate it! I'll try to see if I can get it working out of the box though, don't wanna make you go through too much hassle.

#

Sorry if I've caused you any headaches with reports by the way, I'll add a note that reports should be directed to me and not other modders.