#mod_development

1 messages ยท Page 71 of 1

drifting stump
#

no

#

im quite sure its also painful for them having to upkeep both systems

finite radish
#

i assumed- yeah, that's what I was about to say

bronze yoke
#

that's why not isServer() is used a lot more frequently than isClient(), even though they might sound like they should do the same thing

drifting stump
#

when they could just make singleplayer an offline server

finite radish
#

I assumed by now PZ had merged the singleplayer stuff into an offline server, but I guess that's not the case. damn

drifting stump
#

also the reason for weird bug fixes in the changelogs

finite radish
#

that's wild

drifting stump
#

like a while back sledgehammers having a fucked up spawn rate in multiplayer

#

iirc was due to zombie density not having the proper effect on loot in multiplayer

bronze yoke
#

yeah that was it

finite radish
#

okay so in that case, this code makes a lot more sense
turns out the noise maps used to generate soil quality and snow density are actually entirely static (i.e. not randomized) unless you're in singleplayer

#

kinda wild. didn't realize that

drifting stump
#

also rain

#

its a static map

#

puddles are always in the same place

#

dont remember if its ever regenerated

finite radish
#

iirc rain actually uses a different noise method, the former uses Perlin but i believe the puddle maps are different

#

still digging in though

#

i'm gonna try to rasterize these just to see what they look like, maybe overlay it on the map just for shits and giggles

faint jewel
#
    local carModData = car:getModData(); 
    carModData.job = args.job; 
    carModData.fuck = "me";
    car:transmitModData();

did not add mod data to said trailer.

finite radish
#

because you still aren't doing anything with carModData

#

you're just assigning the variable and its properties, then it remains unused

bronze yoke
#

they're using it later in the code

faint jewel
#

what do you want me to with it when i'm creating the trailer?

bronze yoke
#

but it seems to vanish before then

faint jewel
#

it will be pulled when the trailer is turned in.

finite radish
#

if it's being used later in the code, then it needs to be transmitted after you use it

faint jewel
#

but it's not getting added when i trell the server to spawn the car.

#

that code is ran server side.

finite radish
#

right, but if the car's mod data is what's being transferred, then you need to attach carModData to the car itself (or change it directly on the object)

#

because when you assign local carModData to car:getModData() that's a copy, not a reference, unless I'm misunderstanding something

#

so you'd have to set the data to your new version of the data (after you make the modifications) in order for it to update on the car object

faint jewel
#

that's EXACTLY how i set the data on a player.

bronze yoke
#

tables are always passed by reference

finite radish
#

in the function, yeah, but wouldn't it be a copy if you're assigning a local variable?

#

I'm in C#/Java mode at the moment, so excuse me if I'm getting that wrong

#

but OOP tends to suggest that wouldn't be the case (especially with a get function)

bronze yoke
#

they are passed by reference

faint jewel
#
            local player = getPlayer();    
            local myModData = player:getModData();  
            myModData.city = CityCode;
            myModData.completeText = completeText;
            myModData.ttype = completeType;
            myModData.job = LoadGenCode;    
bronze yoke
#

that's just how tables work in lua

faint jewel
#

that is how i set data on a player.

#

and that works.

finite radish
jade stump
#

Is there a mod which expands the variety of diseases?

bronze yoke
#

oh i misread this

#

it's still sort of the same answer though

#

you can loop through the table and copy all of its keys and values into a new table

finite radish
#

that's wild

bronze yoke
#

but there's no way to directly copy the value that i know of

sour island
#

copyTable()

bronze yoke
#

is that a global?

sour island
#

yes

bronze yoke
#

lol

#

i saw it in projectrp and they defined it themselves higher up in the file

#

and there didn't seem to be anything special about their implementation?

#

so that's kind of odd

sour island
#

I wrote my own and someone said 'ah copyTable had some issue?'

#

chances are they didn't know it exsisted

#
    public static KahluaTable copyTable(KahluaTable var0) {
        return copyTable((KahluaTable)null, var0);
    }

    public static KahluaTable copyTable(KahluaTable var0, KahluaTable var1) {
        if (var0 == null) {
            var0 = platform.newTable();
        } else {
            var0.wipe();
        }

        if (var1 != null && !var1.isEmpty()) {
            KahluaTableIterator var2 = var1.iterator();

            while(var2.advance()) {
                Object var3 = var2.getKey();
                Object var4 = var2.getValue();
                if (var4 instanceof KahluaTable) {
                    var0.rawset(var3, copyTable((KahluaTable)null, (KahluaTable)var4));
                } else {
                    var0.rawset(var3, var4);
                }
            }

            return var0;
        } else {
            return var0;
        }
    }
bronze yoke
#

i'll have to make use of that

sour island
#

I use it whenever I make pseudo classes

#

I assume derive() does something else - but for what I need copyTable works

marsh cloak
#

Is there a 57' Chevy Bel air mod if anyone knows?

faint jewel
#

well i am open to ideas on how the hell i am gonna get his moddata stapled to these trailers.

#

i think so wanderer

fast galleon
#

copyTable just copies a table, I just started using it recently

derive is for inheritance of objects, setting metatables, etc.

sour island
#

ah like functions

#

that makes sense

faint jewel
#

@marsh cloak fhqwhgads' Vehicle Pack - The Motorious Zone

marsh cloak
#

thanks

faint jewel
#

bottom car

marsh cloak
#

YES

#

Thank you

finite radish
spiral sparrow
#

I pronounce fhqwhgads as fuh-hwook-huh-gagds and I will not be convinced it is anything else

limber oar
#

Does PZ only load textures on launch? There's got to be a better way to work on clothing retextures without editing in PS > export as PNG > restart PZ > view in char creator > repeat

faint jewel
#

go ingame and equip it.

#

when you tab out and tab back in it will refresh it.

limber oar
#

gobbless

finite radish
# faint jewel ```lua local carModData = car:getModData(); carModData.job = args.job; ...

you mentioned this is being used later via that variable, are those the changes that aren't showing up? or does the initial assignment not even show up? I'm thinking you may need to transmit again after you do whatever you're doing, or just do whatever you're doing on the client/server where it needs to happen in the first place (then transmit the result)

faint jewel
#

that's the only thing in that fnction messing with the mod data.

finite radish
faint jewel
#

the other stuff is client side.

lusty marsh
#

I'm planning to expand the scope of my mod, can I create for example a "shared assets" modid that's required by another mod?

limber oar
faint jewel
#

it just needs to be a regular mod.

#

are you able to load it as an item?

limber oar
#

Yep, walking around with it no problem.

#

And it's definitely pulling from the right folder, since on restart the texture does change.

faint jewel
#

hmmm...

#

are you in debug mode?

#

also, as for the moddata thing, what if we sent the mod data on the isoobject of the car instead of the adddebugvehicle?

ruby urchin
#

Anyone worked with particles?

faint jewel
#

what kind?

#

if you say blood i'm gonna say DONT DO IT.

dull moss
ruby urchin
#

why?

faint jewel
#

nah i had to mess with blood for the mower

#

getting it to fling out would NOT happen.

#

i had to manually place the splats,

dull moss
#

honestly i'd use mower if it'd look like 5pixels shit, the functionality is just way too good

faint jewel
#

what?

limber oar
faint jewel
#

5pixels?

dull moss
#

yes, image consisting of 5 pixels

faint jewel
#

OH the blood?

#

you wanna know a dumb secret?

dull moss
#

idc, anything. I'm saying with or without blood, mod functionality is way too good to pass on

faint jewel
#

the mower and the cutting grass functonality took like 2 days to do. then someone asked me what happens when i hit a zombie or a dead body, mod took 3 months longer to make LOL.

dull moss
#

anyone knows if you stay around big piile of dead Z do you get foodSickness or some other kind of sickness?

faint jewel
#

you get infected.

#

then you die.

bronze yoke
dull moss
#

dang

faint jewel
dull moss
#

Im die sadge

finite radish
#

fun fact: the pre-generated static values for the erosion/soil/snow/etc. data is taken from a single, manually defined array
and the array has around 7900 values in it

faint jewel
#

this is my current function to spawn a trailer.
it's called with
sendClientCommand("KYRPT", "spawnTrailer", {type = "Base.TrailerTSMeg", condition = 100, clear = true, x = 0, y = 0, z = 0, dir = 45, code = "generatedcodehere"});

sour island
#

probably generated once and left

faint jewel
#

it WILL make some of you cry.

#

so be careful looking into the void.

dull moss
#

how can one get perk name from Perk ?

sour island
dull moss
#

cheers

sour island
dull moss
#

am I missing something? It doesn't print a single line

local totalPerkLevel = 0
local totalMaxPerkLevel = 0;
for i, perkCheck in ipairs(Perks) do
    local perkLevel = player:getPerkLevel(perkCheck)
    print("Perk "..player:getPerkLevel(perkCheck):getName().." lvl"..perkLevel);
    totalPerkLevel = totalPerkLevel + perkLevel;
    totalMaxPerkLevel = totalMaxPerkLevel + 10;
end
#

oh wait

sour island
#

you may have to use perkfactory.getperk() cause perks. may not inherit the other methods

sour island
#

also kind of wild isodrections don't have a toAngle - seems like the toAngle returns 1-9 I wonder if it's used on a list

bronze yoke
#
for i=0,Perks.getMaxIndex()-1 do
    local perk = Perks.fromIndex(i)
end
```i can't remember if i actually tested it but i have something like this
finite radish
#

iirc there's a toAngle that can take isodirections as an arg? i forget though

#

or maybe something that takes in an IsoDirection and then has a toAngle extension

dull moss
sour island
faint jewel
finite radish
sour island
#

but at that point he could make a list of key/value dir/angles and refer to it himself

finite radish
sour island
#

isoDir.toAngle should logically return angles though?

finite radish
#

...oh, the toAngle returns an int?

#

that's uh... silly

sour island
#
    public float toAngle() {
        float var1 = 0.7853982F;
        switch (this) {
            case NE:
                return var1 * 7.0F;
            case N:
                return var1 * 0.0F;
            case NW:
                return var1 * 1.0F;
            case W:
                return var1 * 2.0F;
            case SW:
                return var1 * 3.0F;
            case S:
                return var1 * 4.0F;
            case SE:
                return var1 * 5.0F;
            case E:
                return var1 * 6.0F;
            default:
                return 0.0F;
        }
    }
faint jewel
#

but yeah local car = addVehicleDebug(args.type, args.dir, nil, sq) that addas a RANDOM ANGLE TO THE DFIRECTION.

sour island
#

int multiplied against 0.785~

faint jewel
#

stupid ass thing.

#

so it can be -22.5 to 22.5 degrees OFF from the direction provided.

finite radish
#

i.e. var1 in this case

#

oh wait

#

it's just static

#

I'm blind

#

that's incredibly silly

#

why not just return the premultiplied value KEKW

#

do we learn at long last that TIS doesn't have access to calculators

sour island
#
local IsoDirectionsToAngles = {
    [IsoDirections.N]=0.0, 
    [IsoDirections.NE]=45.0, 
    [IsoDirections.NW]=-45.0, 
    [IsoDirections.E]=90.0, 
    [IsoDirections.W]=-90.0,
    [IsoDirections.S]=135.0,
    [IsoDirections.SE]=-135.0, 
    [IsoDirections.SW]=180.0,
}
local pX, pY, pZ = args.x, args.y, args.z
local serverFixAngle = args.dir

local sq = getCell():getGridSquare(pX, pY, pZ)
local car = addVehicleDebug(args.type, args.dir, nil, sq)

local FixAngle = IsoDirectionsToAngles[serverFixAngle] or 0
car:setAngles(180.0, FixAngle, 180.0)
#

You can keep the top one as a local outside of the function

#

assuming args.dir is always present

#

you can also add a 'serverFixAngle and' after FixAngle =

#

@faint jewel

#

also personal preference

local pX, pY, pZ = args.x, args.y, args.z
dull moss
# bronze yoke ```lua for i=0,Perks.getMaxIndex()-1 do local perk = Perks.fromIndex(i) end ...

this works, thanks. By any chance you'd know how to grab only perks that can be leveled?

local totalPerkLevel = 0
local totalMaxPerkLevel = 0;
for i = 0, Perks.getMaxIndex()-1 do
    local selectedPerk = Perks.fromIndex(i)
    print("Perk: "..selectedPerk:getName());
    local perkLevel = player:getPerkLevel(selectedPerk)
    totalPerkLevel = totalPerkLevel + perkLevel;
    totalMaxPerkLevel = totalMaxPerkLevel + 10;
end```
returns stuff like category dividers and Skills that were cut out from the game
bronze yoke
#

to avoid none you can probably just start i at 1

dull moss
#

smort

sour island
#

you can also grab only skills with parents, and with parents other than none (maybe)

sour island
#

getParent()

bronze yoke
#

yeah, iirc the hidden perks are just parented to none

dull moss
#

getParent(0

bronze yoke
#

that's a smart solution

sour island
#

it's kind of wild but the skill categories are their own skills

finite radish
#

they're orphans PepeHand

dull moss
#

well Chuck is smart so expected

sour island
#

could be used to feed into some sort of parallel level up system

#

but its odd it's just already there and only used for UI display

#

for clarification - raising any skill in the combat category could unlock bonuses or feed XP into the sibling skills

faint jewel
sour island
#

yeah, key/value abuse is fun

#

you can basically set anything as a key or value

faint jewel
#

well now the fun part. getting that damned mod data to stickl.

sour island
#

it's all tables and references all the way down

agile vigil
finite radish
#

๐Ÿ˜

agile vigil
#

My head just can't wrap around why N and S are not 180 degrees apart ๐Ÿ˜„

finite radish
#

oh wait ๐Ÿค”

dull moss
#

works hypers

for i = 1, Perks.getMaxIndex() - 1 do
    local selectedPerk = Perks.fromIndex(i)
    if selectedPerk:getParent():getName() ~= "None" then
        print("Perk: "..selectedPerk:getName()..", parent: "..selectedPerk:getParent():getName());
        local perkLevel = player:getPerkLevel(selectedPerk)
        totalPerkLevel = totalPerkLevel + perkLevel;
        totalMaxPerkLevel = totalMaxPerkLevel + 10;
    end
end```
finite radish
#

N = 0 so i think you're right

bronze yoke
#

aww my literacy skill is in there ๐Ÿ˜‡

finite radish
#

imagine being literate. could not be me

agile vigil
#

I need to take a look at that literacy mod. ๐Ÿ˜„

dull moss
#

ye was grabbing trait names to overwrite em KekW

finite radish
#

actual footage of me rn

dull moss
#

you know whats fuuny, i test my stuff in bulk, aka write few perks -> test them
and i was about to test something very specific but something else wasnt working so i went on fixing it which i just did and now i dont remember what i was doing initially

#

its like that vid

#

I think this is pretty familiar for most of us.
To everyone who watches this: please check out this youtube creator called nartharie . He has created some of the must absurd and funniest videos I've ever seen, but he's still at 280 subs at the time of writing. So please discover this before all your friends or acquaintances or whatever do and be...

โ–ถ Play video
sour island
#

I think I just transposed what he had originally - I may have grabbed the wrong angles

faint jewel
#

huh?

agile vigil
neon bronze
#

Hey is there a way to permanently get a player in both sp and mp? When i use getPlayer on exit the moddata with it get erased

finite radish
#

i don't know how that'll work (if at all) in singleplayer though, but there's less need for moddata transmission there anyways so you should be able to figure it out

neon bronze
#

Can the username be altered by a player in vanilla? If yes then i just use the steamID

#

I doubt anyone can alter that

bronze yoke
#

it can't

sour island
faint jewel
#

nooooo.

neon bronze
faint jewel
#
    local NEangle = 45.0
    local NWangle = -45.0
    local Eangle = 90.0
    local Wangle = -90.0
    local SEangle = 135.0
    local SWangle = -135.0
    local Sangle = 180.0```
sour island
#

Just SW, SE, S

faint jewel
#

no... those are mine and they are right.

neon bronze
#

Im trying to figure out when to call transmitModData

sour island
#

on my code snippet

finite radish
#

otherwise the changes won't propagate between the two

#

that said, you want to limit the amount of transfers - otherwise you'll lag the server to hell

neon bronze
#

Hmm, a serverlag modโ€ฆ

finite radish
#

there are plenty of those already

neon bronze
#

But yeah i figured that much that when i alter the moddata of my worldobject i should transmit that aswell

#

The other clients get the moddata when i tranmsit it right?

sour island
#

yes

faint jewel
#

well hell.

#

transmitPartModData

sour island
#

transmitModData calls on server send to clients

faint jewel
#

basevehicles dont have a transmitmoddata.

sour island
#

all IsoObjects have it

#

but there are caveats to it not working as expected

#

zombies afaik don't save their modData

neon bronze
#

Luckily i dont interact with them

sour island
#

vehicles I'm told have issues with transmitting certain changes -- idk if that also applies to modData

#

I'm still trying to figure out how to prevent TV abuse with skill recovery journals

#

I can track the file and function the addXP call comes from

#

and I refactored the system to work with that as it's overall alot less work

finite radish
sour island
#

the rework is logging XP gained from flagged files/functions

#

going to see If I can compare the two

#

the previous version tracked listnedToMedia - which worked if they watched the tapes after reading

#

but not before unfortunately

#

also I don't have to calculate extra levels from professions/traits anymore

#

which was a bonus

#

also the TV xp isn't flat

finite radish
#

but if you implement something like that, where VHS tape XP is ignored if it's "regained" through a journal, doesn't that imply that the dead person who wrote the journal... wrote down what happens on the VHS tape? idk how I feel about that KEKW

sour island
#

in the impacted by multipliers sense

sour island
finite radish
#

Note to self: all constructions require, more or less, two planks and two nails. And then you just hammer away, and the shelf builds itself.

sour island
#

The journal is meant to offer a means of not starting over - if they can just suicide and rewatch the VHS is kind of breaks things quickly

finite radish
#

but that's already the point of VHS tapes, in function

sour island
#

I guess I could makes things very simple for myself and just lock out that XP entirely

#

game design

finite radish
#

I guess I just don't see the point unless the goal is for the journal to be a stronger, less balanced version of the VHS tapes

sour island
#

the issue is that it could stack

finite radish
#

because if you're in MP and returning to your old base, the VHS tapes already serve as a sort of "regain your skills without grinding for hours" platform

#

so that gap seems to be filled, so I'm missing the point of the journal unless it's just a direct upgrade

#

(but yes, you definitely wouldn't want them to stack, either way)

sour island
#

philosophically I just thought it was a neat idea to help cushion newer players - some factors with having to craft it constantly update it make it balanced

#

I never really looked at the VHS as a means for that tbh - but that is an interesting idea

#

I'll definitely include a sandbox option to lock out VHS XP entirely

dapper forge
#

Hey, can anyone help me trying to set Mod Manager up?

#

Is there supposed to be a UI or something?

sour island
#

also, I think I wrote the mod before skill VHS were a thing - not sure

finite radish
# sour island also, I think I wrote the mod before skill VHS were a thing - not sure

if it's the one I'm thinking of you definitely did - I remember using one way back for that exact reason. then VHS tapes came out and i was like "ah, that's how the devs are going to solve that problem. neat." (but I'm not married to one or the other conceptually, just struggling to see the need for both other than for flavor reasons or if you think VHS tapes are too strong/not strong enough)

dapper forge
#

ty

sour island
#

from a game design standpoint - if you consider the player's time/effort I prefer to place it on maintaining their journal rather than after the fact in making them sit around watching VHS

#

not knocking VHS as it adds more things to find + circumvents the grind

finite radish
#

yeah, I think there's definitely an argument there. I think I see the tedium as punishment though, which is honestly how Zomboid handles a lot of balance. not necessarily bad, but not exciting either

sour island
#

basically how I view it - if you dont want to put time into a journal you can watch VHS and burn through resources sitting around

#

but with the journal you have to becareful not to lose it - and make the judgement call of 'do I take it with me to keep it up to date' or 'leave it and update it when I get back'

#

I would also recommend anyone using it to set the return % to atleast 70

#

but most people use it when teaching new players

#

I may also make it use up the writing tools + require maintenance if read repeatedly

finite radish
#

i wonder how interesting a rework could be, with design in mind for the whole journal concept. swap XP into "perk points" more or less, and buy different perks at different levels for a given skill. that'd make the whole journal thing neat, because you could lose certain perks at random in the journal (pages? idk) so you'd only have bits and pieces of the information

#

obviously would be much more of an endeavor to implement (especially in terms of compatibility with other mods), but I think something like that would be pretty neat

sour island
#

I used to have it only record fully unlocked levels

#

but I had to change to raw XP due to the way XP is calculated

dim hill
#

Where can I find the logs for these errors on a dedicated server?

ruby urchin
faint jewel
#

^^ there

dim hill
#

I thought so too, but doesn't seem like it.

#

It's currently xx:42 right

#

If I trigger the error, my logs haven't updated

sour island
#

If you're the host the serverside errors appear in coop-console.txt

dim hill
#

It's a dedicated server

#

Oh maybe those are clientside errors

sour island
#

then the errors would be in C:\Users\YourPCName\Zomboid\ console.txt

dim hill
#

ah yeah

#

of the client

#

I was looking in the zomboid logs folder of the server

sour island
#

Speaking of which - I think I figured out the issue with why it is transcribing multiplied XP lol

#

The XP multiplier hashmaps are a big headache I was hoping to avoid

faint jewel
sour island
#

yep - I can avoid dealing with XP mult maps

#

the issue was passing arguments using or due to some being false

#

and since false exists it was flipping to true ๐Ÿค”

drifting stump
#

you also cant transmit player modData because they are local too

sour island
#

I mean in local zombies dont save it

#

they're loaded from their outfit ID basically

drifting stump
#

well yeah

sour island
#

player zombies might save their modData as their outfit isn't from an ID

drifting stump
#

they should save their modData as long as theyre visible

#

but once they despawn it be gone

sour island
#

that's kind of poo poo

drifting stump
#

unless theyre doing a if zombie then return like they do in several places

#

wait a sec

#

getPipedFuelAmount is a function in isoobject

#

you can pipe fuel from players

#

( อกo อœส– อกo)

sour island
#

time to matrix up some survivors to produce methane

dim hill
#

Hey @sour island - sorry to bother. What is "Journal XP Used When Read"?

#

Even with the tooltip I'm not too sure

fast galleon
#

One time item?

dim hill
#

It deletes the journal?

sour island
#

The XP when read is used up

dim hill
#

Is used up?

#

What XP?

#

I'm really confused, sorry haha

drifting stump
#

you store xp in the book

#

you then read

#

and consume

dim hill
#

So basically what it means is

#

After reading the journal

#

The journal no longer works

#

You have to re-write a new one

#

Correct?

neon bronze
#

How do you spawn items in your inventory?????

sour island
#

You can add more to it

#

Only the XP is used when read

drifting stump
sour island
#

perhaps I should make it allow you to add onto it but once read destroys it

drifting stump
#

i too rip apart the book i read

sour island
#

but basically it means on that specific journal, XP you gain can only be recovered once

#

if you gain XP later you can store and recover it - once

neon bronze
#

tfw you forget to include the modules name

sour island
drifting stump
sour island
sour island
patent quiver
#

I have an idea for a mod and was wondering if I could get some feedback. Is it ok if I post my notes here?

I mainly want to know if it seems too ambitious, and if it's technically possible with the limitations of the modding framework.

#

Zomboid mod idea:

mod requires you to travel to each major city on the map to obtain blueprints for special items used to repair the escape helicopter. The blueprints are stored on computers which need to be powered. The computers are also connected to each city's tornado siren system which attracts zombies when activated. The siren system will be accidentally activated while the blueprints are being extracted onto a floppy disk. the floppy disc needs to go into a prototype VHS tape that can display the contents on a TV with a VCR. The blueprints will then require players to go to random locations to obtain 3 special items each. however, the helicopter has a VERY loud tampering alarm that draws in zombies from MILES around and even enrages some of them, turning them into sprinters. Once you start the escape sequence, the hacking tool that you made will take 3 ingame days to prepare the helicopter for takeoff. during this time, you will have to defend against the enraged zombies who can now even tear down large walls. they will get in and they will come for you. all tiles a certain distance around the takeoff zone will be blocked off by something (thick horde of stationary zombies?) to prevent the players from leaving. any player outside the zone at this time will die, and new character spawns will be disabled during this event. If the event is survived, the opening text displays again but instead says "this is how you survived".

the player must:

  • interact with computer in each major city to receive floppy disk
  • defend against hordes of zombies during this process (they will seek player) - process will last a few ingame hours.
  • find four secret VHS floppy reader prototypes (the floppy gets stuck and can't be removed)
  • watch floppy disks on four different TV's (the floppys brick the TVs and max out their volume, prompting nearby zombies to investigate)
#

with newly acquired blueprints, the player now must:

  • locate 3 items per blueprint (12 total) scattered in random locations.
  • one can be fished up with a low chance. (treasure map style, high fishing skill). item name: rare waterlogged component
  • A zombie carries one - he is located in the mall among a massive hoard. item name: strange biological anomalie
  • one is found when disassembling a rare type of radio. (requires high electrical skill. there will be three in the world at set locations - radio stations if they exist) item name: rare communications component
  • one is found in a rare model of car. (there will be three in the world at set locations. high mechanic skill required) item name: rare engine part
    one has a treasure map that shows where it can be dug up with a shovel. (requires high farming skill to successfully dig up. there can be three of these too.)

the rest can be randomly scattered across the world unless better ideas come up. they can just be called rare components. this way, each recipe requires one unique rare items and two rare components.

finally the player must:

  • build the repair components

  • locate the helicopter.

  • set up defenses to survive the final conflict

  • add components to helicopter

  • begin helicopter startup sequence (player will be warned that they have discovered an anti tampering system that will require higher mechanics and electronics than before - maybe 7 or 8 each - to hack through. player will be warned that once hacking commences, the alarm WILL be set off and will attract zombie hordes the likes of which they've never seen. player will be warned to prepare extremely well before the encounter.)

#

Is this directed at me?

#

The lore explanations for the events can be changed because I know they're dumb, but the core idea is to add meaningful long term goals that encourage the player to engage with all aspects of the game from exploration, to combat, to building, to leveling skills.

molten cobalt
#

Hi again all, just wanted to use similar mechanics that claustrophobic trait uses , any ideas where that is located in the files?

ruby urchin
patent quiver
#

So is this your way of saying there are too many ideas to implement?

#

I'm looking for some real feedback.

faint jewel
#

in THEORY it's not bad.

#

in practice it's "NOPE.AVI"

ruby urchin
#

^^ a real feedback

patent quiver
#

That's all I needed to hear

#

So if I scoped this WAY down to like "travel to four major cities and collect four things", would that sound more possible?

faint jewel
#

it would yes.

#

but still still having those would have to be FORCED spawns in certain locations.

#

no "random" to it easily.

patent quiver
#

Yea, trying to make it random sounds like a nightmare

faint jewel
#

i mean it's POSSIBLE to randomize it by saying pick a random container in the list of container in this cell.

#

but that's the best i could offer as trying to stick it on a zombie would be about a bitch to do.

patent quiver
#

Yea, of course I'll be starting with a stripped down proof of concept

#

If I wanna try to get crazy I can look at that stuff later but I understand how complicated even simple things can be, especially in a modding environment with limited access to things.

sour island
#

man this XP stuff is kicking my ass

#

some of the skills are transcribing 1:1 properly - but others seem to be getting their multiplier applied

faint jewel
# sour island on my code snippet
attempted index: N of non-table: null

LOG  : General     , 1672179814179> 36,994,035> -----------------------------------------
STACK TRACE
-----------------------------------------
function: spawnTrailer -- file: KYRPT_clientcommands.lua line # 11 | MOD: KYRP Trucking mod
function: onClientCommand -- file: KYRPT_clientcommands.lua line # 52 | MOD: KYRP Trucking mod```
#

would that be this?

sour island
#

no

#

show me your file

faint jewel
#

nvm i found it. i are a derp

sour island
#

This is what I referred to as messing up the directions:

    [IsoDirections.S] = 135.0,
    [IsoDirections.SE] = -135.0, 
    [IsoDirections.SW] = 180.0,
``` I don't know why your code is throwing out that error
#

What was the issue?

#

also make that table local

patent quiver
#

One more question - when I said "random locations" before, I pretty much had the idea that I might be able to make a short list of predetermined locations to put things at and randomly choose from those. Does that sound technically possible, and within reason to accomplish?

dull moss
#

so i'm looking at foraging, I want to catch amount of herbs player picks up, but from what I see it handles them in array? Or am I misunderstanding something?

function ISForageAction:forage()
    forageSystem.doFatiguePenalty(self.character);
    forageSystem.doEndurancePenalty(self.character);
    forageSystem.giveItemXP(self.character, self.itemDef, 0.75);
    --
    -- add the items to player inventory
    -- these items are generated when the icon is first spotted in self.forageIcon.itemList
    local itemsAdded = forageSystem.addOrDropItems(self.character, self.targetContainer, self.forageIcon.itemList, self.discardItems);
    local itemsTable = {};
    for i = 0, itemsAdded:size() - 1 do
        local item = itemsAdded:get(i);
        if not itemsTable[item:getFullType()] then itemsTable[item:getFullType()] = {item = item, count = 0}; end;
        itemsTable[item:getFullType()].count = itemsTable[item:getFullType()].count + 1;
    end;
    --
    --create the halo note, injecting the item image
    --TODO: this requires item images to be in media/textures - should get the image location from the texture here instead
    local itemTexture;
    for _, itemData in pairs(itemsTable) do
        local item = itemData.item;
        local count = itemData.count;
        if item:getTexture() ~= nil then
            if string.find(tostring(item:getTexture():getName()), "media") and string.find(tostring(item:getTexture():getName()), "textures") then
                itemTexture = "[img="..tostring(item:getTexture():getName()).."]";
            else
                itemTexture = "[img=media/textures/"..tostring(item:getTexture():getName()).."]"
            end
        else
            itemTexture = ""
        end
        if not self.discardItems then
            table.insert(self.manager.haloNotes,itemTexture.."    "..count.. " "..item:getDisplayName());
        end;
    end;
end```
faint jewel
#

so it's not spot 1 2 3 it's random spot between 1 and 80

#

could be the first one you open, could be the last.

patent quiver
#

Alright thank you

sour island
#

๐Ÿค” radio interactions calls addXP(+50) 6 times for 300 XP but it only nets 75

#

sprinting around addXp(+1) = 1 XP

faint jewel
#

how would i write a simple func with on RMC with check car near clicked square and print moddata

#

basically... AUD does not do car moddata.

pulsar rock
#

Hey hi, is the current save's in-game date / time exposed somewhere in the files?

#

I know the RADIO_SAVE file has the days passed, but an exact date + time would be superb

frank elbow
pulsar rock
#

Hm

#

I guess the second best thing would be making a mod that just logs it to a file every minute or so

sour island
#

seems like the xp issue was an old player jacked up from errors again - and it works

pulsar rock
#

And grabbing it from there

sour island
#

there's functions for in-game time

pulsar rock
#

Yeah, I'm writing a fairly extensive Discord bot for Zomboid server management

#

Think log browsing, player data management, etc

#

Was hoping to get an accurate time reading from the files without a mod

#

But alas

#

Is the RADIO_SAVE file updated live, or only on server shutdown / save?

dull moss
#

Ok so I managed to catch items player picks up. What I did is literally just copied base game code and chaged it a bit to catch what I wanted, but now it throws error in log (not red interrupting ones, just general error in console.txt)

local original_forage_forage = ISForageAction.forage;
function ISForageAction:forage()
    local itemsAddedShadow = forageSystem.addOrDropItems(self.character, self.targetContainer, self.forageIcon.itemList, self.discardItems);
    local itemsTableShadow = {};
    for i = 0, itemsAddedShadow:size() - 1 do
        local item = itemsAddedShadow:get(i);
        if not itemsTableShadow[item:getFullType()] then itemsTableShadow[item:getFullType()] = { item = item, count = 0}; end;
        itemsTableShadow[item:getFullType()].count = itemsTableShadow[item:getFullType()].count + 1;
        if not self.discardItems then
            print("DTW Logger: picking up item: "..item:getFullType());
        end;
    end
    original_forage_forage(self);
end
LOG  : General     , 1672182718850> DTW Logger: picking up item: Base.Twigs
LOG  : General     , 1672182718851> DTW Logger: picking up item: Base.Twigs
LOG  : General     , 1672182718851> Error, container already has id
LOG  : General     , 1672182718851> Error, container already has id
LOG  : General     , 1672182718851> Error, container already has id```
Do I care about those? It works and picks up items and stuff
sour island
pulsar rock
#

in-game time

#

Preferably from a file / command / etc

#

The bot runs locally on the server, so it has full access.

#

RADIO_SAVE.txt is a file that keeps track of some radio related things, and incidentally also has a DaysSinceStart value

#

Which is reasonably useful

#

A more accurate value would be nice, though.

faint jewel
#

lol try messing with os.time.

#

that stuff is busted to all hell.

sour island
#

no... there's a gameTime object

#

has all he needs

#
    public PZCalendar getCalender() {
        this.updateCalendar(this.getYear(), this.getMonth(), this.getDay(), (int)this.getTimeOfDay(), (int)((this.getTimeOfDay() - (float)((int)this.getTimeOfDay())) * 60.0F));
        return this.Calender;
    }
#

from the java

frank elbow
#

(Why did I write it to only read data from the current version? Because I lack foresight, that's why)

pulsar rock
#

So, if there's a non-mod-required way to grab this, it'd be superb.

frank elbow
#

Sounds like I'm doing the exact same thing you are, so yeah there is

#

I'm running a web server on the same vm I run the game server on which provides the data using RCON and reading files

sour island
#

If you want information from the game you could just have it print to a file

#

Not sure why non-mod would be ideal - you'd be digging around in hopes of scraping off the needed info

frank elbow
#

Not really digging around imo, since the time is just stored as numbers

#

(that is, if you know the format it's not guesswork)

sour island
#

I mean if he's adamant about not using a mod - he'd have to find a place that already has the information he wants

frank elbow
#

Ohh, I see what you mean, I think

#

You're saying for any new feature not covered he'd need to keep digging for stuff, yeah?

sour island
#

Even for time, you can easily access the gametime object in a mod and have it print to a text file

#

in whatever format you want

#

although, grabbing the information from the save is clever

#

seems like alot more work

frank elbow
#

I don't disagree, but personally I prefer not requiring a mod for stuff like that

#

Yeah that's definitely true, I might go with a mod if I didn't want to have the versatility of having all the data

sour island
#

You're looking for GameTime's Calender var btw

#

should be a list of numbers = this.updateCalendar(this.getYear(), this.getMonth(), this.getDay(), (int)this.getTimeOfDay(), this.getMinutes())

#

it's a java calendar, so the format should match that documentation

faint jewel
#

how would i select a vehicle at a certain square

sour island
#

something is up with the TVs

#

based on addXP() calls I should have 300XP

#

I might just make it ignore TVs and say it's balanced gameplay

faint jewel
#

i am going to have an annuerism.,

sour island
#

I just had one

#

I've been messing with XPs that are all flat

#

but it is applying the multiplier afterall

#

I was using sprinting but they cap the xp to 1

#

I've been going around in circles avoiding the xp maps

#

welp, here I go I guess

dull moss
#

I fucking did it

#

took 30 min and digging in base game code (thanks inteliji) but i did it

local original_forageSystem_addOrDropItems = forageSystem.addOrDropItems;
function forageSystem.addOrDropItems(_character, _inventory, _items, _discardItems)
    if (not _discardItems) then
        for item in iterList(_items) do
            print("DTW Logger: picking up item: "..item:getFullType());
        end;
    end
    return (original_forageSystem_addOrDropItems(_character, _inventory, _items, _discardItems));
end```
#

last error I resolved was that i wasnt returning original function

#

and in base game code it returns stuff

#

and i was like dented why no workey workey

#

ok new question, you know how you can forage stuff and stuff is divided in categories, like junk, ammo, medical herbs

#

is there a way to access that table?

#

like lets say i want to get data what medical herbs can spawn

drifting ore
#

for scripts/items.txt if i'm trying to call icons from other mods, what do i need to preface the script? i saw Import but how can i find out what i need to import?

#

like for base vanilla icons we'll say to start ๐Ÿ˜›

#

NM i just had a spelling error ๐Ÿ™‚

faint jewel
#
function CheckCarModData(vehicle)
    if (vehicle) then 
}}}     if (vehicle:getModData() ~= nil) then
            for k,v in pairs(vehicle:getModData())do
                print(vehicle:getScriptName() .. " has K: " .. k .. " & V: " .. v)
            end
        else
            print("No Moddata found on " .. vehicle:getScriptName())
        end
    end
end```
#

the line with the }}} throws Object tried to call nil in CheckCarModData

#

wth man

sour island
#

add a prnt above it

#

print("vehicle:"..tostring(vehicle))

dull moss
#

can't i do something like this?

local herbs = {
    "Base.Plantain",
    "Base.Comfrey",
    "Base.WildGarlic",
    "Base.CommonMallow",
    "Base.LemonGrass",
    "Base.BlackSage",
    "Base.Ginseng"
}
if item:getFullType() in herbs then
    print("DTW Logger: picking up medical herb: "..item:getFullType());
end```
#

oh table needs to have keys

#

for that to work

drifting stump
#

what in the python am i looking at

sour island
#
function convertNumericListToKeyedTable(list,tbl) for _,value in pairs(list) do tbl[value]=true end end
```If you're lazy, lets you write out simple tables and then convert them into one that can use `list[n]` to check if a value is there
#

the conversion should be called once - can even leave it out of a function so its called when Lua is loaded

dull moss
#

already did it this way but thx

for _, herb in pairs(herbs) do
    if herb == item:getFullType() then
        --print("DTW Logger: picking up herbs: "..item:getFullType())
        local modData = player:getModData().DynamicTraitsWorld
        modData.HerbsPickedUp = modData.HerbsPickedUp + 1;
        if modData.HerbsPickedUp >= SBvars.HerbalistHerbsPicked then

            break
        end
        break
    end
end```
sour island
#

modData.HerbsPickedUp is defined somewhere right?

dull moss
#

ye

#

I got lua where i keep my modData organized and I require it on all my other luas to make sure it loads it first

#

less typing for me

#

hey Chuck while I have you here

#

do you know any smart way of stopping my function from injecting itself into base game function on condition basis?

#

like I want my function forageSystem.addOrDropItems(_character, _inventory, _items, _discardItems) execute only if XYZ condition is met

#

(trying to minimize amount of things that can be ran without any need)

sour island
#

uh

#

Just put an if here:

local original_forageSystem_addOrDropItems = forageSystem.addOrDropItems;
function forageSystem.addOrDropItems(_character, _inventory, _items, _discardItems)
    if (not _discardItems) then
        for item in iterList(_items) do
            print("DTW Logger: picking up item: "..item:getFullType());
        end;
    end
    return (original_forageSystem_addOrDropItems(_character, _inventory, _items, _discardItems));
end
#

Seems like you do?

dull moss
#

like here's example

local original_forageSystem_addOrDropItems = forageSystem.addOrDropItems;
function forageSystem.addOrDropItems(_character, _inventory, _items, _discardItems)
    if not _character:HasTrait("Herbalist") and (not _discardItems) then
        for item in iterList(_items) do
            --print("DTW Logger: picking up item: "..item:getFullType());
            local herbs = {
                -- deleted for readability
            }
            for _, herb in pairs(herbs) do
                if herb == item:getFullType() then
                    --print("DTW Logger: picking up herbs: "..item:getFullType())
                    local modData = player:getModData().DynamicTraitsWorld;
                    modData.HerbsPickedUp = modData.HerbsPickedUp + 1;
                    if modData.HerbsPickedUp >= SBvars.HerbalistHerbsPicked then
                        _character:getTraits():add("Herbalist");
                        HaloTextHelper.addTextWithArrow(_character, getText("UI_trait_Herbalist"), true, HaloTextHelper.getColorGreen());
                        break
                    end
                    break
                end
            end
        end
    end
    return (original_forageSystem_addOrDropItems(_character, _inventory, _items, _discardItems));
end```

I use this to catch herbs that player picks up, and I don't want to do that anymore after they got the trait. I put condition inside first if, is that pretty much the best way to go about it without doing too many unnecessary things?
#

also, is _character == getPlayer()? assumed it is but havent tested it yet KekW

sour island
#

o

#

hmm

#

I'd only suggest implementing a key'd table - but idk how much more performance you can get out of it

dull moss
#

I mean honestly doesnt matter much

#

I hoped I could pick up plants dynamically from forage defs

#

To account for modded herbs

#

But couldn't figure it out so just defaulted to some herbs from base game

dense timber
#

need to comm someone to make a mod for me

dull moss
dense timber
rancid panther
#

how can i give base maintenance xp for repairing a weapon? with no other mechanics to keep it simple?

faint jewel
rancid panther
#

can i just take
function ISFixAction:perform()
and add player:getXp():AddXP(Perks.Maintenance, exp); to the function?

sour island
#
if (IsoGameCharacter.this.Traits.Pacifist.isSet()) {
                                 if (var6.getType() != PerkFactory.Perks.SmallBlade && var6.getType() != PerkFactory.Perks.LongBlade && var6.getType() != PerkFactory.Perks.SmallBlunt && var6.getType() != PerkFactory.Perks.Spear && var6.getType() != PerkFactory.Perks.Maintenance && var6.getType() != PerkFactory.Perks.Blunt && var6.getType() != PerkFactory.Perks.Axe) {
                                    if (var6.getType() == PerkFactory.Perks.Aiming) {
                                       var9 *= 0.75F;
                                    }
                                 } else {
                                    var9 *= 0.75F;
                                 }
                              }
#

I'm trying to figure out how to unBoost XP for journals to have true flat XP

#
Iterator var11 = IsoGameCharacter.this.getDescriptor().getXPBoostMap().entrySet().iterator();

                  label191:
                  while(true) {
                     while(true) {
                        Entry var12;
                        do {
                           if (!var11.hasNext()) {
```I can't even read this
#

Maybe I'm overthinking it

#

๐Ÿค” 0.25 * all XP would simulate the player having 0 starting skills

agile vigil
#

But wouldn't that cause issues with Slow Learner recovering more than the intended XP?

amber plank
#

hey is it possible to somehow play challenge mode through sandbox

#

i wanna play winter is coming but i wanna edit some values so im wondering if its possible to put that in sandbox

agile vigil
amber plank
#

not a modder just asking

rancid panther
#

my occupations mod causes a crash whenever i try to generate a random character or use a preset character.

sour island
#

I don't think those would be an issue

amber plank
#

does no one know

sour island
#

You'd not get back as much

#

But other than that I think 0.25 would cover the basics

rancid panther
#

this is the only issue i really have with my mod but it's a pretty big one to not be able to use the preset button

sour island
#

The global XP mult would need to be accounted for ๐Ÿค”

agile vigil
#

How about Strength/Fitness XP? Since their default multipliers are different ๐Ÿ™‚

sour island
#

I have the true raw XP -- which is ironically large amounts - it's very strange most XP gets hit by a 0.25 mult

rancid panther
#

is it because i removed vanilla occupations? im using profession framework and havent seen any other mods that use this framework have this issue

#

and all the professions have starting traits with mutually exclusive traits, but it doesnt have any issue when it comes to normal character generation

sour island
#

I'm just thinking if I have to

#

Strength and fitness have a caveat to their xpboost - very weird -- also the sandboxvar excludes passives -- but the code also mentions a second sandbox var

#

Makes the global mult impact passives too

#

Is that in game?

agile vigil
# sour island I have the XP logic - I can translate it over to Lua

Whether or not you have to is a very good question. I imagine if all XP (at minimum) had a multiplier of 1.0 - you could just call AddXP with the boolean that disables multipliers.

To take care of multipliers below 1.0, I'm not really sure what to do for elegance - especially if you want it to be compatible with other XP mult mods.

#

I don't think that's in the game, but I always assumed the global XP mult impacted passives.

sour island
#

It doesn't

#

I am already disabling the multiplier

#

The issue is transcribing XP

#

When you use addXP it's by default at the least being *0.25

agile vigil
#

Well, it might be even less, with Slow Learner - should be 0.7 * 0.25 = 0.175 then.

sour island
#

Ideally the XP being transcribed would be that of a basic unemployed person

agile vigil
#

Yeah I can see that logic.

sour island
#

I don't really mind the slow learner tbh

agile vigil
#

But won't that cause issues where Slow Learners will transcribe ~42% too much XP compared to what they actually gained?

sour island
#

Yeah but I don't see the harm tbh

#

Fast learner would be transcribing less

agile vigil
#

Fair enough. I'm concerned about players (on dying and re-rolling) getting rid of Slow Learner and suddenly having higher XP values than before.

#

That also seems problematic. Unless you adjust of slow/fast learner upon reading the journal scratch

sour island
#

They'd have spent the time for it - if not more time

#

The XP is flat coming out

#

The multiplier is disabled

#

That's why the transcribe part is the tricky problem rn

agile vigil
#

This seems a big departure from how it works, currently, just to clarify.

Currently, skill books can be used to get large amounts of XP to write down in the journal. ๐Ÿ˜„

sour island
#

I know -- before the transcribing was addng post addXP() XP

#

You could make use of xpBoosts from books, and jobs/traits

#

I imagine alot of people will upset/confused

agile vigil
#

< Confused! ๐Ÿ˜„

sour island
#

Especially when the numbers don't match lol

sour island
#

:0

agile vigil
sour island
#

Well, gn

#

I'll keep you updated

agile vigil
#

Night, Chuck. I'm excited to hear what you figure out. I'll have to answer some of the same questions with my strategy, so ๐Ÿ˜„

sour island
#

I should be able to control TV issues though - I laid the ground work

agile vigil
#

๐Ÿ’ช

sour island
#

You could also tie in jobs and traits to the XP log to do what you want

agile vigil
#

That is definitely part of my thinking. Perhaps I'll even try something a little ludicrous like giving/removing traits while reading XP from my journal, so I don't have to hard-code any multipliers.

That way you could, for example, read a section by someone with Slow Learner, and temporarily have Slow Learner during that section.

rancid panther
#

i figured out my problem

#

needed to add a default profession without any free traits

faint jewel
#

is vehicle:getId() always the same?

eternal garnet
#

For anyone that has done a little Melee weapon coding.

For the Melee weapon code, does anyone know for the section for "PushBackMod", Is it the lower the stat for push back is, the more push back it actually does?, or is it the higher the push back stats is, the more push back it does?

I am looking at the Baseball Bat stats and it is showing as having a "PushBackMod" of 0.5, while Dumbbells have a "PushBackMod" stat of 0.5 as well, but then other weapons such as the Broken Bottle and Machete have a "PushBackMod" stat of 0.3, so I am not sure, as how can a Broken Bottle and a Machete have more push back as a pair of Dumbbells, or if it is going in the opposite direction, how is it that a Broken Bottle has more push back than a Baseball Bat.

The same for "SwingTime" as well, is the higher the number the quicker it is, or is it the lower the number is the faster it is?

opal rivet
#

I give it a try tomorrow

#

Might be cool

vital ferry
#

Hi. Has anyone made a "Cause of Death" mod or any other way to see what I was taking damage from when I die? Or at least what moodles were active?

patent quiver
#

Is there a way to reload mods while the game is running?

dark arch
patent quiver
dark arch
#

no, only lua unfortunately.

#

rip hdd users

patent quiver
#

Is there some attribute to make items grabbable through the context menu?

#

My item can't be grabbed despite being identical to other magazines. It also seems to float a little.

ancient grail
#

you have to do that using lua

#

Events.OnFillWorldObjectContextMenu.Add();

patent quiver
#

Cool, thanks.

ancient grail
#

sorry

#

Events.OnPreFillInventoryObjectContextMenu.Add()

#

here

#

the first one is for tiles the second 1 is for items

patent quiver
#

Or is there none

bronze yoke
#

what do you mean it can't be grabbed?

patent quiver
#

Via right clicking

bronze yoke
#

like you can't take it from a container?

patent quiver
#

From the ground

#

with the grab option via right clicking

#

I spawned in another magazine to test and I can right click it and there's a context option that says "grab magazine"

#

Can't do that with mine.

#

Gonna try out that function though

#

The official documentation can't be trusted can it

bronze yoke
#

what makes you say that?

patent quiver
#

I'm asking

bronze yoke
#

it can be trusted

patent quiver
#

Ok cool

#

Sometimes stuff gets outdated and not updated

#

you call a function and find out it goes by a different name and takes different arguments now

#

for example

#

That's why I was asking

bronze yoke
#

those docs are for 41.77, which means they are one version behind, but it's not major

agile vigil
#

As best I can tell, it's autogenerated from the actual code, so it can't get that far out of wack.

patent quiver
#

That's good to know.

bronze yoke
#

as far as this grab thing goes, it doesn't look like it's something item specific or anything

#

it should work for any item... i'm not sure why it's not showing up for you

agile vigil
#

Perhaps no space in inventory? scratch

patent quiver
#

No that's definitely not it

#

I can pick it up through the loot menu and it works for another magazine

#

Just not the one I created

#

The item has a bad tooltip, but I don't see how that could affect it. I assigned a tooltip name that doesn't exist.

bronze yoke
#

i think i saw a check for if it is has a name

#

you might be tripping that?

patent quiver
#

It has an actual name

#

But I'll give it a tooltip from another item and test just in case

dapper geode
#

Hi, how to disable a context menu that placed inside another contextmenu? I tried to disable some some contextmenu from More Building > Architecture > Wall Style > Gray Cinder Block > Gray Cinder Block Fence (this is the menu I want to disabled since it's buggy and exploitable by players)

agile vigil
patent quiver
#

If so, do I take the "Tooltip" key out as well or just leave the value blank?

dapper geode
# dapper geode Hi, how to disable a context menu that placed inside another contextmenu? I trie...

I tried using this event, but it's only trigger after I right click in the first time to open the contextmenu, so It says error because the script can't find "ContextMenu_GrayCinder_BlockFence"

local function OnFillWorldObjectContextMenu(player, context, worldobjects, test)
    local optionName1 = getText("ContextMenu_GrayCinder_BlockFence");
    local opt1 = context:getOptionFromName(optionName);
    
    opt1.onSelect = nil;
    opt1.notAvailable = true;
    opt1.toolTip = nil
end
Events.OnFillWorldObjectContextMenu.Add(OnFillWorldObjectContextMenu)
ancient grail
#

lol im trying to make all containers locked by default or atleast the stuff are hidden.. but what i accidentally did was every thing is empty... could be a usefull code tho

agile vigil
patent quiver
#

Cool, tooltip is gone then. We'll see if anything changes.

agile vigil
#

Probably not the exact issue, but perhaps you could show the source item, and your modded item so we can see the full changes? ๐Ÿ™‚

patent quiver
#
/*Source*/
 item MechanicMag1
    {
        DisplayCategory = SkillBook,
        Weight    =    0.1,
        Type    =    Literature,
        DisplayName    =    Laines Auto Manual - Standard Models,
        Icon    =    MagazineMechanic1,
        TeachedRecipes  =   Basic Mechanics,
        ReplaceOnUse    =   MechanicMag1,
        Tooltip = Tooltip_item_MechanicMag1,
        StaticModel = Magazine,
        WorldStaticModel = MagazineMec1Ground,
    }
#
/*Custom*/

item HeliBlueprint1
    {
        DisplayCategory = SkillBook,
        Weight    =    0.1,
        Type    =    Literature,
        DisplayName    =    Helicopter Repair Manual Volume 1,
        Icon    =    HeliBlueprint,
        TeachedRecipes  =   HeliComponent1,
        ReplaceOnUse    =   HeliBlueprint1,
        StaticModel = Magazine,
        WorldStaticModel = MagazineHeliBlueprintModel,
    }
#

and also this:

#
    model MagazineHeliBlueprintModel
    {
        mesh = WorldItems/Magazine,
        texture = MagazineHeliBlueprint,
        scale = 0.4,
    }
agile vigil
#

No alarm bells ringing here. Very strange about the missing context menu option. There must be something adding the Mechanics Mag to the context menu, since it doesn't straight up use the DisplayName or Category. (Unless the StaticModel is used for the context menu, which seems crazy)

patent quiver
#

Changes are superficial. Just names and textures.

#

Guess that's testable.

#

Nope.

agile vigil
#

I'm not finding it in the lua code easily. What was the phrase again "Take magazine"?

#

Grab magazine, you said.

patent quiver
#

Grab > "Item name"

agile vigil
#

Well it can't be the item name, surely, the other item is called "Laines Auto Manual - Standard Models"

patent quiver
#

For example - Grab > Electronics Magazine Vol. 1

Maybe item name was inaccurate

#

It's the item name

#

It does say "Grab > Laines Auto Manual - Standard Models"

agile vigil
#

At this point my best guess is your magazine is just in a cell that looks like you're clicking on it, but really it's in one of the cells nearby. Try picking it up, then dropping it from the inventory (without drag and drop) and see if you can right click at your feet.

patent quiver
#

Yea, I wanted to mention it seems like it might be floating a bit

agile vigil
#

(or if you do drag and drop, do it from inventory panel to inventory panel, rather than from inventory to world)

patent quiver
#

parts of the character model clip UNDER my custom magazine whereas that is not the case with the default ones

#

It's REALLY minor though.

humble oriole
#

What's the best way to disable xp gain for a recipe?

ancient grail
#

can anyone help. why my code isnt working

SES_C = {}
function SES_C.containerLockOutContext(worldobjects)
    for _, v in ipairs(worldobjects) do
        local square = v:getSquare()
        if square then
            for i = 0, square:getObjects():size() - 1 do
                local object = square:getObjects():get(i)  
                if object:isContainer() then 
                    if object:getModData()['spawned'] ~= true then
                        object:setCanBeLockByPadlock(true)
                        object:setLockedByPadlock(true);
                        if isClient() then object:transmitCompleteItemToServer(); 
                        object:transmitCompleteItemToClients() end
                        getPlayerLoot(0):refreshBackpacks()
                        object:getContainer():setDrawDirty(true);    
                    end
                end
                object:getModData()['spawned'] = true
            end
        end
    end
end
Events.LoadGridsquare.Add(SES_C.containerLockOutContext);
agile vigil
patent quiver
#

I didn't edit any models.

#

The custom model I'm using is just the mechanic mag model but with a different texture. That's the bottom part of the stuff I copied earlier

humble oriole
patent quiver
#

This is so minor but it's really bugging me

patent quiver
#

Events.OnPreFillInventoryObjectContextMenu.Add()

agile vigil
#

That's how you'd add it manually, but I doubt every item in the base game has this done manually.

patent quiver
#

Have you created custom items?

agile vigil
#

I'm loading up the game with one now, no modifications to models.

last flax
#

Anyone knows why this happens?

#

Or what means "SkinningData is null"?

agile vigil
patent quiver
#

bruh

agile vigil
#

I think it's related to how your model is acting, based on the info we have.

last flax
#

The warning appears with the doors and trunk, I think it has to do with their animations, because it does not happen with the hood animation

patent quiver
#

I haven't even started writing code yet and I'm having this many problems

patent quiver
#

Well this gives me something to go on

#

Thanks for the help

agile vigil
patent quiver
#

Yep, will do

patent quiver
#

I removed them

#

Could be that's actually what fixed it. Maybe it was syntax related somehow.

patent quiver
#

It's the fucking icon

#

Idk HOW

agile vigil
#

IT WHAT

patent quiver
#

Ok so I am using a file that's probably way too large

#

but

#

I just

#

I just don't understand

agile vigil
#

Yeah no, me neither.

#

That's wild

patent quiver
#

Sure enough, used the smaller version of the icon that I use for the magazine texture and it works.

#

That's absolutely insane. This is going to be a wild ride...

patent quiver
tropic tide
#

Hi all. I create a special bag in my mod (name TBoT.tbag) and spawn only one in the PZ World. I assign the variable tbag to this container to add some item in game. But when i reload game or create new caractere in the world, il loose the variable tbag ans so i can t add item in the bag.
My question, How can i keep the id of the bag in memory when i reload the game and reassign it to the variable tbag ?

ancient grail
#

that way you will be able to retrieve it

tropic tide
#

i understant but if i write the variable tbag it send me an error....

ancient grail
#

no imean write it on a file

tropic tide
#

i understand :
local player = getSpecificPlayer(0) tbag=player:getInventory():AddItem("TBoT.Bag_TBoT") local textebot=getModFileWriter("TBoT","tbag.txt",true, false) textebot:write(tbag) textebot:close()
Send me an error and write nothing

ancient grail
#

check if the file is actually there

#

and how you are reading it

#

print it to double check

tropic tide
#

the file is present but empty

ancient grail
#

cuz you did send it but when you read it it might be read as 1 string or array or what not

#

dpends on what you want it to be

ancient grail
#

cant u use moddata?

#

waht data are you storing it exactly

tropic tide
#

i dont know modata a quick explanation or link to understand ?

drifting stump
#

You cant save a java object

tropic tide
#

tbag=player:getInventory():AddItem("TBoT.Bag_TBoT")

#

tbag is the container... i can add item in it after that with :

#

tbag:getInventory():AddItem("Base.Pistol")

#

but when i reload the game tbag is empty

ancient grail
#

what is it that you are trying to achieve in the first place?

tropic tide
#

i give a bag to the player. he can put the bag everywhere. And script can interact directly with the bag in certain circonstance to give item

ancient grail
#

what do you mean by he can put everywhere

tropic tide
#

it s a bag.. he can put the bag on the floor

ancient grail
#

cant you just spawn another one

ancient grail
tropic tide
#

no , this bag was representating a sort of base. Keeping item Receive antoher one by script etc...

#

non i only want to obtain the bag ID to add item in it

ancient grail
#

i dont get it

tropic tide
#

there s only 1 bag in a world

ancient grail
#

idk.. id just despawn it and respawn it if it was my proj

#

like browser said you cant store the obj

tropic tide
#

how can i recup item in it and despawns it after reload ?

ancient grail
#

or table

#

someone else with more exp should help you this mod your trying to do is far to complicated for my experience

#

goodluck

tropic tide
#

thx for your help. You give me some idea

drifting stump
#

You cant do it that way

neon bronze
#

is there a way to see all possible events in-game? Or more specifically is there an event for when a player is freshly spawned in?

drifting stump
#

new character or started playing

neon bronze
#

new char freshly made

#

so also should fire when you die and make a new char in the same save file

drifting stump
#

could use oncreateplayer and store in moddata if youve performed whatever you want to

neon bronze
#

does it fire when i make a new char after my previous died?

drifting stump
#

should do

neon bronze
#

yep just found it

#

thanks

#
local function onCreatePlayer(playerIndex, player)
    local wallet = getPlayer():getInventory():AddItem("VM.Leather_Wallet")
    wallet:getInventory():AddItem("VM.10Bill")
    wallet:getInventory():AddItem("VM.5Bill")
    wallet:getInventory():AddItem("VM.5Bill")
end
Events.onCreatePlayer.Add(onCreatePlayer)

What am i doing wrong here??

smoky meadow
#

hey guys i just want to ask
can somebody explain what this modifiers all about?
ToHitModifier
AimingPerkCritModifier
AimingPerkRangeModifier
AimingPerkHitChanceModifier
AimingPerkMinAngleModifier

drifting stump
neon bronze
#

yeah that too, but it doesnt fire even after i fixed the name to OnCreatePlayer

#

that was the correct name of the event

#

actually where do such things go folder-wise?

drifting stump
#

client

neon bronze
#

hmm, seems like that doesnt fire for already active saves

#

i started a new save and it does work but on my already present save

drifting stump
#

did you enable the mod in the main menu or in the save

neon bronze
#

in the save

#

how can you alter what items spawn in the containers in the world?

tropic tide
ancient grail
#

The event itself

neon bronze
ancient grail
#

refer to my code here

#

@neon bronze

neon bronze
#

What is it for?

ancient grail
#

spawning right

#

item

neon bronze
#

Ah i see

#

But i think i got it correct now

ancient grail
#

you spawn with items on this mod

#

ow ok cool

neon bronze
#

Distributions.lua is responsible for spawning items in container right?

lapis glen
#

Hey/

#

I need help modifying a mod for my own usage

fast galleon
#

@neon bronze
ItemPickerJava is
but definitions are in lua, e.g Distributions,ProceduralDistributions, etc

neon bronze
lapis glen
#

So i do not need to pick the profession to select the traits

#

If anyone is willing to help please dm me

fast galleon
void fractal
#

or SHOULD be if the mod author didn't make it hard ofc

lapis glen
#

Great

#

he gave me some info already

void fractal
#

lemme sub to the mod so that i can make the traits non-profession

lapis glen
#

Wait just like that?

void fractal
#

well yeah it shouldn't be very hard lol

lapis glen
#

Was thinking i would do it hands down by my self with a bit of guidance

void fractal
#

do you want to do it yourself?

lapis glen
#

Yeah but with guidance of course

void fractal
#

ok ill still download it just to see how its put together

#

oh he made it really easy to make it non-profession

#

i believe

lapis glen
#

Ah!

#

So please guide where to go.

void fractal
#

right so are you inside the workshop folder

lapis glen
#

Yep

#

In "ui_en"

void fractal
#

you dont need to be in UI_EN that is translations

lapis glen
#

Ah

void fractal
#

you need to go to lua > client > insurgenttraits

lapis glen
#

Yep in there

void fractal
#

right so

#

lemme get the uh

#

pz modding thingy up to show u

#

do you know what traits are profession only?

lapis glen
#

Basically all of them.

void fractal
#

that shouldn't be the case...? all the traits seem to have profession set to off

#

this is how traitfactory.addtrait works

lapis glen
#

What?

void fractal
#

and the boolean that's called "profession" is set to false in basically all of them

lapis glen
#

But if you run the mod.

void fractal
#

let me run it rq

#

Ohhhh i see why it says profession false

#

it adds the traits to the trait menu when you select the profession

#

holdon imma have to do a bit of reading to see where that's handled

thick karma
sour island
#

Wouldn't that spawn the items every time the player loads in?

thick karma
#

Good point; I'll modify it to check whether I have the item first

#

Heads up appreciated! @sour island

pseudo ermine
#

this might be a super niche question but is there any mod that lets you configure multiple screens

#

as in

#

having the hud dedicated to a monitor seperately so its not on top of gameplay would be lovely

sour island
#

There's a mod that let's you do something like that but I heard it's pretty janky

#

You can move windows off the screen.
For example, you can move ingame health info panel to the edge of the screen and further.
It DOES NOT help with the second screen/monitor.

#

nvm

thick karma
pseudo ermine
#

nah im more of the "i must see all information all of the time" sorta guy

thick karma
#

Totally hear ya, n.w.

pseudo ermine
#

ty tho

thick karma
#

Yep!

#

Haha I am the play Sekiro hudless and feel like it's among the greatest things in singleplayer gaming kinda guy lmao.

pseudo ermine
#

oh i usually play fromsoft with autohud

#

besides ds1

#

i feel like sekiro hudless would be kinda annoying tho cuz i attack differently based on boss health lol

thick karma
#

Haha I do not

#

I play Sekiro 100% pressure never get hit

#

That's always my goal

#

My goal is not affected by boss health

pseudo ermine
#

fair just like for example

thick karma
#

Haha

pseudo ermine
#

mibu corrupted monk, for a handful of attacks you can either parry or dodge and get more hits in the punish

ancient grail
#

Hey @thick karma hello ๐Ÿ™‚

pseudo ermine
#

early in the fight, parrys do NOTHING because its on full health

thick karma
pseudo ermine
#

lmao

#

get health lower, parrys do more, change attack strat :p

#

anyway offtopic xd

thick karma
#

Haha eventually I got it all done but there were some tough fights.

pseudo ermine
#

fingers crossed a multi monitor hud mod comes out one day

thick karma
#

I didn't literally no-hit most bosses but I did one-shot everyone in Sekiro terms (I played through game reloading on death, so I didn't use respawning)

pseudo ermine
#

ahh fair

thick karma
#

Which is not easy since many bosses CAN one-hit you

#

If you don't use respawns

pseudo ermine
#

i got to owl on a kusabimaru-only no-WA no-upgrade run but quit just cuz i got bored and the poison attack lmao

thick karma
#

And I did no-hit a good handful of them after dying a lot

thick karma
pseudo ermine
#

more of a souls palyer tho

thick karma
#

That's what makes it so awesome

pseudo ermine
#

yeah

thick karma
#

Always brutal but surmountable

#

Even first boss is beatable

pseudo ermine
#

lol yeah

thick karma
#

Albeit with great effort

#

(I reloaded until beating him too)

pseudo ermine
#

i was super dissapointed when i beat early genichiro after i went into ng+

thick karma
#

Bahahaha

#

I feel like in NG+ he is not too bad

pseudo ermine
#

cuz i was like "really, vanguard demon gave me a bunch of loot and a dragon god easter egg and sekiro i literally parry him then the same animation plays???"

thick karma
#

In NG when you have nothing it's p rough but doable

pseudo ermine
#

i usually manage it on NG

thick karma
#

TBH I had more trouble beating opening "unbeatable" boss of Elden Ring

#

That took more hours of practice for me than Genichiro

#

(with a Warrior)

pseudo ermine
#

meh i didnt like ER so never played another run, didnt actually beat it

thick karma
#

(not with a damn bow and shield pssh)

#

The windows for not taking damage by dodging in ER are small, character is slow, and opening boss swings everywhere lmao

pseudo ermine
#

lol

thick karma
#

Sekiro instinct to dodge toward things helped me win that, but it was still extremely hard.

pseudo ermine
#

i got to mohg margott margit mongoose (dude in lyndell capital with a sword thats the same model as the first required boss)

thick karma
pseudo ermine
#

was like level 50 and just went... yeah nah im not having fun anymore

thick karma
#

Now if you like SP action

#

you HAVE to play Sifu

pseudo ermine
#

lmao

thick karma
#

That game is a gem

pseudo ermine
#

i played er no magic no summons or spirit emblems

thick karma
#

Oh yeah I never used magic in my first run lmao

#

Booooo

#

Cut counter dodge jump

#

And grapple when allowed

pseudo ermine
#

devs sold out

#

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

thick karma
#

Are they eventually putting Sifu on Steam?

#

I actually had no clue

pseudo ermine
#

yea in march

thick karma
#

I grabbed on Epic because I couldn't resist, was too hyped for that game.

pseudo ermine
#

fair

thick karma
#

And I have resisted before

pseudo ermine
#

id argue its better to pirate it *then get it on steam but meh

thick karma
#

I waited for FF7R (and I)

thick karma
pseudo ermine
#

well if you know ur gonna pay for it when it comes to steam anyway and stick to that moral, then its fine imo

#

means you dont give epic money, therefore tencent and even the ccp money lmao

thick karma
#

But then again ethically probably better still to drop out of the society of greed and blood entirely, but here I am playing games and making them more appealing to people for free

#

lmao humanity!

agile vigil
#

@sour island
Unrelated to the XP thing you're working on, I think I found a reasonable way to do XP-while-reading with only decoration.

Essentially, when starting a read, ISReadABook:new, I set the number of pages on the book (and the unread page count on the player) to a suitable amount for the XP stored (and not yet read).

Then I decorate ISReadABook:update and ISReadABook:stop for updates to the read page count and whenever you successfully read a page, I award the next N xp.

It's fairly simple code, and means it has compatibility with read faster while seated, while walking etc. mods out of the box.

pseudo ermine
#

i just think its a shite company, every game ive pirated besides abandonware and played for over 2 hours ive bought on steam

#

except danganronpa 1 which i still have to re-buy actually

neon bronze
#

Anyone knows how you can add Scrollbars to your panel?

thick karma
#

For sure. Honestly, if I had a reliable pirated copy available at the time I was trying to play Sifu, I would have been open to it

#

But ultimately I had $40 and didn't want to spend time looking, or dealing with update hassles, etc.

pseudo ermine
#

fitgirl has it

#

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

thick karma
#

well now it's a bit late

pseudo ermine
#

lmao

thick karma
#

I don't think Epic's gonna refund me haha

#

I've got like 100+ hours in

pseudo ermine
#

they dont refund people even if they dont get their content ๐Ÿ’€

thick karma
#

I admitted the game was good when they asked

#

Bahahaha

#

Ya know?

pseudo ermine
#

hm?

thick karma
pseudo ermine
#

oh yeah

thick karma
#

It's their review system

#

Definitely designed to inflate scores

#

No doubt

pseudo ermine
#

i know and its incredibly dumb and clear what they are doing

#

yeah exactly

thick karma
#

But nevertheless I answered honestly about Sifu

pseudo ermine
#

because big shareholders at game publishers dont like steam reviews

thick karma
#

Because that game was 100% worth my $40

#

I think every 6 year old should have to beat Sifu without dying.

pseudo ermine
#

even tho basically all consumers love steam reviews because they are an amazing system for any site to have so clearly labelled

thick karma
#

When they succeed, they can go back to normal school.

pseudo ermine
#

lmao

thick karma
#

Why are you laughing at my plan for fixing America?

pseudo ermine
#

its my panic reaction when i see an idea so impeccable

thick karma
#

๐Ÿ˜„

pseudo ermine
#

can we bring this to the UK too i believe we can benifit from such a system too

thick karma
#

Definitely, and after a few test launches we'll go global

#

Sifu Saves the World 2023

pseudo ermine
#

\[T]/

thick karma
#

Not just in gaming

pseudo ermine
#

yeah

thick karma
#

But shout-out to Amazon for adding the precise average in tiny font beside the โญ recently, that is pretty clutch

pseudo ermine
#

its like tim sweeny simply doesnt understand that steam is so dominant because of good features and putting the consumer first

thick karma
#

Nice to not have to mouseover or click anywhere to know exactly what the positive rate is

#

I WISH Steam did that

pseudo ermine
#

they arent perfect, the refund systems ahve been hit and missed and they have fucked around and found out with french laws

thick karma
#

ESPECIALLY FOR MODS

#

Steams review system for mods is honestly garbage

#

lol

pseudo ermine
#

agreed

thick karma
#

So many consumers think a 3-star mod is ~60% positive rate

#

So damn confusing.

pseudo ermine
#

they also spurred on the lootbox system with csgo and tf2 cosmetics but still steam just has so many features and stuff

thick karma
#

for terrible reasons

#

basically bad people modders ruined it for everyone.

pseudo ermine
#

a h

thick karma
#

So now instead of being a bad representation of the scores of bad modders' mods, it's a bad representation of ALL mods that haven't achieved sufficient popularity.

#

Oof nice fix Steam

pseudo ermine
#

ahh igy

#

i prefer nexus anyway in general

#

its a bit less convinient and FUCK having to subscribe for download speed (and log in for any downloads)

#

but i find the site to just be rly nice to use and find old versions and stuff

thick karma
#

(If you're unaware, your positive rate is not directly tied to stars until like 200 reviews on Steam, but shows up long before that. I have mods that had 93% upvotes that were showing up with 3 stars because they hadn't been rated enough. My 98% still has 4 stars).

pseudo ermine
#

oh thats so ass

thick karma
#

Oh it's super ass

#

Someone showed up on one of my mods asking why it was rated so low when it works well

#

I was like TYSFM FOR ASKING lmao

pseudo ermine
#

im rly casual with mods and only tend to use popular stuff anyway but i see how that can fuck over new modders

thick karma
#

Because I don't want to just whine about this at the top of my mod descriptions

#

But given a chance to answer someone in my comments oh yes.

pseudo ermine
#

yea

thick karma
#

I see it as a huge and stupid and easily avoidable issue

pseudo ermine
#

thanks for the tip lol ill make sure to check actual comments and stuff on "low rated" small mods :p

thick karma
#

Yes indeed I have learned the same

pseudo ermine
#

how hard is modding pz?

#

it seems like a fairly easy one to get started with

thick karma
#

I mean it's pretty subjective based on your programming / modding experience

#

I have probably above average programming experience and some modding experience coming into things