ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "Waypoints"

From ModEnc
Jump to: navigation, search
m (Maps/Waypoints moved to Waypoints: Moving the Maps/ sections' pages to main space.)
m (Correction)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{WrongTitle|[Waypoints]}}
 
{{WrongTitle|[Waypoints]}}
  
{{SideBar|Map-specific INI sections|Template:Mapping}}
+
{{MappingBar}}
  
 
Waypoints are like bookmarks on a map - they address a certain cell. They have multiple uses:
 
Waypoints are like bookmarks on a map - they address a certain cell. They have multiple uses:
 
* The Waypoints numbered 0 - 7 are used as starting points for each of the 8 possible players.
 
* The Waypoints numbered 0 - 7 are used as starting points for each of the 8 possible players.
* The [{{Tt|[[Maps/Basic|Basic]]}}] {{arr|r}} [[HomeCell]] use waypoints to determine where the screen should be focused in a map at startup.
+
* The {{sl|Basic|HomeCell}} use waypoints to determine where the screen should be focused in a map at startup.
* Most [[Maps/Events|Events]] and [[Maps/Actions|Actions]] make use of them.
+
* Most Map [[Events]] and Map [[Actions]] make use of them.
 
* Most map elements use them as well.
 
* Most map elements use them as well.
  
__TOC__
 
 
{{clr}}
 
{{clr}}
  
 
== Section ==
 
== Section ==
  
=== [[TD]]/[[CO]] ===
+
In each of the classic C&C games and their expansion packs, the {{tt|[Waypoints]}} section in a map takes the following format:
 
 
=== [[RA]]/[[CS]]/[[AM]] ===
 
 
 
=== [[TS]]/[[FS]]/[[RA2]]/[[YR]] ===
 
 
 
The [{{Tt|Waypoints}}] section in a map takes this format:
 
 
  [Waypoints]
 
  [Waypoints]
 
  Index=COORDS
 
  Index=COORDS
  
{| style="width: 80%" border=1 class="table_descrowdesccol"
+
{| class="wikitable"
 
|+ Meanings of each string
 
|+ Meanings of each string
 
! style="width: 13em; " | String
 
! style="width: 13em; " | String
 
! Meaning
 
! Meaning
 
|-
 
|-
! {{Anchor|Index|ts}}
+
! {{Anchor|Index}}
| The Index of this waypoint. Unlike lists such as [InfantryTypes], the index does matter - the game allocates space for 702 Waypoints (#0 - #701) and will interpret Index as the number of the waypoint in that space.
+
| The Index of this waypoint. Unlike lists such as [InfantryTypes], the index does matter - the game allocates space for a limited number of Waypoints and will interpret Index as the number of the waypoint in that space.
 +
<ul><li>{{td}} allocates space for 28 Waypoints (#0 - #27)</li>
 +
<li>{{ra}}, {{cs}}, {{am}}, {{ts}}, {{fs}} and {{ra2}} allocates space for 101 Waypoints (#0 - #100)</li>
 +
<li>{{yr}} allocates space for 702 Waypoints (#0 - #701)</li></ul>
 
|-
 
|-
! {{Anchor|COORDS|ts}}
+
! {{Anchor|COORDS}}
| The number containing the coordinates of the cell. It is interpreted as {{Tt|Y * 1000 + X}}.
+
| The number containing the coordinates of the cell. It is interpreted as {{Tt|Y * Coefficient + X}}, with {{tt|Coefficient}} having the value of
 +
<ul><li>{{Tt|64}} in {{td}}</li>
 +
<li>{{Tt|128}} in {{ra}}, {{cs}}, and {{am}}</li>
 +
<li>{{Tt|1000}} in {{ts}}, {{fs}}, {{ra2}} and {{yr}}</li></ul>
 
|}
 
|}
  
 
== Letter-based addressing ==
 
== Letter-based addressing ==
 
Not all of the features using Waypoints refer to them by their Index. Some of them use letters for this purpose. To convert an Index to a lettered reference, you need to divide the Index by 26 and then convert the {{Tt|result - 1}} and the {{Tt|remainder}} values to letters A-Z and concatenate them (skip the first value if result is 0). Waypoint #0 is {{Tt|A}}, Waypoint #25 is {{Tt|Z}}, #26 is {{Tt|AA}} and so on. Or you can look at your favourite spreadsheet's column numbering, it uses the same principle.
 
Not all of the features using Waypoints refer to them by their Index. Some of them use letters for this purpose. To convert an Index to a lettered reference, you need to divide the Index by 26 and then convert the {{Tt|result - 1}} and the {{Tt|remainder}} values to letters A-Z and concatenate them (skip the first value if result is 0). Waypoint #0 is {{Tt|A}}, Waypoint #25 is {{Tt|Z}}, #26 is {{Tt|AA}} and so on. Or you can look at your favourite spreadsheet's column numbering, it uses the same principle.
 +
 +
[[Category:Map Information]]

Latest revision as of 06:36, 13 November 2019

This page should correctly be named "[Waypoints]"; it is wrong due to technical restrictions.


Waypoints are like bookmarks on a map - they address a certain cell. They have multiple uses:

  • The Waypoints numbered 0 - 7 are used as starting points for each of the 8 possible players.
  • The [Basic]HomeCell= use waypoints to determine where the screen should be focused in a map at startup.
  • Most Map Events and Map Actions make use of them.
  • Most map elements use them as well.


Section

In each of the classic C&C games and their expansion packs, the [Waypoints] section in a map takes the following format:

[Waypoints]
Index=COORDS
Meanings of each string
String Meaning
Index The Index of this waypoint. Unlike lists such as [InfantryTypes], the index does matter - the game allocates space for a limited number of Waypoints and will interpret Index as the number of the waypoint in that space.
COORDS The number containing the coordinates of the cell. It is interpreted as Y * Coefficient + X, with Coefficient having the value of

Letter-based addressing

Not all of the features using Waypoints refer to them by their Index. Some of them use letters for this purpose. To convert an Index to a lettered reference, you need to divide the Index by 26 and then convert the result - 1 and the remainder values to letters A-Z and concatenate them (skip the first value if result is 0). Waypoint #0 is A, Waypoint #25 is Z, #26 is AA and so on. Or you can look at your favourite spreadsheet's column numbering, it uses the same principle.