adding to the gfxIndex ?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

adding to the gfxIndex ?

Post by Skuggasveinn »

Can someone explain to me how the gfxIndexing system works ?

I know its a picture somewhere thats divated into grids with all the icons. Something like in the old days of 2d sprites.

Where is this picture ?
How can I create my own icon grid and reference it (I have created alot of costum assets, but when I pick up my shield, the 2d mouse icon is the legionery shield since I'm using that as a template)

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: adding to the gfxIndex ?

Post by Neikun »

You're going to want to create your own atlas and reference that, because you'd don't have access to the actual in game atlas, only a copy of it.

As to how you make you own.. something something DDS plugin, GIMP
I wish I knew more, but I have not been able to successfully install a DDS plugin for either GIMP or Photoshop.
I have no idea what I've been doing wrong.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: adding to the gfxIndex ?

Post by Skuggasveinn »

I figured as much, the orginal icons are located under Textures/gui and are named items.dds and items_2.dds

it seems that every icon is about 72*72 pixels and the count starts at 0

So if we look at items.dds the schimitar is gfxindex=0 and the last icon is the ogre hammer has gfxIndex=168
That makes sense and the items.lua confirms this.

Then we have items_2.dds and the count jumps to 200, so the golden_chalice is gfxIndex=200

The logical thing is then to make your own items_3.dds and place it under mod_assets\textures\gui

But its here that I'm stuck, simply placing it there and indexing my items 300 and upwards does nothing.

Any insight into how to get my items_3.dds into play is welcome.

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: adding to the gfxIndex ?

Post by Neikun »

Well you'd be starting a new atlas, so you can start back at zero. I saw in someone's source files that in the item they made they had a line for the atlas used, and the reference number inside. Lemme dredge it up.

Code: Select all

	gfxAtlas = "mod_assets/textures/Tombs_of_Winterfell_Atlas.tga",	
	gfxIndex = 4,
This is out of the Tombs of Winterfell source, obv. lol
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: adding to the gfxIndex ?

Post by Skuggasveinn »

Neikun..... you made my day :D

the gfxatlas command is what I was missing, didn't know that it existed.
My items are showing up now.

thanks alot
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: adding to the gfxIndex ?

Post by Neikun »

huzzah!
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Lilltiger
Posts: 95
Joined: Sun Sep 16, 2012 1:12 am

Re: adding to the gfxIndex ?

Post by Lilltiger »

And for the DDS plugin to work in gimp you need gimp 2.8 and the newest dds-plugin and save them as RGBA8 and generate mipmaps.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: adding to the gfxIndex ?

Post by Neikun »

I just can't figure out how to install it.
I have the plugin, I have the gimp. But I can't get them to work together. It's been awhile now, but I'm pretty sure the plugin had an installer. I used that. Couldn't open .dds files.
Dragged all the files to plug in folder, still couldn't open the DDS files.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: adding to the gfxIndex ?

Post by JohnWordsworth »

You have to make sure you have the right version of the plugin (43 or 64 bit) for your version of Gimp. However, if you want easy DDS support, then Paint.Net is a free image editing program that's pretty good (not as many features as GIMP, but a nice and friendly interface, and still a fair few features),

Just be sure to untick the other program's that it tries to install when you install it (its one of those apps I think)...
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Post Reply