Skip to content

Factions3 Logo

Dynmap Integration

Factions integrates with Dynmap to automatically create visual representations of faction territories on the Dynmap web interface. It provides real-time territory visualization with customizable styling and detailed faction information popups.

Note

For more information about Dynmap, visit their plugin listing page or Wiki.

Features

Territory Visualization

  • Area Markers: Faction territories displayed as colored polygonal areas
  • Multi-World Support: Territories shown across all worlds with faction claims
  • Connected Territory Detection: Adjacent chunks automatically grouped into single polygons
  • Real-Time Updates: Territory changes reflected on the map within 15 seconds
  • Asynchronous Processing: Updates occur without impacting server performance

Faction Information Popups

When clicking on faction territory, detailed information is displayed: - Faction name and description - Leader and member list - Faction age and founded date - Bank balance (if economy integration enabled) - Faction flags in formatted tables - Custom information via macros

Visual Customization

  • Per-Faction Styling: Different factions can have unique colors and styles
  • Special Faction Styling: SafeZone and WarZone have distinct appearances
  • Line and Fill Properties: Customizable border/fill colors, opacity, line weight
  • Layer Management: Factions appear on dedicated map layer
  • Home Markers: Faction homes displayed with custom icons

Configuration

Basic Settings

Setting Default Description
dynmapEnabled true Enable/disable the entire Dynmap integration
dynmapLogTimeSpent false Log performance timing information to console
dynmapLayerName "Factions" Name of the layer in Dynmap's layer menu
dynmapLayerHiddenByDefault false Whether the layer is hidden when first loading the map
dynmapLayerPriority 2 Layer ordering priority (lower numbers appear first)
dynmapLayerMinimumZoom 0 Minimum zoom level before layer becomes visible

Faction Information Display

The faction popup description is customizable using the dynmapFactionDescription setting. It supports various macros (placeholders) that will be replaced with real information about the faction:

Macro Description
%name% Faction name
%description% Faction description
%players% List of faction members
%players.count% Number of players in the faction
%players.leader% Faction leader name
%age% How long the faction has existed
%money% Faction bank balance
%flags.table1% - %flags.table10% Faction flags in 1-10 column tables
%flags.map% All faction flags as a map (flag: value)

Dynamic Flag Macros: For each faction flag (like monsters, pvp, explosions, etc.), you can use: - %flagname.bool% - The boolean value (true/false) of if it is enabled/disabled - %flagname.boolcolor% - Boolean value with green/red color formatting - %flagname.color% - Flag name with green/red color formatting

Flag Table System: The %flags.tableX% macros automatically arrange all faction flags into HTML tables with X columns. For example: - %flags.table1% creates a single-column list - %flags.table3% creates a 3-column table (default used in template) - %flags.table5% creates a 5-column table for more compact display

The flags are displayed with color coding: green for enabled flags, red for disabled flags.

Default Description Template:

The description template uses HTML to display since it is displayed in a browser.

<div class="infowindow">
<span style="font-weight: bold; font-size: 150%;">%name%</span></br>
<span style="font-style: italic; font-size: 110%;">%description%</span></br>
</br>
<span style="font-weight: bold;">Leader:</span> %players.leader%</br>
<span style="font-weight: bold;">Members:</span> %players%</br>
</br>
<span style="font-weight: bold;">Age:</span> %age%</br>
<span style="font-weight: bold;">Bank:</span> %money%</br>
</br>
<span style="font-weight: bold;">Flags:</span></br>
%flags.table3%
</div>

Visibility Control

Setting Description
dynmapVisibleFactions Faction names/UUIDs to show (empty = show all)
dynmapHiddenFactions Faction names/UUIDs to hide
dynmapShowMoneyInDescription Enable the %money% macro (requires thread-safe economy)

World-Specific Visibility: - Add world:<worldname> to show/hide all factions in a specific world - Faction specification supports both names and UUIDs

{
  "dynmapVisibleFactions": ["MyFaction", "world:survival"],
  "dynmapHiddenFactions": ["TempFaction", "world:creative"]
}

Visual Styling

Default Style

By default, factions will all display the same on the map (same color/fill/etc.). This can be modified in the config with the setting dynmapDefaultStyle. The defaults are:

Property Default Description
Line Color #00FF00 (Green) Border color of territory areas
Line Opacity 0.8 Border transparency (0.0-1.0)
Line Weight 3 Border thickness in pixels
Fill Color #00FF00 (Green) Interior fill color
Fill Opacity 0.35 Fill transparency (0.0-1.0)
Home Marker greenflag Icon used for faction homes
Boost false Whether areas appear above other markers

Per-Faction Styles

The dynmapFactionStyles setting allows customization of specific factions.

Note

Comments have been added to the below to explain the values, but these comments should not be added to your actual configuration file as it will cause errors.

{
  "dynmapFactionStyles": {
    "MyFactionName": {
      "lineColor": "#0000FF",    // Blue borders
      "fillColor": "#0000FF",    // Blue fill
      "lineOpacity": 1.0,        // Solid borders
      "fillOpacity": 0.5,        // Semi-transparent fill
      "homeMarker": "blueflag",  // Custom home icon
      "boost": true              // Appear above other markers
    }
  }
}

Default Special Faction Styles: A few default styles also exist for SafeZone and WarZone, but these can be modified.

"SafeZone": {
  "lineColor": "#FFAA00",    // Gold
  "fillColor": "#FFAA00",    // Gold
  "boost": false
},
"WarZone": {
  "lineColor": "#FF0000",    // Red
  "fillColor": "#FF0000",    // Red
  "boost": false
}

Advanced Configuration

Custom Faction Description Template

Create rich HTML popups with custom styling. Here is a more advanced example:

<div class="faction-popup">
  <h2 style="color: #4CAF50;">%name%</h2>
  <p style="font-style: italic;">%description%</p>

  <div class="faction-info">
    <table>
      <tr><td><b>Leader:</b></td><td>%players.leader%</td></tr>
      <tr><td><b>Members:</b></td><td>%players.count%</td></tr>
      <tr><td><b>Power:</b></td><td>%power%/%maxpower%</td></tr>
      <tr><td><b>Claims:</b></td><td>%claims%</td></tr>
    </table>
  </div>

  <div class="faction-flags">
    <h4>Faction Settings:</h4>
    %flags.table2%
  </div>

  <div class="faction-economy" style="margin-top: 10px;">
    <b>Bank Balance:</b> %money%
  </div>
</div>

Troubleshooting

Common Issues

Territories not showing: - Check dynmapEnabled is true - Verify Dynmap is properly installed and running - Check dynmapVisibleFactions and dynmapHiddenFactions settings - Ensure factions have claimed territory

Performance problems: - Enable dynmapLogTimeSpent to identify bottlenecks - Verify faction visibility with dynmapVisibleFactions and dynmapHiddenFactions - Check server console for error messages

Money not displaying: - Ensure economy plugin is thread-safe - Set dynmapShowMoneyInDescription to true - Verify Vault integration is working - Check faction bank permissions

Wrong colors/styles: - Verify faction names in dynmapFactionStyles match exactly - Check for typos in color codes (must be valid hex) - Ensure JSON syntax is correct (no trailing commas)

Popups not showing information: - Check dynmapFactionDescription template syntax - Verify macros are spelled correctly - Test with simple template first - Check browser console for JavaScript errors

Debug Options

Monitor update performance by setting dynmapLogTimeSpent in the config to true.