The Handbook Maintenance Spreadsheet

Status
Not open for further replies.

r3naissanc3r

TNPer
-
-
The Handbook Maintenance Spreadsheet


What is the Handbook Maintenance Spreadsheet?

The Handbook Maintenance Spreadsheet ("the spreadsheet") is a Google spreadsheet that is used to edit and automatically update The North Pacific Handbook ("the handbook") set of dispatches. It is publicly viewable, but use access is restricted to select members of the Cabinet and Executive Staff.

How does it work?

The Handbook dispatch code sheet of the spreadsheet has a collection of dispatch IDs, along with their corresponding titles, category IDs, and code templates for their content.

The code templates are very similar to the code you enter into the "Text" box when editing a dispatch through NationState's standard dispatch page. The only difference is that, in certain places, they contain macros indicated by a @@ prefix and suffix, e.g., @@DELEGATE_NATION@@.

Once per day, at around 8:00am Eastern Time, a script on The North Pacific's offsite server ("the maintenance script") goes through the list of dispatch IDs, and edits them to have the corresponding title, category, and content. When editing the content, the script replaces all macros in the dispatch's code template with their corresponding current values, e.g., all instances of the tag @@DELEGATE_NATION@@ are replaced by the current delegate nation. The information for replacing the macros comes from the Government Registry.

What macros are available?

The Available macros sheet of the spreadsheet lists all currently available macros. To add more macros, you can contact r3naissanc3r.

How do I edit a handbook dispatch?

Because the handbook dispatches are automatically edited once per day by the maintenance script, it is not possible to edit them manually using The Northern Light nation or The Northern Light Dispatch Service. Any edits to the dispatches made manually will be overwritten the following day by the maintenance script.

Instead, to make edits one of the handbook dispatches, you must follow these steps:
  • In the Handbook dispatch code sheet, find in column A the row with the ID of the dispatch you want to edit.
  • Staying on the same row, edit in column B the title of tie dispatch.
  • Staying on the same row, edit in column C the category of tie dispatch.
  • Staying on the same row, edit in column D the code of tie dispatch.
When editing the dispatch code, make sure to use the available macros whenever possible. If instead of using, say, the macro @@DELEGATE_NATION@@ you hardcode a link to a specific nation, then that link will not be automatically updated next time the delegate changes.

How do I add a new dispatch to the maintenance script?

First, use The North Pacific Dispatch Service to publish your dispatch from The Northern Light nation. Following that, add the dispatch ID, title, category ID, and code template in the first non-empty line in the Handbook dispatch code sheet of the spreadsheet. As above, make sure to use macros where appropriate in the code template.

Maintenance, bugs, suggestions, and access requests

The spreadsheet is maintained by r3naissanc3r. Suggestions for improvements, bug reports, and related questions should be sent to him, either through personal message on the forum, or on Discord.

To get access to the spreadsheet, you should contact the current Delegate, Minister of Home Affairs, or r3naissanc3r. You can also click on the "Request access" button at the top-right of the spreadsheet page, which will notify r3naissanc3r about your request.
 
Status
Not open for further replies.
Back
Top