Page 2 of 3

Re: how does one customize spells?

Posted: Sat Sep 22, 2012 7:02 pm
by Neikun
I would think it's because of the gfxIndex = 69,
as that would still be the original icon.
http://www.grimrock.net/modding/creating-custom-assets/
Read through the subheader, Using Custom Graphics.
That might help.

Re: how does one customize spells?

Posted: Sat Sep 22, 2012 7:04 pm
by Shloogorgh
oops, I should have mentioned, I haven't even begun to change the gfx texture yet, I'm only referring to the 3d texture, which despite my efforts still looks like the original orbs

Re: how does one customize spells?

Posted: Sat Sep 22, 2012 7:06 pm
by Neikun
hmm.
This is out of my area of knowing anything about haha.

Re: how does one customize spells?

Posted: Sat Sep 22, 2012 8:55 pm
by Montis
Shloogorgh wrote:oops, I should have mentioned, I haven't even begun to change the gfx texture yet, I'm only referring to the 3d texture, which despite my efforts still looks like the original orbs
I'm not quite sure but I think the textures / materials need to be specified in the model files as well. Did you change anything in the model files except renaming them?

Re: how does one customize spells?

Posted: Sat Sep 22, 2012 9:02 pm
by Shloogorgh
The "creating custom assets" guide mentioned being able to create an albino snail "without ever touching a model file." I could still be missing something important however.

Re: how does one customize spells?

Posted: Sun Sep 23, 2012 3:59 am
by Shloogorgh
Well now I just tried to change the item icons since I couoldn't get the texture to work... And it didn't work either :(

When I tried to load the dungeon, got this error: [string "Item.lua"]:0: Unknown uncompressed DDS pixel format in file mod_assets/textures/items.dds

The "creating custom assets" page says
user interface graphics, such as item icons, should be left uncompressed (use D3DFMT_A8R8G8B8). Mipmaps should be used with all textures
So I saved the items mod as a dds in Paint.NET with these settings:

1. A8B8G8R8
2. Generate Mip Maps
3. Super Sampling

so if anyone could provide some insight I'd appreciate it

EDIT: D'oh! I just figured it out! The "creating custom assets" page called for A8R8G8B8 and I had A8B8G8R8. Didn't see that it had two similar formats.

In any case, something works! Yay!

Re: how does one customize spells?

Posted: Mon Sep 24, 2012 8:03 am
by antti
Shloogorgh wrote:The "creating custom assets" guide mentioned being able to create an albino snail "without ever touching a model file." I could still be missing something important however.
Yes, materials can be replaced. Just define a new material with the same name the old asset has. If you want a material that has a new name (to avoid replacing all the textures of the other assets that happen to use the same material, for example), then you need modify the .model since that's where the material names come from.

Re: how does one customize spells?

Posted: Mon Sep 24, 2012 10:14 am
by Shloogorgh
antti wrote: Yes, materials can be replaced. Just define a new material with the same name the old asset has. If you want a material that has a new name (to avoid replacing all the textures of the other assets that happen to use the same material, for example), then you need modify the .model since that's where the material names come from.
Makes sense, and now thanks to model toolkit viewtopic.php?f=14&t=3325 I have done just that. :D

Re: how does one customize spells?

Posted: Mon Sep 24, 2012 9:30 pm
by Shloogorgh
So it seems in order to have monsters and weapons utilize custom spells, you need to override an existing spell. I can make a weapon of power that shoots spectral blobs, but in order to do that I have to give up an existing spell:

Code: Select all

cloneObject{
	name = "powerbolt",
	baseObject = "powerbolt",
	particleSystem = "blob",
	hitParticleEffect = "blob_hit",
	lightColor = vec(0.25, 0.5, 1),
	lightBrightness = 15,
	lightRange = 7,
	lightHitBrightness = 40,
	lightHitRange = 10,
	castShadow = true,
	launchSound = "blob_launch",
	projectileSound = "blob",
	hitSound = "blob_hit",
	projectileSpeed = 15,
	attackPower = 0,
	--cameraShake = true,
	tags = { "spell" },
}
So in this game, any instance of powerbolt would be replaced by the spectral blob. The good thing is that powerbolt is a different spell from lightning bolt. I'm not sure, but I think powerbolt is only fired by the weapon of power, since its stats are the same as lightning bolt. So that means it is the perfect spell to replace. But I don't know if monsters can fire powerbolt.

Re: how does one customize spells?

Posted: Tue Sep 25, 2012 12:49 am
by SpacialKatana
Since there are so few spells originally I'd prefer not to replace them if possible. Seems the devs were a bit short sighted regarding this area...and since at present I can't add custom spells to mobs I fear my time editing this game will be far shorter than others before :(