#mod_development
1 messages · Page 134 of 1
most likely they made the trait stronger at some point to make it more worthwhile (one level of fitness really isn't much) and forgot to/chose not to alter the level you earn it at
question
how would you make a object seen as solid
because rn i have a placable piece of furniture that i just walk through
probably the reason. they updated the fitness trait which can be chosen during character creation but forgot to change the trait which can be acquired while playing the game...
Oh nice, i thought that the alternative mod had the same issue, ill have to check it out, thanks
tryna place a tile with code but I'm noticing it doesn't have collision properties
Hello, Im new to PZ mod development, and I want to try out a project to add voice overs to several if not all radio and tv programs using ElevenLabs (I'll start with some by hand, but I will try to automate the process using their API).
As far as I know, I believe I will have to create a sounds file like
sounds_voiceOvers.txt
where I add sounds items with the format
sound {text_id} { category = VoiceOver, clip { file = media/sound/VoiceOver/{text_id}.ogg, distanceMax = 20, } }
Now comes the hard part. I need a way to make every audio play whenever they are displayed on the game, acording to their ID.
Looking at the pzwiki Lua Events/OnDeviceText (https://pzwiki.net/wiki/Modding:Lua_Events/OnDeviceText) seems to be what I need. However, I don't fully understand how this event works, and how to make the appropiate sound be played when they happen. Does anybody know what interactCodes mean? is it like an id for the Lines?
I know there will be a miriad of problems, that I will look into after having an initial workable solution for this (like audios still playing after changing channels, Volume afecting the sound distanceMax, etc.). I just want to know of a way to know which line is being shown, with which id, and how to call a sound event.
Does anybody have any experience in this regard and could give me a hand with this
?
RadioBroadcastlines have GUID's, and it is all read from the RadioData.XML . I was able to add voice acting to the radio by using a combintation of using deprecated broadcast effects (in my case drunkeness tags, which I created a table to have every file associated with a number) and duration tags to synch the audio. You will inevitably have problems syncing the audio to the text, because the text dissapears based on how long the text line is, hence why duration tags are neccesary for voicing the media.
the wiki is outdated, there's now an additional argument passed which is the line's guid
for instance, the GUID of this line:
<LineEntry ID="b0ee632b-789e-4e4f-a2b0-b09374856a62" r="255" g="192" b="0">Where in the Pizza Whirled are we today?</LineEntry>
would be b0ee632b-789e-4e4f-a2b0-b09374856a62 ?
Yep. That's right.
thanks 😀
I'm sure you can get it working off of that alone, but like I said, you're going to run into an issue with timing unless you add duration codes to every line ha
Additionally you will probably go insane writing scripts for each indivual sound file
I'll try to automate using their api. Luckily it's free for the first 10000 character each motn
month*
You're gonna need a lot more characters than that! I pay for eleven labs and even I wouldn't want to try to voice the entire radio/tv broadcasts.
or a lot of time 
I obviously would start with the most popular programs like woodcraft and improve from there
Yeah, if you want to see how I've done it here are some links;
Meet Erin, she runs a pirate radio station in the middle of a zombie apocalypse -- But she's not alone.
Footage from Project Zomboid and the Mod Survivor Radio 3.4
Erin/Agent 15 - Scarlet
Penelope/Agent 77 - Annakath
Kyle/Agent 13 - Kurokaze
Written by Azakaela
Edit: Appears there was a problem with the audio on exporting, buuuuuuuuuuuut I'm...
Project Zomboid: https://store.steampowered.com/app/108600/Project_Zomboid/
Survivor Radio Mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2224576262
Twitter: https://twitter.com/DatVoiceGuy
Facebook: https://www.facebook.com/datvoiceguy
...
you can check out Survivor Radio to see the code I utilized as well; but if you want to easily edit the radiodata, you'll need WordZed
reads on the diff of . vs : in Lua and sighs...
Is there a way to modify the time the text is shown acording to the clip size? instead of increasing or deacreasing the audio speed itself
isnt that just done in the text stuff adds in delays and display times etc
that's what they mean
nvm just realized that was reading it other way... sorry dang lua manual making my eyes swim lol
at the start of a broadcast line you will have to add ${t:5.00} you cannot exceed 5 seconds or it will display static.
which is the best up to date LUA manual for this?
t can be set to any time between 0:00 and 5:00
Hey, I was wondering. Could I use your LUA code as a base for my project? I believe that most problems I would encounter were already solved. probably all I would have to do is modify this line of the LUA
for _,_v in ipairs(codes) do
if _v:len() > 4 then
local code = string.sub(_v, 1, 3)
local op = string.sub(_v, 4, 4)
local amount = tonumber(string.sub(_v, 5, _v:len()))
if op=="-" then
amount = -amount
end
if amount ~= nil and amount > 0 and code=="DRU" then
RadioWavs.PlaySound(amount, radio)
end
end
end
To allow the use of normal lines instead of your custom ones, and modify the RadioWavs.files to my custom wav files so I can make it reproduce the audios generated by ElevenLabs
sure, just make sure to credit me
Thank you very much.
How can I overwrite radio lines?
for instance, I want to specifically modify this line from RadioData.xml:
<LineEntry ID="d363f154-086a-44c8-bf79-db09bfa3299c" r="0" g="176" b="80">Y'all are watching Woodcraft!</LineEntry>
to
<LineEntry ID="d363f154-086a-44c8-bf79-db09bfa3299c" r="0" g="176" b="80" codes="WDC-1">${t:3.66}Y'all are watching Woodcraft!</LineEntry>
to add codes as you used in your mod, and time tags defined by the clip size.
Do I just add a file in media/radio called RadioData.xml with just that entry? or do I have to copy the entire RadioData.xml and specifically modify that line for the changes to take effect without breaking everything else ?
You could ammend the XML directly or you could use Wordzed to open up the radiodata file; Word to the wise, the RadioData.XML cannot currently be replaced in the steam workshop so people would have to take your file and add it to their game.
(unless they fixed that. I've been asking but I'm not sure if they ever did it)
(as far as I'm aware, you cannot replace the radiodata.xml file)
so essentialy, there would be no way to make an easy one click install mod, because I cannot overwrite the radiodata.xml file
where can I ask if this changed?
Not sure.
You can try it, maybe they changed it. But last time I tried to replace the radiodata.xml in the radio folder it didn't do anything
should I try to copy the entire radiodata.xml and change a few lines, or just change the specific lines with specific IDs?
worst case scenario, I just have to tell people to copy and paste one file in their folders anyway, but I know the beauty of plug and play 😛
hello need help.. does changing the charcter respawn time posible?
alright. If I understood correctly, What I need to do is the following:
Add a code DRU+number to all the lines that I want to add voice to
Make one large AudioFile with the entire episode programing (Will be difficult since I will have to implement multiple voices for certain programs, and I dont want to have to splice together separate files)
Adjust text times to audio speed accordingly
Once this works manually, find a way to automate the process using the API
u can just edit RecMedia exactly in lua cos in made fully on lua side and adding exp happens on lua side too
radio doesn't go through recmedia
ah, I missed that part, my bad
the -- comment was the issue
Any resource when it comes to Localization? So I can support my mod in multiple languages?
what's up
I took a page from your book and added russian characters to nick
Ill send you a dm hehe
I still can't get is u russian or no

здесь все русские молчать ))))
жёско бро 
you copy the file structure the game uses. as for a step-by-step guide, there isn't really one, you learn by example
The modding wiki (see pins) has a small section on localization, but it's just about encoding
One of the guides on GitHub probably has a section on them too, dunno
generally it is just media\lua\shared\Translate\Language\the text files
translations means don't use literal strings in your code when it comes to things the player will see.
https://github.com/FWolfe/Zomboid-Modding-Guide/tree/master/translations
this is a good guide, though I don't agree with everything, maybe it's based on older version
it is quite old yeah
ok, if you have more links I might try to merge them a to wiki page
As soon as I debug what's wrong with climbing
hmm, the wiki page could just be a list of examples of what strings could be translated per category
like, I barely see any mods that use IGUI_CraftCategory
would be neat to know that there is an option for that in IGUI
yeah, there's maps for the translations but like scripts they don't all follow the same rules.
does anyone know how to force the player to drop a particular item?
or does the game delete and duplicate items in the game world whenever a player clicks to "drop"?
How do I start on making a new location for the base game map (i.e not making a whole new map but just changing a cell)
find which cell you want to change, and look at a map mod that sounds something similar to get the file structure
look for heavy
i think theres something like that
when its too heavy it gets drop
just get the function it triggers
hmmm okay
dropHeavyItems() is a Java method, and I don't have the decompiled class files 😔
i am gonna try using the unequip timed action, I just need the parachute to be taken off immediately to not look goofy
I just love how steam decided after I just restarted it, oh you need to update steam... MF I just had you running and a restart was needed for you to tell me this? Denied....
Any ideas on how to improve this?
tbh kinda lost... improve what? its not obvious to me atleast.
could someone help me out with something. I want to make a repair recipe that requires a needle and thread to fix the item without consuming the needle. I tried this ```fixing Fix Dakimakura
{
Require : Dakimakura1,
Require : Needle,
Fixer : Thread=2; Tailoring=2,
}``` but it didn't work. What would be the right way to do it if it's even possible?
if you mean the visuals and what not, having the parachute fold down before disappearing would help it look more realistic
just anything, idk
It looks awesome as it is, don't stress it
looked pretty good to me for an infil
that would be hard as shit to animate
Just throwing it out there, I have little experience with that myself
i think my only gripe is that the item itself is goofy and I'm not experienced enough to make it more refined
Looks cool!
It looks really great yeah
maybe someway to make the viewing area a 360 exposure not only 'POV' cuz you are dropping in from high above.
lol thanks Aiteron
but honestly looks good to me.
well, thank you for the positive feedback, I feel that I can release this mod now
that doesn't sound possible in a 2d isometric engine, atleast without lots of time and custom coding
he means showing the area around the player instead of the cone
^
it's possible but idk how
Try this:
fixing Fix Dakimakura
{
Require : Dakimakura1;Needle,
Fixer : Thread=2; Tailoring=2,
}
And maybe need Module name for item
I tried this but didn't get the repair option. What do you mean by module name? like "base.Dakimakura1"?
Yep. Maybe your item not in Base module
Send me your mod. I will look
@tame mulch while you're here, how can I get trace logs appearing in my files?
(running a dedicated server, so presuming the info would appear in server-console.txt if enabled)
Hmmm. I think You can't get this logs
Damn. I'm adding an inventory transfer action when the requested item is found at the end of a search. Works beautifully in singleplayer, but in MP it appears the state gets changed to accepted (2) and then rejected (1) shortly thereafter:
Example logs for ItemTransactionManager.receiveOnClient:
2[1817133102: -1 => -1]
1[1817133102: -1 => -1]
Any thoughts on debugging that?
Good morning.
Good morning, Jab
Hi people, I was wondering if I could commission someone to make me a mod. id like a London double-decker bus. has to be compatible with RV Interiors. was hoping to get a quote, or someone to point me towards where one is already made, but i cant find 🙂
I don't know if he's open for comms but @faint jewel would be who I'd go to for vehicles.
I just uploaded a mod and Steam is giving me this BS
AHA, right when I complained about it, it started working all of a sudden
the universe works in mysterious, sadistic ways 😏
steam prob getting DDOS'd again
Hi everybody. Sorry, I don't know English, so I use a translator. Please tell me who can help me? I would like to make changes to the game, but I do not know how. Create a mod.
what kind of mod do you want to make?
@glass basalt map, location, houses, fortresses, castles and buildings of survival in the forest. I'm sorry if there are any spelling mistakes.
there are no spelling mistakes
Choose one mod to start
@glass basalt Choose one mod-to get started? I'm sorry, I don't understand.
Anyone know how to get just the door in OnFillWorldObjectContextMenu? Right now I've got it to where it's selecting both the door and the tile the door is on, so I'm getting two context menus to appear where I only want one
could someone exlpain to me what this does? I am tring to replicate the opening and closing of the umbrella for one of my own items
OnCreate:Recipe.OnCreate.OpenUmbrella,
sorry, choose one thing to start with
you have many things that you want to do and they all are made differently
i think that is referring to the context menu option of when you choose to "Open Umbrella", to which it points to the recipe "Open Umbrella", that replaces the umbrella item with its open variant
@glass basalt good.. the place where the house stands
Isn't that the most basic thing?
is there an accepted global subtable to add modules, so it's both global and not global. example use: API that can be included in several mods.
_G.notG or .API or .__modTables _G["$ _ G"]
_G["𝅘𝅥𝅮"]
maps have the most work to do, but they are a simple concept
go to #mapping , people there know how to make houses
modules like module Base, or a different kind of module
_G is lua side, base is for scripts
generally a module in lua is when you make a local table and return that table in the end so another file can require your file and get that table
I think it's acceptable to just declare a single global if its name is unique enough (that is, you could declare the global and return it from the module, so it can be used both ways)
I also think _G.notG is cursed
it uses index[-1] cuz it wants to be different
_G["$ _ G"] lol
too bad not as simple as _G.!G
It would be nice if there were an officially supported way to declare & get APIs. That is, besides just declaring globals
you just make it
Mhm, I'm saying if there were utilities provided by the game for it
Then there wouldn't be any question abt conventions
isnt repeating themselves...
Somebody just needs to set a decent standard, with version included or something.
thats the point ya basically gotta make one
Yeah, thus "it would be nice"
only saying this because thats literally how/what happed in MC
MC provided nothing to the community in that sense it was purely made by us.
Something something xkcd competing standards (surely this doesn't count as a meme: https://xkcd.com/927)
Do you know how I would make my own?
I'd rather just not flat out see bla[0] = nil in a .lua file... ftlogp...
oof, im not sure where to start. try explaining what it is you want to do
Made a mod that animates parachuting at the start of the game
https://steamcommunity.com/sharedfiles/filedetails/?id=2948659911
I pretty much want to do exactly what opening the umbrella does. Right click weapon hit context option and get other variation of that item
ill take a look at the umbrella item
I already did. everything in my mod seems to match up. I imagine that oncreate is a lua thing but idk where it is located so I can rplicate it
@hot patrol
function Recipe.OnCreate.OpenUmbrella(items, result, player, umbrella, firstHand, secondHand)
result:setCondition(umbrella:getCondition());
if secondHand then
player:setSecondaryHandItem(result);
elseif firstHand and not secondHand then
player:setPrimaryHandItem(result);
end
end
👍
i don't get this code though. you are setting the condition that the umbrella already has
unless result and umbrella are different
I'm surprised that result in recipe scripts has a :.
Would make sense to have all directly-related settings for the actual recipe be without :..
result is probably an InventoryItem
Yes
It's syntactically inconsistent.
Its not
Also giving me headaches atm
Recipe.OnCreate.CloseUmbrella is almost the same
Its an inventoryItem
Thats has bunch of stuff
Like
getBloodLevel()
I figured as much
result:getName()
function Recipe.OnCreate.CloseUmbrella(items, result, player, umbrella, firstHand, secondHand)
result:setCondition(umbrella:getCondition());
if secondHand or firstHand then
if not player:getPrimaryHandItem() then
player:setPrimaryHandItem(result);
end
player:setSecondaryHandItem(result);
end
end
the if statement is different though
thanks again
I dont what your saying all the time man
You are a wizard from other dimension i speak few anguages you can speak all
I'm saying that the syntax would make sense to use is result ..., and not result: ...,
Written by different people I assume, I thought that was odd too
but the function is lua? would result ... not do anything
Ye
I'm currently in the "Picking the syntax apart" stages.
Yeah. No other way.
My syntax highlighter has to be written using 100% regex so less syntactic logic the worse.
It'll be better to leave it this way for now. It highlights the issue I'm talking about.
This is what I'm saying would make more sense.
Might as well be a reserved keyword like the other two.
How'd you end up dealing with the file extension hurdle, by the way? Will it attempt to parse all .txt files? Stop after it doesn't seem to match?
I manually set the language for the file and am inferring *.zed as the extension.
Ah, gotcha. Makes sense
Going to make it the extension for ZedScript until TIS says otherwise.
I think recipes and one other category has some funny syntax stuff going on so after that my syntax highlighter should be most-of-the-way completed.
Everything else is pretty much an object->key->value.
instanceof("IsoDoor")
instanceof(obj, "IsoDoor")
is it possible to add player respawn time ?
Possible yes, you can create a system to delay re-spawning based on steamID. Now if you want this to have a timer and changes to UI to make it clear to players, that's more work.
dangit knew I shoulda saved what file that I seen... isnt steamID depreciated?
no?
does the script already exist ?
I recall someone having issues with it hitting scientific notation and even when getting it to print the last few numbers changed (?)
I thought it was odd too as I was looking into Superb possible going MP and I was like ah f...
gimme a min Im looking now think it was in core
I dont think you can get SS to work in MP...
🤔 Maybe if you could get the host machine (dedicated or not) to use it's co-op slots?
I was thinking headless client more like... ^_^
NPCs are scrapping by as is, I don't think you'd be able to get it to work in MP without alot of time and effort
oh I know
Not one to scoff at a challenge, but that is a lot of time one could devote to another project that's more feasible lol
if anything likely have to look at a whole different way of how its done atm its just ugh...
I think SS took a dive in stability when chunks were introduced?
prior to this I think having the entire map loaded everything kind of worked fine - or was it related to how MP worked
either-way, I think there's a big issue of NPCs unloading and being in limbo
yeah this just thinking ahead as Im trying to wrap my head around lua<>java nonsense thats going on in there
From what I saw the code is fine, aside from alot of the prints
yeah index 0 in a lua file ever is good how?
there's index 0 in SS?
module Base
{
imports
{
Base
}
item Bolo
{
MaxRange = 1.23,
WeaponSprite = Bolo,
MinAngle = 0.7,
Type = Weapon,
SwingSound = MacheteSwing,
HitFloorSound = MacheteHit,
ImpactSound = MacheteHit,
DoorHitSound = MacheteHit,
HitSound = MacheteHit,
MinimumSwingTime = 4,
KnockBackOnNoDeath = FALSE,
SwingAmountBeforeImpact = 0.02,
Categories = LongBlade,
ConditionLowerChanceOneIn = 25,
Weight = 2,
SplatNumber = 2,
PushBackMod = 0.3,
SubCategory = Swinging,
ConditionMax = 13,
MaxHitCount = 2,
DoorDamage = 10,
SwingAnim = Bat,
DisplayName = Machete,
MinRange = 0.61,
SwingTime = 4,
KnockdownMod = 2,
SplatBloodOnNoDeath = TRUE,
Icon = Dudclub,
TreeDamage = 10,
CriticalChance = 20,
CritDmgMultiplier = 5,
MinDamage = 2,
MaxDamage = 3,
BaseSpeed = 1,
WeaponLength = 0.3,
DamageCategory = Slash,
DamageMakeHole = TRUE,
AttachmentType = BigBlade,
Tags = CutPlant,
DoorHitSound = MacheteHit,
HitSound = MacheteHit,
HitFloorSound = MacheteHit,
BreakSound = MacheteBreak,
SwingSound = MacheteSwing,
}
my item doesnt seem to spawn ingame and idk what the issue is
Also, didn't someone post an alternative to onSquare Loading that loads chunks? Perhaps Nolan if he's still back can make use of that
I don't know why TIS didn't simply make a modified arraylist object with a index offset of 1.
When you do that the table index and array metadata will stop working.
That's what I remember dealing with back in my main Lua days.
i wish we could just access java objects with lua syntax like the barotrauma lua mod does (for c#, obviously)
it seems like i spend more time writing java in lua than writing lua
I'd rather see wrapper objects with methods that works with expected Lua arguments as it's more practical in the short-term.
That and pre-typed generic lists and dictionaries for primitive values.
(A big opportunity for TIS to prune a lot of wasteful variable assignments in Lua code with memory)
Like
public class BooleanArrayList extends ArrayList<Boolean> {}
public class ByteArrayList extends ArrayList<Byte> {}
You can .new java objects in Lua
Be the change you want to see 🎉
And now you know my past ten years in PZ.
:D
okay sorry if Im stupid on this. but here's some code.
if(not t) then return false end
if(t[0] or t[1]) then return true
else return false end
local i = 0
for _ in pairs(t) do
i = i + 1
if t[i] == nil then return false end
end
return true
end```
some way to pass null as a type would be nice (not sure exactly what language is used for that in java)
i was imitating some java that passed a null isoobject, but you can't do that in lua, so it would randomly choose which overload to call if i passed nil
yeah like index[0] does not exist at all in lua correct?
It can. The issue is that you are turning an array into a dictionary.
you can check if the variable is an array using type() afaik
There's a way to grab null, but I forgot what it is
can anyone help me with this?
That is, a distinct not nil null. Dunno whether it's unique, but something returns that instead of nil as userdata
chuck just rewrite it if there something better.
What is this exactly trying to do?
nothing that is example code I did not write... aka SS.
in the end it turned out the area of code had a lot of redundancy so i used a different method that didn't have that ambiguity, but it seems like a future issue
I never saw this in SS before - but there was that guy that worked on it in Nolan's absence, and upon his return Nolan kind of just took it all in at face value
i'd need (IsoObject)null, not just null null
Ah, gotcha
i'm not sure if this is just an unsolvable issue in kahlua
0_Utilities/SuperSurvivorUtilities.lua line 216...
The devs would have to add alternative methods with unique names
Is there a way to have the game send a string to a webhook? Text-only ofc at the moment.
I know base Lua can do so..
Maybe some sort of cast function that creates a null userdata with the metatable of the relevant class?
yeah, it was with the sound player, but luckily that code has been rewritten enough times that most of the methods don't actually do what they say they do
That'd be more manageable
why Im lost cuz lua manual says index start on 1 thats it end of game... not sure how trying to yank 0 isnt erroring out. (remember lua noob here)
it's called is_array -- whatever is getting passed in might not be a lua table
Well, because they're tables, and you can assign an index number, even negatives IIRC, when creating the table..
Lua tables are not arrays and their keys can be anything other than nil
if I was in a java compile I wouldnt be worried....
you can use whatever you want as a key in a table, but it's not a good idea
also could just do return type(t)=="array"
'table'
depends if they want an array or not
With Lua, basically everything is just a table, in some form lolz
referring to Lua tables as arrays is an issue too
type should never return 'array'
instanceof(obj, "ArrayList") would be better for that use
nevermind, i was misunderstanding the purpose
The unreachable loop in the code up there is trying to check that it's a table with exclusively integer keys starting at 0*. It does so in a strange way
Presumably, at some point whoever wrote it decided checking for 0 or 1 was enough
If it's trying to find that it could abuse #table
Would make sense it's checking pairs() to confirm it's (not?) empty I guess
#table + 1 if there's 0 would certainly be simpler, idk why you'd really need a strict array check
the way pairs and i are used there makes me think whoever wrote this probably doesn't know lua very well
well I got my answer thanks... its bad.. 
I don't think so (but I'm happy to be proven wrong). If you set up a web server you could treat it as a proxy by leveraging getUrlInputStream, but I've no idea other than that
and I appreciate all the feedback just trying to make sure Im not picking up bad practice thats all
check out 3_Other/SuperSurvivorManager.lua
like Im reading init() and just going ummm... brain explosion
and IJ just crying at it also so Im like okay 'should I not be trying to learn this way...' or what ie. ignore it... 
I wouldn't try to learn from one source if you're using other's mods
Yeah looking at init --- you can use 0 as a key
just trying to ingrain syntax etc specific for lua cuz honestly the manuals Ive found suck arse for example.
but I don't know if that gets treated as a standard table or a keyed table
dunno either guess thats why IJ warning over it?
Does anyone know the spawn ID for this https://steamcommunity.com/sharedfiles/filedetails/?id=2907683021&searchtext=insurgent
I just need the spawn ID for the insurgent clothing
Now that's interesting
Usually keyed tables don't produce a consistent order using pairs
oh boy...
also ipairs(t) ignores [0]
that's cause keyed tables can't be sized
It's because it's t, not table
Lua tables are mixed; all of the functions that deal with tables are just 1-indexed by convention
If you really wanted to get wild you could even use the __len metamethod to have #table count 0*
I think it's neat [0] is ignored using ipairs() -- although I don't know what use that'd have
I wonder
could a value of nil do anything?
wut...
#t can't reach negatives or 0
could store some values safely this way
but you could also just use another table
okay is there something that instantly index the start or end of anything? as like some languages have...
Lua by default indexes at 1
But you can also index is as whatever you want
you can even index it as java exposed objects or other tables
the behavior above is basically hybriding numerically ordered keys (the default is no keys are provided) and non-numeric keys, these just happen to be numeric and in order
okay so like with your code t[-2] = nil just flat out removes it or is it nil? like add that on the end after t[4] how would it behave?
Lol. Thought I was through the thick of it with highlighting buuuuuttt
More bug fun. :D
i need help with my mod
Can you be more specific?
Im currently trying to make a little mod that changes zed's eyes to yellow so they look like cod zombies, I have copied all of the zombie textures and edited the white eyes out but question is:
do i create a new folder to place them somewhere?
if not, where do i put the textures in the game folders?
I've made my syntax Regex for strings intelligent so that they highlight numeric values and syntax-specific characters for special properties.
Yes. I'm doing this right now.
Working on populating highlighting for categories and improving the string code.
sorry for a late response
it wont show ingame
my pings dont work
Hello, can someone help me by giving me a code to increase the damage to the SmallBlade weapon category, I try this but it doesn't work for me.
local function SB_Damage(character, weapon, damage) if weapon ~= nil and weapon:getCategories():contains("SmallBlade") then damage = damage * 10 return damage end end Events.OnWeaponSwing.Add(SB_Damage)
local function SendExpToNearestPlayers(player, args)
local expType = args[1]
local newArgs = { args[2], args[3]}
-- Does not work
for playerIndex = 0, getNumActivePlayers() -1 do
local p = getSpecificPlayer(playerIndex)
if expType == "Religion" then
sendServerCommand(p, 'MadhousePayment', 'AddReligionExp', newArgs)
end
end
-- Works
if expType == "Religion" then
sendServerCommand(player, 'MadhousePayment', 'AddReligionExp', newArgs)
end
-- Works
if expType == "Religion" then
sendServerCommand('MadhousePayment', 'AddReligionExp', newArgs)
end
end
I wonder why it doesn't work when I send command from server to player I found with loop?
getSpecificPlayer, getNumActivePlayers, etc are client only
if you want to loop through players on the server use getOnlinePlayers()
-- Give money to all online players
local function PayToPlayers()
for playerIndex = 0, getNumActivePlayers() -1 do
local player = getSpecificPlayer(playerIndex)
local repLevel = player:getPerkLevel(Perks.Reputation)
if repLevel then
player:getInventory():AddItems("mh_items.MHOneDollar",(repLevel*2)+1)
end
end
end
Events.EveryHours.Add(PayToPlayers)
but this one works, i give money to online players like this
are you testing this in multiplayer?
yes
are you sure this isn't running on the client? does your file return if isclient()?
you shouldn't be able to access player inventories from the server at all iirc
its on server lua 😕
server folder runs on both
you need to return if isclient() if you only want it to run on the server
Ah, that's unfortunate. I was hoping to make a mod that allows server admins to enable/disable certain events and actions and such, to have a message sent to a Discord webhook, like when a server starts up, players join, fog/rain events, etc.
Used to use something like that for Valheim when I hosted servers for that. Found it to be quite useful.
you can just mimic the folder structure of the vanilla game and put your new textures into the respective folders. they will then overwrite the vanilla textures and it may be necessary to restart the game in order to enable/disable the mod. the location for your new textures should be yourMod/media/textures/Body. Make sure to give your new textures the same name as the vanilla zombie textures.
I'm making clothes for the first time, how do I handle GUIDs? where do I get them, do they have to be unique IDs?
Example of a GUID I have for an existing item
<m_GUID>5dfffb14-f9d4-4399-aada-8c671690fcd6</m_GUID>
hi Pano
how are you?
i have a few smol adjustment mods that i would like to create but i fail at finding file locations
whoops, was not supposed to be a reply 
alright, what files
https://steamcommunity.com/sharedfiles/filedetails/?id=2530389024 this one puts alot of alice bags on zombies, i wanna tone it down 👀
also i wanted to tweak weapons from mods as they have a tendency to be over the top, so i was looking for a file that shows me average stats as a reference to use 👀
anyone else help?
ill pull up the distro tables
what do you need help with?
good plan lol
you fcould try to help me
i can post my code for you too see whats wrong if you would like
sure
ty
module Base
{
imports
{
Base
}
item Bolo
{
MaxRange = 1.23,
WeaponSprite = Bolo,
MinAngle = 0.7,
Type = Weapon,
SwingSound = MacheteSwing,
HitFloorSound = MacheteHit,
ImpactSound = MacheteHit,
DoorHitSound = MacheteHit,
HitSound = MacheteHit,
MinimumSwingTime = 4,
KnockBackOnNoDeath = FALSE,
SwingAmountBeforeImpact = 0.02,
Categories = LongBlade,
ConditionLowerChanceOneIn = 25,
Weight = 2,
SplatNumber = 2,
PushBackMod = 0.3,
SubCategory = Swinging,
ConditionMax = 13,
MaxHitCount = 2,
DoorDamage = 10,
SwingAnim = Bat,
DisplayName = Machete,
MinRange = 0.61,
SwingTime = 4,
KnockdownMod = 2,
SplatBloodOnNoDeath = TRUE,
Icon = Dudclub,
TreeDamage = 10,
CriticalChance = 20,
CritDmgMultiplier = 5,
MinDamage = 2,
MaxDamage = 3,
BaseSpeed = 1,
WeaponLength = 0.3,
DamageCategory = Slash,
DamageMakeHole = TRUE,
AttachmentType = BigBlade,
Tags = CutPlant,
DoorHitSound = MacheteHit,
HitSound = MacheteHit,
HitFloorSound = MacheteHit,
BreakSound = MacheteBreak,
SwingSound = MacheteSwing,
}
model Bolo
{
mesh = weapons/1handed/Bolo,
attachment world
{
offset = 0.0000 -0.1660 0.0070,
rotate = -180.0000 0.0000 0.0000,
}
}
}
your issue is that you have module Base but you also import Base
remove imports { Base }
oh
sorry my response took a while - my mod isn't working either 😂
to confirm: Events.OnGameStart IS client-side, right? My mod is no longer multiplayer compatible for some reason, and I have been using this event the whole time
it's client-side
I am a fat moron: I changed my mod ID and couldn't figure out why nothing was happening (it wasn't even enabled correctly)
it's always the stupid stuff
Just finished walking through every vanilla script file with my syntax highlighting WIP extension.
=)
A couple changes and I consider it to be in basic working order.
I noticed a weird thing, I remove the "BlocksPlacement" from a sprite from Lua but the square still gets that. Using f2, the flag is no longer on the object... I tried searching for anything that would add that but see nothing, weird. Object is campfire if it makes any difference.
I'd like to use the slice-of-pie icon for my ZedScript extension for VSCode.
No rights to though. =/
could someone PLEASE upload this to Imgur? it refuses to upload for me for some reason
Let me know if you are experiencing the same issue
God bless you man. Thank you so much
ill even credit you in my mod description. this was such a PITA
you sure?
okay. Thank you again
@glass basalthey are you free to help me with adding sandbox settings to my mod?
I am. Give me a minute to finish uploading my mod update. Send me a DM, unless you want to discuss it here
here is fine if ur okay with that
okay
God dammit, now my update is giving me error code 2
@rancid panther are you familiar with how to add new sandbox optipns? or completely unfamiliar
i've seen other mods that add it but im not sure how to do it
all i know is there's a sandbox file and you use SandboxVars.blablabla
@weak sierra please advise. my preview images are 16KB and 67KB
yep. so, go to media and make a new txt file titled "sandbox-options.txt"
that is the hardcoded file
i have
alright, now what kind of options do you want? a boolean checkbox, an integer / float / string input?
so this is what im trying to do rn but im not sure if im doing it right
i don't think you can use lua style comments
check palette and format
oh okay
java style only iirc
they should be... ill check again
i have those in the translation files that didnt have any issues
translation files are lua
but should i remove those as well to be safe?
that's zedscript
oh okay
it would be better to simply not use them
zedscript uses /* comment */
i'll just keep them out then thanks
add VERSION = 1, above your first option. I don't know how exactly this works, but it is important, so we don't question the spaghetti
at the very very top or after the {
here is an example of my option
option InsurgentLUVVehicleConditionMin = {
type = integer,
min = 1,
max = 100,
default = 1,
page = Vehicle,
translation = Vehicle_InsurgentLUVVehicleConditionMin,
}
very very top. that line, then space, then option
ok
so, besides the comments, this looks good
this is what it looks like now
presto. although you could have it spaced the way it was previously 🤗
doesn't matter much
i like ur way better
missing comma on first line
oh yeah lol
Version = 1,?
yes
kk
now, to call the option as it is, use SandboxVars.TomaroSOAT.ImmuneChance
this should give you a double (which is an integer for Lua)
there is also a more verbose way of finding the sandbox variable, but this is newer and cleaner
yes
also make sure TomaroSOAT is defined
unless it is not important... i don't use objects for the sandbox options
sorry i dont know what you mean
where do i call it as is?
the way i already have it? or somewhere else?
make sure the game knows what TomaroSOAT is
add at the top of the Lua file TomaroSOAT = TomaroSOAT or {} to inherit or instantiate the object
it doesn't need to be defined
it doesn't? okay good, nvm
the sandbox option parser creates those tables
i see
and how is this translation?
i dont understand why it uses underscores now but another mod i looked at used underscores here
also doubles are not integers! they are floating point numbers
that is good. I would remove <br>Default = 5, it is automatically added by the UI
oh it does?
I meant that Lua uses doubles as integers because of their philosophy or w/e
other mods with sandbox options sometimes dont say the default tho
they don't say them if the option is not an integer or float type
you have an integer for immunechance
okay thanks
lua doesn't have an integer type, it just has number, which is a double
yeah
so when i say ZombRand 100 doesnt that actually technically mean 101 because 0 counts?
yeah, you need ZombRand(101) to get a number between 0 and 100
i thought it is 99 because if you have 0 it will count too
it is exclusive
you can do ZombRand(1, 101) to include 1 and exclude 101, for 1 to 100
cuz before i had it as ZombRand(20) <= 0
i see
i'll do that then
but then would it cause issues if someone typed 0 in sandbox?
that is what min and max are for
it wouldn't, it would just never be true, which is what they would want anyway
hmm, that too
although i guess they probably wouldn't use an immune mod if they wanted a 0% chance of being immune
cuz i want an option to have 0% chance since im using it in my own mod that has other features
it could be used for not having a random chance to gain immunity, but have the option of being immune from the trait
which is mostly just professions and traits
unless the mod works differently from what i recall
the standalone mod is just the immune chance with testing for immunity, but the one i havent uploaded has the selectable trait as well as immune chance
so if you make it 1-101 it actually means 1-100, and leaving 0 as an option in sandbox will still work?
im testing it rn if there is any errors if i have 0
elseif ZombRand(1, 101) <= immunechance then
testData.testStatus = "untested"
testData.immune = true
if ZombRand(1,101) <= 0, then ZombRand will always be false since it is > 0, so the sandbox option would work if set to zero
immunechance is the sandbox option
well it works now! thanks!
could you also help me properly add translations for when i want the player to say something?
i still havent even started on improving the testing method
the getText() method will work best
you specify a parameter as a string the name of the variable in a Translation file somewhere, and it'll get the actual string
which translation file, idk
ill look
in IGUI_EN.txt add a line similar to IGUI_PlayerText_MyText = "I am saying something",
okay so it uses IGUI_EN?
then in the Lua, do playerObj:Say(getText("IGUI_PlayerText_MyText"))
maybe, maybe not
i don't think it actually matters
i tried using getText before but it didnt work probably due to where i was defining the translations
i was using the same file as where i had the trait translations
where were the translations
UI_EN
hmm
i'll try IGUI_EN
sasuga indie stone-san
i reexported them with additional metadata and it worked
im guessing it was missing definitions for colors
where can i see how to make a crafting recipe?
im making a temporary crafting recipe as a replacement of my old testing system
which im gonna eventually replace for a health panel version of a bite inspection instead of using a recipe
nvm
you can take a look at how mods like Replace Bandage add options to the health panel, instead of a recipe
at most you will need a timed action but they are relatively easy
i saw it but it was overwhelming. im gonna need help if i wanna do that too
it should just be a context menu injector, but I have not looked at it
the replace bandage mod has hundreds of lines, and i cant find anyone else really asking questions about modding the health panel in this server that i can use for reference
it seems like it is a lot more work than most ppl are willing to do so they just prefer to make a normal crafting recipe
my playertext translations didnt seem to work
it must be something else then
Got some new flashlight masks to fix the clipping and direction when aiming. Also some new poses for when you are more skilled, or just want it.
these are the worst UV's i've ever seen
what are the possible options for AnimNode in recipe scripts?
Almost any of the animations defined as TimedActions in AnimSets/player/actions
Don't think there's a list of them all. Some will require specific conditions and variables to be set, so would be unusable unless you do so
But you could do like:
AnimNode:Dig
AnimNode:TakePills
Should work.
thanks
yes
item KaeldorMushroomPowder
{
BoredomChange = -50,
UnhappyChange = -10,
StressChange = -10,
EnduranceChange = +100,
HungerChange = +20,
ThirstChange = +20,
Weight = 0.2,
Type = Food,
DisplayName = Mushroom Powder,
DisplayCategory = Food,
Type = Food,
Icon = MushroomBaggy,
Tooltip = That stuff will make sure you're not going to sleep tonight.,
CantBeFrozen = TRUE,
}
Any reason this can't be eaten ingame?
item KaeldorStrawberryPowder
{
BoredomChange = -10,
UnhappyChange = -10,
StressChange = -10,
EnduranceChange = +30,
HungerChange = +10,
Weight = 0.2,
Type = Food,
DisplayName = Strawberry Powder,
Type = Food,
DisplayCategory = Food,
Icon = StrawberryBaggy,
Tooltip = A Strawberry Powder mixture to boost your endurance.,
CantBeFrozen = TRUE,
}
Same with this
They show up but you can't right clic kand eat it
item KaeldorCornPowder
{
BoredomChange = -10,
UnhappyChange = -10,
StressChange = -10,
HungerChange = -30,
ThirstChange = +10,
Weight = 0.2,
Type = Food,
DisplayName = Corn Powder,
DisplayCategory = Food,
Type = Food,
Icon = CornBaggy,
Tooltip = A Corn Powder mixture to fill your stomach.,
CantBeFrozen = TRUE,
}
This one on the other hand works fine
Does Hunger have to be a negative value or what am I missing
did u try testing that? that could be the case
i think changing the testing/inspection system will be the last major thing before i can officially consider my mod complete
That should still allow a person to usei t
You simply can't eat it at all
where did you get it? perhaps it became like that due to file conversion ?
it's just a answer for ur question about negative/positive hunger
Do you have an idea why two powders don't work and one does?
I can't find it and it doesn't make sense looking at it at all
try making thirst go down by 1
maybe it requires at least one of them to be negative
as long as it is in the food category
mb issue with +? idk why r u type +10 instead 10 and not sure that zedscript allows this 
could be that too
btw it shouldn't be a issue but u have two Type variable in ur item
tell us if removing the plus works out for uu
Looks like it worked cuz he didnt came back
lol
I see anime outfits. Me like
Any chainsaw man stuff? 
please do tell
Could you check out my notes on the topic? https://github.com/TheCrimsonKing92/project-zomboid-modding-notes/blob/main/item-transfers.md
There is a server component to this, but since I can't get those logs or truly debug it I avoided really speaking on that.
Server logs are named co-op console -- unless there's something else that logs/it doesn't have what you want
The receiveOnServer method is logging at trace level
per Aiteron, you can't get that level of logging
or at least we can't without doing Java recompilation shenanigans to which I'm not willing to resort 😄
Perhaps someone here could shed some light, though. I fear I'm missing something obvious about Safehouses
I've connected to my dedicated server with an admin, a client, and now two clients. In none do I see any option to create or designate a Safehouse.
Does it have to be something other than a residential house?
didnt fix it
Have you added the item to any distribution tables? Have you checked whether you can spawn it in debug mode with the items list?
ah how I wish I had ban powers in some discord servers
yo does anyone know what this means when making a script for clothing
"<m_Masks>13</m_Masks>
<m_Masks>14</m_Masks>
<m_Masks>3</m_Masks>
<m_Masks>5</m_Masks>"
The first thing I see when walking in here.
well got plebs asking if 'something' works with a broken copy of their game lets just leave it at that.
o.O
ugh
so why there different formats?
Other than that, every vanilla file works properly.
age when it was made?
That format isn't my focus. It's the highlighting.
I work with Regex to produce highlighting in VSCode.
I'm asking myself if I should try to make my highlighting work with that formatting.
yeah I get that but ya got one working one not just wondering why the diff they both listing same version # so...
I modified the first screenshot to adhere to the formatting of the vanilla files.
I can publish this extension in its current form.
What I'm openly asking is if I should support that odd format of the same file.
if thats not std. to me... nope.
that be like supporting depreciated stuff 5 major versions later...
The code would run all the same in that spacing in PZ.
Hmm ok.
I can always leave that up to future me or someone to try to make my syntax Regex stronger.
I see it more of odds... how much do you think that odd version going to be seen is it worth the time... can you make an exception for it to catch that etc etc. just weigh it out.
Not with highlighting no.
While TextMate Grammars uses recursive JSON API, it is ran 100% through Regex.
I plan to write a formatter and an IntelliSense component to the extension.
The formatter will format close to the vanilla file formats.
The IntelliSense component will be by far the most helpful component.
Property-specific logic can be implemented with IntelliSense where it will tell you: "Hey, this is the wrong value for this property".
well Im no fan of IS so cant help ya on opinion there
I'm a fan of it when it's actually modified to work with what I'm working on specifically.
Generic IntelliSense gets in the way.
you give me only a pulldown suggestion fine... closing my " ( if then adding in ends etc automatic which just make me type just as much having to move to another key to get to EOL etc.... no thanks ^_^
.. And that's why I hate Visual Studio.
I know the syntax and flow.
VS is a nanny-state-driven editor.
🤣
Look: I won't tell you to use VI or VIM.
why I do...
VSCode is a great middle-ground for "some support" vs too much or too little.
literally my first editor I ever used was Vi lol on a vt100 to a at&t unix system
VS is literally a giant trap to force their customers to use theme exclusively forever..
I'm the only programmer in my team that doesn't use Visual Studio to code.
They use those products.
I have to run it but I don't write in it.
I dont mind it Lua wise it sure the hell better at dependancies etc then IJ is.
but ewww on writing like you said.
I w a n t to shit on Notepad++ users but they're doing it entirely for the same reasons, mostly.
It's just ugly. That's my severance to it. hahaha
It has every tool you need though.
why Im surprized no-one hasnt done anything for netbeans
no
someone has time to sit with me in vc and walk me through this tiny texture mod im making pls?
prob dunno workshop was too strict think that was the issue. but I mean we using a java lua not C lua...
Is there a way to change the form of the chat? I am not saying to make it more invisible with the same configuration that it has, I am saying to be able to eliminate it completely and that only the text remains with the invisible background.
Going to license my ZedScript VSCode extension as MIT so people in here and modders can improve on it without restrictions. =)
Tempted to use LGPL but it doesn't make sense for this project.
That's useful for people who don't understand licenses. =)
Actually it's a good refresher.
New licenses pop up all the time.
Ive seen better pickers just dont know where cuz it been years
I cant even remember what I typically used looks like bsd changed alot
Always remind people that they can license their works.. =)
I use MIT when I don't care about the uses of my work, even commercially.
Just 1) Don't sue for damages and 2) Don't forget to credit.
I usually go with MIT but I've been on the fence about what I want to use for mods. Haven't released any yet so still time to go hmmmm a billion more times
The more copy-centric you go the safer you are when dealing with references to other code, licensed or fully copyrighted.
What was the way to make PZ generate random numbers? I remember it had some zrand() or something?
I like copyleft 🥺 I just don't know that it really works for mods
ZombRand
I have PZ libraries licensed as LGPL too because I feel that ownership is important enough to keep from being anything used at an official capacity.
You cannot use anything strong as or stronger than GPL for PZ.
public static double ZombRand(double double1)
double 1 is upper limit?
Mhm, exclusive [0, that number)
Yeah that sounds right.
was about to ask that, thanks
Seriously. You can own any files you write from scratch, even Lua files that interfaces with the game. You can't force PZ to go open-source though.
You can't own a file that is modified or overwritten with code from that file.
Picking a license also means being compliant with that license or it is voided.
One of my current mods has some functions that were taken from the existing source & modified (for performance or other reasons)
I don't know where the line is for originality
You can license individual files by heading them with the license as a comment. You can't license the modified files though. =)
I wouldn't say they're modified files, that's the thing
The relationship between those files and how they might interact will also need to be compliant with the license... which is why if you don't want to go through that then pick MIT or BSD.
It's very few instances of similar code so it's ambiguous
Might stick with MIT then, thanks
Yeah. Thought I'd help provide insight into what might be good based on how much you are 1) Willing to support copyleft and 2) What you want others to do with your works.
can anyone else help
what problem?
my item doesnt show ingame
@tame mulch I'm going to publish my third-party VSCode extension today. =)
You see any screenshots?
ooh
what is it
I think yes
I will formally post information in the following days. I will also suggest support for the extension .zed.
Initial response: heck yeah, looks good
Louder part of my brain: WHY is the "v" in that font so small
little update from my mod @abstract raptor and good news:
I just copied the entire RadioData.xml file and modified the values in my mod file, and it correctly loaded the changes to the tv
I'll try to generate the first audio for woodcraft and test how it works. Then, I'll try to automate the process with a script somehow
I think I'm using Ubuntu font.
so if my sbvar var is 1-100, this sounds about right to have % to trigger something, right?
if player:HasTrait("RestorationExpert") then
local chance = SBvars.RestorationExpertChance - 1;
if ZombRand(100) < chance then
self.item:setHaveBeenRepaired(self.item:getHaveBeenRepaired() - 1);
end
end
oh wait
should be <= I think
sbvar is [1-100]
nice.
ZombRand(100) is [0, 99], so < should be correct (i.e., a chance of 0 should never pass)
@tame mulch If you get another itch to scratch for ZedScript documentation, perhaps you could help me with transcribing documentation with the extension as I enter the IntelliSense phase of the project.
but then i dont have to do - 1, right?
Remember, you can always multiply a 0.0 -> 1.0 random value.
So SBvars.RestorationExpertChance is [1,100]?
y
<= should work then ya
cheers
as a proper modder I won't test if it works and just ask ppl

Its fine I got 40k ppl to test it for me
I was listening to music, looking at something on my other screen, and whistling while answering
Put zero trust in me
I write tools specifically to ensure that there're more steps between you and me.
<3

Also, am I allowed to use the chery-pie icon for the extension? (To show when seeing the file in a directory listing or on the file tab)

I wouldn't know what I could use otherwise. :X
Im oretty sure you can. It is after all the default poster thing in the modtemplate
I'd love to run with that but it's actually a legal question that'd need to be answered since I don't have explicit permission to. =/
I mean people do this with mod images.
Maybe I do..
Ugh.. If they ask me to remove it I can.
Ye .
This is what two decades of modding has done to my brain. 
We give you a licence to ... Use art, music, video footage or other assets of Project Zomboid for creative purposes in any way you like providing the end result is related in some way to promoting Project Zomboid or The Indie Stone, is for non-commercial use only (unless we agreed otherwise with you) and states Project Zomboid as its influence and origin by supplying the following wording prominently with the assets:
“Thanks to The Indie Stone for creating Project Zomboid https://projectzomboid.com/), which made this possible. This is an unofficial fan production for non-commercial purposes made under the Indie Stone Terms [link to these terms]“
https://projectzomboid.com/blog/support/terms-conditions/
Should be all good
Yeah.. The default logo is used as an example banner.
I think no one answered your question?
It masks the players body
You should ask #modeling
And check out their pinned post
Thank you g
do you think you can help me?
Need check your script code
ha lar
ah alr
ill post it
module Base
{
imports
{
}
item Bolo
{
MaxRange = 1.23,
WeaponSprite = Bolo,
MinAngle = 0.7,
Type = Weapon,
SwingSound = MacheteSwing,
HitFloorSound = MacheteHit,
ImpactSound = MacheteHit,
DoorHitSound = MacheteHit,
HitSound = MacheteHit,
MinimumSwingTime = 4,
KnockBackOnNoDeath = FALSE,
SwingAmountBeforeImpact = 0.02,
Categories = LongBlade,
ConditionLowerChanceOneIn = 25,
Weight = 2,
SplatNumber = 2,
PushBackMod = 0.3,
SubCategory = Swinging,
ConditionMax = 13,
MaxHitCount = 2,
DoorDamage = 10,
SwingAnim = Bat,
DisplayName = Machete,
MinRange = 0.61,
SwingTime = 4,
KnockdownMod = 2,
SplatBloodOnNoDeath = TRUE,
Icon = Dudclub,
TreeDamage = 10,
CriticalChance = 20,
CritDmgMultiplier = 5,
MinDamage = 2,
MaxDamage = 3,
BaseSpeed = 1,
WeaponLength = 0.3,
DamageCategory = Slash,
DamageMakeHole = TRUE,
AttachmentType = BigBlade,
Tags = CutPlant,
DoorHitSound = MacheteHit,
HitSound = MacheteHit,
HitFloorSound = MacheteHit,
BreakSound = MacheteBreak,
SwingSound = MacheteSwing,
}
model Bolo
{
mesh = weapons/1handed/Bolo,
attachment world
{
offset = 0.0000 -0.1660 0.0070,
rotate = -180.0000 0.0000 0.0000,
}
}
}
Imports what?
remove the entire {} block then
Cuz your module is Base
modding hurts #
Tho afaik you still need to import.base? Not sure
What are you trying to do anyways
You don't need to import it if the module is Base
this is my other ojne
add a weapon
Cool
I'm like 20% sure you can't define a model next to an item(?)
It could be cuz of the model
You have to be more descriptive lol
i cant explain
Can you see the model?
So its the model
You mean item oicker
and it isnt there
So it:
(A) is invisible
(B) has no model
(C) doesn't appear in the itemViewer
Picker*
im using cheat menu
Fairly certain cheatMenu uses the vanilla itemViewer - but that's not important
oh
If it's not showing up something is wrong with the script
thats my other working item
this is my new one
So when aiteron asked for the script you showed us the working one?
no
try removing imports {}
thats the new one
For your working weapon, do you have item and model in the same file?
yes
It works if you have model and item
Not sure why you thought it wont
Probably something I heard once
The problem is that the files are .txt.
I don't think that it's a good idea to associate .txt with ZedScript automagically.
Maybe a directory.
Let me know if it spawned or not after you entered the code
that too
B42 could fix this issue with a line of code.
Cuz we are looking for whats causing it not to spawn at all
Toss it up as a suggestion
what
im really confused
👆
But change the name
To Bolo
👆
else if (!var1.endsWith(".txt")) {
DebugLog.Script.warn(" file is not a .txt (script) file: " + var1);
}
else if (!var1.endsWith(".txt") && !var1.endsWith(".zed")) {
DebugLog.Script.warn(" file is not a .txt or .zed (ZedScript) file: " + var1);
}
@tame mulch 🥺
Fixes so many issues.
If I have to write a suggestion on the forums I will.
You should, and also include a writeup of the whole zedscript concept
it kinda worked @ancient grail
it gave me an item called machete
the models kinda fucked too
I could write a university paper on this format at this point..
I'm about to write another paper on a draft for a preprocessing language to ZedScript.
item Bolo
{
...
DisplayName = Machete,
hm?
That's what you named it @tawdry solar
Would also have to change the references to sandbox-options.txt and the skill-related one I still haven't seen
Those are kind of sort of not scripts
Any string literal expression containing .txt
It's to work around enums
They use the same parser
now i just need to fix my model
fair
If we get too hasty, we'll end up grabbing workshop.txt 😄
what i thoght additem looked for the type
getType()
he spawned it using the type
didnt know it looks for the DisplayName?
and complained it was named machete
I'd literally write support for any ZedScript file.
meanwhile the script is just crying in confusion
I think all ZedScript files should contain a version flag.
so it works there now you have spawned the item you needed thats your item 🙂 goodluck fixing the model you can ask #modeling
@tawdry solar
i did
That one was a joke—the workshop.txt file is BBCode(?) I think that's what it's called
Yeah, BBCode (well, the whole file is not really BBCode, just the description values)
Oh wait yeah lol
I didn't know about sandbox-options.txt until someone pointed that out.
I'm still curious about what the skill one is
Same.
Have an example?
Credit to https://steamcommunity.com/sharedfiles/filedetails/?id=2721945297 for letting me peek 😉 here:
VERSION = 1,
perk Miscellaneous
{
parent = None,
translation = Miscellaneous,
passive = false,
xp1 = 0,
xp2 = 0,
xp3 = 0,
xp4 = 0,
xp5 = 0,
xp6 = 0,
xp7 = 0,
xp8 = 0,
xp9 = 0,
xp10 = 0,
}
perk Driving
{
parent = Miscellaneous,
translation = Driving,
passive = false,
xp1 = 50,
xp2 = 100,
xp3 = 200,
xp4 = 500,
xp5 = 1000,
xp6 = 2000,
xp7 = 3000,
xp8 = 4000,
xp9 = 5000,
xp10 = 6000,
}
Writing support for it right now.
Like sandbox-options, VERSION is required and must be 1 (as of now). If only that applied to the other scripts
Anyone know of a way to confirm remote co-op players are the same steamID?
I presume not as it's relying on the split-screen tech
@frank elbow
All I had to do for the syntax highlighter is add perk to the list of types.
Neat, looking forward to looking over the source 😄
Going to probably scrap the TextMate Grammars file I spent around two weeks working on and move to a Language Service.
It's here though. I'll publish this one so people have something in the meantime.
Hmm
I think I need to add a picture for the extension.
Supposed to be a dead eye but themed for my org.
There we go. Happy.
My personal, unofficial icon for an unnoficial script name. xD
It's live on VSCode. <3
Time for lunch.
Update 2 of my Voiced TVs and Radios mod.
I managed to voice the first woodcraft episode of day 0 at 12:00
This is the audio I made using ElevenLabs premade/sam and some editing to add the hammer sounds.
The audio works and plays perfectly (aparentyl .wav doesn't work, but .ogg does 🤷♂️ ), but I have some problems @abstract raptor.
The first problem is that the tags appear and fade away way too fast. Here is the modified xml with time tags:
${t:1.15}Y'all are watching Woodcraft!
${t:2.05}Your one stop shop for home improvement!
${t:1.19}We're startin' with the basics.
${t:1.20}The kinda stuff they teach at kindergarten.
${t:2.10}You like floors? I like floors.
${t:1.21}Take a plank and a nail like this...
${t:1.09}Take your hammer and...
${t:0.23}bang bang
${t:1.20}Looks kinda nice like that huh?
${t:0.23}bang bang
${t:1.22}Know what else is good for practice?
${t:2.03}A sign. Write whatever you like.
${t:1.01}Hunk at work, maybe?
${t:0.23}bang bang
${t:2.11}Like that ladies? Leadin' y'all straight to me!
${t:1.23}Tomorrow we're takin' off the training wheels.
${t:1.09}Door frames here we come!
I assumed the t: is in seconds, so i used the time the clips lasted in the editor for them. Am I missing something?
t: is in seconds yes
do I have to add some number to ofset the fadeaway? it is way too quick
well some of those are only playing for like a fraction of a second so that makes sense
I messed with eleven labs a bit, you can actually supply different voices as samples to get a hybrid
I cloned my voice with Eleven Labs ha
i pay for it too, made some ads for my friends business
I wouldn't think to voice the radio with the voice clones but meh
when i was writing my radio stuff i didn't see any way to alter the fade time whatsoever
i might have missed something, but it seemed like the related methods had a set time they would show messages, and the only thing you could change was the timing that the messages appear
I just crunched the numbers and it adds up to 20 seconds instead of 29, so perhaps I wrote some numbers wrong
When you stumble into the guy 3 years into the apoc acting out his tv show in the dead studio
When I do this part what I do is open the audio in like audacity, then select the section I want to time; get it's time in seconds and round to the nearest 2nd decimal point. Then I trim that part of the audio file, and move onto the next line
im using Wondershare, but I dont know what mistake Im making, every time I add the times i get it wrong
for like, 5 seconds
oooooooooo
i just realized
I dont know who made this, but he is evil
check the times of the table. it goes 0.0 0.05 0.1 0.15 0.2 1.0
so the decimal point is not in seconds, it is in cuarter of seconds
maybe there's a preference you can change?
alright, after fixing the decimal point, now it adds to 29.6 seconds, im gonna check it again
It would be nice to have a woodcraft jingle to add at the end, but I don't know audio editing enough to make it, and I don't believe I can get Eleven Labs to sing Wood... Craft!
Perhaps it's obvious, perhaps not. My settings defaulted to PlayerSafehouse = false. Changing that helped.
you can
ive already done it
you tweak the sliders to the left
they will just have very little tune so dont waste your time
Ei yo shark
Alright, Here I have a working demo of the first episode of woodcraft voiced. I'll start to work on a automation script for this project. Otherwise, I might go insane 😛
Thanks @abstract raptor for the framework. Is there a way to not get my character drunk when watching the show? Because of how it is made, it seems to increase the drunkenness
it doesn't make you drunk.
IT just says it increases drunkeness
it doesn't actually
cuz it's disabled
great
okay, my mod is... well, having a bad day
This thing executes just fine on a server. But on a client, it has a stroke when I call the anyKnifeProxy
It's in the shared folder...
server folder isn't loaded until some time after ongameboot for some reason, so the Recipe table doesn't exist yet
Oh
Then why does it trip after calling the functions from it several times?
Eh whatever. I'll try onInitGlobalModData
But why does it not complain when on a server?
not really sure! but i ran into the same issue with ongameboot
Okay
I figured it may have something to do with difference in file load order between server and client...
i think the event must fire after server lua is loaded instead of before on servers
I'm still surprised that modifying the array works
When trying to remove an item out of the array didn't before
that should actually work
arrays should always be passed by reference as far as i know
Unless I was doing it wrong all that time and I could've saved myself all of this nonsense
okay, no, remove() does work by index
Nah men you learned from it didnt you. So its worth it.. well for me atleast thats the case most of the time
Improving some stuff ATM based on feedback.
Jab, what else would I need to get syntax highlighting for PZ's Kahlua?
Any IDE or RTE that supports Lua highlighting.
(Rich Text Editor)
Hmmm, I meant documenting the Java methods from PZ in Lua
Huh.. Oh man.. What a thing to bring up with me specifically.. hahahaha.
Only things I can offer are looking up EmyLua, PipeWrench (My stuff), or that prototype for PipeWrench for third-party documenting.
Trying to make it so I can craft a new bottle into a smashed bottle, ive added a new recipe that names the new type but when its in game the option doesnt appear, anyone know what could be the cause?
Alright, cheers Jab 🍺
Oh BTW are there modders who want me to complete all ZedScript UML diagrams?
Here's the Vehicle category.
There's no errors in the console
If you can get vehicle scripting to be less of a headache that would be great lol
I spent like a hour trying to figure out how to get templates to work as I expected
Hahaha. Might want to think of ways to do this with a new language.