power attack icons (missing?)

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!
Post Reply
User avatar
FeMaiden
Posts: 290
Joined: Wed Jan 16, 2013 8:16 am

power attack icons (missing?)

Post by FeMaiden »

I just created a custom weapon, using the machete as the base item.
I have the weapon working, i changed it's stats and name and everything.

however, i had the afterthought, I wanted to add a powerAttackTemplate to it.
I added flurry.

when i go in the game, the flurry power attack correctly displays on my weapon but I get a console warning that says "warning missing power attack icon"
the weapon appears to work perfectly. I can swing the weapon and execute the power attack, but this console warning concerns me.
I'm am unwilling to put this in my mod for the time being so I removed the powerAttackTemplate. but there must be a way to do this without triggering a warning?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: power attack icons (missing?)

Post by minmay »

Because you didn't give the weapon a power attack icon. Look at the definition you copied the powerAttackTemplate field from, and notice that it also has a gfxIndexPowerAttack field. I think the atlas used for the power attack icon and the item icon have to be the same, so if you want to add a secondary attack to the machete (and not have it look like total ass) you'll need to make a new power attack icon for the machete and put it in a custom icon atlas, then also put the original machete icon in that atlas. Note that power attack icons use additive blending and ignore alpha, unlike regular item icons which use alpha blending.
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
FeMaiden
Posts: 290
Joined: Wed Jan 16, 2013 8:16 am

Re: power attack icons (missing?)

Post by FeMaiden »

ohhh..yeah, I don't know how i missed that, I was looking for it and i did not see it. I saw gfxIndex but not gfxIndexPowerAttack.

bot now I went back in and I see it right there...
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: power attack icons (missing?)

Post by Drakkan »

in the worst case you can always use some other powerattacktemplate from some other sword. It is looking little weird, but no so huge issue at the end I suppose.
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
FeMaiden
Posts: 290
Joined: Wed Jan 16, 2013 8:16 am

Re: power attack icons (missing?)

Post by FeMaiden »

actually I just used the same icon from the machete for the power attack icon as well.

so my code looks like

Code: Select all

gfxIndex = 23,
gfxIndexPowerAttack = 23,

this way, it doesn't show any icon for the power attack, but it does not look like ass either all it says is the name of the power attack and the description, I leveled up my light weapons to 4 to test the powr attack and everything works. my machete works and there are no console warnings which is what I wanted..
Post Reply