Skip to content
GHGibonus edited this page Feb 14, 2017 · 5 revisions

Features

This page tracks the features present in Atom-boilua, this is meant to be exhaustive and precise. If it doesn't reflect the actual state of the program, it is a bug, please report it.

Index

Isaac game files location discovery
Documentation scrapping
luacompleterc file generation
Automatic luacompleterc update
Modding snippets provider
Auto update.it deletion
Mod template creation
Template importation to preexisting mods
Game launcher & Extra commands
Log Monitoring

==

Isaac game files location discovery

  • Finds automatically the Isaac folders locations when it is reasonable to expect to find them. It adopts default behaviors depending on which system the user is on.
  • The user specifies the folder locations if Atom-boilua cannot find the automatically.
  • Those values are accessible in the Atom settings for this package.

Files

lib/main.coffee

Validation

Look at what default values are present in the Settings pane for Atom-boilua. The default values must be equals to what a default Isaac install on the system looks like.

==

Documentation scrapping

  • Reads through the html doxygen pages to detect: Namespaces; Classes; Enumerators and their fields. It associate them to their documentation page, and descriptions if available.
  • It offers a class "AfterbirthApi" that holds the data about the whole documentation.

Files

lib/scraper/scraper.py
lib/scraper/scraper_regex.py
lib/scraper/main.py
lib/main.coffee

Validation

Using a Python debugger, call directly scraper.py giving it as argument the location of the documentation. Then add a breakpoint just before the end of the file and make sure abpApi's class holds all the information you want.

==

luacompleterc file generation

  • Generates a file for autocomplete-lua to use in order to provide API documentation.
  • The API suggestions should only appear in lua files edited within the Isaac mod folder. The suggestions must be displayed in all the subfolders present mod folders.

Files

lib/scraper/scraper.py
lib/scraper/scraper_regex.py
lib/scraper/main.py
lib/main.coffee
lib/scraper/serializer.py

Validation

  1. Delete any preexisting .luacompleterc file in the Isaac Afterbirth+ mod folder.
  2. Use the Rebuild BoI API command present in the context menu.
  3. Check that a non-empty .luacompleterc was generated in the ROOT of the Isaac Afterbirth+ mod folder.
  4. Type out some stuff in a .lua file to see if the API suggestions are present.

==

Automatic luacompleterc update

  • Regenerates the luacompleterc file under the following conditions:
    1. The Atom-boilua package has been updated.
    2. The Isaac Documentation has been updated.
    3. The luacompleterc doesn't exist yet.

Files

lib/main.coffee

Validation

  • Delete the luacompleterc file and open a new file inside the Isaac mod folder. If a blue information notification pop-ups, it is a success.
  • Add a file in the Isaac API documentation folder and then delete it; Open a file in the mod folder using Atom; If the notifications shows, it is a success.
  • To validate the package's update detection, do the same as above, but with the Atom-boilua package folder.

==

Modding snippets provider

Adds some snippets to the suggested autocompletions when editing within a mod folder lua files.

Files

lib/provider.coffee

Validation

  1. Open a lua file in the mod folder and start typing "forentity...". If the for i, ent in ipair... suggestion shows up: Success!
  2. Now make sure it is not polluting every lua projects, even outside of the mod folder: do the same in a lua file outside of the mod folder and see if you get the suggestion. If you don't, this is a success.

==

Auto update.it deletion

Removes the update.it file present in a mod folder when you just saved a file you were editing.

Files

lib/main.coffee

Validation

  1. Add an file named update.it in the root of a mod folder.
  2. Edit and save a file present in a subfolder of that mod folder.
  3. The test is successful if the update.it file has been removed

==

Mod template creation

Provides a menu to quickly generate a template mod with folder + files that you can use as base to start a mod.
You can input a mod name, that name will be adapted to Isaac's crazy requirements for the folder name. The full name will be kept in a metadata.xml file so the "nice" version is shown in the game.
The generated "template" mod shouldn't add anything, nor should it lead to the game crashing if left unmodified.
Under no circumstances should any preexisting file be overwritten!!

Files

  • the "modgen" directory.

Validation

  1. Access the mod creation menu using the atom-boilua:mod-creator command.
  2. Choose a name that doesn't already exists (you can tell by the menu saying "Creating xxx" rather than "Modifying xxx"), the name should contain spaces and caps; Select all options.
  3. Check that a new folder with a name in all lowercase with no space has been created. Check that its content is coherent.
  4. Check that no files are missing from existing mods, or that an existing mods has not been deleted.
  5. Open Isaac and if the mod is shown in the mod menu, with the "nice" name you gave it, without errors, it is a success.

==

Template importation to preexisting mods

If you open the mod creator tool while inside a preexisting mod, the importer should detect what already exists in it, and give you a feedback about it. You should be able to import more file templates into your mod without overwriting anything.

Files

  • the "modgen" directory

Validation

  1. Open a preexisting mod. And open the mod creation tool.
  2. Does the tool show the name of the mod you were editing? Does the mod shows checked checkboxes for features you already have in your mod?
  3. Check some more checkboxes, confirm your selection. Look that no pre-existing files was altered (for example: main.lua, metadata.xml or contents/) other than the ones you wanted to create. If only new files were created: success.

==

Game launcher & Extra commands

The "Atom boilua: Launch game" command should let the user launch the game from within the editor. In addition, custom commands specified by the user should be executed. Commands should be executed with proper space escaping and quoting.

Files

  • lib/idelike/index.coffee
  • lib/idelike/game_launcher.coffee

Validation

Open atom, and run the "Atom boilua: Launch game" command (default key is f6). If Isaac launched through Steam, and that all additional commands were executed properly, the test passed. The "Additional commands" must at least contain two commands, and a make use of space escaping using backslashes and quotation marks.

==

Log Monitoring

When the game is launched through the "Atom boilua: Launch game" command, Atom-boilua starts monitoring the isaac log file for error messages. When one comes up, the editor can adopt one of three behaviors depending on the circumstance:

  1. The file where the error occurred is currently opened: in this case, the editor displays an error message, takes the window focus, and jumps at the line where the error occured.
  2. The file where the error occurred is in the same mod directory as the currently opened file: In this case, the editor opens the given file and repeats the steps described above.
  3. The file is in another mod folder: In this case, the editor does not take focus, but shows a warning message, in which a button letting you jump to the broken file is displayed. If you click that button, the step explained above takes course.

The error detection mechanism tries to be clever about when to detect errors. Notably, if the error comes from a callback which is called repetitively, it is suspended until the file where the error occurred gets modified and saved. It also waits a bit before resuming so the user can reload the mod through the dropdown console.

Files

  • lib/idelike/game_launcher.coffee
  • lib/idelike/isaac_log_observer.coffee
  • lib/idelike/log_observer.coffee
  • lib/idelike/index.coffee
  • lib/idelike/isaac_error_handler.coffee

Validation

  1. Make a mod with a simple callback with an error that only triggers when the callback is called (typically, try to call an non-existing function)
  2. Start the game through the "Atom boilua: Launch game" command. Start a run, monitor the log file through a third party tool. Observe what happen when an error shows up.
    • When you have the erroneous file open, the editor should take focus, move your cursor to the faulty line, make a little blinking animation and show details about what happen.
    • When you have a file open in the same mod directory as the one where the issue came out, the editor should take focus, switch to the file causing issue, move your cursor to the faulty line, make a little blinking animation and show details about what happen.
    • Finally, when you have a file in another mod directory open, the editor should not take focus. It should however display a notification with a button called Jump to file. When you hit that button, the behavior described above should be seen.