C .
ODE
G
AMELET
# MidiLib A simplified library to easily play midi music. ## Getting Started Minimum codes to get a midi to play. ```typescript async function examples() { // load the midi resource let player = await loadAndCreateMidiInstrumentPlayer("MidiLib.testmidi"); player.play(); } ``` Also support playSound() in Base library. ```typescript CG.Base.resourceManager.playSound("MidiLib.testmidi"); ``` Codes to get full control. ```typescript async function examples() { // load the midi resource await resourceManager.addAppResource("MidiLib.testmidi").load(); // create the player let player = createMidiInstrumentPlayer("MidiLib.testmidi"); // preload instruments, you can specify the default instrument // find the full list of instrument names in `instruments.ts` await player.preload({ defaultInstrument: "acoustic_grand_piano" }); // play the music player.play({ loop: true, startTick: 0, loopStartTick: 0, gain: 2, // volume tempoScale: 1.5, // tempo }); // control the music player.stop(); player.pause(); player.resume(); } ``` ## Player Events Player emits events for advanced controlling ### Track Events This event emits when a midi note is time to be played (or other meta data is dispatched.) ```typescript function catchTrackEvents(player: InstrumentPlayer) { player.on(MidiTrackEvent.TYPE, (event: MidiTrackEvent) => { let trackEvent = event.trackEvent; if(trackEvent.name == NoteOnEvent.NAME) { // check events/TrackEvent.ts for all TrackEvent names ... } }) } ``` ### EndOfFileEvent This event emits when the play head running to the end of all tracks. ```typescript function catchEndOfFileEvent(player: InstrumentPlayer) { player.on(EndOfFileEvent.TYPE, (event: EndOfFileEvent) => { ... }) } ``` ### ControlEvents This event emits when the player is being controled by calling control functions ```typescript function catchControlEvents(player: InstrumentPlayer) { // play() player.on(ControlEvent.TYPES.PLAY, (event: ControlEvent) => { // this happens when preloading completes after play() is called }) // stop() player.on(ControlEvent.TYPES.STOP, (event: ControlEvent) => { ... }) // pause() player.on(ControlEvent.TYPES.PAUSE, (event: ControlEvent) => { ... }) // resume() player.on(ControlEvent.TYPES.RESUME, (event: ControlEvent) => { ... }) } ```
# Base2 重新架構的Base2,相比Base少了很多功能,包括Pixi/Sound/ResourceManager/Physics/geoms都被拿掉,只留最主要的CG功能。 ## 基本功能 1. 取得專案的資料 ```typescript // 取得專案代碼 CG.Base2.projectCode; // 取得資源 CG.Base2.getAppResource(resourceAlias: string) // 取得資源網址 CG.Base2.getAppResourceFileUrl(resourceAlias: string, filename?: string) ``` ## 更新循環 Base2內建了一個更新循環系統。 ```typescript // 先定義一個每幀都要更新的函式 function updateFunc(dt: number) { } // 將函式加入更新循環系統 CG.Base2.addUpdateFunction(updateFunc); // 將函式移出更新循環系統 CG.Base2.removeUpdateFunction(updateFunc); ``` 另外也提供子更新循環系統可使用。 ```typescript import Updater = CG.Base2.utils.Updater; // 先定義一個每幀都要更新的函式 function updateFunc(dt: number) { } // 建立子更新循環系統 let updater = new Updater(); // 將函式加入更新循環系統 updater.addDelayFunction(updateFunc); // 可暫停 updater.pause(); // 可繼續 updater.resume(); ``` ## 鍵盤管理員 Base2提供了一個基本的鍵盤管理員,可以在按鍵被按下去(DOWN)、提起來(UP)、先按再提(PRESSED)的時候觸發事件。 ```typescript // 取得鍵盤管理員 import Keyboard = CG.Base.keyboards.Keyboard; import keyboard = CG.Base2.keyboard; import Key = CG.Base2.keyboards.Key; // 鍵盤事件 keyboard.on(Keyboard.EVENT.DOWN, (event: KeyboardEvent) => { if (Key.SPACE.matchEvent(event)) { // 當空白鍵被按下去的時候... } }) // 檢查目前按鍵狀態 if (keyboard.isDown(Key.SPACE)) { // 目前空白鍵是正在按下去的狀態 } ``` ## 補間變化 Base2內建了[tweenjs](https://github.com/tweenjs/tween.js)用來將某個物件的屬性,在一段時間內作動態的變化。 ```typescript async function makeAnimation() { // 建立一隻有x,y資料的動物 let animal = { x: 100, y: 100, }; // 建立補間變化,在1秒內讓動物的x和y變化到指定的值 let tween = new TWEEN.Tween(animal); tween.to( { x: 300, y: 200, }, 1000 // 毫秒 ); tween.start(); // 等待變化完畢 await CG.Base2.waitTween(tween); console.log(animal.x); // 這時會印出 300 } ``` ## JSZip Base2內建[JSZip](https://stuk.github.io/jszip/)。 ```typescript async function loadZip() { let zip = new JSZip(); await zip.loadAsync(buffer); for(let filename in zip.files) { ... } } ```
# 更好的光暈戰記事件表擴充模組(TWEventsBetterExp) 本模組延續 [**TwilightWarsEventsExp**](https://code.gamelet.com/edit/TwilightWarsEventsExp)(以下簡稱 EXP)的概念所設計,並基於 [**TwilightWarsEvents**](https://code.gamelet.com/edit/TwilightWarsEvents) 建立,用於擴充 [**光暈戰記**](https://twilightwars.gamelet.online/) 事件表功能的模組。 由於 **EXP** 過於混雜,為優化模組架構與性能,將逐步進行程式碼重構,剔除許多不必要,或與 **TwilightWarsEvents** 重疊的功能,保留真正需要的功能。 程式碼搬遷將會是一個持續性的工程,如果你有建議可以優先搬遷的功能,歡迎直接告訴我。 本模組的所有功能都放在 **光暈戰記 (BetterExp)** 目錄底下,且所有功能皆有 (BetterExp) 後綴。 ## 注意事項 即使是作用相同的功能,由於程式碼重構的關係,使用上 **EXP** 還是會和本模組有所差異,沒辦法直接將資料無痛轉移,因此你應該將其視為兩個不同的模組。 如果你是曾使用過 **EXP** 的開發者,如今想要開發新的專案,會建議不要安裝 **EXP** 而改安裝此模組。 ## 玩家社群 ### Discord - [**嘎姆討論區**](https://discord.gg/hZKQzRfPJM):於 2021/05/08 創立的非官方社群,主要用於討論嘎姆擂台的相關資訊。 ## 作者 **酷可**:[**Code.Gamelet**](/profile/114899766849308759711@google)、[**Gamelet.Online**](https://gamelet.online/user/114899766849308759711@google/board)、[**Youtube**](https://www.youtube.com/@cook1470)
# GLT One Paragraph of the game description goes here ## Getting Started ### Auth (Login) ```typescript // All action must wait until auth system is ready. CG.GLT.auth.onReady(user => { if(user.isLocalGuest()) { // not login yet } else { // logged in user } }); // auth event listener, triggered when auth user changed let authListener = CG.GLT.auth.onAuth(user => { if(user.isLocalGuest()) { // logged out } else { // logged in user } }); // auth event listener, triggered when validating a new auth action // a following onAuth event is expected. this.validatingListener = onAuthValidating(() => { // show loading animation }); ``` ### API The CG.GLT.api is responsible to communicate with glt.gamelet.online. CG.GLT.commands includes all comments to query/submit data from glt.gamelet.online. The commands has a function submit() that uses CG.GLT.api.submitCommand(), so most of the time, you don't need to call the api to submit. ```typescript CG.GLT.commands.scoreService.submitScore( 'challenge', // the name of the score to submit 10, // the score SubmitType.KEEP_HIGHEST, // submit only when the new score is greater than the one on server TimeRange.ALL // submit to all time-ranges (history and weekly) ) .submit(); // to receive the weekly high score list CG.GLT.commands.scoreService.listScores( 'challenge', // the name of the scores to get TimeRange.WEEKLY, // in which time range OrderType.HIGH_TO_LOW, // how to order the scores CG.GLT.api.lastUpdatedServerTimestamp, // tell the server which week to see 0, // start index 10, // how many to get (list: UserScoreList) => { // do something with the scorelist }, (error) => { // deal with error } ) ``` ## Authors **[Haskasu](/profile/113321052805704333314@google)**
# TwilightWarsLib A Top-down view shooting game framework. ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. To start a .event ```typescript CG.TwilightWarsLib.initialize() .then(() => { CG.TwilightWarsLib.events.startEvents('test/test.events', 'arena'); }) ``` To manually setup the game: ```typescript CG.TwilightWarsLib.initialize() .then(() => let mapSource = 'test/test.twmap'; CG.Base.resourceManager.addAppSource(mapSource); CG.Base.resourceManager.load(() => { let mapResource = new CG.TWMap.resources.MapResource(); mapResource.importBase64(CG.Base.resourceManager.getText(mapSource)); mapResource.loadTextures(() => { CG.Base.pixi.initialize(600, 500); let game = new CG.TwilightWarsLib.games.Game(); CG.Base.pixi.root.addChild(game); game.initResources(mapResource); game.start(); console.log('tw game created'); let me = new CG.TwilightWarsLib.games.actors.Actor(game, 'me'); game.addActor(me, new MyActorController(me), 32, 100, 0, null); game.gameCamera.setFocus(me); game.interface.setMe(me); let ai = new CG.TwilightWarsLib.games.actors.Actor(game, 'ai'); ai.camp = CG.TwilightWarsLib.games.datas.Camp.CAMP2; ai.actorClip.headClip.clip.gotoAndStop(5); game.addActor(ai, new CG.TwilightWarsLib.games.actors.controllers.AIController(ai), 160, 300, 0, null); game.createStuff(null, 64 + 16, 128 + 16, CG.TwilightWarsLib.games.items.StuffInfo.getByCode('sword'), game.stuffManager.useNextStuffId(), true); }); }); }) ``` ## Versioning We use [SemVer](http://semver.org/) for versioning. ## Authors * **[Haskasu](/profile/Haskasu)** ## Acknowledgments * Hat tip to anyone who's code was used * Inspiration * etc
# TwilightWarsEventsEnhFF 本專案為 **TwilightWarsEventsEnh** 模組的 **beta版本** ,「FF」是「Fast Forward」的縮寫,代表快速開發。 因為原模組的開發緩慢,所以會逐漸把原模組的功能移植至本專案完善。 ## 前言 本專案主要由 **[雪姬](/profile/setsuki)** 維護。 歡迎加入 **[Discord群組](https://discord.gg/seJwuzCbWq)** 。 ## 使用須知 ***本專案開源,若有不明之處可查看 [test](cg://source/test/README.md)*** 本專案的主要目的是要讓事件表編輯如同寫程式一般。 不只專注於 **效能** ,會更著重在提供更大的 **彈性** 。 另外,本專案不會立即修復不嚴重的錯誤。 當測試穩定後,未來會將事件表功能從本專案移植回原模組,屆時該功能可能會在一段時間後,於本模組移除。 Enh的測試、回報需要你的參與,歡迎加入 **[Discord群組](https://discord.gg/seJwuzCbWq)** 。 ## 作者 **[EnhProject](/profile/EnhProject)** - **[不會取名字](/profile/buhuechuminzu)** - **[雪姬](/profile/setsuki)** --- # TwilightWarsEventsEnhFF "FF" stands for "Fast Forward", and can be considered as **beta version** of original **TWEventsEnh**. Due to slow updates of the original Enh, the functionality from mainline Enh would be porting and refined here. ## Additional This project is mainly maintained by [雪姬](/profile/setsuki). The **[Enh Discord server](https://discord.gg/seJwuzCbWq)** is also welcoming participants! ## Important ***It is recommanded to read source code and [test](cg://source/test/README.md) of this project!*** The main concept is to make events work as code. Not just focused on **performance**, but also provide more **flexibility**. This project will not repair bugs instantly unless they are critical. If there are any bugs, they will be fixed before integrated into the main Enh. Enh needs your participate for testing, asking questions or reporting bugs! Features merged into the mainline Enh will be removed here. ## Authors **[EnhProject](/profile/EnhProject)** - **[不會取名字](/profile/buhuechuminzu)** - **[雪姬](/profile/setsuki)**
# 更好的 CG 事件表通用擴充模組(CgEventsBetterExp) 本模組延續 [**CgEventsExp**](https://code.gamelet.com/edit/CgEventsExp)(以下簡稱 EXP)的概念所設計,用於擴充 CG 事件表的**通用**功能——只依賴事件表引擎與 `CG.Base`,與特定遊戲、特定函式庫(如光暈戰記)皆無關,任何 CG 專案都能安裝使用。 由於 **EXP** 過於混雜,為優化模組架構與性能,將逐步進行程式碼重構,剔除許多不必要、或與平台官方功能重疊的功能,保留真正需要的功能。 程式碼搬遷將會是一個持續性的工程,如果你有建議可以優先搬遷的功能,歡迎直接告訴我。 本模組的所有功能都放在 **通用 (BetterExp)** 目錄底下,且所有功能皆有 (BetterExp) 後綴。 > 光暈戰記相依的事件表擴充,請改用 **TWEventsBetterExp**;本模組專注於純通用功能。 ## 注意事項 即使是作用相同的功能,由於程式碼重構的關係,使用上 **EXP** 還是會和本模組有所差異,沒辦法直接將資料無痛轉移,因此你應該將其視為兩個不同的模組。 如果你是曾使用過 **EXP** 的開發者,如今想要開發新的專案,會建議不要安裝 **EXP** 而改安裝此模組。 ## 作者 **酷可**:[**Code.Gamelet**](/profile/114899766849308759711@google)、[**Gamelet.Online**](https://gamelet.online/user/114899766849308759711@google/board)、[**Youtube**](https://www.youtube.com/@cook1470)
# TwilightWarsEventsExp <h2><font color=red> 本模組由於過於雜亂,為了提高可維護性,以及進行效能優化,將開始進行程式碼的重構計畫。 如有需要請改用 [TWEventsBetterExp](https://code.gamelet.com/edit/TWEventsBetterExp) 模組,近期會開始慢慢將本模組的部分功能搬遷過去。 未來本模組將不再添加新功能,僅進行維護,如非必要請勿加載此模組。 </font></h2> 本專案為光暈戰記的擴充模組,主要是建立在 **[TwilightWarsLib](/edit/TwilightWarsLib)** 的基礎之上,添加一些小東西。本專案並不包含 **[TwilightWarsEvents](/edit/TwilightWarsEvents)** 模組。 本模組並不會覆蓋原有的動作、檢查,所有本模組新增的檢查、動作等,都會被整合在**光暈戰記 / 擴充包**內,且不會新增任何跟光暈無關的檢查或動作,希望是一個純淨的光暈模組,跟光暈無關的相關事件,有需要的話會在 **[CgEventsExp](/edit/CgEventsExp)** 做更新。 本專案開放查詢原始碼,所有的檢查、動作,皆有在本專案的 **Test** 資料夾內做實際範例,歡迎自行查看使用方法,也歡迎自行進入程式區內,看各個檢查、動作是如何完成。 本人希望弄一個可以讓大家互相交流、維護,甚至更新的這麼一個光暈同人模組,我覺得這樣共同成長,才會讓嘎母變得更成熟,所以如果你有什麼好想法,也都歡迎提供給我。 另外個人創了一個第三方的 **[嘎母討論區(Discord)](https://discord.gg/hZKQzRfPJM)** ,主要是希望大家有一個好的交流平台,可以一起討論一些設計,除了光暈,還有其他非光暈的專案等等,甚至是能夠一起合作,讓作者們有機會推出更多優質的作品。 有任何 BUG 的話都歡迎回報,會盡量在最短的時間內處裡掉。 **[Google 試算表 - 光暈戰記](https://docs.google.com/spreadsheets/d/1kRPdI6caisjZuHJGmCjB3kHBveR2RVAeTJoyCmqOZVs/edit?usp=sharing)** 本專案有些需要查詢的地方,例如武器道具的索引值等等,可以由此試算表查詢。 ## 其他工具 - [ImageIndex 查詢器](https://paint.gamelet.online/?version=0.0.27) ## 作者 **[cook1470](/profile/cook1470)**
# CgEventsLib The engine of CgEvents. CgEvents is a great way to build your own games with with a CG.built-in editor. ## Live Demo <a href="cg://source/test/physics.events" class="mat-raised-button mat-primary">Open Demo Events Sheet</a> ## Concept The engine takes a *.events file to run. The .events file is an encoded json which contains a config field and a events field. ```json { config: { stage: { width: "number", height: "number", resolutionPolicy: "showAll" | "exactFit" | "fixedWidth" | "fixedHeight" | "origin", alignHorizontal: "left" | "center" | "right", alignVertical: "top" | "middle" | "bottom" } }, events: [ { id: "string", triggers: [], checks: [], actions: [] }, ... ] } ``` Yon can edit the json with CG.built-in editor to control all your game events. ## How Events Work Each event contains a TRIGGER, some CHECKS, and some ACTION. The event flow works like this: 1. The TRIGGER of the event is triggered by the engine (keyboard pressed, event over, or maybe the hero collides with an enemy) 1. Once the trigger is triggered, the engine then goes check the CHECKS. 1. If all CHECKS pass, the engine executes all the ACTIONS in the event. ## Getting Started ```typescript let manager = new CgEventManager(); manager.importFromSource('CG.YourProject/yourGame.events') .then(() => manager.preload()) .then(() => manager.start()) ; ``` ## Versioning We use [SemVer](http://semver.org/) for versioning. ## Authors * **[Haskasu](/profile/Haskasu)**
# 視覺小說引擎(VisualNovelEngine) 本專案主要是用來製作視覺小說用的。 > 想要更完整、更精緻的視覺小說創作體驗嗎?歡迎前往 **[Phantasia](https://phantasia.cook1470.com/)** 試試看! > 目前尚未有教學文件,有需要的話歡迎到 Discord 找我。 <a href="cg://source/CG.VisualNovelEngine/README.ja.md" class="mat-raised-button mat-primary">日本語版を見る</a> <a href="cg://source/CG.VisualNovelEngine/README.en.md" class="mat-raised-button mat-primary">View English Version</a> 目前主要把最基本的場景、對話框、人物立繪、選項完成了,剩下的就是各種特效了,還有最麻煩的存檔系統。 想要更進一步討論關於此模組的人,可以加入 **[Discord - 嘎姆討論區](https://discord.gg/hZKQzRfPJM)** ,這是我個人自行創建的非官方 Discord 伺服器。 或是我的 Discord 使用者名稱(Username)為:`cook1470`,若不想加入群組的人,也可以直接加我 DC 喔! 加 DC 的時候請直接私訊我,不然我可能不會有回應喔! <font color=red>**本模組仍處於測試、開發階段,如有任何 BUG、功能不完善等問題,歡迎於討論區提出、回報,或是直接 Discord 找我也可以!**</font> 為協助優化本模組,歡迎填寫協助 **[回饋問卷](https://forms.gle/PUckLReQgFK7i7Z68)** 。 **[範例遊戲專案](https://code.gamelet.com/edit/VisualNovelGame?source=CG.VisualNovelGame/example.events)** ## 相關資源 - 文章 - **[巴哈姆特 - 【教學】在網頁上做一個視覺小說遊戲](https://home.gamer.com.tw/artwork.php?sn=5866046)** - **[IT邦幫忙 - [Day 03] CG 同人陣的運作原理](https://ithelp.ithome.com.tw/articles/10321203)** - **[IT邦幫忙 - [Day 11] 在 CG 上公開自己的作品](https://ithelp.ithome.com.tw/articles/10328457)** - **[IT邦幫忙 - [Day 12] 設定專案封面、將成品發布到 Gamelet.online](https://ithelp.ithome.com.tw/articles/10328935)** - **[IT邦幫忙 - 什麼!在網頁上也可以寫視覺小說?](https://ithelp.ithome.com.tw/articles/10337454)** - 影片 - **[【遊戲設計】介紹在網頁上製作視覺小說遊戲](https://www.youtube.com/live/5AUGRityOec?t=189s)** - **[【系統設計】CG 事件表的 UI 系統設計](https://www.youtube.com/live/BKRxSFObMlY?t=1000s)** - **[【遊戲設計】視覺小說引擎更新報告!](https://www.youtube.com/live/s19SacUQ0V4?t=1092s)** - **[【教學】視覺小說引擎-迷霧特效【CC 字幕】](https://www.youtube.com/watch?v=MyXBfAL2BJQ)** - 本站討論串 - **[變數決定結局](https://code.gamelet.com/discuss/p/liaw1/issue/3698/0)** - **[分支選項設置](https://code.gamelet.com/discuss/coding/topic/3706)** ## 網友成品遊戲列表 - **[小又生日活動【異世界大冒險】](https://a2569.gamelet.online/)** - **[God](https://godblesses.gamelet.online/)** - **[平凡的一天](https://dinvmip.gamelet.online/)** ## 作者 **[酷可](/profile/64897095@github)([Youtube](https://www.youtube.com/channel/UCe4mAxtv7eWFU2FDp6bMVVg)、[X](https://x.com/cook1470))** ## 素材網站推薦 - 背景圖 - **[みんちりえ](https://min-chi.material.jp/)** - **[KNT graphics](http://kntgraphics.web.fc2.com/)** - 角色立繪 - **[わたおきば](https://wataokiba.net/)** - 音訊 - **[フリー音楽素材 H/MIX GALLERY](http://www.hmix.net/)** - **[魔王魂](https://maou.audio/)** <a href="cg://source/CG.VisualNovelEngine/README.ja.md" class="mat-raised-button mat-primary">日本語版を見る</a> <a href="cg://source/CG.VisualNovelEngine/README.en.md" class="mat-raised-button mat-primary">View English Version</a>
# WovenFatesPerformanceModule WovenFatesPerformanceModule 是一組為 **平生願** 專案整理的演出與關卡機制擴充模組,讓對話、筆記、提示文字、角色動作與各種互動機制能更直接地接入事件表。 目前依功能分成以下模組: | 模組 | 主要功能 | | --- | --- | | **Dialogue** | 對話框、選項、文本履歷、互動選單、數字密碼與對話泡泡 | | **Notebook** | 筆記本、目錄、圖文條目、多跨頁內容與翻頁演出 | | **TypingAnimation** | 逐字動畫、音效、晃動與訊息堆疊顯示屏 | | **DamageTelegraph** | 可追蹤、瞄準與打斷的傷害預警區域 | | **VisionZones** | 受障礙物遮擋的視野區域與角色進出偵測 | | **DamageThresholdBarrier** | 依單次傷害門檻破裂的防護罩 | | **ActorExtensions** | 拖拽、最近點尋路、真實面向、面向鎖定、組合角色、距離檢查與裝彈觸發 | | **DisplayAttachment** | 讓顯示物件跟隨滑鼠或角色 | | **SpatialSound** | 音量隨聆聽角色與音源距離變化的座標音效 | | **GameTimer** | 隨遊戲暫停而停止累計的畫面計時器 | | **Input** | 滑鼠滾輪觸發與輸入資訊 | | **WorldItems** | 可拾取道具的數量與區域條件檢查 | | **Utilities** | 隨機順序陣列與目前月日 | | **EnginePatches** | 關閉 Shift 戰報選單 | 具體使用效果可以參考 [平生願重製版](https://woven-fates.gamelet.online/)。 **本模組依賴 CgEventsExp、CgEventsLib、TwilightWarsLib、TwilightWarsEvents 與 TwilightWarsEventsExp。** --- ## Dialogue|對話、選項與履歷 ### Action - **建立對話框** 建立包含頭像框、人物名字與文字區的對話介面,可設定版面與樣式。建立時對話框的透明度為 `0`,需配合「更新顯示物件」調整透明度後顯示。 - **更新對話框內容** 更新人物名字、台詞與頭像,支援逐字顯示。頭像可使用圖片、圖集動畫、圖集單一圖幀或 GAF 動畫。 - **對話選項** 顯示選項視窗,支援自訂選項文字、回傳值、位置與樣式;可等待玩家選擇,並將選擇結果寫入變數與文本履歷。 - **開啟文本履歷** 開啟履歷視窗,讓玩家查看先前記錄的對話內容。 - **關閉文本履歷** 關閉已開啟的履歷視窗。 - **互動選單** 適合較多選項的多欄選單。每個選項可設定顯示條件、啟用條件與選擇後的已選標記,並可保留隱藏選項原本的位置。 - **等待密碼輸入** 顯示數字鍵盤,讓玩家輸入指定位數的密碼,並把輸入結果存入指定的全域變數。支援隱藏輸入數字;密碼是否正確可接續用事件表判斷。 ### Trigger - **選中對話選項** 玩家選中對話選項後觸發,可取得選項視窗 ID 與選中的值,接續處理劇情分支。 ### 對話泡泡 Action - **建立對話泡泡顯示屏** 建立不需暫停遊戲的對話顯示區,可設定往上或往下堆疊、左右對齊、泡泡數量上限、間距與堆疊移動時間,也可將內容寫入指定的文本履歷。 - **顯示對話泡泡** 在指定顯示屏加入一段對話,可選擇頭像或名字,以及對話泡泡或極簡字幕樣式。支援逐字顯示、淡入淡出、依字數自動計時、忽略仍在顯示的重複內容,以及等待泡泡結束。 - **清除對話泡泡顯示屏** 將指定顯示屏中目前存在的泡泡全部淡出,可設定淡出時間及是否等待完成。 對話泡泡需先建立顯示屏,再使用相同的顯示屏 ID 新增或清除內容。 --- ## Notebook|筆記本 ### Action - **建立筆記本** 建立筆記本 UI 與控制器,包含封面、目錄、左右頁文字、插圖與翻頁演出。 - **筆記本開關** 開啟、關閉或切換筆記本的顯示狀態。 - **新增筆記條目** 新增含標題、左右頁內容與插圖的條目。可在左右內容中加入分頁標記,讓同一條目包含多個雙頁跨頁;預設標記為 `[[PAGE]]`,插圖顯示於第一個跨頁。 - **刪除筆記條目** 依條目 ID 或索引刪除指定條目。 - **顯示筆記條目** 顯示指定條目內容,或切回目錄頁,並配合翻頁效果切換。 ### Trigger - **筆記本事件觸發** 監聽筆記本開啟、關閉、回到目錄與選中條目等事件,將玩家的閱讀行為接入任務流程。 --- ## TypingAnimation|逐字動畫 ### Action - **特效逐字動畫** 在畫面上顯示逐字出現的文字,可搭配音效、晃動與淡出效果,用於提示、旁白、內心獨白或特殊文字演出,也可加入指定的逐字動畫顯示屏。 - **建立逐字動畫顯示屏** 建立可重用的文字顯示區,可設定背景、行距、最大行數、堆疊方向與推動動畫,讓多條訊息依序排列。 --- ## DamageTelegraph|傷害預警區域 ### Action - **建立傷害預警區域** 建立矩形、圓形或扇形的預警區域,填滿後對符合角色描述的目標造成一次或週期性傷害。可設定填滿方式、傷害類型、視覺與判定的保留時間,也能關閉傷害,只保留演出。 區域起點可跟隨角色;方向可固定、朝向角色或位置,或跟隨角色面向,並可設定追蹤鎖定時間。 - **打斷傷害預警區域** 依區域代碼打斷預警。預設會檢查區域是否允許打斷;需要強制中止時,可關閉「檢查可被打斷」。 若要使用預設的打斷檢查,建立區域時需勾選「可被打斷」。 --- ## VisionZones|視野區域 ### Action - **建立視野區域** 建立圓形或扇形視野,可放在固定位置,或跟隨角色位置與面向。支援障礙物遮擋、射線多邊形與格子兩種繪製模式、反向遮罩,以及偵測間隔與目標角色篩選。 - **設定視野區域顏色** 依區域代碼調整填色、透明度、邊線與圖形顯示狀態。 ### Trigger - **視野區域偵測** 可選擇「偵測到任意目標」「新進入目標」或「離開目標」三種模式,並將區域 ID、角色陣列與個別角色代碼存入區域變數。 --- ## ActorExtensions|角色擴充 ### Action - **角色拖拽** 讓角色經過一段移動過程到達指定位置,或朝目標方向、指定角度移動固定距離。 - **人物最近點尋路** 從候選座標中選擇最近且可到達的位置,控制角色前往。 - **鎖定角色面向** 在指定時間內維持目前面向、固定角度,或持續朝向目標角色/位置。 - **設定角色受擊半徑** 調整指定角色的受擊半徑,供特殊機制或測試使用。 ## DisplayAttachment|顯示物件跟隨 ### Action - **顯示物件跟隨滑鼠** 讓既有顯示物件跟隨滑鼠,移至最上層滑鼠圖層與關閉互動判定。 - **顯示物件在上層跟隨角色** 讓既有顯示物件跟隨角色位置,並保留在天花板/黑暗遮罩上方,適合角色提示、標記或頭頂資訊。 --- ## SpatialSound|座標音效 ### Action - **座標音效** 以角色或固定地圖座標作為音源,依音源與指定聆聽角色的距離調整音量。 --- ## GameTimer|遊戲計時器 ### Action - **遊戲經過時間計時器** 建立顯示於畫面的正向計時器,光暈戰記遊戲暫停時不會累計時間。 --- ## Input|輸入 ### Trigger - **滑鼠滾輪** 監聽向上、向下或任意方向的滾輪輸入,可取得玩家、滾動方向,適合用於文本履歷、翻頁或其他 UI 互動。 --- ## WorldItems|可拾取道具 ### Check - **計算地上可拾取道具** 計算指定種類的道具數量,支援選擇地上可拾取的道具,以及角色持有、可放回地上的道具。 --- ## Utilities|變數工具 ### Action - **建立隨機順序陣列** 依起始值、結束值與變化值建立數字序列,再打亂順序並存入全域變數。 - **取得今天日期** 取得執行當下的月份與日期,分別存入指定全域變數。 --- ## EnginePatches|系統調整 ### Action - **關閉Shift選單功能** 關閉以 Shift 開啟戰報選單的功能。 ---
ⒸCode.Gamelet.com | Privacy Policy | Terms of Service