Navigating units

From Unknown Horizons - Wiki
Jump to: navigation, search
Note.png

This page is part of the Unknown Horizons Design Document. Please discuss everything concerning this topic on the "discussion" tab of this page. If you're not sure whether your ideas are fitting the Unknown Horizons style, either use the related discussion page or ask us. Please don't directly edit the article!

Contents

Proposal

Summary

  • Select one or more units and click on a location at the map. The unit(s) will move there on the shortest way avoiding blocked tiles. This should possibly also work on the minimap. The selected units can perform actions by clicking on an object instead of a tile. The actions depend on the according objects. When a unit is not in range of an object it will move towards this object until it is in range and perform the action then.
  • Moreover some units might perform automated actions like attacking depending on several stances like agressive or defensive.
  • A group of units might be set into different formations to change effects of attacks or improving the defence.
  • Units can be given a route to patrol or on which they perform actions like delivering goods from one port to another.
  • Selected units should be displayed in a menu or via icons on the GUI. Possibly there should be an option to give grouped units a hotkey.


Some examples:

Light Infantry:

  • actions - move, attack
  • stances - aggressive (attack everything in sight), defensive (attack nothing), guarding (attack when under fire onl y)
  • formation - carret, diamond, line etc.

Merchant vessel:

  • actions - move, attack (when armed), load/unload goods
  • stances - none or aggressive, defensive, guarding (when armed)
  • formation - line

Implementation related note

Currently FIFE does not support the function to run an action depending on a tile or object clicked on. Actions are bound to keys only. But this could be solved by an additional script checking the tile or object the cursor is clicked on to decide which action will be runned.

Workings

  • The player selects a unit by clicking on it with the cursor, drawing a bounding sqare around group of units or using an additional metakey (like shift) to select more than one unit with the cursor. By clicking on a tile the unit(s) move there on the shortest way ignoring blocked tiles for pathfinding. Clicking on an object will make the unit(s) perform an previously from a menu or icon selected action or move until the object is in range and perform the action then.
  • When pressing a for grouping available hotkey the currently selected unit(s) is(are) (yes, listen up) grouped. The player will now just have to press this hotkey to reselect all units grouped for this hotkey.
  • From a menu or icons on the GUI the player can choose with the cursor (or hotkeys) stances, formations and so on for the currently selected unit(s).
  • From a menu or icons on the GUI the player can set up a route for the unit(s). Clicking with the cursor on the according icon will activate the option to place a starting point, intermediate points and the end point on the map. As soon as he presses the GO-button the unit will start moving along this route.

Accordingly the player might choose actions the unit(s) should perform on certain route points. The unit(s) will use this route as long as they are told to do something different. The GO-button will change to a STOP-button as soon as pressed and vice versa. When the unit(s) are given another target to move to the button will change automatically. The route will exist until it is deleted from the menu by clicking on a button that will for look like an X or a trashbin for sure. Along the route in an additional route menu the player can define certain actions the unit will perform at the according route points - like loading and unloading cargo or staying for a period of time at a certain location before going onwards.

Graphical content

There should be an icon or an outline around the unit(s) displayed on the game map when selected. Several icons on the GUI and possibly a unit menu will be required to place all the options somewhere.

Audio content

Every type of unit should have unique sounds for selection, moving, attacking and so on.

Phasing

General

Navigating units could partially occur in first milestone.

Personal tools