You are right, the dmcsb pack has it's own .lua files. Yet this tileset is really vast; it's .lua files define hundreds of objects and all come with their own gfx. If you only want to use two things it is a lot better to take only those parts you need.FeMaiden wrote:you guys keep saying over and over "only keep the definitions for the objects i'm using"
but how do I do that?
all the stuff is jumbled up in this one big folder.
am I supposed to hunt and peck and find each individual texture file related to the object i'm using and then make a new folder to put them in and pull them out and then take the other folders out of my mod assets?
where do I put the defintiions, do I put them in the .lua files that i've been putting all my other custom definitions in? I thought the dmcsb pack had it's own .lua files with all the definitions in them already
I would do this:
1st: change the init.lua to this:
Code: Select all
import "mod_assets/scripts/items.lua"
import "mod_assets/scripts/monsters.lua"
import "mod_assets/scripts/objects.lua"
import "mod_assets/scripts/tiles.lua"
import "mod_assets/scripts/recipes.lua"
import "mod_assets/scripts/spells.lua"
import "mod_assets/scripts/materials.lua"
import "mod_assets/scripts/sounds.lua"
import "mod_assets/ext/grimtk/init.lua"
Code: Select all
defineObject{
name = "dm_surface_table_square",
baseObject = "base_altar",
components = {
{
class = "Model",
model = "mod_assets/models/env/dm_table_square.fbx",
staticShadow = true,
},
{
class = "Surface",
offset = vec(0, 0.88, 0),
size = vec(2.5, 2),
},
{
class = "Clickable",
offset = vec(0, 0.88, 0),
size = vec(2.5, 0.88*2, 2),
maxDistance = 1,
},
{
class = "Obstacle",
hitSound = "impact_blunt",
},
},
automapIcon = 152,
tags = {"dm","dm_user","surface"},
}
defineObject{
name = "dm_surface_table_round",
baseObject = "dm_surface_table_square",
components = {
{
class = "Model",
model = "mod_assets/models/env/dm_table_round.fbx",
staticShadow = true,
},
{
class = "Surface",
offset = vec(0, 0.88, 0),
size = vec(math.sqrt(2), math.sqrt(2)),
},
{
class = "Clickable",
offset = vec(0, 0.88, 0),
size = vec(math.sqrt(2), 0.88*2,math.sqrt(2)),
maxDistance = 1,
},
},
}
defineObject{
name = "dm_surface_bed_brown",
baseObject = "dm_surface_table_square",
components = {
{
class = "Model",
model = "mod_assets/models/env/dm_bed_brown.fbx",
staticShadow = true,
},
{
class = "Surface",
offset = vec(0.417, 0.46, 0),
size = vec(1.54, 1.2),
},
{
class = "Clickable",
offset = vec(0.417, 0.46, 0),
size = vec(1.54, 0.46*2, 1.2),
maxDistance = 1,
},
},
}
defineObject{
name = "dm_surface_bed_grey",
baseObject = "dm_surface_bed_brown",
components = {
{
class = "Model",
model = "mod_assets/models/env/dm_bed_brown.fbx",
material = "dm_bed_grey",
staticShadow = true,
},
},
}
place copies of dm_table_square.fbx, dm_table_round.fbx and dm_bed_brown.fbx from the dmcsb pack into it
4th: add this into your mod_assets/scripts/materials.lua file:
Code: Select all
defineMaterial{ -- good normalmap
name = "dm_bed_brown",
diffuseMap = "mod_assets/textures/env/dm_bed_brown_dif.tga",
specularMap = "mod_assets/textures/env/dm_bed_spec.tga",
normalMap = "mod_assets/textures/env/dm_bed_normal.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 40,
depthBias = 0,
}
defineMaterial{ -- good normalmap
name = "dm_bed_grey",
diffuseMap = "mod_assets/textures/env/dm_bed_grey_dif.tga",
specularMap = "mod_assets/textures/env/dm_bed_spec.tga",
normalMap = "mod_assets/textures/env/dm_bed_normal.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 40,
depthBias = 0,
}
defineMaterial{ -- degraded normalmap
name = "dm_table_round",
diffuseMap = "mod_assets/textures/env/dm_table_round_dif.tga",
normalMap = "mod_assets/textures/env/dm_table_round_normal.tga",
specularMap = "mod_assets/textures/env/dm_table_round_spec.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 50,
depthBias = 0,
}
defineMaterial{ -- degraded normalmap
name = "dm_table_square",
diffuseMap = "mod_assets/textures/env/dm_table_square_dif.tga",
normalMap = "mod_assets/textures/env/dm_table_square_normal.tga",
specularMap = "mod_assets/textures/env/dm_table_square_spec.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 60,
depthBias = 0,
}
place copies of dm_bed_*.* and dm_table_*.* from the dmcsb into it
6th: remove (!) the dmcsb pack from your mod folder
7th: open your mod in the editor, test and export it