#mod_development

1 messages · Page 391 of 1

cursive roost
#

but serverside

bold drum
#

It is processed by the server?

cursive roost
#

I think so, yes

bold drum
#

Ok. Thanks man.

upper bough
#

Yeah zombies were made serverside in Build 33 or 34 I think

odd dagger
#

Any ideas for buildings

faint aspen
#

a big hostel

amber harbor
#

A huge tower.

#

Like the apartment complex.

#

I miss that thing.

odd dagger
#

hm

#

i already have a hotel

#

anymore?

vernal jackal
#

abandoned military base

next narwhal
#

^^

vernal jackal
#

@cursive roost You don't happen to know if ammunition in PZ is handled as "drainable" from memory?

cursive roost
#

I don't think it is

#

just Item IIRC

vernal jackal
#

ok ... might snoop through the code then

#

thanks

upper bough
#

What's up with PlaySound no longer looping? I took a peek at SoundManager's class file, and it seems that all of the PlaySoundWav functions are now just a single-line that returns null, PlaySound just calls emitter() and only passes the name arg to it so the loop setting nor any of the other args will matter, PlayWorldSound works fine but as it's a world sound it only creates the sound at the square and radiates outwards, and I haven't been able to get PlayWorldSoundWav to work at all

#

It's kind of odd that looping support was dropped, and PlaySoundWav was completely depreciated. I'd assume the new FMOD system from build 33 (or was it 34? can't remember) might be responsible for this? It'd explain why PlaySoundWav was depreciated, perhaps FMOD doesn't support it, and it'd also explain why PlayWorldSoundWav won't work at all for me (maybe it was meant to be removed but somebody forgot to)

upper bough
#

The emitter system seems to be screwed, too. I tried this: local emitter_ = getWorld():getFreeEmitter(); emitter_:PlaySoundLooped("saber_idle_2")

#

every function in BaseSoundEmitter, which it seems that most of the audio-related class files use, returns an error as it was trying access it like a table. I did a quick check using type() and it's userdata, so I tried using getObjects() and that errored out too.

inland gull
#

to use looped sound i do them directly with fmod studio

#

because fmod studio rocks anything anyway.

#

sure you're sound is in a bank, etc?

upper bough
#

it's a normal .ogg file

inland gull
#

ah, ok

#

i'll need to check then

upper bough
#

just curious, what were the reasons for the depreciation of PlaySoundWav?

placid delta
#

someone please tell me how to load a gun with LUA

vernal jackal
#

"Load" as in "fill with bullets"?

placid delta
#

yes yes

#

the result of pressing r with ammo in game while holding the gun

#

like getPlayer():getPrimaryHandWeapon():setProjectileCount(15)

#

getProjectileCount exists but setProjectileCount does not

#

some people sayingyou just set moddata.roundChambered = 15 or something but that doesnt work

upper bough
#

local primaryHandItemData = getPlayer():getPrimaryHandItem():getModData();
primaryHandItemData.currentCapacity = primaryHandItemData.maxCapacity

#

try that, @placid delta

placid delta
#

not working for me. they really use moddata to keep track of shots?

upper bough
#

I think so, yeah

placid delta
#

this only seems to work for the Local player. Im trying to give loaded guns to other Players I spawned.

#

well w/e i just made it so it loads the gun in local players hand then pass it into the clones hand afterwards

next narwhal
#

How do i edit a soundbank?

vernal jackal
#

Maybe this helps

#
Open FMOD Designer 2010.
Open the .fdp file used to create the .fev and .fsb.
Navigate to the Sound Defs view.
In each sound def, replace the audio files with the new audio files.
Navigate to the Banks view.
Ensure that each audio file is in the correct bank.
Build the project.
Replace the .fev and .fsb files in your game with the newly built ones.
#

Wether the fdp file is available is a different question

next narwhal
#

I mean

#

.bank files

vernal jackal
#

Ah I assumed we were talking about FMOD soundbanks.

#

Sorry

next narwhal
#

Soo how do you edit these??

vernal jackal
#

never heard about .bank files

#

wait ... that is a FMOD soundbank file!?

#

hm

#

I found this on Darkest Dungeon ...

The .BANK files are information packets used by FMOD audio software and are accessed by the game engine they were created for.
Therefore you cant open up and modify any of the .BANK files without accessing the original project pack in FMOD.
#

Guess we'll have to ask @inland gull

fleet folio
#

I kinda disliked FMOD when it was introduced because it rendered my costum music packs unusable

next narwhal
#

same

#

I want to edit the bank files to make my custom music packs useable

#

again

#

fmod sux

crisp thunder
#

Hmmm...haven't messed with fmod in some time, but I thought .bank files were for FMOD Studio & .fsb/.fev for were FMOD Designer...

drifting ore
#

You can still use .ogg files with PZ despite the change to fmod. at least, ORGM's working fine with them.

next narwhal
#

How do i then.. modify the music files ogg?

#

They don't want to play.

#

I changed them

#

but the originals play

#

only

fleet folio
#

@drifting ore Tells us NAO!

drifting ore
#

Not sure if the music files bheave differently, but we're stil using the OGG files that were included with ORGM for gun sounds.

#

You can see it in Red-Pak; it had to be updated to fix a few issues with sound not being heard from far away, though. Credit goes to @silent mural

upper bough
#

problem with playsound is that it only takes in the name arg, all others passed to it aren't used

#

so looping is therefore broken since it straight up won't include it when creating a new emitter

drifting ore
#

Makes sense, Double. One for @inland gull Then. 😦

noble marten
#

ok im testing that discord for the 1st time

river plinth
#

I need to fire a function when a player kills a Zed

#

Events.OnZombieDead seems only to work in SP, not in MP

#

Am I using it wrong? Tried my code in client, shared and server but with no result

vernal jackal
#

I think someone else asked the same question a few days (weeks?) ago Dr.Cox

#

Wish Discord had a search function 😦

#

@river plinth Check Oct 4th

#

I think RJ replied afterwards

river plinth
#

ah, found it here

#

didn´t thought about looking through the posts here, only searched the forum

#

seems like it does work when processed clientside

#

so I think it has something to do with my player determination

vernal jackal
#

Aye, wasn't sure if a solution was found.

#

Just remembered someone asking.

river plinth
#

hm, looks like I´m still to dumb to use it

#
CoxisShop.Init = function ()
   if isCoopHost() then
       print("...CoxisShop...INIT COOP HOST")
       Events.OnZombieDead.Add(CoxisShop.onZombieDead);
       print("...CoxisShop...INIT COOP HOST DONE")
    end
end
CoxisShop.onZombieDead = function()
    print("Here in onZombieDead")
end
drifting ore
#

As far as I know, zombies die on the esrver not the client, so for it to work, the server would have to send a message to the client. Not sure how you'd capture it.

cursive roost
#

what @drifting ore said @river plinth

#

OnZombieDead runs serverside

#

also... define the function BEFORE adding it to the event queue

#

in your code you add a pointer to nil to the Event

river plinth
#

@cursive roost I´m currently testing it with hosting through the game, so just to get things straight: my code is in lua/server (of course in it´s seperate mod folder), to check if it´s hosted local I need isCoopHost(), so my only error is defining the added function after I added?

vernal jackal
#

Ah ... wasn't that the weirdness with javascript-like function syntax?

#

but then again if init is called the variable shouldn't be nil anymore regardless of how you defined the function!? @cursive roost

#

I just woke up so maybe it's just a brain fart on my end.

river plinth
#

sorry guys, I´m still to dumb to figure this out

#

my current code (rewritten all and done only the necessities I think):

vernal jackal
#

that's not a lot 😄

#

😛

river plinth
#

damn you^^

vernal jackal
#

:D:D

river plinth
#
CoxisShopServer = {};

CoxisShopServer.afterZombieDead = function()
    print("Here in onZombieDead")
end

CoxisShopServer.InitServer = function()
    if (isServer() or isCoopHost()) then
        print("...CoxisShop...INIT SERVER")
        Events.OnZombieDead.Add(CoxisShopServer.afterZombieDead);
        print("...CoxisShop...INIT SERVER DONE")
    end

end

Events.OnServerStarted.Add(CoxisShopServer.InitServer)
Events.OnGameStart.Add(CoxisShopServer.InitServer)
next narwhal
#

cool stuff boy

river plinth
#

strange thing: when hosting through the game the OnServerStarted events never execute, that´s why I need to use OnGameStart I guess?

vernal jackal
#

Are you sure you have the correct event? I'm totally out of the loop with the latest events so I can't help you with that 😦

river plinth
#

OnGameStart get´s at least executed

#

didn´t find any other event in the sourcecode with jd-gui

#

that would fit better

vernal jackal
#

So you get the debug output with OnGameStart, but not with OnServerStart?

river plinth
#

oh, and the lua is in C:\Users\Dr_Cox1911\Zomboid\mods\CoxisShop\media\lua\server

#

yep, debug output with OnGameStart but not with OnServerStarted

vernal jackal
#

Have you tried with something simple (without if conditions)?

Events.OnServerStarted.Add(function() print('foo') end)
river plinth
#

honestly didn´t test it with a normal dedicated server, wanted to get it to run with coophost first

vernal jackal
#

hm maybe that's your problem? maybe the event isn't fired for coop?

river plinth
#

just tried your line of code, doesn´t get fired in coop

#

you mean the OnZombieDead event doesn´t get fired in coop?

vernal jackal
#

I mean the OnServerStarted

river plinth
#

OnServerStarted definately doesn´t get fired in coop, that´s why I use OnGameStarted, which does get fired

vernal jackal
#

I always thought coop was completely separated from the whole MP / Server stuff

river plinth
#

works like a charm on dedicated server, don´t know what´s up with coophost though

#

bug? is this used in another mod successfully?

cursive roost
#

Coop isn't a "real" server

river plinth
#

seems to be some kind of in-the-middle thingie, the onZombieDead isn´t fired on the "server" nor the client

next narwhal
#

Coop isnt a real server?

#

...

#

My life has been a lie all this time.

vernal jackal
#

Coop has always been strange in terms of implementation.

cursive roost
#

I'm not on linux right now, so can't grep through the source :/

next narwhal
#

When will we be able to create "Custom Moodles"

vernal jackal
#

You already are able to create them yourself.

river plinth
#

I need your help again guys, I´ve got a listbox and need to run a function when an item is selected. To do that I thought I could use the "onmousedown" and passing my function to it. This kinda works, but in the said function I loose the "self"-reference and therefore don´t have any access to the elements inside the class

#

anyone ever worked with a listbox and know how to maintain the "self"?

vernal jackal
#

depends

#

show me your function real quick?

#

Lua has the self:foo( a, b, c ) syntax which is the same as foo( self, a, b, c )

#

so depending on your function you simply could pass the self "manually" as the first parameter of your function 🙂

#

Ah I just looked at your post on the forums. You don't have any controll over how onmousedown is called, right? If you want to, PM me your code and I'll try to figure it out when I get back home.

river plinth
#

thanks for the offer @vernal jackal , but right now the mod isn´t very comfortable to use 😳

#

if you really want I can send you the mod, but as of right now it´s a pretty mess and needs a dedicated server to work (haven´t unbundled the settings-loading from the server yet, so that the client can work on it´s own)

next narwhal
#

How do you create a "Custom Moodle" anyways?

#

I want to add a Radiation moodle mod.

cursive roost
#

right now, I don't think you can

#

last time I looked into it, the answer was:

#

"It's still a Java relic from the old days. Rework with mod support will come some day, though."

#

so right now, you can't do it from Lua

#

you can simulate one, maybe, but there's no easy way right now.

vernal jackal
#

@next narwhal Modify the java source.

cursive roost
#

or that

timid kite
#

O

#

But, i look into other distributions and the didn`t close it

#

they

river plinth
#

what mod did you check?

timid kite
#

For example Horizon Clock

#

here it is

river plinth
#

do you get any errors or just not spawning the stuff?

timid kite
#

mod working

#

but just not spawning items

river plinth
#

hm, never used it without a function calling it, do you find the file being loaded in the console.txt?

timid kite
#

not looking up this

#

now looking throw

#

wait pls

#

are u about console which opening with starting game?

river plinth
#

yep, you can check that in C:\Users\YOURUSERNAME\Zomboid\console.txt

#

maybe it get´s loaded to soon and can´t add the items because of that

timid kite
#

wait

#

checking now

#

no

#

I see Items etc, but cant see distribution

river plinth
#

do you mind uploading it?

timid kite
#

console?

river plinth
#

yep, console.txt

timid kite
#

okay

#

second

#

but i just load in main menu, i didn`t join the game

#

I should?

river plinth
#

your mod was active? Honestly I don´t know when the game loads the distribution if it´s not within a function

next narwhal
#

suburbs distribution is a bit weird

timid kite
#

mod active

#

because I see crafts

#

from my mod

#

Help me, please 😫

river plinth
#

as expected, the game doesn´t load your distribution at all

#

try the function thing and it will work

next narwhal
#

Suburbs distribution file is from 0.2.0q versions btw.

#

Older versions

#

They dont work in new versions.

river plinth
#

don´t know what you are talking about @next narwhal

#

they work just fine

next narwhal
#

Not at all

#

I tried modifying them

#

IT didnt work at all

river plinth
#

you aren´t supposed to modify the actual file

#

instead add items to the table and the game will distribute them

next narwhal
#

Ohhh

#

INteresting.

timid kite
#

@river plinth "instead add items to the table" how?

river plinth
#

just as you are doing (the table.insert does the thing)

timid kite
#

"try the function thing and it will work" I do not understand

river plinth
timid kite
#

right?

river plinth
#

second screenshot should work, don´t forget to save though

timid kite
#

okay

#

now testing

river plinth
#

if it doesn´t work, than I fear I can´t help you ☹

timid kite
#

vernal jackal
#

@river plinth Do you know where the onmousedown callback is called?

river plinth
#

@vernal jackal If i`m understand you rightly you mean the following code

#
function ISScrollingListBox:onMouseDown(x, y)
    if #self.items == 0 then return end
    local row = self:rowAt(x, y)

    if row > #self.items then
        row = #self.items;
    end
    if row < 1 then
        row = 1;
    end

    -- RJ: If you select the same item it unselect it
    --if self.selected == y then
    --if self.selected == y then
        --self.selected = -1;
        --return;
    --end

    self.selected = row;

    if self.onmousedown then
        self.onmousedown(self.target, self.items[self.selected].item);
    end
end
vernal jackal
#

Yes

river plinth
#

already thought about just redefining this code-section, but don´t know if it would be the way to go?

vernal jackal
#

Ok I see the problem. The onmousedown callback has a predefined list of variables so we can't fix it there... in your case I don't understand what _onmousedown is because from the code above it looks like it should be an item.

function ISCoxisShopWeaponUpWindow:checkPrice(_target, _onmousedown)
    local splitstring = luautils.split(_target, "|");
    print(splitstring[2]);
    
    print(tostring(self.char:getModData().playerMoney));
end
#

Where is self.char stored in?

river plinth
#

in ISCoxisShopWeaponUpWindow

timid kite
#

It isnt working -/-

#

river plinth
#

I think I should elaborate a bit more, with the "self" in this function I planned on accessing my instance of ISCoxisShopWeaponUpWindow, which holds the char that has opened the window

timid kite
#

You can`t help me? :с

vernal jackal
#

@river plinth Ok in this case you could try using IsCoxiShopWeaponUpWindow directly?

river plinth
#

@vernal jackal You simply mean this: ```LUA
print(tostring(ISCoxisShopWeaponUpWindow.char:getModData().playerMoney));

#

but than it´s calling char which is nil (because it´s not defined for this instance)

vernal jackal
#

hmmmmmm

#

Ah yes ... I forgot how the PZ OOP works 😛

#

You are probably right about changing the listbox.

#
    if self.onmousedown then
        self.onmousedown(self.target, self.items[self.selected].item, self);
    end
#

or

    if self.onmousedown then
        self.onmousedown( ... );
    end
vernal jackal
#

@river plinth Can't think of a much better solution :/

river plinth
#

currently trying it, somehow the split throws now an error (worked like the last 100 tries but just now, it doesn´t)

#

anyway, to late for me to get on a bughunt, thanks rm-code

#

will work on it tomorrow and update the thread if it works

vernal jackal
#

No problem

#

(I like to assert parameters during bug hunting ... helps a lot)

#
assert( type( foo ) == 'string', string.format( 'Expected a string. Received %s', type( foo )));
#

Discord really needs scrollable script panels 😛

river plinth
#

since robo isn´t here I hope you @cursive roost can help me out

cursive roost
#

maybe

river plinth
#

I´m using sendClientCommand with the OnGameStart event, only problem: the game doesn´t seem to be ready to receive anything from the server just yet (registered my function to receive the command with "Events.OnServerCommand.Add(CoxisShop.ReceiveServerCommand);"

#

I´ve looked through the sourcecode and think I found the culprit within "IngameState.class", it sleeps for 10 seconds before it updates the GameClient state (indicated with "Waiting for player-connect response from server" in the console)

cursive roost
#

why do you need to do that on game start?

river plinth
#

what else event could I use?

cursive roost
#

what do you want to do?

river plinth
#

again looked through the source but nothing seems to be triggered after the state change

#

what I want to achieve: after a player logs in it tells the server with sendClientCommand, the server then sends the client some settings

cursive roost
#

are those settings necessary at that point?

river plinth
#

the sending and recieving works fine (tested it with a button that fires the communication)

cursive roost
#

how about "OnConnected"?

river plinth
#

I want to pretty much only transmit the data once, hence why the initial connecting seems the way to go

#

OnConnected fires way before during the loading process, seems that the client is only able to receive servercommands once the 10 second sleep mentioned above is done

cursive roost
#

ah, okay

#

hmm

river plinth
#

here is the bit of the java class: ```JAVA
System.gc();

LuaEventManager.triggerEvent("OnGameStart");

LuaEventManager.triggerEvent("OnLoad");
if (GameClient.bClient)
{
  GameClient.instance.sendPlayerConnect(IsoPlayer.instance);
  
  DebugLog.log("Waiting for player-connect response from server");
  while (IsoPlayer.instance.OnlineID == -1)
  {
    try
    {
      Thread.sleep(10L);
    }
    catch (InterruptedException e)
    {
      e.printStackTrace();
    }
    GameClient.instance.update();
  }
  LightingThread.instance.GameLoadingUpdate();
}

}

cursive roost
#

OnGameStart, add a function to EveryTenMinutes, then remove the function on first firing

river plinth
#

I can remove events?

cursive roost
#

I believe so, yes.

#

Otherwise

#

just create an array where you store who you sent data to

#

iterate that EveryTenMinutes

#

it shouldn't be that resource heav

#

y

river plinth
#

hm, haven´t thought about the array thing, will try how it works out

#

didn´t find a way to remove events though (at least not in LuaEventManager)

#

thanks!

cursive roost
#

It works just like adding a function

#

Events.OnGameStart.Add(foobar)

#

Events.OnGameStart.Remove(foobar)

#

zombie/Lua/Event.java

river plinth
#

ah, thanks again! Was looking in the wrong thing than (addEvent is in LuaEvenManager, that´s why I thought remove would be in there as well)

cursive roost
#

addEvent creates an entirely new event

#

it doesn't add functions to existing triggers

river plinth
#

hm, I should have looked at the function I guess 😊

vernal jackal
#

I am here now, but I don't have any clue about what you just asked 😛

void echo
#

lol

bold drum
#

Solved, I found it in your Github home page.

river plinth
#

@bold drum sorry, forgot to add a link in the first post

#

did you gave it a test yet?

bold drum
#

Yes, the work is good.

#

I use the Chinese language, English is not the problem.

#

And if I write a nonexistent item in CoxisShopSettings.ini, I get an exception.

#
-----------------------------------------
STACK TRACE
-----------------------------------------
function: create -- file: ISCoxisShopPanel.lua line # 65
function: initialise -- file: ISCoxisShopPanel.lua line # 33
function: createChildren -- file: ISCoxisShop.lua line # 86
function: instantiate -- file: ISUIElement.lua line # 580
function: addToUIManager -- file: ISUIElement.lua line # 883
function: showUpgradeScreen -- file: CoxisShop.lua line # 55
function: onKeyPressed -- file: CoxisShop.lua line # 94
java.lang.RuntimeException: attempted index: getDisplayName of non-table: null
        at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1549)
        at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:623)
        at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
        at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1727)
        at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1672)
        at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:53)
        at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:81)
        at zombie.Lua.Event.trigger(Event.java:37)
        at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:83)
        at zombie.input.GameKeyboard.update(GameKeyboard.java:48)
        at zombie.GameWindow.logic(GameWindow.java:574)
        at zombie.GameWindow.run(GameWindow.java:1238)
        at zombie.GameWindow.maina(GameWindow.java:1018)
        at zombie.gameStates.MainScreenState.main(MainScreenState.java:177)
-----------------------------------------
STACK TRACE
-----------------------------------------
river plinth
#

thanks for reporting! What item did you add? As of right now, I don´t check if the item is legit (I don´t have a strategy on how to do so yet)

#

hm, strange with the language, the buttons at the top worked fine for me when selecting german

#

could you send me the chinese translation?

vernal jackal
#

@river plinth Are you measuring the string length?

#

Could be a problem with the font returning wrong width values?

river plinth
#

nope, guess i need to do that

#

tested long strings, I guess normal font returns the correct width

bold drum
#

Sure

river plinth
#

thanks @bold drum , don´t have the time to look at it today, will try this length thing the next couple of days

bold drum
#

Look forward to the new version.

#

Translation file has been requests to merge into your Github Dev branch.

cursive roost
#

@river plinth You should add CoxisUtil as a Mod dependence on the Workshop

river plinth
#

@cursive roost thanks the tip! Thought that the "require" in the modinfo does that automaticly

#

guess I was wrong

cursive roost
#

it'll automatically actiate the dep in PZ

#

but steam couldn't possibly know about that

river plinth
#

thought that uploading through the game would parse this info to steam

cursive roost
#

no, sadly not

bold drum
#

@river plinth Any player on the server to kill the zombie will trigger AfterZombieDead function?

This will lead to all online players get the money.

cursive roost
#

@river plinth Also, make the key configurable

#

o is already occupied for me :/

vernal jackal
#

or what blindcoder did 😄

river plinth
#

thanks @bold drum for the report, will get on it, will include the key configurator, but all of this will have to wait unfortunately, no time for coding today 😢

cursive roost
#

no worries

#

I have a loeng TODO myself 😄

cursive roost
#

@river plinth You're welcome 😄

river plinth
#

@cursive roost thanks! one thing that I can remove from the todo-list

river plinth
#

@cursive roost I hate the windows github client 😡

#

merged into the wrong branch and now it want´s to push my dev into your dev branch instead the other way around 😫

#

back to console I guess, that at least doesn´t screw up without me telling it to 😂

vernal jackal
#

I used source tree for quite a long time.

#

it has a nice vizualisation of the git tree

#

maybe you can undo your merge and cherry pick the correct commit?

#

(no idea how it works with merge since I usually rebase for a fast-forward merge)

cursive roost
#

eww

#

never do fast forward!

#

you can't easily unmerge

#

git merge --no-ff <branch>

vernal jackal
#

but I prefer a clean history 😛

atomic zodiac
#

Can some explain to me how to ge the worchench in hydrocraft. Is there a bookni gotta read first. Cant seem to find jack nm on the webs

cursive roost
#

@river plinth I suppose you didn't really want to push into my repo, so I'm closing the PR?

river plinth
#

@cursive roost yep, close it please

cursive roost
#

oops

#

@river plinth bug: no money when killing zombies by pressing space 😦

#

was in wrong channel 😄

river plinth
#

are you sure that the rng didn´t strike you?

cursive roost
#

oh, you don't get money for every kill?

river plinth
#

nope, you can set it in the settings ini

cursive roost
#

ah, okay

#

I'll keep teh window open and check

#

okay, I just got some for a space kill

river plinth
#

I´ve rewritten the MP part of the mod to get rid of the "all players earn money"-part but need to wait for an answer of TurboTuTone regarding LuaNet on Steam before putting it out there

cursive roost
#

LuaNet?

river plinth
#

Turbo has written an awesome mod called LuaNet back when ApCom was still a thing

#

a framework to allow enhanced message stuff in PZ

#

like package to a specific player from player or server alike

cursive roost
#

oooh, nice

devout zephyr
#

oh hiya

#

gonna pm you dr cox

cursive geyser
#

I just realized where your name comes from Turbo. At least I think I do. lol I miss that show.

cursive roost
#

@river plinth you pushed a PR again?

river plinth
#

@cursive roost nope (?)

cursive roost
#

yes, the CN update got pushed to my PR again

#

maybe I didn't close the PR correctly...

vernal jackal
#

PUSH ALL THE UPDATES

cursive roost
#

okay, it was still open

#

and since you opened the PR from :dev and pushed to it, it got added to the PR

vernal jackal
#

doesn't @river plinth have to remove the remote from his local repo?

river plinth
#

that´s the only comment I merged (directly on github, not through gitshell/windows prog)

#

atleast github states that it only pushed it to coxisshop:dev

vernal jackal
#

ok strange

woven basin
#

Sorry to be that guy, but i've been looking around and i just can't find any map editing tools for the life of me. Where do i get them?

bold drum
#

steam://install/380880

timid kite
#

Can I make furniture piano play sound?

#

Anyone know how do it?

river plinth
#

@timid kite don´t know if this would work: upon right clicking check if the square has the piano (could work with instanceof, don´t know though) and then add a option to the context menu to play the piano

timid kite
#

How add the option to context menu?

vestal crypt
#

there was a mod for pianos to play, maybe you can find some of the piano code in there 😃

timid kite
#

Can you send it to me, I cant find it, sorry

vestal crypt
#

but seems like he deleted it from the workshop, cause it wasnt working with the new sounds

timid kite
#

thx

woven basin
#

@bold drum Sorry for the late response, but i click the link and nothing happens except that i'm brought to the steam store front page

vestal crypt
#

@woven basin check on your steam tools, there it is the project zomboid modding tools with all you need

woven basin
#

@vestal crypt I only have the PZ dedicated server there, odd.

vestal crypt
#

well, is another tool just like that one, check on the tools list to see if its unistalled, the link @bold drum gave you, was a steam link to install it from it

woven basin
#

It's not there for some reason

#

I tried restarting Steam but it's still not there, and the link won't work still.

vestal crypt
#

not sure, but maybe it has something to do with the iwbums version?

drifting ore
#

I can use the link and I am not in iwbums

woven basin
#

I am not in IWBUMS but it still wont work.

vestal crypt
#

well, then it is kinda strange not appearing for mega

drifting ore
#

Yeah

#

Are you clicking the link or pasting it somewhere?

woven basin
#

Clicking it

#

It just redirects me to the steam store front page

drifting ore
#

discord app or browser page?

woven basin
#

discord app.

drifting ore
#

Uh

vestal crypt
#

try to copy the link and paste it on the browser, im on browser discord and works fine like that

woven basin
#

In what browser? Steam browser?

vestal crypt
#

i use chrome

woven basin
#

That just googles it for me.

#

Or nevermind

#

I'm stupid.

vestal crypt
woven basin
#

Okay so i did it via there

#

Same thing

#

just steam store front page

vestal crypt
#

and clicking the link from discor browser?

#

steam://install/380880

drifting ore
#

Mega doesn't even have an option in the tools section of steam

vestal crypt
#

copy and paste doesnt work for me, but when i click it, it trys to open steam to download it

woven basin
#

@vestal crypt I know

#

but as i said

#

it just directs me to the steam store

vestal crypt
#

dont know why is nt in there tho

drifting ore
#

Same thing for me Eudoxio, but it doesn't seem mega has access to the tools

#

and the exact same thing happens when you try to install something you don't own: You get redirected to the store page

woven basin
#

The thing is i own the game, that's why this all confuses me.

drifting ore
#

not the game you silly, but the tools

#

You don't have access to the tools

woven basin
#

Should owning the game not automatically give me the permissions for the tools?

drifting ore
#

Yeah, that's the weird thing

cursive roost
#

short question

#

I can check if an IsoObject is a wall by checking object:getSprite():getProperties():Is(IsoFlagType.cutN) or cutW

#

anyone knows if there's something similiar for floor tiles?

#

there is IsoFlagType.floorS and floorE but it's not used anywhere AFAICT

cursive roost
#

to answer my own question, IsoGridSquare:getFloor() is what I need

woven basin
#

I still can't install the map editor

vernal jackal
#

have you tried downloading it from the forums?

woven basin
#

@vernal jackal I have not, could you link me to it? I can't seem to find it.

vernal jackal
woven basin
#

Thanks!

#

I'll try this.

scenic sigil
#

@woven basin use this steam://install/380880

vestal crypt
#

that doesnt work for him., for any strange reason, he dont have access to the modding tools

scenic sigil
#

hmmm, i have access...why?

vestal crypt
#

not sure, that is really his problem, that the tools doesnt show on the steam tools library

woven basin
#

Is there a possiblity that someone could send their folder/files to me instead? I've tried everything and it just won't show up in my steam tools library

woven basin
#

So is there any good tutorial you guys could reccomend?

mystic cape
#

For.. What?

#

Oh right, modding. 😄

#

Honestly I just started with something simple like Professions.

woven basin
#

I'm looking to create a fairly simple map.

#

With very few cells.

scenic sigil
#

youtube tutorials?

woven basin
#

Text or youtube, doesn't matter.

scenic sigil
woven basin
#

Thanks

vestal crypt
#

Thuztor made a pretty good guide for it, also along that post you can find some useful comments 😃

vernal jackal
#

Could it be that the modding tools are bound to the actual PZ-branch?

#

Which branches are you on @scenic sigil / @woven basin ?

woven basin
#

Stable

scenic sigil
vernal jackal
#

hm

#

I don't see them on my Mac either

drifting ore
#

Hello, I'd like to get started modding, but I can't seem to even load the mods in single player. Am I supposed to do that with a host instead?

cursive roost
#

where do you put your mods?

drifting ore
#

in c:\users\me\Zomboid\mods\

#

(I'd be happy to read a guide, but all I can find is a guide about the code itself, not how to get started)

cursive roost
#

looks good

#

does it appear in the "MODS" submenu?

drifting ore
#

yep

#

And I can play multiplayer with those mods

#

or "host" with the mods

#

but when i click "solo" and start a game, I don't get a choice to pick which mods to activate in "custom sandbox"

#

I'm an idiot, I had to double-click to activate it.

#

Is there a way to reload a mod while in-game (and edit it in-game?) or do I have to leave the game and restart every time?

cursive roost
#

not in-game, you have to go out to the main menu, activate the mod and then load the game

#

you can activate games mid-game, but you need to save, go to main menu, activate them, and load your game again

drifting ore
#

there's an "experimental" file reload system

#

does it actually work?

#

also, how can I add stuff to the "watch" window in the debugger?

#

and how can I exit the debugger when there's an error (pressing F11 again doesn't seem to do much)

cursive roost
#

I've never used the debugger, to my shame :/

novel seal
#

SHAME

#

SHAMMMME

drifting ore
#

Well, maybe Will knows 😉

#

Because one of my mods causes an exception when loading, and I can't get past it (F11 doesn't work)

#

(it's not technically my mod)

cursive roost
#

exceptions are logged to Zomboid/console.txt

#

including stack trace and such

novel seal
#

Will never knows I'm afraid.

#

It's the one true Zomboid constant.

drifting ore
#

Well, to answer my own question in case someone was curious, you can reload your own source code from within the game by clicking the button

novel seal
pine vigil
#

Probably more FAO @rose leaf I don't think my admin access lets me do much on the spam filter, or if it does I'm not sure how to acess/deal with the problem. Think this has come up before though.

novel seal
#

kewl, just wanted to flag it 😃

rose leaf
#

tl;dr, Word blacklist is there because spammers are crafty buggers, and they're winning the war

drifting ore
#

Hey Devs, how well does the new anim system tie into modding?

#

Like are outfits/new guns + Models pretty easy to add? Etc.

drifting ore
#

Hello, anyone having any issue following the workshop update of "allmapshere" mod? it seems to have lost its directory structure

vernal jackal
#

@drifting ore "Pretty easy" is relative, but I'd say yes ^^

#

I'm pretty sure the devs know how much this would benefit the game and the modding community.

timid kite
#

Someone know how to make own models and sprites

#

?

lucid vault
#

@timid kite I'd recommend variants before full-on fresh models. You can take something that exists, say the 'Varmint Rifle' and build a new item from it, using the same model. Like a Daisy BB Gun, with damage so low killing a zombie is pretty much only on crit, and aim that drops off drastically out past 30 feet, but near silent operation and a ~200 BB "clip" that reloads pretty quick.

long ridge
#

Anyone wanna point me in the right direction on where to look to see how the triggerables are implemented? Want to modify some of the bombs and make some new ones... Most importantly make remotes re-namable.

#

Cant seem to find anything in the .lua files

#

(Also brand new to modding PZ.)

long ridge
#

Also are the javadocs even up to date? Found the Remote... item type is Normal, but dont see it in the enum list, same with Key.

scenic sigil
drifting ore
#

Must be something other than a folder in Contents/Mods

scenic sigil
#

i can upload my map in workshop, but i cant mod

#

fixed

vernal jackal
#

@long ridge Items are scripted with a custom syntax. Not sure which folder they are located in nowadays, but it's a plain .txt file IIRC

long ridge
#

I found the text file yesterday @vernal jackal , but doesn't seem like anything I can actually edit functionality wise. I can change blast radius, remote range, etc, but doesn't seem to be hookable into the plus side of things which kind of sucks.... Unless I am still looking in the wrong place.

#

Essentially it seems like "X key adds Y functionality" rather than using an event like the trap being triggered

vernal jackal
#

aye

#

if you want custom behavior you probably need to work with the java side

#

(a yes ... your other question: I think the javadocs haven't been updated in ages)

#

but I'd suggest trying to do it via Lua first

#

for custom events you could ping @inland gull and hope that he doesn't hunt you down with a baguette

drifting ore
#

Oh, he loves those baguettes.

long ridge
#

Is there a copy of the source somewhere or am I going to have to decompile the .class files?

#

At work so I don't have the files on hand

#

Either way, two things on my agenda: making zombies give feedback over radio, and having a motion sensor "trap" to send out messages to a radio

#

I love how zombies can heat me yelling over the radio, but sadly it doesn't work the other way around... Need some sort of baby monitor to let me know if zombies are creeping up in my base

#

So I was thinking I could also incorporate that by allowing traps to send messages to a frequency... Like "Alert: hallway" or Alert: alley" to a master radio that I can be at

#

Or hell... Why stop at zombies.... Could work for players too who are breaking into your base

vernal jackal
#

You'll have to decompile it yourself.

#

I like the radio idea.

#

Might be doable in Lua though ... I haven't touched the PZ code in a long time so don't take my word for granted ^^

drifting ore
#

Just thought of throwing out a mod idea if anyone needs one. Perhaps double pressing W makes it autowalk or autorun. Because the map is so huge

tired basin
#

oh god that's kinda sad to me

#

the mod community feels like we really need to add a "auto move" function for a more comfortable walk to the next town. Because vehicles aren't in yet

#

not saying it's a bad idea

vernal jackal
#

...

long ridge
#

"it's not a bad idea but I'm gonna shit on it anyway and imply that you are too lazy or pampered"

#

Lol

vernal jackal
#

@drifting ore sounds like a good idea

tired basin
#

really @long ridge

#

Lol

long ridge
#

@inland gull / @novel seal would either of you fine gentlemen point me in the right direction on how to add an event for triggerables (namely "OnTriggeredItem") and call it via the LuaEventManager? I have registered and added the event, and I see how you guys are triggering it with the static method, but I cannot seem to find the logic on when the Trap gets activated via timer, remote, motion sensor, etc.

#

looked through almost all of the Zombie.Iso package but havent found anything relavant

#

Additionally, triggerEvent's variable names seem to have been lost with the decompiler, so I just have a string for the event, and 6 objects. If you could tell me what those objects are, thatd be great.

#

IsoObject.DoChecksumCheck() -> checksum = getMD5Checksum("D:/Dropbox/Zomboid/zombie/build/classes/" + str);

#

lolwat!?

novel seal
#

sorry, I'm the writer I'm afraid and ill-equipped to answer

#

RJ probably won't pick up as it's the weekend

long ridge
#

Oh sorry @novel seal! It said you were in the Dev group

novel seal
#

hopefully someone like @cursive roost or @vernal jackal would be clever enough? if they're around?

#

yeah I'm a Dev, but kinda in the 'stupid people' department of Dev 😄

long ridge
#

Lol no worries. In the meantime just gonna be poking around a bit more

novel seal
#

poking usually fixes stuff in my experience

#

usually

vernal jackal
#

@long ridge I think the events are all hardcoded on the java side as well IIRC.

long ridge
#

They are... im editing them 😄

vernal jackal
#

Ok then what is the question? ^^

long ridge
#

Im trying to find where the traps are triggered. Like when you throw a flame bomb, and it explodes

#

I want to send off a new event that i have just added to do a lua pcall.

#

Or more clearer, use the LuaEventManager to trigger the event

#

I suppose I could try and find the triggering mechanic for the remote (which i cant seem to find either) but that would only fire off the event in the case that this is a triggerable trap

vernal jackal
#

Phew ... I remember that some event triggers are located in the lua source but no idea in which classes.

#

Just do a search in all files for it ^^

long ridge
#

That was the first thing I did 😛

#

Sadly nothing useful though.

vernal jackal
#

why?

long ridge
#

And I looked at the already existing events and nothing related to traps

vernal jackal
#

triggerEvent( 'YourCustomEventName', foo )

#

aye then search on the java side

long ridge
#

Correct. But this event is custom and therefore is not exposed to any Lua end. Additionally, there is no handling in these explosions via the lua side at all. It all seems to be done in Java

#

so using triggerEvent as a keyword in the java side would be pointless

vernal jackal
#

I know

#

but if I understand correctly you want to add custom behavior to the traps

long ridge
#

Correct.

#

So I mus be missing the point of what you are trying to tell me to do

vernal jackal
#

so you need to add a custom event you trigger when something happens on the java side

long ridge
#

Yes. That part is done. I need to use LuaEventManager.triggerEvent within the java classes when the trap goes off. That is the part I am looking for

vernal jackal
#

?

long ridge
#

So I have registered the event, just need to figure out where the logic is to fire it off

vernal jackal
#

ahhhhhh

#

isn't there a trap class?

long ridge
#

I dont see one. Lemme look again

#

...... im a fucking idiot. I skimmed right over it

#

goddamnit.

#

I was looking in inventory... Seems its in Objects.

#

Guess that makes sense.

vernal jackal
#

yeah because the traps you place in the world aren't inventoryItems, but WorldObjects (or whatever they are called in the PZ's source ^^)

long ridge
#

InventoryWorldObject.

#

Yeah I looked at that class too hoping for some insight.

vernal jackal
#

I never worked too much with InventoryWorldObjects, that's @cursive roost's speciality

eternal isle
#

Hey guys! Can you tell me is it possible to add custom Moodles by mod?

vernal jackal
#

yes, but only if you modify the java source, which would mean de- and recompiling the code

#

everything is moddable that way ^^

eternal isle
#

But I will be able to replace that file from steam workshop mod?

river plinth
#

nope, you can´t ship mods that change the java source with workshop mods

eternal isle
#

sad then

vernal jackal
#

None of my mods are on Workshop

#

it's not really an issue if you can live with the fact that less poeple will play your mod

#

oh wait I lie ... @river plinth uploaded some of them IIRC

#

😄

eternal isle
#

Devs should share such things to lua actually )

vernal jackal
#

I see where you are coming from, but they can't port the whole engine to Lua.

#

But as far as I know moodles might be refactored out eventually.

cursive roost
#

@long ridge you still need help?

long ridge
#

Sorry was on the Vive.

#

im good man. Found what i needed...

#

My own stupidity. Completely skipped the IsoTrap class

cursive roost
#

great that you found it 😄

drifting ore
#

does mods usually work on save games? can't find any info on that.

split shuttle
#

I think they do but items that are from the mod will not magically appear in it

#

though dont take my word for granted

drifting ore
#

It depends how the mod works. If it relies on the item spawning system, those items will only appear in unexplored areas of the map..

#

If it's a map mod, those cells the map overwrites will need to be deleted or a new game started.

#

If it just alters the logic of the game, then the mods will work fine, whether it's a save or a new world.

drifting ore
#

thank you

bold drum
cursive roost
#

cool 😄

#

pushing zombies up sheetropes, that's hardcore!

winged lotus
#

Eh eh eh ^^

noble totem
#

How soon moodles might be cut out?

cursive roost
#

I would say "later" rather than "sooner"

noble totem
#

What will instead of it?

cursive roost
#

well, animations and voip is currently using up all the ressources, as well as the whole factions thing

#

with those things, I believe TIS is booked solid

winged lotus
#

I think the current main focus here are the animations, and I think they are working on it to make the new system modable if I'm not mistaking

drifting ore
#

when 3d first person zomboid m8s 😉

sleek prism
#

lmao

drifting ore
#

wow Snakemans map mod project looks AMAZING

cursive roost
#

it does

#

if there'd be some kind of "triangulate position" option so that for a few moments you'd see where you are

#

AND it were possible to use the games mapdata, so it'd work dynamically for all maps

#

it'd be a dream come true 😄

winged lotus
#

Can you give me a link to it ? Is it workshop ? Sounds interesting ^^

drifting ore
winged lotus
#

Wow. 😮

cursive roost
#

my thought exactly 😃

#

I did a mod that required you to "draw" a map by running around with pieces of paper and a pen/pencil

#

but the modData became way to big to be usable

bold drum
#

Hey, guys.
How can I send custom getModData data to the server?
I try self.item:transmitModData() don't work for me. (self.item is InventoryItem)

What shall I do?

cursive roost
#

there shouldn't be any need for that

#

that should really be done automatically

#

self.item:getModData()["key"] = "value";

#

that should be all you need to do

bold drum
#
self.item:getModData()["Name"] = getPlayer():getName();

This value will not work?

cursive roost
#

that should be fine

#

and after a reload the data isn't there?

#

though I would strongly suggest using something like

#

self.item:getModData()["MyModID"]["Name"]

#

to avoid namespaces conflicts

bold drum
#

The same item, but another player to get a different value, I do not understand why.

cursive roost
#

getPlayer() always gives the currently playing charactel

#

so getPlayer() on my system returns my character, on yours it'll return your character

#

so obviously getPlayer():getName() will be different

bold drum
#

I check getModData == nil

if self.item:getModData()["AnyValue"] == nil then --Avoid overwriting existing data.
    self.item:getModData()["AnyValue"] = getPlayer():getName();
end

It should not overwrite the existing getModData.

cursive roost
#

hmm

#

weird

#

huh

#

transmitModData only does something if the item is on the ground...

#

or rather, when this.square is set

#

and InventoryItem doesn't have a transmitModData function at all

#

yeah, moddata on those is automatically handled... or rather, should be

#

can you upload the whole file on a pastebin service?

bold drum
#

I don't even know what happened.

#
local tb = getPlayer():getInventory():FindAndReturn("Axe")
--tb:getModData()["test"] = getOnlineUsername();

print (tb:getModData()["test"])

Between the two players, I got the right Axe["test"] value.

drifting ore
#

so i am new to modding this game - how is the state of modding and IWBUMS? do they work generally or is are they made for stable?

cursive roost
#

personally, I'd not release a mod for iwbums only

#

but I think it's possible to do so

#

mods for stable GENERALLY work for iwbums, though

#

I don't think there's code incompatibilities

drifting ore
#

thank you 😃

jagged folio
#

anyone know how to get the required material to make a mod for this game?

vernal jackal
#

What do you mean by "required material"?

jagged folio
#

like code

vernal jackal
#

If you just want to add or modify some items you'll need to look at the item scripts... can't remember what the files are called, but they have a simple .txt ending.

You can find the .lua sources in some subfolder of the "zombie" folder (can't look up the exact path since I'm not on my gaming pc). The Lua scripts aren't compiled so they are the first thing you want to look at. They also give you a lot of options already.

If you want to do some some elaborate stuff you'll have to decompile the java sources, but that's ... a whole different topic ^^

bold drum
#

setX(float) and setY(float) why don't move the player?

local pl = getPlayer()
pl:setX(10613)
pl:setY(9650)

The screen is just black loading map, nothing happened. what did I miss?

cursive roost
#

you can't move the player to a location that is not streamed into the game

#

ie not too far off the visible screen

bold drum
#

Thanks bc. but "CheatMenu" MOD seems to be able to teleport the player to any location on the map.

#

It uses other methods?

cursive roost
#

no idea, never used it

#

I just remember that setX / setY limitation from way-back-when

bold drum
#

Problem solved. thanks.

local pl = getPlayer();
    pl:setX(10630);
    pl:setY(9313);
    pl:setZ(0);
    pl:setLx(pl:getX());
    pl:setLy(pl:getY());
    pl:setLz(pl:getZ());
cursive roost
#

seL... gotta look that up 😃

bold drum
#

I found it in Javadoc, interesting.

drifting ore
#

You also have to set the collision of the player to move them more than 1 tile at a time, hence the setl* functions, whatever the he hell L is . . .

vernal jackal
#

Ludachris

#

You have to move ludachris to prevent the game from crashing

drifting ore
#

I believe..

naive tree
#

Hi
I try get worldModData by
worldModData=getWorld():getModData()
But here i have error:
Object tried to call nil in ...

IsoWorld is IsoObject child and have mod data. What can be wrong?

cursive roost
#

hmm, usually, gametime is used for such

#

why do you want to attach moddata to world?

naive tree
#

For save some data on server

cursive roost
#

also, IsoWorld is NOT an IsoObject

#

gametime is, though, so you should really use that

#

getGameTime()

drifting ore
#

What BC said. IsoWorld has no ModData function.

cursive roost
#

well, gametime is not an isoObject either, but it has the modData API

drifting ore
#

Quietly edits to trip up BlidncodeR

naive tree
#

I want save modData in server world save
I see how that work whith player^modData

#

But it local save
WordData - server save

drifting ore
#

You can't. You'd need to use GameTime.

cursive roost
#

gametime is also serverside

naive tree
#

and in save any table?

#

I store lot info

cursive roost
#

what are you trying to do? once you get into megabyte sized moddata, the game starts to lag a lot...

naive tree
#

I try save player descriptions

#

its string table 100-300 lines

#

for local player works fine

Other path getFileReader and getFileWriter dont work...

cursive roost
#

should be fnie, though

naive tree
#

Somthing wrong betwen client and server...

cursive roost
#

I suggest

#
local gameTime = getGameTime();
local modData = gameTime:getModData();
modData["<yourmodid>"]["<playerID>"]["data"] = "<whatever>";
#

that's the modData you should use

#

replace <yourmodid> with the ID of your mod to avoid namespace conflicts

naive tree
#

Thanks

cursive roost
#

you're welcome 😃

steep summit
#

Is there any kind of way to increase the rarity of loot even more than extremetly Rare? Because I find everything I need in order to survive just in few days! I want to keep the zombie population in normal, but make loot even more harder to find :D yes im insane

#

Is there any kind of way to make that happen with mods or some stuff, thing, kinda? :o

drifting ore
#

ahh te car drivng mod is so great, its gonna be awesome when its fully finished

placid delta
#

yo anyone who does 3d models. there is no export as .txt in blender. so how to i export to pz format?

drifting ore
placid delta
#

yes but 19 out of the 20 times i have exported a model and texture, it crashes a few seconds after equipping the weapon with said model. and no logged errors to work with.

placid delta
#

thats about as good as its gonna get

fleet folio
#

Lol that looks bloody cheap

drifting ore
#

the coding etc looks great hopefully someone can come and help out with some good looking models for all perspectives

#

well done Nolan :)

placid delta
#

even if i can find a way to hide his head and legs it would look a lot better

drifting ore
#

dont you think it would be easier to focus on the easy (?) stuff first? like just adding a bicycle?

placid delta
#

That's actually harder than a car. Though I already made the support for a vehicle thy doesn't use gas,

#

Tried yesterday to load a bike model but it wasnt working. Will probably try again but there will not be a peddling animation

drifting ore
#

ahhh alright

stray forum
#

did hydrocraft got updated?

amber island
#

How do I make the game spawn items from my mod naturally so I don't have to implement an item spawn script with my mod.

vernal jackal
#

Depends on the spawning you want. If you want to spawn them like other items just add them to the default tables.

amber island
#

Okay where can or how do I add to default tables

#

@vernal jackal

vernal jackal
#

you need to add a lua file with something like this

local function initDistribution()
    local insert = table.insert;

    -- All your item stuff here
    insert(SuburbsDistributions["all"]["wardrobe"].items, "Module.Item");
    insert(SuburbsDistributions["all"]["wardrobe"].items, 1);
    insert(SuburbsDistributions["all"]["sidetable"].items, "Module.DifferentItem");
    insert(SuburbsDistributions["all"]["sidetable"].items, 1);
end

Events.OnGameBoot.Add(initDistribution);
#

@amber island I suggest looking at some of the already released item mods like OGRM

placid delta
#

Don't use oRGM as example they have their own unique item spawn stem via lua

vernal jackal
#

ah then don't do that

amber island
#

@vernal jackal thanks I'll look at another mod

wide sierra
#

Personally I think the car mod looks great for a mod,perhaps if the dev team one day implements it...It will blend more with the whole code and thus be easier to do and improve

winged lotus
#

I tested this mod the other day and thought "it's a really cool one", but after a while a few things bothered me like the Tank and the overall graphics of the vehicles... These are real big immersion breakers for me :/ But that guy pulled out some great work indeed

bold drum
novel seal
#

ha ha! NIGHT OF THE AXE ZEDS ATTACK

drifting ore
#

If we could just harness them to chop trees for us, we'd be rich.

drifting ore
#

woodcutters union i see

drifting ore
#

That looks amazing

plucky siren
#

Nice! I'm curious, any interest in making hostile survivors?

#

@placid delta any plan on open sourcing it as well? I would love to contribute.

placid delta
#

there are hostile survivors already

#

there are some stories people posted about thier interactions with hostile survivors some are quite funny

#

no problem with people helping with the mod. I warn you its a bit messy though.

plucky siren
#

Thanks for the link, I have not tested this just yet but been watching the videos so I thought they were all just friendly.
Ill download the mod now and play some in the afternoon.

#

Do you have the source on github?

#

What makes me so curious is it says that it only works with single player, I was wondering what is the hurdle to make it work with MP?

placid delta
#

no, ive never put anything on github before

#

i imagine there are a number of hurdles. first major one is that the survivors are IsoPlayer class instances

#

not IsoSurvivor instances

#

which are meant to be, well just players. local to the persons client

plucky siren
#

Gotcha, again, I have not attempted to mod zomboid at all, but does it expose any TCP/UDP layer to mods?

placid delta
#

no everything client side

plucky siren
#

Does indie stone maintain an api doc for mods?

#

Found it:

placid delta
plucky siren
#

There appears to be a number of network functionality:

zombie.core.raknet.UdpEngine
zombie.core.network
zombie.network
zombie.core.raknet.UdpConnection
placid delta
#

a lot of stuff you will see there will only be accessable or useable via java

drifting ore
#

hmm.. Nolan I think you have inspired me to look into PZ modding a bit

fallow wasp
#

How do I add the folder to make them weapons?

fallow wasp
#

Like I downloaded the folder that makes the survivors independent and hostile. But I don't know how to make it work. They still follow me like zombies

#

How do I make the file work?

fallow wasp
#

By the way Ik talking about Survivor Mod

placid delta
#

there is a video that shows you were to put the folder you downloaded

fallow wasp
#

Thanks

fallow wasp
#

I did all that but it stop has copying survivors

#

The survivors still have no weapons and follow me every move

placid delta
#

what build you running?

fallow wasp
#

The newest build 35.26 @placid delta

placid delta
#

actually if your build dont match patch the result will be recipies broken, but since you say they still mirror your movement it means you did not copy it correctly

#

it asked you if you want to replace /save over the files 3 times like in video?

fallow wasp
#

I copied over the three files. Should I download and do it again?

placid delta
#

did it ask you if you want to copy / replace like in the video?

#

if it didnt you werent pasting the right thing in the right place

#

it will ask you if you want to replace 3 files

fallow wasp
#

I just rejoined beta and downloaded beta link and it said replace three and it copied all 6

placid delta
#

it should be the zombie.zip not zombie2.zip

fallow wasp
#

Okay let me fix this then

#

Okay I have 32.26 and I made sure I have the Zombie.zip objects scrips in the zombies file. Ik about to start my game in a moment

#

@placid delta still don't work

placid delta
#

watch thevideo again. and pay close attention to exactly what i copy to where

fallow wasp
#

Okay but my screen copies like differently than yours does

#

It doesn't use the extra steps when I copy a file to the original. It says it has the same name as existing files and would you like to overwrite ten and when I do it says copying 6 things to zombie file

placid delta
#

doesnt sound right, should only be 3 files not 6

fallow wasp
#

@placid delta when I try to move replace it says copy instead of move

#

@placid delta so I studied the video and did exactly everything up to the common part. There is no common after I hit steam

placid delta
#

zombie/scripting/objects/*take all files from here in the download

#

open and paste into the same spot in zombie from your install zombie/scriping/objects/

fallow wasp
#

I'm pretty sure I just did that now I'm testing the game again

#

@placid delta ugh forget it. It don't work I'll just wait till they actually add them or something

cursive atlas
#

Does anyone have experience with the blends system?

vernal jackal
#

sweet

river plinth
#

@cursive atlas Looks damn nice! I haven´t got a clue though about what you´r asking

drifting ore
#

Yes. I've no idea what a blend even is.

Can I drink it?

fallow wasp
#

Nice map

placid delta
#

blender* ??

cursive atlas
#

I mean alter the blends.txt and rules.txt to allow more colors to be used in bmp to tmx

cursive atlas
#

Bah, I cannot get photoshop to preserve transparency when I copy things...

cursive atlas
#

After far to many false starts, I have rendered grand traverse peninsula into manageable regions of RGBA with A being infrared.

#

Now I am bringing out each channel in a separate layer so I can figure out the best way to get usefull data : RGB Infrared, Hue, Saturation

cursive atlas
#

It seems to me that the hue channel is best for viewing differences

drifting ore
#

I don't know what are you talking about, but it sounds like fun 🙃

plucky siren
#

@placid delta Do you know if Survivor mod works with local co-op?

placid delta
#

I have heard it "works" but has some issues such as screen will split in 4 even with 2 players

inland gull
#

Hey, for build 36.1 i've added a way to override base recipe and even making them obsolete 😃

placid delta
#

will that be done in lua or in the scripts txt files? can u give an example.

bold drum
#

Guys. Who knows how to use "bytecodeloader" function ?

cursive roost
#

no idea, to be honest

#

you want to make a compiled lua mod?

bold drum
#

No, I just try to use it.

river plinth
#

anyone know how to add a wooden box to a worldcoordinate that´s currently not loaded?

drifting ore
#

I'm betting that might be impossible.

#

Save the coordiantes where you want the wooden box, add it on the LoadGridSquare event?

river plinth
#

seems like LoadGridSquare is gone, every occurence in any of the shipped Lua files is commented and I´m getting an error when trying to add an event to it

#

that was my first approach

#

I actually have no idea what the events "ReuseGridsquare", "LoadGridsquare", "OnIsoThumpableLoad" and "OnIsoThumpableSave" do

drifting ore
#

Well that's odd. They're all commented out.

#

Interesting.

#

@inland gull What'd you do? What'd you do!

#

Oh, I think EasyPickins mentioend something about ReuseGirdSquare a long time ago. Hmm.

#

But not helpful, really.

river plinth
#

nevermind, revalidated my files and now I can add an Event to LoadGridquare

#

and it is still executed

#

sorry, should have done that first before asking here 😊

drifting ore
#

Yeah, but now I want to know what everything's using instead of LoadGridSquare!

cursive roost
#

so do I, it was my go-to event for this kind of thing

#

and I use it in two mods, including spraypaint

river plinth
#

it works fine now though, never thought it would be that easy to add an object to a tile

#

I think I finally get used to the way PZ is handling all this Lua stuff

#

far away from a real modder though

cursive roost
#

how'd you do it now?

#

personally, I don't think it's easy at all

river plinth
#

still with LoadGridsquare and then created a IsoThumpable with the according special attributes like isContainer

#

I was previously really scared lookint at the objects tut from TurboTuTone

river plinth
#

@inland gull now that you are online, quick question: what do I need to pass to PlayWorldSound as the parameter "name"?

#

I´ve tried a bunch of different combinitations, but nothing works

#

my file is in "Testmod/media/sound/breakdoor.ogg"

#

so I tried getSoundManager():PlayWorldSound('media/sound/breakdoor.ogg', ...)

#

getSoundManager():PlayWorldSound('breakdoor.ogg', ...)

#

and getSoundManager():PlayWorldSound('breakdoor', ...)

inland gull
#

local sound = getSoundManager():PlayWorldSound("thumpsqueak", _square, 0.2, 20, 1.0, 6, true);
addSound(_character, _character:getX(), _character:getY(), _character:getZ(), 10, 5);

river plinth
#

what´s the addSound for?

inland gull
#

it actually play the sound.. not even sur the playworldsound is still used 😄

#

ah no sry

#

the addSound is just to attract the zombies

river plinth
#

ah, perfect, I need that to

rustic surge
#

So many peepholes.

placid delta
#

would anyone be interested in a migrating horde mod?

cursive roost
#

?

#

explain

placid delta
#

i was thinking, i can make a fake matrix of the map as an array. plot x number of "hordes" randomly into the array matrix. then after each 10 minutes event, move said hordes in random directions (in the array matrix) then, after each move. check if the horde has entered the players loaded cell. if it has, spawn the horde, and set each spawned zombie with a direction the horde was last moving.

cursive roost
#

hmm, doesn't the game have "virtual" hordes anyway?

placid delta
#

i was thinking more of a "walking dead" farm invasion type of horde

cursive roost
#

oh

#

HORDE horde

placid delta
#

like hordes in the 100s or 1000s

cursive roost
#

personally, I wouldn't play with that, I suck enough on "Survival" as it is

#

but it sounds cool

#

need to make sure players aren't hit by it too often

placid delta
#

if its made like i describe. i think most the time, the hordes would pass by you

#

unless you make noise at the wrong time

#

but ya i would want it to be a fairly rare kind of event

cursive roost
#

that would be cool

cursive roost
#

anynoe else having issues with IsoGridSquare:playSound("foo", true);?

river plinth
#

yep, doens´t play the sound for me, only if the player is present on that tile

cursive roost
#

okay, so it's not just me

#

phew 😃

drifting ore
#

Not seeing that used.

Line 16:             self.sawSound = self.character:getEmitter():playSound("PZ_Saw", true);
#

And . . .

self.sound = getSoundManager():PlayWorldSound("shoveling", self.gridSquare, 0, 10, 1, true);

#

The second one, i take it, is what you want.

river plinth
#

I tried the PlayWorldSound one as well, but again, it seems like it only works if the player is on the square aswell

vernal jackal
#

PlayWorldSound is old and maybe obsolete / broken nowadays?

#

I used it in my lockpicking mod back in the day.

#

@drifting ore Any info on wether IsoWorldObjects have an emitter too?

cursive roost
#

(it makes building crash down)

worthy ivy
#

Oh whoa.

#

Thanks!

river plinth
#

@cursive roost did you find a way to play the sound on the square?

cursive roost
#

no 😦

#

but I also didn't want to spend another night on it

#

I could just play it on the players square, but that'd be cheating

rose leaf
#

@cursive roost cheating is half of what codings about 😉

#

@cursive roost did you mean " This is a mod adding a hotbar for quick item access to the bottom of the HUD. " at the top of your post as well?

cursive roost
#

of course not, thanks for the notice

#

I just copied that other post over to have something to start from

placid delta
#

is there a list of all the Events? the list on PZ mods site seems outdated.

vernal jackal
#

nope

#

you can find all the events in one of the java classes though

#

LuaHookManager or something like that

river plinth
#

The class LuaEventManager has all the events

drifting ore
#

Or just ctrl + f Events.

#

At least that way you'll have the list of parameters.

vernal jackal
#

@river plinth to the rescue!

cursive atlas
#

How feasable would it be to have a container like shelves detect the catagory of items put in it and have different sprites based upon that?

cursive roost
#

just uploaded a version of Gravity that fixes building floor tiles on the ground floor.

winged lotus
#

👍

winged lotus
#

@devs I'm curently working on the wooden dowels mod right now and I'm trying to create walls with custom items but it seems that it uses MultiStageBuilding.getStages() to get what walls to do. My problem is that MultiStageBuilding is a class... 😥

#

So I won't be able to add custom stages / create my own since it's on the java side right ?

solemn pebble
#

Ohhhh, I loved Wooden Dowels Mod!

winged lotus
#

A new update is going to be up any time soon, the core mod has been updated and I'm taking time to polish everithing right now

#

unfortunately, you won't be able to create full walls but only frames because I could not manage to access the "stages" code that define the requirements to build on a frame sorry 😕

glad bone
azure crystal
#

bleach + cherrypie =😀

cursive roost
#

@winged lotus Hrrrm, that would be bad... maybe you can recreate that part in media/lua/server/BuildingObjects somehow?

#

I remember walls being plain IsoWorldObjects, but maybe no longer...

#

ah, no, ISWoodenWall

#

I'm gonna have to update the CrafTec mod, too, possibly on the weekend, maybe we can share some overlap then and see ow it went

#

MUAHAHA, go me 😄

#

returning unconditional "true" in a canBuild function I overrode instead of calling the original function 😄

#

okay, fixing that needs to wait until I'm back home

winged lotus
#

Oh I didn't knew Craftec, just saw a video that's a really good idea 😃

#

@cursive roost From what I saw, to build a wooden wall, the game now check if you are right clicking on a woden wall frame and then iterate on a "stages" object from MultiStageBuilding.getStages() which returns all the stages of wall (from the crapy level 1 to the perfect level 5), then the lua code take care of what to show (if the player has enough items or not for instance). So the requirements like "what item is needed" and "what carpentry level is required" now come from this java class if I'm not mistaking, making it harder to overide when using it 😕

#

It also feels like building the wall on a frame seems to ignore the items on the floor and only use items from inventory, but I'm not 100% sure about it, it was late back when I tested it.

cursive roost
#

@winged lotus thanks 😃

#

I'll check that when I get back home, but that'll be 7 hours from now, idling on the MUC airport right now

#

@winged lotus even easier!

#

check media/scripting/multistagebuild.txt

#

you can use recipes for that

#

so ideally you would just need to extend on that

winged lotus
#

Wow how could I miss that 😮

cursive roost
#

eh, it's a new system

#

I found it by grep'ing through the code

winged lotus
#

I grep'ed too but only in media/lua ah ah there is my mistake ^^

#

I only found the .class file that way

#

anyway thanks a lot for the help on this one 😃

cursive roost
#

you're welcome! 😃

winged lotus
#

Now I have to decide if I want dowels walls to be "upgradable" or not, it would be cool but clearly unrealistic to try to upgrade a wall made with dowels you would just end up cracking your planks and detroy the whole structure or at least make it more fragile... Hum... Hum...

cursive roost
#

Depends, if you want the dowels to be simple replacements for nails, I'd say let them be upgradable

#

otherwise, skip the woden frame stage and make the wall directly, but allow them to be barricaded and fortified with metalworking.

winged lotus
#

Hum, yes that's interesting yes, also, a wooden wall frame made with dowels to support a nail-made-wall seems also relevant to me...

#

I should also add SkillRequired:Woodwork=3 & CraftingSound:PZ_Saw to the crafting dowel recipe !

#

And maybe make it exclusive to the carpenter job & handy trait and creating a magasine to learn it(and manage it's distribution), ha ha, well I have a lot of things to now to make the mod better 😄

cursive roost
#

personally, I'd use one or the other, either limit to job/trait or to a magazine

#

having no personal experience with dowels, I didn't find it hard to learn about them and I'd certainly try making them. Maybe limit learning it to people without the all-thumbs trait

winged lotus
#

But the ingeneer recipes to make bombs for instance are learnable both way isn't it ?

#

"limit learning it to people without the all-thumbs trait" ah ah, that would be a good thing yeah 😄

cursive roost
#

I mostly play single player, and while I rarely have trouble finding enough nails, I really dislike the limited-to-job mechanic.

#

but that's just me 😃

winged lotus
#

Oh by the way, do you have any experience in adding new graphics files to the game ? I would like to change some of the crafted look to show diferently the things made with dowels instead of using the base game models. Any leads ?

cursive roost
#

yes

#

you can just chuck them into media/textures/ as .png files

#

so say you have a media/textures/wooden_dowel.png file

#

then in an items.txt file you'd use Icon = wooden_dowel.png

#

and within lua you'd use

#

media/textures/wooden_dowel.png

#

please DO be careful with UPPER/lowercase, though, or it'll break on non-windows systems

winged lotus
#

Aaalllright ! It's just like icons

#

I thought because I want to do it for in game spites like walls and stairs, it would be diferent 😅

#

And I note that, only lowercase in image names then (I'll be easier this way) !

cursive roost
#

ah, for buildings you meant

#

gimme a sec, let me check how I did that

#

okay, full path for the sprite and you're set

#
./server/BuildingObjects/ISSimpleStill.lua:    o.sprites.westSprite = "media/textures/destill1a_east-west.png";
./server/BuildingObjects/ISSimpleStill.lua:    o.sprites.northSprite = "media/textures/destill1a_south-north.png";
./server/BuildingObjects/ISSimpleStill.lua:    o.sprites.southSprite = "media/textures/destill1a_north-south.png";
./server/BuildingObjects/ISSimpleStill.lua:    o.sprites.eastSprite = "media/textures/destill1a_west-east.png";
#

that's how I did it back then

#

brb, gotta switch places at the airport

winged lotus
#

Okay thank's a lot ! BTW how do you make code quotation on discord ?

cursive roost
#

using two or three `

#

to start and end it, respective

#

two backticks will look like this

#

while three will look like this

winged lotus
#

Perfect thanks 👌

winged lotus
#

Awwn so close...! 🙁 So I managed to add a custom "stage" to build a wall, that's working perfectly 😃 But during my tests I came across an other bug !

#

If the furniture I build gets destroyed by a zombie / tool : it drops correct items (dowels / planks / others... ) but when I use the new "dismantle" feature on it : it gives back nails...! So I'll have to correct this now 😆

winged lotus
#

So I made some research and I found that the context menu of disassembly :
ISWorldMenuElements.ContextDisassemble

Has a function self.disassemble( _data, _v ) that is calling ISMoveablesAction:new( ... , "scrap" )

Which triggers the scrap function from moveProps : moveProps:scrapObject( self.character )

This leads me to think that the code stating that scraping an item gives nails is somewhere within moveProps and this one being initialized by ISMoveableSpriteProps.fromObject( object );

So this track eventually led me to find the function scrapObject that define the materials obtained with scrapDef using material from the sprite:getProperties(); so here is my guess :

The items scraped are taken from the sprite of the object no question asked if it's a player made item or an item from map generation, instead of using the items that was used to build it like when it's destroyed (in case of player made items) am i right ?

winged lotus
#

Well guys I'm completely stucked, I'm open to any leads : what would you do if you had to change the new dismantle system to make it loot the true items used to make the furniture when it's a player made furniture (the same way the destroying system works) ?

I may have an idea but it would require functions that I'm not sure it exists :

Is there a function of a moveProps or object able to say if the furniture has been crafted by the player ?

Is there a function of a moveProps or object able to return the materials used to make it (the same way the destruction works) ?

drifting ore
#

Take a look in ISContextDiassemble.lua and start at line 34. But I'm just totally guessing that that's relevant, so.

#

local moveProps = ISMoveableSpriteProps.fromObject( object ); seems to include possible materials.

winged lotus
#

Yes I saw that one indeed : it is creating a ISMoveableSpriteProps using the object to create the materials. So it should be returning the right items, but in game when I break the furniture with an axe, I get back my custem items used to make it. But when I dissmantle it, I get planks and nails (what I think is material2 & material3 from the dismantle function).

It feels like this ISMoveableSpriteProps.fromObject( object ) doesn't return the right materials when it's working with player made furnitures 😦

drifting ore
#

Huh, I'm surprised destroying it with an axe gives the right items then.

#

ISMoveableSpriteProps determines what an item should return based on its spritename, so that might explain the disccrepency. Not sure how moddable it is then.

winged lotus
#

Excactly, I came up with the same conclusion on the spritename ! Spendt this whole morning thinking about a way to make it moddable but I'm kinda losing hope right now...

I think maybe I should create my own dismantle function that uses the same system as the "item is destroyed" to produce correct scrap for player made furniture.

But this would require two things that I can't figure out :

  • A way to know if the ISMoveableSpriteProps is a furniture made by the player
  • Figure out where & how the "destroyed item system" works (because I can't find where it happens and what function it uses to get the right materials).
drifting ore
#

Probably will have to modify SMoveablesAction so you can do what you want.

Just need to figure out what your item identifies as and, on compleition of the actoin, return the correct items instead of let TIS's code do it for you.

#

Not ideal.

#

At least assuming this is the action used for diassembly -- it does mention scraping, but maybe that's on a failed move (item breaks).

winged lotus
#

Oh, fun fact, I just re-activated the old "dismantle" system :

    -- dismantle stuff
    -- TODO: RJ: removed it for now need to see exactly how it works as now we have a proper right click to dismantle items...
    if getSpecificPlayer(player):getInventory():contains("Saw") and getSpecificPlayer(player):getInventory():contains("Screwdriver") then
        if test then return ISWorldObjectContextMenu.setTest() end
        context:addOption("Old dismantle system", worldobjects, ISBuildMenu.onDismantle, getSpecificPlayer(player));
    end

And it drops the right items, to ones used to make the furniture, just like when it's broken, so there is maybe a lead here on how to fix the new system, I'll get into it.

winged lotus
#

I run across some funny comments sometimes 😄

-- No sledgehammering the daffodils.

winged lotus
#

Hey, I have an other question, how do I check if an object has a "metod" before using it in lua ? I checked online but only find ways to check if a function is nil but can't manage to do this with methods 😦

cursive roost
#

@winged lotus if it's a lua function, you can do ``` if obj.function then
obj:function(123);
end

#

I don't think it works this way for java, though

winged lotus
#

Yep, but it'a a Method, so this method doesn't works

cursive roost
#

java method you mean?

drifting ore
#

All happy Java functions exist on joyous Lua tables, so it should work.

#

You'll have to treat the package name as a table though.

#

Actaully, I might be wrong on that. Might only be able to test if it's nil.

winged lotus
#

Here is my problem, player made objects have the object:isDismantable() but the not made by player doesn't, so I want to check if the method exist before using it (because it throws error if I dont)