Advertisement
JK_3

warzone_map_builder.inx - inkscape extension

Jul 20th, 2023
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 13.75 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
  3.     <_name>Warzone Map Builder</_name>
  4.     <id>com.warzone.upload_map</id>
  5.     <param name="tab" type="notebook">
  6.         <page name="about" gui-text="About">
  7.             <label appearance="header">About Warzone Map Builder</label>
  8.             <label>This extension enables a user to generate and upload Warzone map metadata.
  9.                 <br/><br/>It endeavors to replace all the work that would need to be done in the
  10.                 Warzone Map Editor, enabling users define their map entirely in the svg file.
  11.                 <br/><br/>The best way to use this is to create a first version of the map (v0.0)
  12.                 with no metadata in it. Duplicate that version creating v1.0, and when you are ready
  13.                 to upload metadata upload it all to v1.0. If you want to upload additional changes,
  14.                 you should always start by creating a new version by duplicating v0.0.
  15.             </label>
  16.         </page>
  17.         <page name="territories" gui-text="Territories">
  18.             <param name="territory_tab" type="notebook">
  19.                 <page name="create" gui-text="Create Territories">
  20.                     <label appearance="header">Converts Paths into Warzone Territories</label>
  21.                     <label>Sets a Warzone Territory ID for all selected path elements. Additionally,
  22.                         adds a center point with example army numbers. Ensures that all paths
  23.                         with manually set Warzone Territory IDs have been processed.
  24.                     </label>
  25.                     <spacer/>
  26.                     <param name="territory_layer" type="bool" gui-text="  Move to Territories layer"
  27.                           gui-description="If selected collect all territories into a single layer.">
  28.                         true
  29.                     </param>
  30.                 </page>
  31.                 <page name="name" gui-text="Territory Name">
  32.                     <label appearance="header">Set Territory Name</label>
  33.                     <label>Sets the territory name of a selected territory element. If the element
  34.                         is not currently a Warzone Territory, a Warzone Territory ID will be
  35.                         assigned and a center-point created.
  36.                     </label>
  37.                     <spacer/>
  38.                     <param name="territory_name" type="string" gui-text="Territory Name:    "/>
  39.                 </page>
  40.                 <page name="center-point" gui-text="Center Point">
  41.                     <label appearance="header">Sets a Territory's Center Point</label>
  42.                     <label>Sets the center point for a Warzone Territory. Must select a single
  43.                         territory and an ellipse representing the desired location of the new center
  44.                         point.
  45.                     </label>
  46.                     <spacer/>
  47.                     <param name="center_point_set_type" type="optiongroup" appearance="radio"
  48.                           gui-text="Setting Method:"
  49.                           gui-description="Specify the method to designate the center point.">
  50.                         <option value="ellipse">  With an Ellipse</option>
  51.                         <option value="default">  Reset to Default</option>
  52.                     </param>
  53.                 </page>
  54.             </param>
  55.         </page>
  56.         <page name="connections" gui-text="Connections">
  57.             <label appearance="header">Create Connection</label>
  58.             <label>
  59.                 Creates a connection between two selected territories if they are currently not
  60.                 connected. Can create vertically or horizontally wrapping connections.
  61.             </label>
  62.             <spacer/>
  63.             <param name="connection_type" type="optiongroup" appearance="radio"
  64.                   gui-text="Connection Type:" gui-description="Specify connection type">
  65.                 <option value="Normal">  Normal</option>
  66.                 <option value="WrapHorizontally">  Wrap Horizontally</option>
  67.                 <option value="WrapVertically">  Wrap Vertically</option>
  68.             </param>
  69.         </page>
  70.         <page name="bonuses" gui-text="Bonus">
  71.             <label appearance="header">Create or Update Bonus</label>
  72.             <param name="bonus_name" type="string" gui-text="Bonus Name:    "
  73.                   gui-description="Name of the bonus. Can be empty if a bonus-link is selected (unless creating a bonus)."/>
  74.             <param name="bonus_tab" type="notebook">
  75.                 <page name="create-update" gui-text="Create/Update">
  76.                     <param name="bonus_properties_tab" type="notebook">
  77.                         <page name="create" gui-text="Create Bonus">
  78.                             <label>
  79.                                 Creates a bonus. Must provide a name. If a bonus link is selected
  80.                                 color and value are optional, but if they are provided they will be
  81.                                 applied to the bonus link.
  82.                             </label>
  83.                         </page>
  84.                         <page name="update" gui-text="Update Bonus">
  85.                             <label>
  86.                                 Updates the specified bonus.
  87.                                 <br/><br/>Empty name, value, or color fields will be left unchanged.
  88.                             </label>
  89.                             <param name="bonus_name_update" type="string"
  90.                                   gui-text="Update Name:    "
  91.                                   gui-description="Name to change the bonus name to. The bonus name will be unchanged if this is empty."/>
  92.                         </page>
  93.                     </param>
  94.                     <param name="bonus_value" type="string" gui-text="Army Value:    "
  95.                           gui-description="Specify bonus value. If updating bonus, this can be left blank to leave the bonus value unchanged."/>
  96.                     <!-- todo change to use color picker -->
  97.                     <param name="bonus_color" type="string" gui-text="Color:    "
  98.                           gui-description="Specify bonus color. If updating bonus, this can be left blank to leave the bonus color unchanged.">
  99.                         #000000
  100.                     </param>
  101.                     <param name="bonus_link_visible" type="bool"
  102.                           gui-text="  Bonus link should be visible"
  103.                           gui-description="If selected, this bonus will have a visible bonus-link.">
  104.                         true
  105.                     </param>
  106.                 </page>
  107.                 <page name="delete" gui-text="Delete">
  108.                     <label>
  109.                         Deletes the bonus corresponding to the provided bonus name or selected bonus
  110.                         link.
  111.                     </label>
  112.                 </page>
  113.                 <page name="bonus-territories" gui-text="Add/Replace Territories">
  114.                     <label appearance="header">Add or replace selected territories</label>
  115.                     <spacer/>
  116.                     <param name="bonus_territories_add_replace" type="optiongroup"
  117.                           appearance="radio" gui-text="Add or Replace Territory:"
  118.                           gui-description="Add or replace territories for this bonus.">
  119.                        <option value="add">  Add territories</option>
  120.                        <option value="replace">  Replace territories</option>
  121.                     </param>
  122.                 </page>
  123.             </param>
  124.         </page>
  125.         <page name="distributions" gui-text="Distribution Mode">
  126.             <label appearance="header">Create or Update Distribution Mode</label>
  127.             <param name="distribution_name" type="string" gui-text="Distribution Mode Name:    "
  128.                   gui-description="Specify name of distribution to create, update, or delete"/>
  129.             <param name="distribution_tab" type="notebook">
  130.                 <page name="crud" gui-text="Create/Update/Delete">
  131.                     <param name="distribution_crud_tab" type="notebook">
  132.                         <page name="create" gui-text="Create">
  133.                             <label>
  134.                                 Creates a distribution mode with the given name.
  135.                                 <br/><br/>Will create a scenario distribution if scenarios are
  136.                                 specified. Scenario names should each be on a new line.
  137.                             </label>
  138.                         </page>
  139.                         <page name="update" gui-text="Update">
  140.                             <label>
  141.                                 Updates the distribution mode with the given name. Can rename the
  142.                                 distribution mode or add new scenarios.
  143.                                 <br/><br/>If converting a non-scenario distribution to a scenario
  144.                                 distribution, all territories will be removed from the distribution
  145.                                 mode.
  146.                             </label>
  147.                             <param name="distribution_name_update" type="string"
  148.                                   gui-text="Update Name:    "/>
  149.                         </page>
  150.                         <page name="delete" gui-text="Delete">
  151.                             <label>
  152.                                 Delete the distribution mode with the given name. If scenario names
  153.                                 are provided, will delete the specified scenarios.
  154.                                 <br/><br/>If the last scenario is deleted from a scenario
  155.                                 distribution, will convert to a non-scenario distribution.
  156.                             </label>
  157.                         </page>
  158.                     </param>
  159.                     <param name="distribution_scenario_names" type="string"
  160.                           appearance="multiline" gui-text="Scenario Names:    "
  161.                           gui-description="Leave empty for a normal distribution mode. For a scenario distribution, specify each scenario name on a separate line. There must be at least two scenarios."/>
  162.                 </page>
  163.                 <page name="distribution-territories" gui-text="Add/Replace Territories">
  164.                     <label appearance="header">Add or replace selected territories<br/></label>
  165.                     <param name="distribution_territories_add_replace" type="optiongroup"
  166.                           appearance="radio" gui-text="Add or Replace Territory:"
  167.                           gui-description="Add or replace territories for this distribution mode.">
  168.                        <option value="add">  Add territories</option>
  169.                        <option value="replace">  Replace territories</option>
  170.                     </param>
  171.                     <param name="distribution_territory_scenario_name" type="string"
  172.                           gui-text="Scenario Name:    "
  173.                           gui-description="For scenario distributions, specify scenario to add territories to."/>
  174.                 </page>
  175.             </param>
  176.         </page>
  177.         <page name="upload" gui-text="Upload Metadata">
  178.             <label appearance="header">Load Map Metadata to Warzone</label>
  179.             <param name="upload_email" type="string" gui-text="Warzone Email Address:    "
  180.                   gui-description="Provide the email associated with your Warzone account."/>
  181.             <param name="upload_api_token" type="string" gui-text="Warzone API Token:    "
  182.                   gui-description="Provide your account's API Token. See https://www.warzone.com/wiki/Get_API_Token_API for getting your API Token."/>
  183.             <param name="upload_map_id" type="int" min="0" max="9999999"
  184.                   gui-text="Warzone Map ID:    "
  185.                   gui-description="Provide your map's ID number. This is the numeric part of a URL like this https://www.warzone.com/SinglePlayer?PreviewMap=55555"/>
  186.             <param name="upload_territory_names" type="bool" gui-text="  Set Territory Names"
  187.                   gui-description="Upload territory names to Warzone.">false</param>
  188.             <param name="upload_territory_center_points" type="bool"
  189.                   gui-text="  Set Territory Center Points"
  190.                   gui-description="Upload territory center points to Warzone.">false</param>
  191.             <param name="upload_connections" type="bool" gui-text="  Set Connections"
  192.                   gui-description="Upload territory connections to Warzone.">false</param>
  193.             <param name="upload_bonuses" type="bool" gui-text="  Add Bonuses"
  194.                   gui-description="Upload bonuses to Warzone.">false</param>
  195.             <param name="upload_territory_bonuses" type="bool"
  196.                   gui-text="  Add Territories to Bonuses"
  197.                   gui-description="Add territories to bonuses on Warzone.">false</param>
  198.             <param name="upload_distribution_modes" type="bool" gui-text="  Add Distribution Modes"
  199.                   gui-description="Upload distribution modes to Warzone.">false</param>
  200.             <param name="upload_territory_distribution_modes" type="bool"
  201.                   gui-text="  Add Territories to Distribution Modes"
  202.                   gui-description="Add territories to distribution modes on Warzone.">false</param>
  203.         </page>
  204.     </param>
  205.     <effect needs-live-preview="false">
  206.         <object-type>all</object-type>
  207.         <effects-menu>
  208.             <submenu _name="Export"/>
  209.         </effects-menu>
  210.     </effect>
  211.     <script>
  212.         <command reldir="extensions" interpreter="python">warzone_map_builder.py</command>
  213.     </script>
  214. </inkscape-extension>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement