Difference between revisions of "Script Modding Guide"
Jump to navigation
Jump to search
| Line 401: | Line 401: | ||
void OnMeleeArenaRoundEndFactionWinner(int roundId, bool attackers); | void OnMeleeArenaRoundEndFactionWinner(int roundId, bool attackers); | ||
| − | ==== OnPlayerConnected = | + | ==== OnPlayerConnected ==== |
| + | This will be called when a player connects to a server. | ||
| + | This is the normal flow: OnPlayerConnected -> tell the player to loading screen -> player picks faction+class -> OnPlayerJoined | ||
| + | Note: Server Only. | ||
| + | void OnPlayerConnected(int playerId, bool isAutoAdmin, string backendId); | ||
| + | |||
| + | ==== OnPlayerDisconnected ==== | ||
| + | This will be called when a player leaves a server. | ||
| + | Unlike OnPlayerLeave, this happens even on people that didn't spawn in | ||
| + | Note: Server Only. | ||
| + | void OnPlayerDisconnected(int playerId); | ||
| + | |||
| + | = SharedMethods Copy/Paste = | ||
| + | Here is a file that has all the SharedMethods in a single file so you can copy paste them easily. | ||
| + | https://github.com/Xarkanoth/Holdfast-Scripts/tree/main/IHoldfastSharedMethods | ||
| + | |||
| + | = Key Scene GameObjects = | ||
| + | When developing client-side mods, you will often need to find and interact with specific <code>GameObjects</code> that are part of the game's scene. Knowing the names of these objects and how to access them is essential for tasks like creating custom UI and manipulating cameras. | ||
| + | Note: GameObject names can change at any time with no update regarding the name change. | ||
| + | |||
| + | ==== The Main Camera: <code>Main Camera SCENE</code> ==== | ||
| + | This is the primary camera that renders the player's view. You might interact with it to get its position, change its field of view, or attach custom visual effects. | ||
| + | * Name: <code>Main Camera SCENE</code> | ||
| + | * Example: Finding the Main Camera | ||
| + | [[File:Main Camera SCENE.png|center|thumb|482x482px]] | ||
| + | |||
| + | ==== The Main UI Canvas: <code>Main Canvas</code> ==== | ||
| + | This GameObject is the root of most of Holdfast's user interface. If you want to add your own UI elements (like panels, text, or images), you will typically make them children of this canvas to ensure they are rendered correctly on the player's screen. | ||
| + | * Name: <code>Main Canvas</code> | ||
| + | * Example: Finding the Main Canvas | ||
| + | [[File:Finding Main Canvas.png|center|thumb|450x450px]] | ||
| + | |||
| + | === ClientScene GameObjects === | ||
| + | {| class="wikitable" | ||
| + | !Name | ||
| + | !Under | ||
| + | !Description | ||
| + | |- | ||
| + | |Post Processing Global Volume | ||
| + | |ClientScene | ||
| + | | | ||
| + | |- | ||
| + | |MasterAudio - Client Scene | ||
| + | |ClientScene | ||
| + | | | ||
| + | |- | ||
| + | |Nature Renderer Global Settings | ||
| + | |ClientScene | ||
| + | | | ||
| + | |- | ||
| + | |Scripts | ||
| + | |ClientScene | ||
| + | | | ||
| + | |- | ||
| + | |Audio Listener | ||
| + | |ClientScene | ||
| + | | | ||
| + | |- | ||
| + | |WindZone | ||
| + | |ClientScene | ||
| + | | | ||
| + | |- | ||
| + | |Camera - Client | ||
| + | |ClientScene | ||
| + | | | ||
| + | |- | ||
| + | |Main Canvas | ||
| + | |ClientScene | ||
| + | |The UI panel that players see in-game. | ||
| + | |- | ||
| + | |Menu Canvas | ||
| + | |ClientScene | ||
| + | | | ||
| + | |} | ||
| + | |||
| + | === Main Canvas GameObjects === | ||
| + | {| class="wikitable sortable mw-collapsible" | ||
| + | !Name | ||
| + | !Description | ||
| + | |- | ||
| + | |Player Name Tags | ||
| + | | | ||
| + | |- | ||
| + | |Priority Name Tag Canvas | ||
| + | | | ||
| + | |- | ||
| + | |Spyglass Lens Panel | ||
| + | | | ||
| + | |- | ||
| + | |Settings Loading Black Background | ||
| + | | | ||
| + | |- | ||
| + | |End of Round Panel | ||
| + | | | ||
| + | |- | ||
| + | |End of Match Panel | ||
| + | | | ||
| + | |- | ||
| + | |End of Match Panel | ||
| + | | | ||
| + | |- | ||
| + | |Game Elements Panel | ||
| + | | | ||
| + | |- | ||
| + | |New Player Joined Notification Panel | ||
| + | | | ||
| + | |- | ||
| + | |Free Roam Panel | ||
| + | | | ||
| + | |- | ||
| + | |Death Screen Panel | ||
| + | | | ||
| + | |- | ||
| + | |Spectating Panel | ||
| + | | | ||
| + | |- | ||
| + | |Top Info Bar | ||
| + | |Turning off the Top Info Bar will result in it being turned back on automatically. | ||
| + | |- | ||
| + | |Kill Log Panel | ||
| + | | | ||
| + | |- | ||
| + | |UI Proxy Player Card Container Panel | ||
| + | | | ||
| + | |- | ||
| + | |Main Respawn Timer Container | ||
| + | | | ||
| + | |- | ||
| + | |P Menu Panel | ||
| + | | | ||
| + | |- | ||
| + | |Round Players Control Panel - Dialog Box | ||
| + | | | ||
| + | |- | ||
| + | |Report Submitted Popup | ||
| + | | | ||
| + | |- | ||
| + | |New Scoreboard Panel | ||
| + | | | ||
| + | |- | ||
| + | |Round End Panel | ||
| + | | | ||
| + | |- | ||
| + | |New Chat Panel | ||
| + | | | ||
| + | |- | ||
| + | |VOIP Elements Panel | ||
| + | | | ||
| + | |- | ||
| + | |Poll Voting Panel | ||
| + | | | ||
| + | |- | ||
| + | |In-game Server Details Panel | ||
| + | | | ||
| + | |- | ||
| + | |Controls Notification Popup | ||
| + | | | ||
| + | |} | ||
| + | |||
| + | === Menu Canvas GameObjects === | ||
| + | {| class="wikitable sortable mw-collapsible" | ||
| + | !Name | ||
| + | !Description | ||
| + | |- | ||
| + | |Main Screen Panels | ||
| + | | | ||
| + | |- | ||
| + | |IntroInfo Panel | ||
| + | | | ||
| + | |- | ||
| + | |Game Console Panel | ||
| + | | | ||
| + | |- | ||
| + | |Settings Loading Panel Overlay | ||
| + | | | ||
| + | |- | ||
| + | |Tooltip Panel | ||
| + | | | ||
| + | |- | ||
| + | |Loading Screen Panel | ||
| + | | | ||
| + | |} | ||
| + | |||
| + | = Code Examples & Resources = | ||
| + | |||
| + | ===== AGS's Misc Examples ===== | ||
| + | https://github.com/CM2Walki/HoldfastMods | ||
| + | |||
| + | ===== Elf's Custom Factions ===== | ||
| + | https://github.com/LoganBlinco/BaseCustomFactionMod | ||
| + | [[Custom Factions#Replacing Factions]] | ||
| + | |||
| + | ===== Spammy's Chat Filter ===== | ||
| + | https://github.com/AgentNo/holdfast-scripts-and-configs/blob/main/scripts/spammys_chat_filter/SpammyChatFilter.cs | ||
| + | |||
| + | ===== Spammy's OwO Slapper ===== | ||
| + | https://github.com/AgentNo/holdfast-scripts-and-configs/blob/main/scripts/no_uwu_allowed/TestScriptMod.cs | ||
| + | |||
| + | ===== Xarkanoth's Examples ===== | ||
| + | https://github.com/Xarkanoth/Holdfast-Scripts | ||
| + | |||
| + | Feel free to post in the [http://www.discord.gg/holdfastgame Official Holdfast Discord] #Mod-Support for any help | ||
| + | |||
| + | = Support = | ||
| + | Got a question that's not covered in this documentation? | ||
| + | |||
| + | We will gladly give you a helping hand should you require, so don't shy away from asking any questions. You will also find members within the community familiar with the toolset willing to do so. | ||
| + | Join the Official Discord then apply for the 'Artisan' role by selecting the art emoji in the #getting-started channel. This will unlock all channels concerning the discussion of modifications and scripting. | ||
| + | |||
| + | [https://discord.com/invite/holdfastgame Discord - Holdfast Workshop] | ||
| + | |||
| + | | image_content = | ||
| + | <!-- Optional right column content; leave blank to hide the aside --> | ||
| + | |||
| + | | layout = auto | ||
| + | | two_col = no | ||
| + | | left_width = 320px | ||
| + | | aside_width = 320px | ||
| + | | gap = 1rem | ||
| + | | show_toc = no | ||
| + | | show_section_edit = no | ||
| + | }} | ||
Revision as of 10:26, 18 September 2025
|
Getting Started
|
Set up your environment, understand core concepts, and ship your first Holdfast script mod. |
|---|













