MATERIAL CONFIGULATION FILE


This file is specified by the modify_tmd option -m|--material-config.
Specify which parts to display and which textures to use for each costume condition.

Since the specification is complicated, please output the settings of various models
with the option -M|--export-material-config of modify_tmd and see how they are set.

Up to 4095 bytes per line.
Each parameter is separated by one or more space and tab.
Comment after the number sign(#) and semicolon(;).



------------
INSTRUCTIONS
------------

	num_conditions  NUMBER_OF_CONDITIONS

		NUMBER_OF_CONDITIONS : 0-3

		Specifies the number of costume states in Neptunia U.

		0 : Do not change costume damage settings.
		    Also set to 0 for Blanc + Neptune VS Zombies.
		1 : For swimware. Normal condition only.
		2 : For HDD mode. Normal condition and torn condition
		3 : For regular outfits. Normal condition, slightly damaged condition and torn condition.

		Describe 'num_conditions' before 'scrap_file_no', 'visible_set', 'texture_set'.



	scrap_file_no  FILE_NO

		FILE_NO : Texture file number for debris that scatters when the costume is destroyed.

		<CAUTION> The setting of 'scrap_file_no' is not used when 'num_conditions' is missing or 0 is specified.



	visible_set  VISIBLE_SET_ID0  [VISIBLE_SET_ID1  [VISIBLE_SET_ID2  [VISIBLE_SET_ID3  [VISIBLE_SET_ID4  [VISIBLE_SET_ID5  [VISIBLE_SET_ID6]]]]]]

		VISIBLE_SET_ID0-6 : 0-20

		The visible set ID is the number assigned to the set of parts to display together.
		Specify which set to display for each costume state.
		In the order of description of 'visible_set', it will be the setting of normal state,
		slightly damaged state, and chattering torn state.

		The number of specified IDs may be different for each 'visible_set'.
		Error if the number of conditions specified in 'num_conditions' and the number of lines of 'visible_set' do not match.



	texture_set  FILE_NO0  [FILE_NO1  [FILE_NO2  [FILE_NO3  [FILE_NO4  [FILE_NO5  [FILE_NO6]]]]]]

		FILE_NO0-6 : 0-255

		Specify the file number associated with the textures for each costume state.
		The file numbers are the same as the order in which the DDS files are stored in the GXT file,
		and are serial numbers from 0.

		The number of texture files you can actually use is not very large.
		If the number of texture files used is larger than the number of files that the game can handle,
		the game will not work properly.

		In the order of description of 'texture_set', it will be the setting of normal state,
		slightly damaged state, and chattering torn state.

		Specify the same number of 'FILE_NO's for all 'texture_set's.
		Error if the number of 'FILE_NO's does not match the number of textures specified in 'num_textures' described later.
		Error if the number of conditions specified in 'num_conditions' and the number of lines of 'texture_set' do not match.



	num_textures  NUMBER_OF_TEXTURES

		NUMBER_OF_TEXTURES : 1-7

		Specify the number of textures.
		Write 'num_textures' before 'texture' appears.



	texture  TEXTURE_ID  SIGNATURE  WIDTH  HEIGHT

		TEXTURE_ID : 0-6
		             Specify which of FILE_NO0 to 6 of 'texture_set' this texture corresponds to.
		SIGNATURE  : 32-bit integer value
		WIDTH      : Specify the width of the texture image in pixels
		HEIGHT     : Specify the height of the texture image in pixels

		It seems that this information is not actually used.

		Error if the number of textures specified by 'num_textures' and the number of lines of 'texture' do not match.



	num_materials  NUMBER_OF_MATERIALS

		NUMBER_OF_MATERIALS : Number of definitions of 'material_start' to 'material_end' that follows.



	material_start

		Start material settings
		One material setting is from 'material_start' to 'material_end'.

		Most of the parameters have unknown uses.
		If the items from 'unknown_00' to 'unknown_4C' described later are not between 'material_start' and 'material_end',
		an error will occur.

		The following items have different values depending on the model.
			tex_slot_id, unknown_18, unknown_sig, unknown_94, unknown_98, unknown_sig2,
			edge_color, unknown_C0, unknown_C4
		Other items seem to have fixed values for each item.



	unknown_00  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 5



	unknown_04  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	texture_id  TEXTURE_ID

		TEXTURE_ID : 0-6

		Specifies which texture this material uses.
		Corresponds to FILE_NO0 to 6 of 'texture_set' item.

		If there is no DAT file, the file number is the same as the TEXTURE_ID.



	unknown_0C  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_10  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_14  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_18  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0

		0xFE020000 for Tamsoft of Blanc + Neptune VS Zombies,
		otherwise 0.



	unknown_1C  INTEGER_VALUE

		Not sure which value to specify.
		Default value = -1



	unknown_20  INTEGER_VALUE

		Not sure which value to specify.
		Default value = -1



	unknown_24  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_28  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_2C  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_30  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_34  INTEGER_VALUE

		Not sure which value to specify.
		Default value = -1



	unknown_38  INTEGER_VALUE

		Not sure which value to specify.
		Default value = -1



	unknown_3C  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_40  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_44  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_48  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_4C  INTEGER_VALUE

		Not sure which value to specify.
		Default value = -1



	unknown_50  INTEGER_VALUE

		Not sure which value to specify.
		Default value = -1



	unknown_54  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_58  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_5C  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_60  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_64  INTEGER_VALUE

		Not sure which value to specify.
		Default value = -1



	unknown_68  INTEGER_VALUE

		Not sure which value to specify.
		Default value = -1



	unknown_6C  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_70  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_74  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_78  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	texture_sig  SIGNATURE

		SIGNATURE : 32-bit integer value
		Same value as the signature of the corresponding 'texture' for this material.

		If SIGNATURE does not match the setting in 'texture', the value specified in 'texture' will be used.
		So this item doesn't actually need to be set.



	unknown_80  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_84  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_88  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_8C  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_sig	SIGNATURE

		SIGNATURE : 32-bit integer value
		Default value = 0

		Maybe a signature for material identification.
		It seems that it is not actually used.



	unknown_94  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 0.5



	unknown_98  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 0.0



	unknown_9C  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_A0  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_A4  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_A8  INTEGER_VALUE

		Not sure which value to specify.
		Default value = 0



	unknown_AC  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 1.0



	unknown_sig2  SIGNATURE

		SIGNATURE : RIM0 or RIM1
		Default value = RIM0

		RIM0 : Specify this value when the texture has no transparency.
		RIM1 : Use this value if the texture has transparency.
		       For damaged costume parts.



	edge_color  RED  GREEN  BLUE

		RED   : 0.0～1.0
		GREEN : 0.0～1.0
		BLUE  : 0.0～1.0
		Default value RED   = 0.623
		              GREEN = 0.507
		              BLUE  = 0.456

		Specify the outline color.



	unknown_C0  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 20.0



	unknown_C4  DECIMAL_POINT_NUMBER

		Not sure which value to specify.
		Default value = 4.0



	material_end

		Finish material settings



	end

		Finish reading the file.
		Lines after 'end' are ignored.



---------------------------------------------
HOW TO OUTPUT THE MATERIAL CONFIGULATION FILE
---------------------------------------------

	To create a material configuration file from a TMD file with modify_tmd
	run the command as follows.

		modify_tmd  TMD-FILE  -M  OUT-MATERIAL-CFG-FILE

	In this case, only the following items are output for the material settings.

		texture_id, unknown_18, unknown_sig, unknown_94, unknown_98,
		unknown_sig2, edge_color, unknown_C0, unknown_C4

	To output all material parameters, execute with the option -Ma as shown below.

		modify_tmd  TMD-FILE  -M  OUT-MATERIAL-CFG-FILE  -Ma



EOF
