Ask a simple question, get a simple answer

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!
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Isaac wrote:@minmay:
Portraits placed in "mod_assets/textures/portraits/" [in either tga or dds format] don't show up in the dat file for me. Perhaps I've messed up the naming convention in some way, but I have always named my portraits using that same format: race_sex_##; just like the default assets.
Here is a dungeon demonstrating it.
(Try exporting it, playing it, selecting "Create Characters", and then in the character creation screen, select the "Test" race).
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

That is really neat... So it is that the custom tab shows the TGA images in the Grimrock 2/portraits/ folder, and the standard tab shows the dds images in the 'mod_assets\textures\portraits' folder, and filters it by the selected character race.

Twice I almost posted back that I wasn't seeing any portraits, but the PC was set to human.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Ask a simple question, get a simple answer

Post by akroma222 »

CainOrdamoth wrote:Hi all, I've been working on some custom races but I need some help. Is it possible to add custom sounds for new races, like power attack yells and pain sounds? I have them already defined and working, but need to 'add' them to a race script if that's possible. The same for portraits. With portraits, can I assign them to a specific race so that they show when that race is selected like for the default races, or do I simply bundle the new portraits with the mod an have people install/use them manually like with custom portraits?

Cheers guys :)
For your Sounds - define the sounds according to this format:
Damage sound

Code: Select all

"damage_[race]_[sex]"
Power attack yell

Code: Select all

"power_attack_yell_[race]_[sex]"
Happy sound

Code: Select all

"happy_[race]"
For example -
SpoilerShow

Code: Select all

defineSound{
	name = "damage_darkelf_female",
	filename = {
		"mod_assets/sounds/damage_darkelf_female_01.wav",
		"mod_assets/sounds/damage_darkelf_female_02.wav",
	},
	loop = false,
	volume = 0.5,
}
CainOrdamoth
Posts: 34
Joined: Sun Mar 08, 2015 1:45 am

Re: Ask a simple question, get a simple answer

Post by CainOrdamoth »

This is great (and surprisingly simple, lol). I've not tested the sounds yet, but the portraits work. I saved them as dds, the reason I had problems was I didn't use DXT5 compression, nooby mistake on my part. But the files are in the right folders, etc and show in-game as intended which is nice. I'll try out the sounds a bit later, they're all set up but not tested yet. Thanks guys. :)
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

any DXT format (1 through 5) or uncompressed RGBA8 will work.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

minmay wrote:any DXT format (1 through 5) or uncompressed RGBA8 will work.
I recall people (me included) receiving that draw error when using DXT formats, but switching to A8R8G8B8 fixed it.
Is there anything else that may cause a draw error other than the save format?
My asset pack [v1.10]
Features a bit of everything! :D
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

CainOrdamoth wrote:I saved them as dds, the reason I had problems was I didn't use DXT5 compression, nooby mistake on my part.
DXT5 is great for images with an alpha channel, but portraits don't usually need an alpha (though they can have them). DXT1 creates much smaller files; possibly 50% smaller.

Image

*Curiously, Paint.Net does not offer to save DXT1 without a 1bit alpha, but the Nvidia DDS pluggin for Photoshop does.
DXT5 with contoured alpha-removed background, looks fine for the big portrait, but the backdrop looks black on the attack panel.
Image
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

I'm not talking about portraits, I'm talking about textures.
My asset pack [v1.10]
Features a bit of everything! :D
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

zimberzimber wrote:
minmay wrote:any DXT format (1 through 5) or uncompressed RGBA8 will work.
I recall people (me included) receiving that draw error when using DXT formats, but switching to A8R8G8B8 fixed it.
Is there anything else that may cause a draw error other than the save format?
since you won't even tell me what "that draw error" is, i'm not going to bother trying to answer that question.

and DXT1 isn't "possibly" 50% smaller than DXT5, it IS 50% smaller, always.

you can also just compare to the formats of the textures in the asset pack.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

I'll start working on converting my texture to take up less space, I'll drop here the error if I ever get it.
Though I swear I used to get a DRAWERROR or something like that when I used non-A8R8G8B8 formats, was probably something else I guess... :?
My asset pack [v1.10]
Features a bit of everything! :D
Post Reply