Files
roblox-project/bunsik-tycoon/tools/npc_inspect_models.luau
EJClaw d0ae06e198 feat(bunsik): 손님 외형 다양화 — 로블록스 공식 머리·모자·옷·얼굴 조합(사람 75%), 공식 동물 번들 11종(펭귄·곰·북극곰·고양이·강아지·판다·여우·쥐 등, 25%)
- NpcLooks: 확인된 아이템 표(assets/npc_assets.md), 서버 시작 때 외형 템플릿을 만들어 두고 복제
- 화면 UI 통합 테스트를 새 화면에 맞게 다시 씀(서버 로직은 tests/cloud/server.luau)
- GUI 미리보기를 장면 6개씩 나눠 뽑기(5분 제한·4MB 출력 제한)
- 서버 통합 테스트 1416개, 화면 통합 테스트 379개 통과

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 02:06:09 +09:00

85 lines
2.9 KiB
Lua

-- Creator Store 동물 모델 후보를 로블록스 서버에서 불러와 내용을 살펴봅니다(저장은 안 함).
-- python3 tools/cloud.py run tools/npc_inspect_models.luau
-- 불러오기: AssetService:LoadAssetAsync 먼저, 실패하면 InsertService:LoadAsset.
-- 결과(2026-10-14): 남이 만든 무료 모델은 12개 모두 두 방법 다 "User is not authorized to access Asset."
-- 로블록스가 만든 에셋(예: 1374269)은 둘 다 성공. 그래서 손님은 HumanoidDescription 방식(assets/npc_assets.md)을 씁니다.
local AssetService = game:GetService("AssetService")
local InsertService = game:GetService("InsertService")
local HttpService = game:GetService("HttpService")
local IDS = {
95757394637739, -- Poly Block Cute Animals Pack - 20 Assets (asasinatra)
97050466582003, -- Stud-Themed Animal Pack [LITE] (DropKit)
7902208283, -- Animal Pack (MRNOOB_504)
8780565023, -- Cute Penguin (Calestelle)
3676024481, -- House Cat (OscarAlhinho)
2374016425, -- Dog (Low Poly) (PeppiIy)
2374002814, -- Panda (Low Poly) (PeppiIy)
12502111157, -- Fluffy Bunny Toy (Astrra)
12549463718, -- Penguin Plushie (Astrra)
12009487310, -- Cat with Animations - Rigged (KashTheKing)
9415314422, -- Staring cat plush
159064405, -- Sheep (SmilingGalactic)
}
local function load(id: number): (Instance?, string)
local ok, res = pcall(function()
return AssetService:LoadAssetAsync(id)
end)
if ok and res then
return res, "AssetService:LoadAssetAsync"
end
local ok2, res2 = pcall(function()
return InsertService:LoadAsset(id)
end)
if ok2 and res2 then
return res2, "InsertService:LoadAsset (AssetService err: " .. tostring(res) .. ")"
end
return nil, "both failed: " .. tostring(res) .. " | " .. tostring(res2)
end
local out = {}
for _, id in IDS do
local inst, how = load(id)
local r: { [string]: any } = { id = id, how = how }
if inst then
local counts: { [string]: number } = {}
local maxPart = 0
for _, d in inst:GetDescendants() do
counts[d.ClassName] = (counts[d.ClassName] or 0) + 1
if d:IsA("BasePart") then
maxPart = math.max(maxPart, d.Size.Magnitude)
end
end
local top = {}
for _, c in inst:GetChildren() do
local s = c.ClassName .. ":" .. c.Name
if c:IsA("Model") or c:IsA("Folder") then
local n = 0
for _, d in c:GetDescendants() do
if d:IsA("BasePart") then
n += 1
end
end
local sz = c:IsA("Model") and (c :: Model):GetExtentsSize() or Vector3.zero
s ..= string.format("(%d parts, %.1fx%.1fx%.1f)", n, sz.X, sz.Y, sz.Z)
local sub = {}
for _, g in c:GetChildren() do
if #sub < 25 then
table.insert(sub, g.ClassName .. ":" .. g.Name)
end
end
s ..= " [" .. table.concat(sub, ", ") .. "]"
end
table.insert(top, s)
end
r.counts = counts
r.top = top
r.maxPartDiag = math.floor(maxPart * 10) / 10
inst:Destroy()
end
print(HttpService:JSONEncode(r))
table.insert(out, r)
end
return #out