Пример #1
0
    /// <summary>
    /// Entry point for your mod.
    /// </summary>
    public void StartEx(IModLoaderV1 loaderApi, IModConfigV1 modConfig)
    {
        _modLoader = (IModLoader)loaderApi;
        _modConfig = (IModConfig)modConfig;
        _logger    = (ILogger)_modLoader.GetLogger();
        _modLoader.GetController <IReloadedHooks>()?.TryGetTarget(out _hooks !);
#if (IncludeConfig)
        // Your config file is in Config.json.
        // Need a different name, format or more configurations? Modify the `Configurator`.
        // If you do not want a config, remove Configuration folder and Config class.
        var configurator = new Configurator(_modLoader.GetModConfigDirectory(_modConfig.ModId));
        _configuration = configurator.GetConfiguration <Config>(0);
        _configuration.ConfigurationUpdated += OnConfigurationUpdated;
#endif

        // Please put your mod code in the class below,
        // use this class for only interfacing with mod loader.
        _mod = new Mod(new ModContext()
        {
            Logger    = _logger,
            Hooks     = _hooks,
            ModLoader = _modLoader,
            ModConfig = _modConfig,
            Owner     = this,
#if (IncludeConfig)
            Configuration = _configuration,
#endif
        });
    }
Пример #2
0
        public void Start(IModLoaderV1 loader)
        {
#if DEBUG
            Debugger.Launch();
#endif

            //* Initialize application services
            Services.Register(typeof(IModLoader), loader);
            Services.Register(typeof(ILogger), new ConsoleLogger());
            loader.GetController <Reloaded.Hooks.ReloadedII.Interfaces.IReloadedHooks>().TryGetTarget(out var hooks);
            Services.Register(typeof(IReloadedHooks), hooks);

            mBindings = new RPCS3Bindings(Process.GetCurrentProcess());
            mBindings.Activate();

            mEmulatorRunHook = mBindings.Emulator_Run.Hook(EmulatorRunImpl);
            mEmulatorRunHook.Activate();

            mPPUInitializeHook = mBindings.ppu_initialize.Hook(PPUInitializeImpl);
            mPPUInitializeHook.Activate();

            mGameBindings = new P5Bindings(mBindings);

            /* Your mod code starts here. */
            Services.Get <ILogger>().WriteLine("Hello World from rpcs3.test");
        }
        public unsafe void Start(IModLoaderV1 loader)
        {
            _modLoader    = (IModLoader)loader;
            _logger       = (ILogger)_modLoader.GetLogger();
            _modDirectory = _modLoader.GetDirectoryForModId(ThisModId);

            /* Your mod code starts here. */
            _modLoader.OnModLoaderInitialized += OnModLoaderInitialized;
            _setupColourizer = Task.Run(() =>
            {
                _configurator = new Configurator(_modDirectory);
                _config       = _configurator.GetConfiguration <Config.Config>(0);
                _config.ConfigurationUpdated += configurable =>
                {
                    _config = (Config.Config)configurable;
                    _logger.WriteLine("[Colorizer] Config file changed. Cancelling current effects and applying new.", _logger.ColorGreenLight);
                    lock (_lock)
                    {
                        CancelAll();
                        Initialize();
                    }
                };

                Initialize();
            });
        }
Пример #4
0
        public void StartEx(IModLoaderV1 loader, IModConfigV1 modConfig)
        {
            LoadTime    = DateTime.Now;
            _controller = new Controller();

            loader.AddOrReplaceController <IController>(this, _controller);
        }
Пример #5
0
        /// <summary>
        /// Entry point for your mod.
        /// </summary>
        public void StartEx(IModLoaderV1 loaderApi, IModConfigV1 modConfig)
        {
#if DEBUG
            // Attaches debugger in debug mode; ignored in release.
            //Debugger.Launch();
#endif

            _modLoader = (IModLoader)loaderApi;
            _modConfig = (IModConfig)modConfig;
            _logger    = (ILogger)_modLoader.GetLogger();
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks !);

            // Your config file is in Config.json.
            // Need a different name, format or more configurations? Modify the `Configurator`.
            // If you do not want a config, remove Configuration folder and Config class.
            var configurator = new Configurator(_modLoader.GetModConfigDirectory(_modConfig.ModId));
            _configuration = configurator.GetConfiguration <Config>(0);
            _configuration.ConfigurationUpdated += OnConfigurationUpdated;

            /*
             *      Your mod code starts below.
             *      Visit https://github.com/Reloaded-Project for additional optional libraries.
             */
            _mod = new Mod(_hooks, _logger);
        }
Пример #6
0
        /// <summary>
        /// Entry point for your mod.
        /// </summary>
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out var hooks);

            /* Your mod code starts here. */
            _ridersRichPresence = new RidersRichPresence(new GetRaceModeHook(hooks));
        }
Пример #7
0
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;

            /* Your mod code starts here. */
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out var hooks);
            _printSubtitles = hooks.CreateHook <PrintSubtitles>(PrintSubtitlesImpl, 0x00428560).Activate();
        }
Пример #8
0
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks);
            _modDirectory = _modLoader.GetDirectoryForModId("sonicheroes.utils.debugboot");

            /* Your mod code starts here. */
            _debugBoot = new DebugBoot(_modDirectory, _hooks);
        }
        /// <summary>
        /// Entry point for your mod.
        /// </summary>
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            _logger    = (ILogger)_modLoader.GetLogger();
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks);

            // Your config file is in Config.json.
            _hook = new DInputHook(_hooks);
        }
Пример #10
0
        /// <summary>
        /// Entry point for your mod.
        /// </summary>
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            _logger    = (ILogger)_modLoader.GetLogger();
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks);

            /* Your mod code starts here. */
            _mod = new Mod(_logger, _hooks);
        }
Пример #11
0
        /// <summary>
        /// Entry point for your mod.
        /// </summary>
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            Logger     = (ILogger)_modLoader.GetLogger();

            _postProcess          = new PostProcess(_modLoader.GetDirectoryForModId(MyModId));
            _modLoader.ModLoaded += ModLoaded;
            SetupController();
        }
Пример #12
0
    public void StartEx(IModLoaderV1 loader, IModConfigV1 config)
    {
        _modLoader = (IModLoader)loader;
        _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks);
        var modDirectory    = _modLoader.GetDirectoryForModId(config.ModId);
        var configDirectory = _modLoader.GetModConfigDirectory(config.ModId);

        /* Your mod code starts here. */
        _debugBoot = new DebugBoot(modDirectory, configDirectory, _hooks);
    }
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks);

            /* Your mod code starts here. */
            _modLoader.ModLoading   += ModLoading;
            _modLoader.ModUnloading += ModUnloading;
            _collection              = new StageCollection(_modLoader, _hooks);
        }
Пример #14
0
        /// <summary>
        /// Entry point for your mod.
        /// </summary>
        public async void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            _logger    = (ILogger)_modLoader.GetLogger();
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks);

            /* Your mod code starts here. */
            SDK.Init(_hooks);
            _imguiHook = await ImguiHook.Create(RenderTestWindow);
        }
Пример #15
0
        public void Start(IModLoaderV1 loader)
        {
            #if DEBUG
            Debugger.Launch();
            #endif
            ModLoader = (IModLoader)loader;

            /* Your mod code starts here. */
            _graphicsEssentials = new GraphicsEssentials(ModLoader.GetDirectoryForModId(MyModId));
        }
Пример #16
0
    public void Start(IModLoaderV1 loader)
    {
        _modLoader = (IModLoader)loader;

        /* Your mod code starts here. */
        _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks);
        _modLoader.GetController <IPrsInstance>().TryGetTarget(out var _prsInstance);
        SDK.Init(_hooks, _prsInstance);
        _toner = new Toner();
    }
        private static byte[] _jmpSkipOneInstance = { 0xEB, 0x28 }; // jmp 0x2A

        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;

            // Ignore launcher check result.
            Memory.CurrentProcess.SafeWriteRaw((IntPtr)0x005118CF, _jmpSkipLauncher);

            // Ignore only one instance check result.
            Memory.CurrentProcess.SafeWriteRaw((IntPtr)0x0051190F, _jmpSkipOneInstance);
        }
Пример #18
0
        /// <summary>
        /// Entry point for your mod.
        /// </summary>
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            Logger     = (ILogger)_modLoader.GetLogger();

            /* Your mod code starts here. */
            _xInput = new XInput(_modLoader.GetDirectoryForModId(MyModId));
            _modLoader.ModLoaded += ModLoaded;
            SetupController();
        }
Пример #19
0
    public void Start(IModLoaderV1 loader)
    {
        _modLoader = (IModLoader)loader;
        _modLoader.GetController <IReloadedHooks>().TryGetTarget(out var hooks);

        /* Your mod code starts here. */
        _afsHook = new(NativeFunctions.GetInstance(hooks));
        _modLoader.ModLoading             += OnModLoading;
        _modLoader.OnModLoaderInitialized += OnModLoaderInitialized;
    }
        public void Start(IModLoaderV1 loader)
        {
            #if DEBUG
            Debugger.Launch();
            #endif
            _modLoader = (IModLoader)loader;
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _reloadedHooks);

            /* Your mod code starts here. */
            _graphicsEssentials = new GraphicsEssentials(_modLoader.GetDirectoryForModId(MyModId), _reloadedHooks);
        }
    public void Start(IModLoaderV1 loader)
    {
        _modLoader     = (IModLoader)loader;
        _reloadedHooks = _modLoader.GetController <IReloadedHooks>();

        /* Your mod code starts here. */
        if (_reloadedHooks.TryGetTarget(out var hooks))
        {
            SDK.Init(hooks, null);
            _heroesRpc = new HeroesRPC();
        }
    }
Пример #22
0
        public void Start(IModLoaderV1 loader)
        {
            #if DEBUG
            Debugger.Launch();
            #endif
            _modLoader = (IModLoader)loader;
            _logger    = (ILogger)_modLoader.GetLogger();

            // Auto-subscribe on loaded redirector.
            _modLoader.ModLoaded += ModLoaded;
            SetupEventFromRedirector();
        }
Пример #23
0
        public void Start(IModLoaderV1 loader)
        {
            ModLoader = (IModLoader)loader;
            ModLoader.GetController <IReloadedHooks>().TryGetTarget(out var hooks);
            Hooks = hooks;

            /* Your mod code starts here. */
            var logger = (ILogger)ModLoader.GetLogger();

            SDK.Init(Hooks, new PrsInstance());
            _server = new Server(logger);
        }
Пример #24
0
    public void StartEx(IModLoaderV1 loader, IModConfigV1 config)
    {
        _modLoader = (IModLoader)loader;
        _modLoader.GetController <IReloadedHooks>().TryGetTarget(out var reloadedHooks);
        SDK.SDK.Init(reloadedHooks, null);

        /* Your mod code starts here. */
        var modFolder    = _modLoader.GetDirectoryForModId(config.ModId);
        var configFolder = _modLoader.GetModConfigDirectory(config.ModId);

        _graphicsEssentials = new GraphicsEssentials(modFolder, configFolder, reloadedHooks);
    }
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;

            ModDirectory = _modLoader.GetDirectoryForModId("dolphin.shadowthehedgehog.rpc");

            var settings = Settings.GetSettings();

            settings.ToFile();

            _shadowRpc = new ShadowRpc(Process.GetCurrentProcess(), settings);
        }
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;

            /* Your mod code starts here. */
            _reloadedHooksLegacy = new ReloadedHooks();
            _reloadedHooks       = _reloadedHooksLegacy;

            _utilities = new ReloadedHooksUtilities();
            _modLoader.AddOrReplaceController(this, _reloadedHooks);
            _modLoader.AddOrReplaceController(this, _reloadedHooksLegacy);
            _modLoader.AddOrReplaceController(this, _utilities);
        }
Пример #27
0
        public void Start(IModLoaderV1 loader)
        {
            #if DEBUG
            Debugger.Launch();
            #endif
            ModLoader = (IModLoader)loader;
            Logger    = (ILogger)ModLoader.GetLogger();

            /* Your mod code starts here. */
            _postProcess         = new PostProcess(ModLoader.GetDirectoryForModId(MyModId));
            ModLoader.ModLoaded += ModLoaded;
            SetupController();
        }
Пример #28
0
        /// <summary>
        /// Entry point for your mod.
        /// </summary>
        public void Start(IModLoaderV1 loader)
        {
            _modLoader = (IModLoader)loader;
            _logger    = (ILogger)_modLoader.GetLogger();
            _modLoader.GetController <IReloadedHooks>().TryGetTarget(out _hooks);
            _modLoader.GetController <IReloadedHooksUtilities>().TryGetTarget(out _hooksUtilities);

            /* Your mod code starts here. */
            SDK.Init(_hooks);
            _hook            = new ControllerHook(_hooks);
            _fourPlayerPatch = new FourPlayerPatch(_hooks, _hooksUtilities);
            _modLoader.AddOrReplaceController <IControllerHook>(this, _hook);
        }
        public void Start(IModLoaderV1 loader)
        {
            #if DEBUG
            Debugger.Launch();
            #endif
            ModLoader = (IModLoader)loader;
            Logger    = (ILogger)ModLoader.GetLogger();

            /* Your mod code starts here. */
            string modDirectory = ModLoader.GetDirectoryForModId(MyModId);

            _xInput              = new XInput(modDirectory);
            ModLoader.ModLoaded += ModLoaded;
            SetupController();
        }
        public void Start(IModLoaderV1 loader)
        {
            #if DEBUG
            Debugger.Launch();
            #endif
            ModLoader = (IModLoader)loader;
            Logger    = (ILogger)ModLoader.GetLogger();

            ModLoader.GetController <IReloadedHooks>().TryGetTarget(out ReloadedHooks);
            SDK.SDK.Init(ReloadedHooks, null);

            /* Your mod code starts here. */
            _hook = new ControllerHook(ModLoader.GetDirectoryForModId(ThisModId));
            ModLoader.AddOrReplaceController <IControllerHook>(this, _hook);
        }