Page 4 of 5

Re: Modding original game

Posted: Thu Jan 19, 2017 11:04 pm
by CrEaToXx
AndakRainor wrote:I think you and minmay are not talking about the same thing. What you can do with Legend of Grimrock 2 is using the default campaign, Isle of Nex, as the base for your mod. It is exactly what I did with the mod "Magic of Grimrock".
You mean that?. Nice... :)

But how would I go about integrating something for the base game? This surely would be more then enough for me.

Re: Modding original game

Posted: Thu Jan 19, 2017 11:08 pm
by AndakRainor
You would have to mod it as you would do with any other mod. The only difference is that you don't start with empty maps.

Re: Modding original game

Posted: Thu Jan 19, 2017 11:10 pm
by CrEaToXx
AndakRainor wrote:You would have to mod it as you would do with any other mod. The only difference is that you don't start with empty maps.
Like that?

Code: Select all

import "assets/scripts/standard_assets.lua"
import "assets/scripts/nex_assets.lua"

Re: Modding original game

Posted: Thu Jan 19, 2017 11:12 pm
by AndakRainor
Yes those 2 are needed. To start, see the beginning of this thread, it tells how to set the dungeon path to get the maps in the editor.

Re: Modding original game

Posted: Thu Jan 19, 2017 11:15 pm
by CrEaToXx
AndakRainor wrote:Yes those 2 are needed. To start, see the beginning of this thread, it tells how to set the dungeon path to get the maps in the editor.
I've already done that. But I can't save the dungeon then. I feel like I'm missing something relevant.

Can't you just "hook" into the base game somehow? (I guess that's what you've done?)

On a side note. I really do wonder why no one else before tried to add new races for the base game, and uploaded to the Nexus... :?:

Re: Modding original game

Posted: Thu Jan 19, 2017 11:20 pm
by AndakRainor
What do you mean you can't save the dungeon? Once you save it, you just have to switch back your dungeon path to the newly created dungeon.lua file. No one did new races for Isle of Nex because they were busy doing other things I guess... If you are going to mod Isle of Nex, I would suggest adding some spells to it and some systems for high level imported characters :D

Re: Modding original game

Posted: Thu Jan 19, 2017 11:23 pm
by CrEaToXx
AndakRainor wrote:What do you mean you can't save the dungeon? Once you save it, you just have to switch back your dungeon path to the newly created dungeon.lua file. No one did new races for Isle of Nex because they were busy doing other things I guess... If you are going to mod Isle of Nex, I would suggest adding some spells to it and some systems for high level imported characters :D
I'm planing a lot friend. Really a lot. But I want to learn the quirks of it for the base game first, so I can release some minor additions. A new race pack was the first idea, cause I already missed higher racial diversity in LoG1... :)

Thanks for your magnificent input. I think I get it done from here. If not, I'm going to call back. *Thumbs Up*

Re: Modding original game

Posted: Thu Jan 19, 2017 11:50 pm
by CrEaToXx
So, ok. I'm sorry again for the double post. But I think this needs better clarification if anyone moves over here again to figure how to modifie the base game. Here's exactly what I've done:

1. Build your custom dungeon in editor, then close the editor
2. With any Notepad tool (I recommend Notepad++), open the <your_mod_name>.dungeon_editor in your...MyDungeon/mod_assets/scripts...folder
3. Edit the line...

Code: Select all

dungeonFolder "mod_assets/scripts"
...to...

Code: Select all

dungeonFolder "assets/dungeons/grimrock2"
4. Now try to save your dungeon, which it doesn't due to failure. But notice the file path it misses
5. Now move to your dungeons source folder (usually somewhere in Documents/AlmostHuman) and recreate the exact file path you previously noticed inside your...mod_assets...folder
6. Then rename your...mod_assets...folder to...assets...trying to save again which should work now
7. Then, in the file path you recreated, you will find the base game's...dungeon.lua...use it to replace the dungeon.lua of your mod in your mods script folder
8. We're not done here. Now after saving works, you'll need to redo all the renaming you've done before(including all folders and files), and also add those two lines to your mods init.lua...

Code: Select all

-- import standard assets
import "assets/scripts/standard_assets.lua"

-- import Isle of Nex assets
import "assets/scripts/nex_assets.lua"
9. Voila! The complete original base game is now open to be modified by you... :D

Thanks again to AndakRainor and minmay. I won't forget your deeds.

Re: Modding original game

Posted: Sat Jan 21, 2017 4:10 pm
by billb52
CrEaToXx I cannot find a line in the dungeon.lua file dungeonFolder "mod_assets/scripts" , I have looked in many dungeon.lua files and non found?

Re: Modding original game

Posted: Sat Jan 21, 2017 6:33 pm
by AndakRainor
This line must be edited in <your_mod_name>.dungeon_editor at the root of your project:

Code: Select all

dungeonName "Legend of Grimrock 2"
author "Almost Human"
description ""
dungeonFolder "assets/dungeons/grimrock2"