Project Zomboid

Project Zomboid

Soul Filcher's Dressing Time
turkler 2021 年 9 月 22 日 上午 9:31
is this mod compatible with authenthicz?
title
< >
正在显示第 1 - 7 条,共 7 条留言
soulfilcher  [开发者] 2021 年 9 月 28 日 上午 7:52 
I never tested that, so I can't say.
Vaeringjar 2021 年 10 月 5 日 下午 1: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  [开发者] 2021 年 10 月 5 日 下午 1: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 2021 年 10 月 5 日 下午 2: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  [开发者] 2021 年 10 月 5 日 下午 2: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.
最后由 soulfilcher 编辑于; 2021 年 10 月 5 日 下午 2:32
Vaeringjar 2021 年 10 月 5 日 下午 3: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  [开发者] 2021 年 10 月 5 日 下午 4: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).
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50