Difference between revisions of "Creating enemy routes of battle arenas with Wiimm's tools/code examples"

From Custom Mario Kart
Jump to navigation Jump to search
Line 45: Line 45:
  
 
== Track example: Luigi Circuit ==
 
== Track example: Luigi Circuit ==
???
+
[[File:ENPT of Luigi Circuit.png|250px|thumb|ENPT routes of Luigi Circuit]]
 +
'''Luigi Circuit''' is a simple racing track. It is used here to show the differences between racing tracks and battle arenas.
 +
 
 +
At the right you find n image with the visualization of the following code:
 +
<pre>
 +
#ENPT#
 +
#----------------------------------------------------------------------#-------------------
 +
#      _____________position_____________    width    properties      #  distance  horiz
 +
#idx        x          y          z      factor    #1    #2 flag #  to prev  angle
 +
#----------------------------------------------------------------------#-------------------
 +
 
 +
# zero based index: 0,  prev: 1,  next: 4 5
 +
$GROUP G1,  next: G2A G2B
 +
 
 +
  0  -20100.000    512.635  22000.000  25.000    0x3      0  FSJ
 +
  1  -20100.000    636.432  16980.418  25.000      0      0  FSJ #  5021.108    0.00
 +
  2  -20100.000    797.666  11986.639  27.000    0x4      0  FSJ #  4996.382  -9.44
 +
  3  -19010.008    1019.835    5433.119  20.000      0      0  FSJ #  6647.260  -29.50
 +
  4  -17811.693    1073.134    3950.059  15.000      0      0  FSJ #  1907.424  -18.45
 +
  5  -16326.664    1135.828    3000.000  15.000      0      0  FSJ #  1764.045  -15.07
 +
  6  -10000.000    1576.168    1000.000  25.000      0      0  FSJ #  6649.855    0.80
 +
  7    -3640.870    2117.703  -1108.698  20.000    0x3      0  FSJ #  6721.488  10.29
 +
  8    4063.073    2916.057  -5315.689  20.000    0x4      0  FSJ #  8814.016  -17.76
 +
  9    6184.966    3080.382  -5723.592  20.000      0      0  FSJ #  2166.984  -21.53
 +
  10    8273.014    3189.490  -5330.971  20.000      0      0  FSJ #  2127.439  -18.10
 +
  11    12263.215    3301.372  -3141.631  30.000      0      0  FSJ #  4552.739  -32.34
 +
  12    14540.544    3181.466    982.562  20.000      0      0  FSJ #  4712.703  -30.16
 +
  13    14498.519    3056.876    2911.369  15.000      0      0  FSJ #  1933.283  -13.79
 +
  14    14085.271    2930.513    4450.000  15.000      0      0  FSJ #  1598.163  -16.57
 +
  15    11711.629    2535.937    8308.469  25.000      0  0x80  FSJ #  4547.268  -4.70
 +
  16    9000.000    2123.556  12000.000  25.000    0x3  0x80  FSJ #  4598.956
 +
 
 +
# zero based index: 1,  prev: 2 3,  next: 0
 +
$GROUP G4,  next: G1
 +
 
 +
  17  -20059.904    503.322  38176.215  20.000      0  0x100  FSJ
 +
  18  -20075.275    489.000  33055.125  25.000    0x3      0  FSJ #  5121.133  -1.12
 +
  19  -20000.000    477.391  28500.000  25.000      0      0  FSJ #  4555.762
 +
 
 +
# zero based index: 2,  prev: 4 5,  next: 1
 +
$GROUP G3A,  next: G4
 +
 
 +
  20    -4000.000    796.038  41500.000  10.000      0      0  FSJ
 +
  21    -4143.467    912.076  43953.387    8.000      0  0x300  FSJ #  2460.316  -11.91
 +
  22    -4766.977    922.610  46240.094    8.000      0  0x300  FSJ #  2370.212  -20.99
 +
  23    -6588.950    922.161  48725.625    8.000      0  0x300  FSJ #  3081.793  -21.35
 +
  24    -9324.496    923.282  50462.387    8.000      0  0x300  FSJ #  3240.302  -21.47
 +
  25  -12497.214    938.054  51075.895    8.000      0  0x300  FSJ #  3231.524  -21.84
 +
  26  -15666.517    930.711  50465.996    8.000      0  0x300  FSJ #  3227.462  -21.23
 +
  27  -18414.359    943.018  48740.887    8.000      0  0x300  FSJ #  3244.502  -22.58
 +
  28  -20208.539    924.077  46206.660    8.000      0  0x300  FSJ #  3105.116  -19.02
 +
  29  -20867.574    937.713  43950.000    8.000      0  0x300  FSJ #  2350.963
 +
 
 +
# zero based index: 3,  prev: 4 5,  next: 1
 +
$GROUP G3B,  next: G4
 +
 
 +
  30    -5945.141    502.322  41999.148  10.000      0  0x100  FSJ
 +
  31    -6113.494    516.066  44500.000    9.000      0  0x300  FSJ #  2506.549  -22.00
 +
  32    -6913.494    510.116  46151.355    9.000      0  0x300  FSJ #  1834.941  -14.68
 +
  33    -8057.005    509.827  47488.828    9.000      0  0x300  FSJ #  1759.674  -15.11
 +
  34    -9335.633    507.826  48362.910    9.000      0  0x300  FSJ #  1548.842  -12.40
 +
  35  -10921.282    509.959  49002.066    9.000      0  0x300  FSJ #  1709.623  -15.65
 +
  36  -12505.494    510.057  49177.129    9.000      0  0x300  FSJ #  1593.855  -12.59
 +
  37  -14100.012    514.967  49001.480    9.000      0  0x300  FSJ #  1604.170  -14.89
 +
  38  -15719.476    519.499  48374.238    9.000      0  0x300  FSJ #  1736.697  -15.96
 +
  39  -17012.898    520.801  47394.891    9.000      0  0x300  FSJ #  1622.364  -12.12
 +
  40  -18134.811    526.684  46092.539    9.000      0  0x300  FSJ #  1718.965  -21.15
 +
  41  -19051.674    535.258  43517.348    9.000      0  0x100  FSJ #  2733.555
 +
 
 +
# zero based index: 4,  prev: 0,  next: 2 3
 +
$GROUP G2A,  next: G3A G3B
 +
 
 +
  42    5176.636    1597.956  16345.912  25.000    0x3      0  FSJ
 +
  43      500.000    997.560  21500.000  25.000      0      0  FSJ #  6985.415  -0.53
 +
  44    -3289.936    573.829  25600.246  25.000    0x4      0  FSJ #  5599.570  17.48
 +
  45    -4800.000    474.342  28800.000  27.000      0      0  FSJ #  3539.579  24.67
 +
  46    -4853.532    465.042  33981.555  27.000      0      0  FSJ #  5181.840    0.00
 +
  47    -4896.699    486.310  38159.902  27.000      0      0  FSJ #  4178.625
 +
 
 +
# zero based index: 5,  prev: 0,  next: 2 3
 +
$GROUP G2B,  next: G3A G3B
 +
 
 +
  48    5291.333    1597.507  16442.049  15.000    0x1  0x80  FSJ
 +
  49    1931.158    1107.562  20884.963  12.000      0      0  FSJ #  5591.986  10.31
 +
  50      479.574    875.750  23759.658  12.000    0x2      0  FSJ #  3228.732    9.04
 +
  51    -378.226    709.943  26439.178  12.000    0x3      0  FSJ #  2818.357  -0.00
 +
  52    -1166.926    702.084  28902.848  10.000    0x3      0  FSJ #  2586.847  -2.21
 +
  53    -2999.872    484.860  33950.590  15.000      0      0  FSJ #  5374.623    8.46
 +
  54    -3850.000    518.291  38129.637  12.000    0x4  0x100  FSJ #  4264.771
 +
</pre>
  
 
== Arena example: GCN Cookie Land ==  
 
== Arena example: GCN Cookie Land ==  

Revision as of 15:48, 15 August 2018

Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.

This page is part of the tutorial »Creating enemy routes of battle arenas with Wiimm's tools« and contains code examples for the KMP compiler of Wiimms SZS Tools.

The battle support of Wiimms SZS Tools is in development. At the moment there exists no public release of the tools that can handle the technics of this article. You have to wait for the release of v1.60a.


General Settings

If you create the text version of a KMP (for example by wkmpt cat old_CookieLand_gc), you get the following information in the heading part of section [ENPT]:

[ENPT]
....
# AUTO-CONENCT is one of the followinf AC$* symbols:
# For racing tracks and for battle areenas with manual links setup:
#   AC$OFF
#       Do not any auto connection. Route connection are fully unter control
#       of the user. This is the default for check points (CKPH).
#   AC$PREV
#       Setup PREV links by NEXT links of other routes. Existing PREV links
#       are cleared before. This is the default for enemy routes (ENPH).
#       This is the behavior of all versions before v1.60a.
#
# Modes for automatic route connection in battle arenas:
#   AC$DISPATCH
#       Find dispatch points and create links automatically if not already
#       set manually.
#
# Flags: The modes of above can be combined with the following options by
# the OR operator '|' (example: AC$PREV | ACF$FIX)
#   ACF$FIX_PREV
#       Add self-links, if a PREV list is empty.
#   ACF$FIX_NEXT
#       Add self-links, if a NEXT list is empty.
#   ACF$FIX
#       Abbreviation for: ACF$FIX_PREV | ACF$FIX_NEXT
#
@AUTO-CONNECT = AC$DISPATCH

The command @AUTO_CONNECT = selects a main mode for the automatic route connections. The classic definition is AC$PREV, which means, that only PREV links are created automatic by analyzing the NEXT links. This is the behavior of all versions before v1.60a.

Battle arenas, that use Dispatch Points, should use the setting AC$DISPATCH.

Track example: Luigi Circuit

ENPT routes of Luigi Circuit

Luigi Circuit is a simple racing track. It is used here to show the differences between racing tracks and battle arenas.

At the right you find n image with the visualization of the following code:

#ENPT#
#----------------------------------------------------------------------#-------------------
#      _____________position_____________    width     properties      #  distance   horiz
#idx         x           y           z       factor     #1     #2 flag #   to prev   angle
#----------------------------------------------------------------------#-------------------

 # zero based index: 0,  prev: 1,  next: 4 5
 $GROUP G1,  next: G2A G2B

   0   -20100.000     512.635   22000.000   25.000     0x3      0  FSJ
   1   -20100.000     636.432   16980.418   25.000       0      0  FSJ #  5021.108    0.00
   2   -20100.000     797.666   11986.639   27.000     0x4      0  FSJ #  4996.382   -9.44
   3   -19010.008    1019.835    5433.119   20.000       0      0  FSJ #  6647.260  -29.50
   4   -17811.693    1073.134    3950.059   15.000       0      0  FSJ #  1907.424  -18.45
   5   -16326.664    1135.828    3000.000   15.000       0      0  FSJ #  1764.045  -15.07
   6   -10000.000    1576.168    1000.000   25.000       0      0  FSJ #  6649.855    0.80
   7    -3640.870    2117.703   -1108.698   20.000     0x3      0  FSJ #  6721.488   10.29
   8     4063.073    2916.057   -5315.689   20.000     0x4      0  FSJ #  8814.016  -17.76
   9     6184.966    3080.382   -5723.592   20.000       0      0  FSJ #  2166.984  -21.53
  10     8273.014    3189.490   -5330.971   20.000       0      0  FSJ #  2127.439  -18.10
  11    12263.215    3301.372   -3141.631   30.000       0      0  FSJ #  4552.739  -32.34
  12    14540.544    3181.466     982.562   20.000       0      0  FSJ #  4712.703  -30.16
  13    14498.519    3056.876    2911.369   15.000       0      0  FSJ #  1933.283  -13.79
  14    14085.271    2930.513    4450.000   15.000       0      0  FSJ #  1598.163  -16.57
  15    11711.629    2535.937    8308.469   25.000       0   0x80  FSJ #  4547.268   -4.70
  16     9000.000    2123.556   12000.000   25.000     0x3   0x80  FSJ #  4598.956

 # zero based index: 1,  prev: 2 3,  next: 0
 $GROUP G4,  next: G1

  17   -20059.904     503.322   38176.215   20.000       0  0x100  FSJ
  18   -20075.275     489.000   33055.125   25.000     0x3      0  FSJ #  5121.133   -1.12
  19   -20000.000     477.391   28500.000   25.000       0      0  FSJ #  4555.762

 # zero based index: 2,  prev: 4 5,  next: 1
 $GROUP G3A,  next: G4

  20    -4000.000     796.038   41500.000   10.000       0      0  FSJ
  21    -4143.467     912.076   43953.387    8.000       0  0x300  FSJ #  2460.316  -11.91
  22    -4766.977     922.610   46240.094    8.000       0  0x300  FSJ #  2370.212  -20.99
  23    -6588.950     922.161   48725.625    8.000       0  0x300  FSJ #  3081.793  -21.35
  24    -9324.496     923.282   50462.387    8.000       0  0x300  FSJ #  3240.302  -21.47
  25   -12497.214     938.054   51075.895    8.000       0  0x300  FSJ #  3231.524  -21.84
  26   -15666.517     930.711   50465.996    8.000       0  0x300  FSJ #  3227.462  -21.23
  27   -18414.359     943.018   48740.887    8.000       0  0x300  FSJ #  3244.502  -22.58
  28   -20208.539     924.077   46206.660    8.000       0  0x300  FSJ #  3105.116  -19.02
  29   -20867.574     937.713   43950.000    8.000       0  0x300  FSJ #  2350.963

 # zero based index: 3,  prev: 4 5,  next: 1
 $GROUP G3B,  next: G4

  30    -5945.141     502.322   41999.148   10.000       0  0x100  FSJ
  31    -6113.494     516.066   44500.000    9.000       0  0x300  FSJ #  2506.549  -22.00
  32    -6913.494     510.116   46151.355    9.000       0  0x300  FSJ #  1834.941  -14.68
  33    -8057.005     509.827   47488.828    9.000       0  0x300  FSJ #  1759.674  -15.11
  34    -9335.633     507.826   48362.910    9.000       0  0x300  FSJ #  1548.842  -12.40
  35   -10921.282     509.959   49002.066    9.000       0  0x300  FSJ #  1709.623  -15.65
  36   -12505.494     510.057   49177.129    9.000       0  0x300  FSJ #  1593.855  -12.59
  37   -14100.012     514.967   49001.480    9.000       0  0x300  FSJ #  1604.170  -14.89
  38   -15719.476     519.499   48374.238    9.000       0  0x300  FSJ #  1736.697  -15.96
  39   -17012.898     520.801   47394.891    9.000       0  0x300  FSJ #  1622.364  -12.12
  40   -18134.811     526.684   46092.539    9.000       0  0x300  FSJ #  1718.965  -21.15
  41   -19051.674     535.258   43517.348    9.000       0  0x100  FSJ #  2733.555

 # zero based index: 4,  prev: 0,  next: 2 3
 $GROUP G2A,  next: G3A G3B

  42     5176.636    1597.956   16345.912   25.000     0x3      0  FSJ
  43      500.000     997.560   21500.000   25.000       0      0  FSJ #  6985.415   -0.53
  44    -3289.936     573.829   25600.246   25.000     0x4      0  FSJ #  5599.570   17.48
  45    -4800.000     474.342   28800.000   27.000       0      0  FSJ #  3539.579   24.67
  46    -4853.532     465.042   33981.555   27.000       0      0  FSJ #  5181.840    0.00
  47    -4896.699     486.310   38159.902   27.000       0      0  FSJ #  4178.625

 # zero based index: 5,  prev: 0,  next: 2 3
 $GROUP G2B,  next: G3A G3B

  48     5291.333    1597.507   16442.049   15.000     0x1   0x80  FSJ
  49     1931.158    1107.562   20884.963   12.000       0      0  FSJ #  5591.986   10.31
  50      479.574     875.750   23759.658   12.000     0x2      0  FSJ #  3228.732    9.04
  51     -378.226     709.943   26439.178   12.000     0x3      0  FSJ #  2818.357   -0.00
  52    -1166.926     702.084   28902.848   10.000     0x3      0  FSJ #  2586.847   -2.21
  53    -2999.872     484.860   33950.590   15.000       0      0  FSJ #  5374.623    8.46
  54    -3850.000     518.291   38129.637   12.000     0x4  0x100  FSJ #  4264.771

Arena example: GCN Cookie Land

???


Links