[Asset] Coins

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

Re: [Asset] Coins

Post by Prozail »

nope, thats native to LoG2, but its been moved to a particle effect.
User avatar
Doridion
Posts: 256
Joined: Tue Jun 10, 2014 9:23 pm

Re: [Asset] Coins

Post by Doridion »

Prozail wrote:nope, thats native to LoG2, but its been moved to a particle effect.
What i don't understand, is that in the Log Tome of Jgwman, descriptions seems not having issues and almost, in your first version of coins, not having neither. Difference between them is the particle effect.

Have you used the .model of Germanny ? Perhaps not adapt for LoG2 ( just a way for search issue )
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

Re: [Asset] Coins

Post by Prozail »

oh, you meant the itemdefinition bug... try this out with the coins...

This one gives a "Item not stackable" error on load.

Code: Select all

	defineObject{
		name = "gor_coin_gold",
		baseObject = "base_item",
		components = {
			{
				class = "Model",
				model = "mod_assets/grim_vsword/models/items/gor_coin_gold.fbx",
			},
			{
				class = "Item",
				uiName = "Gold Gor Coin",
				description = "Golden Coin of Gor",
				gfxAtlas = "mod_assets/grim_vsword/textures/gui/germ_icoatlas.tga",
				gfxIndex = 13,
				stackable = 1,
				weight = 0.1,
				stackSize = 1,
				multiple = 1,
				traits = { "coin" },
			},
			{
				class ="Particle",
				particleSystem = "glitter_gold"
			}
		}
	}
but this one works...

Code: Select all

	defineObject{
		name = "gor_coin_gold",
		baseObject = "base_item",
		components = {
			{
				class = "Model",
				model = "mod_assets/grim_vsword/models/items/gor_coin_gold.fbx",
			},
			{
				class = "Item",
				uiName = "Gold Gor Coin",
				gfxAtlas = "mod_assets/grim_vsword/textures/gui/germ_icoatlas.tga",
				gfxIndex = 13,
				weight = 0.1,
				stackable = 1,
				stackSize = 1,
				multiple = 1,
				traits = { "coin" },
				description = "Golden Coin of Gor",
			},
			{
				class ="Particle",
				particleSystem = "glitter_gold"
			}
		}
	}
only difference is the order of the properties.
User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Re: [Asset] Coins

Post by Lark »

Anyone converted any of the food items or the waterskin yet?
User avatar
Doridion
Posts: 256
Joined: Tue Jun 10, 2014 9:23 pm

Re: [Asset] Coins

Post by Doridion »

Created Bloodwych food like in LoG1 ( food can be eaten 2-3 times ), I can try to convert them and give you result.

Ok, i started to convert Water bottle usable two times from my LoG1 to the second one, and seems to be ok ( Thanks to Germanny for graphics and icon ). Can download it there, and for the script it's :

Item.lua

Code: Select all

defineObject{
  name = "user_food_water_full",
  baseObject = "base_item",
  components = {
    {
      class = "Model",
      model = "mod_assets/models/items/user_food_water_full.fbx",
    },
    {
      class = "Item",
      uiName = "Water",
      gfxAtlas = "mod_assets/textures/gui/water_bottle_icon.tga",
      gfxIndex = 1,
      weight = 0.7,
      multiple = 1,
      traits = { "food" },
      description = "A water bottle",
    },
    {
      class = "UsableItem",
      nutritionValue = 200,
      emptyItem = "user_food_water_empty",
      onUseItem = function(self,champion)
        champion:regainEnergy(20)
        champion:regainHealth(100)
      end
    },
  }
}
materials.lua

Code: Select all

defineMaterial{
	name = "user_food_water_full",
	diffuseMap = "mod_assets/textures/items/user_food_water_full_dif.tga",
 	specularMap = "mod_assets/textures/items/user_food_water_full_spec.tga",
	normalMap = "mod_assets/textures/items/user_food_water_full_normal.tga",
	doubleSided = false,
	lighting = true,
	alphaTest = false,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 10,
	depthBias = 0,
}
Hope that might be helpful ^^

Update : Finished my food collection. It contains Bottles of water and mead, apple, meat, bread and special eggs.
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: [Asset] Coins

Post by cromcrom »

Thanks a lot Prozail, I learnt a lot from your package :-)
A trip of a thousand leagues starts with a step.
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

Re: [Asset] Coins

Post by Grimfan »

I'm using your apples Doridion, but I'm getting a D3D error and the textures are failing to appear (the apple otherwise worked perfectly). I think it happened when the editor was updated because before they were working as intended textures and all. I Will try them in a different dungeon and see what happens.
User avatar
Mysterious
Posts: 226
Joined: Wed Nov 06, 2013 8:31 am

Re: [Asset] Coins

Post by Mysterious »

Just a question. I am using stackable = true, statement in my items and have no problems. So what's with the stackable = 1, and stacksize = 1, I am not sure what I am missing here thxs :)
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

Re: [Asset] Coins

Post by Grimfan »

I think the stacksize is the quantity of the item to appear (in terms of numbering them). If you don't do this I assume that the item doesn't have a number next to it, so you can't tell how many is in a stack. This is just a wild guess however (since I am still relatively new to scripting myself). :)

By the way, I tested the food package in another mod (this time unaltered) and the apples textures are still failing (everything else is fine). Odd. :?
User avatar
Doridion
Posts: 256
Joined: Tue Jun 10, 2014 9:23 pm

Re: [Asset] Coins

Post by Doridion »

Grimfan wrote:By the way, I tested the food package in another mod (this time unaltered) and the apples textures are still failing (everything else is fine). Odd. :?
Grimfan, i'll see for apple textures, but can you give me a little screenshot of the issue ? ( I remember have troubles with texturing the apple under LoG1, so I tested for LoG2 and seems no problem, but got and idea of where it coming )

For LoG2 we must modify all the normal map, and can come from here

Thanks in advance
Post Reply