Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add image for launching mpf with gmc editor settings and add copy #565

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/gmc/images/launch_mpf_with_gmc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 27 additions & 17 deletions docs/gmc/reference/gmc-cfg.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,53 +112,63 @@ The MPF section defines parameters for the GMC-spawned MPF process. The full com

``` console

<executable_path> <executable_args> <machine_path> <machine_args>
<executable_path> <executable_args> <machine_path> <mpf_args>
```

### `executable_args`
### Options:

Single value, type `String`. Default `None`

Additional arguments to pass to the executable. For example, if the executable is a Python interpreter then the executable args may be `-m mpf` to load the MPF module.
#### `spawn_mpf`

Note that MPF-specific command line args should *not* go here, even if the executable is an MPF binary.
Single value, type `bool`. Default `false`.

If true, GMC will spawn a subprocess to run MPF when the main project is run. The rest of these values will only be used if this is true.

### `executable_path`
#### `executable_path`

Single value, type `String`. Default `None`.

The path to the executable entry point for the MPF process. It can be a Python interpreter, a symlink to a virtual environment mpf executable, or a precompiled MPF binary.

### `machine_path`
#### `executable_args`

Single value, type `String`. Default `None`

Additional arguments to pass to the executable. For example, if the executable is a Python interpreter then the executable args may be `-m mpf` to load the MPF module.

Note that MPF-specific command line args should *not* go here, even if the executable is an MPF binary.

#### `machine_path`

Single value, type `String`. Defaults to the GMC project folder.

The path of the MPF machine folder, i.e. the root folder containing the */config* and */modes* folders for your project. If not specified, the GMC project folder will be used.

### `mpf_args`
#### `mpf_args`

Single value, type `String`. Default `None`

Additional arguments to pass to MPF after the machine path. Common values may include `-x` for virtual mode, `-vV` for verbose logging, or `-P` for production mode. Note that values defined specifically for virtal or verbose (see below) will supersede.
Additional arguments to pass to MPF after the machine path. Common values may include `-x` for virtual mode, `-vV` for verbose logging, or `-P` for production mode. Note that values defined specifically for virtual or verbose (see below) will supersede. See [mpf game](../../running/commands/game.md) for full reference.

### `spawn_mpf`
#### `virtual`

Single value, type `bool`. Default `false`.

If true, GMC will spawn a subprocess to run MPF when the main project is run.
If true, the MPF process will spawn in virtual mode (i.e. `-x` will be appended to the `mpf_args`).

### `virtual`
#### `verbose`

Single value, type `bool`. Default `false`.

If true, the MPF process will spawn in virtual mode (i.e. `-x` will be appended to the `mpf_args`).
If true, the MPF process will have verbose logging (i.e. `-vV` will be appended to the `mpf_args`).

### `verbose`

Single value, type `bool`. Default `false`.
### Launching the MPF game with GMC

If true, the MPF process will have verbose logging (i.e. `-vV` will be appended to the `mpf_args`).
The options from this \[mpf\] section can also be seen and changed in the Godot editor. Next to the "Scene" menu header, find the tab header for "MPF".

![image](../images/launch_mpf_with_gmc.png)

The Godot editor misbehaves if you edit the `gmc.cfg` values while also editing in this UI form, so take care to save changes and reload the editor if you notice odd behaviors. If the top line "Launch MPF with GMC" is enabled, the values here will be used to spawn an MPF game instance when you press the **Play** button to play your GMC project.


## \[sound_system\]
Expand Down
2 changes: 1 addition & 1 deletion docs/running/commands/game.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ weird console slowness we recommend that you do not use the

Ignores all `platform:` settings in your config files and forces MPF to
run using the
[virtual platform](../../hardware/virtual/smart_virtual.md) interface. This is nice for testing when you don't have
[virtual platform](../../hardware/virtual/virtual.md) interface. This is nice for testing when you don't have
your physical hardware attached.

### -X (uppercase)
Expand Down