#mod_development
1 messages ยท Page 84 of 1
hmmm im having a weird bug not mod related...
whenever i turn obs on and capture the game or the screen that has the game
the mouse cursor in the game doesnt show... but it shows on othe recording and preview from obs
wtf...
But isServer() and isClient() return true all the tiiiime!
๐คช
Thanks, this has been terrible programmer jokes
I'll be here all week.
๐
โค๏ธ
will this also trigger the function when in singleplayer?
never heard of this problem. maybe vga driver related
No. I believe isServer and isClient both return false in SP.
So isServer() and not isClient() will be false and the function will never be added.
If you need it to work in SP as well as on the Server but not on an MP Client, you'd need
isServer() or not isClient()
I think
not isClient() is sufficient
This pertains to my mechanics level right?
aaaaaaah finally... sp integration mod DONE!
next work on the mp version... next week perhaps
hmm ok... Is there a way to check whether game is multiplayer or singleplayer? prob yes but I don't know the code...
to be honest im still figuring the server stuff out
but thats something for the me in the future to worry about, for now i can relax
both return false in singleplayer
holy broken ui
yeah i know
In vanilla you cannot read most of the names of clothing categories
@sour island if you remove the getfreeheli function please let me know... my mod is leeching on that to trigger events ๐
And you cannot read the skin color and such at this font either
That's a holdover when I bothered recycling objects
Not going anywhere
I also added bumper-based jumping down the menus
Hold L1 to jump down 5 at a time, R1 10 at a time, both 20 at a time.
No more finding my mouse to scroll mods
Wheeeeeee
everyting is working properly, no bugs, no errors, no impact in game performance.... it was stressing so far but i feel fulfilled... for now
not isClient() and not isServer()
and in realtime events config
if true, singleplayer, otherwise multiplayer
I already set min and max dmg of item to 0, but it still damages player. Why?
so im quite happy with the end result
If only I could make the sort work (without consequence) ๐ญ
thanks!
Trait description does that
Is there a list of animations and sounds anywhere or do I have to dig through code
how can you define your own equipregions for items?
like the ones for backpacks and such
local createPanelPatch = function(originalFn)
return function(self,page)
local panel = originalFn(self,page)
if page.name == "modPageTranslated" then
--create a new tickbox and add to panel
--you can change the panel as you want here, add any element you want
end
return panel
end
end
--depending which one you need to patch, SandboxOptionsScreen runs on main screen (only?), ISServerSandboxOptionsUI is the one people usually open in-game to change options
ISServerSandboxOptionsUI.createPanel = createPanelPatch(ISServerSandboxOptionsUI.createPanel)
SandboxOptionsScreen.createPanel = createPanelPatch(SandboxOptionsScreen.createPanel)
customize your sandbox options pages, there's also the option of setting a page.customui function
done for the day https://youtu.be/yYClkwV-Trc
Added air events ( Uses expanded helicopter events for that effect, it will not work without that mod installed and enabled ).
Targeting the end of the month for a public release of the alpha. Will continue to work on the mod to add more events, next will be car events (flat tire, stall engine, etc )
Is it possible to store objects different from string and numbers in the ModData?
yes, the 'string and numbers only' thing was changed in 2015 (i can't find the patch note for this anymore but it was definitely quite a long time ago) (it was 2013 lol)
you can store any normal data type (no functions or instances of objects or weird stuff like that)
ok... so what I need to store is an inventory item and this is probably still not possible then...?
cause "no instances of objects"...? at least I tried and it didn't work for me...
yeah no inventory items
hmmm....
you can send inventory items in a command, but not save it in moddata? thats a shame
Ahhh so thats why mods that store player items saves it on files
So what I can do is casting the reference to the item to a string which is then a string like "zombie.inventory.types.Food@16f76dab". This string can then be stored without any problem. But can I conversely convert this string back to a reference for an inventory item?
can you specify which side of the object to walk to when doing walkadj? like if I wanted players to always walk to the east side of the object to perform an action?
You can probably save like part of it like title cuz thats a string. But maybe an entire thing about an obj isnt possible
But xyberviri did a thing where you can store a vehicles moddata on an item and then deploy that item
Like a pokemon and pokeball
But maybe it changes the id
May just add a check for directio. On the walk action
Question
What will happen if theres a global var
But then on a function u made same nane var but made it local
And vice versa
can anyone tell me how you can define a custom equip region for items in the likes of CanBeEquipped for bags?
in most programming languages, the function will then use the local variable but not sure how this behaves in lua.
i was searching and found, maybe its will be useful for someone, to disable fall damage:
DisableFallDamage = DisableFallDamage or {}
function DisableFallDamage.onPlayerUpdate(player)
player:setFallTime(0);
end
Events.OnPlayerUpdate.Add(DisableFallDamage.onPlayerUpdate)
I think the manual specifies that the local variable will be accessed first. Check this:
https://www.lua.org/manual/5.4/manual.html#2.2
the variable with the smallest scope is used
I notice handWeapons have a noise factor - but it doesn't appear to be used anywhere?
Anyone know how to determine the noise of a weapon, specifically a gun?
Hi, I have a question how I can start making Mods, Do I need a repo to clone, I am new to this stuff, but I have experience in Coding
local radius = weapon:getSoundRadius();
if isClient() then -- limit sound radius in MP
radius = radius / 1.8;
end
character:addWorldSoundUnlessInvisible(radius, weapon:getSoundVolume(), false);
``` hmm
anyone knows how to reach author of superb survivors? Dude hasn't left a single reply on mod workshop page in months and on github last activity was 6 months ago
Nolan? or Andre?
Nolan is active in his own discord
The sub-mods/patches have been incorporated and stopped updating in response
can you toss a link? It's not on workshop page
How does the keyring work to auto equip and show in your bag bar without you needing to do anything?
are there any mods that add/edit tv or radio channels? i'm looking into doing something related to this but i can't really make sense of the code from the base game
Me too link pls
Its on the sound script itself
I spy with my little eye
Someone with mod idea
The inventory page code specifically looks for (Containers that are equipped) or (items with type Keyring).
media/lua/client/ISUI/ISInventoryPage.lua:line 1343
My mod is done for a week+
I'm just trying to make 1% of it that doesn't work with superb survivors work
Im refering to the dude above your post
When I have a string like "zombie.inventory.types.Food@16f76dab", can I somehow access the item it refers to?
His going to be famous soon. Every modder knows his name
Yes
Thats the item
Ow wait as string
Havent tried
Maybe not... Hmmm... Is there a toobject() function? I guess not
you probably can't, I assume the @16f76dab is its memory address, which won't be valid after reloads and such
yes. I got this string by using item:toString() and now I want want to revert this and get the object reference from the string.
Youve been waiting for the perfect time to answer a question havent u
when's the perfect time?
Dont convert it to string i guess
Idk cuz u mentioned u check chat but no activity. But when u sleep theres stuff going on
Why did you need to store it as string anyways? You can just store it as it is using moddata
I want to store the item via getModData() but you cannot store items. So I tried to store the string (which is possible) and then somehow retrieve the item from it. But probably also not possible as @astral dune wrote.
I don't know what the standard procedure is to store an item, but I would look at the itemfactory to see what methods it has
I think instances of inventory items cannot be stored via ModData
probably something like storing its full type and moddata or something like that, so it can be recreated
Ow yeah albion just mentioned that earlier
recreating the item will probably not work in my case. I really need the reference to the item which is already in game.
You can also pull it from getScript
wdym?
Or was it getScriptManager
Or... Wait let me check
where is it, in game?
Or better question is.. what is it that you are trying to do
it is an inventory food item which can be in player's inventory, in any other container or just lying on the ground or so.
ya, what are you trying to do exactly
i found my coat ingame, does anyone know why it says this
im wearing a regular leather jacket, i dont see how its worse than that??
@ancient grail @astral dune I am still trying to change the icon and the textures of some of those items. Problem is that the item:setTexture() command is not save-game-persistent i.e. it will receive the default icon after reloading the game. One idea of mine was: store all the relevant items in ModData and whenever game is loaded, apply the correct texture and icons. But ModData probably won't do the trick...
its probably comparing to something else then?
get naked, get your trenchcoat on, then go through your unequipped clothing to see which one does it compare to
from the looks of it it compares to bulletproof vest
Use DoParam
its only item in game that has 100% bullet protection on torso i think?
The idea is doable
Dont store the item
Instead add a boolean to the item
On load checks inventory if item has that var == true re apply texture
But use DoParam instead
I only want to change the icons of some instances of the item, but not for all of them. So one instance should have icon1, the next instance should have icon2 and so on but they all should belong to the same item type. DoParam will change the icons and textures of all instances afaik.
No it wont
It will only change that item
Heres me on one of the servers im an admin on.
The beerbottle is do param based
Its actually a flash light
Anyways way too sleepy.. goodluck @small topaz hope u make it work
Also i got an idea out of this thing u are trying to do
We can create animated icons
thx for the help! I will try this DoParam again although I really thought that this will change the script.txt entry for the item (and thereby changing textures and icon of all instances....)
@small topaz It's just the icon texture that needs to change, right?
The icon as well as the texture for the 3d model. But only for specific instances of the item (should be possible that different instances get different icons and textures).
Then this should work I think.
function ISInventoryPane.refreshContainer(self)
local it = self.inventory:getItems();
for i = 0, it:size()-1 do
local item = it:get(i);
local modData = item.getModData().RazabsNewIcon;
if modData then
item:setTexture(modData);
end
end
oldRefresh(self)
end```
Before the inventory pane draws itself, getting all the items in the pane's associated container and checking if there's a mod data entry with your alternate icon
will this also work for the 3d model texture? (probably not since those 3d models are rendered in the world and not in inventory...) but for icons alone, this might be a good idea. thanks
huzzah and hooray! a subtle but nice change:
Is there a set function for the 3D model as well? If so, yeah it should.
Just need another line below 'local modData = item.getModData().RazabsNewIcon;' fetching the new 3D model name and another line below 'item:setTexture(modData);' applying it.
if modData then
item:setTexture(modData.NewIcon);
item:set3DModel(modData.NewModel); -- replace with correct 3D model set call
end```
there is a set function afaik. so I can try. but if the item is rendered in the world before you access it via any menu, you will probably see the item in it's old texture.
hi is there anybody on could help me with some basic mod im trying to do in blender?
im trying to make an envelope for a mod but i cant find any tutorial to cut the cylinder in half
You're in Object Mode.
You'll need to switch to Edit Mode by pressing Tab or changing the drop down box in the top left
anyone have an idea why I would get this error?
LOG : General , 1673760283411> 38,265,815> ERROR: sendClientCommand: can't save key,value=2.0,zombie.iso.objects.IsoThumpable@69330f91
you're trying to send a Java object across the wire
you need to send a built-in lua type, so, something that can be used on the other end to look up the IsoThumpable object
any way to get in-house light source obj without light switcher obj to remove it?
ty i will try it
holyyyy when will this be published i need this lmao
Hey thanks! The mod is here: https://steamcommunity.com/sharedfiles/filedetails/?id=2904920097
The rear action animations will be included in the next update here in the next few days. working on a few more animations right now. ๐
What's the difference between getUsedDelta() and getUseDelta()?
if memory serves, say you have a propane torch with 80% fuel
getUsedDelta() is 0.2
getUseDelta() is 0.8
lol, half full vs half empty eh?
Is it just me or do antidepressants suffer from rounding errors with their useDelta?
You seem to get an extra pill out of them
I wouldn't call it a rounding error
the same is true of thread
if it has less than the amount normally consumed, but more than zero, it will let you use it
@dull moss I think ETW has a bug; I had a character with 0 unhappiness/boredom/stress who was ticking down their agoraphobia score whenever they were outside
I use this in all my games now. It's a subtle change in some areas but it's super immersive
according to the spreadsheet, it should be ticking up, not down
Well, the error is that the amount of uses a single item has is more than the useDelta would suggest...
Regardless. Speaking of thread... I assume there's no built-in way to make items stack on creation automatically?
As in, when you rip clothes for example and get thread, any way to make the created thread merge with any existing thread you have?
@humble oriole I take it all back, getUsedDelta doesn't exist
there is only getUseDelta, and it represents the configured usage delta amount
e.g. if the useDelta is 0.01, each "use" of that item will remove 1%
declaration: package: zombie.inventory.types, interface: Drainable
you could override the rip clothing recipes and have them run a function which takes care of consolidating
Ah, so do it via an event... Okay. It's for a different recipe but for similar purpose, but okay
Then maybe I'll handle spawning the drainable via the same event...
@humble oriole ah I see, that's from the Drainable interface
down is good
then, getUsedDelta is an absolute value from 0-1
getUseDelta is how much each use should consume
I was outside, and it was ticking down into negative territory
I print()'d the value every few seconds from the debug window
I noticed this because I randomly acquired the negative trait
so I reset the var and then observed it
sure, you just bring up the debug window
you can run any code you like from that prompt
it's basically a lua REPL
yes
literally unusable, unsubscribed.
Yea, doing work on a propane tank
then, getUsedDelta is an absolute value from 0-1
getUseDelta is how much each use should consume
the Item class also has getUseDelta, but doesn't implement the interface
Quality.
but that's OK, because the interface only has the member getUsedDelta, so that obviously isn't confusing at all
@dull moss oh and in regard to bloodlust documentation: isn't it true you can only access what it does from the character creation screen?
it's not uncommon for people to either add a mod to an existing save, or simply forget. You shouldn't need to go into character creation to find out what a trait does
(unless the only way to gain the trait is through character creation, since then you must have expressly picked it yourself, and therefore know what it does)
But I didn't have the trait in my list, just a moodle
So I get it to the green zone and I'm left wondering what the positive effect actually is
Well I'm not going to put whole bloodlust system description into it
nothing
It just indicates if you earning it or not
See, that's a great piece of information
But I only know that now because you personally told me
fair point
If you're inventing new game mechanics, give them some limelight
The sheet tells you how to get it, but doesn't explain the Moodle or what it does
In mods like more traits, it's impossible to encounter features without going through character creation
With ETW, that's not the case
So you need to give a bit of a sales pitch ๐
Do I include your ACTUAL progress to getting trait in moodle?

I was planning to making it visible eventually on new character tab
eh i'll leave it at this for now
"My Bloodlust Meter is filled up to %1 percent.<br>Being above 50% will earn me the Bloodlust Trait eventually, being under 50% will regress my progress",
not sure if <br> works, gotta test xd
You also have some grammar errors in the tooltip strings for the moodle
I forget which level though
Something about killing zombies getting fun

Moodles_BloodlustMoodle_Good_lvl4 = "God, I love culling undead",
Moodles_BloodlustMoodle_Good_lvl3 = "This is definitely a well-spent time",
Moodles_BloodlustMoodle_Good_lvl2 = "Not the worst way to spend some time.",
Moodles_BloodlustMoodle_Good_lvl1 = "This is slightly fun",
Moodles_BloodlustMoodle_Bad_lvl1 = "There's barely any joy in this",
Moodles_BloodlustMoodle_Bad_lvl2 = "This is boring job, but someone has to do it",
Moodles_BloodlustMoodle_Bad_lvl3 = "Killing few zombies would is not the worst thing",
Moodles_BloodlustMoodle_Bad_lvl4 = "I really don't feel like killing any zombies",
which one
oh
kek
Moodles_BloodlustMoodle_Bad_lvl3 = "Killing few zombies would is not the worst thing",
I started writing something else
and switched


We are in Kentucky, not Soviet Russia, tovarischch ๐
I think I'll just mod the strings to be something you'd expect Moistcritikal to say
Break those lines
My friend was able to quit smoking, he rates it 10/10
I like it, you can balance everything as you wish and it gives you more shit to ~metagame~ work towards earning
instead of "dont smoke for 45 days"
"I like it, you can balance everything as you wish"
endgoal achieved
I'll be thinking on more interesting ways for the rest of traits instead of jsut reach level x
hello. is there any guide on how to make a clothing.xml file with custom assigned outfits for a mod?
That bloodlust Moodle icon causes me physical pain though
It doesn't gel aesthetically with the game's moodles
It's not actually an issue, I might have a crack at it though
I was thinking of taking one of the faces in the base game and messing with the eyes
Are all maps linked together? Even modded ones?
yea modded maps tend to connect with the main vanilla map for convenience, there are some maps that are completely separate though
ok so i redid the whole thing using zombieszonedefinition.default
the problem remains though, a portion of the zombie population remains hatless
and im kinda out of ideas
already took care of that
There's Authentic Z also you can look around the mod files
true, i did have a look at authentic z's files
but that mod aims to achieve something a bit different
it utilizes most of the zombieszonedefinition spawn-area/zone types to add more variety, meanwhile im just looking to add a hat to every single zombie that spawns
i guess i could get every single zone type and insert the hat for every single one of those zone types, but that could potentially conflict with other maps in the odd chance they utilize custom zombie distributions etc
Hey there, I'm just writing a mirroring fnc for my construction site tiles for wallLike tiles. They need to get mirrored in some cases to ensure they will always appear on the "inner side" (opposite of faced direction, similar to the walls themself).
This also works fine, but now I'd implement multi-tile support.
So my question is: Are multi-tile structures limited to rect's or can/could tiles receive arbritrary adjacent geometry as well?
e.g. geometry like such things:
Tilezed seems to have these options so maybe, yes. You should test it to see what you get. From experience I can say only that it doesn't allow a second object per square.
tilezed has the option of 3x3 combinations
So you mean using such 3x3 + omitting some of the tiles to receive non-rectangular structures?
no, you have a sprite and you select group, facing and a square e,g 2,1
so you can have 5 sprites and combine them
Ah, I see. Thanks, never had to create multi tiles. I'll give it a try and play around a bit and check whats possible and what not
The only part of that i didn't end up figuring out or don't believe is possible is having more than 4 faces per group though, when it comes to mapping your sprite faces of the multi tile, you should be able to use direction and offset to choose 4 places of direction within however many tiles your object is. just not more than 4 face options per group. if you can figure out how to get passed that, would be cool. for me i just made diff items for every 4 faces
Oh ok, yeah then it might be not possible to do it through vanilla way, maybe you can check onGridSquareLoad or regulary for loaded zombie and put an hat of them if they don't have some
Ok, that was my first thought too. I'll report back once I've tried it out a bit
make sure you use commanders cheat sheet if you arent already
or at least know the offset mapping
Also want to check whether the game can handle wallLike multi tiles with 2 multi axis like 2x2 since the anker square wouldn't touch the wall. Guess I haven't seen a case distington for that in isValid() for such cases
not sure but i have some outside of the box options if you dont get anywhere
Bin in der Theorie damit vertraut, habe es aber noch nie fรผr eigene Tiles genutzt. Wird schon funktionieren. Danke fรผr den Hinweis. Ist das CheatSheet hier irgendwo verlinkt?
going to sleep for now. assuming that's german, i dont speak it unforunately but can translate
oh yes
Perfect, I am german as well, so thats fine. I gonna google for it
cheatsheet is in mapping pins
alright ty and gn8
Cool thing, that would have saved me a lot of time and experiments when I was getting used to it ๐

finally came to a compromise... i returned to the underweardistributions method and set the basechance to 100%. this means more underwear spawning on zombies, but also a guarantee that zombies spawn with a hat
i feel like there was a better way to get it done without this compromise but i think it's good enough
Is there a way to force a player play an animation?
tilezed explained
right 0 to 3 means it's 4x4
So in doing AddWorldInventoryItem on myself but the items that i spawn dont render. Any ideas why its that?
If i set one of em will it set the other ?
Is there a way to add a new recipe unlock to a magazines through lua? like itemtweaker or something like that?
I can't find it
My English is not good, and the translation software is also very slowใ
ask your question there.
I have asked. Thank you very much for helping me.
I've tested some things and it seems to work with multi tiles of any combination between (0|0) and (3|3). To be able to make them buildable, you'd have to implement a matching ISYourMultiTileBuilding.lua to get the required squares and place the corresponding Tiles on it. Same like in ISWoodenStairs for example. Or one could write a general base class which will do it automatically - well, dunno if it would be worth the time for it. Especially if just a handful of the possible combinations will be used practically, so maybe it probably makes more sense to simply hardcode them
Tile Props works same as for (fully) rectangular multi tiles
However, I've decided to simply use the smallest possible rect for the construction sites, since this one looks a bit messy.
Maybe I should generate them wallLike so ropes will be only on the outer boundaries
so, anyone here has experience with actions ( opening doors, car stalls ) basicly how the game handles interactions with world objects?
wanna implement the idea that @calm depot provided a few days ago
or any nice documentation out there?
@ancient grail found you over at one of the servers I play on ๐ good to see your mods spread around
So I'm thinking about an autorun mod... anyone have any thoughts on easy paths to implementation? Do we have the access required to jog / run manually, or is autowalking about as good as it gets? Not sure yet if Lua can affect jogging or running. Curious what others may know.
hmmm i guess i could use this
function ISShutOffVehicleEngine:isValid()
local vehicle = self.character:getVehicle()
return vehicle ~= nil and
vehicle:isEngineRunning() and
vehicle:isDriver(self.character)
end
to "stall" the engine?
as reference i mean
local player = getSpecificPlayer(0)
local shutOffAction = ISShutOffVehicleEngine:new(player)
-- Then you would check if the action is valid before performing it
if shutOffAction:isValid() then
shutOffAction:start()
else
print("The player is not in a vehicle or is not the driver.")
end
if only it was this easy...
it actually detects when the player is not inside a vehicle or in the drivers seat...
but doesnt shutoff the engine ๐
Is that a timed action?
no idea if the shutting the engine is a timed action, but i think so
where am i being dumb? ๐
lemme give it a got
that however
I think it still won't work yet
Because of this:
function ISShutOffVehicleEngine:isValid()
local vehicle = self.character:getVehicle()
return vehicle ~= nil and
vehicle:isEngineRunning() and
vehicle:isDriver(self.character)
end
yeah, thats what im using as base
There are basically two important Lua classes to interact with world objects. Those are the inheritance line of BaseTimedAction, which will be used to perform a single timed action. Then there is the TimedActionQueue which is used to create a stack of (usually related) Timed Actions. It holds a static registrar (table) which stores TimedActionQueues per player and queue
That is going to determine you CANNOT shut the vehicle off if vehicle is nil
is this a joypad thing where you can't run?
Vehicle will be nil if your player is not in a vehicle
yeah thats what im using to detect the player inside a vehicle and if its on the driver seat
Wait is there an autowalk hotkey?
Y
That's walk to
Autowalking as I mean it is walking autonomously.
Just
automatic walking
close as autowalk as you can get in the game
close to
You can add a custom event which fires whenever walkTo is done and which executes another walkTo call if necessary for example
im starting to think about doing this the lazy way
The problem is that it will not return true if the player is not in the car.
and just simulate a presskey
not sure what you want, aimless walking?
You wanted to turn off car while you are not in it right?
auto walk mod has a few modes
nop
i want to turn the car off when im in it
so you can like buy a reward and stall the car
like walk at the same place to get nimble
Yes, you just keep walking in your forward direction until you (choose to) stop
Classic autowalk
Not walk-on-click
just forward?
I want to allow change of direction without cancelling
But yes if you do not adjust, it moves the way you face
yeah auto walk mod, you can select any place on map and just walk there
also i want to add temporary traits... someone suggested that
positive and bad one
was it olipro as well?
I do not want to select places on the map @fast galleon
someone here suggest that and its a good idea
I want to activate autorun and just start running until it's deactivated
temporary negative or positive traits the chat can buy
Changing directions freely along the way
maybe thats easier to achieve and i should start there and not with the vehicles :\
you said just go forward
ohhhhhh
Should be possible with BaseVehicle's engineDoShuttingDown() function
I also said this
pls do tell me more ๐
sec i check the sources
well still auto walk mod does far more than that
Sounds cool for the people who want that, but seems like it has a very different purpose in mind.
Ah there is also a exposed shutOff(), guess you have to try which one works
not really, just select 3 squares away in a direction and keep switching
I know people who chronically autowalk/run when they play various games. They have arthritis and they don't like to press the joystick unless they're changing directions.
I'm wondering if it's possible to load a chunk without a player actually being there
hmm it looks usable... i wonder if i need to declare the vehicle or if it just performs the action
Both are object methods, so you have to call them on a vehicle instance like myVehicleObj:shutOff()
ill give a try
all walk is 'auto' you actually sit in your chair
Like using the doLoadGridsquare on IsoChunk
ok so i need to get the vehicle object
yes
damn it ... why isnt never easy
If you sit in the car, i guess your player object becomes the vehicle, but not sure about that
hmm i guess ill use
shutOffAction:isValid()
to check if the player is in a vehicle
lol you are so helpful
Or at least there should be any getter in IsoPlayer
if true ill get the vehicle object
Let's have a philosophical discussion about what truly constitutes automaticity
Because that is clearly my goal here.
and then shut down the engine... seems the best way to go about it i guess
Ah there is a getter
playerObj:getVehicle()
You are the one who mentioned health issues, like I suggested you run a marathon.
so where does one find this magic tool that reads your mind.
function turnOffActiveVehicle() local playerObj = getSpecificPlayer(0) local vehicleObj = playerObj:getVehicle() if vehicleObj ~= nil then vehicleObj:shutOff() end end
@vestal geode senpai! it works ๐
local shutOffAction = ISShutOffVehicleEngine:new(player)
-- Then you would check if the action is valid before performing it
if shutOffAction:isValid() then
getPlayer():Say("Shutting off the engine!")
mycar = player:getVehicle()
mycar:shutOff()
else
getPlayer():Say("Im not in the driver seat!")
end
ok, now to get a flat tire ๐
Ah, so you need the timed action pointer, guess you want to implement something like "Repair everything possible" ?
more like its an update to my integration mod so that chat on twitch can buy stuff to make the streamer life easier or try to kill him
i already have buying items ( positive and negative ones ), air events, zombie spawning
and now im working on the car bit, flat tire and stall engine
and probably kill the battery, still not sure about that one
lol
after that i will be working on buying positive or negative traits for a set amount of time
ex: add the clumsy trait for 5m
I'm not a fan of streams, but a nice idea ๐
its a way to have the chat feel more included in the game the streamer is playing
and its a damn challenge to the streamers, since the chat can just send 50 zombies to eat him ๐
or call a military heli
A bit like a redroom where you can torture people for money ๐
kinda yeah ๐
but for every negative action i also have a positive action
so its balanced and up to the chat to choose ( they will 90% of the time choose to kill you but at least theres a choice )
I would bet anything that at least 90% will buy negative triggers ๐
well the 1st version of the mod about a year ago...
on a 6h live stream,. the char i had that lived the longest was around 24 m
and all i did was frun from zombies and helis
๐
๐
dang, just learned people play this game with voice commands l, sorry
anyone cares to do some testing?
testing?
yes
? what exactly?
you can copy your game dir and run a local testing server as well
it will make life much easier
good idea
i have to open the game first and remember how i used to play this thing
you can even separate the Zomboid dir by adding the cachefile argument like
-cachedir="E:/Development/JavaWorkspace/ProjectZomboidModding/appdata"
so things won't mix up between your origin files and your testing/staging area
And... just in case you use any IntelliJ base IDE like IDEA, you can even create comfortable Run Configs:
Arguments are trunced, but guess you can see, which part of the launcher batches belongs to where
The arguments are a bit redundant, but this is the main part
hmmm maybe i can use something from here zombie.vehicles.EditVehicleState
Its exposed, so should work. It offers methods to inject/update/adjust scripts on-the-fly
i should probably read the code of some mods that alter vehicles and maybe i can find a solution there without pulling my hairs out
Yeah it's mostly the easiest way, as long as you take care of not adapting bad code
can anyone help me and tell me why when somebody loads this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2918506026 after this one https://steamcommunity.com/sharedfiles/filedetails/?id=2918527918
the first one doesnt show up in the crafting menu anymore?
Are spaces allowed in Mod IDs?
@dull moss thoughts?
Maybe having your Recipes_ape.TXT file named the same in both mods is causing a conflict?
the internal id? no
that might be it
and why would you do that anyway, you absolute madman
That, or the spaces in your Mod ID names are an issue @manic relic
I am helping Gamer
I wouldn't ๐
nope, I made it and will now refuse to let you use it
lol, go ahead
I did some semi-transparent flares around the eyes, take a look at it in-game to make sure it looks good
lmk because I am not exactly familiar with recipes and crafting nuances, so it would be nice to know what to expect if I go that route down the road
Is it a known bug, that ISWoodenStairs:isValid() will return true for crossed, overlapping stairs?
I don't know if it's a bug, but I believe it only checks for no obstacles at the foot of the stairs and at the top
this does also somewhat make me want to create an Escher-inspired monstrousity
yea, but i see now reason why, so I guess it's a bug
especially because you can build such things
you think that's bad? you should check out burned buildings with partially-destroyed multitile objects
yea sure, made by map editors. But by that, you can create something like that in-game. Also, the "upper" stair blocked the lower one
my favourite is hovering sign, where you dismantle the supports
no, you can just set fire to a building
Yea true
depending on where the fire goes, you'll get crap like half a bathtub
and it looks quite obviously like half a sprite
Still, I'm pretty sure this behaviour isn't wanted, at least because the middle part of both stairs are on same height, so the material would intersect irl as well
Is there a flag for hiding TimedAction progress bar?
On an individual action
I tried action.forceProgressBar = false
No dice
Glad it worked
I think not. Guess you'd have to get a pointer to the UI element and set visibility to false
Oof
/\ stairs block each other <.<
reminds me that time I placed a moveable below the stairs and couldn't go up.
Yeah, looks wrong for me. Wanted or not, I'll fix it up in my build overhaul mod. Don't like that behaviour
Escher monstrosity denied
ta. also have a useProgressBar if it helps
I tried action.forceProgressBar = false
action is java aboject, right? You can't do that.
You should be able to initialise the object in the constructor
But afaik forceProgressBar is only to enforce it, not to supress
@fast galleon what happens if you use :setUseProgressBar(false)
(java method of BaseAction)
@thick karma
The action is a Lua object
--
function ISWalkToTimedAction:new (character, location, additionalTest, additionalContext)
local o = {}
setmetatable(o, self)
self.__index = self
o.character = character;
o.stopOnWalk = false;
o.stopOnRun = false;
o.maxTime = -1;
o.location = location;
o.pathIndex = 0;
o.additionalTest = additionalTest;
o.additionalContext = additionalContext;
return o
end
o is the action
I like the idea but not sure what to use it on
You need to do it here in new, or use it later on self.action
self: lua ta
self.action: java ta
you have your own action that derives from ISBaseTImedAction, no?
there's a self.action - I believe that's the java obj
when ISBaseTimedAction:create is called, it instantiates a LuaTimedActionNew
I see that
that java class is derived from BaseAction
and BaseAction has that progressbar method I mentioned
Alright, it is a bug.
There's non-working code which shall prevent this behaviour
I didn't until you pointed out you thought action was a java object and I was trying to figure out where we lost each other in translation
Because I was discussing earlier how I think of using the queue in terms of ISTimedActionQueue.add(action)
But that action is a table (in lua)
a table
And there is an action within it that I didn't see
Right sorry
anyway, give it a punt, see if it works
you can also obtain the ActionProgressBar element directly and disable it, but hopefully that proves unnecessary
I do hope you have a good reason for disabling it though, you're flying in the face of convention ๐
Because I am trying to create an autowalking mechanic
And most people won't want that above their heads while simply walking around
Does DoParam not work for altering an item's default DisplayName?
Also for some reason, getText can't get entries in ItemName_EN.txt
autowalks off roof of building
This Is How You Died.
@vast nacelle on the client or server?
Client or rather trying on SP at the moment
Anyone knows if the devs have been notified about the padlock craft exploit?
if ItemName_XX was broken, everyone would be screaming
it's more likely you have a syntax error, or var naming mismatch
and consequently, it's just not loading the strings
Bingo @calm depot
no, it ignores you
@calm depot any suggestions how to add a trait for X time and removing when the time runs out?
got the car events bit working... at lest for the engine and tires..
so 2 more ways for the chat to kill the streamer, check
now to mess with the traits ๐
This looks like it all matches up
and there was a different command to get the itemname I believe
Thanks. That was what I thought since I also used direct string and still didn't see the name get changed.
You have to compare timestamps like in BuildAction for the sound loop
@pulsar heath add a function to the EveryTenMinutes/EveryHour to take care of disabling
sound loop?
those fire on in-game time elapsing, not real time
ah for the parts?
Yea your right, sounds better
ahh sorry
so adjust according to your sandbox settings for how long a day passes in IRL time
hmmm, yeah i have to make a logic check to get the day duration and then calculate if the 5 real world minutes are gone
not everyone plays on the default 1h days
Translator.getItemNameFromFullType(...) maybe
was taking a frankenstein aproach and perhaps its easier if i handle the coutdown externally
that way less stuff for the game to process
better performance i guess?
doing it on every 10m or hour should be very cheap
probably yes, but if you take care to unmount event listeners which are no longer needed, it should be fine as well
yeah but i was thinking... dont even know how i didnt thought about this before... since i already have an app to server as middle man for twitch and the mod
actually, this is the best flow:
-
user triggers a timed thing, start it and register handler for every 10m/hour depending on how long it will last
-
when the time is up, function stops the action and unregisters itself
perhaps its better to also use it for the timed actions
and since the mod is already listening to the app for the events triggered
just need to add one more var on json for the timer of the traits
i think
yeah, but, if you time it externally, you can just pause the game for X minutes
if you do it in-game, you can't cheat your way out of it
but pausing the game send a print to the console right?
I've honestly never looked, maybe
As long as you can inject a callback so you don't have to check for any changed value the support server made, you should basically benefit from it. But honestly as long as you unregister deprecated listener, it's no big deal
LOG : General , 1673798000008> EXITDEBUG: setGameSpeed 1
is it printing that because you're in debug mode?
my 2 cents is that the cleaner solution is to implement the logic in the game
relying on a debug message when you pause is hacky
yeah you might be right, im 99% sure you are
I would recommend that too
ill just make run in the mods code
make it
no way its worth to go all frankenstein to save a few lines of code in the mod
๐
Also keep in mind that fewer rows does not necessarily mean better performance. Especially when it comes to such micro-optimizations, a few bytes more in RAM are hardly worth mentioning nowadays, even on multiplayer servers
More important is to avoid server execution flow where the clients could do the task as well and such things
it wasnt the amount of code but adding another Events on evenry x time
I really want to make an item that drains battery on use, but I don't understand how the battery/power stuff is handled in this game. Are there any good guides or resources for this?
i only have one event added everyoneminute, but... the less you add the better, but in this case i have no choice, its the best way to do it
Yes, but the event manager will loop through his fire methods so or so. As long as you try to mount listener on-the-fly and unmount those no longer needed it's really just a couple of additional stack frames in the heap/stack
so time to make a function to count the time ๐
and ill be done for the day... got the car things working, the traits... thats good enough for one day ๐
then i need to improve my zombie spawn location randomizer
but thats for tomorrow ๐
batteries are a drainable, in principle, they are basically the same as water bottles, gas bottles, propane torches, thread, etc
every drainable is either empty or full, it has a use delta which determines the %age depleted each time you utilise it
(for batteries, there's usually a periodic tick that "uses" it)
Okay, that's UseDelta in the item function right
So... silly cards on the table, I'm trying to make a vape from 90s tech and my idea needs a battery pack item that drains instead of the vape. Probably like 20 batteries and weighs a ton but it's the best way I can imagine it working. I would also like to do the same thing with a car battery.
Is there an easy way to drain a different battery, or just the one in the item? Could I insert 20+ batteries into one item and drain evenly from them?
only drains when activated
it's a cigarette replacement, basically, just drain a certain % from all batteries when you puff on it
Okay here's a thought, maybe I don't need to worry about programming anything differently if I just change my approach.
One or two puffs per battery then you need to recharge or replace it. That's basically the same as making people carry 20 batteries.
thats one way of doing it
you could get a decent number of puffs out of a couple of AA batteries, the problem is that it would require charging up a capacitor and it would be slow going
Yeah... but I liked the craziness of my other idea
Olipro I actually considered supercaps because I've seen some 90s tech that used them
sounds like it'd be hard to find in rural KY
so, the device being ready for inhalation would be worse than it actually running out
The main chemicals needed to make glycerol and concentrated nicotine are: ethanol (or gasoline) and lye (or potash) -- I can handwave that part as a crafting recipe or two, but finding a supercap seems harder.
but that would make the item more valuable
I literally spent two hours reading scientific papers on extracting nicotine lmao
so its not easy to find, but you stop needing to find cigarretes
i wouldnt mind using a mod that works like that
I like the idea of making your own juice and just worrying about charge
have a recipe to make glycerine out of veg oils
you could set the item to spawn in hi tech places like labs
or military sites
stuff like that
@calm depot Yes, exactly! You mix the oil with lye and it reduces to glycerol
the item ( the supercaps )
oooh nice idea
that would make sense i think
I want the juice to be the consumable, but also renewable
though tbh you gotta extract nicotine from cigs in the first place, but ideally the ratio would be generous
just make sure you match it on a tag rather than the specific item, someone might be inclined to add tobacco growing ๐
tbh I'd love that
if theres a cannabis mod
I know it's in hydrocraft but meh
oh obviously extracting cannabis oil for vape juice should be my next project
if you really want to go full chemist, add extraction of nicotine from tomato & potato plants
hm, the paper I was reading only used "waste tobacco products" but yeah, I could look into the process for those too
thing is I was just shocked to learn we could do it with easily made / readily available chemicals
eggplants have a bigger concentration of nicotine dont they?
what do you guys think of my vape icon
or was it tea?
I love it
looks good
rather anachronistic for 1993 but looks great
I had it generated by DALL-E to look like it was made from scrap found in an apocalypse in the 1990s
hm
Realistic pixel art of a home made vape. Created in a zombie apocalypse with materials available in the 90s.
and tbh I picked that one out because it had the cable too, which is what I was going for
like it's plugged into the battery pack
yeah the battery would make sense ( the car one )
What about this one, kinda looks like an ipod
since its a "prototype" vape in the 90's
@dull moss did you try out the bloodlust sprite in-game?
the atomizer is a bit rough
try combining the tank from the first with this one
ignore the bits off to the side, what about this one
just looks like a tube with a battery in it, which is kinda why I love it
just a suggestion
bongs
why dont u adapt a bong to a be vape?
that would be plausible
nah, will do tomorrow prob
alright, well, ping me if you need changes
or ping me to say you updated the mod with it instead ๐
might try my hand at drawing something resembling this atomizer I have irl, it's so simple it could've been made in the 90s lol
@pulsar heath So, supercapacitor inside, can be charged from a car battery or generator. That's a good idea. Question: Should regular batteries be able to "recharge" it, and should they be consumed for doing so or just take a really long time.
you seemed like someone who might actually use the mod so I figured I should ask you ๐คท
i liked the cable in it... and it makes sense since a game gear needed 6 batteries
and it lasted for no time at all ๐
so for a super cap... AA batteries would be like... have a puff and thats it
and it would destroy the AA of course
I could have a base model vape without a battery, that you could craft with either a battery or supercap to turn it into the respective version. The battery version would just get one use then become the base model again. Is there a better way to do that?
Or do I just make it so you can insert a battery into the regular version, but it gets destroyed and just becomes charge in the cap?
it wouldn't just destroy the battery
your average AA battery has about 1600mAh of charge
If we really wanna be technical, the problem is internal resistance making it only output around 1.5A when fully charged
a 18650 has around 3000mAh
that's why I wanted the pack of 20 AAs originally
so, an AA is about half of that, but it cannot deliver the current as quickly as a vape battery
I was kind of hand-waving a way to get enough power out of it but blow it up in the process
(hence why you would need a charging circuit and have to wait between puffs)
๐
i wonder that... like, if i make a mod that redo the game model and texture, like making fit/str/weight affects your char's appearance,would that be kinda unstable bc of regular game update?
you can't rip more power out of an AA than you'd get from shorting it to itself to blow it up
(also the reason why it's really not great to short a 18650)
can I just make delta negative to charge an item lol
there's the car battery charger in vanilla
oh right, thanks
look at how they do that
oh true
I was actually looking at betterbatteries because I forgot the car battery charger
the other problem is I can't find where it even is in the game file structure lol
the car battery charger?
yeah it's not in items.txt idk where it is
vehiclesitems.txt
thanks
so that's where the item is added... but I don't see how it defines what it does
the charger code is IsoCarBatteryCharger - it's java
the good news is that it doesn't care what the "battery" is as long as it's an instance of DrainableComboItem
you shouldn't need to write any java for this
I dunno how the car battery charger helps me then
you want to make your own charger item, no?
you can recycle the java class I mentioned for your own ends
you don't because you didn't go read the lua code for charging car batteries
once you have, you can write your own implementation that passes the java class your batteries instead of car batteries
so, the way I find code in Project Zomboid, or actually, anything, is some form of tool that can search through files
my personal preference is to use a shell and grep
but there are plenty of options out there. most IDEs, including VSCode can do this too
Morning guys
morning ( 18h13m here )
found the west coaster
lol
*found the SoCal'er
Windows can do this, too. But you have to index the folders you want to search that way.
So I just get to search all the files in the game for bits of code in the hope that I guess the right search terms and find what I need
"my sheriff actually issues CC permits"
yeah, i indexed my hdd where i store all that is coding related
๐
Okay anyhow, I'm currently playing Eerie Country but bits of the map are still underdeveloped. Which one would you guys say is the biggest and most complete map mod to date?
@arctic atlas yep, the second part of it is deducing likely strings to search for
lmao my automovement is so janky
you can't say that and not share a video clip
Which one do you currently play in?
vanilla map with some cities added ( ravens creek, pitstop, fort redstone and a few others )
The movement input is only getting detected once every second or so it seems
So it takes a lot of effort to turn your character once autowalk begins
Maybe I actually need to disable autowalking temporarily during manual control...
And then reenable
you are too late
Can anyone explain to me how aiming in the game works? Is it a hitscan rng type of system?
Like as long as the target is green there's a good chance of me hitting them even if I don't aim the cursor at them?
It might help...
hitscan? lol
Would you?
you target a zombie and then based on your skill, it decides whether you succeeded or not
what you're targeting depends on the angle of the cursor
there's no raycasting here
So it really is all luck and no skill on how well you hit that zombie
if you mean aiming your mouse cursor, yeah, pretty much
stand still, get their outline to go as green as possible and shoot
Does this mod change that?
Yes
Kind of
Aiming skill, with this mod, determines how quickly the crosshair shrinks and how stable it remains while moving
Aim for the head when the crosshair is at its smallest, and boom, dead zed
You can also aim for the legs to knock them down
This sounds like it could cause a good amount of latency issues for multiplayer
I like the mod, because it ultimately saves ammo, but it also makes firearms VERY strong
this is one of those mods where I want to download it to check out the code, but am also moderately afraid of what I'll find
I'm not too savvy on mod development or code, but if one wanted to use this mod for a server, i'd recommend making firearms much more rare, or upping the global zombie pop
It makes shooting much more skill based, huh?
Frankly, I saw it also improves the throwable bombs by a little... Was more interested in that
So can anyone explain to me how maps work? Do all my maps (mods included) actually integrate into each other? Do I load into a different map entirely? How's it work?
It's pretty lenient, but yes, it takes luck out of the equation
All maps you load are placed atop the existing map. They will fully overwrite whatever they're placed upon
maps are loaded in the order they are defined, each map defines all the tiles it occupies
if any given X1,Y1 - X2,Y2 chunk is already populated by a preceding map, nothing happens since it was previously defined
hence why you have to load (for example) Bedford Falls before the base game map
So it's like a jigsaw puzzle? And I'm the one controlling where the bits go?
I might be slightly inaccurate here; it might be per-chunk rather than per tile
someone in #mapping surely knows
It's more per chunk
Or pwr cell... Otherwise maps could smoothly integrate with one another...
yeah, same principle, less granularity
So this means that all of the maps I have installed are actually placed on my playing field?
you start with an infinite black nothing, each map consists of chunks that contain tiles
the base game map is intrinsically no different to a mod map
but if two "modded" maps overlap each other, either completely or partially, the map that is loaded first takes priority?
the chunks already defined by that map "take priority"
if there are non-overlapping chunks (i.e. chunks that have not yet been defined), those will be populated
otherwise it would be impossible to make maps live inside the base game map
How do people avoid map inconsistencies using this system?
don't put your stuff in the same place as other people?
I wish there was a way for me to know which tile I'm loading something into though
That way I could actually complete the map
There ought to be a heatmap for this
huh?
if you want to know the coords of a map you downloaded, open it in the editor
How do I do that boss?
download the PZ modding tools
you can get them directly on Steam or from the TIS forum, or their github
The one from IndieStone yes?
they are the creators of Project Zomboid
Do I want the TileZed or the WorldEd?
depends entirely on what you want to do
I'd suggest getting everything though, unless you're comically short of disk space
Good idea, all I want to achieve is to fill in all the tiles available cleanly and get rid of overlapping ones
what do you mean by fill in all the tiles?
My map looks incomplete like bits of the tiles on the map are unavailable
The one I'm using to host a mp
I didn't make a map
I'm just talking about the map I'm using to play the game
OK, so, what maps are you using?
Sec
and can you elaborate as to exactly what this means:
like bits of the tiles on the map are unavailable
Yep one sec lemme just pull up the game
do you mean tiles where you see a bunch of question marks?
Actually its just blank
So I'm gonna load up Eerie Country here
This is what the map looks like
yeah, because it's hiding areas you haven't visited
if you launch in debug mode, you can right click and show the whole map
Is there a way to switch between debug and normal during gameplay and not have to restart the game?
I have it set to reveal the whole map beforehand
doubt
When I try to go to the parts of the map that's "undiscovered" it's just an under construction sign
that would make sense
It is
Wait by virgin save you mean unmodded?
thast why you see the construction signs
you're missing all of louisville
virgin = fresh save
it's as if you don't have the current version of the vanilla map
How do I fix this?
use the latest version of the game files, obviously
but you'll need to start a brand new game
Game doesn't automatically update itself?
O_o
That is a brand new save
what version of the game do you have
OK, and this screenshot is from a single player game?
No boss, mp
or your server
It's a fresh MP server
right, so did you actually update the server?
ask your server provider.
Server pro- what?
or, if you are managing the server yourself, you can answer it with a cursory google search and a visit to PZWiki
I will look up said cursory google search
I need help understanding this part
Like, I'm in the steam library and where exactly do I "filter for tools"
where you have your game list
top left
right side of the search box
click the icon
this conversation should really be moved elsewhere
How can i define a custom body location for my item to be worn?
Add a lua file with something like this:
InsertNewLocation("YourNewLocation", nil, false)
else
local group = BodyLocations.getGroup("Human")
group:getOrCreateLocation("YourNewLocation")
-- Optional
-- Add statements like this if the location should not be worn together with something of the other location
-- Like Hats and Full Face Helmets or something
group:setExclusive("YourNewLocation", "SomeOtherLocation")
end```
What is InsertNewLocation?
Can probably just skip that.
I think it was either an old game function that handled adding new locations or a function added by an old utility mod.
Doesn't seem to be around now (or I don't have it)
Yea so i do that but there is no option for me ingame to equip the item for which i defined the equiplocation
is it possible to call func2 directly like in the next example?
function func1() return 1,2 end
function func2(a,b,c) ... end
func2(func1(),3)
I think its off center
require "NPCs/BodyLocations"
local group = BodyLocations.getGroup("Human")
group:getOrCreateLocation("wallet")
thats what i do
Are you also adding BodyLocation = Wallet, to your item that should be equipable there?
item Leather_Wallet{
DisplayCategory = Container,
WeightReduction = 10,
Capacity = 1,
Weight = 0.1,
Type = Container,
DisplayName = Leather Wallet,
Icon = Wallet_01,
WorldStaticModel = Wallet,
PutInSound = PutItemInBag,
BodyLocation = wallet,
CanBeEquipped = wallet,
}
Thats not possible
thats the item for which i defined it
no
i don't really know why but it only passes 1 when you do this
Maybe cuz its similar to local a = a or {}
So maybe since 1 is true or exist then it shoots that
function func1() return 1,2 end
function func2(a,b) ... end
func2(func1())
```is allowed though ๐คท
Whatcha workin on poltergeist
yeah, I think I've experienced both cases and was thinking how to merge it like that.
just doing a debug line with a bunch of if, and would be nice to return true or false as well for formatting but it's not a big deal. I prefer no formatting to saving the local first ๐
yea, but as said it gives me no option to wear it
#mapping better luck here for sure
Im not on desktop right now but a good idea is to check the fanny pack script


