Chunk Types

From Runic Games Wiki
Jump to: navigation, search

A chunk type is a category of level layout files within a Rule Sets. They define a set of exitsWhen a level is generated, the game builds an arrangement of chunk types, then picks level layouts to fulfill those chunk types based on the pool of layouts available for that type. By default, the game will looks for layouts in the folder named the same thing as the chunk type. You can override the folder to be used the the chunk type definition and also create a white-list of layouts within that folder to use.

The Level Rule Sets Editor generates all the data for the chunk types in a rule set based on the name of the chunk types. So you shouldn't have to do much with the data.

[CHUNKTYPE]
	<STRING>NAME:1X1_CONCAVE_N1E2
	<INTEGER>WIDTH:1
	<INTEGER>HEIGHT:1
	<INTEGER>MAX_APPEARANCE:2
	[EXIT]
		<FLOAT>X:0
		<FLOAT>Y:0
		<FLOAT>Z:80
		<INTEGER>TYPE:1
	[/EXIT]
	[EXIT]
		<FLOAT>X:-40
		<FLOAT>Y:0
		<FLOAT>Z:40
		<INTEGER>TYPE:2
	[/EXIT]
[/CHUNKTYPE]

Properties

NAME
(STRING) - Name of the chunk type. this will also be used for the 'FOLDER' if no folder is specified.
WIDTH
(INTEGER) - Width of the chunk. (we've never had chunks that aren't 1x1, we initially set it up to be possible, but it's never actually been done in practice)
HEIGHT
(INTEGER) - Height of the chunk. (we've never had chunks that aren't 1x1, we initially set it up to be possible, but it's never actually been done in practice)
FOLDER
(STRING) - The folder in which the layouts for this chunk type are to be found. this is relative to the position of the rule set file. (If the layouts are in 'media/layouts/ACT1/FLOOB/' and the rule set is in 'media/layouts/ACT1/', all you need is "<STRING>FOLDER:FLOOB"
MAX_APPEARANCE
(INTEGER) - The maximum number of times the chunk type can appear in a level.
MUST_PLACE
(BOOL) - If true, this chunk type must be in the resulting rolled level or the roll is discarded. (You can increase your load times and sometimes make valid levels impossible by having too many of these in a rule set)
ENTRANCE_CHUNK
(BOOL) - If true, this chunk is counted as an entrance chunk type (it's assumed that all the layouts defined for this type will have player start objects in them.
EXIT_CHUNK
(BOOL) - If true, this chunk is counted as an exit chunk type. One or more of these must exits if REQUIRES_EXIT is true.
INCLUSIVE_FILES
This is a white-list of layout files for use when fulfilling this chunk type. like this:
[INCLUSIVE_FILES]
	<STRING>FILE:RandomBossRoom_PB_A
	<STRING>FILE:RandomBossRoom_PB_B
[/INCLUSIVE_FILES]

Exits

Exits define how a chunk type joins with adjacent chunk types.

[EXIT]
	<FLOAT>X:-40
	<FLOAT>Y:0
	<FLOAT>Z:40
	<INTEGER>TYPE:1
[/EXIT]
Chunkinfo.png
X
Y
Z
(FLOAT) the position of the exit where 0,0,0 is half way across the bottom of the chunk. (Y is never actually used) The values are based on the size of a chunk as defined by the rule set the chunk is in.
TYPE
(INTEGER) - The type of tab. These must match when joining two chunks.

Here's the scrap of paper we've been carrying around for when we forget what the tabs mean (dark areas are walls, cliffs, etc. light are walkable). Other than the wall types we also use tab types for roads (3), rivers (4), and mesas (5).


TheOneTrueKey.png

Personal tools
Namespaces

Variants
Actions
Navigation
Runic Sites
Toolbox