Page 1 of 1

g&# d*&% f*#@! it (but well, problem solved)

Posted: Sun Nov 30, 2014 1:29 pm
by cromcrom
could someone explain/help me that I can pick up this:

Code: Select all

defineObject{ name = "dagger_crom",
   baseObject = "dagger",
   components = {
   { 
      class="MeleeAttack",
	attackPower = 5
   },

   
}
 } 


and not this:

Code: Select all

defineObject{ name = "crom_iron_ore",
   baseObject = "rock",
   components = {
 		{
			class = "Model",
			model = "assets/models/items/rock.fbx",
		},  
		{
			class ="Item",
			uiName = "Iron ore",
			weight = 0.8,
			description = "Iron Ore. Used in crafting."
		},
   }   
 } 
I just spent hours trying to figure this out, and

Code: Select all

print(spawn("rock").item:getGfxAtlas()) 
returns nil.

G&# d*&% f*#@, I just wasted hours on this. S#@& I am mad now. AH, just move your a#*& out of cuba, and release the G&# d*&% f*#@!% asset pack.

Re: g&# d*&% f*#@! it (but well, problem solved)

Posted: Sun Nov 30, 2014 1:47 pm
by NutJob
Well, I guess we needed a good "damn it all to hell" thread. ~laughs~

Hours? I put days into this little b*tch. =)

Re: g&# d*&% f*#@! it (but well, problem solved)

Posted: Sun Nov 30, 2014 2:23 pm
by MrChoke
LOL. Nice post title.

So you need to specify the GfxIndex number in the Item component. I tested your iron_ore object and it failed for me too but when I added the GfxIndex entry it worked.

Code: Select all

defineObject{
	baseObject = "base_item",
	tags = {
		"weapon",
		"weapon_throwing"
	},
	name = "rock",
	components = {
		{
			model = "assets/models/items/rock.fbx",
			name = "model",
			class = "Model"
		},
		{
			weight = 0.7,
			stackable = true,
			uiName = "Rock",
			projectileRotationSpeed = 10,
			projectileRotationZ = -30,
			impactSound = "impact_blunt",
			gfxIndex = 45,
			traits = {
				"throwing_weapon"
			},
			name = "item",
			class = "Item"
		},
		{
			cooldown = 4,
			class = "ThrowAttack",
			name = "throwattack",
			attackPower = 4
		},
		{
			class = "AmmoItem",
			ammoType = "rock",
			name = "ammoitem"
		}
	}
}

Re: g&# d*&% f*#@! it (but well, problem solved)

Posted: Sun Nov 30, 2014 2:59 pm
by cromcrom
Thanks a lot, it works. Phew, you just saved AH from my earth shattering wrath ^^ Adding you to TLC2 credits :-)

Re: g&# d*&% f*#@! it (but well, problem solved)

Posted: Sun Nov 30, 2014 4:45 pm
by Batty
:lol:
I spent much @$&!*# time with a description from the scraper, 'size = {x, x, x, x}' until I realized it's 'size = vec(x, x, x, x)'
Image + Image = 8-)

Re: g&# d*&% f*#@! it (but well, problem solved)

Posted: Mon Dec 01, 2014 3:59 pm
by cromcrom
Aw well, since the asset pack is out (part of it), I probably should have asked politely a long time ago. Sorry, modders :lol: