From 68155a00e006a19c5398f5b0d45a72d86897bd0b Mon Sep 17 00:00:00 2001 From: tibetiroka <68112292+tibetiroka@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:21:09 +0100 Subject: [PATCH 01/16] "can trigger after failure" node for mission triggers (#22) --- wiki/CreatingMissions.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wiki/CreatingMissions.md b/wiki/CreatingMissions.md index 2be2c6b..2debb1a 100644 --- a/wiki/CreatingMissions.md +++ b/wiki/CreatingMissions.md @@ -728,6 +728,13 @@ There are eleven events that can trigger a response of some sort: * `daily`: every time the date advanced (every jump between systems and departure from a planet). (**v. 0.9.15**) * `disabled`: if the player's flagship becomes disabled. (**v. 0.10.3**) +Beginning in **v. 0.10.9**, most of these triggers will not activate when the mission is already failed. In some cases, it still might be useful to keep track of the player until they land even if the mission failed. In these cases, you can make the triggers work by using `"can trigger after failure"`. +```html +on disabled + "can trigger after failure" + ... +``` + Beginning with **v. 0.9.9**, the `enter` action supports determining the system with a [location filter](LocationFilters). This filter is formatted in the same manner as `source` or `destination` for missions, or `system` for NPCs. ```html on enter From 97789151fdf0854be54f7287f91f821d1bd11e8b Mon Sep 17 00:00:00 2001 From: tibetiroka <68112292+tibetiroka@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:25:48 +0100 Subject: [PATCH 02/16] Update "to display" usage in dialogs and planet descriptions (#20) --- wiki/CreatingMissions.md | 4 ++-- wiki/MapData.md | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/wiki/CreatingMissions.md b/wiki/CreatingMissions.md index 2debb1a..d985ed5 100644 --- a/wiki/CreatingMissions.md +++ b/wiki/CreatingMissions.md @@ -761,7 +761,7 @@ dialog phrase This gives a message to be displayed in a dialog message to the user. If the trigger is `on offer`, the dialog will have "accept" and "decline" buttons. Otherwise, it is a purely informational message and only an "okay" button is shown. -Each token following the `dialog` tag will be a separate paragraph. The first token may appear either on the same line or indented on a subsequent line. +Each token following the `dialog` tag will be a separate paragraph. The first token may appear either on the same line or indented on a subsequent line. Beginning in **v. 0.10.9**, each line can also be given a `to display` node with a [condition set](Player-Conditions). `dialog phrase` can be used to create a single phrase that is used for multiple dialogs, instead of needing to copy and paste the same dialog over and over again. An example of where this is used in game is for `on visit` dialogs. @@ -792,7 +792,7 @@ If the outfit cannot be installed due to lack of space, a warning message will b The `require` keyword checks that the player has at least one of the named outfit, but does not take it away. For example, this could be used in the `on offer` phase to only offer a mission to players who have a "Jump Drive". Starting with **v. 0.9.9**, a specific quantity can be required, including 0 (i.e. the player cannot have any). If a non-zero quantity is specified, then the player's flagship is checked alongside the cargo holds of all in-system escorts, or only the flagship's cargo if this is a boarding mission. If a quantity of zero is specified, then the player cannot have that outfit anywhere on any of their ships. -Beginning in **v. 0.9.15**, if the outfit being gifts has the "map" attribute, then the player will be given the information from that map as if they had purchased it from the outfitter. If an outfit with the "map" attribute is being required by a mission and the required value is 0, then the player must have the nearest systems that match the size of the map outfit unvisited, but if the required value is greater than 0 then the nearest systems must be visited. +Beginning in **v. 0.9.15**, if the outfit being gifted has the "map" attribute, then the player will be given the information from that map as if they had purchased it from the outfitter. If an outfit with the "map" attribute is being required by a mission and the required value is 0, then the player must have the nearest systems that match the size of the map outfit unvisited, but if the required value is greater than 0 then the nearest systems must be visited. ```html give ship [] diff --git a/wiki/MapData.md b/wiki/MapData.md index ec683b2..0f21a92 100644 --- a/wiki/MapData.md +++ b/wiki/MapData.md @@ -471,13 +471,21 @@ The [music](#ambient-music) that is played while landed on this planet. description ``` -The description that is shown when first landing on a planet. +The description that is shown when first landing on a planet. Beginning in **v. 0.10.9**, each line can also be given a `to display` node with a [condition set](Player-Conditions): +```html +description "This planet is a very nice place." + to display + not "terrible things happened" +description "Frog People invaded and the planet is now almost devoid of life." + to display + has "terrible things happened" +``` ```html spaceport ``` -The description of the spaceport after clicking the spaceport button. +The description of the spaceport after clicking the spaceport button. Beginning in **v. 0.10.9**, each line can also be given a `to display` node with a [condition set](Player-Conditions). ```html port [] From 3f3fa5f2fd63e3616a919ced327ca027aa728b68 Mon Sep 17 00:00:00 2001 From: mOctave <73318970+mOctave@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:19:33 +0100 Subject: [PATCH 03/16] Include default values of planetary "bribe" and tribute threshold in MapData (#25) --- wiki/MapData.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wiki/MapData.md b/wiki/MapData.md index 0f21a92..27e577b 100644 --- a/wiki/MapData.md +++ b/wiki/MapData.md @@ -545,6 +545,7 @@ security The behavior that this planet has when the player has illegal goods or outfits. The bribe number is a multiplier that modifies the severity of any fines, while the security number is a value between 0 and 1 that dictates the chance of a player's ship being scanned. +If no bribe is specified, then a default bribe of 0.01 is used. If no security is specified, then a default security of 0.25 is used. ```html @@ -573,7 +574,7 @@ The number of credits that will be paid to the player per day if this planet has threshold ``` -The combat rating that the player must have before being capable of demanding tribute from this planet. +The combat rating that the player must have before being capable of demanding tribute from this planet. If no threshold is specified, then a default threshold of 4000 is used. ```html fleet From b7290be0dd2f76cc59d306f2c3b290eca2f540ad Mon Sep 17 00:00:00 2001 From: Loymdayddaud <145969603+TheGiraffe3@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:20:36 +0100 Subject: [PATCH 04/16] Add Incipias to StoryIdeas (#29) --- wiki/StoryIdeas.md | 1 + 1 file changed, 1 insertion(+) diff --git a/wiki/StoryIdeas.md b/wiki/StoryIdeas.md index 081da74..18bdae3 100644 --- a/wiki/StoryIdeas.md +++ b/wiki/StoryIdeas.md @@ -8,6 +8,7 @@ The military "strength" of each civilization also depends on how populous they a The existing aliens are grouped roughly into tiers, where a heavy warship of a civilization on one tier is a match for a light warship of the next tier up: +* Tier 0.5: Incipias * Tier 0.8: Gegno * Tier 1: Humans * Tier 1.2: Hai From 591f371a2316f1a5de2a950238e39a86242e3c3e Mon Sep 17 00:00:00 2001 From: Anarchist2 <60202690+Anarchist2@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:21:37 +0100 Subject: [PATCH 05/16] Link to the updated build instructions --- wiki/Home.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/Home.md b/wiki/Home.md index 5210521..e1817e4 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -49,7 +49,7 @@ These pages generally describe the game syntax in accordance with the [data form ### Compiling or modifying the source code -* [Build instructions](https://github.com/endless-sky/endless-sky/blob/master/docs/readme-developer.md) +* [Build instructions](https://github.com/endless-sky/endless-sky/blob/master/docs/readme-cmake.md) * [Contributing to the code](ContributingCode) * [C++ style guide](https://endless-sky.github.io/styleguide/styleguide.xml) From 60ecc4af43ecbba6c932dc28b26622b3031c2eb1 Mon Sep 17 00:00:00 2001 From: Anarchist2 <60202690+Anarchist2@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:24:11 +0100 Subject: [PATCH 06/16] On the sidebar as well --- wiki/_Sidebar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md index 6f8358c..a2ad5b6 100644 --- a/wiki/_Sidebar.md +++ b/wiki/_Sidebar.md @@ -48,7 +48,7 @@ **Compiling or modifying the source code** -* [Build instructions](https://github.com/endless-sky/endless-sky/blob/master/docs/readme-developer.md) +* [Build instructions](https://github.com/endless-sky/endless-sky/blob/master/docs/readme-cmake.md) * [Contributing to the code](ContributingCode) * [C++ style guide](https://endless-sky.github.io/styleguide/styleguide.xml) From 50117ab35a77cc82335497134085f34b8bab1de1 Mon Sep 17 00:00:00 2001 From: TomGoodIdea <108272452+TomGoodIdea@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:25:08 +0100 Subject: [PATCH 07/16] "spawn on" for submunitions --- wiki/CreatingOutfits.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wiki/CreatingOutfits.md b/wiki/CreatingOutfits.md index 0eda6ee..dc46b25 100644 --- a/wiki/CreatingOutfits.md +++ b/wiki/CreatingOutfits.md @@ -654,6 +654,8 @@ An outfit that provides a weapon contains an extra set of attributes inside a `w * `"offset" `: an *x,y* coordinate pair that cause the submunition projectile's generated location to be shifted from the parent projectile's death location by the given number of units in the x and y directions. Axes orientation is the standard Cartesian, where `+x` is "rightward" and `+y` is "upward." **(v. 0.9.15)** + * `"spawn on" ...`: a list defining when the submunition can spawn. Accepted values are: `natural` for natural death of the source projectile, and `anti-missile` for destruction of the source projectile by an anti-missile system. Omitting this line means that the submunition is spawned only when the parent projectile dies naturally. **(v. 0.10.9)** + The following attributes are tags (just the word by itself, no value following it) which alter how a weapon fires or the behavior of its projectiles. * `stream`: makes a weapon fire in "stream" mode (multiple copies of this weapon take turns firing) even if it is susceptible to anti-missile. Most weapons fire in stream mode by default. **(v. 0.9.0)** From 57ce2efdf595cf341dd5fd81b61860d6059f461f Mon Sep 17 00:00:00 2001 From: warp-core Date: Wed, 29 May 2024 23:57:16 +0100 Subject: [PATCH 08/16] Describe the errors file in CreatingPlugins (#2) --- wiki/CreatingPlugins.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/wiki/CreatingPlugins.md b/wiki/CreatingPlugins.md index 73ebc59..1f4846e 100644 --- a/wiki/CreatingPlugins.md +++ b/wiki/CreatingPlugins.md @@ -1,4 +1,8 @@ -The easiest way to test out new content for Endless Sky is to create a plugin. An example plugin is available [here](https://endless-sky.github.io/example-plugin.zip). For each operating system, there are two places where the game looks for plugins, but generally you should only use the second option: +The easiest way to test out new content for Endless Sky is to create a plugin. An example plugin is available [here](https://endless-sky.github.io/example-plugin.zip). + +There are two places where the game looks for a plugins folder, the "resource" directory, where the base game data is, and the "config" directory, where user specific data, like save files and preferences are stored. +Generally, you should only use the config directory (second in the list below). +This list gives the default locations of the plugins folder in the resource and config directories, respectively, for each operating system. #### Linux * /usr/share/games/endless-sky/plugins/ @@ -39,6 +43,21 @@ plugins/ ... ``` +## Finding errors + +Alongside the plugins folder in the config directory, Endless Sky will create a file named "errors.txt". + +Linux: +* ~/.local/share/endless-sky/errors.txt +Windows: +* %APPDATA%\endless-sky\errors.txt +macOS: +* ~/Library/Application Support/endless-sky/errors.txt + +Any errors the game encounters while loading data or in gameplay will be written to this file. +The first time an error is encountered in a session, the existing content of this file will be deleted and overwritten, so the content reflects the most recent time errors were encountered. Note, however, that if two instances of the game are running, only one will be able to modify this file. +The errors reported here can be useful in identifying syntactic issues in plugin data, or finding mismatches in image properties, such as different frames of a sprite having different dimensions, or sprites having odd dimensions (which can lead to blurriness). + ## Editing data files When editing the game data, you should use a text editor that is designed for writing computer code. The data file format is represented by how indented each line is, so **editing the data in a word processor like Microsoft Word or in a program like Notepad that does not support automatic indentation will be difficult and frustrating**. If you're on Windows, [Notepad++](https://notepad-plus-plus.org/) is a good, free text editor you can use. From c0fe62ec413034dd0af8430d65dd8cec29ae1d30 Mon Sep 17 00:00:00 2001 From: warp-core Date: Thu, 30 May 2024 00:32:07 +0100 Subject: [PATCH 09/16] Add codespell Action --- .codespell.exclude | 0 .codespell.words.exclude | 1 + .github/workflows/checks.yaml | 28 ++++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 .codespell.exclude create mode 100644 .codespell.words.exclude create mode 100644 .github/workflows/checks.yaml diff --git a/.codespell.exclude b/.codespell.exclude new file mode 100644 index 0000000..e69de29 diff --git a/.codespell.words.exclude b/.codespell.words.exclude new file mode 100644 index 0000000..546ef5d --- /dev/null +++ b/.codespell.words.exclude @@ -0,0 +1 @@ +grey diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml new file mode 100644 index 0000000..1d59743 --- /dev/null +++ b/.github/workflows/checks.yaml @@ -0,0 +1,28 @@ +name: Check + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + spellcheck: + name: Spelling + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + show-progress: false + - uses: codespell-project/actions-codespell@master + with: + builtin: clear,en-GB_to_en-US + path: wiki/ + exclude_file: .codespell.exclude + ignore_words_file: .codespell.words.exclude From 218e6e1fdb1a08a96f4ea95eec8b15afca3eb4d0 Mon Sep 17 00:00:00 2001 From: Maryn s <59803265+Maryn-s@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:59:01 +0100 Subject: [PATCH 10/16] fix(typo): Correct "disabled" to "delayed" in some regeneration and repair attribute descriptions (#38) --- wiki/CreatingOutfits.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/wiki/CreatingOutfits.md b/wiki/CreatingOutfits.md index dc46b25..d845750 100644 --- a/wiki/CreatingOutfits.md +++ b/wiki/CreatingOutfits.md @@ -115,17 +115,17 @@ Unless otherwise states, other outfit attributes will stack additively between m * `"shield fuel"`: the amount of fuel that shield regeneration consumes when recharging at the full rate. **(v. 0.9.9)** Beginning in **v. 0.9.13**, this value is capable of being negative, causing shield generation to grant fuel. - * `"shield delay"`: the number of frames that must pass without taking shield damage in order for shield generation to begin. **(v. 0.9.13)** Beginning in **v. 0.10.7**, this only impacts the disabled shield attributes described below. + * `"shield delay"`: the number of frames that must pass without taking shield damage in order for shield generation to begin. **(v. 0.9.13)** Beginning in **v. 0.10.7**, this only impacts the delayed shield attributes described below. - * `"depleted shield delay"`: the number of frames that must pass after the shields have been depleted (i.e. reached 0) in order for shield generation to begin. **(v. 0.9.13)** Beginning in **v. 0.10.7**, this only impacts the disabled shield attributes described below. + * `"depleted shield delay"`: the number of frames that must pass after the shields have been depleted (i.e. reached 0) in order for shield generation to begin. **(v. 0.9.13)** Beginning in **v. 0.10.7**, this only impacts the delayed shield attributes described below. - * `"disabled shield generation"`: shield generation that is only active when the above shield delay timers have hit zero. **(v. 0.10.7)** + * `"delayed shield generation"`: shield generation that is only active when the above shield delay timers have hit zero. **(v. 0.10.7)** - * `"disabled shield energy"`: shield energy that is only active when the above shield delay timers have hit zero. **(v. 0.10.7)** + * `"delayed shield energy"`: shield energy that is only active when the above shield delay timers have hit zero. **(v. 0.10.7)** - * `"disabled shield heat"`: shield heat that is only active when the above shield delay timers have hit zero. **(v. 0.10.7)** + * `"delayed shield heat"`: shield heat that is only active when the above shield delay timers have hit zero. **(v. 0.10.7)** - * `"disabled shield fuel"`: shield fuel that is only active when the above shield delay timers have hit zero. **(v. 0.10.7)** + * `"delayed shield fuel"`: shield fuel that is only active when the above shield delay timers have hit zero. **(v. 0.10.7)** * `"high shield permeability"`: The permeability of your shields while they are at 100% strength. A shield which is permeable allows some damage to bleed through to the hull. For example, a permeability of 10% means that 90% of the damage hits the shields and 10% hits the hull. As shield strength drops, the permeability of your shields approaches the low shield permeability value. **(v. 0.10.1)** @@ -141,17 +141,17 @@ Unless otherwise states, other outfit attributes will stack additively between m * `"hull fuel"`: the amount of fuel that hull repair consumes when recharging at the full rate. **(v. 0.9.9)** Beginning in **v. 0.9.13**, this value is capable of being negative, causing hull repairs to grant fuel. - * `"repair delay"`: the number of frames that must pass without taking hull damage in order for hull repairs to begin. **(v. 0.9.13)** Beginning in **v. 0.10.7**, this only impacts the disabled hull repair attributes described below. + * `"repair delay"`: the number of frames that must pass without taking hull damage in order for hull repairs to begin. **(v. 0.9.13)** Beginning in **v. 0.10.7**, this only impacts the delayed hull repair attributes described below. - * `"disabled repair delay"`: the number of frames that must pass without taking hull damage after the ship has been disabled in order for hull repairs to begin. Note that the delay timers for both hull and shields do not decrease while the ship is unable to repair itself (i.e. it is disabled), so this attribute is the time after the ship has been assisted for repairs to start. **(v. 0.9.13)** Beginning in **v. 0.10.7**, this only impacts the disabled hull repair attributes described below. + * `"disabled repair delay"`: the number of frames that must pass without taking hull damage after the ship has been disabled in order for hull repairs to begin. Note that the delay timers for both hull and shields do not decrease while the ship is unable to repair itself (i.e. it is disabled), so this attribute is the time after the ship has been assisted for repairs to start. **(v. 0.9.13)** Beginning in **v. 0.10.7**, this only impacts the delayed hull repair attributes described below. - * `"disabled hull repair rate"`: hull repair rate that is only active when the above repair delay timers have hit zero. **(v. 0.10.7)** + * `"delayed hull repair rate"`: hull repair rate that is only active when the above repair delay timers have hit zero. **(v. 0.10.7)** - * `"disabled hull energy"`: hull energy that is only active when the above repair delay timers have hit zero. **(v. 0.10.7)** + * `"delayed hull energy"`: hull energy that is only active when the above repair delay timers have hit zero. **(v. 0.10.7)** - * `"disabled hull heat"`: hull heat that is only active when the above repair delay timers have hit zero. **(v. 0.10.7)** + * `"delayed hull heat"`: hull heat that is only active when the above repair delay timers have hit zero. **(v. 0.10.7)** - * `"disabled hull fuel"`: hull fuel that is only active when the above repair delay timers have hit zero. **(v. 0.10.7)** + * `"delayed hull fuel"`: hull fuel that is only active when the above repair delay timers have hit zero. **(v. 0.10.7)** * These attributes change the point at which a ship becomes disabled. The default point at which a ship becomes disabled is dictated by the equation `hull * max(.15, min(.45, 10. / sqrt(hull)))`. **(v. 0.9.13)** From cda77261c4d20bb17eda6094d02a48297bff61fb Mon Sep 17 00:00:00 2001 From: TomGoodIdea <108272452+TomGoodIdea@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:08:36 +0100 Subject: [PATCH 11/16] fix(typo): Correct list of available font sizes (#37) --- wiki/CreatingInterfaces.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/CreatingInterfaces.md b/wiki/CreatingInterfaces.md index c5089b6..19b7cb7 100644 --- a/wiki/CreatingInterfaces.md +++ b/wiki/CreatingInterfaces.md @@ -222,7 +222,7 @@ In the case of a label, the given text will be drawn directly. With a string, a name is given, and the game sets the text at runtime, selecting this text location with that name. A button is similar to a label, except it also accepts a key token. The first character of this token will be sent as keyboard input if the bounding box for this button is clicked while it is visible and active. -Size defines the font size of the text. The vanilla game supports 12 and 14. +Size defines the font size of the text. The vanilla game supports 14 and 18. Color sets the named color that will be used for the text when it is visible and active. If no color is given, the following defaults will be used: From 474ac0a74fc5544e0bb51dc51e3159843fb1d69d Mon Sep 17 00:00:00 2001 From: warp-core Date: Sun, 11 Aug 2024 23:37:29 +0100 Subject: [PATCH 12/16] docs(pull request template): Update endless-sky PR linking --- .github/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 37618ac..f0a4bf1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,5 +5,6 @@ **Typo fix** (If this PR is to include details on a new feature or a change to a feature, include a link to the PR that makes the corresponding change to Endless Sky.) +https://github.com/endless-sky/endless-sky/pull/ ## Summary From d9bb6217a0e7d57dadbd56322649b58ba3043ce9 Mon Sep 17 00:00:00 2001 From: Loymdayddaud <145969603+TheGiraffe3@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:10:18 +0100 Subject: [PATCH 13/16] fix(typo): "stated" -> "states" in CreatingOutfits.md (#43) Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> --- wiki/CreatingOutfits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/CreatingOutfits.md b/wiki/CreatingOutfits.md index d845750..aa95e78 100644 --- a/wiki/CreatingOutfits.md +++ b/wiki/CreatingOutfits.md @@ -79,7 +79,7 @@ Most attributes are given as a single number, but there are a few "special" attr * `description`: a paragraph of text to show in the outfitter. To define multiple paragraphs, you can add more than one "description" line. -Unless otherwise states, other outfit attributes will stack additively between multiple outfits and can only have values greater than 0. The other attributes include the following: +Unless otherwise stated, other outfit attributes will stack additively between multiple outfits and can only have values greater than 0. The other attributes include the following: * These attributes are basic attributes that practically every outfit will have. From 086c6d1f986d63d4db1f57de8d11c282b2b56932 Mon Sep 17 00:00:00 2001 From: TomGoodIdea <108272452+TomGoodIdea@users.noreply.github.com> Date: Tue, 13 Aug 2024 00:57:02 +0200 Subject: [PATCH 14/16] Describe dynamic buttons in interfaces (#30) --- wiki/CreatingInterfaces.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wiki/CreatingInterfaces.md b/wiki/CreatingInterfaces.md index 19b7cb7..1432570 100644 --- a/wiki/CreatingInterfaces.md +++ b/wiki/CreatingInterfaces.md @@ -33,7 +33,7 @@ interface [] center [] dimensions [colored] - (label ) | (string ) | (button ) + (label ) | (string ) | (button ) | ("dynamic button" ) from [] [color ] width @@ -209,7 +209,7 @@ If the `colored` child node is present, then a custom color can be set by the ga ## Labels, strings, and buttons ```html - (label ) | (string ) | (button ) + (label ) | (string ) | (button ) | ("dynamic button" ) from to [] size color @@ -221,6 +221,7 @@ Defines a location for text to be drawn. In the case of a label, the given text will be drawn directly. With a string, a name is given, and the game sets the text at runtime, selecting this text location with that name. A button is similar to a label, except it also accepts a key token. The first character of this token will be sent as keyboard input if the bounding box for this button is clicked while it is visible and active. +A dynamic button **(v. 0.10.5)** is a combination of a button and a string element. It has the functionality of a button, but its caption is retrieved at runtime. Size defines the font size of the text. The vanilla game supports 14 and 18. From ab2a55ee1a56e65a92efc49cbe78ee44870cf550 Mon Sep 17 00:00:00 2001 From: tibetiroka <68112292+tibetiroka@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:26:05 +0200 Subject: [PATCH 15/16] Changes to phrase and substitution expansion (#21) --- wiki/CreatingMissions.md | 5 +++-- wiki/CreatingSubstitutions.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wiki/CreatingMissions.md b/wiki/CreatingMissions.md index d985ed5..2fa092d 100644 --- a/wiki/CreatingMissions.md +++ b/wiki/CreatingMissions.md @@ -226,6 +226,7 @@ These placeholders will be substituted in any text in the following places: * the mission description * dialog messages contained in the mission * conversations contained in the mission +* custom substitutions defined in the mission **(v. 0.10.9)** For example, the mission description might be, "Deliver `` to `` by ``." @@ -663,7 +664,7 @@ If you want to retrieve passengers or cargo by boarding a ship, set up the missi ship ``` -This specifies a single ship as an NPC. The first argument is the model type (or named variant), such as "Falcon", or "Star Barge (Armed)". The second is the ship's name. +This specifies a single ship as an NPC. The first argument is the model type (or named variant), such as "Falcon", or "Star Barge (Armed)". The second is the ship's name. Beginning in **v. 0.10.9**, phrases and substitutions are expanded NPC ship names. If you want to customize an NPC (for example, having it start out with a particular cargo), you will need to define a variant of the ship and then reference that variant here. Placing the entire ship definition within the NPC definition is supported (because that is how NPC ships are loaded from a saved game) but will not work properly if the ship definition contains any outfits that are not defined yet when the mission definition is parsed. When loading NPCs from saved games, the rest of the game data has finished loading, but this is not otherwise guaranteed. @@ -798,7 +799,7 @@ Beginning in **v. 0.9.15**, if the outfit being gifted has the "map" attribute, give ship [] ``` -Starting in **v. 0.9.13**, missions can gift ships to the player. The named ship model is given to the player. This ship model can be a [ship variant](https://github.com/endless-sky/endless-sky/wiki/CreatingShips#variants). It is optional that the given ship has a name, but if no name is provided then a random name will be generated from the civilian phrase. +Starting in **v. 0.9.13**, missions can gift ships to the player. The named ship model is given to the player. This ship model can be a [ship variant](https://github.com/endless-sky/endless-sky/wiki/CreatingShips#variants). It is optional that the given ship has a name, but if no name is provided then a random name will be generated from the civilian phrase. Beginning in **v. 0.10.9**, substitutions and phrases are expanded in gift ship names. ```html (give | take) ship [] diff --git a/wiki/CreatingSubstitutions.md b/wiki/CreatingSubstitutions.md index 93fb986..aa7abe4 100644 --- a/wiki/CreatingSubstitutions.md +++ b/wiki/CreatingSubstitutions.md @@ -23,7 +23,7 @@ The three types of substitutions, hardcoded, mission-specific, and global, have ``` -Substitutions simply search for the text on the left and replace it with the text on the right whenever it is found within a piece of text. As mentioned above, multiple replacements of the same text can be defined, but whichever replacement is evaluated last is the one that gets used. +Substitutions simply search for the text on the left and replace it with the text on the right whenever it is found within a piece of text. As mentioned above, multiple replacements of the same text can be defined, but whichever replacement is evaluated last is the one that gets used. Beginning in **v. 0.10.9**, substitutions can contain phrases and other substitutions as well. A substitutions node can define multiple text replacements at once. From 22e0ba6a6316d462a3085c013175408c1610c6ff Mon Sep 17 00:00:00 2001 From: tibetiroka <68112292+tibetiroka@users.noreply.github.com> Date: Sat, 24 Aug 2024 11:00:21 +0200 Subject: [PATCH 16/16] Wiki update for blending mode specifier change (#10429) (#45) --- wiki/BlendingModes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/BlendingModes.md b/wiki/BlendingModes.md index b2be73e..c5e85d3 100644 --- a/wiki/BlendingModes.md +++ b/wiki/BlendingModes.md @@ -77,7 +77,7 @@ That is, we're adding somewhere between 50% and 100% of the background to the ob One problem with all of this: depending on your graphics program, it can be really hard to save a PNG files where all the alpha values are zero, and yet the color values are perfectly preserved. What's more, even if you are able to save such a file, opening it in most image viewers will show you a transparent image, rather than the colors that you want to see. -For this reason, Endless Sky is designed to do the premultiplication after loading the image, based on the image name. Each image can (optionally) include a blending mode specifier right before the frame index number: `-` for alpha blending, `+` for additive blending, or `~` for half-additive blending. When each image is read, the alpha premultiplication is done, and then the alpha channel is set to 0 if it is an additive image, or divided by 2 if it is half-additive. This makes it very easy to create input images without any special software tools. +For this reason, Endless Sky is designed to do the premultiplication after loading the image, based on the image name. Each image can (optionally) include a blending mode specifier right before the frame index number: `-` for alpha blending, `+` for additive blending, or `^` for half-additive blending. (Before **v0.10.9**, half-additive blending used `~`, but that is now deprecated.) When each image is read, the alpha premultiplication is done, and then the alpha channel is set to 0 if it is an additive image, or divided by 2 if it is half-additive. This makes it very easy to create input images without any special software tools. For images that are drawn in additive mode, you can supply them as a completely opaque image drawn over a black background. Or, you can just supply an image with transparency, and the additive image will be generated by adding a black background to the image.