Page 4 of 4
Re: Dungeon optimization tools
Posted: Sat Sep 19, 2015 1:25 am
by THOM
One question to minmay (or to everyone else):
Is it possible to generate a list with all materials used in a mod?
I've added a lot assets (tilesets, but also item- and monstersets) and to shrink your dungeon.dat file it is advisable (as we all know) to erase all unused materials and textures. I try to do this - but it is a pain in the ass to figure out after deleting objectdefinions which material is not needed anymore. It would be a great help to have a list with all used materials...
Is this possible?
Re: Dungeon optimization tools
Posted: Sat Sep 19, 2015 1:50 am
by minmay
Sure, the model format is even
specified. It's quite easy to write a python script or w/e to list all materials used in a model, then it's just a matter of running that on every used model (presumably by traversing every .lua file looking for strings ending in ".fbx").
Re: Dungeon optimization tools
Posted: Sat Sep 19, 2015 9:20 am
by Duncan1246
minmay wrote:...So you're launching the editor, running the script, then launching a second instance of the game and redirecting its output, and expecting that to somehow grab the output from the first grimrock2.exe instance - that was already printed? I think you are seriously confused and need to re-read the command prompt tutorial I linked to, and the step-by-step guide in the merge function's instructions.
I don't intended to use mergeObjects, so I did not read further, and I was wrong.
So I retry in this way:
1.Launch LG2 with low options, run editor, close LG2
2.Run grimrock2.exe>output.txt to redirect the report to a txt file before launching opt_utils.... but the crash occurs again
So I think my mod is, as you says, "beyond this sort of help"... (dat is 250Mo)
Re: Dungeon optimization tools
Posted: Tue Sep 22, 2015 12:13 pm
by minmay
Just uploaded a serious bug fix for the object merger, specifically voidTiles.lua now has a field to change depending on whether you merged animations or not (like it does for pillars). Previously it assumed you didn't merge animations and I forgot about it.
Re: Dungeon optimization tools
Posted: Fri Oct 02, 2015 3:42 am
by Eleven Warrior
Love these tools thxs man

Re: Dungeon optimization tools
Posted: Sun Nov 01, 2015 2:34 pm
by Duncan1246
I have made some tweaks since a month, dat file is reduced from 250 Mo to 155, and I have used your script with following results:
Total objects/ components: 80912 / 165488
Full Save State: 9110 / 36025
Minimal Save State: 70912 / 126188
Unknown 950 / 3014
total name length 2210470
Minmay, does this seems a good level of MSS, and what can I do now to improves my mod on memory usage?
Re: Dungeon optimization tools
Posted: Sun Nov 01, 2015 9:57 pm
by minmay
Duncan1246 wrote:what can I do now to improves my mod on memory usage?
remove materials
Re: Dungeon optimization tools
Posted: Tue Sep 12, 2017 9:57 am
by AndakRainor
I have a question about GameMode.showImage(filename):
Does it keep the image data in (video) memory permanently, or can it be used to show as much images as one would want ?
If it does, then I think video files would be the only way to use data in a dynamic memory way ?