Fub.DLL - User Instructions
All user instructions exist in a file named fub.txt that is copied to your computer during installation. On this website, I have split up that text into various pages. Below is the text that relates to user instructions. Check back later, as I may include more help on these pages, with screen shots, etc.
Contents:
Accessing from EDIE
Fubster's World Build User Interface
General Flow
Parameters
Land Mass Parameters
Sea Borders
Land Mass Placement Options
Terrain
Cities
Player Cities
Building Algorithms
Shapes
Load Settings & Save Settings
Set Lo = Hi for All
Recommend Parameters
Cancel
Build
There are two places you can access the DLL from EDIE:
From the Map/Scenario editor, by clicking the menu options Map|Build with DLL (or pressing Alt-D)
From the New Game dialog, by clicking the button "Generate Random World with DLL".
In both cases, EDIE prompts you with the original parameter screens: a window titled "Choose Your World Building Factors" and another titled "Choose Your City Building Factors". Simply click on OK for both of these windows. Fub.DLL completely ignores these selections.
Fubster's World Build User Interface
If everything is installed/setup correctly, the next thing you should see is the User Interface for Fubster's Random Map Builder. Click on the tabs across the top (labeled "Land Masses", "Terrain", "Cities", "Player Cities", "Building Algorithms", and "Shapes") to access the various groups of parameters. Once you have the parameters as you like them, click on the "Build" button to build your world.
This world build function generates worlds that are mostly water (usually 50% or more) with land masses scattered throughout. Internally, the flow goes something like this:
Start with a world cleared to sea.
For each land mass requested:
Build the land mass as all Clear Terrain. This is done on a "template" separate from the rest of the world.
Attempt to place the land mass on the world such that it does not overlap previously placed land masses.
All Large land masses are built and placed first, followed by Mediums, then Smalls.
Build "Tiny Islands" as requested. These are small groups of adjacent land squares scattered throughout the map. These may end up touching other land masses, and may even connect two land masses.
Add Terrain as requested. Notice that this is done on a world-wide basis all at once, so that an individual land mass is probably not going to have an even distribution of terrain.
Mountains are placed first.
Rough is second, and will not overwrite existing mountains.
Forrest is third, and will not overwrite existing mountains or rough.
Rivers are run last, and a river may overwrite existing terrain.
Add cities as requested. Cities are randomly placed anywhere on the map where there is already land, and can be placed overtop of existing terrain.
In keeping with the idea that this is a random map, most parameters are in the form of a "range". You can specify a low value and a high value, and the program will calculate some random value inside that range. If you want a known value for a parameter, simply enter the same value for Lo and Hi. To save typing, there are some strategically placed "Lo = Hi" check boxes. When checked, the effected parameters will allow you to type in a value for the Lo value, and automatically fill in the same value for Hi. There is also a button near the bottom of the window labeled "Set Lo = Hi for All" that checks all of these boxes simultaneously.
Land masses are segregated into three sizes, Large, Medium, and Small. You can specify how many of each size to build, how big (in squares) each size is, and how wide a border to use when placing the mass (see "Sea Borders" below). Also, you may specify how many total squares to use in placing tiny islands.
Note the status bar at the bottom of your window. The first cell shows the dimensions of your map (specified in EDIE prior to calling the DLL). The second cell shows the total number of squares for this map, the result of the map width multiplied by the map height, so this number does include edge sqaures. The third cell shows the percentage of land that results from the current parameters. Notice that this is also in the form of a range. The last two cells are more meaningful after your press "Build", and are covered under "Build" below.
Borders only affect a land mass that is being placed, previously placed land masses no longer have sea borders. Large masses are created and placed first, followed by Medium, then Small. So if you have Large Borders set to 8, and medium borders set to 2, it is possible to have a medium land mass within two squares of a large. Also, borders are created perpendicular only, or NSEW of existing squares. So that a mass with a border of 1 may end up "connected" to another land mass through a diagonal. Also, remember that tiny islands can end up adjacent to land masses, and may connect land masses.
Land masses are built separate from the final map, and there is a separate algorithm for placing a land mass. This algorithm randomly chooses a square on the map, treats this as the center of the land mass, and looks for any conflicts (overlap of another land mass). If a conflict arises, then it picks another spot. This will continue a certain number of times, and if the limit is reached, the algorithm will report placement failure.
Certain parameters affect this algorithm:
"Space Large Masses Evenly across Map (6 max)" (default to No): When checked, this will cause the large land masses to be spaced evenly across the map, and the sea border is completely ignored.
"Sea Borders Effect Placement of Mass near Edges" (default to No): If yes, then the sea border will also keep the land mass that far away from any map edge. If no, then the land mass may be placed right up to the edge. This option should cause some land masses to touch the map edges, which means that ships cannot circumnavigate these land masses.
"Allow Mass to be placed where it is partially off edge" (default to No): If yes, then only other land masses will effect placement. Note that since the center of the land mass is used for placement purpose, a large portion of the land mass should still be on the map. This option should also cause some land masses to touch the map edges.
The Terrain parameters control the percentage of each terrain that is placed on the final map. All remaining land terrain will be clear. If the percentages entered total more than 75%, then all percentages are dropped until they total 75% or less. This happens internally after you press "Build", and you will not see the values on the screen change.
The City parameters control how cities are built and placed on the map. You may choose between three methods of determining the number of cities that are placed on the map. If you set the dropdown to "Specify", then the parameters define a range for the number of cities. If you choose "Calculate (Land)", then the amount of land (squares) that is generated will be divided by the two parametes given to define the range for the number of cities. If you choose "Calculate (Map)", a similar calculation is used with the total number of map squares.
% Coastal controls the number of cities that are placed next to a sea square. Production % defines a range for the random production percentage assigned to each city. % Specialty controls what percentage of cities will be assigned a specialty.
City Placement Algorithms determine how cities are placed on the map.
"Randomly Place Cities Throughout": Cities are simply randomly placed all over the map on existing land squares.
"Evenly Place on Land Masses by Size": The same number of cities will be placed on each land mass of the same size, up to the size selected for "Placement by Size". For instance, if "Placement by Size" = "Large Only", then each large land mass will have the same number of cities placed on it, and all remaining cities will be randomly placed throughout the map. If "Placement by Size" = "Large and Medium", then each large will have the same number of cities, each medium will have the same number of cities (and this will probably be a different number than the number placed on each large), and the remaining will be random.
"Determining Number" is used to determine what number to place on each sized land mass:
"Proportional by Total Land Size": Total land size for each size land mass is used to proportionately distribute the cities. So that if "Placement by Size" = "Large Only", and 50% of the land is made up of large land masses, then 50% of the cities will be placed on large land masses, and these cities will be evenly split among the large land masses so that each large has the same number of cities. The rest of the cities are randomly placed on the map on other land masses.
"Specified by Percentage": You will specify the percentage of cities that is placed on each land mass size. The number of percentages entered will vary according to the setting of "Placement by Size".
"Specified by Number (per Land Mass): You sill specify the number of cities that is place on each land mass of a given size.
"Proportionately Place on Land Masses": Each land mass is given a number of cities proportional to the amount of land it has, up to the size selected for "Placement by Size". For instance, if "Placement by Size" = "Large Only", then each large land mass will have a proportional number of cities placed on it, and all remaining cities will be randomly placed throughout the map. If "Placement by Size" = "Large and Medium", then each large and medium will have a proportional number of cities, and the remaining will be random.
A few notes about Cities:
When placing cities, the DLL calculates a number for Coastal Cities and a number for Inland Cities. If the map does not have enough coastal or inland squares to accommodate the calculated number, then the DLL places those cities it can, then stops. It will not place additional cities of the other type to compensate for those it could not place.
When placing Coastal cities, the DLL does not distinguish between land-locked lakes and the open sea. A city that sits next to a land-locked lake was placed as a coastal city.
Cities are only placed on existing land, new land squares will not be created to accommodate requested cities.
Terrain is placed prior to cities, and cities will be placed on any land square, overwriting the existing terrain.
For the purposes of City Placement Algorithms, all "Tiny Islands" are considered a single land mass.
Currently there are no parameters to control assigning cities to players, all cities are neutral. This tab is simply holding a spot where parameters will be placed in a future (the next!) version.
Currently, the DLL has three different algorithms for building a land mass. Place a check mark next to the algorithms you want to be used. The "weight" beside each algorithm can be any number 1-100. The DLL uses the relative weights for each algorithm to determine which one will be used for each land mass.
Each algorithm also has it's own associated set of parameters that control the behavior of that algorithm. To determine how each parameter affects the final land mass shape, I suggest that you select a single algorithm and play around with the parameters. Here is a brief description of each algorithm:
Wandering Blob: First a base, random shape is created. This is done by starting with a single square, then randomly adding squares in "wandering" pattern. After the base shape is created, then entire shape is padded by randomly adding squares to all existing squares. After the "random-even" pad is added, an "erratic" pad is added.
Stick Blob: First a base, random shape is created. This is done by starting with a few scattered squares (points), then connecting them (resulting in "sticks"). After the base shape is created, a "random-even" pad is added, followed by an "erratic" pad.
Shapes: Most of the final land mass is used to create a "known" shape. Then, a "random-even" pad is added, followed by an "erratic" pad.
A final note on parameters. The values labeled "Erratic/Evenness" are considered more "erratic" for smaller values, and more "even" for larger values. The value labeled "Loose/Tightness" is considered more "loose" for smaller values, and "tighter" for larger values.
This tab allows you to select what shapes are available for the Shapes algorithm. Currently there are 24 separate shapes available. Any shape that is checked will be in the pool for shapes used in making the map. When a shape is created, there are several factors that determine it's final outcome:
Size: This is determined by the size parameters on the first tab as well as the "Percent of Mass" parameter.
Proportions: Most shapes have proportions that further define its shape. For instance, a rectangle will have a proportion between its width and height. These proportions are randomly calculated within predefined limits internally.
Orientation: Any shape can exist in one of 8 orientations. Think of taking a shape and rotating it 90 degrees 4 times, and also looking at the mirror images of those 4 orientations. That defines the 8 orientations of a shape. Obviously, for some shapes, two or more orientations are equivalent. The circle is a notable exception, as it appears the same in all orientations. The "teardrop" is an easy to see example of a shape that is distinct in each orientation. In fact, if you make a map with shape as the only algorithm, teardrop as the only shape, and set Percent of Mass = 100, you can readily see all 8 orientations (assuming you specify enough land masses).
These two buttons give you the opportunity to save the parameter settings to a file, and retrieve those settings from a file. Please notice that if you want to save your settings, you must do so prior to pressing "Build".
The first time you press "Load Settings" or "Save Settings", a subfolder named "fubsett" will be created. This is the default folder where all setting files will be kept. Setting files are created with an extension of "fst". Long filenames are supported.
If you save a file named "default.fst" in the "fubsett" subfolder, that setting file will automatically be loaded when the DLL is called. This is extremely useful if you want to run the same settings over and over again in rapid succession.
As mentioned earlier, there are some strategically placed "Lo = Hi" check boxes throughout the user interface. Pressing the "Set Lo = Hi for All" button checks all of these boxes simultaneously.
Pressing the "Recommend" button will cause the DLL to randomly calculate some land mass parameters arrive at Land Percentages between of Lo = 10-25% and Hi = 40-60%. Currently, this button only changes the "Number on Map" and "Size in Squares" parameters on the "Land Masses" tab.
Pressing the Cancel button will cause the DLL to exit without building a world. EDIE does not provide a way for the DLL to communicate that the user chose to cancel, only the ability to report "failure". So, after pressing cancel, EDIE will report "World Build Function Returned an Error".
When you press "Build", the DLL starts to do its work. On the status bar, the last two cells keep you informed on the progress. The first one shows some text to explain what is happening internally ("Large - Making", "Medium - Placing", etc.) The second one is a progress indicator, which will grow as the DLL is nearing completion.
There are a few situations that will cause the DLL to run slow, and these usually involve the DLL trying to accomplish some nearly-impossible task over and over again until the fail-safe limit is met. Usually this is when the DLL is trying to place a land mass and cannot find a spot to place it. Here are a few conditions that may cause this to happen:
You have requested land mass parameters that result in a land percentage greater than 50%.
You have asked for several large land masses with erratic shapes. The more erratic a shape is the harder it will be to find a spot to place it.
You have asked for large sea borders. Large sea borders make it harder to place land masses.
During the build, if you decide that the parameters are not going to give you the desired result, or if the processing is taking too long, press the ESC key. You will then be given the option to cancel the build. If you select "Yes", the build stops and you are back at the parameters form, where you can change your options and press build again, or simply click on "Cancel" to exit without building a random world.