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

Revision as of 15:54, 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-CONNECT is one of the following AC$* symbols:
# For racing tracks and for battle areenas with manual links setup:
#   AC$OFF
#	Do not any auto connection. Route connection are fully under control
#	of the user. This is the default for check points.
#   AC$PREV
#	Setup PREV links by NEXT links of other routes. Existing PREV links
#	are cleared before. This is the default for enemy and item routes and
#	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. This is the default for enemy routes, if dispatch
#	points detected.
#
# 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
#	This is the default for item routes to avoid a freeze.
#
@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 an image with the visualization of the following code. The code is created by the KMP decompiler of Wiimms SZS Tools. Flags and some comments are removed.

#ENPT#
#-----------------------------------------------------------------
#      _____________position_____________    width     properties 
#idx         x           y           z       factor     #1     #2 
#-----------------------------------------------------------------

 # 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 
   1   -20100.000     636.432   16980.418   25.000       0      0 
   2   -20100.000     797.666   11986.639   27.000     0x4      0 
   3   -19010.008    1019.835    5433.119   20.000       0      0 
   4   -17811.693    1073.134    3950.059   15.000       0      0 
   5   -16326.664    1135.828    3000.000   15.000       0      0 
   6   -10000.000    1576.168    1000.000   25.000       0      0 
   7    -3640.870    2117.703   -1108.698   20.000     0x3      0 
   8     4063.073    2916.057   -5315.689   20.000     0x4      0 
   9     6184.966    3080.382   -5723.592   20.000       0      0 
  10     8273.014    3189.490   -5330.971   20.000       0      0 
  11    12263.215    3301.372   -3141.631   30.000       0      0 
  12    14540.544    3181.466     982.562   20.000       0      0 
  13    14498.519    3056.876    2911.369   15.000       0      0 
  14    14085.271    2930.513    4450.000   15.000       0      0 
  15    11711.629    2535.937    8308.469   25.000       0   0x80 
  16     9000.000    2123.556   12000.000   25.000     0x3   0x80 

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

  17   -20059.904     503.322   38176.215   20.000       0  0x100 
  18   -20075.275     489.000   33055.125   25.000     0x3      0 
  19   -20000.000     477.391   28500.000   25.000       0      0 

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

  20    -4000.000     796.038   41500.000   10.000       0      0 
  21    -4143.467     912.076   43953.387    8.000       0  0x300 
  22    -4766.977     922.610   46240.094    8.000       0  0x300 
  23    -6588.950     922.161   48725.625    8.000       0  0x300 
  24    -9324.496     923.282   50462.387    8.000       0  0x300 
  25   -12497.214     938.054   51075.895    8.000       0  0x300 
  26   -15666.517     930.711   50465.996    8.000       0  0x300 
  27   -18414.359     943.018   48740.887    8.000       0  0x300 
  28   -20208.539     924.077   46206.660    8.000       0  0x300 
  29   -20867.574     937.713   43950.000    8.000       0  0x300 

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

  30    -5945.141     502.322   41999.148   10.000       0  0x100 
  31    -6113.494     516.066   44500.000    9.000       0  0x300 
  32    -6913.494     510.116   46151.355    9.000       0  0x300 
  33    -8057.005     509.827   47488.828    9.000       0  0x300 
  34    -9335.633     507.826   48362.910    9.000       0  0x300 
  35   -10921.282     509.959   49002.066    9.000       0  0x300 
  36   -12505.494     510.057   49177.129    9.000       0  0x300 
  37   -14100.012     514.967   49001.480    9.000       0  0x300 
  38   -15719.476     519.499   48374.238    9.000       0  0x300 
  39   -17012.898     520.801   47394.891    9.000       0  0x300 
  40   -18134.811     526.684   46092.539    9.000       0  0x300 
  41   -19051.674     535.258   43517.348    9.000       0  0x100 

 # 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 
  43      500.000     997.560   21500.000   25.000       0      0 
  44    -3289.936     573.829   25600.246   25.000     0x4      0 
  45    -4800.000     474.342   28800.000   27.000       0      0 
  46    -4853.532     465.042   33981.555   27.000       0      0 
  47    -4896.699     486.310   38159.902   27.000       0      0 

 # 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 
  49     1931.158    1107.562   20884.963   12.000       0      0 
  50      479.574     875.750   23759.658   12.000     0x2      0 
  51     -378.226     709.943   26439.178   12.000     0x3      0 
  52    -1166.926     702.084   28902.848   10.000     0x3      0 
  53    -2999.872     484.860   33950.590   15.000       0      0 
  54    -3850.000     518.291   38129.637   12.000     0x4  0x100 

Arena example: GCN Cookie Land

???


Links