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!
function connectBreakables()
local objects = Dungeon.getMap(self.go.level):allEntities()
for obj in objects do
local oggetto = findEntity(obj.id)
if oggetto.obstacle and oggetto.health and oggetto.health:getConnectorCount() < 1 then
print("oggetto: "..oggetto.id)
oggetto.health:addConnector("onDie", self.go.id, "spannatorcia")
end
end
end
function spannatorcia(oggetto)
if oggetto then
local OG = oggetto.go
oggetto.go:spawn("torch", OG.x, OG.y, OG.facing, OG.elevation)
end
end
after some test and imprecations i finally found the way
[...]
All those moments will be lost in time, like tears in rain.
Time to die.
KhrougH wrote: ↑Sat Sep 28, 2024 9:06 am
where are files where i can take or modify images like "editorIcon" or "gfxIndex"?
i can't find files who contains these references
For the editor icons, it requires editing the grimrock2.dat file.
For gfxIndex, they use the three item image atlases found in \assets\textures\gui. [items.dds, items_2.dds, items_3.dds ]
For gfxIndex, in the definition files you can add:
'gfxAtlas = "mod_assets/textures/atlas/<user_atlas_1>.tga,"'
'gfxIndex = (#),'
To individual game object definitions.
(user_atlas_1, or whatever your own files are named).
Then you can keep the default icons for most things, and add your own for new/changed entities.
The atlas image needs to be exported as dds, BC3 / DXT5 (which gives decent transparency).
GIMP has a free downloadable exporter for that.
No mipmaps needed for the atlas.
The file you save is .dds, but for some reason the game looks for it with a .tga extension.
DaggorathMaster wrote: ↑Sun Sep 29, 2024 10:59 pm
For gfxIndex, in the definition files you can add:
'gfxAtlas = "mod_assets/textures/atlas/<user_atlas_1>.tga,"'
'gfxIndex = (#),'
To individual game object definitions.
(user_atlas_1, or whatever your own files are named).
Then you can keep the default icons for most things, and add your own for new/changed entities.
The atlas image needs to be exported as dds, BC3 / DXT5 (which gives decent transparency).
GIMP has a free downloadable exporter for that.
No mipmaps needed for the atlas.
The file you save is .dds, but for some reason the game looks for it with a .tga extension.
what about 'tiles' icons?
[...]
All those moments will be lost in time, like tears in rain.
Time to die.
DaggorathMaster wrote: ↑Sun Sep 29, 2024 10:59 pm
The atlas image needs to be exported as dds, BC3 / DXT5 (which gives decent transparency).
GIMP has a free downloadable exporter for that.
last version of GIMP has this exporter already integrated.
[...]
All those moments will be lost in time, like tears in rain.
Time to die.
Do you have the LoG2 asset pack installed? This gives you nearly all of the scripts and textures of the game, including monsters and some UI elements; atlas textures.
You can use or substitute these in your own scripts and asset definitions.
Isaac wrote: ↑Fri Oct 11, 2024 1:26 am
Do you have the LoG2 asset pack installed? This gives you nearly all of the scripts and textures of the game, including monsters and some UI elements; atlas textures.
You can use or substitute these in your own scripts and asset definitions.
Hello, Isaac. I'm a big fan of all the help you do around here, and your "tomb wall fix" was instrumental in making my dungeon that I just released.
I think I ask for a couple people when I ask, where and how would one go about getting and installing the LoGII Asset Pack in 2024? I've tried the links here, but they don't seem to work for me. Any help with this would be greatly appreciated. Thank you.