Page 1 of 1

Weapon Creation - light component and texture issues.

Posted: Mon Nov 10, 2014 2:41 am
by MadCatter
Hi everyone. I've been working on a lantern item in a Zelda theme which acts as a torch when held, and as a special attack creates a fireburst spell.

1) I have created a custom model (based on the wall lanterns), but I'm having some texture wrapping issues as you can see below.
The texture mapping is set to "Wrap" (i believe it only repeats the texture 3 times). How can i get it to cover the entire model, or is the error in the model itself?
SpoilerShow
Image
2) I am not sure what the coding is to add the light property to the object. Current object definition is attached below.
SpoilerShow

Code: Select all

defineObject{
   name = "hand_lantern",
   baseObject = "base_item",
      components = {
      {
         class = "Model",
         model = "mod_assets/models/sx_lantern.fbx",
      },
	  {
         class ="Item",
         uiName = "Lantern",
		 gfxAtlas = "mod_assets/textures/items_atlas.dds",
         gfxIndex = 0,
         gfxIndexPowerAttack = 1,
         secondaryAction = "Fire_Blast",
		 impactSound = "impact_blade",
         weight = 1.5,
         traits = { "item" },
         description = "An old oil lantern.",
      },
	  {
         class = "MeleeAttack",
         attackPower = 5,
         accuracy = 5,
         --attackSound = "swipe_bow",
         cooldown = 2.0,
         baseDamageStat = "strength",
         damageType = "physical",
      },
	  {
        class = "CastSpell",         
        name = "Fire_Blast",
		uiName = "Fire Blast",
		spell = "fireburst",
		repeatCount = 0,
		cooldown = 6,
        energyCost = 30,
	  },
   },
   editorIcon = 24,
}
3) The version of Photoshop I have (elements 5) does not support alpha channel masks so my icons are stuck with white backgrounds. Is there any other software that does? (preferably free?)


Thanks for your help :D

Re: Weapon Creation - light component and texture issues.

Posted: Mon Nov 10, 2014 2:55 am
by minmay
MadCatter wrote:1) I have created a custom model (based on the wall lanterns), but I'm having some texture wrapping issues as you can see below.
The texture mapping is set to "Wrap" (i believe it only repeats the texture 3 times). How can i get it to cover the entire model, or is the error in the model itself?
I haven't heard of this happening with Grimrock's wrap addressing, so I'd check the model first. Your modeling software should have the option to load a texture. From the screenshot it looks like you didn't unwrap some parts of the mesh.
MadCatter wrote:2) I am not sure what the coding is to add the light property to the object. Current object definition is attached below.
If you want it to glow exactly like a torch, you want TorchItemComponent. If you want a different color/brightness/etc you'd probably have to use the onEquipItem and onUnequipItem hooks to add and remove a LightComponent to/from the party (I haven't done this yet so I'm not going to provide any code).
MadCatter wrote:3) The version of Photoshop I have (elements 5) does not support alpha channel masks so my icons are stuck with white backgrounds. Is there any other software that does? (preferably free?)
I endorse GIMP, completely free and there's a DDS export plugin.

Re: Weapon Creation - light component and texture issues.

Posted: Mon Nov 10, 2014 3:10 am
by MadCatter
That's great, thanks so much :D