Merge pull request #144 from garakmon/wild_encounters

Wild Encounters Editing
This commit is contained in:
garak 2019-09-10 20:31:01 -04:00 committed by GitHub
commit 029c4fddfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 1813 additions and 171 deletions

View file

@ -15,6 +15,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
- Support metatile labels file introduced in pokeruby and pokeemerald commits [ad365a35c1536740cbcbc10bee66e5dd908c39e7](https://github.com/pret/pokeruby/commit/ad365a35c1536740cbcbc10bee66e5dd908c39e7) and [c68ba9f4e8e260f2e3389eccd15f6ee5f4bdcd3e](https://github.com/pret/pokeemerald/commit/c68ba9f4e8e260f2e3389eccd15f6ee5f4bdcd3e).
### Changed
- Add wild encounter table editor.
- Exporting map images is now more configurable. Events, connections, collision, etc. can be toggled on and off before exporting the image.
- The entire Tileset Editor selection is now conveniently flipped when selecting x-flip or y-flip.
- Autocomplete for porymap's comboboxes no longer require typing the full string prefix.

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

View file

@ -15,6 +15,7 @@ Porymap Documentation
manual/editing-map-events
manual/editing-map-header
manual/editing-map-connections
manual/editing-wild-encounters
manual/region-map-editor
.. toctree::

View file

@ -0,0 +1,113 @@
***********************
Editing Wild Encounters
***********************
porymap provides a tab for editing the wild pokemon encounter JSON data.
Navigate to the "Wild Pokemon" tab in porymap's main window.
If you open the tab and there are no wild encounters for the current map, you
will see an empty screen (pictured below). Adding wild pokemon data is as
simple as :ref:`adding new encounter groups <add-encounter-groups>`.
.. figure:: images/editing-wild-encounters/no-encounters.png
:alt: Empty Encounter Tab
Empty Encounter Tab
Otherwise, you should see something similar to this:
.. figure:: images/editing-wild-encounters/populated-encounter-tab.png
:alt: Populated Encounter Tab
Populated Encounter Tab
The tab for each field is active or disabled based on the encounter data for a
given map. If a tab is disabled, you can activate it, and therefore activate
a new encounter field for the map. To activate a field, right-click on the
tab name for the field you want to add.
.. figure:: images/editing-wild-encounters/activate-tab.png
:alt: Activate Encounter Field
Activate Encounter Field
Editing the wild encounters is otherwise pretty straightforward. You can
adjust the minimum and maximum levels, the encounter rate, and species with the
ui.
.. _add-encounter-groups:
Adding New Encounter Groups
---------------------------
An encounter group is just another set of wild encounters that are available
for a single map. In the vanilla games, only Altering Cave uses multiple
encounter groups, but there are several reasons you might want them.
In order to create a new encounter group, click the green (+) button next to
the Group drop-down. It will bring up this menu:
.. figure:: images/editing-wild-encounters/new-group-window.png
:alt: New Encounter Group Window
New Encounter Group Window
You can give your new encounter group a name (this must be uniqe, which is
enforced), and you can choose which fields to activate for the group. Checking
the "copy from current group" box will copy not only the active fields but also
the wild pokemon data for each field from the currently displayed group.
One possible use for having multiple encounter groups for a single map is to
implement time of day encounters.
.. figure:: images/editing-wild-encounters/time-of-day-encounter-group.gif
:alt: Time of Day Encounter Groups
Time of Day Encounter Groups
.. _configure-encounter-json:
Configuring the Wild Encounter Fields
-------------------------------------
An encounter field describes a group of wild encounters. This includes the name
of the field, a default number of pokemon in that field, and the encounter
ratio for each index in that field. These are all things you may want to
change. Click on the *Configure JSON...* button to bring up this window:
.. figure:: images/editing-wild-encounters/configure-json.png
:alt: Configure JSON Window
Configure JSON Window
The Field drop-down will allow you select which field you want to manipulate.
You can add a new one with the *Add New Field...* button. The green (+) and
red (-) buttons add and take away encounter slots for the field. For each slot
you will see an adjustible number. This represents the encounter chance for a
pokemon at this index out of the total.
Let's add a ``headbutt_mons`` field to our wild encounters...
First, we'll add a new field and name it ``headbutt_mons``.
.. figure:: images/editing-wild-encounters/configure-json-new-field.png
:alt: New Field Name
New Field Name
Then, we want four slots in this field, and we set encounter ratios for each
slot.
.. figure:: images/editing-wild-encounters/headbutt-mon-field.png
If we accept the changes, we can now assign pokemon to each slots, and adjust
the levels.
.. figure:: images/editing-wild-encounters/headbutt-mons.png
Changes made to the wild encounters are not saved to disk until you save the map.

View file

@ -7,13 +7,18 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
The **"Breaking Changes"** listed below are changes that have been made in the decompilation projects (e.g. pokeemerald), which porymap requires in order to work properly. If porymap is used on a project that is not up-to-date with the breaking changes, then porymap will likely break or behave improperly.
## [Unreleased]
### Breaking Changes
- Accomodate event object graphics pointer table being explicitly indexed. From changes introduced in commits [cdae0c1444bed98e652c87dc3e3edcecacfef8be](https://github.com/pret/pokeemerald/commit/cdae0c1444bed98e652c87dc3e3edcecacfef8be) and [0e8ccfc4fd3544001f4c25fafd401f7558bdefba](https://github.com/pret/pokeruby/commit/0e8ccfc4fd3544001f4c25fafd401f7558bdefba).
### Added
- Add warning when closing porymap with unsaved changes.
- Support metatile labels file introduced in pokeruby and pokeemerald commits [ad365a35c1536740cbcbc10bee66e5dd908c39e7](https://github.com/pret/pokeruby/commit/ad365a35c1536740cbcbc10bee66e5dd908c39e7) and [c68ba9f4e8e260f2e3389eccd15f6ee5f4bdcd3e](https://github.com/pret/pokeemerald/commit/c68ba9f4e8e260f2e3389eccd15f6ee5f4bdcd3e).
### Changed
- Add wild encounter table editor.
- Exporting map images is now more configurable. Events, connections, collision, etc. can be toggled on and off before exporting the image.
- The entire Tileset Editor selection is now conveniently flipped when selecting x-flip or y-flip.
- Autocomplete for porymap's comboboxes are no longer requires typing the full string prefix.
- Autocomplete for porymap's comboboxes no longer require typing the full string prefix.
### Fixed
- Fix bug where map group names were hardcoded when creating a new map.
@ -21,6 +26,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
- Fix bug where line breaks in C headers were not parsed properly.
- Fix bug when exporting tileset images using palettes with duplicate colors.
- Fix bug where creating new maps from existing layouts created an empty layout folder.
- Fix bug where exported tile images did not contain the last row of tiles.
## [1.2.2] - 2019-05-16

View file

@ -133,6 +133,11 @@
<li class="toctree-l2"><a class="reference internal" href="manual/editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manual/editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manual/editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="manual/editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manual/region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manual/region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="manual/region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -145,6 +150,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#fixed">Fixed</a></li>
@ -162,20 +168,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference/related-projects.html">Related Projects</a></li>

View file

@ -133,6 +133,11 @@
<li class="toctree-l2"><a class="reference internal" href="manual/editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manual/editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manual/editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="manual/editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manual/region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manual/region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="manual/region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -145,6 +150,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#fixed">Fixed</a></li>
@ -162,20 +168,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference/related-projects.html">Related Projects</a></li>
@ -305,6 +311,11 @@
<li class="toctree-l2"><a class="reference internal" href="manual/editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manual/editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manual/editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="manual/editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manual/region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manual/region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="manual/region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -322,8 +333,8 @@
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id1">1.2.2 - 2019-05-16</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id5">1.2.1 - 2019-02-16</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id8">1.2.0 - 2019-02-04</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id12">1.1.0 - 2018-12-27</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id13">1.1.0 - 2018-12-27</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference/related-projects.html">Related Projects</a></li>

View file

@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>

View file

@ -36,7 +36,7 @@
<link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="The Region Map Editor" href="region-map-editor.html" />
<link rel="next" title="Editing Wild Encounters" href="editing-wild-encounters.html" />
<link rel="prev" title="Editing Map Headers" href="editing-map-header.html" />
</head>
@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>
@ -277,7 +283,7 @@
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="region-map-editor.html" class="btn btn-neutral float-right" title="The Region Map Editor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="editing-wild-encounters.html" class="btn btn-neutral float-right" title="Editing Wild Encounters" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="editing-map-header.html" class="btn btn-neutral float-left" title="Editing Map Headers" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

View file

@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>

View file

@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>

View file

@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>

View file

@ -0,0 +1,388 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Editing Wild Encounters &mdash; porymap documentation</title>
<script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="The Region Map Editor" href="region-map-editor.html" />
<link rel="prev" title="Editing Map Connections" href="editing-map-connections.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: linear-gradient(180deg, #08ACD5 50%, #FF6262 0%);" >
<a href="../index.html" class="icon icon-home"> porymap
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">User Manual</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a><ul>
<li class="toctree-l2"><a class="reference internal" href="introduction.html#about-porymap">About Porymap</a></li>
<li class="toctree-l2"><a class="reference internal" href="introduction.html#getting-started">Getting Started</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="navigation.html">Navigation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="navigation.html#map-list">Map List</a></li>
<li class="toctree-l2"><a class="reference internal" href="navigation.html#main-window">Main Window</a></li>
<li class="toctree-l2"><a class="reference internal" href="navigation.html#tileset-editor">Tileset Editor</a></li>
<li class="toctree-l2"><a class="reference internal" href="navigation.html#region-map-editor">Region Map Editor</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-map-tiles.html">Editing Map Tiles</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#visual-options">Visual Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#selecting-metatiles">Selecting Metatiles</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#pencil-tool">Pencil Tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#pointer-tool">Pointer Tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#bucket-fill-tool">Bucket Fill Tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#map-shift-tool">Map Shift Tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#smart-paths">Smart Paths</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#change-map-border">Change Map Border</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#change-map-tilesets">Change Map Tilesets</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-tiles.html#undo-redo">Undo &amp; Redo</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-map-collisions.html">Editing Map Collisions</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-map-collisions.html#selecting-collision-types">Selecting Collision Types</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-collisions.html#painting-collisions">Painting Collisions</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-collisions.html#collision-types">Collision Types</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-map-events.html">Editing Map Events</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#events-positions">Events Positions</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#event-objects">Event Objects</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#event-warps">Event Warps</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#event-triggers">Event Triggers</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#event-weather-triggers">Event Weather Triggers</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#event-signs">Event Signs</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#event-hidden-item">Event Hidden Item</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#event-secret-base">Event Secret Base</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#adding-deleting-events">Adding &amp; Deleting Events</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-events.html#open-map-scripts">Open Map Scripts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-map-header.html">Editing Map Headers</a></li>
<li class="toctree-l1"><a class="reference internal" href="editing-map-connections.html">Editing Map Connections</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#dive-emerge-warps">Dive &amp; Emerge Warps</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#mirror-connections">Mirror Connections</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-entries-tab">Map Entries Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#city-maps">City Maps</a></li>
</ul>
</li>
</ul>
<p class="caption"><span class="caption-text">Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id1">1.2.2 - 2019-05-16</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id2">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id3">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id4">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id5">1.2.1 - 2019-02-16</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id6">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id7">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">porymap</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Docs</a> &raquo;</li>
<li>Editing Wild Encounters</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/huderlem/porymap/blob/master/docsrc/manual/editing-wild-encounters.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="editing-wild-encounters">
<h1>Editing Wild Encounters<a class="headerlink" href="#editing-wild-encounters" title="Permalink to this headline"></a></h1>
<p>porymap provides a tab for editing the wild pokemon encounter JSON data.
Navigate to the “Wild Pokemon” tab in porymaps main window.</p>
<p>If you open the tab and there are no wild encounters for the current map, you
will see an empty screen (pictured below). Adding wild pokemon data is as
simple as <a class="reference internal" href="#add-encounter-groups"><span class="std std-ref">adding new encounter groups</span></a>.</p>
<div class="figure" id="id1">
<img alt="Empty Encounter Tab" src="../_images/no-encounters.png" />
<p class="caption"><span class="caption-text">Empty Encounter Tab</span></p>
</div>
<p>Otherwise, you should see something similar to this:</p>
<div class="figure" id="id2">
<img alt="Populated Encounter Tab" src="../_images/populated-encounter-tab.png" />
<p class="caption"><span class="caption-text">Populated Encounter Tab</span></p>
</div>
<p>The tab for each field is active or disabled based on the encounter data for a
given map. If a tab is disabled, you can activate it, and therefore activate
a new encounter field for the map. To activate a field, right-click on the
tab name for the field you want to add.</p>
<div class="figure" id="id3">
<img alt="Activate Encounter Field" src="../_images/activate-tab.png" />
<p class="caption"><span class="caption-text">Activate Encounter Field</span></p>
</div>
<p>Editing the wild encounters is otherwise pretty straightforward. You can
adjust the minimum and maximum levels, the encounter rate, and species with the
ui.</p>
<div class="section" id="adding-new-encounter-groups">
<span id="add-encounter-groups"></span><h2>Adding New Encounter Groups<a class="headerlink" href="#adding-new-encounter-groups" title="Permalink to this headline"></a></h2>
<p>An encounter group is just another set of wild encounters that are available
for a single map. In the vanilla games, only Altering Cave uses multiple
encounter groups, but there are several reasons you might want them.</p>
<p>In order to create a new encounter group, click the green (+) button next to
the Group drop-down. It will bring up this menu:</p>
<div class="figure" id="id4">
<img alt="New Encounter Group Window" src="../_images/new-group-window.png" />
<p class="caption"><span class="caption-text">New Encounter Group Window</span></p>
</div>
<p>You can give your new encounter group a name (this must be uniqe, which is
enforced), and you can choose which fields to activate for the group. Checking
the “copy from current group” box will copy not only the active fields but also
the wild pokemon data for each field from the currently displayed group.</p>
<p>One possible use for having multiple encounter groups for a single map is to
implement time of day encounters.</p>
<div class="figure" id="id5">
<img alt="Time of Day Encounter Groups" src="../_images/time-of-day-encounter-group.gif" />
<p class="caption"><span class="caption-text">Time of Day Encounter Groups</span></p>
</div>
</div>
<div class="section" id="configuring-the-wild-encounter-fields">
<span id="configure-encounter-json"></span><h2>Configuring the Wild Encounter Fields<a class="headerlink" href="#configuring-the-wild-encounter-fields" title="Permalink to this headline"></a></h2>
<p>An encounter field describes a group of wild encounters. This includes the name
of the field, a default number of pokemon in that field, and the encounter
ratio for each index in that field. These are all things you may want to
change. Click on the <em>Configure JSON…</em> button to bring up this window:</p>
<div class="figure" id="id6">
<img alt="Configure JSON Window" src="../_images/configure-json.png" />
<p class="caption"><span class="caption-text">Configure JSON Window</span></p>
</div>
<p>The Field drop-down will allow you select which field you want to manipulate.
You can add a new one with the <em>Add New Field…</em> button. The green (+) and
red (-) buttons add and take away encounter slots for the field. For each slot
you will see an adjustible number. This represents the encounter chance for a
pokemon at this index out of the total.</p>
<p>Lets add a <code class="docutils literal notranslate"><span class="pre">headbutt_mons</span></code> field to our wild encounters…</p>
<p>First, well add a new field and name it <code class="docutils literal notranslate"><span class="pre">headbutt_mons</span></code>.</p>
<div class="figure" id="id7">
<img alt="New Field Name" src="../_images/configure-json-new-field.png" />
<p class="caption"><span class="caption-text">New Field Name</span></p>
</div>
<p>Then, we want four slots in this field, and we set encounter ratios for each
slot.</p>
<div class="figure">
<img alt="../_images/headbutt-mon-field.png" src="../_images/headbutt-mon-field.png" />
</div>
<p>If we accept the changes, we can now assign pokemon to each slots, and adjust
the levels.</p>
<div class="figure">
<img alt="../_images/headbutt-mons.png" src="../_images/headbutt-mons.png" />
</div>
<p>Changes made to the wild encounters are not saved to disk until you save the map.</p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="region-map-editor.html" class="btn btn-neutral float-right" title="The Region Map Editor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="editing-map-connections.html" class="btn btn-neutral float-left" title="Editing Map Connections" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2019, huderlem
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View file

@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>

View file

@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>

View file

@ -37,7 +37,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Changelog" href="../reference/changelog.html" />
<link rel="prev" title="Editing Map Connections" href="editing-map-connections.html" />
<link rel="prev" title="Editing Wild Encounters" href="editing-wild-encounters.html" />
</head>
<body class="wy-body-for-nav">
@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="../reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reference/related-projects.html">Related Projects</a></li>
@ -360,7 +366,7 @@ but that functionality will be added in a future update.</p>
<a href="../reference/changelog.html" class="btn btn-neutral float-right" title="Changelog" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="editing-map-connections.html" class="btn btn-neutral float-left" title="Editing Map Connections" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="editing-wild-encounters.html" class="btn btn-neutral float-left" title="Editing Wild Encounters" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>

Binary file not shown.

View file

@ -134,6 +134,11 @@
<li class="toctree-l2"><a class="reference internal" href="../manual/editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../manual/editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../manual/editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="../manual/editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../manual/region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../manual/region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="../manual/region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -146,6 +151,7 @@
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="#fixed">Fixed</a></li>
@ -163,20 +169,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="related-projects.html">Related Projects</a></li>
@ -254,18 +260,26 @@ and this project somewhat adheres to <a class="reference external" href="https:/
<p>The <strong>“Breaking Changes”</strong> listed below are changes that have been made in the decompilation projects (e.g. pokeemerald), which porymap requires in order to work properly. If porymap is used on a project that is not up-to-date with the breaking changes, then porymap will likely break or behave improperly.</p>
<div class="section" id="unreleased">
<h2><a class="reference external" href="https://github.com/huderlem/porymap/compare/1.2.2...HEAD">Unreleased</a><a class="headerlink" href="#unreleased" title="Permalink to this headline"></a></h2>
<div class="section" id="breaking-changes">
<h3>Breaking Changes<a class="headerlink" href="#breaking-changes" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Accomodate event object graphics pointer table being explicitly indexed. From changes introduced in commits <a class="reference external" href="https://github.com/pret/pokeemerald/commit/cdae0c1444bed98e652c87dc3e3edcecacfef8be">cdae0c1444bed98e652c87dc3e3edcecacfef8be</a> and <a class="reference external" href="https://github.com/pret/pokeruby/commit/0e8ccfc4fd3544001f4c25fafd401f7558bdefba">0e8ccfc4fd3544001f4c25fafd401f7558bdefba</a>.</li>
</ul>
</div>
<div class="section" id="added">
<h3>Added<a class="headerlink" href="#added" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Add warning when closing porymap with unsaved changes.</li>
<li>Support metatile labels file introduced in pokeruby and pokeemerald commits <a class="reference external" href="https://github.com/pret/pokeruby/commit/ad365a35c1536740cbcbc10bee66e5dd908c39e7">ad365a35c1536740cbcbc10bee66e5dd908c39e7</a> and <a class="reference external" href="https://github.com/pret/pokeemerald/commit/c68ba9f4e8e260f2e3389eccd15f6ee5f4bdcd3e">c68ba9f4e8e260f2e3389eccd15f6ee5f4bdcd3e</a>.</li>
</ul>
</div>
<div class="section" id="changed">
<h3>Changed<a class="headerlink" href="#changed" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Add wild encounter table editor.</li>
<li>Exporting map images is now more configurable. Events, connections, collision, etc. can be toggled on and off before exporting the image.</li>
<li>The entire Tileset Editor selection is now conveniently flipped when selecting x-flip or y-flip.</li>
<li>Autocomplete for porymaps comboboxes are no longer requires typing the full string prefix.</li>
<li>Autocomplete for porymaps comboboxes no longer require typing the full string prefix.</li>
</ul>
</div>
<div class="section" id="fixed">
@ -276,6 +290,7 @@ and this project somewhat adheres to <a class="reference external" href="https:/
<li>Fix bug where line breaks in C headers were not parsed properly.</li>
<li>Fix bug when exporting tileset images using palettes with duplicate colors.</li>
<li>Fix bug where creating new maps from existing layouts created an empty layout folder.</li>
<li>Fix bug where exported tile images did not contain the last row of tiles.</li>
</ul>
</div>
</div>
@ -328,14 +343,14 @@ and this project somewhat adheres to <a class="reference external" href="https:/
</div>
<div class="section" id="id8">
<h2><a class="reference external" href="https://github.com/huderlem/porymap/compare/1.1.0...1.2.0">1.2.0</a> - 2019-02-04<a class="headerlink" href="#id8" title="Permalink to this headline"></a></h2>
<div class="section" id="breaking-changes">
<h3>Breaking Changes<a class="headerlink" href="#breaking-changes" title="Permalink to this headline"></a></h3>
<div class="section" id="id9">
<h3>Breaking Changes<a class="headerlink" href="#id9" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>New JSON map data format in pokeemerald and pokeruby from commits <a class="reference external" href="https://github.com/pret/pokeemerald/commit/82abc164dc9f6a74fdf0c535cc1621b7ed05318b">82abc164dc9f6a74fdf0c535cc1621b7ed05318b</a> and <a class="reference external" href="https://github.com/pret/pokeruby/commit/a0ba1b7c6353f7e4f3066025514c05b323a0123d">a0ba1b7c6353f7e4f3066025514c05b323a0123d</a>.</li>
</ul>
</div>
<div class="section" id="id9">
<h3>Added<a class="headerlink" href="#id9" title="Permalink to this headline"></a></h3>
<div class="section" id="id10">
<h3>Added<a class="headerlink" href="#id10" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Add “magic fill” mode to fill tool (hold down CTRL key). This fills all matching metatiles on the map, rather than only the contiguous region.</li>
<li>Add ability to import tileset palettes (JASC, .pal, .tpl, .gpl, .act).</li>
@ -348,8 +363,8 @@ and this project somewhat adheres to <a class="reference external" href="https:/
<li>Add ability to define custom fields for map header and all events.</li>
</ul>
</div>
<div class="section" id="id10">
<h3>Changed<a class="headerlink" href="#id10" title="Permalink to this headline"></a></h3>
<div class="section" id="id11">
<h3>Changed<a class="headerlink" href="#id11" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Collapse the map list by default.</li>
<li>Collision view now has a transparency slider to help make it easier to view the underlying metatiles.</li>
@ -363,8 +378,8 @@ and this project somewhat adheres to <a class="reference external" href="https:/
<li>The tiles image in the tileset editor will no longer flip according to the x/y flip checkboxes. The individual tile selection still flips, though.</li>
</ul>
</div>
<div class="section" id="id11">
<h3>Fixed<a class="headerlink" href="#id11" title="Permalink to this headline"></a></h3>
<div class="section" id="id12">
<h3>Fixed<a class="headerlink" href="#id12" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Fix bug where smart paths could be auto-enabled, despite the checkbox being disabled.</li>
<li>Fix crash that could occur when changing the palette id in the tileset palette editor.</li>
@ -373,32 +388,32 @@ and this project somewhat adheres to <a class="reference external" href="https:/
</ul>
</div>
</div>
<div class="section" id="id12">
<h2><a class="reference external" href="https://github.com/huderlem/porymap/compare/1.0.0...1.1.0">1.1.0</a> - 2018-12-27<a class="headerlink" href="#id12" title="Permalink to this headline"></a></h2>
<div class="section" id="id13">
<h3>Breaking Changes<a class="headerlink" href="#id13" title="Permalink to this headline"></a></h3>
<h2><a class="reference external" href="https://github.com/huderlem/porymap/compare/1.0.0...1.1.0">1.1.0</a> - 2018-12-27<a class="headerlink" href="#id13" title="Permalink to this headline"></a></h2>
<div class="section" id="id14">
<h3>Breaking Changes<a class="headerlink" href="#id14" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>New map header format in pokeemerald from commit <a class="reference external" href="https://github.com/pret/pokeemerald/commit/a1ea3b5e394bc115ba9b86348c161094a00dcca7">a1ea3b5e394bc115ba9b86348c161094a00dcca7</a>.</li>
</ul>
</div>
<div class="section" id="id14">
<h3>Added<a class="headerlink" href="#id14" title="Permalink to this headline"></a></h3>
<div class="section" id="id15">
<h3>Added<a class="headerlink" href="#id15" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Add <code class="docutils literal notranslate"><span class="pre">porymap.project.cfg</span></code> config file to project repos, in order to house project-specific settings, such as <code class="docutils literal notranslate"><span class="pre">base_game_version=pokeemerald</span></code>.</li>
<li>Write all logs to <code class="docutils literal notranslate"><span class="pre">porymap.log</span></code> file, so users can view any errors that porymap hits.</li>
<li>Changelog</li>
</ul>
</div>
<div class="section" id="id15">
<h3>Changed<a class="headerlink" href="#id15" title="Permalink to this headline"></a></h3>
<div class="section" id="id16">
<h3>Changed<a class="headerlink" href="#id16" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Add <code class="docutils literal notranslate"><span class="pre">porymap.cfg</span></code> base config file, rather than using built-in system settings (e.g. registry on Windows).</li>
<li>Properly read/write map headers for <code class="docutils literal notranslate"><span class="pre">pokeemerald</span></code>.</li>
<li>Overhauled event editing pane, which now contains tabs for each different event. Events of the same type can be iterated through using the spinner at the top of the tab. This makes it possible to edit events that are outside the viewing window.</li>
</ul>
</div>
<div class="section" id="id16">
<h3>Fixed<a class="headerlink" href="#id16" title="Permalink to this headline"></a></h3>
<div class="section" id="id17">
<h3>Fixed<a class="headerlink" href="#id17" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Creating new hidden-item events now uses a valid default flag value.</li>
<li>Fix bug where tilesets were sometimes not displaying their bottom row of metatiles.</li>
@ -411,8 +426,8 @@ and this project somewhat adheres to <a class="reference external" href="https:/
</ul>
</div>
</div>
<div class="section" id="id17">
<h2><a class="reference external" href="https://github.com/huderlem/porymap/tree/1.0.0">1.0.0</a> - 2018-10-26<a class="headerlink" href="#id17" title="Permalink to this headline"></a></h2>
<div class="section" id="id18">
<h2><a class="reference external" href="https://github.com/huderlem/porymap/tree/1.0.0">1.0.0</a> - 2018-10-26<a class="headerlink" href="#id18" title="Permalink to this headline"></a></h2>
<p>This was the initial release.</p>
</div>
</div>

View file

@ -133,6 +133,11 @@
<li class="toctree-l2"><a class="reference internal" href="../manual/editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../manual/editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../manual/editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="../manual/editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../manual/region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../manual/region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="../manual/region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -145,6 +150,7 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#fixed">Fixed</a></li>
@ -162,20 +168,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Related Projects</a></li>

View file

@ -133,6 +133,11 @@
<li class="toctree-l2"><a class="reference internal" href="manual/editing-map-connections.html#follow-connections">Follow Connections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manual/editing-wild-encounters.html">Editing Wild Encounters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manual/editing-wild-encounters.html#adding-new-encounter-groups">Adding New Encounter Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="manual/editing-wild-encounters.html#configuring-the-wild-encounter-fields">Configuring the Wild Encounter Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manual/region-map-editor.html">The Region Map Editor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manual/region-map-editor.html#background-image-tab">Background Image Tab</a></li>
<li class="toctree-l2"><a class="reference internal" href="manual/region-map-editor.html#map-layout-tab">Map Layout Tab</a></li>
@ -145,6 +150,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="reference/changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#unreleased">Unreleased</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#added">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#fixed">Fixed</a></li>
@ -162,20 +168,20 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id8">1.2.0 - 2019-02-04</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#breaking-changes">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id9">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id10">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id11">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id9">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id10">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id11">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id12">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id12">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id13">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id14">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id15">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id16">Fixed</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id13">1.1.0 - 2018-12-27</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id14">Breaking Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id15">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id16">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/changelog.html#id17">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id17">1.0.0 - 2018-10-26</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference/changelog.html#id18">1.0.0 - 2018-10-26</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference/related-projects.html">Related Projects</a></li>

File diff suppressed because one or more lines are too long

View file

@ -15,6 +15,7 @@ Porymap Documentation
manual/editing-map-events
manual/editing-map-header
manual/editing-map-connections
manual/editing-wild-encounters
manual/region-map-editor
.. toctree::

View file

@ -0,0 +1,113 @@
***********************
Editing Wild Encounters
***********************
porymap provides a tab for editing the wild pokemon encounter JSON data.
Navigate to the "Wild Pokemon" tab in porymap's main window.
If you open the tab and there are no wild encounters for the current map, you
will see an empty screen (pictured below). Adding wild pokemon data is as
simple as :ref:`adding new encounter groups <add-encounter-groups>`.
.. figure:: images/editing-wild-encounters/no-encounters.png
:alt: Empty Encounter Tab
Empty Encounter Tab
Otherwise, you should see something similar to this:
.. figure:: images/editing-wild-encounters/populated-encounter-tab.png
:alt: Populated Encounter Tab
Populated Encounter Tab
The tab for each field is active or disabled based on the encounter data for a
given map. If a tab is disabled, you can activate it, and therefore activate
a new encounter field for the map. To activate a field, right-click on the
tab name for the field you want to add.
.. figure:: images/editing-wild-encounters/activate-tab.png
:alt: Activate Encounter Field
Activate Encounter Field
Editing the wild encounters is otherwise pretty straightforward. You can
adjust the minimum and maximum levels, the encounter rate, and species with the
ui.
.. _add-encounter-groups:
Adding New Encounter Groups
---------------------------
An encounter group is just another set of wild encounters that are available
for a single map. In the vanilla games, only Altering Cave uses multiple
encounter groups, but there are several reasons you might want them.
In order to create a new encounter group, click the green (+) button next to
the Group drop-down. It will bring up this menu:
.. figure:: images/editing-wild-encounters/new-group-window.png
:alt: New Encounter Group Window
New Encounter Group Window
You can give your new encounter group a name (this must be uniqe, which is
enforced), and you can choose which fields to activate for the group. Checking
the "copy from current group" box will copy not only the active fields but also
the wild pokemon data for each field from the currently displayed group.
One possible use for having multiple encounter groups for a single map is to
implement time of day encounters.
.. figure:: images/editing-wild-encounters/time-of-day-encounter-group.gif
:alt: Time of Day Encounter Groups
Time of Day Encounter Groups
.. _configure-encounter-json:
Configuring the Wild Encounter Fields
-------------------------------------
An encounter field describes a group of wild encounters. This includes the name
of the field, a default number of pokemon in that field, and the encounter
ratio for each index in that field. These are all things you may want to
change. Click on the *Configure JSON...* button to bring up this window:
.. figure:: images/editing-wild-encounters/configure-json.png
:alt: Configure JSON Window
Configure JSON Window
The Field drop-down will allow you select which field you want to manipulate.
You can add a new one with the *Add New Field...* button. The green (+) and
red (-) buttons add and take away encounter slots for the field. For each slot
you will see an adjustible number. This represents the encounter chance for a
pokemon at this index out of the total.
Let's add a ``headbutt_mons`` field to our wild encounters...
First, we'll add a new field and name it ``headbutt_mons``.
.. figure:: images/editing-wild-encounters/configure-json-new-field.png
:alt: New Field Name
New Field Name
Then, we want four slots in this field, and we set encounter ratios for each
slot.
.. figure:: images/editing-wild-encounters/headbutt-mon-field.png
If we accept the changes, we can now assign pokemon to each slots, and adjust
the levels.
.. figure:: images/editing-wild-encounters/headbutt-mons.png
Changes made to the wild encounters are not saved to disk until you save the map.

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

View file

@ -561,8 +561,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>522</width>
<height>601</height>
<width>545</width>
<height>587</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_8">
@ -876,8 +876,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>259</width>
<height>70</height>
<width>256</width>
<height>74</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
@ -1064,10 +1064,10 @@
</property>
<property name="geometry">
<rect>
<x>0</x>
<x>8</x>
<y>0</y>
<width>263</width>
<height>338</height>
<width>221</width>
<height>328</height>
</rect>
</property>
<property name="sizePolicy">
@ -1344,8 +1344,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>385</width>
<height>652</height>
<width>371</width>
<height>643</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_7">
@ -1617,8 +1617,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>432</width>
<height>554</height>
<width>430</width>
<height>534</height>
</rect>
</property>
<property name="sizePolicy">
@ -2531,8 +2531,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>829</width>
<height>543</height>
<width>818</width>
<height>539</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_14">
@ -2693,6 +2693,98 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_WildMons">
<attribute name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/tall_grass.ico</normaloff>:/icons/tall_grass.ico</iconset>
</attribute>
<attribute name="title">
<string>Wild Pokemon</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QFrame" name="frame_WildMonInfo">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>Group</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_EncounterGroupLabel">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_NewWildMonGroup">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Create a new group for wild pokemon data on this map.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/add.ico</normaloff>:/icons/add.ico</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_ConfigureEncountersJSON">
<property name="text">
<string>Configure JSON...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="stackedWidget_WildMons">
<widget class="QWidget" name="page"/>
<widget class="QWidget" name="page_2"/>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>

View file

@ -96,9 +96,12 @@ class ProjectConfig: public KeyValueConfigBase
public:
ProjectConfig() {
this->baseGameVersion = BaseGameVersion::pokeemerald;
this->useEncounterJson = true;
}
void setBaseGameVersion(BaseGameVersion baseGameVersion);
BaseGameVersion getBaseGameVersion();
void setEncounterJsonActive(bool active);
bool getEncounterJsonActive();
void setProjectDir(QString projectDir);
protected:
QString getConfigFilepath();
@ -108,6 +111,7 @@ protected:
private:
BaseGameVersion baseGameVersion;
QString projectDir;
bool useEncounterJson;
};
extern ProjectConfig projectConfig;

View file

@ -0,0 +1,28 @@
#ifndef GUARD_WILDMONINFO_H
#define GUARD_WILDMONINFO_H
#include <QtWidgets>
struct WildPokemon {
int minLevel;
int maxLevel;
QString species;
};
struct WildMonInfo {
bool active = false;
int encounterRate = 0;
QVector<WildPokemon> wildPokemon;
};
struct WildPokemonHeader {
QMap<QString, WildMonInfo> wildMons;
};
typedef QVector<QPair<QString, QVector<int>>> Fields;
typedef QPair<QString, QVector<int>> Field;
WildMonInfo getDefaultMonInfo(Field field);
WildMonInfo copyMonInfoFromTab(QTableWidget *table);
#endif // GUARD_WILDMONINFO_H

View file

@ -43,6 +43,8 @@ public:
void redo();
void closeProject();
bool setMap(QString map_name);
void saveUiFields();
void saveEncounterTabData();
void displayMap();
void displayMetatileSelector();
void displayMapMetatiles();
@ -56,11 +58,13 @@ public:
void displayMapConnections();
void displayMapBorder();
void displayMapGrid();
void displayWildMonTables();
void setEditingMap();
void setEditingCollision();
void setEditingObjects();
void setEditingConnections();
void clearWildMonTabWidgets();
void setCurrentConnectionDirection(QString curDirection);
void updateCurrentConnectionDirection(QString curDirection);
void setConnectionsVisibility(bool visible);
@ -68,6 +72,7 @@ public:
void setConnectionMap(QString mapName);
void addNewConnection();
void removeCurrentConnection();
void addNewWildMonGroup();
void updateDiveMap(QString mapName);
void updateEmergeMap(QString mapName);
void setSelectedConnectionFromMap(QString mapName);
@ -75,6 +80,7 @@ public:
void updateSecondaryTileset(QString tilesetLabel, bool forceLoad = false);
void toggleBorderVisibility(bool visible);
void updateCustomMapHeaderValues(QTableWidget *);
void configureEncounterJSON();
Tileset *getCurrentMapPrimaryTileset();
DraggablePixmapItem *addMapEvent(Event *event);

View file

@ -145,6 +145,8 @@ private slots:
void on_pushButton_DeleteCustomHeaderField_clicked();
void on_tableWidget_CustomHeaderFields_cellChanged(int row, int column);
void on_horizontalSlider_MetatileZoom_valueChanged(int value);
void on_pushButton_NewWildMonGroup_clicked();
void on_pushButton_ConfigureEncountersJSON_clicked();
void on_actionRegion_Map_Editor_triggered();

View file

@ -5,11 +5,15 @@
#include "blockdata.h"
#include "heallocation.h"
#include "event.h"
#include "wildmoninfo.h"
#include "parseutil.h"
#include <QStringList>
#include <QList>
#include <QVector>
#include <QPair>
#include <QStandardItem>
#include <QVariant>
static QString NONE_MAP_CONSTANT = "MAP_NONE";
static QString NONE_MAP_NAME = "None";
@ -23,6 +27,7 @@ public:
QMap<QString, int> *map_groups;
QList<QStringList> groupedMapNames;
QStringList *mapNames = nullptr;
QMap<QString, QVariant> miscConstants;
QList<HealLocation> flyableMaps;
QMap<QString, QString>* mapConstantsToMapNames;
QMap<QString, QString>* mapNamesToMapConstants;
@ -83,6 +88,15 @@ public:
QString readMapLayoutId(QString map_name);
QString readMapLocation(QString map_name);
void readWildMonData();
QMap<QString, QMap<QString, WildPokemonHeader>> wildMonData;
QVector<QPair<QString, QVector<int>>> wildMonFields;
QVector<QString> encounterGroupLabels;
QMap<QString, QJsonObject> extraEncounterGroups;
void readSpeciesIconPaths();
QMap<QString, QString> speciesToIconPath;
QMap<QString, bool> getTopLevelMapFields();
bool loadMapData(Map*);
void readMapLayouts();
@ -101,6 +115,7 @@ public:
void saveAllDataStructures();
void saveMapLayouts();
void saveMapGroups();
void saveWildMonData();
void saveMapConstantsHeader();
void saveHealLocationStruct(Map*);
void saveTilesets(Tileset*, Tileset*);
@ -128,6 +143,7 @@ public:
void readBgEventFacingDirections();
void readMetatileBehaviors();
void readHealLocations();
void readMiscellaneousConstants();
void loadEventPixmaps(QList<Event*> objects);
QMap<QString, int> getEventObjGfxConstants();

41
include/ui/montabwidget.h Normal file
View file

@ -0,0 +1,41 @@
#ifndef MONTABWIDGET_H
#define MONTABWIDGET_H
#include "wildmoninfo.h"
#include <QtWidgets>
#include <QVector>
class Project;
class MonTabWidget : public QTabWidget {
Q_OBJECT
public:
explicit MonTabWidget(Project *project = nullptr, QWidget *parent = nullptr);
~MonTabWidget(){};
void populate();
void populateTab(int tabIndex, WildMonInfo monInfo, QString fieldName);
void clear();
void createSpeciesTableRow(QTableWidget *table, WildPokemon mon, int index, QString fieldName);
void clearTableAt(int index);
QTableWidget *tableAt(int tabIndex);
public slots:
void setTabActive(int index, bool active = true);
private:
bool eventFilter(QObject *object, QEvent *event);
void askActivateTab(int tabIndex, QPoint menuPos);
QVector<bool> activeTabs;
Project *project;
};
#endif // MONTABWIDGET_H

View file

@ -29,6 +29,7 @@ SOURCES += src/core/block.cpp \
src/core/tile.cpp \
src/core/tileset.cpp \
src/core/regionmap.cpp \
src/core/wildmoninfo.cpp \
src/ui/aboutporymap.cpp \
src/ui/bordermetatilespixmapitem.cpp \
src/ui/collisionpixmapitem.cpp \
@ -53,6 +54,7 @@ SOURCES += src/core/block.cpp \
src/ui/neweventtoolbutton.cpp \
src/ui/noscrollcombobox.cpp \
src/ui/noscrollspinbox.cpp \
src/ui/montabwidget.cpp \
src/ui/paletteeditor.cpp \
src/ui/selectablepixmapitem.cpp \
src/ui/tileseteditor.cpp \
@ -88,6 +90,7 @@ HEADERS += include/core/block.h \
include/core/tile.h \
include/core/tileset.h \
include/core/regionmap.h \
include/core/wildmoninfo.h \
include/ui/aboutporymap.h \
include/ui/bordermetatilespixmapitem.h \
include/ui/collisionpixmapitem.h \
@ -112,6 +115,7 @@ HEADERS += include/core/block.h \
include/ui/neweventtoolbutton.h \
include/ui/noscrollcombobox.h \
include/ui/noscrollspinbox.h \
include/ui/montabwidget.h \
include/ui/paletteeditor.h \
include/ui/selectablepixmapitem.h \
include/ui/tileseteditor.h \

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -25,6 +25,7 @@
<file>icons/folder_map_opened.ico</file>
<file>icons/map_edited.ico</file>
<file>icons/map_opened.ico</file>
<file>icons/tall_grass.ico</file>
<file>icons/sort_alphabet.ico</file>
<file>icons/sort_map.ico</file>
<file>icons/sort_number.ico</file>

View file

@ -337,6 +337,12 @@ void ProjectConfig::parseConfigKeyValue(QString key, QString value) {
this->baseGameVersion = BaseGameVersion::pokeemerald;
logWarn(QString("Invalid config value for base_game_version: '%1'. Must be 'pokeruby' or 'pokeemerald'.").arg(value));
}
} else if (key == "use_encounter_json") {
bool ok;
this->useEncounterJson = value.toInt(&ok);
if (!ok) {
logWarn(QString("Invalid config value for use_encounter_json: '%1'. Must be 0 or 1.").arg(value));
}
} else {
logWarn(QString("Invalid config key found in config file %1: '%2'").arg(this->getConfigFilepath()).arg(key));
}
@ -345,6 +351,7 @@ void ProjectConfig::parseConfigKeyValue(QString key, QString value) {
QMap<QString, QString> ProjectConfig::getKeyValueMap() {
QMap<QString, QString> map;
map.insert("base_game_version", baseGameVersionMap.value(this->baseGameVersion));
map.insert("use_encounter_json", QString::number(this->useEncounterJson));
return map;
}
@ -373,6 +380,7 @@ void ProjectConfig::onNewConfigFileCreated() {
this->baseGameVersion = static_cast<BaseGameVersion>(baseGameVersionComboBox->currentData().toInt());
}
}
this->useEncounterJson = true;
}
void ProjectConfig::setProjectDir(QString projectDir) {
@ -387,3 +395,12 @@ void ProjectConfig::setBaseGameVersion(BaseGameVersion baseGameVersion) {
BaseGameVersion ProjectConfig::getBaseGameVersion() {
return this->baseGameVersion;
}
void ProjectConfig::setEncounterJsonActive(bool active) {
this->useEncounterJson = active;
this->save();
}
bool ProjectConfig::getEncounterJsonActive() {
return this->useEncounterJson;
}

34
src/core/wildmoninfo.cpp Normal file
View file

@ -0,0 +1,34 @@
#include "wildmoninfo.h"
#include "montabwidget.h"
#include "project.h"
WildMonInfo getDefaultMonInfo(Field field) {
WildMonInfo newInfo;
newInfo.active = true;
newInfo.encounterRate = 0;
for (int row : field.second)
newInfo.wildPokemon.append({5, 5, "SPECIES_NONE"});
return newInfo;
}
WildMonInfo copyMonInfoFromTab(QTableWidget *monTable) {
WildMonInfo newInfo;
QVector<WildPokemon> newWildMons;
for (int row = 0; row < monTable->rowCount(); row++) {
WildPokemon newWildMon;
newWildMon.species = monTable->cellWidget(row, 1)->findChild<QComboBox *>()->currentText();
newWildMon.minLevel = monTable->cellWidget(row, 2)->findChild<QSpinBox *>()->value();
newWildMon.maxLevel = monTable->cellWidget(row, 3)->findChild<QSpinBox *>()->value();
newWildMons.append(newWildMon);
}
newInfo.active = true;
newInfo.wildPokemon = newWildMons;
newInfo.encounterRate = monTable->findChild<QSpinBox *>()->value();
return newInfo;
}

View file

@ -5,6 +5,7 @@
#include "mapconnection.h"
#include "currentselectedmetatilespixmapitem.h"
#include "mapsceneeventfilter.h"
#include "montabwidget.h"
#include <QCheckBox>
#include <QPainter>
#include <QMouseEvent>
@ -24,6 +25,7 @@ Editor::Editor(Ui::MainWindow* ui)
void Editor::saveProject() {
if (project) {
saveUiFields();
project->saveAllMaps();
project->saveAllDataStructures();
}
@ -31,11 +33,16 @@ void Editor::saveProject() {
void Editor::save() {
if (project && map) {
saveUiFields();
project->saveMap(map);
project->saveAllDataStructures();
}
}
void Editor::saveUiFields() {
saveEncounterTabData();
}
void Editor::undo() {
if (current_view && map_item->paintingEnabled) {
map->undo();
@ -150,6 +157,346 @@ void Editor::setEditingConnections() {
this->cursorMapTileRect->setVisibility(false);
}
void Editor::displayWildMonTables() {
QStackedWidget *stack = ui->stackedWidget_WildMons;
QComboBox *labelCombo = ui->comboBox_EncounterGroupLabel;
// delete widgets from previous map data if they exist
while (stack->count()) {
QWidget *oldWidget = stack->widget(0);
stack->removeWidget(oldWidget);
delete oldWidget;
}
labelCombo->clear();
// Don't try to read encounter data if it doesn't exist on disk for this map.
if (!project->wildMonData.contains(map->constantName)) {
return;
}
labelCombo->addItems(project->wildMonData[map->constantName].keys());
labelCombo->setCurrentText(project->wildMonData[map->constantName].firstKey());
for (int labelIndex = 0; labelIndex < project->wildMonData[map->constantName].keys().size(); labelIndex++) {
QString label = project->wildMonData.value(map->constantName).keys().at(labelIndex);
WildPokemonHeader header = project->wildMonData.value(map->constantName).value(label);
MonTabWidget *tabWidget = new MonTabWidget(project);
stack->insertWidget(labelIndex, tabWidget);
int tabIndex = 0;
for (Field monField : project->wildMonFields) {
QString fieldName = monField.first;
tabWidget->clearTableAt(tabIndex);
if (project->wildMonData.contains(map->constantName) && header.wildMons[fieldName].active) {
tabWidget->populateTab(tabIndex, header.wildMons[fieldName], fieldName);
} else {
tabWidget->setTabActive(tabIndex, false);
}
tabIndex++;
}
}
stack->setCurrentIndex(0);
}
void Editor::addNewWildMonGroup() {
QStackedWidget *stack = ui->stackedWidget_WildMons;
QComboBox *labelCombo = ui->comboBox_EncounterGroupLabel;
int stackIndex = stack->currentIndex();
QDialog dialog(nullptr, Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
dialog.setWindowTitle("New Wild Encounter Group Label");
dialog.setWindowModality(Qt::NonModal);
QFormLayout form(&dialog);
QDialogButtonBox buttonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
QLineEdit *lineEdit = new QLineEdit();
form.addRow(new QLabel("Group Base Label:"), lineEdit);
QRegularExpressionValidator *validator = new QRegularExpressionValidator(QRegularExpression("[_A-Za-z0-9]*"));
lineEdit->setValidator(validator);
connect(lineEdit, &QLineEdit::textChanged, [this, &lineEdit, &buttonBox](QString text){
if (this->project->encounterGroupLabels.contains(text)) {
QPalette palette = lineEdit->palette();
QColor color = Qt::red;
color.setAlpha(25);
palette.setColor(QPalette::Base, color);
lineEdit->setPalette(palette);
buttonBox.button(QDialogButtonBox::Ok)->setDisabled(true);
} else {
lineEdit->setPalette(QPalette());
buttonBox.button(QDialogButtonBox::Ok)->setEnabled(true);
}
});
// Give a default value to the label.
lineEdit->setText(QString("g%1%2").arg(map->name).arg(stack->count()));
// Fields [x] copy from existing
QLabel *fieldsLabel = new QLabel("Fields:");
form.addRow(fieldsLabel);
QCheckBox *copyCheckbox = new QCheckBox;
copyCheckbox->setEnabled(stack->count());
form.addRow(new QLabel("Copy from current group"), copyCheckbox);
QVector<QCheckBox *> fieldCheckboxes;
for (Field monField : project->wildMonFields) {
QCheckBox *fieldCheckbox = new QCheckBox;
fieldCheckboxes.append(fieldCheckbox);
form.addRow(new QLabel(monField.first), fieldCheckbox);
}
// Reading from ui here so not saving to disk before user.
connect(copyCheckbox, &QCheckBox::stateChanged, [=](int state){
if (state == Qt::Checked) {
int fieldIndex = 0;
MonTabWidget *monWidget = static_cast<MonTabWidget *>(stack->widget(stack->currentIndex()));
for (Field monField : project->wildMonFields) {
fieldCheckboxes[fieldIndex]->setChecked(monWidget->isTabEnabled(fieldIndex));
fieldCheckboxes[fieldIndex]->setEnabled(false);
fieldIndex++;
}
} else if (state == Qt::Unchecked) {
int fieldIndex = 0;
for (Field monField : project->wildMonFields) {
fieldCheckboxes[fieldIndex]->setEnabled(true);
fieldIndex++;
}
}
});
connect(&buttonBox, &QDialogButtonBox::accepted, [&dialog, &lineEdit, this](){
QString newLabel = lineEdit->text();
if (!newLabel.isEmpty()) {
this->project->encounterGroupLabels.append(newLabel);
dialog.accept();
}
});
connect(&buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
form.addRow(&buttonBox);
if (dialog.exec() == QDialog::Accepted) {
WildPokemonHeader header;
for (Field monField : project->wildMonFields) {
QString fieldName = monField.first;
header.wildMons[fieldName].active = false;
header.wildMons[fieldName].encounterRate = 0;
}
MonTabWidget *tabWidget = new MonTabWidget(project);
stack->insertWidget(stack->count(), tabWidget);
labelCombo->addItem(lineEdit->text());
labelCombo->setCurrentIndex(labelCombo->count() - 1);
int tabIndex = 0;
for (Field monField : project->wildMonFields) {
QString fieldName = monField.first;
tabWidget->clearTableAt(tabIndex);
if (fieldCheckboxes[tabIndex]->isChecked()) {
if (copyCheckbox->isChecked()) {
MonTabWidget *copyFrom = static_cast<MonTabWidget *>(stack->widget(stackIndex));
if (copyFrom->isTabEnabled(tabIndex))
header.wildMons.insert(fieldName, copyMonInfoFromTab(copyFrom->tableAt(tabIndex)));
else
header.wildMons.insert(fieldName, getDefaultMonInfo(monField));
} else {
header.wildMons.insert(fieldName, getDefaultMonInfo(monField));
}
tabWidget->populateTab(tabIndex, header.wildMons[fieldName], fieldName);
} else {
tabWidget->setTabActive(tabIndex, false);
}
tabIndex++;
}
}
}
void Editor::configureEncounterJSON() {
QVector<QWidget *> fieldSlots;
Fields tempFields = project->wildMonFields;
QLabel *totalLabel = new QLabel;
auto updateTotal = [&fieldSlots, totalLabel](Field &currentField) {
int total = 0, spinnerIndex = 0;
for (auto slot : fieldSlots) {
QSpinBox *spinner = slot->findChild<QSpinBox *>();
int val = spinner->value();
currentField.second[spinnerIndex++] = spinner->value();
total += val;
}
totalLabel->setText(QString("Total: %1").arg(QString::number(total)));
};
auto createNewSlot = [&fieldSlots, &updateTotal](int index, Field &currentField) {
QLabel *indexLabel = new QLabel(QString("Index: %1").arg(QString::number(index)));
QSpinBox *chanceSpinner = new QSpinBox;
int chance = currentField.second.at(index);
chanceSpinner->setValue(chance);
chanceSpinner->setMinimum(0);
chanceSpinner->setMaximum(9999);
connect(chanceSpinner, QOverload<int>::of(&QSpinBox::valueChanged), [&chanceSpinner, &updateTotal, &currentField](int) {
updateTotal(currentField);
});
QFrame *slot = new QFrame;
QHBoxLayout *slotLayout = new QHBoxLayout;
slotLayout->addStretch();
slotLayout->addWidget(indexLabel);
slotLayout->addWidget(chanceSpinner);
slot->setLayout(slotLayout);
fieldSlots.append(slot);
return slot;
};
QDialog dialog(nullptr, Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
dialog.setWindowTitle("Configure Wild Encounter Fields");
dialog.setWindowModality(Qt::NonModal);
QGridLayout grid;
QDialogButtonBox buttonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
connect(&buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
connect(&buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
auto getFieldNames = [&tempFields]() {
QStringList fieldNames;
for (Field field : tempFields)
fieldNames.append(field.first);
return fieldNames;
};
auto drawSlotWidgets = [this, &grid, &createNewSlot, &fieldSlots, &updateTotal, &tempFields](int index) {
// Clear them first.
while (!fieldSlots.isEmpty()) {
auto slot = fieldSlots.takeFirst();
grid.removeWidget(slot);
delete slot;
}
Field &currentField = tempFields[index];
for (int i = 0; i < currentField.second.size(); i++) {
grid.addWidget(createNewSlot(i, currentField), i / 4 + 1, i % 4);
}
updateTotal(currentField);
};
QComboBox *fieldChoices = new QComboBox;
connect(fieldChoices, QOverload<int>::of(&QComboBox::currentIndexChanged), drawSlotWidgets);
fieldChoices->addItems(getFieldNames());
QLabel *fieldChoiceLabel = new QLabel("Field");
// Button to create new fields in the JSON.
QPushButton *addFieldButton = new QPushButton("Add New Field...");
connect(addFieldButton, &QPushButton::clicked, [fieldChoices, &tempFields]() {
QDialog newNameDialog(nullptr, Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
newNameDialog.setWindowModality(Qt::NonModal);
QDialogButtonBox newFieldButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &newNameDialog);
connect(&newFieldButtonBox, SIGNAL(accepted()), &newNameDialog, SLOT(accept()));
connect(&newFieldButtonBox, SIGNAL(rejected()), &newNameDialog, SLOT(reject()));
QLineEdit *newNameEdit = new QLineEdit;
QFormLayout newFieldForm(&newNameDialog);
newFieldForm.addRow("Field Name", newNameEdit);
newFieldForm.addRow(&newFieldButtonBox);
if (newNameDialog.exec() == QDialog::Accepted) {
QString newFieldName = newNameEdit->text();
QVector<int> newFieldRates(1, 100);
tempFields.append({newFieldName, newFieldRates});
fieldChoices->addItem(newFieldName);
fieldChoices->setCurrentIndex(fieldChoices->count() - 1);
}
});
QPushButton *addSlotButton = new QPushButton(QIcon(":/icons/add.ico"), "");
addSlotButton->setFlat(true);
connect(addSlotButton, &QPushButton::clicked, [this, &fieldChoices, &drawSlotWidgets, &tempFields]() {
Field &field = tempFields[fieldChoices->currentIndex()];
field.second.append(1);
drawSlotWidgets(fieldChoices->currentIndex());
});
QPushButton *removeSlotButton = new QPushButton(QIcon(":/icons/delete.ico"), "");
removeSlotButton->setFlat(true);
connect(removeSlotButton, &QPushButton::clicked, [this, &fieldChoices, &drawSlotWidgets, &tempFields]() {
Field &field = tempFields[fieldChoices->currentIndex()];
if (field.second.size() > 1)
field.second.removeLast();
drawSlotWidgets(fieldChoices->currentIndex());
});
QFrame firstRow;
QHBoxLayout firstRowLayout;
firstRowLayout.addWidget(fieldChoiceLabel);
firstRowLayout.addWidget(fieldChoices);
firstRowLayout.addWidget(addFieldButton);
firstRowLayout.addWidget(removeSlotButton);
firstRowLayout.addWidget(addSlotButton);
firstRow.setLayout(&firstRowLayout);
grid.addWidget(&firstRow, 0, 0, 1, 4, Qt::AlignLeft);
QHBoxLayout lastRow;
lastRow.addWidget(totalLabel);
lastRow.addWidget(&buttonBox);
// To keep the total and button box at the bottom of the window.
QVBoxLayout layout(&dialog);
QFrame *frameTop = new QFrame;
frameTop->setLayout(&grid);
layout.addWidget(frameTop);
QFrame *frameBottom = new QFrame;
frameBottom->setLayout(&lastRow);
layout.addWidget(frameBottom);
if (dialog.exec() == QDialog::Accepted) {
// Copy the temporary modified field info to project.
Fields &newFields = project->wildMonFields;
newFields = tempFields;
// Re-draw the tab accordingly.
displayWildMonTables();
// TODO: Update values for every single wild encounter entry?
}
}
void Editor::saveEncounterTabData() {
QStackedWidget *stack = ui->stackedWidget_WildMons;
QComboBox *labelCombo = ui->comboBox_EncounterGroupLabel;
if (!stack->count()) return;
QMap<QString, WildPokemonHeader> &encounterMap = project->wildMonData[map->constantName];
for (int groupIndex = 0; groupIndex < stack->count(); groupIndex++) {
MonTabWidget *tabWidget = static_cast<MonTabWidget *>(stack->widget(groupIndex));
WildPokemonHeader &encounterHeader = encounterMap[labelCombo->itemText(groupIndex)];
int fieldIndex = 0;
for (Field monField : project->wildMonFields) {
QString fieldName = monField.first;
if (!tabWidget->isTabEnabled(fieldIndex++)) continue;
QTableWidget *monTable = static_cast<QTableWidget *>(tabWidget->widget(fieldIndex - 1));
QVector<WildPokemon> newWildMons;
encounterHeader.wildMons[fieldName] = copyMonInfoFromTab(monTable);
}
}
}
void Editor::setDiveEmergeControls() {
ui->comboBox_DiveMap->blockSignals(true);
ui->comboBox_EmergeMap->blockSignals(true);
@ -601,6 +948,7 @@ void Editor::displayMap() {
displayMapConnections();
displayMapBorder();
displayMapGrid();
displayWildMonTables();
this->playerViewRect->setZValue(1000);
this->cursorMapTileRect->setZValue(1001);

View file

@ -80,6 +80,12 @@ void MainWindow::initCustomUI() {
ui->mapList->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->mapList, SIGNAL(customContextMenuRequested(const QPoint &)),
this, SLOT(onOpenMapListContextMenu(const QPoint &)));
QStackedWidget *stack = ui->stackedWidget_WildMons;
QComboBox *labelCombo = ui->comboBox_EncounterGroupLabel;
connect(labelCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), [=](int index){
stack->setCurrentIndex(index);
});
}
void MainWindow::initExtraSignals() {
@ -143,6 +149,9 @@ void MainWindow::initMapSortOrder() {
void MainWindow::setProjectSpecificUIVisibility()
{
if (!projectConfig.getEncounterJsonActive())
ui->tabWidget->removeTab(4);
switch (projectConfig.getBaseGameVersion())
{
case BaseGameVersion::pokeruby:
@ -612,6 +621,9 @@ void MainWindow::loadDataStructures() {
project->readMetatileBehaviors();
project->readTilesetProperties();
project->readHealLocations();
project->readMiscellaneousConstants();
project->readSpeciesIconPaths();
project->readWildMonData();
}
void MainWindow::populateMapList() {
@ -1961,6 +1973,14 @@ void MainWindow::on_pushButton_RemoveConnection_clicked()
editor->removeCurrentConnection();
}
void MainWindow::on_pushButton_NewWildMonGroup_clicked() {
editor->addNewWildMonGroup();
}
void MainWindow::on_pushButton_ConfigureEncountersJSON_clicked() {
editor->configureEncounterJSON();
}
void MainWindow::on_comboBox_DiveMap_activated(const QString &mapName)
{
editor->updateDiveMap(mapName);
@ -2199,6 +2219,7 @@ void MainWindow::closeEvent(QCloseEvent *event) {
this->ui->splitter_main->saveState()
);
porymapConfig.save();
projectConfig.save();
QMainWindow::closeEvent(event);
}

View file

@ -520,6 +520,79 @@ void Project::saveMapGroups() {
mapGroupsFile.write(mapGroupsDoc.toJson());
}
void Project::saveWildMonData() {
if (!projectConfig.getEncounterJsonActive()) return;
QString wildEncountersJsonFilepath = QString("%1/src/data/wild_encounters.json").arg(root);
QFile wildEncountersFile(wildEncountersJsonFilepath);
if (!wildEncountersFile.open(QIODevice::WriteOnly)) {
logError(QString("Error: Could not open %1 for writing").arg(wildEncountersJsonFilepath));
return;
}
QJsonObject wildEncountersObject;
QJsonArray wildEncounterGroups = QJsonArray();
// gWildMonHeaders label is not mutable
QJsonObject monHeadersObject;
monHeadersObject["label"] = "gWildMonHeaders";
monHeadersObject["for_maps"] = true;
QJsonArray fieldsInfoArray;
for (QPair<QString, QVector<int>> fieldInfo : wildMonFields) {
QJsonObject fieldObject;
QJsonArray rateArray;
for (int rate : fieldInfo.second)
rateArray.append(rate);
fieldObject["type"] = fieldInfo.first;
fieldObject["encounter_rates"] = rateArray;
fieldsInfoArray.append(fieldObject);
}
monHeadersObject["fields"] = fieldsInfoArray;
QJsonArray encountersArray = QJsonArray();
for (QString key : wildMonData.keys()) {
for (QString groupLabel : wildMonData.value(key).keys()) {
QJsonObject encounterObject;
encounterObject["map"] = key;
encounterObject["base_label"] = groupLabel;
WildPokemonHeader encounterHeader = wildMonData.value(key).value(groupLabel);
for (QString fieldName : encounterHeader.wildMons.keys()) {
QJsonObject fieldObject;
WildMonInfo monInfo = encounterHeader.wildMons.value(fieldName);
fieldObject["encounter_rate"] = monInfo.encounterRate;
QJsonArray monArray;
for (WildPokemon wildMon : monInfo.wildPokemon) {
QJsonObject monEntry;
monEntry["min_level"] = wildMon.minLevel;
monEntry["max_level"] = wildMon.maxLevel;
monEntry["species"] = wildMon.species;
monArray.append(monEntry);
}
fieldObject["mons"] = monArray;
encounterObject[fieldName] = fieldObject;
}
encountersArray.append(encounterObject);
}
}
monHeadersObject["encounters"] = encountersArray;
wildEncounterGroups.append(monHeadersObject);
// add extra Json objects that are not associated with maps to the file
for (QString label : extraEncounterGroups.keys()) {
wildEncounterGroups.append(extraEncounterGroups[label]);
}
wildEncountersObject["wild_encounter_groups"] = wildEncounterGroups;
QJsonDocument wildEncountersDoc(wildEncountersObject);
wildEncountersFile.write(wildEncountersDoc.toJson());
wildEncountersFile.close();
}
void Project::saveMapConstantsHeader() {
QString text = QString("#ifndef GUARD_CONSTANTS_MAP_GROUPS_H\n");
text += QString("#define GUARD_CONSTANTS_MAP_GROUPS_H\n");
@ -1066,6 +1139,7 @@ void Project::saveAllDataStructures() {
saveMapLayouts();
saveMapGroups();
saveMapConstantsHeader();
saveWildMonData();
}
void Project::loadTilesetAssets(Tileset* tileset) {
@ -1305,6 +1379,59 @@ void Project::deleteFile(QString path) {
}
}
void Project::readWildMonData() {
if (!projectConfig.getEncounterJsonActive()) return;
QString wildMonJsonFilepath = QString("%1/src/data/wild_encounters.json").arg(root);
QJsonDocument wildMonsJsonDoc;
if (!parser.tryParseJsonFile(&wildMonsJsonDoc, wildMonJsonFilepath)) {
logError(QString("Failed to read wild encounters from %1").arg(wildMonJsonFilepath));
return;
}
QJsonObject wildMonObj = wildMonsJsonDoc.object();
for (auto subObjectRef : wildMonObj["wild_encounter_groups"].toArray()) {
QJsonObject subObject = subObjectRef.toObject();
if (!subObject["for_maps"].toBool()) {
extraEncounterGroups.insert(subObject["label"].toString(), subObject);
continue;
}
for (auto field : subObject["fields"].toArray()) {
QPair<QString, QVector<int>> encounterField;
encounterField.first = field.toObject()["type"].toString();
for (auto val : field.toObject()["encounter_rates"].toArray())
encounterField.second.append(val.toInt());
wildMonFields.append(encounterField);
}
QJsonArray encounters = subObject["encounters"].toArray();
for (QJsonValue encounter : encounters) {
QString mapConstant = encounter["map"].toString();
WildPokemonHeader header;
for (QPair<QString, QVector<int>> monField : wildMonFields) {
QString field = monField.first;
if (encounter[field] != QJsonValue::Undefined) {
header.wildMons[field].active = true;
header.wildMons[field].encounterRate = encounter[field]["encounter_rate"].toInt();
for (QJsonValue mon : encounter[field]["mons"].toArray()) {
header.wildMons[field].wildPokemon.append({
mon["min_level"].toInt(),
mon["max_level"].toInt(),
mon["species"].toString()
});
}
}
}
wildMonData[mapConstant].insert(encounter["base_label"].toString(), header);
encounterGroupLabels.append(encounter["base_label"].toString());
}
}
}
void Project::readMapGroups() {
QString mapGroupsFilepath = QString("%1/data/maps/map_groups.json").arg(root);
QJsonDocument mapGroupsDoc;
@ -1635,6 +1762,12 @@ QMap<QString, int> Project::getEventObjGfxConstants() {
return constants;
}
void Project::readMiscellaneousConstants() {
QMap<QString, int> pokemonDefines = parser.readCDefines("include/pokemon.h", QStringList() << "MIN_" << "MAX_");
miscConstants.insert("max_level_define", pokemonDefines.value("MAX_LEVEL"));
miscConstants.insert("min_level_define", pokemonDefines.value("MIN_LEVEL"));
}
QString Project::fixPalettePath(QString path) {
path = path.replace(QRegExp("\\.gbapal$"), ".pal");
return path;
@ -1716,6 +1849,14 @@ void Project::loadEventPixmaps(QList<Event*> objects) {
}
}
void Project::readSpeciesIconPaths() {
QMap<QString, QString> monIconNames = parser.readNamedIndexCArray("src/pokemon_icon.c", "gMonIconTable");
for (QString species : monIconNames.keys()) {
QString path = parser.readCIncbin("src/data/graphics/pokemon.h", monIconNames.value(species));
speciesToIconPath.insert(species, root + "/" + path.replace("4bpp", "png"));
}
}
void Project::saveMapHealEvents(Map *map) {
// save heal event changes
if (map->events["heal_event_group"].length() > 0) {

172
src/ui/montabwidget.cpp Normal file
View file

@ -0,0 +1,172 @@
#include "montabwidget.h"
#include "noscrollcombobox.h"
#include "project.h"
MonTabWidget::MonTabWidget(Project *project, QWidget *parent) : QTabWidget(parent) {
this->project = project;
populate();
installEventFilter(this);
}
bool MonTabWidget::eventFilter(QObject *, QEvent *event) {
// Press right mouse button to activate tab.
if (event->type() == QEvent::MouseButtonPress
&& static_cast<QMouseEvent *>(event)->button() == Qt::RightButton) {
QPoint eventPos = static_cast<QMouseEvent *>(event)->pos();
int tabIndex = tabBar()->tabAt(eventPos);
if (tabIndex > -1) {
askActivateTab(tabIndex, eventPos);
}
}
return false;
}
void MonTabWidget::populate() {
Fields fields = project->wildMonFields;
activeTabs = QVector<bool>(fields.size(), false);
for (QPair<QString, QVector<int>> field : fields) {
QTableWidget *table = new QTableWidget;
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
table->setFocusPolicy(Qt::NoFocus);
table->setSelectionMode(QAbstractItemView::NoSelection);
table->clearFocus();
addTab(table, field.first);
}
}
void MonTabWidget::askActivateTab(int tabIndex, QPoint menuPos) {
if (activeTabs[tabIndex]) return;
QMenu contextMenu(this);
QString tabText = tabBar()->tabText(tabIndex);
QAction actionActivateTab(QString("Add %1 data for this map...").arg(tabText), this);
connect(&actionActivateTab, &QAction::triggered, [=](){
clearTableAt(tabIndex);
populateTab(tabIndex, getDefaultMonInfo(project->wildMonFields.at(tabIndex)), tabText);
setCurrentIndex(tabIndex);
});
contextMenu.addAction(&actionActivateTab);
contextMenu.exec(mapToGlobal(menuPos));
}
void MonTabWidget::clearTableAt(int tabIndex) {
QTableWidget *table = tableAt(tabIndex);
if (table) {
table->clear();
table->horizontalHeader()->hide();
}
}
void MonTabWidget::populateTab(int tabIndex, WildMonInfo monInfo, QString fieldName) {
QTableWidget *speciesTable = tableAt(tabIndex);
speciesTable->setRowCount(monInfo.wildPokemon.size());
speciesTable->setColumnCount(6);
QStringList landMonTableHeaders;
landMonTableHeaders << "Slot" << "Species" << "Min Level" << "Max Level" << "Slot Ratio" << "Encounter Rate";
speciesTable->setHorizontalHeaderLabels(landMonTableHeaders);
speciesTable->horizontalHeader()->show();
speciesTable->verticalHeader()->hide();
speciesTable->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
speciesTable->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
speciesTable->setShowGrid(false);
QFrame *encounterFrame = new QFrame;
QHBoxLayout *encounterLayout = new QHBoxLayout;
QSpinBox *encounterRate = new QSpinBox;
encounterRate->setMinimum(0);
encounterRate->setMaximum(180);
encounterRate->setValue(monInfo.encounterRate);
encounterLayout->addWidget(encounterRate);
encounterFrame->setLayout(encounterLayout);
speciesTable->setCellWidget(0, 5, encounterFrame);
int i = 0;
for (WildPokemon mon : monInfo.wildPokemon) {
createSpeciesTableRow(speciesTable, mon, i++, fieldName);
}
this->setTabActive(tabIndex, true);
}
void MonTabWidget::createSpeciesTableRow(QTableWidget *table, WildPokemon mon, int index, QString fieldName) {
QPixmap monIcon = QPixmap(project->speciesToIconPath.value(mon.species)).copy(0, 0, 32, 32);
QLabel *monNum = new QLabel(QString("%1.").arg(QString::number(index)));
QLabel *monLabel = new QLabel();
monLabel->setPixmap(monIcon);
NoScrollComboBox *monSelector = new NoScrollComboBox;
monSelector->addItems(project->speciesToIconPath.keys());
monSelector->setCurrentText(mon.species);
monSelector->setEditable(true);
QObject::connect(monSelector, &QComboBox::currentTextChanged, [=](QString newSpecies){
QPixmap monIcon = QPixmap(project->speciesToIconPath.value(newSpecies)).copy(0, 0, 32, 32);
monLabel->setPixmap(monIcon);
});
QSpinBox *minLevel = new QSpinBox;
QSpinBox *maxLevel = new QSpinBox;
minLevel->setMinimum(project->miscConstants.value("min_level_define").toInt());
minLevel->setMaximum(project->miscConstants.value("max_level_define").toInt());
maxLevel->setMinimum(project->miscConstants.value("min_level_define").toInt());
maxLevel->setMaximum(project->miscConstants.value("max_level_define").toInt());
minLevel->setValue(mon.minLevel);
maxLevel->setValue(mon.maxLevel);
// Connect level spinboxes so max is never less than min.
connect(minLevel, QOverload<int>::of(&QSpinBox::valueChanged), [maxLevel](int min){
maxLevel->setMinimum(min);
});
int fieldIndex = 0;
for (auto field : project->wildMonFields) {
if (field.first == fieldName) break;
fieldIndex++;
}
QLabel *percentLabel = new QLabel(QString("%1").arg(
QString::number(project->wildMonFields[fieldIndex].second[index]
)));
QFrame *speciesSelector = new QFrame;
QHBoxLayout *speciesSelectorLayout = new QHBoxLayout;
speciesSelectorLayout->addWidget(monLabel);
speciesSelectorLayout->addWidget(monSelector);
speciesSelector->setLayout(speciesSelectorLayout);
// Prevent the spinboxes from being stupidly tall.
QFrame *minLevelFrame = new QFrame;
QVBoxLayout *minLevelSpinboxLayout = new QVBoxLayout;
minLevelSpinboxLayout->addWidget(minLevel);
minLevelFrame->setLayout(minLevelSpinboxLayout);
QFrame *maxLevelFrame = new QFrame;
QVBoxLayout *maxLevelSpinboxLayout = new QVBoxLayout;
maxLevelSpinboxLayout->addWidget(maxLevel);
maxLevelFrame->setLayout(maxLevelSpinboxLayout);
table->setCellWidget(index, 0, monNum);
table->setCellWidget(index, 1, speciesSelector);
table->setCellWidget(index, 2, minLevelFrame);
table->setCellWidget(index, 3, maxLevelFrame);
table->setCellWidget(index, 4, percentLabel);
}
QTableWidget *MonTabWidget::tableAt(int tabIndex) {
return static_cast<QTableWidget *>(this->widget(tabIndex));
}
void MonTabWidget::setTabActive(int index, bool active) {
activeTabs[index] = active;
setTabEnabled(index, active);
if (!active) {
setTabToolTip(index, "Right-click an inactive tab to add new fields.");
} else {
setTabToolTip(index, QString());
}
}