Condition Icon Atlas??

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
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Condition Icon Atlas??

Post by akroma222 »

Hey folks,
as the title suggests, I am simply trying to get hold of the icon atlas that contains all the tiny condition icons
Any help or direction here appreciated :)
Akroma
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Condition Icon Atlas??

Post by Isaac »

Get it how? Do you want to edit it in an image editor? Or do you just want to add more conditions?

The file is "assets/texture/gui/conditions.tga". (dds)

It looks like this:
Image
*This is a copy ~not the original.
You don't actually need the original; you can substitute your own.


Example:
SpoilerShow
Courtesy of Jkos' https://github.com/JKos/log2doc/wiki/Asset-Definitions

Code: Select all

defineCondition{
   name = "gloegg_infused",
   uiName = "Gloegg Infused",
   description = "Vitality +10, Willpower -10",
   icon = 1,
   iconAtlas = "mod_assets/textures/conditions.tga",
   beneficial = true,
   harmful = false,
   tickInterval = 1,
   onStart = function(self, champion)
      hudPrint(champion:getName().." is infused with the power of Gloegg!")
      self:setDuration(10)
   end,
   onStop = function(self, champion)
      hudPrint(champion:getName().." feels weak!")
   end,
   onRecomputeStats = function(self, champion)
      champion:addStatModifier("vitality", 10)
      champion:addStatModifier("willpower", -10)
   end,
   onTick = function(self, champion)
      print(self:getDuration().." seconds remaining.")
   end,
}
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Condition Icon Atlas??

Post by akroma222 »

Thanks Issac,
yes I want to edit it in Gimp to change / add more condition icons
I have had some trouble locating the file though, where abouts is it exactly?
I have Version 2.2.4, and checked the latest asset pack v2 .... but can not find it....
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Condition Icon Atlas??

Post by minmay »

...why do you want to change the original? Do you intend to distribute a program with your mod that patches grimrock2.dat? What are you going to do when the game updates or gets multiple versions?

What is wrong with just making a new image?
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
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Condition Icon Atlas??

Post by akroma222 »

Hey minmay,
not a patch, I was just thinking of altering some of the existing condition icons a touch
and would very much like to have the original file to do so
yes I will be creating a new image for the completely new conditions
Could you guys possibly direct me to a copy of the file...??
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Condition Icon Atlas??

Post by akroma222 »

Failing all that, could one of you tell me the pixel dimensions for a condition atlas??
Thanks guys, much apprreciated
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Condition Icon Atlas??

Post by Isaac »

I believe the individual icons are 32 pixels each.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Condition Icon Atlas??

Post by akroma222 »

Thanks Isaac!
so Id be looking at creating a 128 x 160 image then?
(4 x 32) x (5 x 32)
or am I screwing the maths up here?
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Condition Icon Atlas??

Post by Isaac »

akroma222 wrote:Thanks Isaac!
so Id be looking at creating a 128 x 160 image then?
(4 x 32) x (5 x 32)
or am I screwing the maths up here?
If you are just adding a few, then a 128x128 image would be room for sixteen new conditions.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Condition Icon Atlas??

Post by minmay »

It will presumably only ever be drawn in 2d, so any width and height will work. But using numbers that aren't multiples of 32 wouldn't really make sense.
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.
Post Reply