User:Dan: Difference between revisions

From Starfleet Command
Jump to navigation Jump to search
Line 21: Line 21:
===How to...JSON file conversion===
===How to...JSON file conversion===
====Creating a new boundary or nebula====
====Creating a new boundary or nebula====
[u]'''Prepare the JSON file'''[/u]
<u>'''Prepare the JSON file'''</u>
# Open a new temporary campaign.
# Open a new temporary campaign.
# Create a new nebula or boundary. While its location does not matter at this point, you might want to place the Label Coordinates in the vicinity of the nebula/boundary (based on your compiled coordinate points). You do not need to add any points at this time.
# Create a new nebula or boundary. While its location does not matter at this point, you might want to place the Label Coordinates in the vicinity of the nebula/boundary (based on your compiled coordinate points). You do not need to add any points at this time.
Line 27: Line 27:
# Go to Settings->Data and press "Export Boundaries and Nebulae to JSON", saving the file to a location of your choosing.
# Go to Settings->Data and press "Export Boundaries and Nebulae to JSON", saving the file to a location of your choosing.


* '''Convert the data'''
<u>'''Convert the data'''</u>
# The data you will be converting needs to be prepared on your spreadsheet in three columns labeled "x", "y", & "z". The "z" column is required, even if your map is 2D; the Z coordinates should all be 0 (zero), if this is the case.
# The data you will be converting needs to be prepared on your spreadsheet in three columns labeled "x", "y", & "z". The "z" column is required, even if your map is 2D; the Z coordinates should all be 0 (zero), if this is the case.
# Paste the coordinate data, ''including all three axis headers'' ('''x, y, z'''), into the top field ("Data Source") [https://tableconvert.com/excel-to-json on this site].
# Paste the coordinate data, ''including all three axis headers'' ('''x, y, z'''), into the top field ("Data Source") [https://tableconvert.com/excel-to-json on this site].
Line 35: Line 35:
# Copy the resulting data from the field.
# Copy the resulting data from the field.


* '''Update the JSON file'''
<u>'''Update the JSON file'''</u>
: 1. In your exported JSON file, replace the two brackets ('''[]''') right after '''"points:"''' with the converted data. Your JSON file will expand to include all of the coordinates in the Array of Object format and should be followed by ''', "boundary thickness:"'''. Be sure to include the comma following the closing bracket (''']''').<br>The last entry should look similar to this (followed by the remainder of the JSON file data):<br>
: 1. In your exported JSON file, replace the two brackets ('''[]''') right after '''"points:"''' with the converted data. Your JSON file will expand to include all of the coordinates in the Array of Object format and should be followed by ''', "boundary thickness:"'''. Be sure to include the comma following the closing bracket (''']''').<br>The last entry should look similar to this (followed by the remainder of the JSON file data):<br>
<pre>  
<pre>  
Line 51: Line 51:
This is both simpler & possibly more complicated.  
This is both simpler & possibly more complicated.  


* '''Existing object file'''<br>
<u>'''Existing object file'''</u><br>
If there is an existing individually-saved up-to-date JSON file for this particular object, then it is a bit easier.  
If there is an existing individually-saved up-to-date JSON file for this particular object, then it is a bit easier.  
# Convert the new coordinates per the '''Convert the data''' section above but, for the final step, only copy the data between the two brackets ('''[]'''), not the brackets themselves. Instead, capture the data starting with and including the two braces ('''{}''') that are within the two external brackets.
# Convert the new coordinates per the '''Convert the data''' section above but, for the final step, only copy the data between the two brackets ('''[]'''), not the brackets themselves. Instead, capture the data starting with and including the two braces ('''{}''') that are within the two external brackets.
Line 60: Line 60:
# Open the target campaign and either merge this temporary campaign with it or import the boundary / nebula object's JSON file directly.
# Open the target campaign and either merge this temporary campaign with it or import the boundary / nebula object's JSON file directly.


* '''No existing object file'''<br>
<u>'''No existing object file'''</u><br>
If there is no individually-saved up-to-date JSON file for this particular object, the data will need to be added to the campaign's points database. Care must be taken to not corrupt the campaign's existing points, so it is recommended the entire campaign be saved prior to the following steps being taken.
If there is no individually-saved up-to-date JSON file for this particular object, the data will need to be added to the campaign's points database. Care must be taken to not corrupt the campaign's existing points, so it is recommended the entire campaign be saved prior to the following steps being taken.
# Convert the new coordinates per the '''Convert the data''' section above but, for the final step, only copy the data between the two brackets ('''[]'''), not the brackets themselves. Instead, capture the data starting with and including the two braces ('''{}''') that are within the two external brackets.
# Convert the new coordinates per the '''Convert the data''' section above but, for the final step, only copy the data between the two brackets ('''[]'''), not the brackets themselves. Instead, capture the data starting with and including the two braces ('''{}''') that are within the two external brackets.

Revision as of 08:25, 10 January 2025

Checklist: Updating DDLCARS ship reports

  • Change all Level 1 headers to Level 2.
  • Add spec tables for each variant.
  • Add Ship Registry.
  • Load Ship Comparison Guide image.
  • Create links for Year references in the article (even if there is no post for that year).
  • Add new timeline events.
  • Review article for new glossary terms.
  • Announce update of ship report.

SRMs


SST

How to...JSON file conversion

Creating a new boundary or nebula

Prepare the JSON file

  1. Open a new temporary campaign.
  2. Create a new nebula or boundary. While its location does not matter at this point, you might want to place the Label Coordinates in the vicinity of the nebula/boundary (based on your compiled coordinate points). You do not need to add any points at this time.
  3. Complete the creation process by pressing the Create button.
  4. Go to Settings->Data and press "Export Boundaries and Nebulae to JSON", saving the file to a location of your choosing.

Convert the data

  1. The data you will be converting needs to be prepared on your spreadsheet in three columns labeled "x", "y", & "z". The "z" column is required, even if your map is 2D; the Z coordinates should all be 0 (zero), if this is the case.
  2. Paste the coordinate data, including all three axis headers (x, y, z), into the top field ("Data Source") on this site.
  3. Scroll down to the site's Table Generator section. Ensure the "JSON" format is selected on the format bar above the display field.
  4. Select the "Parsing JSON" check box; this removes the quotations around the coordinates themselves.
  5. Ensure the JSON Format is set to "Array of Object".
  6. Copy the resulting data from the field.

Update the JSON file

1. In your exported JSON file, replace the two brackets ([]) right after "points:" with the converted data. Your JSON file will expand to include all of the coordinates in the Array of Object format and should be followed by , "boundary thickness:". Be sure to include the comma following the closing bracket (]).
The last entry should look similar to this (followed by the remainder of the JSON file data):
 
{
        "x": 0.36,
        "y": 30.79,
        "z": 0
    }
],"boundary_thickness":
2. Save the completed JSON file.
3. You may now import the JSON file into your primary campaign, but it is recommended you first import it into the temporary campaign made for the single nebula / boundary. From there you can check for conversion errors and to make sure the name label is in proximity to the object. Remember to turn off Parallax mode when checking for errors. Following that, open your primary campaign and merge in the temporary campaign (by selecting the temporary campaign's file). Your nebula or boundary should now appear in the place you directed.

Adding onto an existing boundary or nebula

This is both simpler & possibly more complicated.

Existing object file
If there is an existing individually-saved up-to-date JSON file for this particular object, then it is a bit easier.

  1. Convert the new coordinates per the Convert the data section above but, for the final step, only copy the data between the two brackets ([]), not the brackets themselves. Instead, capture the data starting with and including the two braces ({}) that are within the two external brackets.
  2. Open the object's JSON file.
  3. The pre-existing JSON data will either be compressed in the word-wrapped format or, if saved from a previous conversion (i.e., pre-import), some or all of the pre-existing coordinates will be expanded over multiple lines. In either case, find the last pre-existing coordinate and place a comma between the brace (}) and the bracket (]) that follows it. With no space after the brace, paste in the new converted coordinates.
  4. Save the file and import to a temporary campaign to check for errors. Remember to turn off Parallax mode when checking for errors.
  5. It is recommended you re-export this temporary campaign's Boundaries and Nebulae points if there are no errors and you intend to add additional points in the future. Saving it with the object's in-campaign name will make it easier to find.
  6. Open the target campaign and either merge this temporary campaign with it or import the boundary / nebula object's JSON file directly.

No existing object file
If there is no individually-saved up-to-date JSON file for this particular object, the data will need to be added to the campaign's points database. Care must be taken to not corrupt the campaign's existing points, so it is recommended the entire campaign be saved prior to the following steps being taken.

  1. Convert the new coordinates per the Convert the data section above but, for the final step, only copy the data between the two brackets ([]), not the brackets themselves. Instead, capture the data starting with and including the two braces ({}) that are within the two external brackets.
  2. Export the campaign's Boundaries and Nebulae points.
  3. Open the exported file and search for the targeted boundary or nebula object's in-campaign name.
  4. Find the last pre-existing coordinate for the target object and place a comma between the brace (}) and the bracket (]) that follows it. With no space after the brace, paste in the new converted coordinates.
  5. Save the file and import to a temporary campaign to check for errors. This file will have only the points for the campaign's boundaries & nebulae, not for any other location. Remember to turn off Parallax mode when checking for errors.
  6. If there are no errors, open the target campaign and either merge this temporary campaign with it or import the Boundaries and Nebulae JSON file directly.

SST Knowledge Base

Colors

Base text (#1E73BE)
Highlight color ( #BE691E)