Difference between revisions of "Testing Resources"

From Armagetron
 
(2 intermediate revisions by one other user not shown)
Line 6: Line 6:
 
Resources that should be available to a ''specific'' user are stored in
 
Resources that should be available to a ''specific'' user are stored in
  
* Linux - <home>/.armagetronad/resource
+
* Linux <home>/.armagetronad/resource
 
** ''Example'': /home/Joe/.armagetronad/resource
 
** ''Example'': /home/Joe/.armagetronad/resource
* Windows - <appdata>\Armagetron\resource
+
* Windows <appdata>\Armagetron\resource
 
** ''Example'': C:\Documents and Settings\Joe\Application Data\Armagetron\resource
 
** ''Example'': C:\Documents and Settings\Joe\Application Data\Armagetron\resource
* Mac OS X - <home>/Library/Application Support/Armagetron Advanced/resource
+
* Mac OS X <home>/Library/Application Support/Armagetron Advanced/resource
 
** ''Example'': /Users/Joe/Library/Application Support/Armagetron Advanced/resource
 
** ''Example'': /Users/Joe/Library/Application Support/Armagetron Advanced/resource
  
 
Resources that should be available to ''all'' users of a computer are stored in
 
Resources that should be available to ''all'' users of a computer are stored in
  
* Linux - /usr/share/games/armagetronad/resource
+
* Linux /usr/share/games/armagetronad/resource
* Windows - C:\Program Files\Armagetron Advanced\resource
+
* Windows C:\Program Files\Armagetron Advanced\resource
* Mac OS X - Armagetron Advanced.app/Contents/Resources/resource
+
* Mac OS X Armagetron Advanced.app/Contents/Resources/resource
  
 
respectively
 
respectively
Line 41: Line 41:
 
by setting the configuration item
 
by setting the configuration item
  
* MAP_FILE (for maps)
+
* <code>MAP_FILE</code> (for maps)
* COCKPIT_FILE (for [[Cockpit Tutorial|cockpits]])
+
* <code>COCKPIT_FILE</code> (for [[Cockpit Tutorial|cockpits]])
  
 
to
 
to
Line 52: Line 52:
 
Configuration items can be set using the [[console]] or by editing a configuration file. The configuration file shared by all users on the computer is located at
 
Configuration items can be set using the [[console]] or by editing a configuration file. The configuration file shared by all users on the computer is located at
  
* Linux - /usr/etc/games/armagetronad/settings.cfg
+
* Linux /usr/etc/games/armagetronad/settings.cfg
* Windows - C:\Program Files\Armagetron Advanced\config\settings.cfg
+
* Windows C:\Program Files\Armagetron Advanced\config\settings.cfg
* Mac OS X - Armagetron Advanced.app/Contents/Resources/settings.cfg
+
* Mac OS X Armagetron Advanced.app/Contents/Resources/settings.cfg
  
 
or is it (FIXME)
 
or is it (FIXME)
Line 64: Line 64:
 
Settings in this file may be overridden for a specific user in the file
 
Settings in this file may be overridden for a specific user in the file
  
* Linux - <home>/.armagetronad/var/autoexec.cfg
+
* Linux <home>/.armagetronad/var/autoexec.cfg
* Windows - <appdata>\Armagetron\var\autoexec.cfg
+
* Windows <appdata>\Armagetron\var\autoexec.cfg
* Mac OS X - <home>/Library/Application Support/Armagetron Advanced/autoexec.cfg
+
* Mac OS X <home>/Library/Application Support/Armagetron Advanced/autoexec.cfg
  
 
You may have to create the override file since it is not created automatically.
 
You may have to create the override file since it is not created automatically.
Line 77: Line 77:
  
 
If your settings or code is wrong it will also tell you a line number.
 
If your settings or code is wrong it will also tell you a line number.
 +
 +
[[Category:Development]]

Latest revision as of 12:02, 24 August 2021

So you have written a new resource and would like to test it? Then you have come to the right place :)

Save it

Resource directory

Resources that should be available to a specific user are stored in

  • Linux — <home>/.armagetronad/resource
    • Example: /home/Joe/.armagetronad/resource
  • Windows — <appdata>\Armagetron\resource
    • Example: C:\Documents and Settings\Joe\Application Data\Armagetron\resource
  • Mac OS X — <home>/Library/Application Support/Armagetron Advanced/resource
    • Example: /Users/Joe/Library/Application Support/Armagetron Advanced/resource

Resources that should be available to all users of a computer are stored in

  • Linux — /usr/share/games/armagetronad/resource
  • Windows — C:\Program Files\Armagetron Advanced\resource
  • Mac OS X — Armagetron Advanced.app/Contents/Resources/resource

respectively

  • Linux — ~/.armagetronad/resource
  • Windows — C:\Program Files\Armagetron Advanced\resource
  • Mac OS X — ~/Library/Application Support/Armagetron Advanced/resource

Filename

Inside the resource directory, resources are located at

author/category/name-version.type.xml

where type, name, version, author and category must match those stated in the resource:

<Resource type="..." name="..." version="..." author="..." category="...">

In windows, the subdirectories must be seperated by '\', not '/'.

Tell Armagetron to use it

by setting the configuration item

  • MAP_FILE (for maps)
  • COCKPIT_FILE (for cockpits)

to

author/category/name-version.type.xml

(note that you have to use '/' regardless of whether you use windows)

Configuration items can be set using the console or by editing a configuration file. The configuration file shared by all users on the computer is located at

  • Linux — /usr/etc/games/armagetronad/settings.cfg
  • Windows — C:\Program Files\Armagetron Advanced\config\settings.cfg
  • Mac OS X — Armagetron Advanced.app/Contents/Resources/settings.cfg

or is it (FIXME)

  • Linux — ~/.armagetronad/config/settings_custom.cfg
  • Windows — C:\Program Files\Armagetron Advanced\config\settings_custom.cfg
  • Mac OS X — ~/Library/Application Support/Armagetron Advanced/config/settings_custom.cfg

Settings in this file may be overridden for a specific user in the file

  • Linux — <home>/.armagetronad/var/autoexec.cfg
  • Windows — <appdata>\Armagetron\var\autoexec.cfg
  • Mac OS X — <home>/Library/Application Support/Armagetron Advanced/autoexec.cfg

You may have to create the override file since it is not created automatically.

Run Armagetron

Now its time to play Armagetron Advanced locally.

If you have saved it wrong or the path you put is incorrect it will tell you.

If your settings or code is wrong it will also tell you a line number.