(09-15-2025, 10:01 AM)Davin Wrote: P.S. Did you try reviewing all the map-specific instructions available for doing this sort of thing?
Are you referring to these? I haven't had a chance to check them for errors.
Instructions - Changing mapping instructions
This screen presents a list of all the mapping instructions currently in use for this map. These mapping instructions may be rearranged, deleted, or edited and copied to or from other maps.
Clicking on a line of this list activates buttons that will act on the selected instruction as desired. Double-clicking on one of the lines brings up an editing screen for that instruction without the need to press an extra button.
Editing an instruction opens a new window for just that instruction, and after editing it will retum to this list to accept further operations.
The order of mapping instructions is often important to the resulting display of the map, so the ability to reorder these instructions is useful for getting the desired appearance.
New mapping instructions can be added to this list by using the map's Show New Information menu rather than this screen.
Instructions - Formula construction
When building a formula to control how maps appear, the simplest method is to simply choose a name from the list of predefined "Formula Names". Each of these names pulls live data from your GTac data file. Many different options are available directly as simple names. Desired names may be selected from the provided list with a double-click or simply typed in with the keyboard.
Many of these names will retum data in the form of a True or False value for each coordinate on the Galac-Tac map. Some names retum a sequence of coordinates on that map. Which can be used for plotting ships' routes routes across space. Other names produce location-specific data or other forms of data, but in the end constructed formulas should end up producing one of the two basic forms of data ther specific locations or paths across locations. Complicated formulas may also be saved (using the Tools menu) under name of your own choice.
To compose a more complex formula than a single name, combine the above Formula Names together into something resembling a math calculation. The most obvious calculation is to combine two names together with an OR (T") operator (see the operator help for more details). This will combine two names showing specific locations together into a single value showing either of those locations. For instance, "MyHome | MyPC" will identify where all your production-capable centers are found (since your Home World also provides production).
Another way to combine terms is with an AND ("&") operator, so you can find answers matching two criteria at the same time. For instance, "Charted & Unowned" shows locations ripe for colonization. A number of operators available for combining terms together.
Some Fomula Names will retum data (by location) rather than just True or False values. These will need to be applied in a calculation to convert them into True/False results. For instance, the PV name retums the PV value of charted systems. If only high-value systems are to be located, then the PV values should be compared with a comparison operator to produce a True/False result. For instance, "PV > 6" shows valuable locations. This also shows how a constant numeric value can be used within a formula.
Combining calculations together will also require an ordering of operations to be performed. GTac has NO priority for these operators so parentheses are always needed when the ordering is significant. For instance, "(PV > 6) & Unowned" shows high-value colonizable opportunities, but only with the parentheses to show that the ">" is to be performed before the "&".
Most operators are called "infix" operators, in that they combine two values on either side of the operator. But one important operator is Not ("!"), and it is called a "prefix" operator. That operator has only one value (on its right side). Like other operators it has no ordering priority, so it too should use parentheses to surround the term. For example, "Unowned & (Charted)" can identify candidate locations for charting.
Some Formula Names can be compared to constant locations on the map. These are entered in a formula in the usual XX-YY format, except that it should be entered as a 4-digit number without the dash ("-"). For example, if a formula is to use the coordinate 12-34 it should be entered as 1234 in a formula.
Extra spaces may be added between any names, numbers or operators without affecting the formula. Of course they may not be added in the middle of individual names, numbers,
or operators. Spaces are only required to separate adjacent names or numbers. They are not required around operators, but of course may be added there if desired.
Instructions - Formula operators
Composing a formula to produce mapping effects can be very simple or very complex (see the general instructions for Constructing Formulas for more details). A formula can be as simple as a single name selected from the Formula Names list, but if more than one name is needed in a formula then you must use Operators to combine them together. A discussion follows describing each different kind of operator that is available. Desired operators may be selected from the provided list with a double-click or simply typed in with the keyboard.
The And operator ("&") produces a True only where both inputs are True. The Or operator (T) produces a True where either input is True.
Relational operators ("=", "#", "<", "<=", ">", ">=", "<>") compare the inputs to see if a numerical condition is satisfied. It is normally only used where numerical values are being compared rather than True/False values.
The If/Where operator ("?") can be used to refine a condition or numerical value. The input on the left is used only IF the matching input on the right is True. If the input on the right is False, the result is returned as zero or False. As usual, parentheses will be needed for any calculated inputs to this operator.
The Except/Without operator ("") can be used to remove True items from the left input that also appear in the right input. As usual, parentheses will be needed for any calculated inputs to this operator.
The In operator ("%") is usually used to see if each position on the map (e.g. "Coordinate"; on the left) can be found in a list of fixed coordinates that are entered as 4-digit numbers (on its right). But it can be used for other sorts of numeric comparisons as well, such as "PV % 4567", to see if any sort of input is within a list of values.
The Not operator ("!"") is used only with an input on its right, to change it from True to False and False to True. Like other operators, the operator and its input should normally be enclosed in parentheses to indicate a proper priority order.
The Distance operator ("$") provides a powerful way to incorporate Galac-Tac distance calculations into formulas. For instance, "Coordinate $ MyHome" calculates to a number that can be further used with comparison operators to determine areas that are close or far away from the Home World. It might also be used to find ships that are within range of of a particular location, for another example. This is particularly useful when mapping territories or boundaries.
Parentheses ("(".")") are not actually operators themselves but are used to group operations in a formula together so that the formula's operators are used in the expected order. Be sure to use parentheses any time operator ordering is in question so that the correct result will be retumed. This usually means they should be used any time there's more than one operator in a formula, although you could get away with not parenthesizing within a sequence of nothing but Ands or nothing but Ors, since ordering is not important there.
The math operators ("+", "", """", "/"") - Add, Subtract, Multiply, Divide - are only useful if complex numerical mathematical calculations are being performed. They are available only for that purpose.
Instructions - Formula examples
There are many ways to construct useful mapping formulas, in addition to just selecting a single Formula Name off the list. Here are a few examples to demonstrate some ideas. Anyone with additional suggestions for examples that might be useful to others, please feel free to contribute them.
Note all systems that are unowned, but charted, that might make good targets for colonization:
Unowned & Charted
As above, but only those systems with an average or better PV value:
Unowned & Charted & (PV >= 5)
Locations where a combat occurred this tum or last:
CombatAge <= 1
Systems with very high PV that are colonies or being colonized that might make good locations for a new PC:
(MyColony | Colonizing) & (PV >=8)
Routes where scouting or charting ships are being sent in the currently entered set of actions:
NewScouts NewCharts
Find the area around the Home World showing the area that ships can reach moving at up to 16 movement:
(Coordinate $ MyHome) <- 16
Find a composite area up to 16 movement from any Production Centers (ncluding the Home World):
(Coordinate $ (MyHome | MyPC)) <= 16
Shade in and/or outline the area of the galaxy surrounding all personal systems:
ZOC = 1
Instructions - Foreground and Background
When adding or changing mapping commands, the upper-right section of the screen defines the look of the symbol(s) shown at the selected location(s). However, when defining Star symbols or Ships and locations please note that there are two "layers" for such choices. These are called "Foreground" and "Background" and can be accessed by selecting one of the two tabs at the top of that box.
The Foreground selection is normally used for showing most symbols, allowing the selection of the symbol's shape and coloring. However, the Background tab is also available for making an independent selection of shape and coloring. When both are used. the Background definition is drawn fint and then the Foreground definition is drawn on top of it, obscuring much of the Background definition. Choosing a small symbol for the Background and a large symbol for the Foreground will usually completely cover the Background and so would not be useful. But a larger symbol for the Background and a smaller symbol for the Foreground will allow the background symbol to (usually) surround the Foreground symbol with a shape & color around its edges. This makes the symbol's appearance more visually distinctive on the map. This method is used to produce the interesting bi-color ten-pointed star for the Home World symbol on most of the predefined maps.
A number of the Large or X-Large symbols make good perimeter backgrounds with something smaller in front of (visibly imbedded in) them. For instance, X-Large Circles or Squares of a different color might make an interesting background to Large or Small Circles. Squares, Triangles, or Crosses that lie in front of them. Filling in the center (with a Brush) of either or both of the Foreground and Background symbols can create more interesting visual effects.
Instructions - Shapes
When displaying symbols (either stars or ship/location indicator symbols), a choice of symbols is available for display. A drop-down box is provided with the available choices at the top of the area used to describe the symbols. Simply choose one of the names from the selection list.
By default, the shape selection list contains a handful of the more common choices of shapes. However, an extended list of choices is available. Next to the drop-down box is a button with a "+" on it. If that button is pressed it changes to a "-" and the list of available shape choices will contain more esoteric symbols to choose from the next time the drop-down is used.
If a lot of map customization with extended choice lists will be done at one time, then it may be easier to first go to the Map > Allow more choices menu and select whether normal or extra lists will be pre-set.
When the shape is chosen or changed, and Pen or Brush selections are also made, the Preview window below will show an
example of the composite symbol chosen.
Instructions - Pens and Brushes
On each type of map customization screen, there will exist a box to describe the Pen to use or one to describe the Brush to use, or both. Fill in the drop-down boxes in each area as desired for it to be part of the final map.
A Pen is used to draw lines. This may be the outline of a shape, or a path between locations, or the border of a territory. A brush is used to fill in interiors of figures. This may be the center of a shape or the background throughout a territory.
The colors for Pens and Brushes may be selected from a drop-down list of choices. By default, only a short list of choices is available. However, an extended list of choices is available. Next to the drop-down box is a button with a "+" on it. If that button is pressed it changes to a "-" and the list of available colors choices will contain many more colors to choose from the next time the drop-down is used. If a color is desired that is not in the extended list, a new name may be invented using the Tools > Data Editing > Colors menu.
If a lot of map customization with extended choice lists will be done at one time, then it may be easier to first go to the Map > Allow more choices menu and select whether normal or extra lists will be pre-set.
In the extended color list, there is also a list of generic "numbered" colors at the bottom. There are three colors assigned to each empire in the game, numbered by empire. Empire #1 uses #1A, #18, & #1C; empire #2 uses #2A, #28, & #2C; etc. These colors may be used to form a standard set of colors for each empire, and the pre-defined maps use these colors in their definitions. They may be used for any custom mapping definitions as well. This generic numbering scheme becomes useful when examining the Tools > Data Editing > Empire Information screen. Each empire encountered in the game is listed here, along with spaces for selecting the three generic colors used by that empire. Changing any of the colors on the screen will simultaneously change all of the maps that use that generic color, so all maps using them may have their colors adjusted as a group if desired.
In addition to a color, the Pen selection also includes a Line Type drop-down list. The Invisible selection disables drawing of outlines, paths, or borders. The Solid selection is a solid, thin line. A few other selections are normally available, but if additional choices desired use the "+" button next to the drop-down to cause more choices to appear in the list.
In addition to a color, the Brush selection also include a Brush Pattem drop-down list. The Invisible selection causes any outline or border to be left hollow transparent) and not filled in (so what is behind it shows through). The Solid selection causes the outline or border to be filled with the solid color selected. If patterning of the filled area is desired, use the "+" button next to the drop-down to cause additional choices to appear in the list. Territories, in particular, can benefit well from using patterned interiors so that the foreground symbols are not as difficult to see.
If a Territory brush is chosen as Invisible but the Pen Line Type is not, then all that is shown is the border of the area. This is the way to draw only an outline around a selected area, such as a particular distance away from a central point.
When Pen or Brush selections are chosen or changed, and a shape (where applicable) is also selected, the Preview window below will show an example of the composite symbol/line/territory with those choices.