Project Zomboid

Project Zomboid

Anthro Zeds
Coldsteel 12. apr. 2024 kl. 15:11
Code that automatically adds all Anthro Survivors species to zombies
I just turned that into a mod:

Furry Apocalypse

UnderwearDefinition.Female_F_Black = { chanceToSpawn = 1000, gender = "female", top = { }, bottom = "", } UnderwearDefinition.Male_F_Black = { chanceToSpawn = 1000, gender = "male", top = { }, bottom = "", } groupChanceSetting = {} speciesChanceSetting = {} for group, percent in SandboxVars.AnthroZeds.groupChanceList:gmatch("[%s\"\'`]*([^:]+):%s*([%d%.]+)[%s\"\'`,]*") do groupChanceSetting[group:gsub("[^%w]",""):lower()] = tonumber(percent) end for species, percent in SandboxVars.AnthroZeds.speciesChanceList:gmatch("[%s\"\'`]*([^:]+):%s*([%d%.]+)[%s\"\'`,]*") do speciesChanceSetting[species:gsub("[^%w]",""):lower()] = tonumber(percent) end for i,speciesGroup in ipairs(FurManager.speciesGroups) do local groupName = speciesGroup.display:gsub("[^%w]",""):lower() local groupChance = groupChanceSetting[groupName] or 100 for j,species in ipairs(speciesGroup.species) do local speciesName = species.display:gsub("[^%w]",""):lower() local speciesChance = speciesChanceSetting[groupName .. speciesName] or 100 table.insert(UnderwearDefinition.Female_F_Black.top, { name = species.femaleClothing, chance = groupChance * speciesChance / #speciesGroup.species }); table.insert(UnderwearDefinition.Male_F_Black.top, { name = species.maleClothing, chance = groupChance * speciesChance / #speciesGroup.species }); end end

sandbox-options:
option AnthroZeds.groupChanceList { type = string, default = Dog:100, page = AnthroZeds, translation = AnthroZeds_groupChance, } option AnthroZeds.speciesChanceList { type = string, default = FoxRed:100, page = AnthroZeds, translation = AnthroZeds_speciesChance, } Sandbox_AnthroZeds_groupChance = "Species Chance" Sandbox_AnthroZeds_groupChance_tooltip = "How common species is. Format is: "species : chance,..." Default chance is 100. It's OK to omit spaces or other non-letters and non-numbers." Sandbox_AnthroZeds_speciesChance = "Species Variant Chance" Sandbox_AnthroZeds_speciesChance_tooltip = "How common species variant is. Format is: "species/variant : chance,..." Default chance is 100. Set variant chance to 0 to ban it from spawning as zombies (e.g. if it's your custom fursona). It's OK to omit spaces or other non-letters and non-numbers."
Sidst redigeret af Coldsteel; 4. maj 2024 kl. 2:37
< >
Viser 1-4 af 4 kommentarer
Coldsteel 12. apr. 2024 kl. 15:14 
This also removes the double-tail problem.
LepusArcticus 12. apr. 2024 kl. 18:43 
Where do i put the first one?
Coldsteel 12. apr. 2024 kl. 22:58 
Oprindeligt skrevet af LepusArcticus:
Where do i put the first one?
The main code goes inside the mod's clothing definition file, right at the end. It's in
Steam\steamapps\workshop\content\108600\2930890411\mods\AnthroZeds\media\lua\server\Definitions\AnthroZedDefinition.lua
.The sandbox-options bracketed part goes inside sandbox options file.
C:\Program Files (x86)\Steam\steamapps\workshop\content\108600\2930890411\mods\AnthroZeds\media\sandbox-options.txt
The other part is tooltips, it goes into translations file, you put it right beside the original tooltip text entries.
Steam\steamapps\workshop\content\108600\2930890411\mods\AnthroZeds\media\lua\shared\Translate\EN\Sandbox_EN.txt

Note that this doesn't stop humans from spawning, just hooks up anthro survivors species automatically and allows editing spawn frequency by species*. To stop human spawn there's a separate process, but as a coarse solution you can add this line before the new script (it'll probably work):
UnderwearDefinition = { baseChance = 100 };

Depending on whether you use normal or deceased skins, you'll get either holes in them or multiple skins overlapping on the same zombie. That's because normal skin allows holes, and deceased skin is a bandage so multiple can be worn. This here uses normal skins (so there's holes sometimes, it's usually not a big deal, and I find it less jarring than multiple different tails overlapping). I've been working for a while on sorting this out, but so far no luck.

*The code balances different skins of the same species so having a lot of skins on the same species doesn't makes it appear more often. But scalies are technically 8 different species so they appear extremely often without manually reducing their spawn chance. I also manually banned neon colored skins so my furry apocalypse doesn't look like deviantart front page.
Sidst redigeret af Coldsteel; 13. apr. 2024 kl. 0:52
Ace_Proto 22. apr. 2024 kl. 19:54 
works well, thank you. :steamthumbsup:
< >
Viser 1-4 af 4 kommentarer
Per side: 1530 50