From 8c397cbc0982ca1aa6b7fa79ed00f08a6555e248 Mon Sep 17 00:00:00 2001 From: maple Date: Sun, 7 Jun 2026 23:27:44 +0900 Subject: [PATCH 1/6] Add main menu flow --- RootDesk/MyDesk/SlayDeckController.codeblock | 86 +- tools/gen-slaydeck.mjs | 165 ++- ui/DefaultGroup.ui | 1047 +++++++++++++++++- 3 files changed, 1225 insertions(+), 73 deletions(-) diff --git a/RootDesk/MyDesk/SlayDeckController.codeblock b/RootDesk/MyDesk/SlayDeckController.codeblock index 38e6e82..eaaa7b5 100644 --- a/RootDesk/MyDesk/SlayDeckController.codeblock +++ b/RootDesk/MyDesk/SlayDeckController.codeblock @@ -84,6 +84,13 @@ "SyncDirection": 0, "Attributes": [], "Name": "EndTurnHandler" + }, + { + "Type": "any", + "DefaultValue": "nil", + "SyncDirection": 0, + "Attributes": [], + "Name": "NewGameHandler" } ], "Methods": [ @@ -96,12 +103,57 @@ "Name": null }, "Arguments": [], - "Code": "self:StartCombat()", + "Code": "self:ShowMainMenu()", "Scope": 2, "ExecSpace": 6, "Attributes": [], "Name": "OnBeginPlay" }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [], + "Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", true)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", false)\nself:BindMenuButtons()", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "ShowMainMenu" + }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [], + "Code": "local buttonEntity = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/MainMenu/NewGameButton\")\nif buttonEntity == nil or buttonEntity.ButtonComponent == nil then\n\treturn\nend\nif self.NewGameHandler ~= nil then\n\tbuttonEntity:DisconnectEvent(ButtonClickEvent, self.NewGameHandler)\n\tself.NewGameHandler = nil\nend\nself.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, self.StartNewGame)", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "BindMenuButtons" + }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [], + "Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\nself:StartCombat()", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "StartNewGame" + }, { "Return": { "Type": "void", @@ -285,7 +337,7 @@ "Name": "cardId" } ], - "Code": "local name = cardId\nlocal cost = 0\nlocal desc = \"\"\nlocal kind = \"Skill\"\nif cardId == \"Strike\" then\n\tname = \"타격\"\n\tcost = 1\n\tdesc = \"피해 6\"\n\tkind = \"Attack\"\nelseif cardId == \"Defend\" then\n\tname = \"방어\"\n\tcost = 1\n\tdesc = \"방어도 5\"\n\tkind = \"Skill\"\nelseif cardId == \"Bash\" then\n\tname = \"강타\"\n\tcost = 2\n\tdesc = \"피해 10\"\n\tkind = \"Attack\"\nend\nself:SetText(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(slot) .. \"/Cost\", tostring(cost))\nself:SetText(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(slot) .. \"/Name\", name)\nself:SetText(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(slot) .. \"/Desc\", desc)\nlocal cardEntity = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(slot))\nif cardEntity ~= nil and cardEntity.SpriteGUIRendererComponent ~= nil then\n\tlocal ok = false\n\tlocal color = nil\n\tif kind == \"Attack\" then\n\t\tok, color = pcall(function() return Color(0.86, 0.42, 0.38, 1) end)\n\telseif kind == \"Skill\" then\n\t\tok, color = pcall(function() return Color(0.42, 0.55, 0.85, 1) end)\n\telse\n\t\tok, color = pcall(function() return Color(0.46, 0.68, 0.52, 1) end)\n\tend\n\tif ok == true and color ~= nil then\n\t\tcardEntity.SpriteGUIRendererComponent.Color = color\n\tend\nend", + "Code": "local name = cardId\nlocal cost = 0\nlocal desc = \"\"\nlocal kind = \"Skill\"\nif cardId == \"Strike\" then\n\tname = \"타격\"\n\tcost = 1\n\tdesc = \"피해 6\"\n\tkind = \"Attack\"\nelseif cardId == \"Defend\" then\n\tname = \"방어\"\n\tcost = 1\n\tdesc = \"방어도 5\"\n\tkind = \"Skill\"\nelseif cardId == \"Bash\" then\n\tname = \"강타\"\n\tcost = 2\n\tdesc = \"피해 10\"\n\tkind = \"Attack\"\nend\nself:SetText(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(slot) .. \"/Cost\", tostring(cost))\nself:SetText(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(slot) .. \"/Name\", name)\nself:SetText(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(slot) .. \"/Desc\", desc)\nlocal cardEntity = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/CardHand/Card\" .. tostring(slot))\nif cardEntity ~= nil and cardEntity.SpriteGUIRendererComponent ~= nil then\n\tlocal ok = false\n\tlocal color = nil\n\tif kind == \"Attack\" then\n\t\tok, color = pcall(function() return Color(0.86, 0.42, 0.38, 1) end)\n\telseif kind == \"Skill\" then\n\t\tok, color = pcall(function() return Color(0.42, 0.55, 0.85, 1) end)\n\tend\n\tif ok == true and color ~= nil then\n\t\tcardEntity.SpriteGUIRendererComponent.Color = color\n\tend\nend", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -321,6 +373,36 @@ "Attributes": [], "Name": "SetText" }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [ + { + "Type": "string", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": "path" + }, + { + "Type": "boolean", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": "enabled" + } + ], + "Code": "local entity = _EntityService:GetEntityByPath(path)\nif entity ~= nil then\n\tentity.Enable = enabled\nend", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "SetEntityEnabled" + }, { "Return": { "Type": "void", diff --git a/tools/gen-slaydeck.mjs b/tools/gen-slaydeck.mjs index 6da250d..568c08e 100644 --- a/tools/gen-slaydeck.mjs +++ b/tools/gen-slaydeck.mjs @@ -8,13 +8,10 @@ const DARK = { r: 0.08, g: 0.09, b: 0.11, a: 0.92 }; const GOLD = { r: 0.94, g: 0.74, b: 0.26, a: 1 }; const ATTACK = { r: 0.86, g: 0.42, b: 0.38, a: 1 }; const DEFEND = { r: 0.42, g: 0.55, b: 0.85, a: 1 }; -const SKILL = { r: 0.46, g: 0.68, b: 0.52, a: 1 }; const CARD_W = 180; const CARD_H = 250; -const CARD_SPACING = 200; const CARD_XS = [-400, -200, 0, 200, 400]; - const ALIGN_CENTER = 0; const ALIGN_BOTTOM_CENTER = 6; @@ -23,8 +20,6 @@ function guid(prefix, n) { } function transform({ parentW, parentH, anchor, pivot, size, pos, align = 0 }) { - const offMin = { x: pos.x - pivot.x * size.x, y: pos.y - pivot.y * size.y }; - const offMax = { x: pos.x + (1 - pivot.x) * size.x, y: pos.y + (1 - pivot.y) * size.y }; return { '@type': 'MOD.Core.UITransformComponent', ActivePlatform: 255, @@ -32,8 +27,8 @@ function transform({ parentW, parentH, anchor, pivot, size, pos, align = 0 }) { AnchorsMax: anchor, AnchorsMin: anchor, MobileOnly: false, - OffsetMax: offMax, - OffsetMin: offMin, + OffsetMax: { x: pos.x + (1 - pivot.x) * size.x, y: pos.y + (1 - pivot.y) * size.y }, + OffsetMin: { x: pos.x - pivot.x * size.x, y: pos.y - pivot.y * size.y }, Pivot: pivot, RectSize: size, UIMode: 1, @@ -83,7 +78,7 @@ function sprite({ dataId = '', color = TRANSPARENT, type = 1, raycast = false }) }; } -function button() { +function button({ enabled = true } = {}) { return { '@type': 'MOD.Core.ButtonComponent', Colors: { @@ -104,7 +99,7 @@ function button() { KeyCode: 0, OverrideSorting: false, Transition: 1, - Enable: true, + Enable: enabled, }; } @@ -135,7 +130,7 @@ function text({ value, fontSize, bold = false, color = { r: 1, g: 1, b: 1, a: 1 }; } -function entity({ id, path, modelId, entryId, componentNames, components, displayOrder }) { +function entity({ id, path, modelId, entryId, componentNames, components, displayOrder, enable = true }) { const parts = path.split('/'); const name = parts[parts.length - 1]; return { @@ -146,7 +141,7 @@ function entity({ id, path, modelId, entryId, componentNames, components, displa name, path, nameEditable: true, - enable: true, + enable, visible: true, localize: true, displayOrder, @@ -168,10 +163,13 @@ function entity({ id, path, modelId, entryId, componentNames, components, displa function upsertUi() { const ui = JSON.parse(readFileSync(UI_FILE, 'utf8')); - const E = ui.ContentProto.Entities; - ui.ContentProto.Entities = E.filter((e) => !e.path.startsWith('/ui/DefaultGroup/DeckHud')); + ui.ContentProto.Entities = ui.ContentProto.Entities.filter( + (e) => !e.path.startsWith('/ui/DefaultGroup/DeckHud') && !e.path.startsWith('/ui/DefaultGroup/MainMenu'), + ); const byPath = new Map(ui.ContentProto.Entities.map((e) => [e.path, e])); + const cardHand = byPath.get('/ui/DefaultGroup/CardHand'); + if (cardHand) cardHand.jsonString.enable = false; const cards = [ { name: '타격', cost: '1', desc: '피해 6', tint: ATTACK }, @@ -181,7 +179,7 @@ function upsertUi() { { name: '강타', cost: '2', desc: '피해 10', tint: ATTACK }, ]; - for (let i = 1; i <= 5; i++) { + for (let i = 1; i <= 5; i += 1) { const card = byPath.get(`/ui/DefaultGroup/CardHand/Card${i}`); if (!card) continue; const tr = card.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.UITransformComponent'); @@ -193,25 +191,24 @@ function upsertUi() { sp.ImageRUID = { DataId: '' }; sp.Type = 1; sp.Color = cards[i - 1].tint; - card.jsonString.enable = true; - card.jsonString.visible = true; + card.jsonString.enable = false; - const children = [ + for (const [suffix, cfg] of [ ['Cost', { size: { x: 50, y: 50 }, pos: { x: -60, y: 95 }, value: cards[i - 1].cost, fontSize: 34, bold: true }], ['Name', { size: { x: 160, y: 50 }, pos: { x: 0, y: 50 }, value: cards[i - 1].name, fontSize: 26, bold: true }], ['Desc', { size: { x: 160, y: 82 }, pos: { x: 0, y: -80 }, value: cards[i - 1].desc, fontSize: 20, bold: false }], - ]; - for (const [suffix, cfg] of children) { + ]) { const path = `/ui/DefaultGroup/CardHand/Card${i}/${suffix}`; let child = byPath.get(path); if (!child) { child = entity({ - id: guid('dck', i * 10 + children.findIndex(([s]) => s === suffix)), + id: guid('dck', i * 10 + (suffix === 'Cost' ? 0 : suffix === 'Name' ? 1 : 2)), path, modelId: 'uitext', entryId: 'UIText', componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent', displayOrder: suffix === 'Cost' ? 0 : suffix === 'Name' ? 1 : 2, + enable: false, components: [ transform({ parentW: CARD_W, parentH: CARD_H, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: cfg.size, pos: cfg.pos }), sprite({ color: TRANSPARENT }), @@ -221,8 +218,7 @@ function upsertUi() { ui.ContentProto.Entities.push(child); byPath.set(path, child); } else { - child.jsonString.enable = true; - child.jsonString.visible = true; + child.jsonString.enable = false; child.jsonString['@components'][2].Text = cfg.value; child.jsonString['@components'][2].FontSize = cfg.fontSize; child.jsonString['@components'][2].MaxSize = cfg.fontSize; @@ -230,8 +226,75 @@ function upsertUi() { } } - const hud = []; - const add = (e) => hud.push(e); + const ents = []; + const add = (e) => ents.push(e); + + add(entity({ + id: guid('menu', 0), + path: '/ui/DefaultGroup/MainMenu', + modelId: 'uisprite', + entryId: 'UISprite', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent', + displayOrder: 20, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 1920, y: 1080 }, pos: { x: 0, y: 0 }, align: ALIGN_CENTER }), + sprite({ color: { r: 0.04, g: 0.05, b: 0.07, a: 0.96 }, type: 1, raycast: true }), + ], + })); + add(entity({ + id: guid('menu', 1), + path: '/ui/DefaultGroup/MainMenu/Title', + modelId: 'uitext', + entryId: 'UIText', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent', + displayOrder: 0, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 720, y: 100 }, pos: { x: 0, y: 180 }, align: ALIGN_CENTER }), + sprite({ color: TRANSPARENT }), + text({ value: '슬레이 메이플', fontSize: 64, bold: true, color: GOLD, alignment: 0 }), + ], + })); + add(entity({ + id: guid('menu', 2), + path: '/ui/DefaultGroup/MainMenu/Subtitle', + modelId: 'uitext', + entryId: 'UIText', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent', + displayOrder: 1, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 760, y: 48 }, pos: { x: 0, y: 104 }, align: ALIGN_CENTER }), + sprite({ color: TRANSPARENT }), + text({ value: '카드를 뽑고, 덱을 만들고, 첨탑을 오른다', fontSize: 24, color: { r: 0.82, g: 0.86, b: 0.9, a: 1 }, alignment: 0 }), + ], + })); + add(entity({ + id: guid('menu', 3), + path: '/ui/DefaultGroup/MainMenu/NewGameButton', + modelId: 'uibutton', + entryId: 'UIButton', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent', + displayOrder: 2, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 260, y: 68 }, pos: { x: 0, y: -20 }, align: ALIGN_CENTER }), + sprite({ color: { r: 0.13, g: 0.15, b: 0.18, a: 1 }, type: 1, raycast: true }), + button(), + text({ value: '새 게임', fontSize: 30, bold: true, color: GOLD, alignment: 0 }), + ], + })); + add(entity({ + id: guid('menu', 4), + path: '/ui/DefaultGroup/MainMenu/ContinueButton', + modelId: 'uibutton', + entryId: 'UIButton', + componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent', + displayOrder: 3, + components: [ + transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 260, y: 58 }, pos: { x: 0, y: -100 }, align: ALIGN_CENTER }), + sprite({ color: { r: 0.1, g: 0.11, b: 0.13, a: 0.78 }, type: 1, raycast: false }), + button({ enabled: false }), + text({ value: '이어하기', fontSize: 24, bold: true, color: { r: 0.55, g: 0.58, b: 0.62, a: 1 }, alignment: 0 }), + ], + })); add(entity({ id: guid('hud', 0), @@ -240,6 +303,7 @@ function upsertUi() { entryId: 'UIEmpty', componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent', displayOrder: 5, + enable: false, components: [ transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 1280, y: 330 }, pos: { x: 0, y: 180 }, align: ALIGN_BOTTOM_CENTER }), sprite({ color: TRANSPARENT }), @@ -247,11 +311,11 @@ function upsertUi() { })); for (const pile of [ - { key: 'DrawPile', x: -590, label: '뽑을 덱', count: '10', color: { r: 0.17, g: 0.20, b: 0.25, a: 1 } }, + { key: 'DrawPile', x: -590, label: '뽑을 덱', count: '10', color: { r: 0.17, g: 0.2, b: 0.25, a: 1 } }, { key: 'DiscardPile', x: 590, label: '버린 덱', count: '0', color: { r: 0.22, g: 0.18, b: 0.16, a: 1 } }, ]) { add(entity({ - id: guid('hud', hud.length), + id: guid('hud', ents.length), path: `/ui/DefaultGroup/DeckHud/${pile.key}`, modelId: 'uisprite', entryId: 'UISprite', @@ -263,7 +327,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('hud', hud.length), + id: guid('hud', ents.length), path: `/ui/DefaultGroup/DeckHud/${pile.key}/Label`, modelId: 'uitext', entryId: 'UIText', @@ -276,7 +340,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('hud', hud.length), + id: guid('hud', ents.length), path: `/ui/DefaultGroup/DeckHud/${pile.key}/Count`, modelId: 'uitext', entryId: 'UIText', @@ -291,7 +355,7 @@ function upsertUi() { } add(entity({ - id: guid('hud', hud.length), + id: guid('hud', ents.length), path: '/ui/DefaultGroup/DeckHud/EndTurnButton', modelId: 'uibutton', entryId: 'UIButton', @@ -304,9 +368,8 @@ function upsertUi() { text({ value: '턴 종료', fontSize: 25, bold: true, color: GOLD, alignment: 0 }), ], })); - add(entity({ - id: guid('hud', hud.length), + id: guid('hud', ents.length), path: '/ui/DefaultGroup/DeckHud/Energy', modelId: 'uitext', entryId: 'UIText', @@ -319,7 +382,7 @@ function upsertUi() { ], })); - ui.ContentProto.Entities.push(...hud); + ui.ContentProto.Entities.push(...ents); JSON.parse(JSON.stringify(ui)); writeFileSync(UI_FILE, JSON.stringify(ui, null, 2), 'utf8'); } @@ -328,13 +391,13 @@ function prop(Type, Name, DefaultValue = 'nil') { return { Type, DefaultValue, SyncDirection: 0, Attributes: [], Name }; } -function method(Name, Code, Arguments = [], ExecSpace = 0) { +function method(Name, Code, Arguments = []) { return { Return: { Type: 'void', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: null }, Arguments, Code, Scope: 2, - ExecSpace, + ExecSpace: 6, Attributes: [], Name, }; @@ -383,8 +446,26 @@ function writeCodeblocks() { prop('number', 'Turn', '0'), prop('number', 'TweenEventId', '0'), prop('any', 'EndTurnHandler'), + prop('any', 'NewGameHandler'), ], [ - method('OnBeginPlay', `self:StartCombat()`), + method('OnBeginPlay', `self:ShowMainMenu()`), + method('ShowMainMenu', `self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", true) +self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false) +self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false) +self:BindMenuButtons()`), + method('BindMenuButtons', `local buttonEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/NewGameButton") +if buttonEntity == nil or buttonEntity.ButtonComponent == nil then +\treturn +end +if self.NewGameHandler ~= nil then +\tbuttonEntity:DisconnectEvent(ButtonClickEvent, self.NewGameHandler) +\tself.NewGameHandler = nil +end +self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, self.StartNewGame)`), + method('StartNewGame', `self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", false) +self:SetEntityEnabled("/ui/DefaultGroup/CardHand", true) +self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", true) +self:StartCombat()`), method('StartCombat', `self.MaxEnergy = 3 self.Turn = 0 self.DiscardPile = {} @@ -491,8 +572,6 @@ if cardEntity ~= nil and cardEntity.SpriteGUIRendererComponent ~= nil then \t\tok, color = pcall(function() return Color(0.86, 0.42, 0.38, 1) end) \telseif kind == "Skill" then \t\tok, color = pcall(function() return Color(0.42, 0.55, 0.85, 1) end) -\telse -\t\tok, color = pcall(function() return Color(0.46, 0.68, 0.52, 1) end) \tend \tif ok == true and color ~= nil then \t\tcardEntity.SpriteGUIRendererComponent.Color = color @@ -508,6 +587,13 @@ end`, [ { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' }, { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'value' }, ]), + method('SetEntityEnabled', `local entity = _EntityService:GetEntityByPath(path) +if entity ~= nil then +\tentity.Enable = enabled +end`, [ + { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' }, + { Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'enabled' }, + ]), method('AnimateCardFrom', `local cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot)) if cardEntity == nil or cardEntity.UITransformComponent == nil then \treturn @@ -531,9 +617,6 @@ end, 1 / 60)`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'duration' }, ]), ]); - for (const m of combat.ContentProto.Json.Methods) { - m.ExecSpace = 6; - } writeFileSync('RootDesk/MyDesk/SlayDeckController.codeblock', JSON.stringify(combat, null, 2), 'utf8'); } @@ -552,4 +635,4 @@ upsertUi(); writeCodeblocks(); patchCommon(); -console.log('Slay deck UI and combat codeblocks generated.'); +console.log('Slay deck UI and main menu generated.'); diff --git a/ui/DefaultGroup.ui b/ui/DefaultGroup.ui index ac62489..7b2f7e4 100644 --- a/ui/DefaultGroup.ui +++ b/ui/DefaultGroup.ui @@ -1073,7 +1073,7 @@ "name": "CardHand", "path": "/ui/DefaultGroup/CardHand", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 4, @@ -1214,7 +1214,7 @@ "name": "Card1", "path": "/ui/DefaultGroup/CardHand/Card1", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 0, @@ -1355,7 +1355,7 @@ "name": "Cost", "path": "/ui/DefaultGroup/CardHand/Card1/Cost", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 0, @@ -1543,7 +1543,7 @@ "name": "Name", "path": "/ui/DefaultGroup/CardHand/Card1/Name", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 1, @@ -1731,7 +1731,7 @@ "name": "Desc", "path": "/ui/DefaultGroup/CardHand/Card1/Desc", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 2, @@ -1919,7 +1919,7 @@ "name": "Card2", "path": "/ui/DefaultGroup/CardHand/Card2", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 1, @@ -2060,7 +2060,7 @@ "name": "Cost", "path": "/ui/DefaultGroup/CardHand/Card2/Cost", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 0, @@ -2248,7 +2248,7 @@ "name": "Name", "path": "/ui/DefaultGroup/CardHand/Card2/Name", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 1, @@ -2436,7 +2436,7 @@ "name": "Desc", "path": "/ui/DefaultGroup/CardHand/Card2/Desc", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 2, @@ -2624,7 +2624,7 @@ "name": "Card3", "path": "/ui/DefaultGroup/CardHand/Card3", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 2, @@ -2765,7 +2765,7 @@ "name": "Cost", "path": "/ui/DefaultGroup/CardHand/Card3/Cost", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 0, @@ -2953,7 +2953,7 @@ "name": "Name", "path": "/ui/DefaultGroup/CardHand/Card3/Name", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 1, @@ -3141,7 +3141,7 @@ "name": "Desc", "path": "/ui/DefaultGroup/CardHand/Card3/Desc", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 2, @@ -3329,7 +3329,7 @@ "name": "Card4", "path": "/ui/DefaultGroup/CardHand/Card4", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 3, @@ -3470,7 +3470,7 @@ "name": "Cost", "path": "/ui/DefaultGroup/CardHand/Card4/Cost", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 0, @@ -3658,7 +3658,7 @@ "name": "Name", "path": "/ui/DefaultGroup/CardHand/Card4/Name", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 1, @@ -3846,7 +3846,7 @@ "name": "Desc", "path": "/ui/DefaultGroup/CardHand/Card4/Desc", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 2, @@ -4034,7 +4034,7 @@ "name": "Card5", "path": "/ui/DefaultGroup/CardHand/Card5", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 4, @@ -4175,7 +4175,7 @@ "name": "Cost", "path": "/ui/DefaultGroup/CardHand/Card5/Cost", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 0, @@ -4363,7 +4363,7 @@ "name": "Name", "path": "/ui/DefaultGroup/CardHand/Card5/Name", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 1, @@ -4551,7 +4551,7 @@ "name": "Desc", "path": "/ui/DefaultGroup/CardHand/Card5/Desc", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 2, @@ -4731,6 +4731,993 @@ "@version": 1 } }, + { + "id": "menu0000-0000-4000-8000-000000000000", + "path": "/ui/DefaultGroup/MainMenu", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent", + "jsonString": { + "name": "MainMenu", + "path": "/ui/DefaultGroup/MainMenu", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 20, + "pathConstraints": "///", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UISprite", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uisprite", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 960, + "y": 540 + }, + "OffsetMin": { + "x": -960, + "y": -540 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 1920, + "y": 1080 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": 0 + }, + "Position": { + "x": 0, + "y": 0, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0.04, + "g": 0.05, + "b": 0.07, + "a": 0.96 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": true, + "Type": 1, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "menu0001-0000-4000-8000-000000000001", + "path": "/ui/DefaultGroup/MainMenu/Title", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", + "jsonString": { + "name": "Title", + "path": "/ui/DefaultGroup/MainMenu/Title", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 0, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UIText", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uitext", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 360, + "y": 230 + }, + "OffsetMin": { + "x": -360, + "y": 130 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 720, + "y": 100 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": 180 + }, + "Position": { + "x": 0, + "y": 180, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0, + "g": 0, + "b": 0, + "a": 0 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": false, + "Type": 1, + "Enable": true + }, + { + "@type": "MOD.Core.TextComponent", + "Alignment": 0, + "Bold": true, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "Font": 0, + "FontColor": { + "r": 0.94, + "g": 0.74, + "b": 0.26, + "a": 1 + }, + "FontSize": 64, + "MaxSize": 64, + "MinSize": 8, + "OutlineColor": { + "r": 0.08, + "g": 0.08, + "b": 0.08, + "a": 1 + }, + "OutlineDistance": { + "x": 1, + "y": -1 + }, + "OutlineWidth": 1, + "Overflow": 0, + "OverrideSorting": false, + "Padding": { + "left": 0, + "right": 0, + "top": 0, + "bottom": 0 + }, + "SizeFit": false, + "Text": "슬레이 메이플", + "UseOutLine": true, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "menu0002-0000-4000-8000-000000000002", + "path": "/ui/DefaultGroup/MainMenu/Subtitle", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", + "jsonString": { + "name": "Subtitle", + "path": "/ui/DefaultGroup/MainMenu/Subtitle", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 1, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UIText", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uitext", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 380, + "y": 128 + }, + "OffsetMin": { + "x": -380, + "y": 80 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 760, + "y": 48 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": 104 + }, + "Position": { + "x": 0, + "y": 104, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0, + "g": 0, + "b": 0, + "a": 0 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": false, + "Type": 1, + "Enable": true + }, + { + "@type": "MOD.Core.TextComponent", + "Alignment": 0, + "Bold": false, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "Font": 0, + "FontColor": { + "r": 0.82, + "g": 0.86, + "b": 0.9, + "a": 1 + }, + "FontSize": 24, + "MaxSize": 24, + "MinSize": 8, + "OutlineColor": { + "r": 0.08, + "g": 0.08, + "b": 0.08, + "a": 1 + }, + "OutlineDistance": { + "x": 1, + "y": -1 + }, + "OutlineWidth": 1, + "Overflow": 0, + "OverrideSorting": false, + "Padding": { + "left": 0, + "right": 0, + "top": 0, + "bottom": 0 + }, + "SizeFit": false, + "Text": "카드를 뽑고, 덱을 만들고, 첨탑을 오른다", + "UseOutLine": true, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "menu0003-0000-4000-8000-000000000003", + "path": "/ui/DefaultGroup/MainMenu/NewGameButton", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent", + "jsonString": { + "name": "NewGameButton", + "path": "/ui/DefaultGroup/MainMenu/NewGameButton", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 2, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UIButton", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uibutton", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 130, + "y": 14 + }, + "OffsetMin": { + "x": -130, + "y": -54 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 260, + "y": 68 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": -20 + }, + "Position": { + "x": 0, + "y": -20, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0.13, + "g": 0.15, + "b": 0.18, + "a": 1 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": true, + "Type": 1, + "Enable": true + }, + { + "@type": "MOD.Core.ButtonComponent", + "Colors": { + "NormalColor": { + "r": 1, + "g": 1, + "b": 1, + "a": 1 + }, + "HighlightedColor": { + "r": 0.9607843, + "g": 0.9607843, + "b": 0.9607843, + "a": 1 + }, + "PressedColor": { + "r": 0.784313738, + "g": 0.784313738, + "b": 0.784313738, + "a": 1 + }, + "SelectedColor": { + "r": 0.9607843, + "g": 0.9607843, + "b": 0.9607843, + "a": 1 + }, + "DisabledColor": { + "r": 0.784313738, + "g": 0.784313738, + "b": 0.784313738, + "a": 0.5019608 + }, + "ColorMultiplier": 1, + "FadeDuration": 0.1 + }, + "ImageRUIDs": { + "HighlightedSprite": null, + "PressedSprite": null, + "SelectedSprite": null, + "DisabledSprite": null + }, + "KeyCode": 0, + "OverrideSorting": false, + "Transition": 1, + "Enable": true + }, + { + "@type": "MOD.Core.TextComponent", + "Alignment": 0, + "Bold": true, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "Font": 0, + "FontColor": { + "r": 0.94, + "g": 0.74, + "b": 0.26, + "a": 1 + }, + "FontSize": 30, + "MaxSize": 30, + "MinSize": 8, + "OutlineColor": { + "r": 0.08, + "g": 0.08, + "b": 0.08, + "a": 1 + }, + "OutlineDistance": { + "x": 1, + "y": -1 + }, + "OutlineWidth": 1, + "Overflow": 0, + "OverrideSorting": false, + "Padding": { + "left": 0, + "right": 0, + "top": 0, + "bottom": 0 + }, + "SizeFit": false, + "Text": "새 게임", + "UseOutLine": true, + "Enable": true + } + ], + "@version": 1 + } + }, + { + "id": "menu0004-0000-4000-8000-000000000004", + "path": "/ui/DefaultGroup/MainMenu/ContinueButton", + "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent", + "jsonString": { + "name": "ContinueButton", + "path": "/ui/DefaultGroup/MainMenu/ContinueButton", + "nameEditable": true, + "enable": true, + "visible": true, + "localize": true, + "displayOrder": 3, + "pathConstraints": "////", + "revision": 1, + "origin": { + "type": "Model", + "entry_id": "UIButton", + "sub_entity_id": null, + "root_entity_id": null, + "replaced_model_id": null + }, + "modelId": "uibutton", + "@components": [ + { + "@type": "MOD.Core.UITransformComponent", + "ActivePlatform": 255, + "AlignmentOption": 0, + "AnchorsMax": { + "x": 0.5, + "y": 0.5 + }, + "AnchorsMin": { + "x": 0.5, + "y": 0.5 + }, + "MobileOnly": false, + "OffsetMax": { + "x": 130, + "y": -71 + }, + "OffsetMin": { + "x": -130, + "y": -129 + }, + "Pivot": { + "x": 0.5, + "y": 0.5 + }, + "RectSize": { + "x": 260, + "y": 58 + }, + "UIMode": 1, + "UIScale": { + "x": 1, + "y": 1, + "z": 1 + }, + "UIVersion": 2, + "anchoredPosition": { + "x": 0, + "y": -100 + }, + "Position": { + "x": 0, + "y": -100, + "z": 0 + }, + "QuaternionRotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "Scale": { + "x": 1, + "y": 1, + "z": 1 + }, + "Enable": true + }, + { + "@type": "MOD.Core.SpriteGUIRendererComponent", + "AnimClipPlayType": 0, + "EndFrameIndex": 2147483647, + "ImageRUID": { + "DataId": "" + }, + "LocalPosition": { + "x": 0, + "y": 0 + }, + "LocalScale": { + "x": 1, + "y": 1 + }, + "OverrideSorting": false, + "PlayRate": 1, + "PreserveSprite": 0, + "StartFrameIndex": 0, + "Color": { + "r": 0.1, + "g": 0.11, + "b": 0.13, + "a": 0.78 + }, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "FillAmount": 1, + "FillCenter": true, + "FillClockWise": true, + "FillMethod": 0, + "FillOrigin": 0, + "FlipX": false, + "FlipY": false, + "FrameColumn": 1, + "FrameRate": 0, + "FrameRow": 1, + "Outline": false, + "OutlineColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 1 + }, + "OutlineWidth": 3, + "RaycastTarget": false, + "Type": 1, + "Enable": true + }, + { + "@type": "MOD.Core.ButtonComponent", + "Colors": { + "NormalColor": { + "r": 1, + "g": 1, + "b": 1, + "a": 1 + }, + "HighlightedColor": { + "r": 0.9607843, + "g": 0.9607843, + "b": 0.9607843, + "a": 1 + }, + "PressedColor": { + "r": 0.784313738, + "g": 0.784313738, + "b": 0.784313738, + "a": 1 + }, + "SelectedColor": { + "r": 0.9607843, + "g": 0.9607843, + "b": 0.9607843, + "a": 1 + }, + "DisabledColor": { + "r": 0.784313738, + "g": 0.784313738, + "b": 0.784313738, + "a": 0.5019608 + }, + "ColorMultiplier": 1, + "FadeDuration": 0.1 + }, + "ImageRUIDs": { + "HighlightedSprite": null, + "PressedSprite": null, + "SelectedSprite": null, + "DisabledSprite": null + }, + "KeyCode": 0, + "OverrideSorting": false, + "Transition": 1, + "Enable": false + }, + { + "@type": "MOD.Core.TextComponent", + "Alignment": 0, + "Bold": true, + "DropShadow": false, + "DropShadowAngle": 30, + "DropShadowColor": { + "r": 0, + "g": 0, + "b": 0, + "a": 0.72 + }, + "DropShadowDistance": 32, + "Font": 0, + "FontColor": { + "r": 0.55, + "g": 0.58, + "b": 0.62, + "a": 1 + }, + "FontSize": 24, + "MaxSize": 24, + "MinSize": 8, + "OutlineColor": { + "r": 0.08, + "g": 0.08, + "b": 0.08, + "a": 1 + }, + "OutlineDistance": { + "x": 1, + "y": -1 + }, + "OutlineWidth": 1, + "Overflow": 0, + "OverrideSorting": false, + "Padding": { + "left": 0, + "right": 0, + "top": 0, + "bottom": 0 + }, + "SizeFit": false, + "Text": "이어하기", + "UseOutLine": true, + "Enable": true + } + ], + "@version": 1 + } + }, { "id": "hud0000-0000-4000-8000-000000000000", "path": "/ui/DefaultGroup/DeckHud", @@ -4739,7 +5726,7 @@ "name": "DeckHud", "path": "/ui/DefaultGroup/DeckHud", "nameEditable": true, - "enable": true, + "enable": false, "visible": true, "localize": true, "displayOrder": 5, @@ -4873,7 +5860,7 @@ } }, { - "id": "hud0001-0000-4000-8000-000000000001", + "id": "hud0006-0000-4000-8000-000000000006", "path": "/ui/DefaultGroup/DeckHud/DrawPile", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent", "jsonString": { @@ -5014,7 +6001,7 @@ } }, { - "id": "hud0002-0000-4000-8000-000000000002", + "id": "hud0007-0000-4000-8000-000000000007", "path": "/ui/DefaultGroup/DeckHud/DrawPile/Label", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -5202,7 +6189,7 @@ } }, { - "id": "hud0003-0000-4000-8000-000000000003", + "id": "hud0008-0000-4000-8000-000000000008", "path": "/ui/DefaultGroup/DeckHud/DrawPile/Count", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -5390,7 +6377,7 @@ } }, { - "id": "hud0004-0000-4000-8000-000000000004", + "id": "hud0009-0000-4000-8000-000000000009", "path": "/ui/DefaultGroup/DeckHud/DiscardPile", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent", "jsonString": { @@ -5531,7 +6518,7 @@ } }, { - "id": "hud0005-0000-4000-8000-000000000005", + "id": "hud000a-0000-4000-8000-00000000000a", "path": "/ui/DefaultGroup/DeckHud/DiscardPile/Label", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -5719,7 +6706,7 @@ } }, { - "id": "hud0006-0000-4000-8000-000000000006", + "id": "hud000b-0000-4000-8000-00000000000b", "path": "/ui/DefaultGroup/DeckHud/DiscardPile/Count", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -5907,7 +6894,7 @@ } }, { - "id": "hud0007-0000-4000-8000-000000000007", + "id": "hud000c-0000-4000-8000-00000000000c", "path": "/ui/DefaultGroup/DeckHud/EndTurnButton", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent", "jsonString": { @@ -6142,7 +7129,7 @@ } }, { - "id": "hud0008-0000-4000-8000-000000000008", + "id": "hud000d-0000-4000-8000-00000000000d", "path": "/ui/DefaultGroup/DeckHud/Energy", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { -- 2.49.1 From 8eab9a75aca4305a8fcbe9676b67e01782aec8b8 Mon Sep 17 00:00:00 2001 From: maple Date: Sun, 7 Jun 2026 23:33:44 +0900 Subject: [PATCH 2/6] Fix generated UI GUIDs --- tools/gen-slaydeck.mjs | 28 +++++++++++++++------------- ui/DefaultGroup.ui | 34 +++++++++++++++++----------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/tools/gen-slaydeck.mjs b/tools/gen-slaydeck.mjs index 568c08e..a00ceca 100644 --- a/tools/gen-slaydeck.mjs +++ b/tools/gen-slaydeck.mjs @@ -164,7 +164,9 @@ function entity({ id, path, modelId, entryId, componentNames, components, displa function upsertUi() { const ui = JSON.parse(readFileSync(UI_FILE, 'utf8')); ui.ContentProto.Entities = ui.ContentProto.Entities.filter( - (e) => !e.path.startsWith('/ui/DefaultGroup/DeckHud') && !e.path.startsWith('/ui/DefaultGroup/MainMenu'), + (e) => !e.path.startsWith('/ui/DefaultGroup/DeckHud') + && !e.path.startsWith('/ui/DefaultGroup/MainMenu') + && !e.path.startsWith('/ui/DefaultGroup/CardHand/Card5/'), ); const byPath = new Map(ui.ContentProto.Entities.map((e) => [e.path, e])); @@ -202,7 +204,7 @@ function upsertUi() { let child = byPath.get(path); if (!child) { child = entity({ - id: guid('dck', i * 10 + (suffix === 'Cost' ? 0 : suffix === 'Name' ? 1 : 2)), + id: guid('d00e', i * 10 + (suffix === 'Cost' ? 0 : suffix === 'Name' ? 1 : 2)), path, modelId: 'uitext', entryId: 'UIText', @@ -230,7 +232,7 @@ function upsertUi() { const add = (e) => ents.push(e); add(entity({ - id: guid('menu', 0), + id: guid('f00d', 0), path: '/ui/DefaultGroup/MainMenu', modelId: 'uisprite', entryId: 'UISprite', @@ -242,7 +244,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('menu', 1), + id: guid('f00d', 1), path: '/ui/DefaultGroup/MainMenu/Title', modelId: 'uitext', entryId: 'UIText', @@ -255,7 +257,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('menu', 2), + id: guid('f00d', 2), path: '/ui/DefaultGroup/MainMenu/Subtitle', modelId: 'uitext', entryId: 'UIText', @@ -268,7 +270,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('menu', 3), + id: guid('f00d', 3), path: '/ui/DefaultGroup/MainMenu/NewGameButton', modelId: 'uibutton', entryId: 'UIButton', @@ -282,7 +284,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('menu', 4), + id: guid('f00d', 4), path: '/ui/DefaultGroup/MainMenu/ContinueButton', modelId: 'uibutton', entryId: 'UIButton', @@ -297,7 +299,7 @@ function upsertUi() { })); add(entity({ - id: guid('hud', 0), + id: guid('feed', 0), path: '/ui/DefaultGroup/DeckHud', modelId: 'uiempty', entryId: 'UIEmpty', @@ -315,7 +317,7 @@ function upsertUi() { { key: 'DiscardPile', x: 590, label: '버린 덱', count: '0', color: { r: 0.22, g: 0.18, b: 0.16, a: 1 } }, ]) { add(entity({ - id: guid('hud', ents.length), + id: guid('feed', ents.length), path: `/ui/DefaultGroup/DeckHud/${pile.key}`, modelId: 'uisprite', entryId: 'UISprite', @@ -327,7 +329,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('hud', ents.length), + id: guid('feed', ents.length), path: `/ui/DefaultGroup/DeckHud/${pile.key}/Label`, modelId: 'uitext', entryId: 'UIText', @@ -340,7 +342,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('hud', ents.length), + id: guid('feed', ents.length), path: `/ui/DefaultGroup/DeckHud/${pile.key}/Count`, modelId: 'uitext', entryId: 'UIText', @@ -355,7 +357,7 @@ function upsertUi() { } add(entity({ - id: guid('hud', ents.length), + id: guid('feed', ents.length), path: '/ui/DefaultGroup/DeckHud/EndTurnButton', modelId: 'uibutton', entryId: 'UIButton', @@ -369,7 +371,7 @@ function upsertUi() { ], })); add(entity({ - id: guid('hud', ents.length), + id: guid('feed', ents.length), path: '/ui/DefaultGroup/DeckHud/Energy', modelId: 'uitext', entryId: 'UIText', diff --git a/ui/DefaultGroup.ui b/ui/DefaultGroup.ui index 7b2f7e4..e126f3c 100644 --- a/ui/DefaultGroup.ui +++ b/ui/DefaultGroup.ui @@ -4168,7 +4168,7 @@ } }, { - "id": "dck0032-0000-4000-8000-000000000032", + "id": "d00e0032-0000-4000-8000-000000000032", "path": "/ui/DefaultGroup/CardHand/Card5/Cost", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -4356,7 +4356,7 @@ } }, { - "id": "dck0033-0000-4000-8000-000000000033", + "id": "d00e0033-0000-4000-8000-000000000033", "path": "/ui/DefaultGroup/CardHand/Card5/Name", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -4544,7 +4544,7 @@ } }, { - "id": "dck0034-0000-4000-8000-000000000034", + "id": "d00e0034-0000-4000-8000-000000000034", "path": "/ui/DefaultGroup/CardHand/Card5/Desc", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -4732,7 +4732,7 @@ } }, { - "id": "menu0000-0000-4000-8000-000000000000", + "id": "f00d0000-0000-4000-8000-000000000000", "path": "/ui/DefaultGroup/MainMenu", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent", "jsonString": { @@ -4873,7 +4873,7 @@ } }, { - "id": "menu0001-0000-4000-8000-000000000001", + "id": "f00d0001-0000-4000-8000-000000000001", "path": "/ui/DefaultGroup/MainMenu/Title", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -5061,7 +5061,7 @@ } }, { - "id": "menu0002-0000-4000-8000-000000000002", + "id": "f00d0002-0000-4000-8000-000000000002", "path": "/ui/DefaultGroup/MainMenu/Subtitle", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -5249,7 +5249,7 @@ } }, { - "id": "menu0003-0000-4000-8000-000000000003", + "id": "f00d0003-0000-4000-8000-000000000003", "path": "/ui/DefaultGroup/MainMenu/NewGameButton", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent", "jsonString": { @@ -5484,7 +5484,7 @@ } }, { - "id": "menu0004-0000-4000-8000-000000000004", + "id": "f00d0004-0000-4000-8000-000000000004", "path": "/ui/DefaultGroup/MainMenu/ContinueButton", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent", "jsonString": { @@ -5719,7 +5719,7 @@ } }, { - "id": "hud0000-0000-4000-8000-000000000000", + "id": "feed0000-0000-4000-8000-000000000000", "path": "/ui/DefaultGroup/DeckHud", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent", "jsonString": { @@ -5860,7 +5860,7 @@ } }, { - "id": "hud0006-0000-4000-8000-000000000006", + "id": "feed0006-0000-4000-8000-000000000006", "path": "/ui/DefaultGroup/DeckHud/DrawPile", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent", "jsonString": { @@ -6001,7 +6001,7 @@ } }, { - "id": "hud0007-0000-4000-8000-000000000007", + "id": "feed0007-0000-4000-8000-000000000007", "path": "/ui/DefaultGroup/DeckHud/DrawPile/Label", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -6189,7 +6189,7 @@ } }, { - "id": "hud0008-0000-4000-8000-000000000008", + "id": "feed0008-0000-4000-8000-000000000008", "path": "/ui/DefaultGroup/DeckHud/DrawPile/Count", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -6377,7 +6377,7 @@ } }, { - "id": "hud0009-0000-4000-8000-000000000009", + "id": "feed0009-0000-4000-8000-000000000009", "path": "/ui/DefaultGroup/DeckHud/DiscardPile", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent", "jsonString": { @@ -6518,7 +6518,7 @@ } }, { - "id": "hud000a-0000-4000-8000-00000000000a", + "id": "feed000a-0000-4000-8000-00000000000a", "path": "/ui/DefaultGroup/DeckHud/DiscardPile/Label", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -6706,7 +6706,7 @@ } }, { - "id": "hud000b-0000-4000-8000-00000000000b", + "id": "feed000b-0000-4000-8000-00000000000b", "path": "/ui/DefaultGroup/DeckHud/DiscardPile/Count", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { @@ -6894,7 +6894,7 @@ } }, { - "id": "hud000c-0000-4000-8000-00000000000c", + "id": "feed000c-0000-4000-8000-00000000000c", "path": "/ui/DefaultGroup/DeckHud/EndTurnButton", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent", "jsonString": { @@ -7129,7 +7129,7 @@ } }, { - "id": "hud000d-0000-4000-8000-00000000000d", + "id": "feed000d-0000-4000-8000-00000000000d", "path": "/ui/DefaultGroup/DeckHud/Energy", "componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent", "jsonString": { -- 2.49.1 From a9926feea3486cf33931288315e1184daf995998 Mon Sep 17 00:00:00 2001 From: maple Date: Sun, 7 Jun 2026 23:39:58 +0900 Subject: [PATCH 3/6] Freeze monsters for turn combat --- RootDesk/MyDesk/SlayDeckController.codeblock | 40 +++++++++++++++++++- tools/gen-slaydeck.mjs | 34 +++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/RootDesk/MyDesk/SlayDeckController.codeblock b/RootDesk/MyDesk/SlayDeckController.codeblock index eaaa7b5..0ee9ea3 100644 --- a/RootDesk/MyDesk/SlayDeckController.codeblock +++ b/RootDesk/MyDesk/SlayDeckController.codeblock @@ -148,7 +148,7 @@ "Name": null }, "Arguments": [], - "Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\nself:StartCombat()", + "Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\nself:ConfigureTurnBasedMonsters()\nself:StartCombat()", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -169,6 +169,44 @@ "Attributes": [], "Name": "StartCombat" }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [], + "Code": "for mapIndex = 1, 11 do\n\tlocal mapName = \"map\" .. string.format(\"%02d\", mapIndex)\n\tfor i = 1, 6 do\n\t\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath(\"/maps/\" .. mapName .. \"/Monster\" .. tostring(i)))\n\tend\n\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath(\"/maps/\" .. mapName .. \"/StaticMonsterTemplate\"))\n\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath(\"/maps/\" .. mapName .. \"/MoveMonsterTemplate\"))\n\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath(\"/maps/\" .. mapName .. \"/ChaseMonsterTemplate\"))\n\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath(\"/maps/\" .. mapName .. \"/monster-43\"))\nend", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "ConfigureTurnBasedMonsters" + }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [ + { + "Type": "Entity", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": "monster" + } + ], + "Code": "if monster == nil then\n\treturn\nend\nif monster.AIWanderComponent ~= nil then\n\tmonster.AIWanderComponent.Enable = false\nend\nif monster.AIChaseComponent ~= nil then\n\tmonster.AIChaseComponent.Enable = false\nend\nif monster.MovementComponent ~= nil then\n\tmonster.MovementComponent.Enable = false\nend\nif monster.RigidbodyComponent ~= nil then\n\tmonster.RigidbodyComponent.MoveVelocity = Vector2.zero\n\tmonster.RigidbodyComponent.RealMoveVelocity = Vector2.zero\nend\nif monster.TransformComponent ~= nil then\n\tlocal scale = monster.TransformComponent.Scale\n\tmonster.TransformComponent.Scale = Vector3(-math.abs(scale.x), math.abs(scale.y), scale.z)\nend\nif monster.StateComponent ~= nil then\n\tmonster.StateComponent:ChangeState(\"IDLE\")\nend", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "ConfigureMonsterForTurnCombat" + }, { "Return": { "Type": "void", diff --git a/tools/gen-slaydeck.mjs b/tools/gen-slaydeck.mjs index a00ceca..de8bde0 100644 --- a/tools/gen-slaydeck.mjs +++ b/tools/gen-slaydeck.mjs @@ -467,6 +467,7 @@ self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, self.StartNewG method('StartNewGame', `self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", false) self:SetEntityEnabled("/ui/DefaultGroup/CardHand", true) self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", true) +self:ConfigureTurnBasedMonsters() self:StartCombat()`), method('StartCombat', `self.MaxEnergy = 3 self.Turn = 0 @@ -476,6 +477,39 @@ self.DrawPile = { "Strike", "Strike", "Strike", "Strike", "Strike", "Defend", "D self:Shuffle(self.DrawPile) self:BindButtons() self:StartPlayerTurn()`), + method('ConfigureTurnBasedMonsters', `for mapIndex = 1, 11 do +\tlocal mapName = "map" .. string.format("%02d", mapIndex) +\tfor i = 1, 6 do +\t\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath("/maps/" .. mapName .. "/Monster" .. tostring(i))) +\tend +\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath("/maps/" .. mapName .. "/StaticMonsterTemplate")) +\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath("/maps/" .. mapName .. "/MoveMonsterTemplate")) +\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath("/maps/" .. mapName .. "/ChaseMonsterTemplate")) +\tself:ConfigureMonsterForTurnCombat(_EntityService:GetEntityByPath("/maps/" .. mapName .. "/monster-43")) +end`), + method('ConfigureMonsterForTurnCombat', `if monster == nil then +\treturn +end +if monster.AIWanderComponent ~= nil then +\tmonster.AIWanderComponent.Enable = false +end +if monster.AIChaseComponent ~= nil then +\tmonster.AIChaseComponent.Enable = false +end +if monster.MovementComponent ~= nil then +\tmonster.MovementComponent.Enable = false +end +if monster.RigidbodyComponent ~= nil then +\tmonster.RigidbodyComponent.MoveVelocity = Vector2.zero +\tmonster.RigidbodyComponent.RealMoveVelocity = Vector2.zero +end +if monster.TransformComponent ~= nil then +\tlocal scale = monster.TransformComponent.Scale +\tmonster.TransformComponent.Scale = Vector3(-math.abs(scale.x), math.abs(scale.y), scale.z) +end +if monster.StateComponent ~= nil then +\tmonster.StateComponent:ChangeState("IDLE") +end`, [{ Type: 'Entity', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'monster' }]), method('Shuffle', `if list == nil then \treturn end -- 2.49.1 From 913b4f1721bb1e06e473db278275ca1a0614f2d3 Mon Sep 17 00:00:00 2001 From: maple Date: Sun, 7 Jun 2026 23:42:05 +0900 Subject: [PATCH 4/6] Avoid client state transition for monsters --- RootDesk/MyDesk/SlayDeckController.codeblock | 2 +- tools/gen-slaydeck.mjs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RootDesk/MyDesk/SlayDeckController.codeblock b/RootDesk/MyDesk/SlayDeckController.codeblock index 0ee9ea3..93e44ed 100644 --- a/RootDesk/MyDesk/SlayDeckController.codeblock +++ b/RootDesk/MyDesk/SlayDeckController.codeblock @@ -201,7 +201,7 @@ "Name": "monster" } ], - "Code": "if monster == nil then\n\treturn\nend\nif monster.AIWanderComponent ~= nil then\n\tmonster.AIWanderComponent.Enable = false\nend\nif monster.AIChaseComponent ~= nil then\n\tmonster.AIChaseComponent.Enable = false\nend\nif monster.MovementComponent ~= nil then\n\tmonster.MovementComponent.Enable = false\nend\nif monster.RigidbodyComponent ~= nil then\n\tmonster.RigidbodyComponent.MoveVelocity = Vector2.zero\n\tmonster.RigidbodyComponent.RealMoveVelocity = Vector2.zero\nend\nif monster.TransformComponent ~= nil then\n\tlocal scale = monster.TransformComponent.Scale\n\tmonster.TransformComponent.Scale = Vector3(-math.abs(scale.x), math.abs(scale.y), scale.z)\nend\nif monster.StateComponent ~= nil then\n\tmonster.StateComponent:ChangeState(\"IDLE\")\nend", + "Code": "if monster == nil then\n\treturn\nend\nif monster.AIWanderComponent ~= nil then\n\tmonster.AIWanderComponent.Enable = false\nend\nif monster.AIChaseComponent ~= nil then\n\tmonster.AIChaseComponent.Enable = false\nend\nif monster.MovementComponent ~= nil then\n\tmonster.MovementComponent.Enable = false\nend\nif monster.RigidbodyComponent ~= nil then\n\tmonster.RigidbodyComponent.MoveVelocity = Vector2.zero\n\tmonster.RigidbodyComponent.RealMoveVelocity = Vector2.zero\nend\nif monster.TransformComponent ~= nil then\n\tlocal scale = monster.TransformComponent.Scale\n\tmonster.TransformComponent.Scale = Vector3(-math.abs(scale.x), math.abs(scale.y), scale.z)\nend\nif monster.StateAnimationComponent ~= nil and monster.SpriteRendererComponent ~= nil then\n\tlocal stand = monster.StateAnimationComponent.ActionSheet[\"stand\"]\n\tif stand ~= nil and stand ~= \"\" then\n\t\tmonster.SpriteRendererComponent.SpriteRUID = stand\n\tend\nend", "Scope": 2, "ExecSpace": 6, "Attributes": [], diff --git a/tools/gen-slaydeck.mjs b/tools/gen-slaydeck.mjs index de8bde0..8ee9137 100644 --- a/tools/gen-slaydeck.mjs +++ b/tools/gen-slaydeck.mjs @@ -507,8 +507,11 @@ if monster.TransformComponent ~= nil then \tlocal scale = monster.TransformComponent.Scale \tmonster.TransformComponent.Scale = Vector3(-math.abs(scale.x), math.abs(scale.y), scale.z) end -if monster.StateComponent ~= nil then -\tmonster.StateComponent:ChangeState("IDLE") +if monster.StateAnimationComponent ~= nil and monster.SpriteRendererComponent ~= nil then +\tlocal stand = monster.StateAnimationComponent.ActionSheet["stand"] +\tif stand ~= nil and stand ~= "" then +\t\tmonster.SpriteRendererComponent.SpriteRUID = stand +\tend end`, [{ Type: 'Entity', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'monster' }]), method('Shuffle', `if list == nil then \treturn -- 2.49.1 From 1299d718e26e5d752d8f70ab822fc678082550bd Mon Sep 17 00:00:00 2001 From: maple Date: Sun, 7 Jun 2026 23:56:20 +0900 Subject: [PATCH 5/6] Disable monster patrol movement --- Global/ChaseMonster.model | 3 +- Global/MoveMonster.model | 3 +- RootDesk/MyDesk/Model_monster-43.model | 57 +-- map/map01.map | 620 ++++++++++++------------- map/map02.map | 12 +- map/map03.map | 12 +- map/map04.map | 12 +- map/map05.map | 12 +- map/map06.map | 12 +- map/map07.map | 12 +- map/map08.map | 12 +- map/map09.map | 12 +- map/map10.map | 12 +- map/map11.map | 12 +- tools/freeze-turn-monsters.mjs | 83 ++++ 15 files changed, 477 insertions(+), 409 deletions(-) create mode 100644 tools/freeze-turn-monsters.mjs diff --git a/Global/ChaseMonster.model b/Global/ChaseMonster.model index 34d0a88..3e25ed1 100644 --- a/Global/ChaseMonster.model +++ b/Global/ChaseMonster.model @@ -23,7 +23,6 @@ "MOD.Core.SpriteRendererComponent", "MOD.Core.RigidbodyComponent", "MOD.Core.MovementComponent", - "MOD.Core.AIChaseComponent", "MOD.Core.StateComponent", "MOD.Core.HitComponent", "MOD.Core.DamageSkinSpawnerComponent", @@ -150,4 +149,4 @@ "Children": [] } } -} \ No newline at end of file +} diff --git a/Global/MoveMonster.model b/Global/MoveMonster.model index 45d04b9..1b2afd0 100644 --- a/Global/MoveMonster.model +++ b/Global/MoveMonster.model @@ -23,7 +23,6 @@ "MOD.Core.SpriteRendererComponent", "MOD.Core.RigidbodyComponent", "MOD.Core.MovementComponent", - "MOD.Core.AIWanderComponent", "MOD.Core.StateComponent", "MOD.Core.HitComponent", "MOD.Core.DamageSkinSpawnerComponent", @@ -141,4 +140,4 @@ "Children": [] } } -} \ No newline at end of file +} diff --git a/RootDesk/MyDesk/Model_monster-43.model b/RootDesk/MyDesk/Model_monster-43.model index ef0465c..477834a 100644 --- a/RootDesk/MyDesk/Model_monster-43.model +++ b/RootDesk/MyDesk/Model_monster-43.model @@ -23,7 +23,6 @@ "MOD.Core.SpriteRendererComponent", "MOD.Core.RigidbodyComponent", "MOD.Core.MovementComponent", - "MOD.Core.AIWanderComponent", "MOD.Core.StateComponent", "MOD.Core.HitComponent", "MOD.Core.DamageSkinSpawnerComponent", @@ -57,10 +56,10 @@ }, "Value": { "$type": "MOD.Core.MODQuaternion, MOD.Core", - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 1.0 + "x": 0, + "y": 0, + "z": 0, + "w": 1 } }, { @@ -186,8 +185,8 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { @@ -199,8 +198,8 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { @@ -219,7 +218,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 1.0 + "Value": 0 }, { "TargetType": "MOD.Core.MovementComponent", @@ -228,7 +227,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 0.0 + "Value": 0 }, { "TargetType": "MOD.Core.MovementComponent", @@ -239,24 +238,6 @@ }, "Value": true }, - { - "TargetType": "MOD.Core.AIWanderComponent", - "Name": "IsLegacy", - "ValueType": { - "$type": "MODNativeType", - "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" - }, - "Value": false - }, - { - "TargetType": "MOD.Core.AIWanderComponent", - "Name": "Enable", - "ValueType": { - "$type": "MODNativeType", - "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" - }, - "Value": true - }, { "TargetType": "MOD.Core.StateComponent", "Name": "IsLegacy", @@ -376,8 +357,8 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { @@ -389,8 +370,8 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { @@ -402,8 +383,8 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { @@ -424,8 +405,8 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { @@ -460,4 +441,4 @@ "Children": [] } } -} \ No newline at end of file +} diff --git a/map/map01.map b/map/map01.map index 24be596..ec26d66 100644 --- a/map/map01.map +++ b/map/map01.map @@ -31,15 +31,15 @@ "@components": [ { "@type": "MOD.Core.MapComponent", - "AirAccelerationXFactor": 1.0, - "AirDecelerationXFactor": 1.0, - "FallSpeedMaxXFactor": 1.0, - "FallSpeedMaxYFactor": 1.0, - "Gravity": 1.0, + "AirAccelerationXFactor": 1, + "AirDecelerationXFactor": 1, + "FallSpeedMaxXFactor": 1, + "FallSpeedMaxYFactor": 1, + "Gravity": 1, "IsInstanceMap": false, "TileMapMode": 0, - "WalkAccelerationFactor": 1.0, - "WalkDrag": 1.0, + "WalkAccelerationFactor": 1, + "WalkDrag": 1, "Enable": true }, { @@ -54,9 +54,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -73,8 +73,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -85,9 +85,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -104,8 +104,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -116,9 +116,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -135,8 +135,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -147,9 +147,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -166,8 +166,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -178,9 +178,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -197,8 +197,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -209,9 +209,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -228,8 +228,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -240,9 +240,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -259,8 +259,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -271,9 +271,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -290,8 +290,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -302,9 +302,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -321,8 +321,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -333,9 +333,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -352,8 +352,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -364,9 +364,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -383,8 +383,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -395,9 +395,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -414,8 +414,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -426,9 +426,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -445,8 +445,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -457,9 +457,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -476,8 +476,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -488,9 +488,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -507,8 +507,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -519,9 +519,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -538,8 +538,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -550,9 +550,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -569,8 +569,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -581,9 +581,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -600,8 +600,8 @@ "y": -0.04000002 }, "Variance": { - "x": 1.0, - "y": 0.0 + "x": 1, + "y": 0 } }, { @@ -612,9 +612,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -631,8 +631,8 @@ "y": -0.9 }, "Variance": { - "x": 0.0, - "y": -1.0 + "x": 0, + "y": -1 } }, { @@ -643,9 +643,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -662,8 +662,8 @@ "y": -1.50000012 }, "Variance": { - "x": 0.0, - "y": -1.0 + "x": 0, + "y": -1 } }, { @@ -674,9 +674,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -693,8 +693,8 @@ "y": -2.10000014 }, "Variance": { - "x": 0.0, - "y": -1.0 + "x": 0, + "y": -1 } }, { @@ -705,9 +705,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -724,8 +724,8 @@ "y": -2.7 }, "Variance": { - "x": 0.0, - "y": -1.0 + "x": 0, + "y": -1 } }, { @@ -736,9 +736,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -755,8 +755,8 @@ "y": -3.30000019 }, "Variance": { - "x": 0.0, - "y": -1.0 + "x": 0, + "y": -1 } }, { @@ -767,9 +767,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -786,8 +786,8 @@ "y": -3.9 }, "Variance": { - "x": 0.0, - "y": -1.0 + "x": 0, + "y": -1 } }, { @@ -798,9 +798,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -817,8 +817,8 @@ "y": -4.50000048 }, "Variance": { - "x": 0.0, - "y": -1.0 + "x": 0, + "y": -1 } }, { @@ -829,9 +829,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -848,8 +848,8 @@ "y": -5.10000038 }, "Variance": { - "x": 0.0, - "y": -1.0 + "x": 0, + "y": -1 } }, { @@ -860,9 +860,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -879,8 +879,8 @@ "y": -0.04000002 }, "Variance": { - "x": 0.0, - "y": 1.0 + "x": 0, + "y": 1 } }, { @@ -891,9 +891,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -910,8 +910,8 @@ "y": -0.9000001 }, "Variance": { - "x": 0.0, - "y": 1.0 + "x": 0, + "y": 1 } }, { @@ -922,9 +922,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -941,8 +941,8 @@ "y": -1.50000012 }, "Variance": { - "x": 0.0, - "y": 1.0 + "x": 0, + "y": 1 } }, { @@ -953,9 +953,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -972,8 +972,8 @@ "y": -2.10000014 }, "Variance": { - "x": 0.0, - "y": 1.0 + "x": 0, + "y": 1 } }, { @@ -984,9 +984,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -1003,8 +1003,8 @@ "y": -2.70000029 }, "Variance": { - "x": 0.0, - "y": 1.0 + "x": 0, + "y": 1 } }, { @@ -1015,9 +1015,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -1034,8 +1034,8 @@ "y": -3.30000019 }, "Variance": { - "x": 0.0, - "y": 1.0 + "x": 0, + "y": 1 } }, { @@ -1046,9 +1046,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -1065,8 +1065,8 @@ "y": -3.90000033 }, "Variance": { - "x": 0.0, - "y": 1.0 + "x": 0, + "y": 1 } }, { @@ -1077,9 +1077,9 @@ "layer": 1, "sortingLayerName": "MapLayer0", "attribute": { - "walk": 1.0, - "force": 0.0, - "drag": 1.0, + "walk": 1, + "force": 0, + "drag": 1, "isBlockVertical": false, "isDynamic": false, "isCustomFoothold": false, @@ -1096,8 +1096,8 @@ "y": -4.5 }, "Variance": { - "x": 0.0, - "y": 1.0 + "x": 0, + "y": 1 } } ] @@ -1205,32 +1205,32 @@ "Position": { "x": -0.225, "y": -0.15, - "z": 1000.0 + "z": 1000 }, "QuaternionRotation": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 1.0 + "x": 0, + "y": 0, + "z": 0, + "w": 1 }, "Scale": { - "x": 1.0, - "y": 1.0, - "z": 1.0 + "x": 1, + "y": 1, + "z": 1 }, "Enable": true }, { "@type": "MOD.Core.TileMapComponent", "Color": { - "r": 1.0, - "g": 1.0, - "b": 1.0, - "a": 1.0 + "r": 1, + "g": 1, + "b": 1, + "a": 1 }, - "FootholdDrag": 1.0, - "FootholdForce": 0.0, - "FootholdWalkSpeedFactor": 1.0, + "FootholdDrag": 1, + "FootholdForce": 0, + "FootholdWalkSpeedFactor": 1, "IgnoreMapLayerCheck": false, "IsOddGridPosition": false, "OrderInLayer": 1, @@ -6298,27 +6298,27 @@ { "@type": "MOD.Core.TransformComponent", "Rotation": { - "x": 0.0, - "y": 0.0, - "z": 0.0 + "x": 0, + "y": 0, + "z": 0 }, "Position": { - "x": -5.0, - "y": 0.0, + "x": -5, + "y": 0, "z": 999.999 }, "QuaternionRotation": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 1.0 + "x": 0, + "y": 0, + "z": 0, + "w": 1 }, "Scale": { - "x": 1.0, - "y": 1.0, - "z": 1.0 + "x": 1, + "y": 1, + "z": 1 }, - "ZRotation": 0.0, + "ZRotation": 0, "Enable": true }, { @@ -6330,20 +6330,20 @@ "FlipY": false, "IgnoreMapLayerCheck": false, "OrderInLayer": 0, - "PlayRate": 1.0, + "PlayRate": 1, "RenderSetting": 0, "SortingLayer": "Default", "SpriteRUID": "8ef238e0d0ca4bb783aca526cff35d11", "StartFrameIndex": 0, "TiledSize": { - "x": 1.0, - "y": 1.0 + "x": 1, + "y": 1 }, "Color": { - "r": 1.0, - "g": 1.0, - "b": 1.0, - "a": 1.0 + "r": 1, + "g": 1, + "b": 1, + "a": 1 }, "Enable": true }, @@ -6386,15 +6386,15 @@ "z": 999.999 }, "QuaternionRotation": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 1.0 + "x": 0, + "y": 0, + "z": 0, + "w": 1 }, "Scale": { - "x": 1.0, - "y": 1.0, - "z": 1.0 + "x": -1, + "y": 1, + "z": 1 }, "Enable": true }, @@ -6413,7 +6413,7 @@ "EndFrameIndex": 0, "RenderSetting": 1, "SortingLayer": "MapLayer0", - "SpriteRUID": "6c7130f51a654803a1c39cbe30e2f427", + "SpriteRUID": "4b1d55e35ae9462b944297691025429a", "StartFrameIndex": 0, "Enable": true }, @@ -6452,34 +6452,35 @@ { "@type": "MOD.Core.RigidbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "RealMoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.KinematicbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.SideviewbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6490,12 +6491,12 @@ "@type": "script.MonsterAttack", "Enable": true, "SpriteSize": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "PositionOffset": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } } ], @@ -6505,7 +6506,7 @@ { "id": "03928039-6972-4aec-bb07-64aea430561e", "path": "/maps/map01/MoveMonsterTemplate", - "componentNames": "MOD.Core.TransformComponent,MOD.Core.StateAnimationComponent,MOD.Core.SpriteRendererComponent,MOD.Core.RigidbodyComponent,MOD.Core.MovementComponent,MOD.Core.AIWanderComponent,MOD.Core.StateComponent,MOD.Core.HitComponent,MOD.Core.DamageSkinSpawnerComponent,script.Monster,script.MonsterAttack,MOD.Core.KinematicbodyComponent,MOD.Core.SideviewbodyComponent,MOD.Core.DamageSkinSettingComponent", + "componentNames": "MOD.Core.TransformComponent,MOD.Core.StateAnimationComponent,MOD.Core.SpriteRendererComponent,MOD.Core.RigidbodyComponent,MOD.Core.MovementComponent,MOD.Core.StateComponent,MOD.Core.HitComponent,MOD.Core.DamageSkinSpawnerComponent,script.Monster,script.MonsterAttack,MOD.Core.KinematicbodyComponent,MOD.Core.SideviewbodyComponent,MOD.Core.DamageSkinSettingComponent", "jsonString": { "name": "MoveMonsterTemplate", "path": "/maps/map01/MoveMonsterTemplate", @@ -6533,15 +6534,15 @@ "z": 999.999 }, "QuaternionRotation": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 1.0 + "x": 0, + "y": 0, + "z": 0, + "w": 1 }, "Scale": { - "x": 1.0, - "y": 1.0, - "z": 1.0 + "x": -1, + "y": 1, + "z": 1 }, "Enable": true }, @@ -6572,25 +6573,20 @@ { "@type": "MOD.Core.RigidbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "RealMoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.MovementComponent", - "InputSpeed": 1.0, - "JumpForce": 0.0, - "Enable": true - }, - { - "@type": "MOD.Core.AIWanderComponent", - "IsLegacy": false, - "Enable": true + "InputSpeed": 0, + "JumpForce": 0, + "Enable": false }, { "@type": "MOD.Core.StateComponent", @@ -6604,7 +6600,7 @@ "y": 1.56 }, "ColliderOffset": { - "x": 0.0, + "x": 0, "y": 0.78 }, "IsLegacy": false, @@ -6623,27 +6619,27 @@ "@type": "script.MonsterAttack", "Enable": true, "SpriteSize": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "PositionOffset": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { "@type": "MOD.Core.KinematicbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.SideviewbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, @@ -6661,7 +6657,7 @@ { "id": "595374e9-e49a-4733-b00f-77e8e61dad59", "path": "/maps/map01/ChaseMonsterTemplate", - "componentNames": "MOD.Core.TransformComponent,MOD.Core.StateAnimationComponent,MOD.Core.SpriteRendererComponent,MOD.Core.RigidbodyComponent,MOD.Core.MovementComponent,MOD.Core.AIChaseComponent,MOD.Core.StateComponent,MOD.Core.HitComponent,MOD.Core.DamageSkinSpawnerComponent,script.Monster,script.MonsterAttack,MOD.Core.KinematicbodyComponent,MOD.Core.SideviewbodyComponent,MOD.Core.DamageSkinSettingComponent", + "componentNames": "MOD.Core.TransformComponent,MOD.Core.StateAnimationComponent,MOD.Core.SpriteRendererComponent,MOD.Core.RigidbodyComponent,MOD.Core.MovementComponent,MOD.Core.StateComponent,MOD.Core.HitComponent,MOD.Core.DamageSkinSpawnerComponent,script.Monster,script.MonsterAttack,MOD.Core.KinematicbodyComponent,MOD.Core.SideviewbodyComponent,MOD.Core.DamageSkinSettingComponent", "jsonString": { "name": "ChaseMonsterTemplate", "path": "/maps/map01/ChaseMonsterTemplate", @@ -6689,15 +6685,15 @@ "z": 999.999 }, "QuaternionRotation": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 1.0 + "x": 0, + "y": 0, + "z": 0, + "w": 1 }, "Scale": { - "x": 1.0, - "y": 1.0, - "z": 1.0 + "x": -1, + "y": 1, + "z": 1 }, "Enable": true }, @@ -6725,25 +6721,20 @@ { "@type": "MOD.Core.RigidbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "RealMoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.MovementComponent", - "InputSpeed": 1.5, - "JumpForce": 6.0, - "Enable": true - }, - { - "@type": "MOD.Core.AIChaseComponent", - "IsLegacy": false, - "Enable": true + "InputSpeed": 0, + "JumpForce": 6, + "Enable": false }, { "@type": "MOD.Core.StateComponent", @@ -6776,27 +6767,27 @@ "@type": "script.MonsterAttack", "Enable": true, "SpriteSize": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "PositionOffset": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { "@type": "MOD.Core.KinematicbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.SideviewbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, @@ -6814,7 +6805,7 @@ { "id": "a6d1d4be-0b0a-4581-b2a8-a3cddecb44bd", "path": "/maps/map01/monster-43", - "componentNames": "MOD.Core.TransformComponent,MOD.Core.StateAnimationComponent,MOD.Core.SpriteRendererComponent,MOD.Core.RigidbodyComponent,MOD.Core.MovementComponent,MOD.Core.AIWanderComponent,MOD.Core.StateComponent,MOD.Core.HitComponent,MOD.Core.DamageSkinSpawnerComponent,script.Monster,script.MonsterAttack,MOD.Core.KinematicbodyComponent,MOD.Core.SideviewbodyComponent", + "componentNames": "MOD.Core.TransformComponent,MOD.Core.StateAnimationComponent,MOD.Core.SpriteRendererComponent,MOD.Core.RigidbodyComponent,MOD.Core.MovementComponent,MOD.Core.StateComponent,MOD.Core.HitComponent,MOD.Core.DamageSkinSpawnerComponent,script.Monster,script.MonsterAttack,MOD.Core.KinematicbodyComponent,MOD.Core.SideviewbodyComponent", "jsonString": { "name": "monster-43", "path": "/maps/map01/monster-43", @@ -6842,10 +6833,10 @@ "z": 999.999 }, "QuaternionRotation": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 1.0 + "x": 0, + "y": 0, + "z": 0, + "w": 1 }, "Enable": true }, @@ -6872,32 +6863,27 @@ "EndFrameIndex": 0, "RenderSetting": 1, "SortingLayer": "MapLayer0", - "SpriteRUID": "c96c11f9a3f845a4b6a27d9ca10ab103", + "SpriteRUID": "3eb72eab0a394c78b13e88c8dc4a5ed0", "StartFrameIndex": 0, "Enable": true }, { "@type": "MOD.Core.RigidbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "RealMoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.MovementComponent", - "InputSpeed": 1.0, - "JumpForce": 0.0, - "Enable": true - }, - { - "@type": "MOD.Core.AIWanderComponent", - "IsLegacy": false, - "Enable": true + "InputSpeed": 0, + "JumpForce": 0, + "Enable": false }, { "@type": "MOD.Core.StateComponent", @@ -6930,27 +6916,27 @@ "@type": "script.MonsterAttack", "Enable": true, "SpriteSize": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "PositionOffset": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { "@type": "MOD.Core.KinematicbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true }, { "@type": "MOD.Core.SideviewbodyComponent", "MoveVelocity": { - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 }, "Enable": true } @@ -6960,4 +6946,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map02.map b/map/map02.map index a8a3fb4..063739d 100644 --- a/map/map02.map +++ b/map/map02.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map03.map b/map/map03.map index ada7a0c..4c57001 100644 --- a/map/map03.map +++ b/map/map03.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map04.map b/map/map04.map index 99fc421..1242d53 100644 --- a/map/map04.map +++ b/map/map04.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map05.map b/map/map05.map index 75e8bda..7068536 100644 --- a/map/map05.map +++ b/map/map05.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map06.map b/map/map06.map index 16980c3..1edc0e9 100644 --- a/map/map06.map +++ b/map/map06.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map07.map b/map/map07.map index 0617e92..0ee83d2 100644 --- a/map/map07.map +++ b/map/map07.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map08.map b/map/map08.map index c5a6622..311538f 100644 --- a/map/map08.map +++ b/map/map08.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map09.map b/map/map09.map index 10505a8..652c2cd 100644 --- a/map/map09.map +++ b/map/map09.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map10.map b/map/map10.map index 60449d6..6a8aa5a 100644 --- a/map/map10.map +++ b/map/map10.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/map/map11.map b/map/map11.map index f356525..f66c3b5 100644 --- a/map/map11.map +++ b/map/map11.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6479,7 +6479,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6539,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": 1, + "x": -1, "y": 1, "z": 1 }, @@ -6626,7 +6627,8 @@ }, { "@type": "MOD.Core.MovementComponent", - "Enable": true + "Enable": false, + "InputSpeed": 0 }, { "@type": "script.Monster", @@ -6651,4 +6653,4 @@ } ] } -} \ No newline at end of file +} diff --git a/tools/freeze-turn-monsters.mjs b/tools/freeze-turn-monsters.mjs new file mode 100644 index 0000000..579dd74 --- /dev/null +++ b/tools/freeze-turn-monsters.mjs @@ -0,0 +1,83 @@ +import { readFileSync, writeFileSync } from 'node:fs'; + +const AI_COMPONENTS = new Set([ + 'MOD.Core.AIWanderComponent', + 'MOD.Core.AIChaseComponent', +]); + +const mapFiles = Array.from({ length: 11 }, (_, i) => `map/map${String(i + 1).padStart(2, '0')}.map`); +const modelFiles = [ + 'Global/MoveMonster.model', + 'Global/ChaseMonster.model', + 'RootDesk/MyDesk/Model_monster-43.model', +]; + +function isMonster(entity) { + return (entity.componentNames || '').includes('script.Monster'); +} + +function component(entity, type) { + return entity.jsonString['@components'].find((c) => c['@type'] === type); +} + +function patchMonsterEntity(entity) { + const components = entity.jsonString['@components']; + entity.jsonString['@components'] = components.filter((c) => !AI_COMPONENTS.has(c['@type'])); + entity.componentNames = entity.jsonString['@components'].map((c) => c['@type']).join(','); + + const movement = component(entity, 'MOD.Core.MovementComponent'); + if (movement) { + movement.Enable = false; + movement.InputSpeed = 0; + } + + const rigidbody = component(entity, 'MOD.Core.RigidbodyComponent'); + if (rigidbody) { + rigidbody.MoveVelocity = { x: 0, y: 0 }; + rigidbody.RealMoveVelocity = { x: 0, y: 0 }; + } + + const transform = component(entity, 'MOD.Core.TransformComponent'); + if (transform?.Scale) { + transform.Scale.x = -Math.abs(transform.Scale.x || 1); + transform.Scale.y = Math.abs(transform.Scale.y || 1); + } + + const stateAnimation = component(entity, 'MOD.Core.StateAnimationComponent'); + const renderer = component(entity, 'MOD.Core.SpriteRendererComponent'); + const stand = stateAnimation?.ActionSheet?.stand; + if (renderer && stand) { + renderer.SpriteRUID = stand; + } +} + +function patchMap(file) { + const data = JSON.parse(readFileSync(file, 'utf8')); + for (const entity of data.ContentProto.Entities.filter(isMonster)) { + patchMonsterEntity(entity); + } + writeFileSync(file, `${JSON.stringify(data, null, 2)}\n`, 'utf8'); +} + +function patchModel(file) { + const data = JSON.parse(readFileSync(file, 'utf8')); + const json = data.ContentProto.Json; + json.Components = (json.Components || []).filter((name) => !AI_COMPONENTS.has(name)); + json.Values = (json.Values || []).filter((value) => !AI_COMPONENTS.has(value.TargetType)); + for (const value of json.Values) { + if (value.TargetType === 'MOD.Core.MovementComponent' && value.Name === 'InputSpeed') { + value.Value = 0; + } + } + writeFileSync(file, `${JSON.stringify(data, null, 2)}\n`, 'utf8'); +} + +for (const file of mapFiles) { + patchMap(file); +} + +for (const file of modelFiles) { + patchModel(file); +} + +console.log('Turn-combat monster movement disabled.'); -- 2.49.1 From 27818e92c7852487f12863e563862019f4eedeb8 Mon Sep 17 00:00:00 2001 From: maple Date: Mon, 8 Jun 2026 00:01:46 +0900 Subject: [PATCH 6/6] Fix turn combat facing and player movement --- Global/DefaultPlayer.model | 28 ++++++------- RootDesk/MyDesk/SlayDeckController.codeblock | 19 ++++++++- map/map01.map | 6 +-- map/map02.map | 4 +- map/map03.map | 4 +- map/map04.map | 4 +- map/map05.map | 4 +- map/map06.map | 4 +- map/map07.map | 4 +- map/map08.map | 4 +- map/map09.map | 4 +- map/map10.map | 4 +- map/map11.map | 4 +- tools/freeze-turn-monsters.mjs | 2 +- tools/freeze-turn-player.mjs | 20 ++++++++++ tools/gen-slaydeck.mjs | 42 +++++++++++++++++++- 16 files changed, 116 insertions(+), 41 deletions(-) create mode 100644 tools/freeze-turn-player.mjs diff --git a/Global/DefaultPlayer.model b/Global/DefaultPlayer.model index f12238e..b41b6e8 100644 --- a/Global/DefaultPlayer.model +++ b/Global/DefaultPlayer.model @@ -30,7 +30,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 1.0 + "Value": 0 }, { "TargetType": null, @@ -39,7 +39,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 1.0 + "Value": 0 }, { "TargetType": null, @@ -48,7 +48,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 1.0 + "Value": 0 }, { "TargetType": null, @@ -57,7 +57,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 1.0 + "Value": 1 }, { "TargetType": null, @@ -118,7 +118,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 0.0 + "Value": 0 }, { "TargetType": null, @@ -129,8 +129,8 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, - "y": 0.0 + "x": 0, + "y": 0 } }, { @@ -185,7 +185,7 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, + "x": 0, "y": 0.35 } }, @@ -198,7 +198,7 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, + "x": 0, "y": 0.35 } }, @@ -218,7 +218,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 500.0 + "Value": 500 }, { "TargetType": "script.PlayerHit", @@ -254,7 +254,7 @@ }, "Value": { "$type": "MOD.Core.MODVector2, MOD.Core", - "x": 0.0, + "x": 0, "y": 0.35 } }, @@ -265,7 +265,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 1.0 + "Value": 0 }, { "TargetType": "MOD.Core.MovementComponent", @@ -274,7 +274,7 @@ "$type": "MODNativeType", "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }, - "Value": 1.0 + "Value": 0 }, { "TargetType": "MOD.Core.PlayerComponent", @@ -302,4 +302,4 @@ "Children": [] } } -} \ No newline at end of file +} diff --git a/RootDesk/MyDesk/SlayDeckController.codeblock b/RootDesk/MyDesk/SlayDeckController.codeblock index 93e44ed..62a893d 100644 --- a/RootDesk/MyDesk/SlayDeckController.codeblock +++ b/RootDesk/MyDesk/SlayDeckController.codeblock @@ -148,7 +148,7 @@ "Name": null }, "Arguments": [], - "Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\nself:ConfigureTurnBasedMonsters()\nself:StartCombat()", + "Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\nself:ConfigureTurnBasedMonsters()\nself:ConfigureTurnBasedPlayer()\nself:StartCombat()", "Scope": 2, "ExecSpace": 6, "Attributes": [], @@ -201,12 +201,27 @@ "Name": "monster" } ], - "Code": "if monster == nil then\n\treturn\nend\nif monster.AIWanderComponent ~= nil then\n\tmonster.AIWanderComponent.Enable = false\nend\nif monster.AIChaseComponent ~= nil then\n\tmonster.AIChaseComponent.Enable = false\nend\nif monster.MovementComponent ~= nil then\n\tmonster.MovementComponent.Enable = false\nend\nif monster.RigidbodyComponent ~= nil then\n\tmonster.RigidbodyComponent.MoveVelocity = Vector2.zero\n\tmonster.RigidbodyComponent.RealMoveVelocity = Vector2.zero\nend\nif monster.TransformComponent ~= nil then\n\tlocal scale = monster.TransformComponent.Scale\n\tmonster.TransformComponent.Scale = Vector3(-math.abs(scale.x), math.abs(scale.y), scale.z)\nend\nif monster.StateAnimationComponent ~= nil and monster.SpriteRendererComponent ~= nil then\n\tlocal stand = monster.StateAnimationComponent.ActionSheet[\"stand\"]\n\tif stand ~= nil and stand ~= \"\" then\n\t\tmonster.SpriteRendererComponent.SpriteRUID = stand\n\tend\nend", + "Code": "if monster == nil then\n\treturn\nend\nif monster.AIWanderComponent ~= nil then\n\tmonster.AIWanderComponent.Enable = false\nend\nif monster.AIChaseComponent ~= nil then\n\tmonster.AIChaseComponent.Enable = false\nend\nif monster.MovementComponent ~= nil then\n\tmonster.MovementComponent.Enable = false\nend\nif monster.RigidbodyComponent ~= nil then\n\tmonster.RigidbodyComponent.MoveVelocity = Vector2.zero\n\tmonster.RigidbodyComponent.RealMoveVelocity = Vector2.zero\nend\nif monster.TransformComponent ~= nil then\n\tlocal scale = monster.TransformComponent.Scale\n\tmonster.TransformComponent.Scale = Vector3(math.abs(scale.x), math.abs(scale.y), scale.z)\nend\nif monster.StateAnimationComponent ~= nil and monster.SpriteRendererComponent ~= nil then\n\tlocal stand = monster.StateAnimationComponent.ActionSheet[\"stand\"]\n\tif stand ~= nil and stand ~= \"\" then\n\t\tmonster.SpriteRendererComponent.SpriteRUID = stand\n\tend\nend", "Scope": 2, "ExecSpace": 6, "Attributes": [], "Name": "ConfigureMonsterForTurnCombat" }, + { + "Return": { + "Type": "void", + "DefaultValue": null, + "SyncDirection": 0, + "Attributes": [], + "Name": null + }, + "Arguments": [], + "Code": "local player = nil\npcall(function()\n\tif _UserService ~= nil and _UserService.LocalPlayer ~= nil then\n\t\tplayer = _UserService.LocalPlayer\n\tend\nend)\npcall(function()\n\tif player == nil and _UserService ~= nil and _UserService.LocalPlayerEntity ~= nil then\n\t\tplayer = _UserService.LocalPlayerEntity\n\tend\nend)\npcall(function()\n\tif player == nil and _UserService ~= nil and _UserService.GetLocalPlayer ~= nil then\n\t\tplayer = _UserService:GetLocalPlayer()\n\tend\nend)\nif player ~= nil and player.Entity ~= nil then\n\tplayer = player.Entity\nend\nif player == nil then\n\treturn\nend\nif player.PlayerControllerComponent ~= nil then\n\tplayer.PlayerControllerComponent.Enable = false\n\tpcall(function() player.PlayerControllerComponent.LookDirectionX = 1 end)\nend\nif player.MovementComponent ~= nil then\n\tplayer.MovementComponent.Enable = false\n\tpcall(function() player.MovementComponent.InputSpeed = 0 end)\n\tpcall(function() player.MovementComponent.JumpForce = 0 end)\nend\nif player.RigidbodyComponent ~= nil then\n\tplayer.RigidbodyComponent.MoveVelocity = Vector2.zero\n\tplayer.RigidbodyComponent.RealMoveVelocity = Vector2.zero\nend\nif player.TransformComponent ~= nil then\n\tlocal scale = player.TransformComponent.Scale\n\tplayer.TransformComponent.Scale = Vector3(math.abs(scale.x), math.abs(scale.y), scale.z)\nend", + "Scope": 2, + "ExecSpace": 6, + "Attributes": [], + "Name": "ConfigureTurnBasedPlayer" + }, { "Return": { "Type": "void", diff --git a/map/map01.map b/map/map01.map index ec26d66..e5fa7af 100644 --- a/map/map01.map +++ b/map/map01.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6691,7 +6691,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map02.map b/map/map02.map index 063739d..c7e29d4 100644 --- a/map/map02.map +++ b/map/map02.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map03.map b/map/map03.map index 4c57001..85879b5 100644 --- a/map/map03.map +++ b/map/map03.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map04.map b/map/map04.map index 1242d53..8ac5533 100644 --- a/map/map04.map +++ b/map/map04.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map05.map b/map/map05.map index 7068536..6cc6324 100644 --- a/map/map05.map +++ b/map/map05.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map06.map b/map/map06.map index 1edc0e9..133d7c2 100644 --- a/map/map06.map +++ b/map/map06.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map07.map b/map/map07.map index 0ee83d2..a0eca09 100644 --- a/map/map07.map +++ b/map/map07.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map08.map b/map/map08.map index 311538f..ae92401 100644 --- a/map/map08.map +++ b/map/map08.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map09.map b/map/map09.map index 652c2cd..4cb304f 100644 --- a/map/map09.map +++ b/map/map09.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map10.map b/map/map10.map index 6a8aa5a..3e3f03c 100644 --- a/map/map10.map +++ b/map/map10.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/map/map11.map b/map/map11.map index f66c3b5..c2099d6 100644 --- a/map/map11.map +++ b/map/map11.map @@ -6392,7 +6392,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, @@ -6540,7 +6540,7 @@ "w": 1 }, "Scale": { - "x": -1, + "x": 1, "y": 1, "z": 1 }, diff --git a/tools/freeze-turn-monsters.mjs b/tools/freeze-turn-monsters.mjs index 579dd74..fb2d7a0 100644 --- a/tools/freeze-turn-monsters.mjs +++ b/tools/freeze-turn-monsters.mjs @@ -39,7 +39,7 @@ function patchMonsterEntity(entity) { const transform = component(entity, 'MOD.Core.TransformComponent'); if (transform?.Scale) { - transform.Scale.x = -Math.abs(transform.Scale.x || 1); + transform.Scale.x = Math.abs(transform.Scale.x || 1); transform.Scale.y = Math.abs(transform.Scale.y || 1); } diff --git a/tools/freeze-turn-player.mjs b/tools/freeze-turn-player.mjs new file mode 100644 index 0000000..e3cd08a --- /dev/null +++ b/tools/freeze-turn-player.mjs @@ -0,0 +1,20 @@ +import { readFileSync, writeFileSync } from 'node:fs'; + +const file = 'Global/DefaultPlayer.model'; +const data = JSON.parse(readFileSync(file, 'utf8')); +const values = data.ContentProto.Json.Values || []; + +for (const value of values) { + if (value.TargetType === null && ['speed', 'jumpForce', 'walkAcceleration'].includes(value.Name)) { + value.Value = 0; + } + if (value.TargetType === 'MOD.Core.MovementComponent' && ['InputSpeed', 'JumpForce'].includes(value.Name)) { + value.Value = 0; + } + if (value.TargetType === 'MOD.Core.RigidbodyComponent' && ['MoveVelocity', 'RealMoveVelocity'].includes(value.Name)) { + value.Value = { x: 0, y: 0 }; + } +} + +writeFileSync(file, `${JSON.stringify(data, null, 2)}\n`, 'utf8'); +console.log('Turn-combat player movement disabled.'); diff --git a/tools/gen-slaydeck.mjs b/tools/gen-slaydeck.mjs index 8ee9137..d42de05 100644 --- a/tools/gen-slaydeck.mjs +++ b/tools/gen-slaydeck.mjs @@ -468,6 +468,7 @@ self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, self.StartNewG self:SetEntityEnabled("/ui/DefaultGroup/CardHand", true) self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", true) self:ConfigureTurnBasedMonsters() +self:ConfigureTurnBasedPlayer() self:StartCombat()`), method('StartCombat', `self.MaxEnergy = 3 self.Turn = 0 @@ -505,7 +506,7 @@ if monster.RigidbodyComponent ~= nil then end if monster.TransformComponent ~= nil then \tlocal scale = monster.TransformComponent.Scale -\tmonster.TransformComponent.Scale = Vector3(-math.abs(scale.x), math.abs(scale.y), scale.z) +\tmonster.TransformComponent.Scale = Vector3(math.abs(scale.x), math.abs(scale.y), scale.z) end if monster.StateAnimationComponent ~= nil and monster.SpriteRendererComponent ~= nil then \tlocal stand = monster.StateAnimationComponent.ActionSheet["stand"] @@ -513,6 +514,45 @@ if monster.StateAnimationComponent ~= nil and monster.SpriteRendererComponent ~= \t\tmonster.SpriteRendererComponent.SpriteRUID = stand \tend end`, [{ Type: 'Entity', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'monster' }]), + method('ConfigureTurnBasedPlayer', `local player = nil +pcall(function() +\tif _UserService ~= nil and _UserService.LocalPlayer ~= nil then +\t\tplayer = _UserService.LocalPlayer +\tend +end) +pcall(function() +\tif player == nil and _UserService ~= nil and _UserService.LocalPlayerEntity ~= nil then +\t\tplayer = _UserService.LocalPlayerEntity +\tend +end) +pcall(function() +\tif player == nil and _UserService ~= nil and _UserService.GetLocalPlayer ~= nil then +\t\tplayer = _UserService:GetLocalPlayer() +\tend +end) +if player ~= nil and player.Entity ~= nil then +\tplayer = player.Entity +end +if player == nil then +\treturn +end +if player.PlayerControllerComponent ~= nil then +\tplayer.PlayerControllerComponent.Enable = false +\tpcall(function() player.PlayerControllerComponent.LookDirectionX = 1 end) +end +if player.MovementComponent ~= nil then +\tplayer.MovementComponent.Enable = false +\tpcall(function() player.MovementComponent.InputSpeed = 0 end) +\tpcall(function() player.MovementComponent.JumpForce = 0 end) +end +if player.RigidbodyComponent ~= nil then +\tplayer.RigidbodyComponent.MoveVelocity = Vector2.zero +\tplayer.RigidbodyComponent.RealMoveVelocity = Vector2.zero +end +if player.TransformComponent ~= nil then +\tlocal scale = player.TransformComponent.Scale +\tplayer.TransformComponent.Scale = Vector3(math.abs(scale.x), math.abs(scale.y), scale.z) +end`), method('Shuffle', `if list == nil then \treturn end -- 2.49.1