2 Commits
1.0.0 ... 1.0.2

Author SHA1 Message Date
6333f2390b hybrid 2025-08-04 21:07:13 +07:00
a3cd160929 Hotfix: didn't work on workhop 2025-08-04 20:28:56 +07:00
2 changed files with 25 additions and 6 deletions

View File

@@ -16,8 +16,12 @@ If you want your enemies to be more human, this mod will change all hostile NPC
- Change the behavior of custom models NPCs from combine to citizen
- Allows hostile to attack with melee weapons
---
I'll make VJ version if i can
---
models used:
- Lenna https://steamcommunity.com/sharedfiles/filedetails/?id=3167885628
- Tomoko https://steamcommunity.com/sharedfiles/filedetails/?id=3133369749
Note: i couldn't find a mod similar to the one i made, so i don't know who made it first.

View File

@@ -1,7 +1,23 @@
local npcs = list.Get("NPC")
local citizenEnemy = npcs["npc_citizen_rebel_enemy"]
local originalListSet = list.Set
if citizenEnemy then
function list.Set(listType, class, npc)
if listType == "NPC" then
if npc["Class"] == "npc_combine_s" and npc["Category"] ~= "#spawnmenu.category.combine" then
npc["Class"] = citizenEnemy["Class"]
npc["KeyValues"] = {
Hostile = 1,
SquadName = "overwatch",
citizentype = 4
}
end
end
originalListSet(listType, class, npc)
end
-- Second stage. idk if one of these necessary
timer.Simple(0, function ()
for class, npc in pairs(npcs) do
if npc["Class"] == "npc_combine_s" and npc["Category"] ~= "#spawnmenu.category.combine" then
npc["Class"] = citizenEnemy["Class"]
@@ -10,8 +26,7 @@ if citizenEnemy then
SquadName = "overwatch",
citizentype = 4
}
list.Set("NPC", class, npc)
originalListSet("NPC", class, npc)
end
end
end
end)