#mod_development

1 messages · Page 108 of 1

ancient grail
#
local pl = getPlayer() getSoundManager():PlayWorldSound('ZombieSurprisedPlayer', pl:getSquare(), 0, 5, 5, false);  addSound(pl, pl:getX(), pl:getY(), pl:getZ(), 5, 1)```

@nova socket
#

FallOnFront
FallOnBehind

Ithink im not sure
Im on mobile sorry i check

But you can search xmls for the fall types

bronze yoke
#

i can see left, right, stagger, trippingFromSprint

stiff furnace
#

Thanks everyone

#

That's very helpful

fast galleon
#

Update - mods that prevent rereading recipe books...
Some of Literacy skill mods, Book Consumer mod

drifting ore
#

is there deceompiled java code avible online? or will i have to go though and decompile it myself?

bronze yoke
#

you'll have to decompile it yourself

#

i think making a decompilation public would be a breach of tos

humble oriole
#

So... am I going crazy or did it used to be that if a car was near a house like zombies it would prevent you from claiming it

ancient grail
#

Just remove zed

ancient grail
#

Ik ow cuz thats what i used for bear trap mod

zinc pilot
#

Just something I wanted to share since it has been somewhat of a problem for me:

  local group = BodyLocations.getGroup("Human")
  local list = getClassFieldVal(group, getClassField(group, 1))
  group:getOrCreateLocation(new_location)
  local new_item = list:get(list:size()-1)
  print("Created new body location" .. new_item:getId())
  list:remove(new_item)   -- We can't use the Index, it works if we pass the item though!
  local i = group:indexOf(move_to_location)
  list:add(i, new_item)
end

Someone here shared a similiar piece of code to insert a Body Location inbetween other ones but it didn't actually remove the result of getOrCreateLocation, so it kinda worked but the results weren't that clean. This fixes it.

ancient grail
#

What do we call this code

#

Im posting it on the links of reference

jaunty marten
ancient grail
#

Pao's attach to body code: [#mod_development message](/guild/136501320340209664/channel/232196827577974784/)

jaunty marten
nova socket
jaunty marten
#

or changed name, can't find

ancient grail
#

Whats his mod?

jaunty marten
#

no mod

zinc pilot
#

that's the difference

ancient grail
nova socket
#

In fact its more like extension to vanilla

jaunty marten
zinc pilot
#

from my tests, with the original code it never deleted the inserted value with getOrCreateLocation, as I said before, and made different instances in the list of the new body location

#

which basically made the whole part about removing it useless

jaunty marten
zinc pilot
jaunty marten
#

lul

zinc pilot
#

there's something finnicky going on with getClassFieldVal

#

maybe it's something about overriden methods in java that doesn't behave that nicely in lua

nova socket
jaunty marten
zinc pilot
#

and it'll work only with one of those methods

jaunty marten
#

but it was updated 1,5 years ago so..

humble oriole
#

@ancient grail I was able to fix it with a requestSync(), but now if I queue an transfer right after the timed action I'm using to remove the items it throws an error.

LOG  : General     , 1675760866509> 40,809,352> ERROR: addToItemSendBuffer parent=zombie.iso.objects.IsoThumpable@4718f822 item=zombie.inventory.types.Food@509a0605
LOG  : General     , 1675760866509> 40,809,352> -----------------------------------------
STACK TRACE
-----------------------------------------
Callframe at: addItemOnServer
function: transferItem -- file: ISInventoryTransferAction.lua line # 476 | Vanilla

is there a way to prevent the transfer until the buffer is ready

jaunty marten
#

at least I already see bug there so need to correct a bit

zinc pilot
ancient grail
ancient grail
#

Is that something u fixed

#

Or solved rarhrr

zinc pilot
#

oh you're right

#

then that would be fine

ancient grail
#

Rather*

jaunty marten
#

there's bug on 15 line with o.group, just need to remove o

tame mulch
#

coop-console.txt in folder Zomboid used only in splitscreen game or when playing host local server?

nova socket
#

If you want to find issue with that, you can simply get 50 boxes of nails, unpack them, place them all down and pretty much slowdown server that serves that current square.

humble oriole
nova socket
#

Money stacks are drainables with 100 Base.Money in it.

jaunty marten
nova socket
#

@tame mulch Also sorry to mention you on the topic, but since you are here atm I would like to pinch the idea of you guys reducing the amount of simultaneous WorldModels of items in one square to some fixed value, since 5000 items on the ground simply eats up my 3060 Ti

humble oriole
tame mulch
versed viper
# tame mulch I will talk with team about this

on our server (myself and Fallen) we had a base with a lot of crates full of a lot of materials get broken when it was overrun by zombies, and we had to turn the whitelist cleanup to minimum just to get it deleted because nobody could get near that area afterward

jaunty marten
#

death zone ded

humble oriole
#

yea, 2 of us tried to get close and crashed and couldn't rejoin hahaha

#

yea, @ancient grail I'm still not sure how to fix this one in my case.

#

    if self.homebiogas:getContainer():getAllCategory("Food"):size() > 0 then
        CBioGasSystem.instance:sendCommand(self.character,"plungeBiowaste", { { x = self.homebiogas:getX(), y = self.homebiogas:getY(), z = self.homebiogas:getZ() }})
    else
        self.character:Say(getText("IGUI_BioGas_ContainerEmpty"))
    end

    self.homebiogas:getContainer():requestSync()

    ISInventoryPage.renderDirty = true

    ISBaseTimedAction.perform(self);
end```
#

the requestSync() fixes the first issue, but introduces the new buffer issue.

ancient grail
#

remove everthing inside?

humble oriole
#

no, specific items

#
    local waste = 0
    local maxWaste = SandboxVars.BioGas.MaxBiowaste
    local hbg = getLuaBioGas(args[1])
    local isohbg = getIsoBioGas(hbg)
    
    if isohbg then
        if not (hbg.biowaste == maxWaste) then
            local biowastecontainer = isohbg:getContainer()
            local foodList = biowastecontainer:getAllCategory("Food")
            
            if foodList:size() > 0 then
                for v=1,foodList:size() do
                    local item = foodList:get(v-1)
                    if hbg.biowaste < maxWaste then
                        hbg.biowaste = hbg.biowaste + item:getCalories()
                        if item:getReplaceOnUse() then biowastecontainer:AddItem(item:getReplaceOnUse()) end
                        biowastecontainer:Remove(item)
                    end
                end

                if hbg.biowaste > maxWaste then
                    hbg.biowaste = maxWaste
                end

                isohbg:sendObjectChange("containers")
                hbg:saveData(true)
            end
        end
    end
end
ancient grail
#
function HBGPlungeBiowaste:perform()

    if self.homebiogas:getContainer():getAllCategory("Food"):size() > 0 then
        CBioGasSystem.instance:sendCommand(self.character,"plungeBiowaste", { { x = self.homebiogas:getX(), y = self.homebiogas:getY(), z = self.homebiogas:getZ() }})
    else
        self.character:Say(getText("IGUI_BioGas_ContainerEmpty"))
    end
    
    local item = 

    self.homebiogas:getContainer():requestSync()
    
    item:getContainer():removeItemOnServer(item);

    item:getContainer():DoRemoveItem(item);
    
    ISInventoryPage.renderDirty = true

    ISBaseTimedAction.perform(self);
end


#

@humble oriole

#

not sure if the request sync should come first or last

#

ihavent use that yet

humble oriole
#

the homebiogas is the isoObject

ancient grail
#

whats the item then

humble oriole
#
            
            if foodList:size() > 0 then
                for v=1,foodList:size() do
                    local item = foodList:get(v-1)
                    if hbg.biowaste < maxWaste then
                        hbg.biowaste = hbg.biowaste + item:getCalories()
                        if item:getReplaceOnUse() then biowastecontainer:AddItem(item:getReplaceOnUse()) end
                        biowastecontainer:Remove(item)
                    end
                end```
#

I'm doing all the item changes on the server

ancient grail
#
         local foodList = biowastecontainer:getAllCategory("Food")
            
            if foodList:size() > 0 then
                for v=1,foodList:size() do
                    local item = foodList:get(v-1)
                    if hbg.biowaste < maxWaste then
                        hbg.biowaste = hbg.biowaste + item:getCalories()
                        if item:getReplaceOnUse() then biowastecontainer:AddItem(item:getReplaceOnUse()) end
                            if biowastecontainer ==  item:getContainer() then
                            biowastecontainer:removeItemOnServer(item);
                            biowastecontainer:DoRemoveItem(item);
                            end
                        --biowastecontainer:Remove(item)
                    end
                end
humble oriole
#

hmm, I haven't tried that with the requestSync()

#

Also, how do you do the context highlights with the codeblock?

ancient grail
#

idont know what you mean

nova socket
#

@sour island if you don't mind a few words about some mod compat in DM

humble oriole
ancient grail
# nova socket <@55792318204092416> if you don't mind a few words about some mod compat in DM
                                    if totalSellAmt == 0 then
                                        player:setHaloNote('Nothing to sell')
                                    else
                                        if getActivatedMods():contains("pz-shops-and-traders") and SandboxVars.FATM2.Wallet then
                                            local money = InventoryItemFactory.CreateItem('Base.Money')
                                            if money then
                                                generateMoneyValue(money, totalSellAmt)
                                                player:getInventory():AddItem(money)
                                            end
                                        else
                                            player:getInventory():AddItems('Base.Money', totalSellAmt)
                                        end
                                        player:setHaloNote('Recieved: $' .. totalSellAmt)
                                    end
#
                                    context:addOption("ATM2: Sell Direct to wallet", spr, (function()
                                    local totalSellAmt = FunctionalATMs2.getTotalItemsValue(obj:getContainer())
                                    totalSellAmt = math.floor(totalSellAmt)
                                    sendClientCommand("shop", "transferFunds", {
                                        giver = nil,
                                        give = totalSellAmt,
                                        receiver = player:getModData().wallet_UUID,
                                        receive = nil
                                    })
                                    if totalSellAmt == 0 then
                                        player:setHaloNote('Nothing to sell')
                                    else
                                        player:setHaloNote('Recieved: $' .. totalSellAmt)
                                    end
                                    getPlayerLoot(0):refreshBackpacks()
                                    obj:getContainer():setDrawDirty(true);
                                    playATMsfx(player)
                                    
                                end))
#

sharing to you my compat to his mod

nova socket
#

So he uses Base.Money I guess?

#

from first glimpse

ancient grail
#

`` ```lua
--codehere

``
ancient grail
#

my atm can convert to money or transfer directly to chucks wallet

nova socket
#

wait so thats actual what and where, is it production code or you just made it?

#

oh ok

ancient grail
#

but im still having problem with refresh ithink

#

some not all plaeyrs doesnt refresh instantly the money is there but the visuals are buggeed

nova socket
#

So its easy peasy my API main currency is plain Base.Money and everything (besides gems and scrap which is SECONDARY currency set) can be reversed back and forth into Base.Money

#

I had some thought of possible conflicts so I decided to made it as close to vanilla as possible

ancient grail
#

i still have a pull request from chuck but its working for now so ill pull and merge when someone says error

humble oriole
# ancient grail ```lua local foodList = biowastecontainer:getAllCategory("Food") ...
LOG  : General     , 1675762406158> 42,349,005> ERROR: addToItemSendBuffer parent=zombie.iso.objects.IsoThumpable@4018d47e item=zombie.inventory.types.Food@7847dff7
LOG  : General     , 1675762406158> 42,349,005> -----------------------------------------
STACK TRACE
-----------------------------------------
Callframe at: addItemOnServer```

still the same thing, I wonder if it's possible to hook into the item transfer and if the transfer fails then just doing a player prompt and putting it back in the player's inv
#

like "slow down" or something

ancient grail
#

and not an obj

#

maybe

humble oriole
#

it's vanilla, so... not sure how that's possible

ancient grail
#

then im wrong lol

humble oriole
#

it only happens if I transfer the item to the object container within like 10-15 seconds of doing the timed action, if I wait, the error doesn't happen.

nova socket
#

ATM*

ancient grail
#

poltergeist is perfect for these kinds of stuff

nova socket
nova socket
#

It might break some immersion if somebody will crack open ATMs that is used for your Functional ATMs

ancient grail
#

i see

nova socket
#

woo I didn't see that one

#

full sprite integration neato

ancient grail
#

problem with this people report that the ownership isnt persitent

#

imust use global moddata but iodunno how yet

#

im learning it now for a diffrent mod

nova socket
#

anyways I predicted something like that AND

Money: Wallets - Money can be found in wallets, setting max to 0 will disable this feature
Money: Cash registers - Money can be found in cash registers, setting max to 0 will disable this feature
Money: ATMs - Money can be found in ATMs, setting max to 0 will disable this feature
Money: Safes - Money can be found in safes, setting max to 0 will disable this feature
#

Guess what

#

just shut it off in sandbox vars if its messing up and gg just use whatever mod you like

ancient grail
#

nicceeee

thick karma
#

@nova socket Out of curiosity, why disable the ability to pick up cash registers? Is it necessary for the mod to work? Doesn't seem to make a lot of sense (from the simplistic perspective of the player who wants to be able to take believable courses of action)... cash registers are easy to carry. The rest of the stuff is fair enough.

nova socket
#

I'm an ex-gamdev specialized mostly on security solutions and anti-cheats.

thick karma
#

Ahhhh... no way to stop them from resetting I'm guessing?

nova socket
#

Well I can find out if that register is inside safehouse, but again, who told that they will not store them in some nearest house 1 square away from their safehouse.

#

Too much debris trying to fix it with measure, I would rather have a single countermeasure

thick karma
#

Can you set mod data on individual item objects, rather than types?

#

You could add a "movedByPlayer" flag perhaps?

nova socket
#

That's possible, but that is immediately killed by another gameplay issue. People are fucking hoarders. I made this Cant Grab This mod specifically for that case, since people tend to stash away things with that value of interests just to prevent others from looting it.

fast galleon
thick karma
#

Hmmm seems a bit like disabling PvP because some people are toxic PvP players...

nova socket
#

Has nothing to do with PvP. Taking away object that can yield results turning it into a brick that does nothing specifically decreases needs for interactions, not disabling PvP

thick karma
#

But I hear you, to each their own. I was curious what other options existed. I noticed you used a global module, which is appreciated by me because it would make patching the behavior easy enough, assuming it's possible.

fast galleon
#

Is it supposed to work once? What's the logic?

thick karma
#

I am aware your mod is not related to PvP

nova socket
#

I mean if you want to make this optional you can push some sandbox var to completely ignore that behavior to my git

thick karma
#

I'm saying that disabling the ability to move cash registers because some small percent of players will spitefully hide them is like disabling PvP because some small percent of players will spitefully target newbies.

#

It's throwing away a system because of a small percent of people who abuse it basically.

#

Which is understandable, but not my preferred approach in this context (though I do play without PvP, so I understand in principle that sometimes it feels worth it to ditch a system).

#

I would have to see how it was done. I might try to figure out if I can flag items as player-moved.

nova socket
thick karma
#

Would allowing them to disassemble stuff break anything if they want that option (aside from the obvious fact that your code probably isn't written to give them the money inside the disassembled machine)?

#

@nova socket

nova socket
#

So if you destroy lets say register - its just goner, not gonna be used ever again.

thick karma
#

I think most people expect stuff to be gone forever if they disassemble it.

#

(Unless perhaps there is a recipe for the object.)

nova socket
#

You don't disassemble objects in my mod to get results. You check them and timestamp them until ResetTime is passed

#

Unless ResetTime is -1 so its never gonna happen

#

If I got your question right.

thick karma
#

Yeah, I understand disassembly would only give vanilla components of disassembling the item... I'm just wondering if you expect it would break anything if someone did that.

#

Like, say I disassemble a safe (by changing that setting in your mod) . . . Yay, I now have safe components. Did I break your mod?

#

Or does your mod say, "Oh, well, one less safe in the world."

#

(I suspect some private players who do not have any concern for horders / cheaters because they play with friends who are normal human beings will want to disassemble stuff freely if possible, hence my question.)

#

(These security measures are priceless for public servers, but my friends are not trolls.)

nova socket
thick karma
#

Great.

nova socket
#

You can earn money by solely smacking hundreds of zombos and selling scrap or trading it.

thick karma
#

I am gonna add a sandbox option for that, too, even though maybe only 5% of players will ever want it.

#

I am one of them probably.

nova socket
#

By "selling" I mean if you have any sort of shop, which I intend to create

thick karma
#

Your mod should be compatible with the vanilla player-to-player trade menu since you used items, which is nice.

nova socket
#

Not like you need mine shop either

thick karma
#

Players can just anarchistically demand money in the trade window.

nova socket
#

There is apparently a bunch of mods that use Base.Money the same way.

thick karma
#

Although actually I dunno

#

I think you can't put stacks...

#

I guess if you rubber-band money into single items it could work?

nova socket
#

Money Stack is effectively 100x of Base.Money

#

reversible as any drainable

thick karma
#

For sure. Yeah I guess it would be hard to use trade window for money-based trading

#

Would need an expansion

nova socket
#

Money Stack was solely a solution of immersion and carry capacity.

thick karma
#

Absolutely

nova socket
#

Also you get -3 unhappiness by making one stack KEK

ancient grail
thick karma
#

You mean it makes you happy to stack money?

#

lmao I see.

nova socket
#

yep

thick karma
#

At first I was thinking it was a hassle and would make you unhappy, I got ya now.

thick karma
nova socket
#

nope

thick karma
#

Seems like a highly exploitable issue?

nova socket
#

But you can't unstack the whole stack in one click

thick karma
#

Just play with your money and all your happiness comes back?

nova socket
#

Sort of. But waste a bit of your time, or you can smoke (everyone is smokers in this game) with the same value. Or read a book or do some sort of profession trait like with More Traits.

#

Note that counting money is timed action and will be slowed as you are deeply depressed making it a bit painful to count.

#

Same as with how people level reloading skills by juggling M9 mag in and out.

thick karma
#

I mean, practicing reloading should in fact increase your reload skill

#

Pointlessly counting money only makes crazy people happy.

#

But I hear you that it is not without precedent in Zomboid

#

Smokers have to at least consume goods for their happiness, as well.

#

So that analogy is somewhat fair but imperfect

#

But it is like reading books over and over.

nova socket
#

Oh man, like people solely have thousands of cigs

#

I only seen few servers where they actually cared about cig amount

thick karma
#

It's not so bad, I just wanted to be sure it had crossed your mind.

#

I mean, I made a mod where you can meditate you're happiness back, so I'm not complaining

#

Just talking.

nova socket
#

I mean if you want an option for that too I don't mind either KEK

#

Wrapping with one bool is sorta 5 minutes deal

thick karma
#

Totally, I'm not really stressed about it, but I'm sure some people will be.

#

Just because I know how people are.

nova socket
#

True

#

I'm noting that rn

#

need some sleep before proceeding

thick karma
#

For sure. I try to tailor my mods to a lot of different people who often want nothing like what I want lmao so I'm just throwing out ideas, so hopefully you won't take them as complaints. Mod looks great so far.

#

@nova socket You aware of this error?

ERROR: General     , 1675770500508> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: unknown block type "//" at CustomSandboxOptions.parse line:107.
ERROR: General     , 1675770500509> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: unknown block type "//"
    at zombie.sandbox.CustomSandboxOptions.parse(CustomSandboxOptions.java:107)
    at zombie.sandbox.CustomSandboxOptions.readFile(CustomSandboxOptions.java:72)
    at zombie.sandbox.CustomSandboxOptions.init(CustomSandboxOptions.java:42)
    at zombie.GameWindow.init(GameWindow.java:1203)
    at zombie.GameWindow.mainThreadInit(GameWindow.java:576)
    at zombie.GameWindow.mainThread(GameWindow.java:489)
    at java.base/java.lang.Thread.run(Unknown Source)
thick karma
#

@nova socket It was caused by the Java-style comments in your sandbox options.

#

Will include the fix in the PR

#

You'll wanna find a better place for this:


// Move to traders mod

// option ICurrency.SilverJunkCost = {
//     type = integer,
//     default = 1,
//     min = 0,
//     max = 100,
    
//     page = ImmersiveCurrency,
//     translation = ICurrency_SilverJunkCost,
//     valueTranslation = ICurrency_SilverJunkCost,
// }
// option ICurrency.GoldJunkCost = {
//     type = integer,
//     default = 2,
//     min = 0,
//     max = 100,
    
//     page = ImmersiveCurrency,
//     translation = ICurrency_GoldJunkCost,
//     valueTranslation = ICurrency_GoldJunkCost,
// }
// option ICurrency.GemsJunkCost = {
//     type = integer,
//     default = 3,
//     min = 0,
//     max = 100,
    
//     page = ImmersiveCurrency,
//     translation = ICurrency_GemsJunkCost,
//     valueTranslation = ICurrency_GemsJunkCost,
// }
sour island
#

Or use /* */

#

Also someone asked about DMs, and sure but chances are I won't see them cause of discords new DM stacking

tame mulch
#

Someone worked with Prop1, Prop2 parameters in recipes?

ancient grail
#

Me

tame mulch
#

What they mean?

ancient grail
#

Whatsup ?
The item character is holding

#

Source=1 can be the first line

#

2 second line
Useful if the item is from tags so its undefined

#

🫡

thick karma
tame mulch
#

Another question - what time used for time in recipes? Ticks, game time, etc?

thick karma
#

I don't know but if I had to wildly guess I would imagine it's ticks... Do people finish recipes faster at different game speeds? I'm not even sure.

tame mulch
#

I think it's gameTicks * Performance (FPS) coeff

sour island
#

It's the same ticks as timed actions - so I'd wager they're synced in MP somehow

thick karma
jaunty marten
thick karma
#

Anyone know whether Disassemble is ever an option on ATMs or cash registers? I'm guessing no? And can anyone give me the coords for a bank vault? Not sure where to find one... 😭

jovial harness
#

Anyone knows the base attack speed of "Bat", "Heavy", "Stab" and "Spear" weapon animations ?

thick karma
#

Not sure but you can use timed actions to respond to their animEvents

jovial harness
#

So no one has measured it yet ?

#

Cause right now I'm relying on Trombonaught's values but I don't think they're very accurate

thick karma
#

I mean I don't know about that logic... I am not everyone and you asked 3 minutes ago.

#

But I do not know the measurement. 🙂

#

But I do know you can do

function YourTimedAction:animEvent(parameterName, parameterValue)
    if parameterName == "AttackAnim" and parameterValue == "FALSE" then
        -- The attack animation has reached its set ending timepoint.
    end
end
#

Also written:

function YourTimedAction:animEvent(event, parameter)
    if event == "AttackAnim" and parameter == "FALSE" then
        -- The attack animation has reached its set ending timepoint.
    end
end
jovial harness
#

Ok that's helpful, thanks !

thick karma
#

Good luck!

#

By the way, if you are ever making your own XML for a custom animation, you can rename those events freely. So you take the timed event where it sends AttackAnim with FALSE and make it send AttackComplete with anything really, and just use

if event == "AttackComplete" then
    -- Same deal
end
#

But vanilla animations use AttackAnim with TRUE when the attack starts, and AttackAnim with FALSE when it ends.

#

@jovial harness

jovial harness
#

I see, I'm not making my own anims, I'm just trying to display accurate information

#

kinda like that

#

for a "weapon modifier' mod I was working on

thick karma
#

Oh, I see! Cool!

#

Does that require an overwrite of anything or can you just send those colors to the tooltip string?

jovial harness
#

I'm using ISToolTipInv:render() so... it's gonna conflict with anything that messes with that

thick karma
#

Okay, I figured you were. I can help you with compatibility on that.

jaunty marten
jovial harness
#

I mean I do call the render after renaming it "old_render" but that's it

thick karma
#

You'll likely want to consider something like what Chuck's Named Lit does for its override if you are not affecting all conceivable items:

NLISUI.ISToolTipInv.render = ISToolTipInv.render

function ISToolTipInv:render()
    if not ISContextMenu.instance or not ISContextMenu.instance.visibleCheck then
        local itemObj = self.item
        if namedLit.StackableTypes[itemObj:getFullType()] then
            local bookNameLitInfo = itemObj:getModData()["namedLit"]
            if bookNameLitInfo then
            end
        else
            NLISUI.ISToolTipInv.render(self)
        end
    end
end

This calls the original render if it's not an item with custom data

thick karma
jovial harness
#

I have

#

local old_render = ISToolTipInv.render at the top of the file

thick karma
#

Do you just append your data to the end of the render function that exists when you load the game?

jovial harness
#

and old_render(self)

#

at the end of my custom render

#

I'm heavily inspired by the mod "Show Weapon Stats" for the tooltips.

thick karma
#

I see, so you do your stuff first. Can I see how your render looks?

jovial harness
#

You wanna see my 270 lines render ? you sure?

thick karma
#

Haha yes.

#

I'm sure it won't bite.

jovial harness
#

I can upload files here ?

thick karma
#

Yep

jovial harness
#

You can see line 134 I'm checking the SwingAnim and basing attack speed out of it. Hence my original question

#

And those values are Trombonaught values

jaunty marten
thick karma
#

This looks like it should be compatible with NamedLit and Wookiee Gamepad Support due to line 40.

jovial harness
#

No idea what those are, but good

thick karma
#

Not my mod, not my primary concern.

thick karma
jovial harness
#

Let me look them up real quick

jaunty marten
thick karma
#

NL adds special tooltips for books. WGS fixes the tooltip positions for people running large font sizes on gamepad. Also allows horizontal tooltip projection.

thick karma
#

Named Lit is one of my favorite mods so I added WGS support to make its tooltip positions match WGS.

#

(Optionally, of course.)

jovial harness
#

That's good then. Thanks for the feedback guys

jaunty marten
#

btw @jovial harness why are u creating new setHeight and drawRectBorder functions in render process?

#

u can create it outside of render function scope

thick karma
#

I like your mod and I expect my friends may want it on my server

#

Looks nice.

thick karma
# jovial harness

(I know it sounds nitpicky and I am not saying this for me because I actually like the look just fine, but a lighter purple might be easier to read on black . . . but you know to each their own.)

jovial harness
tardy wren
#

So, anyone tried changing the swingsound in the code before?

jovial harness
#

and light purple is supposed to be epic rarity. I'll tweak it to be lighter so it's more readable

thick karma
#

@jovial harness Extracted, setHeight would look like this:

local stage = 1
local old_y = 0
local lineSpacing = self.tooltip:getLineSpacing()
local old_setHeight = self.setHeight

function ISToolTipInv:setHeight(num, ...)
    if stage == 1 then
        stage = 2
        old_y = num
        num = num + numRows * lineSpacing
    else 
        stage = -1 --error
    end
    return old_setHeight(self, num, ...)
end
#

Hopefully you can solve the other one based on that

#

I'd throw them above render because even though it's not strictly necessary based on pattern of execution the local copy of old_setHeight is used in render.

#

ISToolTipInv:setHeight passes self automatically.

jovial harness
#

All right. TIme to refacto some things then ! thanks for the advices!

thick karma
#

Also, tbh, food for thought, I would wrap all of my wandering locals in a module, but that's just me

jovial harness
#

You mean put them all in a table or set them in IsToolTipInv constructor as part of the object ?

thick karma
#

E.g., using find and replace, I would refactor this:

local old_render = ISToolTipInv.render
local item = nil
local numRows = 0
local modifier = nil
local modifierName = ""
local fullItemName = ""
local modifierColors = {1, 1, 1}
local modifier = {}

local damageText = nil
local rangeText = nil
local hitText = nil
local critText = nil
local condText = nil
local breakText = nil
local accText = nil
local gunText = nil
local weaponText = "TET"
local soundRadiusText = nil
local pushBackText = nil
local speedText = nil
local category = nil
local old_render = ISToolTipInv.render

like this:

local WMT = {}

WMT.numRows = 0

WMT.modifierName = ""
WMT.fullItemName = ""
WMT.weaponText = "TET"

WMT.item = nil
WMT.modifier = nil
WMT.damageText = nil
WMT.rangeText = nil
WMT.hitText = nil
WMT.critText = nil
WMT.condText = nil
WMT.breakText = nil
WMT.accText = nil
WMT.gunText = nil
WMT.soundRadiusText = nil
WMT.pushBackText = nil
WMT.speedText = nil
WMT.category = nil

WMT.modifierColors = {1, 1, 1}
WMT.modifier = {}

WMT.ISToolTipInv = {}
WMT.ISToolTipInv.render = ISToolTipInv.render
jovial harness
#

table then, got it

thick karma
#

Then, at the bottom (last line of your file), you can do return WMT and other modders can play with stuff if necessary by require "[yourfilename]"

jovial harness
#

Ah I see. Good stuff

thick karma
#

Notice I changed old_render to WMT.ISToolTipInv.render.... this will require 1 extra line of code to work (it's in the example above, too):
WMT.ISToolTipInv = {}

#

That declares the fake ISToolTipInv table (inside your module) in which you'll store the old copies of all the ISToolTipInv stuff you want to overwrite.

#

Then everything you override will read almost identically to vanilla

jovial harness
#

Yeah so you really store everything that was local then

#

I'll have to do that for More Description For Traits, too. It doesn't use modules

bronze yoke
#

why include the function copies?

thick karma
#

Wdym?

bronze yoke
#

putting old_render into the module

#

i'm just curious if there's a specific use for that

thick karma
#

Just in case someone wants to slightly modify your approach, it may be useful for them to be able to get a copy of the function before your mod edited it.

#

Just to make a patch mod easier on the next person.

bronze yoke
#

oh, i guess you could use that to insert code between the vanilla function and the modded one

thick karma
#

Yeah

#

or even change the modded code slightly and overwrite differently.

bronze yoke
#

i'll consider moving some of mine into the modules

thick karma
#

I do everything I can to make life easier on whoever has to pick up my code when I inevitably move on with my life lmao

jaunty marten
thick karma
#

I'm sure someday there will be other games and other modding to do

jaunty marten
#

old_render especially

#

poorer performance

thick karma
#

It's still a local and the performance difference would be absolutely trivial

#

Measure it and let me know lmao

#

(if it can be measured)

#

(it may be too negligible)

#

Micro-optimization matters less to me than mod compatibility, but obviously this is subjective.

jaunty marten
thick karma
#

Clearly all modders must do what is right in their own hearts.

thick karma
#

@jovial harness You really don't need to declare these variables nil. They're nil by default.

thick karma
#

Omg so many lol

jaunty marten
#

but it's fine cos otherwise he will localize it in different scope and will can't use it

bronze yoke
#

it was necessary for scope when they were locals

jaunty marten
#

oh stop

#

there's no different scope

thick karma
#

Really? Why?

jovial harness
#

goddammit. This is why I didn't want to share my file haha 😂

thick karma
#

Ohhhh I see

#

Because in Lua it allows him to just start using the variable later to go var = nil

#

I got you now.

jaunty marten
bronze yoke
#

yeah, it doesn't matter when using a module though

thick karma
#
local WMT = {}
WMT.numRows = 0
WMT.modifierName = ""
WMT.fullItemName = ""
WMT.modifierColors = {1, 1, 1}
WMT.modifier = {}
WMT.weaponText = "TET"
WMT.ISToolTipInv = {}
WMT.ISToolTipInv.render = ISToolTipInv.render

@jovial harness

#

Would be the new top of your code with the unnecessary nil variables gone.

bronze yoke
#

i'd argue it can also be good for organisation to 'declare' nil variables but i don't think i would do it myself

jaunty marten
#

@jovial harness btw instead this

if swingAnim == "Bat" then
    swingAnimSpeed = 1
elseif swingAnim == "Heavy" then
    swingAnimSpeed = 0.6
elseif swingAnim == "Stab" or swingAnim == "Spear" then
    swingAnimSpeed = 1.13
else
    swingAnimSpeed = 1
end
thick karma
#

But totally there's validity to that

#

(Maybe grouping your nil variables in a block would make some sense, on that note. If you keep them.)

jaunty marten
#

u can precreate table

local swingAimToSpeed = {
["Bat"] = 1,
["Heavy"] = 0.6,
["Stab"] = 1.13,
["Spear"] = 1.13,
}
jaunty marten
#
swingAnimSpeed = swingAimToSpeed[item:getSwingAnim()] or 1
jovial harness
#

then just select the index, yeah

jaunty marten
jovial harness
#

I might as well make it part of the module, too

thick karma
#

@jovial harness Or, in module form:

WMT.swingAimToSpeed = {
    ["Bat"] = 1, 
    ["Heavy"] = 0.6,
    ["Stab"] = 1.13,
    ["Spear"] = 1.13,
}
jovial harness
#

yep

jaunty marten
#

with this part same thing

thick karma
#

(also, you should really tab those because those are in their own scope)

jovial harness
#

Bruh I'm getting slaughtered with all your corrections right now lmao

#

But it's great to learn !

ancient grail
#

Hello guys

jaunty marten
#
local statsRange = {
  -- here's all stats as from last my example ("accuracy", "sound radius" and etc)
}
local statsMelee = {
  -- here's all stats as from last my example ("endurance cost", "attack speed" and etc)
}

-- 221 line
elseif statsRange[k] and not item:isRanged() or statsMelee [k] and item:isRanged() then break
ancient grail
thick karma
jovial harness
#

Thanks for pointing that out !

jaunty marten
#

u r welcome spiffo

thick karma
#

By the way @jovial harness, when you find and replace, remember to match case and whole word to minimize errors:

#

otherwise you could have stuff like modifierName -> WMT.modifierName and then replace modifier and wind up with WMT.modifierName -> WMT.WMT.modifierName

#

Which is clearly undesirable

#

And a real possible example from your code.

jovial harness
#

Hmm, that option isn't displayed in my vscode

thick karma
#

The ab?

jovial harness
#

Match Whole Word

thick karma
#

That's the option

#

ab underlined

#

You don't see ab?

jaunty marten
jovial harness
#

oh yeah that's just the tooltip! thanks

thick karma
jaunty marten
thick karma
#

Without it

#

Yes

#

If you do not select match case, you'll replace both item and Item simultaneously.

jaunty marten
#

better use both always with replacing actions

thick karma
#

Exactly.

jaunty marten
thick karma
#

What is this?

jaunty marten
#

looks like cookie or pizza mb

jovial harness
#

A pizza ?

thick karma
#

Hell yes

#

lol I am making a tutorial mod and the trait is "Party Animal" 😛

#

I am horrible at pixel art but I did something recognizable so I won a round.

jaunty marten
#

with name will be easier drunk

jovial harness
#

It looks good but wait to see it in the character creator

#

sometimes it doesn't end up as you want it

thick karma
#

😭

jovial harness
#

speaking from experience lol. But maybe I'm just terrible at pixel art myself !

thick karma
#

P hard to tell something is pizza when it's that small 😭

jovial harness
#

Maybe cut a slice of that pizza

jaunty marten
#

btw good idea, piece of pizza will be better

jovial harness
#

and some wine glass or beer right beside it. or a party hat ? Maybe that's overkill

faint jewel
thick karma
#

lol

thick karma
#

A party hat alone is hard to distinguish

jovial harness
#

That looks better

thick karma
#

I made toppings twice as large and made pizza fill the whole 16x16 instead of stopping before the edge.

jovial harness
#

For one of my traits I used one of the inventory images of the game (32 x 32) and scaled it down to 16x16 and added a +

thick karma
jovial harness
#

oh that looks good

thick karma
#

Fair enough

jovial harness
#

This one is great

thick karma
#

Thickened the crust, but I think I also need to lighten the brown for better visibility on black...

jovial harness
#

Could you make a drop of cheese drip from it ? 🤤

thick karma
#

Yes but how compellingly I do not know

#

It may just look like a different object instead of drippy cheese lol

#

But I'll give it a shot

#

Think I'm likely to go with this:

#

Best visibility yet in normal view:

#

Tooltip lol.

jovial harness
#

What does it do ?

thick karma
#

lol not much yet. Probably just going to make it say silly crap once an hour as an example of how to use modulo arithmetic to loop through an array since so many modders seem to have never seen that before.

jovial harness
#

including me !

thick karma
#
local example = {
  [1] = "Bob",
  [2] = "Joe",
  [3] = "Sue"
}

local exampleIndex = 1

local examples = 0

while examples < 100 do

    print(example[exampleIndex])

    exampleIndex = (exampleIndex % #example) + 1    
  
    examples = examples + 1

end

#

@jovial harness

jovial harness
#

Oh, so it goes back to 1 after 3 then

thick karma
#

(In 0-indexed arrays, you would do next = (next + 1) % #example).

jaunty marten
#

ah, btw about next, I remember as I tried to use it but got nil error, there's no next in kahlua? 🥴

thick karma
#

Ummm yeah in retrospect maybe next is a bad variable name because actually it gets colorized funny in VS Code @jovial harness

#

Changed it to exampleIndex to be on the safe side.

thick karma
jovial harness
thick karma
#

Which one?

#

I don't know if I have a good one

#

I'm open to recommendations

jovial harness
#

I use Lua, StyLua and Luacheck

jaunty marten
#

I'm using garry's mod lua gx_Kekw

thick karma
#

Author on Lua? 4 plug-ins with the same name. Oof. @jovial harness

jaunty swan
#

burryaga, why are u using that instead of a random number ?

#

its just to say messages right

thick karma
#

@jaunty swan I would use a random number if it were a real mod.

red tiger
#

Good morning.

#

@jaunty marten Ever get time to look at that mod loader experiment?

jaunty swan
#

oh okay nvm then ! 🙂

thick karma
#

I am purely going to do the loop because my mod is an example mod for people to learn with

jaunty swan
#

wouldnt a for loop be better then

jovial harness
#

I'm using Lua by sumneko, StyLua by JohnyMorganz and Luacheck by rog2.

thick karma
#

@jaunty swan And I often see:

next = next + 1
if next > #example then
  next = 1
end

And I just want to die.

#

So this needs to be taught lmao

red tiger
#

Random in PZ is implemented in a very concerning way.

jaunty swan
#
for i = 10,1,-1 
do 
   print(i) 
end
red tiger
#

Everything uses a high-quality PRNG.

jaunty swan
#

jab, is there a time function

#

where u get the bit

red tiger
jaunty swan
#

ms

red tiger
#

Yes

jaunty swan
#

either is fine really

#

then u have a random number

#

divide it by a certain amount and round it

red tiger
#

I'll grab the API call

jaunty swan
#

im completely unfamiliar with pz modding to be clear

#

just experienced in programming

red tiger
#

getTimestamp()

red tiger
#

I also use Typescript in place of Lua so I can have more structure in my mods.

jaunty swan
#

lua is my first language i ever learned, i think i stick to it for that reason tbh haha

#

when it comes to modding gmaes

#

games*

#

that or c#

red tiger
jaunty swan
#

i have hehe

#

i did a full course

#

but u can make your own OOP system in lua

#

if u want to

#

with require

#

and making external lua files

red tiger
#

You'll learn more about how you think about solving problems when you give yourself a project that you want to work on.

#

=)

jaunty swan
#

im actually working on a mvc web app for a friends mc server

#

im looking for a job as junior .net dev right now

thick karma
#

A Marvel vs Capcom Web App, why would anyone want such a thing?

#

</sarcasm>

#

Thanks, I'll be here all week.

#

MAYBE...

jaunty swan
#

xddd

faint jewel
#

if anyone needs their own web app, it's spiderman.

thick karma
#

True, true.

red tiger
#

@jaunty marten Let me know when you do take a look at that mod loader experiment. Curious to know your thoughts on it.

#

It could be improved to send byte data for files if desired.

jaunty marten
#

just right for my current mod

#

loading in specific order

red tiger
sour island
#

It was a bitch and a half to get locked out containers for my shops to work right

thick karma
#

Ooooof.

jovial harness
#

How do I get the color-blind variables 'good' highlight color & 'bad' highlight color ? I can't seem to find them in the files

sour island
#

Still thinking about how I'd get the patch mod to load last

#

So anyone using it properly will be fine if they require as needed

#

But other mods get shafted

jaunty marten
sour island
#

Hmm that could be a good idea

#

I started a community patch mod to go along with frameworks and debugtools

#

But I'm thinking how best to have it loaded

#

Overwriting to be first would be ideal for some cases

#

But for the most part loading last would also overwrite bad actors

#

Haven't really sat down with the concept yet

#

Perhaps loading first is better now that I think about it

red tiger
#

A community mod library should include tick-registration alongside a timer library.

#

Less event handles on the Java side.

faint jewel
#

I need a good time library

red tiger
#

I have a sync timer library

#

(It's somewhere)

dark wedge
# sour island Still thinking about how I'd get the patch mod to load last

You can add an Event function to the stack during the event, that way your event function is last.

    Events.OnGameBoot.Add(function()
        OnPostBoot()
    end)
end
Events.OnGameBoot.Add(firstBoot)```
This basically guarantees that the `OnPostBoot` function will run last during the `Boot` event. Can use something similar to ensure any patches run last.
jaunty marten
faint jewel
#

while those are nice, I dont need timers. I need a way to get teh current IRL time, add time to it in seconds.

jaunty marten
faint jewel
#

stuff like that.

red tiger
#

Assert lib.

#

Nice.

jaunty marten
#

os.time() + x? or what

faint jewel
#

well os.time doesn't seem to work the way it SHOULD.

dark wedge
faint jewel
#

i tried that and it is never the right time.

jaunty marten
dark wedge
#

right.

red tiger
#

Lunch break. BBL.

sour island
#

I don't think there's going to be a silver bullet - might have to just document everything and go with what works for each scenario

dark wedge
jaunty marten
#

this event name..

jaunty marten
faint jewel
#

i mean i add 1000 seconds to it and it adds 3 minutes,.

jaunty marten
#

how did u figure out it?

#

it can't, os.time just returns the num

#

0 + 1000 can't be 180 info_player_yes

faint jewel
#

aaaaaaaaaaaaaaaaaand welcome to my issue!

drifting ore
#

i'd be interested in seeing that code also that gets you that

jaunty marten
#

how did u format the number to time?

nova socket
thick karma
#

Cool.

#

Are you sure safes / vaults / cash registers / ATMs can be disassembled in vanilla? @nova socket

#

I have not yet had a chance to check but I tried disassembling them all with your mod running (after I removed the command to remove disassembly) and none of them were offering that option.

#

Moving stuff worked fine.

faint jewel
thick karma
faint jewel
#

because i kinda gave up on it.

#

lol

thick karma
#

@jovial harness Drippy cheese?

jovial harness
#

yum

thick karma
#

Or not obvious enough that it's pizza?

jovial harness
#

I think it's pretty obvious

thick karma
#

For comparison:

jaunty marten
jovial harness
#

drippy cheese ftw

faint jewel
#

i want it to add the distance in tiles to the current time (1 tile per second driving is good right?)

thick karma
#

Everyone vote on which pizza to use!

#

I cannot decide!

sour island
#

Left is better

thick karma
#

Thanks, Discord Previews.

#

Nice job.

#

Pretty unanimous that people like drippy cheese, got it.

jaunty marten
thick karma
#

(I double-voted to show the options.)

faint jewel
#

trucking mod.. i want to taek the distance bwtween picup and delivery points in tiles, add that to the current time, and make that the delivery time.

jaunty marten
faint jewel
#

maybe add 10-15% to the tiles for a little buffer etc.

jaunty marten
faint jewel
#
        local adjTime1 = 360 --math.floor(adjDist) * 60
        local adjDelivery = os.time() + adjTime1;
    
        local readjDelivery = os.date("%B %d %Y, %I:%M %p", adjDelivery);
#

that's how i do it. and it's never right

jaunty marten
#

os.date exists? lol

faint jewel
#

YUP

jaunty marten
#

I saw kahlua manual and there's only time

#

lmao

quasi kernel
#

Me when os.clock my beloved doesn't exist in Kahlua

jaunty marten
#

yea, sadly no clock sadCat_HPG

thick karma
nova socket
#

@thick karma ```Lua
option ICurrency.DoProtect = {
type = boolean,
default = true,

page = ImmersiveCurrency,
translation = ICurrency_DoProtect,
valueTranslation = ICurrency_DoProtect,

}
option ICurrency.GiveMood = {
type = boolean,
default = true,

page = ImmersiveCurrency,
translation = ICurrency_GiveMood,
valueTranslation = ICurrency_GiveMood,

}

Tweaked, options are now effective
quasi kernel
#

Lower light values at night = higher cost

#

I haven't poked around with traits yet so forgive me if this isn't possible.

jaunty marten
jaunty marten
#

light like there's day not late night

red tiger
#

setExposed(Date.class) when?

#

lol

jovial harness
jaunty marten
#

web engine when?

#

lol

red tiger
#

Haha

#

=)

jaunty marten
#

I want human in-game ide unhappy

red tiger
#

I want PipeWrench to have fully-functioning TS for PZ's Lua codebase

jaunty marten
#

I got what you mean

#

don't make me cry

red tiger
#

Haha. What I'm doing right now will help that HTML engine.

jaunty marten
red tiger
#

Why do something twice when you can do it right the first time?

thick karma
#

The mod is not for every server.

faint jewel
jaunty marten
#

ha-ha

jaunty marten
thick karma
faint jewel
#

it reads correctly though?

thick karma
jaunty marten
nova socket
#

You can copy and paste it in workshop again.

red tiger
nova socket
#

I mean they will still read the mod data

red tiger
#

Oh with mod data? Yeah you could make it annoying to access.

thick karma
nova socket
#

What you wanna tell me somebody really obfuscates the mod code? KEK

red tiger
#

@jaunty marten Knows what I'm talking about.

thick karma
#

No, I mean you make the Steam Workshop Item private.

#

So no one can find it unless you give them access.

nova socket
#

I mean what Jab said specifically

thick karma
#

Ohhhh

red tiger
#

If you can make it so that the only way for the mod to work is to upload a workshop item, then you can DCMA them out of orbit.

jaunty marten
#

u can even do web loading for mod

red tiger
nova socket
#

Wasn't sockets or any sort of fetch not an option for PZ Lua?

jaunty marten
thick karma
quasi kernel
#

Hm..

jaunty marten
quasi kernel
#

I wanna say 6~7 with sandbox option.

drifting ore
#

does anyone know where the file/files where dismantling data is stored? like when you dismantle an electronic thing with a screw driver? where is all that laid out? tagged on the indiviual item? in some file somewhere?

thick karma
#

Cool sounds good.

red tiger
#

You can HTTP POST if you set java.awt.headless=false on the JVM args when launching PZ and using openUrl(..).

#

No GET though.

#

That'll open a browser window.

jaunty marten
red tiger
jaunty marten
#

custom java?

red tiger
#

Yes.

#

I use an RCON mod along with a Generic command that feeds into a Lua command registry.

jaunty marten
#

seems right, just checked m3ss mod

faint jewel
# jaunty marten yep

no i meani t reads out the tiume and date fine, it just wont let me add or subtract froim it correctly.

red tiger
#

My stuff's in-house.

jaunty marten
#

u need to format it each time lol

nova socket
drifting ore
#

where is the data on crafting recipies stored?

jaunty marten
nova socket
#

I know, we've been discussing that with him KEK

red tiger
#

Yo, when will we get openUrl() fixed so I can add a button to join my Discord server from in-game? :D

tame mulch
#

Sad that we disabled open web links) I had cool rick roll mod 😄

#

Ooooh, started working on guide about item script params stressed It will be long night...

red tiger
red tiger
tame mulch
nova socket
#

Allow us to use sockets on servers so I don't have script everything with bash outside.

red tiger
# tame mulch I think yes

Thanks for clarifying. Are there plans to re-enable it? (Possibly with a dialog box prompting the user to open it or not?) (Whitelist domains?)

tame mulch
red tiger
ancient grail
#

Thank you for helpping us modders sir 🫡

jaunty marten
red tiger
#

BTW where do I go to appeal a ban on the forums?

tame mulch
jaunty marten
red tiger
red tiger
jaunty marten
#

lul

#

for what

nova socket
#

Forums drunk

red tiger
jaunty marten
#

not bad not bad

nova socket
jaunty marten
#

I thought mb u get banned by million threads about new features for game LUL

nova socket
#

Jab probably transpiled his text way to something different than TS back in 2016

red tiger
#

Hahaha no it was silly MP drama.

jaunty marten
#

u killed developer in mp?

red tiger
#

I kill players in PvE servers all the time.

jaunty marten
#

oh.. really shit stressed

#

u killer, well-deserved ban

#

need to be friendly info_player_yes

nova socket
#

toxec

naive crescent
#

@dark wedge Hows your mod coming along?

tame mulch
#

Item scripts have 335 different parameters

red tiger
#

That's a yup.

#

Planned on copying ScriptItem's list of params into a GUI editor interpreting it in JSON and exporting it to the game's text format.

tame mulch
red tiger
#

Thanks. I'll refer to your work while making this editor.

dark wedge
# naive crescent <@255358282862952449> Hows your mod coming along?

It's coming. lol. I still need to tweak a few things, optimize how i'm gathering objects to hit (this can be slow currently), and write a function to calculate damage as it doesn't take into account your skills and such right now for attacks. I got sidetracked with the whole unarmed thing a bit, but now there's an uppercut you can do as part of it. I'm currently using the base game's Base.BareHands item so the range is a bit off, but this shows me actually unarmed attacking.

nova socket
#

do you apply damage like to closest zed?

dark wedge
red tiger
#

Wondering if an animation sync API would be in the works eventually.

dark wedge
#

It would be so nice to have animation variables set on players just sync with each other automatically...

tame mulch
#

We have sync, but it depends on State. Player params sync depends on State (Like TimedActionState, EmoteState, FishingState)

drifting ore
#

why is there items.txt and newitems.txt? are the items jsut arbitraily split up in there? or do the 2 docs reprisent diffrent things?

thick karma
#

Classic party movie or partying-oriented quotes, all of you, go! 🤪 (It's for my mod, it's on topic . . .)

faint jewel
#

see the distance? that's in tiles. tell me how the start and due are that many seconds parat.

#

when i add that distance to the start time in seconds.

dark wedge
jaunty marten
tame mulch
faint jewel
#

start time is the time I click accept job.

#

due time should be that time PLUS the distance in seconds

#

5874 seconds is NOT 3 minutes.

jaunty marten
jaunty marten
faint jewel
#

i dd?

#

started = os.time.

#

due = ```
local adjTime1 = math.floor(adjDist)*60
local adjDelivery = os.time() + adjTime1;

#

failure = adjtime *2

jaunty marten
#

I mean full code

faint jewel
#

it aint all together like that.

jaunty marten
#

cos don't see any problem here

faint jewel
#

neither do I! and THAT is the issue.

dark wedge
#

You can convert number from string

jaunty marten
#

u can send all files to dm, I will check as will back to pc, rn chilling in da bed drunk

#

can't get up.. xp

hot patrol
drifting ore
#

Modders, is the pz animation engine hard to work with?

tame mulch
dark wedge
hot patrol
#

nice

naive crescent
#

So I apologize in advance if I hit you up for updates from time to time. xD

hot patrol
dark wedge
wheat kraken
wheat kraken
#

@tame mulch are you planning to continue npc mod? can i help you?

tame mulch
hot patrol
tame mulch
red tiger
#

Do you need an native English-speaking translator for docs / guides?

tame mulch
red tiger
#

I think your guide was in mainly Russian?

#

I've worked with some friends who had game manuals that I translated. (I don't speak Russian; I can fix very broken English)

tame mulch
red tiger
naive crescent
#

Want to give back to the game that gave me so much

drifting ore
#

so the proper way for me to edit items needed for recipe using sandbox var is to use OnCanPerform? then i just make a function for it and use scriptmanager to assign the value of needed amounts per item and should be able to use sandboxvar in it from there?

ancient grail
tame mulch
naive crescent
tame mulch
#

then translate

ancient grail
#

also why cant we use lua to edit every param.. only doparam works and that edits everything
will we be able to edit it for specific instance without changing everything

ancient grail
#

doparam chagnes everything that will spawn in the future

tame mulch
#

You mean change script for 1 item instance?

#

Scripts used for spawn items. For change item instance values used another funcs

red tiger
#

Since Ramiro#0112 can't speak in here (Issues registering phone # to talk here), I'll ask for them. What do you guys do to handle importing .x models for Blender?

white quest
willow estuary
#

Martin, our modeller, owns and uses professional software that allows him to easily use .x files.
I don't think we even use Blender internally.

willow estuary
#

Something expensive? I don't remember.

#

Skynetdesk Pro Licensed?

ancient grail
willow estuary
#

I dunno, I'm sure he'll reply to me eventually stressed

ancient grail
#

but not everything can be set

naive crescent
#

Im curious because I use professional expensive software aswell and it cant read .x files at all

#

If you could find out that would be really appreciated

willow estuary
#

I mean, something has to use it since the format exists and it's not something Martin made from scratch?

red tiger
#

This info is useful to many.

white quest
naive crescent
red tiger
#

The modder in question had Python errors. It could be them installing it wrong but being sure.

willow estuary
#
It is the alin exporter plugin for 3ds max, can't quite remember the website address. It's free but you pay a $100 for a commercial license.
red tiger
#

What version do you use specifically so I can pass that?

willow estuary
#

Huh, thought he was more posh than that.

drifting ore
#

lol

naive crescent
red tiger
#

Blender is finicky with version control.

white quest
naive crescent
#

Ill do some more digging, thanks a bunch.

ancient grail
#

i uise autodesk maya

tame mulch
ancient grail
#

and its not compatible at all

#

so sad

naive crescent
#

I hate blender, Ive tried so many times but cant seem to adapt to it.

red tiger
#

Used Blender since 2.4

#

Oldhat here.

#

Since the days of that big bunny animation.

#

Buck I think was his name.

faint jewel
#

big buck bunny.

#

IS BEST BUNNY

dark wedge
#

Same. Big Buck Bunny was a classic. 😄

naive crescent
faint jewel
#

blender can export .fbx which PZ can use.

tame mulch
dark wedge
#

I currently am stuck using fragMotion to make edits to animations. It sucks so much......
For making your own from scratch, you can use Blender.

faint jewel
#

there are examples pined in the #modeling channel.

red tiger
#

(Runs off and rewrites IO plugins for Blender)

#

BTW I found out that my old PZ IO scripts are in a Blender archive.

naive crescent
red tiger
naive crescent
red tiger
#

Looks like they tried updating them.

#

lol

naive crescent
#

a real Art Vandelay kind of mod

red tiger
#

It's nice to see that the community has since made their own scripts / solutions since mine.

#

I feel like a dinosaur lol.

#

Mine dealt with the oldest format for models in PZ.

dark wedge
naive crescent
#

You spent so much time fighting against it.

red tiger
#

Is something like a new or alternative solution to I/O needed for Blender users here?

dark wedge
red tiger
#

If people ping me about doing it then yeah I can make it a high-priority item to work on.

#

I simply work on what's at the top of my stack of things to do.

tame mulch
white quest
#

Is there a specific reason/error/txt modded items won't show up in-game? or could it be any error & does the debug ItemsList show modded items?

sour island
#

Item list shows all items- if your items aren't showing you may not have activated the mod on the save in particular or there's a typo in the script

red tiger
#

Can someone tell me the version of the .x file format used for PZ?

#

I'm going to write this down.

white quest
#

It's a singleplayer save, would I need to make a new save for the item to be on the list?

#

I've just enabled the mod in main menu

sour island
#

You have to go to the [load save] screen

#

Then select [more]

#

And edit the mods there

red tiger
#

It's possible that I could even debug the default .X import / exporters for Blender.

#

Just need to know the version of .x used and maybe a couple other things.

white quest
sour island
#

Trying to wrap up this update for EHE so I can tackle the community patch

#

Not enough free time with this "needs a job to live" stuff

dark wedge
red tiger
short geode
#

There's a limit to WorldDictionary?

thick karma
#

Did anyone here already know you could make Say text bigger by using curly quotes???

red tiger
#
# header
>>> Note: This is good syntax
#

Also, I wish that we could pass AngelCodeFont as an alternative to UIFont enum. That limits what can already be done in the internal API to Lua users immediately, also through ISUI/UIElement.lua...

#

Big sad.

#

Will be writing a custom font implementation sometime in the near future.

sour island
thick karma
#

Sorry, SayShout* and other Say variants that lack that parameter.

#

I had no idea I could make SayShout text larger through something so easy

#

Feels like witchcraft

#

Who would think to type curly quotes in a programming IDE?

red tiger
#

Let me use my custom font freely darnit! =P

tame mulch
naive crescent
# red tiger

That and a little bit a comic sans would really bring it some life

drifting ore
#

is there any inbuilt way for a recipie to specify any item that is holding water?

red tiger
#

I was doing all kinds of freaky stuff with text drawing.

#

With my UI shader API, text can become way freaky.

thick karma
naive crescent
tame mulch
red tiger
#

Could make text "glitch-out"

#

Oh and also stuff like this:

#

=P

tame mulch
# tame mulch

This code also can draw moodles. I think possible create custom Say with custom font (if do font by images)

red tiger
tame mulch
red tiger
#

Moodles has been a difficult thing to adapt over the years.

red tiger
#

(Is in a candy store for API atm)

#

In my client core mod, I'm also adding drawCircle(angleStart, angleStop) for partial-circle and circle UI components.

#

Rounded edges to windows?

#

🤤

naive crescent
#

Do beveled edges Battle Star Galactica style

tame mulch
#

I think in future UI for game will be A LOT better 😉

red tiger
#

You guys planning to add shaders in like I'm hacking it right now?

tame mulch
#

I can't say details what we want to do

red tiger
#

If shaders and caching render frames for UI elements are both implemented, UI will be epic.

red tiger
#

I think a lot of time is wasted on the CPU and GPU for the current UI API though. Cache those draws as textures. Epic win if done.

#

Static window stuff etc.

tame mulch
#

22 from 335 params done 🥲

red tiger
thick karma
naive crescent
red tiger
#

I remember having to translate the LuaEvents wiki for all 200ish events to PipeWrench-Events plugin.

#

I unfortunately know this pain haha

#

The effort is worth it though Aiteron

#

Remember that people will reference it for many years!

#

@dark wedge What's the current common Blender version people use right now in PZ? (for LTS for things like plugins)

thick karma
autumn garnet
red tiger
#

I wonder if the .x format has the same matrix handedness that Blender has..

autumn garnet
#

Thanks ! i use the mod mirror to take big screen of models

tame mulch
red tiger
naive crescent
autumn garnet
ancient grail
faint jewel
naive crescent
autumn garnet
#

Thanks for the tips Skizot !

naive crescent
#

and because of the unconventional way you install it I can use it in MP servers

faint jewel
#

np 🙂

tame mulch
wheat kraken
#

is it possible to override item scripts via lua? in runtime, or game event?

like add menu option to edit weight capacity of an container

solved: #mod_development message

drifting stump
#

aiteron pretty sure you can say what the plans are at least vaguely

#

in a blog post its already been mentioned theyre moving to a ui middleware

sour island
#

If UI is getting looked at, Please break up functions as much as possible and return multiple things - it would help jumping in for modding

drifting stump
#

no specific one was mentioned but im guessing either gameface or noesis

sour island
#

i.e. after a UI does something return itself, and parts that can't be referenced

dark wedge
# red tiger <@255358282862952449> What's the current common Blender version people use right...

Hey, sorry. Currently am afk so my responses will be a bit delayed.
afaik though, there are no plugins or anything that are used for .x animations and such for Blender that currently work, and so the latest version is just recommended/used. The .blend files that are available making your own from scratch definitely works in the latest version, so no need to use a specific version currently.

drifting stump
#

most likely modding for uis will become xml docs to generate the interface

#

with lua callbacks for logic

red tiger
#

I might pick one and then say I'm writing for that version for a time.

dark wedge
sour island
red tiger
#

If anyone asks, simply point them to this version. =)

dark wedge
red tiger
#

(Initiates roundtable of modelers)

red tiger
#

I used to have blender bumper stickers on my car and a keychain loop.

dark wedge
#

Oh, same. I got one of those shirts when they did the big UI re-factor a few years back. I've gained the "Obese" trait since then, unfortunately, so it no longer fits. hahaa

red tiger
#

They still haven't patched the weight system for IRL's MP server.

#

BTW reminds me of the convo I've had several times of how human models should flex for height, weight and other factors.. to diversify the zed crowd.

#

(Prays that B42 has this feature in secret)

#

One can dream. unhappy

hot patrol
#

I dream of this to

#

I actually just mentioned the idea just now in another chat aPES_LulLaugh

modern dirge
#

any one have experience with setting fog colors?

drifting ore
#

better to just ask the question you want to ask

ancient grail
ancient grail
red tiger
#

mmmm LWJGL keyboard.

ancient grail
#

here

modern dirge
#

i am setting fog colours using setAdminValue for color_new_fog however only the red value is changed ingame not sure if im missing something

modern dirge
#

lol notepad++

ancient grail
#

Theres a dark theme for note++

ancient grail
#

U might not have notice it yet

tame mulch
#

53 from 300+ params done

ancient grail
naive crescent
# modern dirge lol notepad++

Getting back into coding this year I was rocking Notepad++ for a good while until I stopped being lazy and reinstalled VS

#

But that non dark mode notepad++ is gross looking

modern dirge
#

usually vscode is my go to

red tiger
#

VSCode is my choice rn.

#

Used to use Sublime Text because of the dark theme it has by default.

tame mulch
#

5k symbols already in guide (-_-)