[Feature] Load plugins when Genie starts, as in Genie 4

Open
#487 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 5 days

@syntaki is already working on this.

Since Dec 1, 2026.

  • #488 by @syntaki — open

Assessment

This issue has not been assessed yet.

Description

g4-regression

The use case

In Genie 4 a plugin was loaded as soon as the program started. In Genie 5 a plugin is not loaded until I connect or type something.

Started and left alone, Genie 5 has no plugins. Plugins ▸ Reload Plugins answers:

[plugin] connect first to (re)load plugins.

After any typed line, even #echo hello, the plugins load, without a connection, and they stay loaded through disconnects. The same menu entry then answers [plugin] 1 plugin(s) loaded.

So a plugin that is meant to be there from the start is not. One that opens its own window, keeps a timer, or talks to another program on the same computer does nothing until a line is typed into that Genie. I run one Genie per character, so that is one line per window every time I start them.

Proposed solution

Load the plugins when the program starts.

As far as I can read the code, plugins are loaded as part of building the session core (EnsureCoreBuilt → WireCore), and the core is built on first use: the first connect, the first typed command, opening the Script Manager, or Import from Genie 4. The reason it waits seems to be the data folder: it is fixed when the core is built, and a profile can name its own.

What I have working locally on top of v5.0.1-beta.5:

  • When Genie is started without --profile or --host, it builds the core once the window is up, if the Plugins folder holds a plugin and no saved profile has its own data folder. In that case every later connect uses the default folder anyway, so building early cannot change which folder is used.
  • If a saved profile does have its own data folder, it waits as today and says in one line why the plugins are not loaded yet.
  • With no plugin in the folder, nothing changes.
  • The early build reads the shared rules, so a plugin finds the variables and aliases in place, as in Genie 4. It writes no file. The macro defaults that a first rule load adds and saves are left for the first typed command, where they are written today.

It has tests, and a pull request follows. One test compares every rule engine, and the files written, after "started, then connected from the Connect dialog" with "connected first".

How others handle it

Genie 4 loads plugins in FormMain_Load, right after the config files (settings, highlights, triggers and so on) and before any connection (LoadPlugins()). It can do that because its data folder is decided once, at program start.

Policy check

Loading happens when the user starts the program, and loading sends nothing to the game. It does not add anything a plugin can do: whatever a plugin can do after this change, it can do today after the first typed line.

Alternatives considered

  • Always build the core at start, and restart Genie into the profile when the user later picks one with a different data folder. That covers everyone, but needs a self-restart.
  • A start option that names the profile without connecting. Today --profile always connects. With such an option the core could be built in that profile's folder at start.
  • Leave it and correct the documentation. The wiki's Plugins page says #plugin needs a live session, but a typed #plugin list works without one, because the typed line itself builds the core. Only the Plugins menu says "connect first".
Dominant language
C#
Stars
2
Forks
5
Avg merge
4d 3h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GenieClient/Genie5

All issues in GenieClient/Genie5

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.