Commit graph

41 commits

Author SHA1 Message Date
Sir-Skurpsalot d80e0aeef4
Update ExampleModule.tscript
removed execution of keybinds, only done in core/clientServer/scripts/client/client.tscript now.
2025-12-12 20:11:18 -07:00
JeffR c5ae9af0ae Core now spawns a ControlObject directly, with callbacks allowing overriding of values to control what spawns (and what occurs afterwards) to tie several tracking variables to a given client connection.
By default this list of variables would be:
%this.spawnClass = "Camera";
%this.spawnDBType = "CameraData";
%this.spawnDataBlock = "Observer";
%this.playerSpawnGroups = "PlayerSpawnPoints PlayerDropPoints";
%this.spawnPoint = "";
%this.spawnLocation = "0 0 0";

Also adds several callbacks so that these values can be overridden by modules and gamemodes, kicked off from the %client.spawnControlObject(); command :
callOnModules("setSpawnObjectType", "Game", %this);
callGamemodeFunction("setSpawnObjectType", %this);

callOnModules("setSpawnPoint", "Game", %this);
callGamemodeFunction("setSpawnPoint", %this);

callOnModules("onPostSpawn", "Game", %this);
callGamemodeFunction("onPostSpawn", %this);

This is to ensure that a game mode can supersede modules, but even modules can dictate spawn behaviors for minimalist implementations and drop-in interop support
2024-12-21 02:11:35 -06:00
JeffR bf9692a451 Updates DecalRoad, MeshRoad and River to be able to write out via persistManager using specialityField functions, similar to ConvexShape
Fixes behavior with gamemode selection in ChooseLevelMenu so if there is only one gamemode, it is auto-selected and advances to the level selection
Update ExampleLevel in ExampleModule to have updated gamemodes field name
2024-12-15 23:48:16 -06:00
Areloch 4bb26bf96c Reorganized the exec's for datablocks in module template file to be within the start/stop blocks
Tweaked example module script file to comply
Moved ExampleGameMode script file to scripts/shared since client and server need access to the gamemode for logic to work
2024-09-01 23:26:10 -05:00
Areloch ae8eca48e1 Implementation of Subscenes, SceneGroups and Gamemodes
Standardizes Gamemodes to be an actual class with data and utility functions that can be parsed
Adds inspector field handling for selecting gamemodes
Updated Scene class to work with Gamemodes for the gamemode field
Updates editor suite elements to be able to create SubScenes, SceneGroups and Gamemodes
Adds ability to convert SimGroup to SubScene
Updates BaseUI's chooselevel menu to have gamemode selection and filters shown levels based on selected gamemode
2024-09-01 16:39:00 -05:00
Areloch c9a1955b47 Removes old remaining refs to PauseMenu
Updates and moves the escape keybind to be an actionMap that is activated/deactivated in the UI module when a client connection is processed to keep it within the module's functionality
2024-06-28 20:47:42 -05:00
Areloch 67ac556ecd - Added ability to explicitly execute a guiControl's console and altConsole command
- Fixed formatting of resolution strings for the internal values, allowing them to be properly parsed and applied by the options menu/canvas
- Fixed display of Display Device on option's menu
- Fixed Issue of it not displaying any keybinds in keyboard/gamepad options if there's only a single actionmap
- Added 'hold to scroll' action to optionsMenu
- Added apply button to options menu
- Added remap button to options menu when on keyboard/gamepad keybinds categories
- Fixed up the remap logic so remapping a key only unbinds the matched device being bound, so binds for different devices are untouched
- Made keybinds options properly refresh when keybinds are changed
- Shifted keyboard "go" keybind for menu nav from Enter to Space for easier use
- Removed stick keybinds from gamepad
2023-12-31 12:46:48 -06:00
Areloch 55697cffdb Streamlined baseUI profiles
Implemented audioOptions file with structure to comply to BaseUI options menu
Implemented majority of keybind remapping logic for options menu
2023-12-18 23:49:13 -06:00
AzaezelX a0f2f2bf06 define particles then emitters
saves a re-execution attempt
2023-07-20 08:54:52 -05:00
Areloch 33ac4a0864 Corrects the dirt lens image reference from filepath to assetId to not have overhead having to look up the asset each frame when setting the postFX 2023-02-26 12:58:50 -06:00
AzaezelX 1eb59e77e8 bloom operates off of color>1.0. adjust defaults to suit 2022-12-08 18:36:58 -06:00
Areloch 44c894d335 Adds utility function to clean up and standardize the remapping handling for keybinds
Adds sanity check so if no remappable binds are found for an actionMap, it isn't listed in the controls menu
Updates ExampleModule's keybinds to use new utility function
2022-12-06 00:16:13 -06:00
Areloch 5e9d7d63a1 Adjusts handling for httpObject class so that if curl flag is off, files are not included and references are disabled to avoid compilation issues
Adds SMAA anti aliasing
Adjusts AA option setting to properly work and facilitate SMAA
Added defaults for AA to facilitate SMAA
Updated brightness and HDR values on Example Level to comply more closely to the Editor default to give better default results
Fixed issue where ShapeEditor wasn't initialized properly when we'd open it from the Asset Browser
2022-09-16 16:16:12 -05:00
JeffR d56a05c314 Trim unneeded input commands 2022-05-31 01:12:02 -05:00
JeffR 27b20c14d7 Cleans up the ExampleModule to have up-to-date examples of module init'ing, game modes, levels and basic input logic
Cleans up prototyping module to trim unneeded extra scripts and files
Adds PlayerBot model to Prototyping module
Adds metalGray material to Prototyping module
Fixes issue where logic wasn't changed for forcing AB preview images to regenerate
Removes unneeded legacy lines from editor template level
Removes unneeded extra asset import config
Disables terrain material name field from editing in terrain material editor for now to prevent bad behavior
Adds mapTo line to newly created material asset definitions to ensure shapes doing mapTo lookups can properly utilize the materials
2022-05-31 00:26:20 -05:00
JeffR dff83182e2 Added sanity check to ensure that the requested file to be scaled via saveScaledImage actually exists
Shifts integration of other modules with the OptionsMenu so other modules can inject their own options categories to a callOnModules hook
Updated ExampleModule to use new options menu integration angle to show example option
Deleted unneeded dropdown_textEdit_image asset def from baseUI
Fixed incorrect internal values for the terrainIcon_image asset def that made it present as a redundant terrain material asset
Cleaned up old, bad loadFilters calls and replaced them with the proper refresh() calls.
Removed old, bad calls for jumping through the asset browser's tree from when it was still hardcoded organization, which cuts down a lot of error spam
Cleaned up some of the asset type's preview image assignment code to be more reliable
Made terrain materials now use a similar preview proxy shape as regular materials
Fixed erroneous duplicate GuiInspectorTypeShapeAssetPtr::onControlDropped, which was breaking drag-n-drop actions of shapeAssets into inspector fields
Added proper logic for drag-n-drop actions of imageAssets into inspector fields
Add sanity check after creating new asset to avoid redundant attempts at initialization of the new asset
Fixed ConvexShape Editor tooling so you can now use the UI to apply the selected material to the selected surface
Added tools menu to the menubar with the Project Importer entry so the PI can be launched from either tool
Implemented ability to drag-n-drop imageAssets onto MaterialEditor map fields and have it work
Implemented ability to drag-n-drop imageAssets onto TerrainMaterial Editor map fields and have it work
Made the TerrainMaterial editor dialogue have a non-modal background so you can interact with the editor as normal while it's up
Add sanity check to avoid attempting to mark EditorTree items if we couldn't find it's id
renamed BaseMap references in terrain material editor to diffuseMap for consistency
2022-03-27 03:05:48 -05:00
JeffR 01de818503 Ran importer on UI module to ensure guis and images are converted to latest standards
Updated all UI module controls to utilize a more standard structure with stack controls instead of the GameMenu ctrls, as well as more standardization of gamepad input handling
2022-02-22 20:12:39 -06:00
AzaezelX 67c889279d fix groundplane material reference in examplelevel 2021-10-03 17:42:32 -05:00
Jeff Hutchinson 717c7acca9 Merge remote-tracking branch 'devhead/Preview4_0' into tsneo
# Conflicts:
#	Templates/BaseGame/game/data/ui/guis/loadingGui.gui
#	Templates/BaseGame/game/data/ui/guis/mainMenu.gui
#	Templates/BaseGame/game/tools/MainEditor/guis/MainEditorWindow.gui
#	Templates/BaseGame/game/tools/assetBrowser/guis/assetPreviewButtonsTemplate.gui
#	Templates/BaseGame/game/tools/forestEditor/brushes.tscript
2021-08-13 20:14:39 -04:00
AzaezelX c640d8823d template index file review
remove redundant referenes to $TorqueScriptFileExtension. exec and queueExec both handle those internaly.
as pointed out in #511, we were already executing the guimusicpayer.gui in the ut.tscript module via queue. as that case allows folks to bolt a true at the end of the method to override the file-call and replace it with a personalized variant in another module, removed the redundant exec
2021-07-20 11:02:38 -05:00
Jeff Hutchinson 6f7fdca87d lotsa fixes. 2021-05-04 21:18:15 -04:00
Lukas Aldershaab 9ccaa6d3ea Improve handling of non-default script filenames 2021-01-19 21:32:31 +01:00
Lukas Aldershaab 099dd4f1f3 Parametrize script extension, default to 'tscript' 2021-01-19 21:32:31 +01:00
Areloch d19cbd334b Fixed wrong field name on groundPlane in ExampleLevel 2020-12-29 00:37:40 -06:00
Areloch fb5195dd44 Corrects groundplane assigned material in the example and editor levels
Assetifies GroundPlane's handling of it's material field
2020-12-19 01:43:52 -06:00
AzaezelX 7d63f114fa followup 2020-10-05 15:50:45 -05:00
Areloch 7405453123 Fixes issue where it would try and load a SIS file even if it doesnt exist
Fixed warning about use of invalid function 'setEnabled' instead of 'setActive'
Fixed formatting of a schedule call in ExmapleGameMode
Fixed EditorOpenMission logic to correctly get and use levelAsset
Removed unneeded continues from menuInputButtons' refresh()
Updated settings.xml to have sorted order for future consistency
2020-08-26 13:40:04 -05:00
Areloch 5f95f9f8c0 Made GuiFadeinBitmapCtrl not only respond to mouse and keyboard events, but gamepad events as well, allowing gamepad inputs to skip opening splash pages
Ensured that guiGameListMenuCtrl adjusts values for rows marked as sliders via the left and right gamepad actions
Corrected the button maps for look and move on the gamepad for the ExampleModule's default movement binds
Fixed ExampleModule's default keybinds so alt+enter correctly toggles fullscreen
Fixed joinServerMenu so it has a guiInputCtrl that can catch keybind events and pass them to the menuInputButtons
Removed erroneous input consumption on OptionsMenuList
Removed unneeded check against Graphics API list
Flipped order of Anti Aliasing option to match ordering of the others
Removed old, unneeded legacy option menu script files
Added logic for message boxes to automatically return active MenuInputButton control to the holder before it was pushed
Added fill color for the UI list gui profile so the sliders render more legibly
2020-07-25 01:29:25 -05:00
Areloch 5b289bce5e Shifts the tools messageboxes to be distinct from any messageboxes in the main game
Reorged the canvas handling of gamepad inputs for the axis and triggers to use the SI_ versions in the right spots
Fixed issue where pause menu would be hidden and not display again
Made the pause menu active from the gamepad start button rather than back
2020-07-24 00:40:03 -05:00
Areloch 37420cda66 Updates the BaseGame UI theme to be more legible and visually consistent.
Also standardizes and fixes the menuInputButtons system.
2020-07-23 00:22:15 -05:00
Areloch 11f0ec2c0f Overhauled keybind remap part of options menu
Fix audio options menu so it correctly save and applies settings
2020-06-01 03:55:25 -05:00
Areloch 6ade6f08ce Updated Assimp
Added initial behavior for ImageAssets to hold a list of GFX resources of different texture profiles to avoid mem leaks with incorrect-typed usages
Added function to ImageAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found
Added function to ShapeAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found
Disabled fields for dynamic and static shadowmap refresh rates
Moved noShape model to core/rendering/shapes to place it in a more logical module position
Added an include to avoid undefined type compile error and removed unneeded semicolon from zone code
Added call to reload probe textures when a reloadTextures call is made
Adjusted default directional light shadowmap settings to not be as extreme
Added utility function to probe manager to allow any class to request a 'best fit' list of probes that would affect a given location, allowing other classes such as fog or particles to utilize IBL. Also updated probeManager's forward rendering to utilize same function to reduce code duplication.
Shifted shape loader code to utilize assimp for loader consistency and testing
Changed render bin used for SSAO postfx so it runs at the right time
Made Core_Rendering module scan for assets
Updated loose file references to a number of assets to follow proper formatting
Refactored asset import code to follow a more consistent object heirarchy structure on importing assets, allowing more reliable cross-referencing between inbound items
Updated asset import logic for materials/images so that they properly utilize ImageType. Images correctly save out the assigned image type, materials reference the images' type to know what map slot they should be used in. Importer logic also updated to better find-and-add associated images based on type.
Cleaned up a bunch of old, outdated code in the asset importer
Added initial handling for in-place importing of files without needing to process them through the UI.
Added ability to edit module script from RMB context menu if torsion path is set
Updated list field code for variable inspector to utilize correct ownerObject field
2020-03-19 09:47:38 -05:00
Areloch f7b891442a Updated path handling for loose asset files for CPP, Image, Level, Material, PostFX, Shape, Terrain, TerrainMat and StateMachine assets to be more predictable in when and how they expando the loose file path into a full, useable path
Fixed loose file bindings for all associated slots in level asset, such as postFX file, decals, etc
Expanded TSStatic onInspect testcase to parse materialSlots and hook-in a specialized material field for editing/quick reference from the inspector
Adjusted expand behavior of guiTree to be more reliable
Added internal name 'stack' to inspectorGroup's stack child objects for easier access to add programatic fields
Removed redundant PreMult translucency type code
Added setting of feature so probes work when in forward/basic lit mode
Corrected indexing error in SQLiteObject class so it properly parses with the updated console API
Tweaked the FOV setting logic in GameConnection::onControlObjectChange to not be spammy
Fixed var when trying to bind the camera to the client
Added project setting field to dictate the default render mode between Forward or Deferred
Integrated MotionBlur PostFX into updated PostFX Editor paradigm and exposed the samples uniform as an editable field
Integrated DOF PostFX into updated PostFX Editor paradigm
Updated setting group name for vignette postFX
Shifted shaderCache to be in data/cache along with other cached files
Added helper function to replace strings in a file
Fixed ExampleCppObject asset to have correct loose file references
Adjusted editor default level logic so it can be modifed and then stored, as well as reset back to the original default
Fixed verve reference to root scene group
Adjusted location of a nonmodal gui profile so it loads at the correct time
Reorganized AssetBrowser loading and refresh logic so it doesn't stack multiple refresh requests back-to-back causing lag
Updated the search behavior to search not just the current address, but all child folders as well, making it far more useful
Initial work into zip and folder drag-and-drop asset importing support
Removed the import config setting for 'always display material maps' as it is redundant with the new importer context menu actions
Updated example asset type file
Ensured all asset types have proper handling for move, rename and delete actions
Fixed double-click behavior on folders in the AB
Fixed CPP asset preview
Added better logic to discern if a top-level folder belongs to a module or not in the AB directory browser
Added ability to convert a non-module top-level folder in the AB into a module
Added initial hooks for being able to generate a new Editor Tool, similar to how the AB can generate modules
Renamed CPP asset template files to have the .template so they aren't accidentally picked up by cmake
Fixed convex editor's material handling to work with AB and reference back properly
Updated AB images for folder up/down navigation buttons, and the breadcrumb divider arrow
Made PostFX Editor properly allow for input pass-through so you can still edit the level with it open
Added some additional common text gui profiles
Disabled calls to old editor settings logic in various editors to remove spam
Added callOnModules call so tools can initialize properly when the world editor is opened
Fixed logic test for visualizers
Added ability for cmake to scan tools directory for any tools that add source files
2020-02-04 01:47:28 -06:00
Marc Chapman 4aed48697d typos 2019-10-16 19:22:56 +01:00
Areloch 248f1da1c5 Standardizes the Level Assets to just use the regular asset description field for it's description
Updated existing level asset definitions to comply
2019-10-05 01:55:52 -05:00
Areloch 94b6749012 Catches FPSGameplay module up to new gamemode and module paradigm
Adds additional args for callGamemodeFunction
Adds default Observer camera datablock
2019-10-04 21:00:58 -05:00
Areloch 6f02f64dd2 Re-enabled ExampleModule's keybinds 2019-09-29 23:12:46 -05:00
Areloch e7bf49e801 Moved unneeded modules to Templates/Modules
Added templated getObjectsByClass to Scene for easier engine-side polling of objects, including nested checks for subscenes
Proper init'ing of mGamemodeName in LevelAsset, as well as proper fieldType for mIsSubLevel
D3D11 added logic to handle scaling down of textures in cubemap arrays for lower texture resolution preferences
Added ability to collapse groups programmatically to GuiVariableInspector
Upped PSSM shadowmap max size to 4096
Caught GL deferred lighting/probes up to D3D11
Temporarily disabled forward lighting/probes on GL materials until conversion finished
Upped smMaxInstancingVerts to 2000 from 200 to support slightly more detailed meshes being instanced
Reordered project settings so they load ahead of core modules, so that core modules can actually use project settings
Established current preset file for PostFXManager to use for reverting
WIP logic for forcing probes to update as part of level lighting load step in loading process
Streamlined PostFXManager code, removing unnecessary/redundant files
Coverted HDR, Lightrays and SSAO and ExamplePostEffect to use new PostFX Manager/Editor paradigm
PostFX manager now enacts callbacks so that postFXs' can process their own settings as well as provide editor fields
Changed PostFX editor to work with new callbacks via using VariableInspector
Updated PostEffectAsset's template file so new PostFX's will now automatically register with the PostFXManager and have the needed new callbacks for integration
Made HDR on by default, removed enable field from editing
Made probe bake resolution a project setting
Updated many GL postFX shaders to have proper case for PostFx.glsl
Example module now loads ExampleGUI and ExamplePostEffect during init'ing
Removed unneeded autoload definitions from ExampleModule's module file
Fixed Graphics Adapter settings field to properly display as well as apply setting
Updated many referenced profiles in tools folder to use the Tools specific gui profiles to make theming more consistent
Fixed coloration of tools button bitmap to make theming more consistent
Updated a few theme settings for improved visibility with theme, particularly selected/highlighted text
Moved AssetBrowser field types to separated folder/files
Updated new module creation to properly utilize template file instead of overriding it with a programmatic script generation.
Removed unneded default autoload definitions from new modules
Added WIP for editing Module/Asset dependencies
Updated the PostEffectAsset to properly generate glsl and hlsl files from templates
Updated module editor window to display only necessary fields
Added WIP of TerrainAsset
Added shaderCache gitignore file so folder isn't lost
2019-09-29 06:44:43 -05:00
Areloch 9db95f4fb2 Implemented proper ScriptAsset execution on load
Implemented script dependency handling
Added test-case of script dependency handling in ExampleModule
Cleanup of redundant getSceneCount calls
Properly get scene count in callGamemodeFunction
Remove unneeded TODO comment in shaders
Converted onMissionEnded gamemode func call to use callGameModeFunction function
Convert ExampleGameMode to be container-object based, and updated callGamemodeFunction to handle that
Correct import settings typoe so image suffixes are read correctly
Largely fixed companion image scanning when importing images and streamlined image-material interop during import preprocessing
Added handling for reading in PBR maps and creating a composite image + asset
Added WIP of Cubemap asset, and editing integration with a standalone cubemap editor
Added ability to create new Cubemap asset in Asset Browser
2019-09-13 00:27:48 -05:00
Areloch 99cee7f32a Caught the main modules up to new module script file paradigm
Have initServer only get called when a server is actually started for the first time
Added utility method callGamemodeFunction to streamline exec'ing of gamemode function calls
Added onClientConnect gamemode function, called when the client establishes the connection
Added onInitialControlSet gamemode function, called when the client actively gains control in the game, to allow gamemodes to special override GUI settings or input commands
Cleaned up init'ng of the engine so stock UI module isn't required to trip configuration of the canvas
Added fallback so if nothing set the main content control for the UI after boot, we attempt to set the defined mainMenuGUI, on the chance nothing explicitly sets it on load
2019-09-02 16:13:24 -05:00
Areloch d720eb8ccd Makes the graphics menu in the stock UI mostly functional again
Adds sanity check to editing of gameasset script action in asset browser
Updates module template file
Updates visualizers
Fixes checking of popup menu items
Adds stub for TerrainMaterialAsset
2019-08-29 00:22:33 -05:00