Plugins
Install
Plugins are installed the same way the total conversion script is. Please see there for specific instructions for your browser.
Available Plugins
- Compute AP Stats Shows the potential AP an agent could obtain by destroying and rebuilding all the portals in the current zoom area.
- Draw Tools allows to draw circles and lines on the map to aid you with planning your next big field. View screenshot
- Guess Player Level looks for the highest placed resonator per player in the current view to guess the player level.
- Highlight Weakened Portals fill portals with red to indicate portal's state of disrepair. The brighter the color the more attention needed (recharge, shields, resonators). A dashed portal means a resonator is missing.
- Player Tracker Draws trails for user actions in the last hour. At the last known location there’s a tooltip that shows the data in a table. View screenshot.
- Render Limit Increase increases render limits. Good for high density areas (e.g. London, UK) and faster PCs.
- Resonator Display Zoom Level Decrease Resonator start displaying earlier.
- Show Portal Address Shows portal address in the side panel.
available only with the development version
Read HACKING.md file to learn how to build the development version yourself. If and only if you have read how to report bugs, you may beta test the nightly version.
Hacking
Plugins may be developed in the same way as the total conversion script. Plugins may provide features tailored to specific needs and are allowed to change things as they see fit. You can provide them separately or submit a pull request to have them managed in this repository. If you think a hook in the main script is required, simply open a bug report.
You can use the guess player level script as an example to get you started. Just update the names and the part between // PLUGIN START
and // PLUGIN END
and you should be able to develop your plugin. The other code ensures your plugin is executed after the main script. Read the common HACKING.md file for general tips and requirements.
If you happen the write general purpose functions for your plugin, consider adding them to the main script instead. For example, if you write a getResoCountFromPortal(details)
function it may be very well added to code/portal_info.js
.
External Dependencies
If you have external dependencies put them into external/
and add a version number to their filename. I will put them in dist/
once required. Don’t forget to add a note about author and license in main README.md
.
Available Hooks
Available hooks are documented in the code. Please refer to the boilerplate explanation in hooks.js
to see which are available and how to listen for them. If you need additional hooks, open bug reports (preferably with patches attached).