#mod_development

1 messages ยท Page 120 of 1

ancient grail
#

this worked btw thnx

barren junco
#

XD

sour island
#

@quasi kernel Idk if I can help or if my mod helped - but I tap into when item is rendered in the inventory and apply changes - there I also add it to a list as a key so it doesn't get reprocessed.

jaunty marten
#

u can create ur own function for safe houses, just copy nonpvpzone from source and implement in lua, there's same logic

ancient grail
#

Ive done both checkers already thnx

sleek hull
#

How do I update a mod I've uploaded to the workshop?
I've tried sending an update twice over the last 14 or so hours and nothing has appeared on the modpage...

bronze yoke
#

unless you're using the x,y,z for something else you can simplify all of that to local sqObj = getPlayer():getSquare()

sleek hull
iron talon
#

Attempting to use the knockout function for a storm mod,

i'm unsure of how to write a timer to force a wakeup

function timer:onFire()
  local player = getPlayer()
  if player and not player:isIndoors() then
    player:knockOut()
  end
end
``` :/ this is all i have so far
#

any one able to point me in the right direction :p

bronze yoke
#

i don't see a knockOut() method

#

isIndoors() doesn't exist either, i'm not sure where you're getting these from?

iron talon
#

for the isIndoors()

#

if i remember correctly its a boolean method that returns true if the player is indoors and false if they are outdoors

#

actually not even sure this works but i swear someone else was using it in another storm mod to can find it here in a min

bronze yoke
#

for an isIndoors() you can just invert player:isOutside()

iron talon
#

o ya i use that too

#

but hmm, ok so is there something you know of that can replace the knockOut() method?

uncut meteor
#

knockOut is it sleeping or actual knockout

bronze yoke
#

i'm not really sure what that's supposed to do

iron talon
#

im just trying to have the effect of the players screen going black essentially, so I guess the sleep function could work

#

method* fml

uncut meteor
#

So if he is outside he goes to sleep?

iron talon
#

correct

#

during this weather event

jaunty marten
#

roflanebalo

uncut meteor
# iron talon during this weather event

i'm not an expert but maybe by getting the current weather and if its what you want make the player sleep check if player is already sleeping return nothing , and try using events as a timer there is one for each minute ingame,ten,Hours,Days. or OnChangeWeather Triggered when the weather is changing.

lusty drift
#

so does anyone have any interest on making the mini portable cassette player like Walkman WM -FX20/41?

shadow bough
#

but its disc

lusty drift
#

yeah

#

im not a modder so im not forcing everyone to get on it but it sure would be nice to have like the last time i ask about ODST armor mod ๐Ÿ˜„

bronze yoke
#

like for true music? they just added a walkman

lusty drift
#

oh they did?

bronze yoke
#

a few weeks ago if i remember

lusty drift
#

lovelyy thank you!~

thick karma
#

Will a custom animation xml that matches a vanilla xml overwrite it?

dark wedge
thick karma
#

Cool

drifting ore
#

Hello... Does anyone know where the metal sheet and bar window barricade health is in the files? I've looked all throughout media/ and can't find

#

I'm trying to buff their health

thick karma
#

@quasi kernel Hey can I DM you?

quasi kernel
#

Oh yeah, go right ahead.

#

Are my DMs closed or somethin? If so, friend me rq

#

@thick karma

thick karma
#

Nah just asking

ancient grail
#

Don wana be friends ei?

thick karma
#

@ancient grail I meant no re. cosmic's DMs being closed. I was just making sure it was not going to be annoying.

ancient grail
#
local vehicle = getPlayer():getVehicle()
vehicle:flipUpright();
vehicle:setAngles(ZombRand(0,6), ZombRand(0,6), ZombRand(0,6))
vehicle:setPhysicsActive(true)
calm depot
#

there are debug UIs for doing that

jaunty marten
#

besides this way needs too much actions

drifting ore
#

lol finally tomorrow when i get up and finish bug testing it will be alive!

dark wedge
#

Alright. I have now created a "cache" for all of the data that I need for the weapon damage and have changed the damage calculations to use this cache. Its soooooo much faster now. I also have changed up how I'm gathering targets. Went to go try it out and....

#

At least I know the damage stuff is actually working.

bronze yoke
#

LOL

drifting ore
#

Looking for a guy, who could do some custom occupations to our server
Once the custom occupation have been chosen, player will get the ability to choose more clothing in character creation menu. We also need to remove all the vanilla occupations

gusty wharf
#

What are the differences between OnCreatePlayer, OnCreateSurvivor and OnCreateLivingCharacter?

hollow shadow
#

Anyone know if its possible to make custom attack animations for modded weapons? I want to make a new heavy attack animations for the sledgehammer type scrap weapons

drifting stump
hollow shadow
#

A custom attack animation that doesnt exist in vanilla

drifting stump
#

That unfortunately i cant tell you its not my area

hollow shadow
#

darn

drifting stump
#

Arent there animation xml files?

hollow shadow
drifting stump
#

Can you paste the content of one in chat

hollow shadow
#

?

drifting stump
#

Im not home so cant look at them myself

hollow shadow
#

hmm im gonna look into the brutal handiwork mod, it seems to add a new unarmed attack

hollow shadow
#

also does anyone know where i can find the new vanilla melee sound files?

acoustic dust
#

is there a specific resolution limit for the poster.png?

#

or can it be any picture?

hot patrol
hollow current
#

is there any way to get real life time?

#

I am trying to make it so that a function is executed as a specific time of the day (irl) daily in a server

tardy wren
#

Say, if I want to call Recipe.GetItemTypes.CanOpener() in my Lua... How can I instantiate a new empty ArrayList to pass to that function?

ancient grail
#

bound to the players facing direction

#

animated tiles

ancient grail
# gusty wharf What are the differences between OnCreatePlayer, OnCreateSurvivor and OnCreateLi...

~~oncreate is the main output function (sometimes the oncreate is used not only to generate item but also to interact with stuff since this is an easy function to setup)

ontest is a bool to show or hide the context, (an example would be if your hand is injured you cant do the function, or if youre taking meds you can check if youre sick)

onperform affects the result(like food you cook goes thru a logic that returns various results such as overcook)~~

#

damn i read that wrong

#

oncreate survicor and livingcharacter are mostly used for NPC functions
onCreatePlayer is well when you create your character

gusty wharf
#

Because my mod has OnCreatePlayer as an event and it for some reason also activates when you load in an existing game with a living character when the player character is technically created now

thick karma
#

Best test ever

tardy wren
#

I still need to create a bunch of ArrayLists...

ancient grail
#

anyone knows how to check if a polayer has a walkietalkie

#

is there a tag?

willow estuary
#

There is no walkie talkie tag, but there is also nothing stopping modders from adding whatever tags they want/need to items.

#

something like THE_SCRIPT_ITEM:getTags():Add("YOUR_NEW_TAG") should work; it's in the new items tag documentation.

#

From almost a year ago? Don't have a link offhand.

tardy wren
#

Would you happen to know if it's possible to make an instance on an ArrayList from Lua?

willow estuary
#

Oh, I'm not a detail guy; I can't answer any technical questions offhand, it's all "beep boop 1010101 sorcery" to my two brain cells; I just do low level handyman shit.

tardy wren
#

Ah, a shae

frank elbow
#

ArrayList.new(), I believe

tardy wren
#

it can't be that simple...

frank elbow
#

You're right, I lied. Your first step is to solve the P versus NP problem ||(this is not serious, the above should work)||

drifting stump
#

it is that simple

#

why do you want it anyway?

tardy wren
drifting stump
#

but why

tardy wren
#

Autopatcher for recipes

drifting stump
#

but if youre trying to get the items you could just call on the script manager

#

and use for example getItemsTag

tardy wren
#

getItemsByType will return the same stuff as Recipe.GetItemTypes?

drifting stump
#
function Recipe.GetItemTypes.CanOpener(scriptItems)
    scriptItems:addAll(getScriptManager():getItemsTag("CanOpener"))
end
#

you could just call

getScriptManager():getItemsTag("CanOpener")
tardy wren
#

Right, you're telling me to reimplement these functions in my code

drifting stump
#

no im telling you to use the exact same functionality those functions use to reduce the number of calls

tardy wren
#

Okay... But for things like SharpKnife, I'll have to do

    scriptItems:addAll(getScriptManager():getItemsTag("SharpKnife"))
    addExistingItemType(scriptItems, "FlintKnife")
    addExistingItemType(scriptItems, "HuntingKnife")
    addExistingItemType(scriptItems, "KitchenKnife")
    addExistingItemType(scriptItems, "Machete")
ancient grail
#

Are you adding eveything on a single table

tardy wren
#

addExistingItemType just check for duplicates

#

No, I will have several tables, this is why I need to make new ones

ancient grail
#

I dont get it but ok

drifting stump
#

i really dont see what youre going for there

ancient grail
#

He wants to colonize the vanilla items

#

Die vanilla!

tardy wren
#

I need to patch modded recipes that were written before the whole tag system was made... Like, if a different mod adds a new welding mask, my mod will fix recipes hardcoded to only the vanilla mask

worldly olive
#

But in that case wouldn't you just need to add the tag to the item and that's it?

tardy wren
#

So first, I'm trying to get the list of items for each of the types

worldly olive
#

The tag will automatically be detected and applied

ancient grail
#

So you want to compare the new list after its nodded with your copied original list

worldly olive
#

YOu only need to add it to the specific item

tardy wren
worldly olive
#

Oooh ok ok, got it now

tardy wren
#

And I'm trying to fix it

drifting stump
#

right

#

why dont you just edit the recipe to call that function

tardy wren
ancient grail
tardy wren
#

...Maybe I should just shove the recipe source into the functions and call it a day

drifting stump
#

doSource("[Recipe.GetItemTypes.SharpKnife]")

worldly olive
#

What I get is that instead of having something like:

keep [Recipe.GetItemTypes.SharpKnife],
keep [Recipe.GetItemTypes.ChopTree],
Log,

The recipes are like:
Keep Axe/HandAxe
Keep HuntingKnife/KitchenKnife
Log

tardy wren
ancient grail
#

Whats doSource?! Wizardy unlocked

drifting stump
#

basically doParam for recipes

worldly olive
#

Magic....

#

Didn't know about it

tardy wren
#

That makes this so simple

ancient grail
#

Hell yez thats mighty useful

tardy wren
#

No caching, just editing the recipe like it;s a frickin file

ancient grail
#

U might want ro add katana btw

tardy wren
zinc pilot
tardy wren
#

I saw some car mods tho

tardy wren
drifting stump
#

ughh try getSource():clear() before

tardy wren
#

No, no, I need to like... Replace only a single... Source Item in there?

#

if I want to set it with DoSource, I'll have to extract the rest of the source first, won't I?

drifting stump
#

you can FindIndexOf then getSource():remove(index)

tardy wren
#

and DoSource adds onto the array of sources?

drifting stump
#

or findSource("ItemType") then getSource():remove(SourceObject)

drifting stump
tardy wren
#

Hmm, from what it seems, DoSource does append to the array

#

So I do need to delete the old faulty line... Which is the trigger source for me, so no worries

acoustic dust
#

hey guys, finally got into making my first mod. want to know if this simple recipe is correctly coded

#
module Store
{
    imports {
        Base
    }

    recipe Craft Money
    {
        SheetPaper2;1,
        
        Result:Money=10,
        CanBeDoneFromFloor:true,
        Time:25.0,
        Category:Shop,
    }
}
vivid linden
#

Okay so i need help with my spawnpoints.lua
what are the names for all the professions? as I am having issues with my revamped mod spawning in other places not the ones in the lua.

tardy wren
red tiger
#

Good morning.

vivid linden
#

that didnt work can someone dm me and see my lua what is going on is weird

frank elbow
#

Probably better luck just posting the relevant bits here

hollow shadow
#

Anyone know where i can find the new sound files for melee weapons?

#

im assuming they are hidden somewhere

#

is it one of these? how do i open these stressed

hot patrol
#

Can anyone help me determine what these errors mean and how I can fix it? I got it when I was adding clothing options to an item I was making. I think it is tied to them having the same display name but from I can tell the hoodie works the same way

spare burrow
#

Here i am again asking about tweaking... sorry XDD Whats the best and safest way to modify vehicle characteristics without an overwrite or vehicletweaker? is there any kind of doparam script type for vehicles? on this style i meanlocal vehicle = scriptManager.instance:getVehicle("Base.Van") if vehicle then vehicle:DoParam("engineLoudness = 80") end

weak sierra
#

u'll get more people to read it

hot patrol
#

good point but I did figure it out

ancient grail
#

You just have to find the actual error

hot patrol
#

How do I make a recipte return you 2 items as the result?

hot patrol
ancient grail
#

OnCreate
Or just add =2 i think

#

Let us see

hot patrol
#

no I want it to be 2 seperate items

#

not the same

ancient grail
#

Then u have to use on create

#

And create a lua file for that

hot patrol
#

Lua is way too foreign for me. I'll leave that alone for now

ancient grail
#
function YourFunctionName(items, result, player)
    local inv = getPlayer():getInventory() 
    inv:AddItem("Base.Crowbar")
    inv:AddItem("Base.Apple")
end
hot patrol
#

I think I might be able to figure that out. thank you. also You had talk,ed to me about this before but how do I have it tranfer condition to the new item?

#

in my case I am taking a weapon and turning it into clothing and then a recipe to undo it

#

and turn it back into a weapon

ancient grail
#

you need to store the specific param to a moddata on the result item
and when you convert back then transfer it back to the thing

hot patrol
#

Can I get an example? PU_PeepoDumb

hot patrol
ancient grail
#

yep

hot patrol
#

client server or shared?

fleet yarrow
#

Howdy, I'm just dipping my toe into the PZ modding scene. I've scanned over the wiki's modding section, but I was wondering if there was a user friendly guide on getting a simple basic mod started to familiarise myself with the debug environment and mod directory structure?

weak sierra
#

i just had the most fucked up workshop upload experience

#

a few days ago i updated a script.. yesterday i uploaded a copy of the mod the script is in, and it worked, the new content was there, and there's an error in the script from a few days ago

#

i go to look at the script

#

and it's an ancient copy from before those updates

spare burrow
weak sierra
#

but it's IN THE FOLDER I JUST UPLOADED FROM

#

but in the workshop copy it's current

#

i may have reverted the script inadvertantly

#

but why did it not upload that..

#

madness

spare burrow
#

workshop momento

fleet yarrow
weak sierra
#

the live copy should have had no syntax error

spare burrow
#

had that happening to me with stellaris on wednesdays/thursdays

weak sierra
#

but been old

spare burrow
#

wost days for updating

weak sierra
#

but it was new copy w/ error

#

that my workshop folder did not have

#

blows my mind

#

cant even trust the upload button now

ancient grail
worldly olive
#

Does somebody knows where to check the annotated maps code? I would like to confirm if they spawn forever or after certain time they stop appearing

hot patrol
# ancient grail server

Gotcha. How do I determine where these things go in the future? I'm sure it's self explanatory but if it isn't copy pasting and making minor tweaks I am genuinely clueless

ancient grail
ancient grail
hot patrol
#

Wait there are threads?

#

Oh damn

ancient grail
#

you will hear various opinions on this subject matter but its just how modders organize the thing

hot patrol
#

They really need to make those more noticeable

hot patrol
ancient grail
#

theads are new to us the option just prettymuch opened less than a month ago

ancient grail
#

from sir fenris guide

media/lua/shared/
Used for lua scripts shared by client and server-side logic. These are the first Lua scripts that get loaded.

media/lua/client/
Used for client-side scripts. UI elements, context menus timed actions and the like. These get loaded after any 'shared' lua scripts.

media/lua/server/
Used for server-side scripts. Item spawning, core farming, weather and other server-side events. These only get loaded when the game is actually started (loading a save, starting a server, etc).```
#

there are more explanation by other modders i just happen to saw this first . we all should read the materials . they are valuable

hot patrol
#

Ahhh, I see.

#

I well really need to dive into these threads later

worldly olive
#

oh, does client loads first than server? ๐Ÿ˜ฎ

hot patrol
#

So I have another question. For my mod I can craft a weapon item into a clothing item and then turn it back. Now I am going to make it so the condition transfers over but here is another issue. Is it possible for that weapon to store patch and blood location data in case I craft the weapon back into a clothing item?

ancient grail
#

if you guys see some guides thats not yet there kindly share and post it

hot patrol
#

Or should I just make the clothing no repairable and dodge the issue all together

#

Blood saving on the texture between the two would be nice but is a lesser concern

ancient grail
viral notch
#

is there in item options something like icon scale?

hot patrol
#

I'm willing to learn and would like to be able to do it but I'm concerned it isn't possible since weapons can't take patches

ancient grail
ancient grail
#

like give it property and do some stuf with it

#

if you look at the lucky plushie mod

#

check the item

#

it has a moddata

viral notch
ancient grail
#

i dont think so

#

but i could be wrong

viral notch
#

do we have here any ui spec?

fleet yarrow
#

Bit of a newb question, what's the best way to debug a mod when you get the little error prompt's in the bottom right?

ancient grail
#

eror maginfier

fleet yarrow
#

Thanks, that a handy tool ti diagnose your own mod dev?

ancient grail
fleet yarrow
#

Sorry, chucks?

ancient grail
#

author

#

name

fleet yarrow
#

Ahh gotcha, yeah, got it up and running, thanks ๐Ÿ™‚

Is there a place within the game directory that I can find the name of the base objects? Trying to figure out why its returning nil on

if not player:hasItemType("Screwdriver") - (assume Screwdriver isn't the right name for a screwdriver obj by that error)

bronze yoke
fleet yarrow
#

I'm not, I did try - but couldn't work out for the life of me how to navigate it/get into a save to debug in runtime. The workshop add-in Glytch3r suggested seemed to give me the error clarification though

bronze yoke
#

i really recommend using debug mode, it gives you a lua console and you can examine memory at the time of an error or a breakpoint and stuff like that

fleet yarrow
#

I'll give it another whirl, is the debug UI meant to permanently stay up, or is it toggleable?

#

oh hang on, it's behaving now

#

Not sure what the first try was all about!

ancient grail
#

so friken stressfull,,no wonder burryaga was pissed about this

#

gg

hot patrol
#

What mod is this going to be for?

fleet yarrow
#

I like that you dont have to exit the game to reload the lua, that's a great modding feature tonnes of other games are lacking

ancient grail
fleet yarrow
#

assume object scripts and such need a reload?

ancient grail
#

or oncreatecharacter stuff like that

#

you would have to restart everytime

fleet yarrow
#

Gotcha

viral notch
ancient grail
drifting ore
#

you have to make sure everything matches and you have to redo model folder and file also

#

but i dont think you can scale up

#

only down

#

i guess it would depend on what it is also, i think icon can scale so much. you will tell if it dont work because it will start to discolor

ancient grail
#

Burryaga might know but not sure if its for icon afaik its draw or something.

fleet yarrow
#

Is there a list of functions somewhere that I can refer to?

drifting ore
#

you just need the icons extracted from the pack to do it is all

viral notch
acoustic dust
#

hey guys

#

i have made a mod, but how do i upload it?

viral notch
acoustic dust
#

which workshop folder

viral notch
viral notch
acoustic dust
#

good question

acoustic dust
viral notch
acoustic dust
#

idk

#

you get roles by being active in the discord

viral notch
#

withone im

acoustic dust
#

you need 3.5k+ messages for specialist if i remember correctly

viral notch
acoustic dust
#

ask them in the main chat

viral notch
#

well then idk

viral notch
#

if look upper

drifting ore
#

honestly does it matter

viral notch
#

yes

drifting ore
#

no it doesn't at all

#

and it's a useless clutter here

viral notch
#

better with blade than with hammer

drifting ore
#

haha

acoustic dust
#

you get xp once a min per message, so if you send 1 message and 10 messages in 1 minute, it will have the same effect

viral notch
#

so you suggest to make 100chars 1msg per min ?

drifting ore
viral notch
#

nah that was just questioned from start how the roles works and how to have more than one of them

drifting ore
viral notch
drifting ore
#

good stuff man

viral notch
#

so blair is writing an story...

#

maybe some tutorial how to scale icons on ground

#

with that what you said can be problem due there is none model for that (ground one) so game put force not scaled icon on ground as replace of model

so in game you got 32x32 icon on ground (and that i want to resize like to make it smaller without making separated model)

acoustic dust
#

my preview is a png but when i try to upload the mod it says the preview pic format is unreadable

faint jewel
#

post it here

acoustic dust
faint jewel
#

there ya go.

#

opened and resaved.

#

try that

acoustic dust
#

ok

zinc pilot
faint jewel
#

okay try THAT one

#

also, image sizes work best when in powers of 2

#

632 is not. lol

#

512 is the closest so that's what i made it.

ancient grail
acoustic dust
#

oh COME ON

faint jewel
#

OH FFS

acoustic dust
#

i had less trouble modding fallout

faint jewel
#

there 256

acoustic dust
#

let's hope for the best

#

alr

#

it's uploaded

#

now time to find it in the workshop

#

wait what

#

oh my GOD

faint jewel
#

it takes a few minutes.

#

'has to be checked

acoustic dust
#

oh ok

#

makes sense

faint jewel
#

they just make sure it's not something SUPER offensive.

cunning canyon
#

Anyway to make my debug scenario appear first in the list of debug scenarios? Also any existing way to quickly reload a scenario from within game, so I don't have to go back to the main menu and click it again?

#

yes scrolling is too much work

red tiger
#

So writing a proper lexer for ZedScript allows me to also conveniently provide a linter for ZedScript. Yay.

#

I could provide info for lexical errors as such:

LexicalError: /media/scripts/a_script.txt:53:4 Unexpected '}'
#

Something like this would allow modders to quickly check their scripts for syntax errors.

acoustic dust
#

it's been like 20 mins, i still can't share my mod? wtf

drifting ore
acoustic dust
#

how do i check

drifting ore
#

upload again

acoustic dust
#

fair enough

drifting ore
#

if it didnt work before it most likey wont again

#

it will be sneaky also

#

will act like it was good and seem like it, but will end with an error code instead of saying complete

acoustic dust
#

hmm ok

#

so it's good right?

drifting ore
#

yea i'd think so for sure

acoustic dust
#

GODDAMMIT

#

welp, imma try tommorow

drifting ore
#

not sure. thats weird

acoustic dust
#

don't got the mental capacity for that

fast galleon
#

is it set to private?

drifting ore
#

if thats it... LOL

royal rose
#

This may be a stupid question, but assuming that i have a IsoDoor object, how do i open it?

fast galleon
#

sorry I just keep getting same questions on steam every day, even though it's all there in description

viral notch
faint jewel
#

or an existing one?

wheat kraken
#

can controllers users use combobox?

what are most accessible menu ui elements for controllers?

fast galleon
#

hm, should walking on nails be dangerous

#

or some of the regular items block movement

red tiger
#

Or falling

modern hamlet
#

When I create a new perk, it is different from the exp levels I set, and when I add exp, it is not added as much as the whole number I added, I wonder why?

bronze yoke
#

all xp gain is quartered for characters with no starting skill, and level boundaries are 1.5x

modern hamlet
#

ohh okay thank you

thick karma
vague raven
#

Anyone have any idea why uniquerecipe's might not be working?

    uniquerecipe TEST
    {
        BaseRecipeItem:Base.PiePrep,
        Item:farming.Strewberrie,
        Item:farming.Strewberrie,
        Item:Base.CannedMilkOpen,
        Item:Base.CannedMilkOpen,
        
        Hapiness:30,
        Boredom:30,
    }

This is my code but when I test it in game I just get https://i.imgur.com/6KUizXK.png

#

I've based my code off of the base game's example in uniquerecipes.txt

fast galleon
drifting ore
vague raven
#

yes

bronze yoke
#

that is actually the game's spelling ๐Ÿ˜…

drifting ore
#

haha aight

#

i wondered

vague raven
#

it hurt my soul to learn that the id was actually that

drifting ore
#

LOL

#

i knew i should have counted on that being the case LOL

red tiger
#

I know from personal experience.

vague raven
#

I tried again with BaseRecipeItem being Base.PieWholeRawSweet which is the item ID of the pie preparation when it's turned into a sweet pie but still no luck.

bronze yoke
#

i'm not sure if this is the issue here, but i actually remember someone's item was being refused because the name was something like test

fast galleon
vague raven
#

?

fast galleon
#

you got like 4/11 lines right

vague raven
#

Care to elaborate?

fast galleon
#
evolvedrecipe Sandwich
 {
  BaseItem:BreadSlices,
  MaxItems:4,
  ResultItem:Sandwich,    
  Name:Make Sandwich,
 }
bronze yoke
#

this isn't an evolvedrecipe

#

it's a uniquerecipe

vague raven
#

bruh

fast galleon
#

yeah I am half sleeping

#

and watching movies

#

sorry as always

red tiger
#

Don't worry.

#

I'm buzzed AF and planning to code a freaking lexer.

drifting ore
#

lol

red tiger
#

Actually drinking

#

My sorry body can code best when buzzed tho.

#

ยฏ_(ใƒ„)_/ยฏ

#
export abstract class Lexer {
    abstract onNext(data: LexerData): void;
}

export type LexerCursor = {
    row: number;
    column: number;
};

export type LexerData = {
    
    /** All tokens generated are stored here. */
    tokens: LexerToken[];
    token: LexerToken;

    start: LexerCursor;
    current: LexerCursor;
};

export type LexerToken = {
    loc: { start: LexerCursor; stop: LexerCursor };
    value: string;
};
drifting ore
#

i did check to see if game spells it that way and i dont see it

red tiger
#

Bored. Going to stream it why tf not

bronze yoke
#

it does for unique recipes

drifting ore
#

lol wtf

vague raven
#

lmao

drifting ore
#

jesus fuck someone needs to learn to spell. imagine trying to troubleshoot somethign with shit spelling

bronze yoke
#

a lot of the developers aren't native english speakers

drifting ore
#

i guess im not familiar how coding works with non native english speakers

#

is everything always in english only?

vague raven
#

I'd assume so?

fast galleon
#

the syntax for that threw me off from the start

drifting ore
vague raven
#

I didn't really pay attention to the spelling because I just Ctrl+C and Ctrl+V.

#

Not sure what I did but now the base game code isn't working

#

can't make a 'This Cake is a Lie' cake for some reason now

bronze yoke
vague raven
#

Tried that and it didn't work.

#

One of the first things I tried actually ๐Ÿ˜…

fast galleon
#

shouldn't the base for this be a pie instead? ~ sleepy guy

vague raven
#

I've tried with Base.PiePrep and Base.PieWholeRawSweet. None seem to work.

bronze yoke
#

don't include module in BaseRecipeItem

#

BaseRecipeItem:PieWholeRawSweet,

#

the check for if a uniquerecipe applies doesn't account for module at all and including it will cause it to always fail

#

it compares PieWholeRawSweet and Base.PieWholeRawSweet, and obviously they aren't the same, so it doesn't work

vague raven
#

oh my god

#

I want to die

#

If that works I just can't even anymore

bronze yoke
#

i didn't test it on your exact recipe so i can't say if that's the only problem, but it is definitely one thing stopping it from working

vague raven
#

Ok well It didn't work but that could be related to the base game unique recipes not working either.

vague raven
#

It would seem using module Base doesn't work so I'm gonna try my own module.

#

what i currently have


{    
    uniquerecipe Epic Strawberry Pie
    {
        BaseRecipeItem:PieWholeRawSweet,
        Item:farming.Strewberrie,
        Item:farming.Strewberrie,
        Item:Base.CannedMilkOpen,
        Item:Base.CannedMilkOpen,
        
        Hapiness:30,
        Boredom:30,
    }
}``` seems to break the vanilla uniquerecipes
#

wait the fuck

#

I break vanilla but my stuff works?

fast galleon
#

is the file named the same?

vague raven
#

damn u right

#

it is

#

didn't think about that

#

It was originally different but i made it the same when I was trying to fix it

#

I have been up very log long like you and I'm just butchering everything

modern hamlet
#

Is there an easy way to remove some experience from a skill and prevent it from going negative values, or should I set it back to 0 and then add the new desired total experience?

#

Or if you have a suggestion for a mod that makes us lose some skill points over time, I can review it.

vague raven
#

Thank you @bronze yoke. That worked. Oddly though, you must have module Base and you can't have a different module that imports Base not sure if I just lack an understanding of how all this works or It's just a weird quirk.

bronze yoke
#

i didn't check the code for anything like that, but it wouldn't shock me

#

most of the newer features don't support modules other than base correctly

vague raven
#

damn that's weird, hope it's not the same for build 42 or my 5000 lines of recipe code is totally screwed.

drifting ore
#

hello if you read this and know what you're doing in regard to PZ modding please respond to this message

bronze yoke
#

what's up?

drifting ore
#

do you know where the metal barricade (metal sheet and metal bar) health amounts are in the files?

#

Ive looked everywhere and can't find them

red tiger
#

In progress writing Lexer for ZedScript. So far so good.

viral notch
#

hey how to add

#

icon for ItemSpawner ?

bronze yoke
#

do you mean debug item spawner?

#

it's just programmed wrong, modded icons will never show up in there

modern hamlet
#
-- remove some xp from total
                    local totalXP = playerXP:getXP(Perks.Religion) - randomExpAmount
                    
                    -- get a value between min-max limits of the perk, 0 and 1500, 
                    totalXP = math.max(math.min(totalXP, 1500), 0)
    
                    -- reset perk's level to 0 and clear all exp from it
                    player:level0(Perks.Religion)
                    playerXP:setXPToLevel(Perks.Religion, 0)
                    
                    -- add new calculated xp to perk
                    playerXP:AddXP(Perks.Religion, (totalXP * 4))

Is there a better way than this one to remove some exp from a skill because it plays level up sound and shows +1 for the skill ๐Ÿ˜›

red tiger
#

I just wrote a basic lexer for ZedScript that is 90 lines long.

#

Wow.

#

A clean lexer implementation \o/

jaunty marten
red tiger
#

Added locational option.

jaunty marten
# modern hamlet ```lua -- remove some xp from total local totalXP = playerXP...
local character = getPlayer()
local perk = Perks.Religion
local perk_level = character:getPerkLevel(perk)
local exp_obj = character:getXp()
local total_perk_exp = exp_obj:getXP(perk)

local exp_sub = 1000

if exp_sub > total_exp - perk:getTotalXpForLevel(perk_level) then

    character:LoseLevel(perk)

end

exp_obj:AddXP(perk, -exp_sub)
modern hamlet
jaunty marten
mint jolt
#

Hello everyone ๐Ÿ˜„ Can some awesome people help me? I created this tile, and managed to get it running in-game, what I want to know now is:

  1. How can I make it a recipe so people can craft it?
  2. How can I create menus so people can interact with it when pressing right click, via context menu or radial menu?
    I'd appreciate it a lot!
modern hamlet
rare vortex
#

Do you have to rig armor after you make it in blender? Are there tutorials for how to make them work on the characters and implement it into the game?

jaunty marten
# rare vortex Do you have to rig armor after you make it in blender? Are there tutorials for ...
quasi geode
rain iron
#

How much performance/overhead does EveryOneMinute have on the game

drifting ore
#

obviously that would depend on what you are doing with it ๐Ÿ˜„

#

i use it for testing all the time for random things and it's not noticeable. it's def not as bad as loadgridsquare

#

even though that is still comparing apples to oranges i suppose ahaha

bronze yoke
#

i wouldn't worry about it much; if you get bad lag from EveryOneMinute it's probably not the event that's the problem

jaunty marten
#

depends on what are u doing in this event

#

by itself it do nothing

acoustic dust
#

welp, i deleted my mod from the workshop so i can upload it again, then this happend

bronze yoke
#

remove workshop id from your workshop.txt

#

it's trying to update your deleted item

acoustic dust
#

ok

#

sorry, wrong pic

#

i think it's fixed now

#

how do i set it to public

true vault
acoustic dust
true vault
#

Welp, not sure then.. Never ran across that issue before

bronze yoke
acoustic dust
#

welp, doesn't matter anyways, the mod is broken

true vault
#

Could just set it in the mod.info workshop.txt file to public.. though if the workshop doesn't give you the option, it may ignore that

bronze yoke
#

you're thinking of the workshop.txt

true vault
#

Yes, that lolz

red tiger
#

I'll need to follow the same rules for how to tokenize ZedScript.

rancid panther
#

bitten trait has gotten some fans already

pulsar heath
#

i guess mine is popular in servers

#

since the numbers make no sense...

#

almost 3x more subs than visitors

faint jewel
#

I got one that's gonna be pretty easy if i can get the time crap to read right.

pulsar heath
#

and @red tiger i followed your advice and added a way to pass lua code to my mod from the app

#

kinda buggy still

#

but it works... 80% of the time ๐Ÿ˜„

#

probably something wrong when deserializing the json on the lua side

rancid panther
#

tell me what % of players would intentionally install a trait that makes you start the game bitten

#

it's a dumb mod ofc most ppl wouldnt actually use it

#

the fact that anyone is using it at all is enough to make me proud

wooden lodge
#

Hi there, does anyone know how I can get rid of all vanilla recipes? Trying to make a medieval overhaul mod and need to get rid of all the vanilla recipes

ancient grail
ancient grail
ancient grail
rancid panther
ancient grail
#

doSource()

#

i think

#

iirc

rancid panther
#

and it's also a standalone mod for 1 trait which is part of the unreleased mod with many added occupations and traits in it

#

but i still made it for fun

zinc pilot
#

is there an already implemented method to generate an id for an object?

#

found one made by Aiteron

thick karma
#

Congrats

#

Your mod is a niche modโ€”most people don't want to begin the game bitten. Subscription rate means nothing on a mod like that.

zinc pilot
#

if it's fun to make who cares

sour island
#

IsoObjects getID() should already be unique and technically save

zinc pilot
sour island
#

Otherwise you can generate one using an exposed method (I think it's getUUID())

zinc pilot
#

or is that just to get the ID from an already existing object?

sour island
#

I forget what static means in Java - but if you mean if it saves I believe so - at least for inventory items I tested it on

thick karma
#

Static means that you do not instantiate it

#

A static thing is accessed the way it's made, e.g., a Math class would commonly be static, because you don't need to create an object to perform many mathematical operations.

sour island
#

Also, I made this mod last summer

#

Honestly curious who uses it

#

It's "no healing"

thick karma
#

Oh damn

neon bronze
sour island
#

Makes it so injuries simply never get better - bleeding can be stopped while bandaged, that's it

#

All it does is grab the highest value the injury timers were, and reapplies it.

#

I might have to rename it to "No Healing Challenge" or something

thick karma
#

That sounds like a good name

ancient grail
#

No healing? Ah

sour island
#

Yeah

ancient grail
#

you get shot you die

sour island
#

It's more brutal than that, if you trip or get scratched it just stays there forever

#

You can bandage it to cover it but then you have to keep changing them out

#

Also your health never goes back up

#

๐Ÿ˜…

vague raven
#

Anyone know if there's a file I can view that dictates how the scripts work? Trying to figure out everything I can do with uniquerecipes.

ancient grail
#

Ow man thats intense

#

I have no idea what that is

vague raven
#

Basically if you put certain items together it'll give bonus's and change the name

ancient grail
#

Its like fixer

#

?

vague raven
#

I don't think so.

sour nova
#

The '/' between metalbar and metalpipe means you can use either of them to make the recipe.

#

Separate every necessary item with a new line

young edge
#

Is there any lower level info out there on vehicle stats? Such as how the gear ratios are calculated (since there's no final drive), what units the values are, so forth.

#

I'm wondering to some extent how the game engine would cope with using more realistic values for engine force, gear ratios and mass. I assume the suspension and wheel friction would also need touching as a result of it.
But I have not found any info on what the values are based on, what units they are, how exactly they influence the game (it may not act the same way as irl)

sour nova
young edge
#

I haven't yet. Will do in just a second

#

Hmm. Those are the functions and structure, but not the actual values themselves

sour nova
#

maybe you want this class? and the classes it extends?

red tiger
#

@quasi geode Have you tested your parser against all item categories?

#

I decided to revisit my tokenizer because of how different recipes is (And also how horrible my code was for that)

vague raven
sour nova
red tiger
vague raven
#

My only problem is that unique recipes doesn't work with spices.

#

It doesn't register it under Item because it's not under 'Contains:` in game.

quasi geode
red tiger
#

I wrote in location data for a future linter.

#

I don't know how exactly the format can be in terms of bracing vs spacing requirements etc.

#

So that'll need to be known for a linter to be made and be consistent with the language specifications.

#

=/

#

All my current lexer does is detect words as tokens, terminating on either spaces or \n.

quasi geode
#

this doesnt really do anything with the results atm except load them into python objects. but then, options lol. its valid reading key / value types from json templates so does some data type conversion from str and error checking

thick karma
#

Does the game have a way of cleaning up panels that are invisible, no longer on the manager, and no longer assigned to any Lua variables? If not, what is a good way to fundamentally destroy an ISPanelJoypad in both Lua and Java when I'm done with it?

red tiger
#

I'll need to know things like if in recipe, Stick=1;.. can be Stick = 1 ; ..

#

or module Base{ instead of ```module Base
{
..

quasi geode
#

ya, thats why i just ported the java code pretty much exactly. save the hassle of potential parsing inconsistencies

thick karma
#

No biggie... I don't think these panels could ever realistically cause a memory issue by nature but you never know... I figure you would have to open a whooooole lot of them, since they seem fairly data-light

red tiger
#

A lot of the work in my current design is early detection of data types for assignments and hard-coding those types into objects that has all the pre-defined properties as fields.

quasi geode
#

i cheated. had it parse, any new key/value pair a block it would write the key and its value into a json file. the json went through 4 basic regex's so its "weight": "float", etc

red tiger
#

It's not cheating. You're doing what the Java code does like you said.

quasi geode
#

see thats exactly how mine was before, all hardcoded

red tiger
#

The reason I hard-code it is because it's literally the rules in the language for these reserved properties.

#

It also helps someone who may use the API.

#

It's only what, 600ish properties?

#

Just a little bit of arthritis medication and some typing and then it'll be done until updates to the language are made.

#

Also, what's the situation with this scripting language's name? Will it be ok to keep using "ZedScript" as a placeholder? I plan to publish my work to npmjs when it's ready.

#

Thanks for getting back to me so soon and providing your Python example.

quasi geode
#

I dont know if it has a actual name

red tiger
#

When speaking with Aiteron about this, we agreed on a placeholder name "ZedScript" until another name is made official. (Or that one is)

quasi geode
#

personally I like it. any json variation could be labelled UnZedScript ๐Ÿ˜…

red tiger
#

Yeah. My only concern is publishing under a name that is then incorrect if another name takes its place.

red tiger
quasi geode
#

ya no idea there. I'm officially clueless on that one

drifting stump
#

i vote ZedScript

red tiger
#

All good. I'm cautious, not expecting. <3

drifting stump
#

good name for it

quasi geode
#

naw the parser doesnt define between item types really, not until its actually spawning instances of InventoryItem

red tiger
#

I will use my ZedScript solution to then write my visual application for managing scripts.

drifting stump
quasi geode
#

but ya, that was the old variant for items. simplified it now dont need it all hardcoded and complex

#

much easier to work with XD

distant ivy
#

Hello to all
i'm creating a custom profession using the profession framework
i want to add to inventory a piece of paper with a custom text on it, i tried different approach but nothing appear to work, i can have in inventory the piece of paper / notebook but not able to set a custom text in it, any idea?

thick karma
#

I understand if no variables reference data, Java collects garbage, but I wasn't sure how the game stored references to my Lua tables in Java

#

Esp half-java stuff like panels

red tiger
thick karma
#

That include UIElement inits and such

red tiger
#

If you don't need to know all of that for what you do then your parser works.

quasi geode
#

ya the hardcoded variant was for parsing scripts and executing the good chunks of the lua in python (up to the main menu, and all the code i needed to error check and test ORGM)
now i just need a basic parser without all the lua compat so doesnt need to be complex

red tiger
#

Huh.. That sounds like a complex project.

#

Hahah I'm saying this while writing a 1:1 transpiler for Lua to Typescript.

#

I almost want to think that you've tried Jython at some point.

quasi geode
#

not as much as you think. lol. it was pretty hacked together. lots of duct tape. the lua / python was seemless though, lupa library

red tiger
#

oooh a library I don't know.

quasi geode
#

I havent messed with Jython. and Lupa is awesome

red tiger
#

I paused my transpiler because I felt that what I'm doing with the scripts right now is a more immediate help to modders than upgrading PipeWrench.

#

Most of the questions I see in here are people who are lost in the technicalities of scripting. =/

#

Let me know if this parser needs something to support another project or help out with some other tool. =)

quasi geode
#

not sure where its going yet. currently directing it towards bug hunting lol

red tiger
#

If I could suggest one thing for the b42 schema for ZedScript, use null instead of empty strings with commas.

#

or nil to familiarize with Lua.

#

I believe I saw some of that empty string with commas when defining sounds.

quasi geode
#

hrm ya i spotted some yesterday too

red tiger
#

There's a def without a , before a } and a ,, that I interpreted originally as a syntax error.

#

Replacing ,, with , fixed it for my parser.

#

Explicit nils or unsets would help show what's going on to readers.

#

For non-programmers, none might be good.

quasi geode
#

, isnt needed before } If i'm remebering right (sorry its been a few years since i really looked at all this) files arent split by newlines at all (they get stripped), key value pairs are inside any block are split by , which is why the last entry in a block before } doesnt need it.
,, just feeds it a extra blank key/value, which doesnt conform so it gets tossed

#

i really should double check though, as i said its been a while since i really looked and my memory is crap.

red tiger
#

I can write in a check to handle those situations.

young edge
hollow shadow
#

currently theres no way to import existing animations into blender right?

thick karma
#

No but you can import and export using fragMOTION if you're desperate. @hollow shadow

thick karma
#

Lmao

#

I think honestly rebuilding the neutral state in Blender and working from there using the IK Template is easiest

#

And obviously that's a headache

#

But it's better than frag...

red tiger
#

I might need to move the priority up for my planned attempt to fix the importer for blender. =/

thick karma
#

Ummm is getModData not a global?

#

I saw it in GlobalObject but it's not working from the debug console

thick karma
jaunty marten
thick karma
#

Mmmmmmm ty

cunning canyon
#

I actually had the some exact question, so to clarify, it's global? so I shouldn't get the mod data of a player and assume that it will be a different object for each player?

thick karma
cunning canyon
#

got it

#

I think i was using a global one earlier by using the time object or something silly, glad to know there is a less hacky way to do it

red tiger
cunning canyon
#

actually while i'm here. is the IsoPlayer unique to each account on a server or unique to a character?

cunning canyon
#

Does that mean each time you connect you get a new IsoPlayer?

cunning canyon
#

I may start adding some of these answers to the wiki lmao, so i hope you don't mind the clarifying question

#

I guess, is there some unique identifier on the IsoPlayer that is shared accross play sessions

red tiger
#

There should be a transient ID. Probably username

cunning canyon
#

got it thanks

thick karma
#

Do I need ModData.transmit("ModDataModule") at the end?

red tiger
#

Username is unique to the account logged in

jaunty marten
jaunty marten
red tiger
#

You use the username which is unique in the SQLite db file.

jaunty marten
#

idk how pirate version is working PB_peepo_shrug

small topaz
#

Hi! Do you also want to make it so that your character has a start weapon attached as in the mod you mentioned as an example? Or do you just want to put the item in the player's inventory? (the later is easier than the former)

red tiger
#

You don't have to break non-steam compatibility to simply identify user accounts. =/

gleaming storm
#

How do i make a trait unremovable from a profession?

fleet yarrow
#

Evening. I've been following the comprehensive step by step on getting a model from Blender to the game, but I'm just curious before I begin, is there a way of ensuring you've got a relatively close scale before going ahead? Can we import existing models to base scale on?

jaunty marten
fleet yarrow
#

Ah, whoops - thanks! My bad

jaunty marten
#

np spiffo

cunning canyon
#

basic Lua API question since I'm working on the wiki. Basically all interactions with Lua API objects (like IsoPlayer) will be through function calls yeah? I can't remember if I ever get or set fields from those objects or not.

small topaz
# gleaming storm How do i make a trait unremovable from a profession?

This is done by the code profession:addFreeTrait("yourTraitHere"). In order to achieve this without buggy behavior, it is the best idea if you first make a new version of the trait you want to assign (a "fake version" of it). Then, when game starts, remove the fake version and exchange it with the actual trait.

small topaz
#

and you still need to add profession:addFreeTrait("FakeOutdoorsman") to your profession ofc....

steep cloak
#

Heya @cunning canyon (Apologies for the ping) - also, hello everyone else o/

Could I DM you regarding an inquiry about Save our Station?
It's a bit of an odd one, so it's probably better suited for DM (and also to not bury other conversations)

cunning canyon
#

go for it

fleet yarrow
#

I've created a simple clone of the wardrobe as a tester object whilst I experiment with modding, just wondering how I can spawn it in via the debug menu?

ancient grail
#

which one is better?
an autoban function for server specific mods
so that we dont worry about forgeting to ban whenever we wipe

Events.OnGameStart.Add(function()
    if (getCore():getDebug() or isAdmin()) then 
            SendCommandToServer("/banid \"" .. 7656119946686483 .. "\"");
            SendCommandToServer("/banid \"" .. 76561198103847778 .. "\"");
            SendCommandToServer("/banid \"" .. 76561198373590963 .. "\"");
            SendCommandToServer("/banid \"" .. 76561199466864843 .. "\"");
            SendCommandToServer("/banid \"" .. 76561199257636303  .. "\"");
    end 
end) 

or


Events.OnServerStarted.Add(function()
    if (getCore():getDebug() or isAdmin()) then 
            SendCommandToServer("/banid \"" .. 7656119946686483 .. "\"");
            SendCommandToServer("/banid \"" .. 76561198103847778 .. "\"");
            SendCommandToServer("/banid \"" .. 76561198373590963 .. "\"");
            SendCommandToServer("/banid \"" .. 76561199466864843 .. "\"");
            SendCommandToServer("/banid \"" .. 76561199257636303  .. "\"");
    end 
end) 

#

and it should go to server right?

#

woops no

#

client

ancient grail
#

use the tile picker

#

brush tool

ancient grail
fleet yarrow
#

It's a custom model item using the container type

ancient grail
#

its a clothing

#

so you need xml files

jaunty marten
fleet yarrow
#

I literally copied the wardrobe object script and changed a few parameters assuming that would do the job?

ancient grail
#

i dunno that works

#

where

ancient grail
#

is that vanilla

fleet yarrow
#

Aye, standard wardrobe. I see it in the items list now, think I borked the script for the file somehow. The object's got a missing symbol over it though, so I assume it's missing a texture or something

jaunty marten
ancient grail
#

welp if this works then i dont need to refactor for just something that isnt really special

#

hey vishnya you know abt this wordrobe thing his talking about

#

wooops his gone

small topaz
gleaming storm
#
local vanilla_DoTraits = BaseGameCharacterDetails.DoTraits
function BaseGameCharacterDetails.DoTraits(...)
         vanilla_DoTraits(...)

         TraitFactory.addTrait("FakeAdrenalineJunkie", getText("UI_trait_adrenalinejunkie"), 0, getText("UI_trait_adrenalinejunkiedesc"), true)
         TraitFactory.setMutualExclusive("FakeAdrenalineJunkie", "AdrenalineJunkie")
end


function SwapTraits(player)         
        if player:HasTrait("FakeAdrenalineJunkie") then
             player:getTraits():remove("FakeAdrenalineJunkie")
             player:getTraits():add("AdrenalineJunkie")
        end                           
end


Events.OnNewGame.Add(SwapTraits)

local pilot = ProfessionFactory.addProfession("pilot", getText("UI_prof_pilot"), "profession_pilot2", -6);
pilot:addFreeTrait("FakeAdrenalineJunkie");
pilot:addXPBoost(Perks.Fitness, 2)
pilot:addXPBoost(Perks.Sprinting, 3)
pilot:addXPBoost(Perks.Aiming, 2)
pilot:addXPBoost(Perks.Nimble, 2)```
is this how it should look?
fleet yarrow
#

Oh boy, I must be an idiot. I've just realised that furniture objects in the game are sprites; it's only world items like weapons, clothes and the likes that are models ๐Ÿคฆ

rancid panther
#

in the next update they will look 3d, but they said they will still remain as 2d tiles

fleet yarrow
#

Ah that's good to know, thanks

drifting ore
#

ah yes texture mapping. looking forward to it

fleet yarrow
#

I don't suppose there's any handy links or tutorials on custom sprite creation is there? I can't find anything to do with it, nor texturepacks. Essentially I'd like to reverse engineer a piece of furniture like that Jukebox. I've figured out how to create the object, and can that I need to reference a sprite, but beyond that, I'm stumped

red tiger
#

Wish I had time today to work on my parser. =(

jaunty marten
# fleet yarrow I don't suppose there's any handy links or tutorials on custom sprite creation i...
jaunty marten
#

u can check more guides here
https://rentry.co/BluesModClues

jaunty marten
fleet yarrow
#

Oh those links are very handy!

fast galleon
ancient grail
red tiger
#

Someone should mod Fallout Shelter to be PZ.

#

I'd play and spend money on that thing.

thick karma
#

So today I discovered that a whole bunch of people are now being taught the terms upper camel case and lower camel case instead of PascalCase and camelCase... Does anyone have any sources on when this began? Is this just differences in international convention or new programmers using words in a sloppy way or what?

red tiger
#

I'm over here working on lexical analysis and these guys are like "Plus the strings!"

thick karma
red tiger
#

PascalCase is not camelCase so it's even more strange to hear it like this.

thick karma
#

Oh. I mean did anyone talk that way 20 years ago? It seems like a terrible move if it's a new development given that it makes "camel case" a worthless phrase by itself and makes me have to use more words to convey the same idea, but I am obviously a wookiee so don't mind me

red tiger
thick karma
#

I am seeing MULTIPLE articles online trying to convince people that it's fine to call ThisVariable camel case and I am just sitting here like how in the what in the why.

red tiger
thick karma
#

Dude it's becoming pervasive. I saw it adopted as the convention for some in development app as well

#

I mean not one I would use but still

#

I just started looking and I'm finding it everywhere. I feel like I'm taking crazy pills.

thick karma
red tiger
#

I'd correct people. If they get mad, I'll ask them to reflect on what's more important to them and how saying this can hurt others who may be going through education.

thick karma
#

Bro okay ignore the dev if you want but the dark background is from Python's PEP8 documentation.

#

At that level there is nothing to correct, they're choosing this convention consciously

red tiger
#

xD

#

snake_case

#

PascalCase camelCase

thick karma
#

In Python it almost makes sense (ignoring historical convention) because it's snake_case or CamelCase and they don't recommend camelCase for anything

red tiger
#

If that's the case with the dev, they're still wrong at the end of the day.

thick karma
#

Ultimately word meanings are just convention. If the entire planet agrees that camel case is now a category of cases instead of a specific case, it becomes so for all practical purposes

#

But I am trying to nail down when this happened

red tiger
#

I only just found this out thanks to you posting it.

frank elbow
#

No idea when it happened, but I've definitely heard all of those terms for a long while

thick karma
#

Hearing the terms is not the confusion here, Omar

frank elbow
#

I'm referring to your original message

red tiger
#

I think it's silly to willfully lie to people until it becomes practiced and agreed truth. This is engineering.

thick karma
#

Okay got it

thick karma
red tiger
thick karma
#

If someone genuinely believes that camel case appropriately describes a word with a "hump" in front, it may be silly, but it's also not lying.

#

And if a whole society believes it, it's language

#

Language is often silly

red tiger
#

It tells me that whoever is saying it doesn't know what they're talking about.

molten raft
#

does anyone know some Event for when an item it's placed down but it's not a tile type?

red tiger
frank elbow
#

If it makes you feel any better, the clearer terms are winning (but this suggests the upper & lower terms have been around for some time)

thick karma
#

I mean, yes, we use the same sounds for utterly different things and we use a range of conventions and spellings that conflict with one another because ultimately we spell on the basis of favored historical spellings (not all mind you, and not local to any particular point in time)

#

So yes language is often silly, definitions are often silly

#

But they persist nevertheless

thick karma
#

Thanks for that Omar you actually blew my mind I didn't think to do that

#

I just naively searched for some etymological research on this

#

I am a bit obsessive about etymology...

frank elbow
#

Unfortunately that data is def limited, I expected to see usage (of the more popular terms) further back

thick karma
#

Probably because I took 5 years of Latin when I was a younger lad and got carried away

thick karma
#

Still revealing

#

I can't believe those term have been around 23 years minimum

#

How absurd.

red tiger
#

I'm going to say this and close this conversation. I'm looking at it from an engineering perspective, not a linguistics perspective.

thick karma
#

For sure, I hear you, and I agree that it's an inferior distinction in the sense that it wastes development time.

#

I don't love it, I just tend to be flexible and let people talk how they talk

#

Language is total chaos... History + convention = wtf is even going on.

#

I actually DID "correct" someone earlier before investigating and stumbling down this rabbit hole

late hound
#

oh my god who cares

#

Camelcase verse snakecase, its really not worth arguing about, just improve your code readability and annotate your work to help yourself and any other possible contributors.

wooden lodge
#

Could someone please tell me how it's possible to make all zombies spawn naked? DM me because I will most likely miss a response here. Thank you so much in advance, you'd be a huge help.

humble oriole
#

is there a way to disable recipes if a mod is loaded that isn't just setting them hidden?

thick karma
thick karma
#

lol I had, you replied so I replied to you.

rare vortex
#

im trying to import the character model to blender for reference, where is Male_Body_Redo.fbx found?

rare vortex
#

thx man

frank elbow
#

Fwiw I thought the topic was interesting. The linguistic perspective basically boils down to prescriptivism vs descriptivism. I tend to agree that it doesn't really matter, though, as long as there's consistency within a project

rare vortex
#

any tips on opening an fbx in blender? Do I need to download something first?

frank elbow
#

I haven't used Blender, but a quick search suggests File > Import > FBX should do the trick

rare vortex
#

tried that, maybe the files closed or something, still looking it up

drifting ore
#

fbx works in blender not sure if there is a bad version for it. hate that about blender

#

love it but all the versioning craperino

drifting stump
#

reading the chat i reach only one conclusion

drifting stump
#

python so disregard everything

rare vortex
#

itf thats it im going to laugh but im reinstalling blender right now

#

plus it was having trouble finding it in the import method, and wouldnt find it when opening a new file

#

was starting to wonder if I needed to download Autodesk or something

late hound
rare vortex
#

idk, just reading up on it and coming into terms I dont understand

drifting stump
rare vortex
#

I just understand how to make shapes (Barely)

drifting stump
#

ยฏ_(ใƒ„)_/ยฏ

rare vortex
#

that was the problem cold

late hound
rare vortex
#

does that mean I have to make everything to that scale? Or do I scale up the Male Body Model?

thick karma
drifting stump
thick karma
#

Haha I hear you.

drifting stump
#

its used as scripting language and easy to pick for other fields

#

like science

#

its big outside software engineering

frank elbow
#

I'm more allergic to programming language elitism than I am to peanuts

#

Every language has its purpose (including esoteric ones, just look at code golf)

rare vortex
drifting stump
#

@thick karma also on the camel case thing we are fucked

thick karma
#

๐Ÿ˜ญ

drifting stump
#

ieee recognizes it as CamelCase

thick karma
#

Oh yeah it's truly over.

drifting stump
frank elbow
#

"I care," I begin to say, before instantaneously being reduced to nothingness

late hound
thick karma
#

Let's take this to #modeling so Peach doesn't miss anything important. @drifting stump @frank elbow

drifting ore
#

awww

#

cmon now

#

they are genuinely providing help

#

in all the clutter

thick karma
#

lol I'm obviously kidding.

drifting stump
#

too busy circle jerking about how bad python is

thick karma
#

Haha you don't enjoy being told exactly when you need to indent, eh?

frank elbow
#

Could always move it to #general_chat instead, since the discussion is only loosely related to modding

thick karma
#

No I'm honestly done I was only joking on the way to bigger and better things lol

#

Meant nothing by it at all

frank elbow
#

Yeah I didn't take that suggestion (the #modeling suggestion, I mean) as serious lol

drifting ore
#

we all pretty chill here i've noticed so don't take me too overly seriously!

thick karma
#

But, f.r., I don't think #general_chat is trying to discuss the technical details and linguistics of naming conventions in programming.

#

lol

#

I think this was... probably as well as that line of questioning was ever going to go.

#

Peach is right, ultimately... (almost) nobody cares

#

In the spirit of switching back to talking about modding proper... progress!

weak sierra
#

u making a quest system?

thick karma
#

Working on a branching conversations dialogue panel for Aza

weak sierra
#

neat

thick karma
#

It works 100%

#

And can load convos from files

#

Trying to make it flexible

#

(already gamepad supported obviously)

frank elbow
#

Are the emotion/tone indicators part of the lines, or a separate property? I'm assuming the former bc of the colon after [Hostile]

#

Looks neat

thick karma
#

I think I'm gonna add the ability to associate a command string with a player response option

thick karma
#

It's example text from Aza herself

stable ether
#

sorry to bother but has any one had an issue that they make a recipe code and everything its fine with it but you cant craft it in game? Like everything shows up but when i go to click "craft one" its still dark

thick karma
#

It's not required

hollow current
#

im trying to get a function to be executed every 1 min after the server restarts. is this the correct way to do it? I've been testing it on a hosted server and doesn't seem to work, so not sure if its entirely wrong or if it works only for dedicated servers

RestartAlert = RestartAlert or {}

-- This function checks the current time and displays a message on the player's screen
-- if the server restart time is approaching.
function RestartAlert.CheckServerRestartTime()
  --Code removed due to discord's character limit, plus pretty irrelevant to the problem
end

-- Define a function that will be called when the server starts
function RestartAlert.OnServerStarted()

    -- Add an event to the event manager to check the server restart time every minute
    local timer = LuaEventManager():AddEvent(function()
        RestartAlert.CheckServerRestartTime()
    end, 60000) -- Check the time every minute
end

-- Add the RestartAlert.OnServerStart function to the server start event
Events.OnServerStarted.Add(RestartAlert.OnServerStarted)```
thick karma
#

The files are formatted like so:

# Hey, I am starting a convo with you.
## Oh, hello there.
## I don't want to have a convo with you!
### Why not?
#### Because!
## ... (Remain Silent)
# Oi, I am a different person starting a different convo with you.
## Oh, gee, wow.
### I think they get it.
hollow current
#

oops forgot to change it's supposed to be LuaEventManager

#

Initially thought it was getEventManager

#

even then, a simple

-- Define a function that will be called when the server starts
function RestartAlert.OnServerStarted()
    while(true) do
        print("test")
    end
end

-- Add the RestartAlert.OnServerStart function to the server start event
Events.OnServerStarted.Add(RestartAlert.OnServerStarted)```

Doesn't seem to be working on a hosted server
frank elbow
#

Looks like OnServerStarted is triggered only after the UDP engine is set up, so I believe you're right that it wouldn't run for hosted (not certain, though)

hollow current
frank elbow
#

I don't think so. AddEvent doesn't accept those functions as far as I can see

#

If you're trying to do something on a timer my initial though is that you'd utilize one of the Every~ events (or OnTick, but for something that doesn't require that precision that's not too necessary imo), whichever one is frequent enough for your use case

hollow current
#

is there an "every" event that is repeated every irl 1 min?

#

i never worked with every events actually so not sure what they are

frank elbow
#

Those events are based on ingame time. I'm referring to EveryDays, EveryHours, EveryOneMinute, and EveryTenMinutes

hollow current
#

i guess its not very workable with since if I use EveryOneMinute, for example, its bound to be less than an irl minute

frank elbow
#

You can keep track of the elapsed time by storing an initial time & comparing to it using getTimeInMillis (or a similar one that's in seconds, I believe? Unsure what it's called off the top of my head)

ancient grail
#

IsFood() why is this in uppercase omg

hollow current
drifting ore
#

gettimestamp is in seconds i believe also if im not forgetful

fast galleon
ancient grail
#

item:IsFood()

#

bool

fast galleon
#

ah my bad, it's an i not an l

hidden jungle
#

how would i make the player eat food once i find a valid consumable item?

ancient grail
#
ISInventoryPaneContextMenu.onEatItems({item}, 1, self.player);
hidden jungle
#

thanks

calm depot
thick karma
#

I'm gonna add a spot for a command string

#

And then people can listen for the command

#

And whatever

#

[Command: commandString] perhaps

#

Optionally in the option text

#

Anywhere

calm depot
#

yeah, a context value and the dialog string

#

on which note, localisation strings

#

the dialog tree should be able to consist purely of localisation vars

thick karma
#

I'm not clear on what that entails but right now I can only read a text file written in English... if you have good ideas for reworking the algo I am open to it but I might not be smart enough to understand them from crumbs alone lol

frank elbow
#

I think just being able to treat a string as something intended to be an argument to getText would suffice, with some way to specify that in the syntax

thick karma
#

Working with this for now @calm depot

WookieeDialogues.load = function(responses, dialogues, base)
    base = base or 0
    if not responses or #responses < 1 then return end
    -- BS.reveal(responses)
    local line, level = responses[1]:gsub("#", "")
    Table.remove(responses, 1)
    if level ~= 1 then return end -- Bad File Format
    local nextIndex = #dialogues + 1
    local nextEntry = { response = line }
    Table.insert(
        dialogues, 
        nextIndex, 
        nextEntry
    )
    if #responses < 1 then return end -- File complete; no options on final response.
    local remaining = {}
    -- for each #:
    for index, value in ipairs(responses) do
        line, level = responses[index]:gsub("#", "")
        if level == 1 then
            remaining = Table.subtable(responses, index)
            break -- Response Complete.
        elseif level == 2 then
            nextEntry[#nextEntry + 1] = {}
            nextEntry[#nextEntry].option = line
            -- nextEntry[#nextEntry].command = next line maybe (future plan)
        elseif level == 3 then
            local lastLevelThree = index
            local validTarget = lastLevelThree + 1 <= #responses 
            local nextLine, nextLevel = false, false
            if validTarget then
                nextLine, nextLevel = responses[lastLevelThree + 1]:gsub("#", "")
            end
            local time = 0
            local timeout = 100000
            while validTarget and nextLevel > 2 and time < timeout do
                if time == 99999 then
                    print("I think I am stuck here. :(")
                    print(validTarget)
                    print(nextLevel)
                    print(nextLine)
                end
                time = time + 1
                lastLevelThree = lastLevelThree + 1
                validTarget = lastLevelThree + 1 <= #responses 
                nextLine, nextLevel = false, false
                if validTarget then
                    nextLine, nextLevel = responses[lastLevelThree + 1]:gsub("#", "")
                end
            end
            nextEntry[#nextEntry].result = {}
            local rawSubset = Table.subtable(responses, index, lastLevelThree)
            print("Raw Subset")
            print(rawSubset[1])
            for each, row in ipairs(rawSubset) do
                rawSubset[each] = row:sub(3)
            end
            WookieeDialogues.load(rawSubset, nextEntry[#nextEntry].result, base + 2)
            index = lastLevelThree
        end
    end
    if #remaining > 0 then
        WookieeDialogues.load(remaining, dialogues, base)
    end
end
#

(Condensed, sorry all.)

frank elbow
#

Looks like your gsub calls will eat octothorpe characters in positions other than the start (too)

thick karma
#

Good point.

#

Hmmm

#

I could require a space.

#

To break between the # and the rest of the stuff

frank elbow
#

"^#+"?

thick karma
#

Nice catch.

calm depot
#

I would, though there is a pure-lua implementation of a JSON parser ๐Ÿ˜‰

thick karma
#

Yeah

#

That seems right

thick karma
calm depot
#

that's exactly what it does, yes

thick karma
#

Would that be inherently more compatible with other languages?

calm depot
#

I used it for PAYDAY2 config

#

I'd imagine it'd work fine on PZ too

#

it means that people can run their config through a linter to validate basic JSON syntax

#

then all you have to worry about is making sure the tree structure is correct

frank elbow
#

I think there's value in having a simple syntax for dialogue or anything string-heavy, but JSON would def make it easy to extend with whatever

thick karma
#

Yeah I'm not sure which would be best tbh.