Skip to content
MetaIdea edited this page Jul 15, 2021 · 36 revisions

Welcome to the SageMetaTool wiki!

FAQ:

Usage and Installation:

You have 3 options with the new smt launcher:

  1. Open SageMetaTool.exe from anywhere to open the launcher gui that displays all sage games supported and found in the windows registry. Choosing a button will start and hook the game automatically.
  2. Start SageMetaTool with a command line parameter specifiyng the game's exe path. Optional parameters can be added.
  3. Place SageMetaTool.exe into the game folder and start it. It auto detects the game and starts it directly without showing the launche gui. (currently not working for all games)

Does the Launcher support start parameters ?

Yes each of the 3 start variants support command ine parameter pass on. SMT deals as a relay to feed the gamne with the respective options.

Does SMT work with mods ?

Yes mods are generally supported. If you use ROTWK mods like Age of the Ring make a shortcut of SageMetaTool.exe and add something like this to the end of the path: ...\SageMetaTool.exe "Path to lotrbfme2ep1.exe with quotation marks" -mod "Path to ...\AOTR7.0\aotr with quotation marks"

Where does SMT store the gamemode scripts ?

Currently SMT uses the following path C:\Users\YourUsername\Documents\Meta Gamemodes as well as configs and mods can be found in Meta\Scripts. In Meta\Scripts\SDK you can find usefull files to create and debug new SMT gamemodes/configs/mods.

All these folders get created on first start with SMT.

Can I create and use my own scripts ?

Yes absolutely ! Just place them into the Meta\Scripts folder as well and SMT will detect and display them in the SMT skirmish setup extra menu list.

Do the gamemode script and configs work on any map ?

Yes this is a major design decision to have universal scripts that work on any map either official or custom and in most cases even among different sage era games. This way we don't have interesting new gamemodes and logics locked in into a single custom map anymore.

Is it possible to make map depenedent smt scripts and ship them with the map ?

Yes this (local single map scripts) is a supported scenario. You just need to place the script file into the map folder. SMT will load this file when starting this specific map.

Can I use all the new script actions and conditions that SMT introduces for it's script system also use in world builder and add them to the map file for generals zero hour ?

No this would require to change/extend large parts of the script action facilities the game uses and it would require to also change world builders internal logic and it's GUI. The SMT scripting system is designed to be far superior to the regular map scripting system. It allows to use every map script and condition plus a lot more so ultimately it is either a replacement or a extension to your regular map scripting. If you go the extension way you can also use a communication bridge between your map scripts and smt lua scripts but smt scripting is much more flexible allowing huge mass scripting for generals zero hour for the first time ever.

Is there also a global always enabled script file location for zero hour like in later sage games that use the script.lua file ?

Yes just place a scripts.lua file into this folder: ZeroHourGameFolder\Data\Scripts\scripts.lua

But if I use smt scripts to extend my maps, people using these maps will always depend on SMT ?

Yes but that would also be the case if we implement new scripting functionalities natively into world builder and the game binary. So either way the user would need a new dependency. The advantage with SMT is that it can exist non invasesively next to your game installation without altering anything on your game files. You can always choose to play vanilla using the regular game binary instead of SageMetaTool.exe.

What languages are useable for the SMT gamemodes/configs/mods ?

Lua 4.0.1 is used for compatibility reasons with vanilla sage lua engine. For ini based sage games you can also use mapini code within these scripts even in companion with lua code (hybrid script).

How does SMT hook/inject into the game ?

SMT launcher -> Open game launcher in suspened state -> Remote thread Dll injection -> Game launcher hook -> Open game in suspened state -> Game hook/signature scans/function detours -> D3D EndScene Hook via dummy device -> ImGui

So in essence it works via remote thread dll injection with LoadLibrary into a suspended state of the next hook process. After injection the process will be set to a resume state. This way we can ensure no code has been executed in the hooked process before we inject and run our hooks.

How does the 60 fps engine proper gamespeed fix work exactly ?

Implementation strongly depends on the sage game era. To achieve proper gamespeed it uses if possible engine scalar float and double values and scales them accordingly. Depending on the game smt scales multiple values for animation speed, movement speed, visual shader speed, build speed and so on. For ini based sage era games we also use dynamic single value scale up/down logic replacing thousands of values automatically with proeprly scaled ones when the engine parses the inis.

How do you prevent multiplayer abuse ?

SMT disables all advantagous features when in multiplayer.

How does SMT ensure compatibility among different version ? Can I use legacy game versions ?

SMT uses advanced signature scan methods to find the game values and functions it depends on. That way the chances are very high it also works on old legacy versions or different binaries as well as steam/origin/retail versions.

Is meta mod known from C&C TW/KW and BFMEII ROTWK part of SMT ?

The entire lua framework (over 10.000 lines of code) used by Meta Mod is part of SMT as well. Accessing the meta control menu is possible via the dev checkmark in the new ingame menu. It has not been tested intensiely and is just provided as a little extra because it provides some unique features like a game sound track and video player and some other hundreds of options. All these would ideally become part of the new gui menu one by one in the future.

Clone this wiki locally