Project Zomboid

Project Zomboid

Anthro Zeds
Coldsteel 2024년 4월 12일 오후 3시 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."
Coldsteel 님이 마지막으로 수정; 2024년 5월 4일 오전 2시 37분
< >
전체 댓글 4개 중 1~4개 표시 중
Coldsteel 2024년 4월 12일 오후 3시 14분 
This also removes the double-tail problem.
LepusArcticus 2024년 4월 12일 오후 6시 43분 
Where do i put the first one?
Coldsteel 2024년 4월 12일 오후 10시 58분 
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.
Coldsteel 님이 마지막으로 수정; 2024년 4월 13일 오전 12시 52분
Ace_Proto 2024년 4월 22일 오후 7시 54분 
works well, thank you. :steamthumbsup:
< >
전체 댓글 4개 중 1~4개 표시 중
페이지당 표시 개수: 1530 50