GUI Party Dialogue Journal

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: GUI Party Dialogue Journal

Post by msyblade »

Edit: I reread the post and saw where you get the error. Im headed to work, and will check it out this evening for you. For nor, i can only suggest to double check the spelling/syntax on the SE's you placed to make sure they are exactly correct. And place the onDraw hook at the END of the init. If those are both okay, let me know and ill be around in 7 or 8 hrs and run through it with you :) I may need to put the script in a sample dungeon.dat file, so it can be copy/pasted from there, in case taking it from wordpad is causing any syntax malfunctions during transposition. A new, niftier version will be released in the next couple of days, and in that version, i will put the script in a dungeon.dat SE. You are getting the error when another script adds a line to the journal, yes?
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: GUI Party Dialogue Journal

Post by msyblade »

Also be sure that any line you try to add to the journal has quotations " 's before and after, like a hudprint. It needs to create a string out of it.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Ryeath_Greystalk
Posts: 366
Joined: Tue Jan 15, 2013 3:26 am
Location: Oregon

Re: GUI Party Dialogue Journal

Post by Ryeath_Greystalk »

msyblade wrote:Also be sure that any line you try to add to the journal has quotations " 's before and after, like a hudprint. It needs to create a string out of it.
I have my line

Code: Select all

elseif count == 0 then
		dungeon_door_wooden_11:open()
		mdConversationList:addItem("The party found themselves in Steeprock Old Towne.")
	end
I have my init.lua

Code: Select all

-- This file has been generated by Dungeon Editor 1.3.6

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

-- import custom assets
import "mod_assets/scripts/items.lua"
import "mod_assets/scripts/monsters.lua"
import "mod_assets/scripts/objects.lua"
import "mod_assets/scripts/wall_sets.lua"
import "mod_assets/scripts/recipes.lua"
import "mod_assets/scripts/spells.lua"
import "mod_assets/scripts/materials.lua"
import "mod_assets/scripts/sounds.lua"
import "mod_assets/plugins/slugomorg/slugomorg.lua" -- custom monster Slugomorg created by Leki
import "mod_assets/plugins/skeleton_warrior_sword/skeleton_warrior_sword.lua" -- custom monster Skeleton Warrior - Sword created by Leki
import "mod_assets/plugins/ghoul/ghoul.lua" -- custom monster Ghoul created by Leki
import "mod_assets/log_desk/log_desk.lua"
import "mod_assets/grim_bed/grim_bed.lua"
import "mod_assets/cultist/scripts/monsters.lua"
import "mod_assets/cultist/scripts/materials.lua"

cloneObject{
	name = "party",
	baseObject = "party",
	onDrawGui = function(ctx)
		mdConversationList.onDraw(ctx)
		end,
	onDie = function(deadPlayer)
		knocked_out_script.knockedOut()
		end,	
}
Only thing I did here was copy my onDie hook and added a comma at the end of your onDraw hook

I have a script entity named mdConversationList

The error has to do with concatenation a table value.
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: GUI Party Dialogue Journal

Post by msyblade »

You are using it correctly, the scripts are fine :) Try placing the onDraw hook very last in the init, I had to place it after an onMove hook i use, it would not work when placed before. (And it broke the onMove). If you still get the error, a newer version will be released in the next couple of days, and it will have extended features. You are using it correctly, so at worst, remove it and install the new version. I am interested to see how you end up using it!
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Ryeath_Greystalk
Posts: 366
Joined: Tue Jan 15, 2013 3:26 am
Location: Oregon

Re: GUI Party Dialogue Journal

Post by Ryeath_Greystalk »

Moving it to the end did not change anything, still get same error.
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: GUI Party Dialogue Journal

Post by Xanathar »

You should use a dot before addItem, not a : sign of which I don't remember the name :)

sent from phone - I'll expand later
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: GUI Party Dialogue Journal

Post by msyblade »

Or, it's that. :roll:
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Ryeath_Greystalk
Posts: 366
Joined: Tue Jan 15, 2013 3:26 am
Location: Oregon

Re: GUI Party Dialogue Journal

Post by Ryeath_Greystalk »

Thanks Xanathar.

Working now.

Image
User avatar
Mal85
Posts: 103
Joined: Fri Nov 16, 2012 10:56 am

Re: GUI Party Dialogue Journal

Post by Mal85 »

This looks pretty cool, I'll have to give it a try. Thanks!
Ryeath_Greystalk
Posts: 366
Joined: Tue Jan 15, 2013 3:26 am
Location: Oregon

Re: GUI Party Dialogue Journal

Post by Ryeath_Greystalk »

Just a little thing I came up with (took 2 hours to get it right, pathetic I know).

Place a script entity in your mod and name it time_played_conversion
put the following code in,

Code: Select all

-- convert seconds to hour minute format

function timeConversion()

	local time_played = getStatistic("play_time")
	local hours = 0
	local minutes = 0
	local seconds = 0
	
	hours = math.floor(time_played / 3600)
	minutes = math.floor((time_played - (hours * 3600))/60)
	seconds = math.floor(time_played - (hours * 3600) - (minutes * 60))
	
	local total_time = ("Journal time: "..hours.." Hours, "..minutes.." Minutes, "..seconds.." Seconds.")
	
	 return total_time
end
and substitute the line
mdConversationList.addItem(getStatistic("play_time"))

with these two lines

Code: Select all

local total_time = time_played_conversion.timeConversion(total_time)
mdConversationList.addItem(""..total_time)
and you no longer get a big huge number of seconds, but an hour / minute display.

Image
Post Reply