hello all,
sorry I ve been busy!
JKos wrote:It's really hard to guess what's wrong without seeing the sources. But one possible cause could be some recursive or looping script which stores something in memory.
And 105 levels is a lot, the original dungeon has 34 levels, so maybe you just have too much stuff(objects) in your dungeon.
Here is a simple script which prints out the amount of objects in your dungeon. Copy paste this to a script entity named debug (or whatever)
Code: Select all
function countObjects(componentName,callback)
local objectCount = 0
for mapIndex =1, Dungeon.getMaxLevels() do
for ent in Dungeon.getMap(mapIndex):allEntities() do
objectCount = objectCount + 1
end
end
print(objectCount)
end
Start your dungeon and type in console: debug.script.countObjects()
For a reference the original dungeon has 58922 objects (just tested it).
well, I finnaly can run the mod, with all details set to low, and after trying the debug script, it says that I have 140058 objects.
pretty big, isn't it? So, that means that this kind of mod is completely irrealisable?
Azel wrote:Why not make it 1,000 levels? Go for the Gold!

roger that! I have discuss of that with a friend, and we both agreed that 2500 levels would be a better challenge for the gold medal!
petri wrote:A good way to free up some memory is to not import standard_assets.lua which loads all LOG2 assets into memory. Instead import only the stuff you need in your mod. See standard_assets.lua in the asset pack.
I ve already done sort of this:
there is about 159Mb of models and textures that I have removed. And "cerise sur le gateau" I use the tomb ceilling for the castle wallset and the catacomb ceiling for the dungeon wallset. I find the different ceilings too complicated to use.
Making multiple mod is a good idea, but actually I don't think this will work correctly for mine. How I see that, I can separate the mod in 2 parts. I'm currently texting 1st part, works well so far, with high details, but 1450Mb used in memory. About 59 levels, with 2 custom wallset and custom assets, that takes about 95Mb in the mod_assets, the exported mod take 54Mb.
However for the 2nd part, I can remove one of the custom wallset. All other are used. About log2 wallset, I still need the castle, dungeon and mine and all outdoor objects. Maybe the tomb wallset can be removed, but I use the tomb models for a custom wallset. However that will make approximately 50 to 80k of models no more spawned from the part 1 (I don't know how many exactly, did not run the debug script), maybe this will greatly reduce the amount of memory used. Of course after some time, I guess it would be possible with making some "sacrifice". Not sure.
I don't think I will continu the mod like I wanted it to be, large. Maybe I will reduce things a lot, and even remove some wallset.
Anyway, for the savegame import items and xp, can some experienced scripters make some example scripts on how to export/import a savegame please? This may be easy for some, but I can't do something like that, I don't understand that scripting vocabulary.
Or as msyblade talk about it, does that mean a huge script with tons of lines of codes? Sounds pretty scary!
Can we expect a x64 version of log2 for windows? As AH has done a mac os version and mac os is a 64 bits platform, is the mac version a 64bit application?