Project Zomboid

Project Zomboid

Soul Filcher's Dressing Time
turkler 22 Sep, 2021 @ 9:31am
is this mod compatible with authenthicz?
title
< >
Showing 1-7 of 7 comments
soulfilcher  [developer] 28 Sep, 2021 @ 7:52am 
I never tested that, so I can't say.
Vaeringjar 5 Oct, 2021 @ 1:17pm 
hey man, I'm poking around code all over the place to learn and figure stuff out, and you seem to know what you are doing

could you have a look at AuthenticZ's ZombiesZone.lua and give me your opinion? It looks to me like it's completely overwriting vanilla, I mean, it wouldn't need to include all the vanilla stuff if it wasn't, right? but the author is being a real zombie for if I bring anything up he just deletes my comments lmao
soulfilcher  [developer] 5 Oct, 2021 @ 1:47pm 
If it includes all the tables in vanilla ZombieZoneDefinition.lua it is probably overwriting everything. It should also stay away from using the same file name because that would also overwrite it.
Vaeringjar 5 Oct, 2021 @ 2:01pm 
right, I'm trying to figure out how some of this stuff works, mind if I spam a few questions? ^_^

so what does starting ZoneDefinition file with "ZombiesZoneDefinition = ZombiesZoneDefinition or {};" do? Does it immediately override vanilla? You start yours with "require 'NPCs/ZombiesZoneDefinition'" instead

and within for example "ZombiesZoneDefinition.AZone= { (...) }", I guess there can only be one entry with a specific name, since you do "ZombiesZoneDefinition.Police[(name)] = ;" to overwrite vanilla entries within some "ZombiesZoneDefinition.AZone= { (...) }" ?
soulfilcher  [developer] 5 Oct, 2021 @ 2:30pm 
Using require means that my file will only run after the file listed there. So ZombiesZoneDefinition will always exist and I can add to it. His method checks if ZombiesZoneDefinition exists and if not it creates an empty table so he can add to it. In theory these are different but the result is the same. Keep in mind that using his method it is possible that another mod overrides the file after his change, undoing his changes. That would not happen with my method as it waits for the file to be loaded, vanilla or modded.

In that specific example the value inside the Police table will be replaced with a new one, keeping the rest intact. You can be as specific as you want when overriding values and tables, according to your needs. Overriding the whole table or file is usually a bad idea, specially because you undo what other mods changed before yours.
Last edited by soulfilcher; 5 Oct, 2021 @ 2:32pm
Vaeringjar 5 Oct, 2021 @ 3:25pm 
thanks for the help :) one last question, in clothing.xml, could you explain how this works?


<m_items>
<probability>0.3</probability>
<itemGUID>5fc22466-2942-4ba1-8c33-2a8528b73021</itemGUID>
<subItems>
<itemGUID>ce1a8520-7120-432e-8a3a-aa7b3094f0bb</itemGUID>
</subItems>
<subItems>
<itemGUID>c7cc655b-284a-4087-85a6-d7c116385fb0</itemGUID>
</subItems>
</m_items>
soulfilcher  [developer] 5 Oct, 2021 @ 4:13pm 
There is a 30% chance that the zombie will be wearing one of the 3 items in that list (the 3 GUID codes point to clothing items).
< >
Showing 1-7 of 7 comments
Per page: 1530 50