Project Zomboid

Project Zomboid

Soul Filcher's Dressing Time
turkler 22. sep. 2021 kl. 9:31
is this mod compatible with authenthicz?
title
< >
Viser 1-7 af 7 kommentarer
soulfilcher  [udvikler] 28. sep. 2021 kl. 7:52 
I never tested that, so I can't say.
Vaeringjar 5. okt. 2021 kl. 13:17 
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  [udvikler] 5. okt. 2021 kl. 13:47 
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. okt. 2021 kl. 14:01 
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  [udvikler] 5. okt. 2021 kl. 14:30 
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.
Sidst redigeret af soulfilcher; 5. okt. 2021 kl. 14:32
Vaeringjar 5. okt. 2021 kl. 15:25 
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  [udvikler] 5. okt. 2021 kl. 16:13 
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).
< >
Viser 1-7 af 7 kommentarer
Per side: 1530 50