Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

Popup Framework

What is this? This adds no content. This is an modding tool for developers to make tutorials or announcements to the player, all without ever needing to write any C#. The system is very easy to use, and is versatile for lots of use cases. New def type: PopupDef This displays a custom popup menu with custom attributes, depending on the fields defined in its XML. Here are the list of fields applicable to the def. [list] [*] [b]defName[/b] → The internal name of the def [*] [b]title[/b] → The title displayed at the top of the popup menu [*] [b]description[/b] → The written contents of the popup, displayed in the menu [*] [b]dimensions[/b] → The dimensions of the menu that will contain the popup [*] [b]orientationStyle[/b] → How the menu is presented (Center, Right, Left) [*] [b]customButtonLabel[/b] → Text shown on the custom button (hidden if not defined) [*] [b]customButtonWebLink[/b] → Web URL tied to the custom button [*] [b]customButtonPopupDefLink[/b] → Another popup linked to the custom button [*] [b]nextPopupDef[/b] → Adds a “next” button to open another popupDef (replaced by “done” if undefined unless closeable is false) [*] [b]previousPopupDef[/b] → Adds a “previous” button to open another popupDef [*] [b]oneTime[/b] → Whether the popupDef should only appear once (true/false) [*] [b]closeable[/b] → Whether the popup can be closed (used for multi-page/integral popups) [*] [b]saveToClient[/b] → Save popup state to client instead of save file (true/false) [*] [b]sound[/b] → Defines a soundDef that will play on the tutorial appearing [*] [b]delay[/b] → How long this tutorial will take to pop up once triggered [*] [b]trigger[/b] → Defines when the popup appears: [list] [*] None → Only gets triggered via modExtension [*] OnGameStartup → When the game boots [*] OnColonyStartup → When the colony starts [*] OnNewColonyButton → When you click "new colony" [*] OnModsButton → When you click the "mods" button [*] OnModOptions → When you click the "mod options" button [*] OnOptionsButton → When you click the "options" button [*] OnCreateWorld → When you get to the "create world" page [*] OnWorldPreset → When you get to the world presets page [*] OnGrowingZonePlaced → When you place a growing zone [/list] [/list] New modExtension: Show Popup <li Class="PopupFramework.ShowPopupExtension"> <popupDef>PopupDef</popupDef> <tickDelay>0</tickDelay> </li> [list] [*] [b]Functionality of “Show popup” modExtension by def type[/b] [list] [*] [b]ThingDef[/b] → Shows a popupDef when the thing is placed or clicked [*] [b]ResearchProjectDef[/b] → Shows a popupDef when the project is completed (after the Triumphant Research window closes) [*] [b]IncidentDef[/b] → Shows a popupDef when the incident fires [*] [b]MainButtonDef[/b] → Shows a popupDef when the button is clicked [*] [b]ScenarioDef[/b] → Shows a popupDef when the scenario begins [*] [b]Pawn[/b] → Shows a popupDef when the pawn is clicked [*] [b]Storyteller[/b] → Shows a popupDef when a storyteller is selected [/list] [*] [b]Fields for the “Show popup” modExtension[/b] [list] [*] [b]tickDelay[/b] → Delay (in ticks) before displaying the popupDef [/list] [/list] Examples are included in the mod files Example defs and modExtension patch integrations are all bundled in. Enjoy! Compatibility - Works with literally everything. Credits - Taranchuk - C# [img]https://i.imgur.com/ZkJC3QF.png[/img] [url=https://youtu.be/a0lmf2r965U?si=5RSzVV7fPnUqZWRR][img]https://i.imgur.com/O0vb2cL.png[/img][/url] [url=https://store.steampowered.com/app/2475640/Homeless_Guy/][img]https://i.imgur.com/Oue3hEf.png[/img][/url] [url=https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fdiscord.gg%2Fb58NcrzxRS][img]https://i.imgur.com/PSEq0Mr.png[/img][/url][discord.gg]