#mod_development

1 messages · Page 553 of 1

visual steeple
#

Hi!!! I'm new to modding. Does anyone know how to choose the GUIDs to put new clothes? I mean, so that it doesn't repeat itself and create an incompatibility with another mod or the base game

autumn temple
#

how do I change the main menu theme?
I have my code laid out like this but it isnt working?

autumn temple
#

I tried to use an ogg file and it didnt work, so i switched to wav

#

still no shot

shadow geyser
#

ive never used it myself, but that is what I see people replying to people asking about GUID generation

visual steeple
autumn temple
autumn temple
#

but how tf do I do that lmao

ancient grail
#

hi where do i start when i want to create a cooldwn on respawn this is for pvp to avoid spawn killing

autumn temple
sour island
#

damn TileZed is disrespected every chance

blazing escarp
#

dose any one know if some one has done a mod for a C96 mauser and other ww1/2 guns in the game ?

gilded hawk
late hound
wraith root
#

Isn't it the only supported map editor program for this game

tired charm
#

Hello!
I'm aware what I'm going to ask is probably close to impossible and that's why it's fine if no one answers as I completely understand it.
Going to the question: does anyone have any idea if it could be possible (or something close to it) to spawn base male/female skeletons (basically just empty characters) somehow (in MP)?
That would be needed for "rp purposes", like fake NPCs.
If that would be possible, does anyone think it would be possible to animate them (thinking of it as they should have their skeleton which is just the base character one) or dress them?
Thank you, sorry again for the weird overcomplex question.

unique goblet
#

I am using setIsThumpable to make IsoThumpable object temporarily nonhitable. Code that does this runs on server side. isThumpable is correctly set to false for players that don't have the object loaded. But players that had the object loaded before I changed isThumpable still have it set to true. Only thing that currently helps is reloading the object on client (either reconnecting or leaving and returning to the area where the object is). How do I properly send from server to all connected clients that object has changed so they have to update it? I tried this using transmitCompleteItemToClients() but that doesn't quite work because I end up with two overlaping and almost identical IsoThumpable objects occupying same grid square. Only difference between them is that the original one has isThumpable set to true and the copy has it set to false. I need to change it on the original IsoThumpable, not create copy of it with changed property. Is there vanilla function that I can use or do I have to make my own custom command to achieve this?

tired charm
sour island
#

More seriously, you can spawn IsoPlayers like the NPC mods do

#

I'm not sure what hiccups that could create in MP tho

#

But if they're meant as shop keepers or something, you could also set their god-mode on - the issue is zombies would still want to eat them.

tired charm
#

I see, I see. That's useful, I'll check their code a bit to get some ideas.
Perhaps some kind of ghost mode, but that would be invisible to players as well so it could complicate some stuff.

#

Thank ya

sour island
#

Could have them die and respawn in a couple of in-game hours

#

or even check to see if the area is clear enough

tired charm
#

Yeah.
Actually the "dying" thing would not be too much of a problem cause it would be made for a semi-private server in which I would have no issues both giving admin to everyone to see them or just putting them in safe places.
My idea was to use them as some kind of placeholders to give some ambience, just that

sour island
#

oh

#

I think you could retool mannequins for that - if they have animation capabilities i'm not sure

tired charm
#

Oh

#

I'll try to check spawning some basic characters and see if it works/how would it work and perhaps have a look at mannequins if I completely fail

#

Though I see there are various mannequins tho im not sure if they just have animations or they are completely different models

sour island
#

Might be alot of work, may be better to just wait for NPCs lol

tired charm
#

true lol

#

Perhaps pretending to have someone there could be smarter 😅

#

Oh yeah mannequins definitely use animation btw, just checking out.
You got a fair point tbh, I'll avoid the IsoCharacter thing as its way too complex. But Mannequin stuff perhaps

autumn ether
#

guys, you can throw a link to a complete guide to creating mods for clothes

shadow geyser
# unique goblet I am using `setIsThumpable` to make IsoThumpable object temporarily nonhitable. ...

you could just do it with OnserverCommand. Have the serverside code send the command using "sendServerCommand" to all players with the coordinates in the args. Then you just need to get the cell with the coordinates using getGridSquare(). if it is nil, then the area is unloaded, if it gives a cell, it is loaded. then just get the correct isoobjects from the objects on the cell and modify isthumpable.

tired charm
autumn ether
#

@tired charmok, thx

tired charm
#

Like there are multiple useful things in there. There is even more since I last checked so it's surely full of good stuff.

#

Oh nvm it's dead sry

autumn ether
#

yep

#

is dead

tired charm
# autumn ether is dead
autumn ether
#

@tired charmthx bro. БОЛЬШОЕ СПАСИБО, БРАТ

tired charm
#

goes in very deep even with model importing so should contain everything if I remember correctly

#

you're welcome, I'll pretend to understand the second sentence

glad portal
#

any mod that disables the use of speed up buttons?

jagged ingot
jagged ingot
#

Anyone know of a complete list of all settings for workshop.txt?

#

I feel like I'd have to inspect the JNI to look.

grim rose
jagged ingot
grim rose
# jagged ingot That'd populate every setting?

yes, here take example from my mod

version=1
id=2830301361
title=Project Fumo - boid
description=Adds ability to have fumos in project zomboid!
descrption= BLA BLA BLAH 
description=Have a great day!
tags=Build 41;Items;Misc;Pop Culture;Silly/Fun
visibility=public```
#

@jagged ingot

id is given by uploading on steam workshop
same as you choose tags in workshop menu

jagged ingot
thorn cipher
#

I'm having trouble seeing a 3D object food item in game

grim rose
#

name also is given in workshop upload meny

thorn cipher
#

Anyone able to give some advice?

#

*That I've created

grim rose
#

gabester i had once same problem

#

so no worries

jagged ingot
#

I'm looking at taking a dissassembler to the JNI machine code for PZ-implementation of workshop txts so I thought I'd ask here first.

thorn cipher
grim rose
#

no problem

jagged ingot
#

Thanks.

full socket
#

What's the api class to add a column to the inventory table? I want to add a column showing the item / stack weight

sour island
#

The bright side is you can make your own API to do what you want tho.

full socket
#

Not had a chance to look into modding zomboid yet. Is the majority of the game written in lua?

sour island
#

There are chunks of it in Lua - almost all UI is Lua based

#

The double edge sword of this is if a majority of the UI's process is all in 1 function you are going to have a hella of a time making it work with other mods that touch the same function.

#

But you can make it do whatever you want so to speak.

#

The main game is written in Java - with alot of exposed getters/setters for Lua

ancient thunder
#

Im trying to set up RV interior for the multiplayer server i have with my friends. we are starting from a new save and in the instructions it says
"the map file "vehicle_interior" needs to be put in top priority for MP"
How can i do this?

noble pumice
#

I've been following a tutorial on youtube to mod Zomboid (Link:https://www.youtube.com/watch?v=N6tZujOPnDw) and I guess its outdated. In my "Mod\media\lua\server\items\FFM-Distributions.lua" do I need to add the ProceduralDistributions.lua also?

This tutorial video will show you how to make a simple drink in Project Zomboid. I will go into the steps involved from start to finish. Read more below.

0:00 intro
1:08 Start
1:44 Searching for images to use in game
2:30 Searching for the Sound Effect
3:06 Creating mod file directory
3:54 Creating mod.info
4:34 Creating a poster
7:14 Adding ne...

▶ Play video
grim rose
#

i also need help

sour island
#

But to also answer when you choose mods the menu should have a map priority button. I'm not sure if that button exists for the hosting though.

near scarab
#

is there a version of Lockpicking that actually works with the current Framework? Tried a bunch and no success

grim rose
#

okay

#

i have question

#

is there any way to make some effect take on player

#

like interact with toy -> reduce boredom

#

module Base
{
recipe interact with fumo
{
Time:300,

   Sound:PutItemInBag,
   Category:Entertainment,
}

}

#

this is my current code

#

anybody knows how to make it "enjoyable for character"?

heady crystal
#

Anybody know if it's possible to get a vehicle's key from the player's inventory?

#

Not check if they have the key. Specifically get the key itself.

weak sierra
#

im having trouble with two sandbox options translation/tooltips not showing up, and one sandbox option just not showing up at all (type string on that one)

#
VERSION = 1,

option UdderlySkillbookXP.Multiplier = {
    type = double,
    default = 5.5,
    min = 0.01,
    max = 10,
    page = UdderlySkillbookXP,
    translation = UdderlySkillbookXP_Multiplier,
}

option UdderlySkillbookXP.NeedLight = {
    type = boolean,
    default = true,
    page = UdderlySkillbookXP,
    translation = UdderlySkillbookXP_NeedLight,
}

option UdderlySkillbookXP.ReadWhileWalking = {
    type = boolean,
    default = false,
    page = UdderlySkillbookXP,
    translation = UdderlySkillbookXP_ReadWhileWalking,
}

option UdderlySkillbookXP.WalkingMultiplier = {
    type = double,
    default = 0.5,
    min = 0.01,
    max = 10,
    page = UdderlySkillbookXP,
    translation = UdderlySkillbookXP_WalkingMultiplier,
}

option UdderlySkillbookXP.SittingMultiplier = {
    type = double,
    default = 1.0,
    min = 0.01,
    max = 10,
    page = UdderlySkillbookXP,
    translation = UdderlySkillbookXP_SittingMultiplier,
}

option UdderlySkillbookXP.SkillWhitelist = {
    type = string,
    default = Woodwork;Electricity;MetalWelding;Mechanics
    page = UdderlySkillbookXP,
    translation = UdderlySkillbookXP_SkillWhitelist,
}```
#
    Sandbox_UdderlySkillbookXP = "Udderly Skillbook XP",
    
    Sandbox_UdderlySkillbookXP_Multiplier = "XP Multiplier",
    Sandbox_UdderlySkillbookXP_Multiplier_tooltip = "XP gain per page multiplier (before any others).",
    
    Sandbox_UdderlySkillbookXP_NeedLight = "Need Light To Read",
    Sandbox_UdderlySkillbookXP_NeedLight_tooltip = "If checked, requires light to read.",
    
    Sandbox_UdderlySkillbookXP_ReadWhileWalking = "Allow Reading While Walking",
    Sandbox_UdderlySkillbookXP_ReadWhileWalking_tooltip = "If checked, allows users to read while walking with a separate multiplier applied.",
    
    Sandbox_UdderlySkillbookXP_WalkingMultiplier = "Walking Multiplier",
    Sandbox_UdderlySkillbookXP_WalkingMultiplier_tooltip = "Multiplier applied (on top of the regular one) when walking while reading is enabled and the user is walking.",
    
    Sandbox_UdderlySkillbookXP_SittingMultiplier = "Sitting Multiplier",
    Sandbox_UdderlySkillbookXP_SittingMultiplier_tooltip = "Multiplier applied (on top of the regular one) when the user is sitting while reading .",    
    
    Sandbox_UdderlySkillbookXP_SkillWhitelist = "Skill Whitelist",
    Sandbox_UdderlySkillbookXP_SkillWhitelist_tooltip = "List of semicolor-delimited skill names - internal names from the game, not the normal names. If blank, defaults to Carpentry/Electrical/Metalworking/Mechanics.",
}```
#

anyone see a mistake?

#

sorry to spam i thought it'd collapse those..

#

:|

shadow geyser
grim rose
#
    player:getXp():AddXP(Perks.Tailoring, 80);
end```

some thing like this?
#

just changing values for boredom and unhapnnies change?

grim rose
#

okay for now i am satified

#

but for now squishing give you tailoring xp

weak sierra
#

ok apparently it was using the copy in the workshop folder, so updating that one fixed the two that were showing up but im not sur why the string one is missing..

grim rose
#

if somebody would help with lua command to change unhapines and boredom i would be thankfull

autumn temple
grim rose
#

a tip for future

#

something < 3 months can be taken as outdated

autumn temple
#

but mostly all of it is the exact same

#

its just the music is found in a different bank file

grim rose
#

\Steam\steamapps\common\ProjectZomboid\media\music

#

usually looking at game files helps

#

im not quite sure how to overwrite thing but internet propably do

autumn temple
#

I have tried to make a custom "Theme2" ogg file and it didnt work
I have tried to follow that guide by extracting "ZomboidMusic.bank" and editing the files mx_intro_main_120bpm.wav, mx_intro_stop_120bpm.wav, and mx_intro_end_120bpm.wav

#

then I repacked the bank file and put it into my mod

#

and it didnt work

grim rose
#

number of errorrs says to me

#

no

shadow geyser
#

b and u being the values you are reducing it by

grim rose
#

okay, thank you

#

so i put in the middle of function?

#
player:getBodyDamage():setBoredomLevel(player:getBodyDamage():getBoredomLevel() + 10);
player:getBodyDamage():setUnhappynessLevel(player:getBodyDamage():getUnhappynessLevel() - 20);
end```
shadow geyser
#

yes that should be right

grim rose
#

thanks!

#

somehow it doesn't work

#

ohhh

{
    recipe squish da fumo
    {
        destroy FUMOTH_power,
               Time:300,
        Result:FUMOTH_power=1,
        OnCreate:Recipe.OnCreate.OpenFUMOTH_power,
        Sound:PutItemInBag,
        Category:Entertainment,
        squished,
    }
}```
I forgot

module Base
{
recipe squish da fumo
{
destroy FUMOTH_power,
Time:300,
Result:FUMOTH_power=1,
OnCreate:Recipe.OnCreate.OpenFUMOTH_power,
Sound:PutItemInBag,
Category:Entertainment,
OnCreate:squished,
}
}```

#

second one is propably correct

#

@shadow geyser it still doesn't work, any advice?

weak sierra
#
    type = string,
    default = Woodwork;Electricity;MetalWelding;Mechanics
    page = UdderlySkillbookXP,
    translation = UdderlySkillbookXP_SkillWhitelist,
}```
#

this is part of sandbox options for my mod

#

everything else shows up but this one

#

anyone know why?

#

it's the only type = string one

#

i suspect relevant, but i don't know what's up

shadow geyser
grim rose
#

okay, will do

grim rose
# shadow geyser there is not recipe field from what I can see in the vanilla code. they all only...

i get this error

Callframe at: PerformMakeItem
function: perform -- file: ISCraftAction.lua line # 58

ERROR: General     , 1658451398160> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in squished at KahluaUtil.fail line:82.
ERROR: General     , 1658451398161> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: Object tried to call nil in squished```
#
{
    recipe squish da fumo
    {
        destroy FUMOTH_power,
               Time:300,
        Result:FUMOTH_power=1,
        OnCreate:Recipe.OnCreate.OpenFUMOTH_power,
        Sound:PutItemInBag,
        Category:Entertainment,
        OnCreate:squished,
    }
} ```
#

^current code

#

is it because "onCreate reapeats?"

wooden lodge
#
    player:Say(tostring(roll1))
    player:Say(KaeldorDice[(roll1 + 0)] .. "!")

Question - how do you make an action say something to everyone around you? Like a proper message and not just over your own head?

autumn temple
#

I am so incredibly stupid

autumn temple
grim rose
#

or a small text error

#

and 4 hours goes away

autumn temple
#

I was editing the music for when you create or load into a game

#

not the main menu music

#

im going to just restart from step 1

#

delete everything and extract the vanilla bank file again

ashen falcon
grim rose
fiery pecan
#

Hi there. I'm the co-author of SmallTownResponders. And there's been an issue plaguing it for a while now.
I've got code to dynamically replace zeds and cars, buuut...
scriptReloaded() causes doors/windows to bug out (as in you won't be able to lock the doors, and interacting with them causes log spam about "null"). As in setScriptName()
and the zombies refuse to save their changes beyond being reloaded
but the vehicles... Here's the kicker
if I use setScriptName() Without using scriptReloaded(), it doesn't break anything, but the car won't update itself unless you leave and come back to it
my dilemma is that I'm completely at a loss on how to force the car to update? (I know this is the millionth time I've asked about this, but yeahh.....)

ashen falcon
grim rose
#

okay, thank you

ashen falcon
#

hm i have it set up like this in my mod and it works fine

    player:getBodyDamage():setUnhappynessLevel(player:getBodyDamage():getUnhappynessLevel() - 10);
    player:getBodyDamage():setBoredomLevel(player:getBodyDamage():getBoredomLevel() - 50);
end  ```
grim rose
#

thanks!

#

i can finally go to sleep

#

yupi

wraith root
#

anyone know if I can add custom RCON commands to a server? looking to add toggled wailing sirens and fog

lapis glacier
#

Is there any way to conveniently see and/or edit .class files in the Lua directory without having to decompile every single one?

jagged ingot
jagged ingot
#

Editing? Yes. There're tools for this. Fernflower is a CLI one. For each individual class, you can double-click on a .class file in IntelliJ IDEA.

#

There're also GitHub repositories that guides decompilation of the .class files.

lapis glacier
autumn temple
jagged ingot
lapis glacier
wraith root
#

time to make a fog maker

#

lol

#

custom java tieme

autumn temple
wraith root
#

poggers

jagged ingot
# autumn temple yeah I got the music editing to work. I was just wondering if it was possible to...

Here's code from one of my mods:

function MusicPlayer:updateVolume()
  local pz_volume = getPZVolume();
  if pz_volume > 0.0 then
    self._volume = pz_volume;
    if self.disable_pz_music then 
      -- Disable Project Zomboid's music by setting their volume to zero.
      setPZVolume(0.0);
      getSoundManager():StopMusic();
    end
  else
    if not self.disable_pz_music 
      and pz_volume == 0.0 
      and self._volume ~= 0.0 then
      -- Restore Project Zomboid's internal music volume.
      setPZVolume(self._volume);
    end
  end
end
#
--------------------------------------------------------------------------------------
--  ######   #######  ##     ## ##    ## ########     ##     ##  ######   ########  --
-- ##    ## ##     ## ##     ## ###   ## ##     ##    ###   ### ##    ##  ##     ## --
-- ##       ##     ## ##     ## ####  ## ##     ##    #### #### ##        ##     ## --
--  ######  ##     ## ##     ## ## ## ## ##     ##    ## ### ## ##   #### ########  --
--       ## ##     ## ##     ## ##  #### ##     ##    ##     ## ##    ##  ##   ##   --
-- ##    ## ##     ## ##     ## ##   ### ##     ##    ##     ## ##    ##  ##    ##  --
--  ######   #######   #######  ##    ## ########     ##     ##  ######   ##     ## --
--------------------------------------------------------------------------------------

PZ_SOUND_MANAGER = getSoundManager();

-----------------------------------------------------------------

stopSoundManager = function() getSoundManager():stop() end

-----------------------------------------------------------------

getPZVolume = function() return getSoundManager():getMusicVolume() end

-----------------------------------------------------------------

setPZVolume = function(volume) getSoundManager():setMusicVolume(volume) end

-----------------------------------------------------------------

stopPZMusic = function() end

-----------------------------------------------------------------
wraith root
#

any way to recompile a class I made?

jagged ingot
# wraith root any way to recompile a class I made?

Yes. Make a JAR file of all package roots in the PZ install. It is easiest to do this with the dedicated server since they're housed in the java folder. Add the dependencies to the project. Add your class in and compile it.

#

All the IDE / javac cares about are the calls that class are making / referencing are resolvable.

autumn temple
#

I assumed I would of used code similar to this when I started this project. but I was sorely mistaken lmao

jagged ingot
#

If your compiler complains about something not being found, simply find it and add it to your project.

wraith root
#

hm...

jagged ingot
wraith root
#

I am only making two classes, one to turn the fog on and one to turn it off

autumn temple
#

so would I just put the bank file in the sounds folder, or would I have to recreate the banks/Desktop path too?

jagged ingot
#

These are my dependencies. Don't worry about the typescript jar.

jagged ingot
#

Check zombie.GameSounds

autumn temple
#

I didnt find zombie.GameSounds, but I did find zombie.GameStates which has a MainScreenState that also has a musicTrack state in that

jagged ingot
autumn temple
#

chima_sweat I have no idea where any of that is

jagged ingot
#

Some deprecated / dead code in there.

wraith root
#

For a mod like expanded heli events it uses a wailing siren audio byte. I am wondering if there is a way to access that sound (if it isn't a custom one) and trigger it via Lua

autumn temple
jagged ingot
#

It's so dated that using it will hurt you.

#

It's from the mid 30's in major version.

autumn temple
#

ah

#

ighty

#

thanks

drifting ore
#

I was wondering, aside from TrueMusic, is there a way to get different in game music? I love the in game music don’t get me wrong. I just want to have some different music for RP reasons.

jagged ingot
autumn temple
#

I will try to wrap my head around literally any of this lol

drifting ore
#

Ah wonderful thank you. I want to add some songs from Sons of Anarchy show and Days Gone game for a biker RP

jagged ingot
#
-- Create your own sound emitter
emitter = FMODSoundEmitter.new()

-- Create your own GameSound
sound = GameSounds.getSound(..)

-- Play your GameSound
clip = sound:getRandomClip()
channel = emitter:playClip(clip, nil)

-- Stop your GameSound
emitter:stopSound(channel)

-- Check if your GameSound is playing
emitter:isPlaying(channel)
wraith root
#

ah neat

#

this looks like something I could use for a railing siren?

#

wailing*

jagged ingot
#

I don't want you to waste hours researching the API like I did.

drifting ore
autumn temple
#

true chad

jagged ingot
#

I'll have my buddy make a guide for it.

#

I think more people need to know this.

#

This is from his code too which is a full music player, having things like fadeIn / fadeOut.

#

This is not used code anymore since he went full-on core-modding and redesigned it to work in Java.

wraith root
#

I thought core coding was frowned upon as it can't connect as a mod for others to use except the server its on

jagged ingot
#

People didn't frown on his work when he allowed for custom weapon mods back then. 🙂

wraith root
#

Im asking why the official wiki says its not allowed

jagged ingot
#

Oh yeah it's fine.

#

You can't distribute it on the Workshop.

wraith root
#

yeah

#

must be a nightmare, does he have a fully decompiled game then?

#

or does he go class by class

jagged ingot
#

Yeah. He has decompiled archives going back to build 31.

wraith root
#

Self decompiled? thats a lot of work for one person to clean those out

jagged ingot
#

You can do either. It's not wise to go through all classes and fix them. Just fix the ones you use.

#

You don't have to decompile all classes to mod it.

wraith root
#

well yeah thats what I thought

#

idek how you would get ahold of anything but the .class files

#

not that you need more than that

jagged ingot
wraith root
#

yeah I noticed I could just click and go

jagged ingot
#

Simply open a .class file.

#

Back then in the alpha days of Minecraft, you'd need to decompile it through CLI or scripts.

wraith root
#

only issue is figuring out how to make my own biz

for my first core project I want to add a wailing siren + fog command so I can

/startfog + intensity

and

/start siren (entire map)

jagged ingot
#

Ah. You can do this with a core mod that pairs with an API on the Workshop

#

It's built for Twitch command integrations.

wraith root
#

I wouldn't mind looking at the source code for those but that isn't usually available

#

Im looking to go inhouse, I've learned I don't want to be relying on other people's code if I want to work on stuff like this

jagged ingot
#

The first one is an API for you to do your own stuff in-house.

#

The second one is an example implementation.

wraith root
#

I see, I'll look into these

jagged ingot
#

Sure thing. The game doesn't allow for custom commands to go through RCON and server Lua.

#

OnClientCommand and OnServerCommand is a thing.

#

It has to come from either client Lua or server Lua, so no console interface & RCON.

wraith root
#

the plugin seems to say it supports RCON

#

which is good as it's what I'm looking for

jagged ingot
#

It's a custom command class and a mod to the CommandBase class to dynamically load Java command classes like it. The custom command forwards the command info to Lua.

#

Then you can do what you want.

#

Don't have to use it of course. It's an option though. 🙂

wraith root
#

Better than doing it myself, thought I might learn more there is 0 documentation on that kind of mod

jagged ingot
#

The code is documented and shows the API. 🙂

wraith root
#

shweet, not often you see that in the modding community

#

or at least in the workshop

jagged ingot
#

He's working on a generator for generating TypeScript typings for the Lua codebase for the game too. That community / org works on modding tools.

#

The code there is documented (mostly)

#

Hope the tool helps if used. 😄

wraith root
#

is this that Strom API?

#

or is this the API that the gorillaz pfp guy is making

jagged ingot
#

Neither.

wraith root
#

hm

#

seems him and your friend have the same idea with typescript

jagged ingot
#

Oh. Haha. Maybe he saw the guide for PipeWrench.

wraith root
#

for you are you often making mods in java or lua more?

jagged ingot
#

Both. Java more.

wraith root
#

you work with a server ?

jagged ingot
#

I used to do that a long time ago. Been looking for work lately for it.

wraith root
#

ye, I'd think Lua is better for making mods for others and java is better for working on a customized server type of scene

jagged ingot
#

Java modding is best for servers.

wraith root
#

That's the aim

jagged ingot
#

I like Lua, however (And this is all my opinion), Lua isn't scalable like TypeScript, a language designed to compile to other languages and designed to scale.

wraith root
#

You write typescript for java ? or for lua

jagged ingot
#

It's fast and flexible. TypeScript is too but in different ways that act as safety and compiler checks for what causes most problems in bigger scripting codebases.

#

I write TypeScript, Java, and Lua.

#

Interchangable. 🙂

wraith root
#

what do you use JS for mostly?

#

cant compile it

jagged ingot
#

JS is web or Node.

wraith root
#

well I mean TypeScript as JS

jagged ingot
#

TS is primarily used for and targets compiling to JS.

#

It can compile to other languages too. 🙂

wraith root
#

You use TS to write mods or to compile Lua to Java

jagged ingot
#

Compile TS to Lua.

wraith root
#

how do you squish the scope of TS into a limited box like Lua?

#

I thought it would be the other way around

jagged ingot
#

@wraith root It's actually the other way around since types aren't explicitly a part of the language's syntax.

#

Lua is more expressive at the cost of constraint.

wraith root
#

er I guess I mean in the scope of modding

#

as Lua compared to Java is teeny tiny

jagged ingot
#

Can you give me an example?

jagged ingot
# wraith root as Lua compared to Java is teeny tiny

Actually this is wrong. Java is the most different out of the three. TypeScript comes close to Java however TypeScript does things differently with OOP. Lua has no types. If anything, Lua is closest to JavaScript ES5.

wooden lodge
#

Are trades between players stored in any log anywhere?

wraith root
#

I believe the general consensus with Java (and by extension I'd presume TS) is that it has a massive range of availability for modding since it deals with source

versus Lua which has to find points of access in the code to get ahold of

jagged ingot
wooden lodge
#

I'm seeing a ton of logs, dedicated host, but nothing related to trades

#

Currently trying to solve an unexplainable case of "rollback", trying to proof what his friend gave him before the restart

jagged ingot
#

I don't think that if it were logged it would be there. It'd most-likely be in general

#

Let me check something..

jagged ingot
#

You can make the log entry yourself actually..

#

These events are pretty vague though..

wooden lodge
#

I don't think I'd be able to see what people traded there

#

bummer

jagged ingot
#

Looking at 41.71 events now..

wooden lodge
#

It's weird

#

We had 17 people online

#

11 logged out before restart, 6 stayed in

#

But out of the 6, only ONE got rolled back

#

I'm thinking this is more of a client issue / error / disconnect than a ser ver issue

#

He did mention he left for the toilet and came back to being disconnected

#

But a scheduled restart ALWAYS saves progress

jagged ingot
#
RequestTrade
AcceptedTrade
TradingUIAddItem
TradingUIRemoveItem
TradingUIUpdateState
#

At least TradingUIAddItem has more info.

#

Lera you could possibly suggest logging trades to the devs. I think this is a good suggestion.

wraith root
#

anyway to override the need to have chat open to see global server messages>

steel locust
#

Does anyone know where I can find the code that makes "axeman" function the way that it does? I've done some prowling around in the animstates where I thought it would be, but had no luck, and the lua files only found me where the trait is created, not where its special axe speed bonus is defined.

#

I'm asking because I want to try and make similar traits for long blades, blunt weapons, etc.

shadow geyser
shadow geyser
jagged ingot
#

Out of curiosity, does anyone here besides me and a couple people I know write Lua using modules?

shadow geyser
#

ive been convinced about them, so will be using them more in the future

#

although in my case its just about having less pollution in the global space rather than trying to take advantage of the reusability of code.

jagged ingot
#

IMO only pseudo-classes should be in global space.

#

constant tables too.

#
-- converts a mutable object to an immutable one (as a proxy)
local function const(obj)
  local mt = {}
  function mt.__index(proxy,k)
    local v = obj[k]
    if type(v) == 'table' then
      v = const(v)
    end
    return v
  end
  function mt.__newindex(proxy,k,v)
    error("object is constant", 2)
  end
  local tc = setmetatable({}, mt)
  return tc
end
narrow urchin
#

Does anyone know in which ui lua file players health bar is contained?

sour island
narrow urchin
# sour island Character info sub panel

Yes, the closest I got is ISHealthPanel.lua but I can't pin-point exact component. I want to put my custom module below this bar, perhaps even overriding healthbar rendering would be easiest.

sour island
#

That convo was interesting

open abyss
#

When putting an item with a -100000 weight into a car's storage, the car "dissapears" anyone know exactly what happens?
I remember about maybe 2 years ago, that was not a problem, but it is now.

sour island
#

Anyone else getting reports of sandbox vars resetting on dedicated servers? I was using getSandboxOptions():updateFromLua() in one of my functions - and have since commented it out - but people occasionally are still saying it's happening.

open abyss
#

If someone is willing to help me out with the final part of my mod, mostly just troubleshooting and fixing the final parts, that would be great. I tried to make a medicine type object, but for some reason, it will not be a consumable objects, just a plain object.
The other issue is the semi-infinite weight item.
When ever it's put in a vehicle, the vehicle breaks. Would love to find either a workaround or something for that.
I set my mod to hidden, but can easily undo that. but if no one is willing to even help me, i don't see the point in un-hiding the mod.
As of right now, i consider the mod "broken" and would love to have it fixed.

It is only those two issues i have been dealing with, so if you are not awfully busy, some help would be marvelous.

shadow geyser
#

also no one can really help you very well without being able to see the code

open abyss
#

Well, i would allow that, sure, it's not like i guard the code, it's just, if no one is even willing even to look, and give advice, there is no reason to pull out the mod from the closet.

#

It could be cool if the weightless item or what ever could be blocked from being put into vehicle storage.
But i would suspect such requires more complicated scripting then i have knowledge and skill to write.