Giter VIP home page Giter VIP logo

mpf-docs's Introduction

Mission Pinball website & documentation

This repo contains all the source code for MissionPinball.org, which also includes all user documentation.

Technical details

The MPF website is built using MkDocs, a static site generator using Markdown files as the source. It uses the Material for MkDocs theme.

The site is hosted on GitHub Pages, and the main branch of this repo controls what's published to the live site. A GitHub workflow is used to automatically build and deploy the site whenever a commit or merge is made to the main branch. You can see the commits and page builds in the Actions tab.

To build / run locally

  1. Clone the repo
  2. Open a terminal window and cd into the root folder of this repo
  3. pip install -r requirements.txt (to install mkdocs and what it needs)
  4. mkdocs serve (runs a local web server on port 8000)

You should be able to access the doc site via your web browser at localhost:8000.

To contribute

We would love contributions to the docs! We have a Contributing Guide (view on GitHub | view on the website) which explains how to contribute.

Configuring site navigation

All the navigation for the site is configured in the mkdocs.yml file. This is somewhat annoying since it means that if you add a new page, you have to go to a completely separate place to set up the nav.

I tried to use the auto pages plugin to automatically create the navigation, and/or at least keep it local to each subfolder, but unfortunately our navigation tree is different from our folder hierarchy which made that not possible. We may be able to combine both methods, and this is something someone could look into.

Script to build the showcase pages

The MPF project showcase is published at missionpinball.org/showcase. The source content for each showcase entry are YAML files /showcase folder of this repo. The script generate_showcase_pages.py generates the .md files for each project, and also generates the showcase index page.

This script is run automatically as part of the GitHub Actions workflow.

mpf-docs's People

Contributors

aaronmatthies avatar amoksolderer avatar atummons avatar avanwinkle avatar beckermi avatar bosh avatar cfbenn avatar cobra18t avatar colemanomartin avatar compy avatar founfabug avatar gabeknuth avatar homechicken avatar ironspider avatar jabdoa2 avatar jankantert avatar jeremytedwards avatar kevinleedrum avatar konjurertim avatar kylenahas avatar mwiz avatar nbeaulat avatar qcapen avatar seanirby avatar swizzlefish avatar thepinballroom avatar toomanybrians avatar travisbmartin avatar unrared avatar worldpeace-germany avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpf-docs's Issues

Document Config Format per Platform

For all platforms, document and link number formats for

  • switches
  • matrix_lights
  • coils
  • leds

P-Roc (switches, leds, coils, matrix_lights):
a) WPC syntax
b) Custom; direct and matrix switches; lamp matrix
c) PDB syntax (optional)
P3-Roc (switches, leds, coils, matrix_lights):
a) PDB syntax
Snux (coils, switches):
Fast (switches, leds, coils, matrix_lights):
a) WPC
b) PDB syntax / fast syntax
OPP (switches, leds, coils, matrix_lights):
Fadecandy (leds):

Probably good to break out PDB and WPC (Partly here: http://docs.missionpinball.org/en/stable/machines/wpc.html) config styles.

Raspberry Pi install video test throws error

@HarryXS Not sure what this problem might be, but when I follow the steps to test that video works in the RPi install instructions, I get a Kivy error that says it's looking for mpf_video_small_test.png even though I typed in mpf_video_small_test.mp4. The player still appears, but no video plays.

I've attached a screenshot. I ran it directly from the tests/machine_files/video/videos folder in this example, but I tried the full command as you wrote in the instructions, too.
messages image 1146790575

By the way - nice find with KivyPie. I'm very hopeful that this will work!

PDF needs a custom title page

Lots of research and I can't figure out how to do this, so I'm posting it here so I can remember to come back and look at it some other time. I want to add a few things:

  • Logo
  • Version of MPF that the PDF is for
  • Note that the PDF is formatted for the screen, but we can generate versions for suitable for printing if people want them.

Docs not displaying correctly in Chrome on Android

There is some kind of layout/CSS error/incompatibility in Chrome on Android that causes the majority of the page to be off the left side of the screen and no ability to scroll to see it. It makes it almost impossible to navigate to any other page and not possible to read the content. Working fine in Chrome on my desktop. I hate finding and fixing these device compatibility issues!

Screenshot attached:
screenshot_20160604-095008

Chrome 50.0.2661.89 on Android 6.0.1

Flippers Section - Circular Reference

The section: "What if your flippers coils only have one winding?" in the tutorial step 3 links back to itself with: 'make sure you’ve read our documentation on flipper devices_ for all the details about how that works.

Test config snippets

Provide a way to test snippets in config. We should supply a few templates:

  • Raw - Use just this snippet
  • Machine - Basic machine config + this snippet
  • Mode - Basic machine config with a mode and snippet in mode

Support a way to hide stuff from rendering in the docs which is needed for config validation.

Update logic_blocks player_variable documentation

I'd like to update the documentation for logic_blocks to correctly reflect the behavior of player_variable, but am uncertain as to where the documentation/code might be incorrect.

player_variable:


By default, the current "state" (or progress) of sequence logic blocks
are stored in a :doc:`player variable </game_logic/players/index>` called
*<counter_name>_count*.
For example, a logic block called "logic_block_1" would store its state
in a player variable called *logic_block_1_count*.

However, you can use the ``player_variable:`` setting to change this to
any player variable you want.

The main difference between the documentation and code is that the code only stores the logic block in a player variable if persist_state: true is set. Without persist_state, the variable is stored only internally to the logic block. However, any attempt to access a player variable automatically instantiates that variable, so to the user it may appear as though the player variable exists with a value of 0 when in fact it was only created by the attempt to access it. Unfortunately this player value will remain at zero while the logic block value changes, which can be confounding.

if self.config['persist_state']:
    if not player.is_player_var(self.player_state_variable):
        player[self.player_state_variable] = LogicBlockState(self.get_start_value())
    self._state = player[self.player_state_variable]
else:
  self._state = LogicBlockState(self.get_start_value())

I would like to update the documentation to reflect this behavior if it is the desired behavior, otherwise I would like to update the code to instantiate and maintain the default player variable. In either case, I'd also like to note in the documentation that the default player variable name ends in _state for all logic block types and that the value of the logic block is accessible for dynamic values via devices.<blocktype>.<name>.value.

mpf crashes on shots.yaml v0.30.25

INFO : SwitchController : <<<<< switch: s_left_inlane_e, State:1 >>>>>
ERROR : root : Can't convert 'NoneType' object to str implicitly
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/mpf/commands/game.py", line 130, in init
MachineController(mpf_path, machine_path, vars(args)).run()
File "/usr/local/lib/python3.4/dist-packages/mpf/core/machine.py", line 540, in run
self._run_loop()
File "/usr/local/lib/python3.4/dist-packages/mpf/core/machine.py", line 563, in _run_loop
self.process_frame()
File "/usr/local/lib/python3.4/dist-packages/mpf/core/machine.py", line 575, in process_frame
self.default_platform.tick(self.clock.frametime)
File "/usr/local/lib/python3.4/dist-packages/mpf/platforms/fast/fast.py", line 465, in tick
self.process_received_message(self.receive_queue.get(False))
File "/usr/local/lib/python3.4/dist-packages/mpf/platforms/fast/fast.py", line 141, in process_received_message
self.fast_commandscmd
File "/usr/local/lib/python3.4/dist-packages/mpf/platforms/fast/fast.py", line 236, in receive_nw_closed
platform=self)
File "/usr/local/lib/python3.4/dist-packages/mpf/core/switch_controller.py", line 249, in process_switch_by_num
self.process_switch(name=switch.name, state=state, logical=logical)
File "/usr/local/lib/python3.4/dist-packages/mpf/core/switch_controller.py", line 341, in process_switch
self.call_handlers(name, state)
File "/usr/local/lib/python3.4/dist-packages/mpf/core/switch_controller.py", line 400, in call_handlers
entry'callback'
File "/usr/local/lib/python3.4/dist-packages/mpf/devices/shot.py", line 486, in hit
group.hit(mode, profile, state)
File "/usr/local/lib/python3.4/dist-packages/mpf/devices/shot_group.py", line 136, in hit
self.machine.events.post(self.name + '
' + profile + '
' + state +
TypeError: Can't convert 'NoneType' object to str implicitly

config_version=4

shots:
left_outlane_t:
switch: s_kickback_t
show_tokens:
led: l_left_outlane_t
left_inlane_e:
switch: s_left_inlane_e
show_tokens:
led: l_left_inlane_e
right_inlane_c:
switch: s_right_inlane_c
show_tokens:
led: l_right_inlane_c
right_outlane_h:
switch: s_right_outlane_h
#profile: quick_flash
show_tokens:
led: l_right_outlane_h

shot_groups:
tech_lanes:
shots:
- left_outlane_t
- left_inlane_e
- right_inlane_c
- right_outlane_h

shot_profiles:
quick_flash:
states:
- name: unlit
show: off
- name: hit
show: quick_flash

shows:
quick_flash:
- leds:
(leds): white
- leds:
(leds): off

Doc Update - Add events to config reference

Under 'Config File Reference', related events should be added to appropriate entries. This will help people understand what events are created based on their config entry and how they relate.

Example... under 'score_reel_groups:', the following events are created for each entry:
scorereelgroup_(name)resync
scorereelgroup
(name)rollover
scorereelgroup
(name)_valid

This suggestion was discussed with Brian M (Sept 21.2016).

Update hold_power docs (for coils)

This page is out of date. hold_power is now a decimal value between 0.0 and 1.0 that defaults to 0.0 - and results in the error "Cannot enable driver with hold_power 0.0" in that scenario.

Could there be a more reasonable default? Or is choosing any non-zero value potentially dangerous?

Fix PDF formatting

The PDF generated by RTD is pretty ugly. At minimum I'd like to:

  1. Get rid of all the heading numbers (except maybe the H1s)
  2. Change the fonts
  3. Change heading formatting
  4. Maybe something with images so they're not always maxed out?
  5. Line justification is weird in a lot of cases. Implement word breaking or left justify.

Starting points here: http://stackoverflow.com/questions/9745854/sphinx-pdf-themes

No write permission on tutorial page 3_get_flipping.rst

Hi,
I tried to add aomething to the page:
https://github.com/missionpinball/mpf-docs/edit/latest/tutorial/3_get_flipping.rst

In line 53ff you can add Notepad++ like:
If you use Sublime or Notepad++ as your editor, it just
does this automatically. Other editors might require plugins. (For
example, you can add this functionality to Atom with a free package
called "autocomplete-plus".)

Maybe helpful to add Virtual Pinball (I'm using) in line 468ff:
7b. Using Virtual Pinball as "virtual" hardware

In case you are using Virtual Pinball the config file will look like:

.. code-block:: mpf-config

    hardware:
        platform: virtual_pinball

See also:
* :doc:`The Virtual Pinball (VPX) Platform </hardware/virtual/virtual_pinball_vpx>`

TOC Alignment issues

The page numbers for the chapter headings are indented too far to the right.
Also the space between the chapter numbers and the words is too small for chapters 10 and higher.

image

Show files: case sensitivity example is confusing

In file_shows.rst the example provided to demonstrate that MPF is case insensitive is incorrect and could be misinterpreted by the reader. The example provided compares 'YouShow.yaml' and 'yourshow.yaml'. The first example should be 'YourShow.yaml', the 'r' in your is missing.

Broken Links in docs

mpf-docs/events/extra_ball_group_name_lit.rst:29: WARNING: unknown document: extra_ball_lit_awarded
mpf-docs/game_logic/players/index.rst:63: WARNING: unknown document: /events/player_add_success
mpf-docs/game_logic/players/index.rst:65: WARNING: unknown document: /events/player_turn_start
mpf-docs/game_logic/players/index.rst:69: WARNING: unknown document: /events/player_turn_stop
mpf-docs/mechs/switches/index.rst:87: WARNING: unknown document: /events/sw_tag_name

Doc lin in config_validator.py wrong

Hi,
I just get an error with an wrong link. Could you please check and correct it. Appered because I did something wrong in the config.yaml file.

Using MPF v0.53.2 and VP 10.6.0

Wrong link that is shown:
https://docs.missionpinball.org/en/0.53/logs/CFE-ConfigValidator-6.html

Error message from MPF:
Shutting down...
Event: ======'shutdown'====== Args={}
Shutdown because of an exception:
Runtime Exception
Traceback (most recent call last):
File "c:\program files\python36\lib\site-packages\mpf\core\machine.py", line 765, in _run_loop
raise self._exception['exception']
File "c:\program files\python36\lib\asyncio\events.py", line 145, in _run
self._callback(*self._args)
File "c:\program files\python36\lib\site-packages\mpf\core\events.py", line 102, in _async_handler_done
future.result()
File "c:\program files\python36\lib\site-packages\mpf\core\device_manager.py", line 114, in _load_device_modules
await self.machine.mode_controller.load_mode_devices()
File "c:\program files\python36\lib\site-packages\mpf\core\mode_controller.py", line 90, in load_mode_devices
await mode.load_mode_devices()
File "c:\program files\python36\lib\site-packages\mpf\core\mode.py", line 438, in load_mode_devices
settings = device.validate_and_parse_config(settings, True, "mode:" + self.name)
File "c:\program files\python36\lib\site-packages\mpf\core\device.py", line 104, in validate_and_parse_config
self.config_section, config, self.name, "device", prefix=debug_prefix)
File "c:\program files\python36\lib\site-packages\mpf\core\config_validator.py", line 281, in validate_config
validation_failure_info=(validation_failure_info, k))
File "c:\program files\python36\lib\site-packages\mpf\core\config_validator.py", line 328, in validate_config_item
new_list.append(self.validate_item(i, validation, validation_failure_info))
File "c:\program files\python36\lib\site-packages\mpf\core\config_validator.py", line 757, in validate_item
return self.validator_list[validator](item, validation_failure_info=validation_failure_info, param=param)
File "c:\program files\python36\lib\site-packages\mpf\core\config_validator.py", line 477, in _validate_type_machine
6)
File "c:\program files\python36\lib\site-packages\mpf\core\config_validator.py", line 776, in validation_error
item, msg), 5 if code is None else code, self.log.name)
mpf.exceptions.config_file_error.ConfigFileError: Config File Error in ConfigValidator: Config validation error: Entry mode:base:shots:rollover_a:switch = "s_top_rollover_a" is not valid. Device s_top_rollover_a of type switches not defined Error Code: CFE-ConfigValidator-6 (https://docs.missionpinball.org/en/0.53/logs/CFE-ConfigValidator-6.html)
MPF run loop ended.

Page for reserved tags (maybe) missing

I'm just a beginner on MPF. Maybe I have overseen something on tags, then this issue is obsolate.

I think it would be good to have a "tag reference"-page for reserved tags with sections for

  • Special-purpose tags: home, drain, trough, no-eject-on-ballsearch, aso.
  • common tags for switches
    ...

Related links:
http://docs.missionpinball.org/en/latest/config/instructions/tags.html#reserved-tags-in-mpf
http://docs.missionpinball.org/en/latest/config/ball_devices.html#tags

Format the inline code better

The inline code is rendered with a different font, but it needs more to stand out, like a box around it or a gray background or something.

Remove header from TOC pages

On the toc pages, there's a header which says "Overview" would should be removed.

The headers are coming from the first section (Overview), but really that section shouldn't start until after the TOC.

Example here:

image

And here:

image

Coils - FAST & Single-Wound

For single-would coils, there is a comment in the snippet for #P-ROC / P3-ROC only

It's unclear what the user should do if using another platform like FAST.

Page heading with no section needs to not have parenthesis

The page headings are the format CHAPTER NAME (Section).

But if there is no section, the parenthesis are still there since they're hard coded, like this:
image

I need to learn how to make it so the parentheses don't render if there is no section

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.