[WIP] Grimrock NoteBook Container

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
steyrhahn
Posts: 85
Joined: Tue Sep 04, 2012 7:02 pm
Location: Georgia, USA
Contact:

Re: [WIP] Grimrock NoteBook Container

Post by steyrhahn » Fri Dec 20, 2013 9:19 pm

Eleven Warrior wrote: I was also wondering how do you put screen shots on this Site, I want to show people pictures of my Mod. I see a icon called Img, but not sure how it works.. Thxs for any help :)

Place the image on a publicly readable storage.

then use the Img option above a text scroll area.

Then paste the fully qualified web address of the filename.ext between the Image tags that were generated for you.

User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock NoteBook Container

Post by JohnWordsworth » Sat Dec 21, 2013 3:43 am

@Maneus: Love the reskin for your mod. Some points in response to your post.

1. Just an FYI - The best way to add a new skin is to add an nb_settings script entity to your dungeon and use the methods in the sample file to define a new skin (it can overwrite the default skin). This means that as I update the core notebook script - your won't lose your settings! The skin definition can move everything around if you wish - including the close button etc.

2. Great idea with regards to the sounds. I will definitely add those myself to the next version of the NoteBook.

3. Hadn't noticed the little gap with the spell runes. I'll look into that (could be a rounding issue somewhere).

4. Map scrolls should work. However, if a scroll has any text as well as a scroll image, then the text will show on 'page 1' and the image will show on 'page 2' so you need to ensure that you have 2 pages of space setup in the book if this is ever going to happen in your mod. If it just has an image though, that should show on page 1.

@Eleven Warrior: Ahh yes, damn .DS_Store files get everywhere as I have Dropbox on my Mac too (and do some editing there). As mentioned, any of the .DS_Store or even the other dot files (files starting with .) that have the same name as other files (.my_texture.dds for instance) are all spam from OSX really. They should be only 1 or 2 Kb big, but you can delete them too.

Also, while it's not that easy to do - reskining the book for your own mod is a supported feature of the mod. You just need to make your own background image, and then define the skin in your nb_settings file. If you look at the main script, you can copy and paste the skin from there as an example of what elements you need to put into the table to define a skin.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
Eleven Warrior
Posts: 727
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [WIP] Grimrock NoteBook Container

Post by Eleven Warrior » Sun Dec 22, 2013 4:24 am

Hi guys..

Thank you for the Info on how to get a img and put it on this site. Will give it a go in the Next few days.. Thxs for that Info John will try it out ASAP..

User avatar
Eleven Warrior
Posts: 727
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [WIP] Grimrock NoteBook Container

Post by Eleven Warrior » Sun Dec 22, 2013 5:22 am

Hi John.

Well I have the Log Framework installed in my Mod. When I install your book it overwrites the (Quick Bar) script for some reason. The Quick Bar does not appear on the screen. I have done what the Text file says and am not sure what's happening.

Also when I place a Book in the Game and pick up the Book and try to use it, it crashes. Something to do with this line of Code
local screenWidth = g.width; attempt to index local 'g' (a nil value)

I have copied the function (import "mod_assets/notebook/scripts/items.lua") and pasted into my init.lua script as you said. Does this have to be in my init.lua file??

This is my Log Framework Script, the Script Entity is called "test"

function autoexec()

ladders_updown.activate()
------------------------------------- onMove ----------------------

fw.setHook('party.sky.onMove',
function(party,dir)
skyScript.onMove(dir)
end
)
fw.setHook('party.shop.onMove',
function(party,dir)
if (gui.globalVars["shopOn"]) then return false end
end
)
fw.setHook('party.cMove.onMove',
function(party,dir)
if (cMove:getValue() == 0) then return false end
end
)
------------------------------------- onDrawGui ----------------------

fw.setHook('party.gw.onDrawGui',
function(g)
gw._drawGUI(g)
end
)
--fw.setHook('party.search.onDrawGui',
--function(g)
--search_script.onDrawGui(g)
--end
--)
fw.setHook('party.qb.onDrawGui',
function(g)
qb_script.onDrawGui(g)
end
)
fw.setHook('party.gui.onDrawGui',
function(g)
gui.onDrawGui(g)
end
)
------------------------------------- onXXX ----------------------

fw.setHook('party.gw.onDrawInventory',
function(g,champ)
gw._drawInventory(g,champ)
end
)
fw.setHook('party.gw.onDrawSkills',
function(g,champ)
gw._drawSkills(g,champ)
end
)
fw.setHook('party.gw.onDrawStats',
function(g,champ)
gw._drawStats(g,champ)
end
)
fw.setHook('party.sb.onPickUpItem',
function(self,item)
if sButtonManager.PickUp(self,item) == false then return false end
end
)
----------------------------------------------------
end

User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock NoteBook Container

Post by JohnWordsworth » Tue Dec 24, 2013 2:55 pm

Hi Eleven Warrior. It looks like I've not added the framework integration correctly. I hope to get a bit of time this afternoon to pop out another build, but not really sure what's going on with Xmas eve so it might not be for a couple of days.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock NoteBook Container

Post by JohnWordsworth » Sun Dec 29, 2013 1:03 am

I've just uploaded version 0.9.1 of the NoteBook Container Mod to the Grimrock Nexus. This version of the mod includes the following changes...
  • Fixed: log_framework integration so that it should now automatically integrate in a dungeon with the log_framework installed.
  • Change: If you are using the log_framework you should now use the init_framework.lua start script instead of init_standard.lua
  • Fixed: One pixel gap between column 2 and 3 of spell runes for a spell scroll.
  • Change: Recreated spell rune files to ensure that they load correctly on OSX / Linux.
  • Change: Added SFX from freesound.org - Many thanks!
I still need to change the texture on the book model itself, and while I have been offered a cool skin (thank you Diarmuid) - I think I would love to make a skin for the 3D model which looks just like the GUI image (with a brown cover and silver metal corners), so I'm going to hold off on changing it for a little while.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
LocalFire
Posts: 261
Joined: Thu Feb 21, 2013 1:16 am
Location: Auckland, New Zealand

Re: [WIP] Grimrock NoteBook Container

Post by LocalFire » Sun Mar 30, 2014 4:58 am

Hi I'm having the same problem as above getting the same error

Code: Select all

#nb_main_script:365: attempt to index local 'g' (a nil value)
stack traceback:
	#nb_main_script:365: in function 'setCurrentSkinFromBook'
	#nb_main_script:667: in function 'drawNoteBook'
	#nb_main_script:238: in function 'onDrawGui'
	mod_assets/scripts/init.lua:84: in function 'onDrawGui'
	[string "Party.lua"]: in main chunk
	[string "Map.lua"]: in function 'sendMessage'
	[string "GameMode.lua"]: in function 'update'
	[string "Grimrock.lua"]: in function 'display'
	[string "Grimrock.lua"]: in main chunk
the difference is I don't have the LoG framework in my dungeon, and as above the quickbar has vanished as well, I have the latest version too
My Dungeons
Paths of the Earth: viewtopic.php?f=14&t=5136
Beneath the Sands: viewtopic.php?f=14&t=5216
Videos: viewtopic.php?f=11&t=5443

User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock NoteBook Container

Post by JohnWordsworth » Sun Mar 30, 2014 5:29 am

@LocalFire: If you don't have the Framework installed then you will need to install the notebook into your party's cloneObject definition yourself. It looks like you are calling the script, but you are not passing it the correct value from your onDrawGui hook. The problem is that cloneObject will redefine any functions you add, overwriting other functions you may have added in previous cloneObject calls.

You're probably best off not using one of the pre-defined install scripts (one of them works out of the box with the framework, the other works out of the box if you don't have any other party hooks). To integrate the NoteBook where you have other party hooks defined, you will need to first import the items and sounds using the following two lines of code in one of your init scripts...

Code: Select all

import "mod_assets/notebook/scripts/items.lua"
import "mod_assets/notebook/scripts/sounds.lua"
Then, where you have your cloneObject for your party, add the following lines of code to your onDrawGui = function(g) code. Note that it's important that the (g) being passed to the notebook script has the same name as the (g) in your function. So, if you have onDrawGui = function(somethingElse) then you need to change the line to nb_main_script:onDrawGui(somethingElse);

Code: Select all

-- Start NoteBook Mod Hook
if ( nb_main_script ~= nil and nb_main_script.onDrawGui ~= nil ) then
	nb_main_script:onDrawGui(g);
end
-- End NoteBook Mod Hook
Now, if you also want to disable moving, turning and resting, add the following code to those functions...

Code: Select all

-- Start NoteBook Mod Hook
if ( nb_main_script ~= nil and nb_main_script.isNoteBookShowing() ) then
	return false;
end
-- End NoteBook Mod Hook
Hope this makes sense! It's pretty simple in essence, but messy to explain.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
LocalFire
Posts: 261
Joined: Thu Feb 21, 2013 1:16 am
Location: Auckland, New Zealand

Re: [WIP] Grimrock NoteBook Container

Post by LocalFire » Sun Mar 30, 2014 9:57 am

Wonderful thats fixed it thanks :D
My Dungeons
Paths of the Earth: viewtopic.php?f=14&t=5136
Beneath the Sands: viewtopic.php?f=14&t=5216
Videos: viewtopic.php?f=11&t=5443

User avatar
SpiderFighter
Posts: 789
Joined: Thu Apr 12, 2012 4:15 pm

Re: [WIP] Grimrock NoteBook Container

Post by SpiderFighter » Wed Apr 16, 2014 4:17 pm

Feeling kinda stupid here. In-game I can drop the notebooks and pick them up without any problems (no crashing); I simply can't open them to use them. Any ideas?

Thanks for this and the quickbar, JW! They really add a lot of spice to the game. :)

EDIT to add: It might be for the same reason I can't get the quickbar to show up either, even though it's not crashing. Very odd. AT one point I was using the Framework, but I thought I had gotten rid of all traces of it. Perhaps not.

Post Reply