User:Avarice77/RevivedContactBook: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
(Added help page for creating contact book for revived user script)
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
To create a contact book that can be downloaded into the Urban Dead interface while you play using the Revived User Script you must follow this pattern.
== Revived UserScript Extended Contact Book ==


1. Create a wiki page and set the content type to JSON.
To create an extended contact book that can be downloaded into the Urban Dead interface while you play using the Revived User Script you must follow this pattern.
2. Add JSON content in the format specified below.
 
3. Save the page and visit it to ensure it is correctly displaying the content <a href="https://wiki.urbandead.com/index.php/User:Avarice77/Contacts">as the example.</a>
== Instructions ==
4. Add the page name, not URL (e.g. User:Avarice77/Contacts) into the 'Contact book' field on the Urban Dead settings page.
 
5. Visit the contacts page/tab and your contacts should be downloaded to a new table below the existing one.
# Create a new wiki page, usually best as a sub page of your user profile but anywhere that doesn't need login access will do.
# Change the [https://wiki.urbandead.com/index.php/Special:ChangeContentModel/ content type to JSON].
# Add content in the JSON format specified below. Add comma-separated curly braces to add more entries.
# Save the page and visit it to ensure it is correctly displaying the content [https://wiki.urbandead.com/index.php/User:Avarice77/Contacts as the example].
# Add the page name, not URL (e.g. User:Avarice77/Contacts) into the 'Contact book' field on the Urban Dead settings page.
# Reload the map.cgi page to reload config and download the contact book from the wiki API. This will have a short delay during the initial download but subsequent reloads won't check this again. To resync the contact book, visit the contacts page/tab and use the refresh button. Your contacts should then be downloaded to a new table below the existing one.


Format:
Format:
<code>
    [
[
      {
    {
         "name": string,          // "Akira Takahashi"
         "name": string,          // "Akira Takahashi"
         "id": number,            // 2361365
         "id": number,            // 2361365
Line 21: Line 25:
         "group": string,          // "Sakura"
         "group": string,          // "Sakura"
         "notes": string          // "zerg"
         "notes": string          // "zerg"
    },
      },
    ...
      ...
]
    ]
</code>

Latest revision as of 02:32, 30 June 2024

Revived UserScript Extended Contact Book

To create an extended contact book that can be downloaded into the Urban Dead interface while you play using the Revived User Script you must follow this pattern.

Instructions

  1. Create a new wiki page, usually best as a sub page of your user profile but anywhere that doesn't need login access will do.
  2. Change the content type to JSON.
  3. Add content in the JSON format specified below. Add comma-separated curly braces to add more entries.
  4. Save the page and visit it to ensure it is correctly displaying the content as the example.
  5. Add the page name, not URL (e.g. User:Avarice77/Contacts) into the 'Contact book' field on the Urban Dead settings page.
  6. Reload the map.cgi page to reload config and download the contact book from the wiki API. This will have a short delay during the initial download but subsequent reloads won't check this again. To resync the contact book, visit the contacts page/tab and use the refresh button. Your contacts should then be downloaded to a new table below the existing one.

Format:

   [
     {
       "name": string,           // "Akira Takahashi"
       "id": number,             // 2361365
       "color": string,          // "#f00"
       "phone": string,          // "2361365"
       "xp": number,             // 167
       "level": number,          // 14
       "overrideColor": boolean, // true
       "class": string,          // "Military"
       "group": string,          // "Sakura"
       "notes": string           // "zerg"
     },
     ...
   ]