ID:1538201
 
(See the best response by Pirion.)
So i spent some time messing with the interface and getting familiar with stuff from resources and tutorials but a friend said that I was wasting my time doing this on the interface and that its better to do simple dialogue boxes as screen objects?

Is this true?

If so where do I begin?

Is it just like a hud, and i make the icons out?

If so do I tie it to an alert or something, how would i go about NPC or event initiated dialogue through screen objects?

Where do i start?

Best response
It would be just like a HUD. You work with icons on the client screen.

There are strengths and weaknesses with each approach. Interface handles a lot of graphics and styling. A HUD based approach can be more flexible in graphics especially with the animate() function now.

Yeah i'm just looking for something simple, not trying to get all detailed with my dialogue, just simple stuff.

So i guess icons on screen would be better?
//Simple objects and their screen placement.
obj
screenItems
layer=MOB_LAYER+10
invisibility=3
border
icon='screenIcons.dmi'
icon_state="border"
screen_loc="1,4 to 17,4"
background
icon='paper.png'
screen_loc="4,1"
placeHolder
screen_loc="4:6,1"
maptext_width=442//width of dialog in pixels
maptext_height=96//height of dialog box in pixels
border2
layer=MOB_LAYER+10.1
icon='screenIcons.dmi'
icon_state="border2"
screen_loc="4,1 to 4,3"
pictureFrame
icon='blank.png'
screen_loc="1,1"
pressSpace
name="Press Space to Continue...."
icon='PressSpace.png'
screen_loc="8,4"
Click()
if(istype(usr,/mob/Attackable/Player/))
var/mob/Attackable/Player/M=usr
M.SPACE()//Set skip command to activate whenever an obj/screenItems/ is clicked.

mob
Attackable
Player
var
obj/screenItems/pictureFrame//Place holder for face icons in dialog system
obj/screenItems/placeHolder//Place holder for text output in dialog system
waitingSpace=null//Variable used to make a generic alert() system. Allowing to delay script until waitingSpace is null.

Login()
setScreen()
..()

verb
SPACE()//This command is used to skip instantly display dialog and to continue to next/end dialog. Should be set to a macro.
set hidden = 1
waitingSpace=null

DisplayTest()//Verb used to test the dialog system, and shows how the generic triggers work.
displayScreen(1)
displayText('FaceIcon.bmp',"Hel<speed t=3>lo there! Ho<speed t=10>w are <i>you</i> doing today? And <pause t=1>I<pause t=1> Like <pause t=7>y<pause t=8>o<pause t=10>u","I must say.....","I like the way you think!")
displayScreen(0)

DisplayTest2()
displayScreen(1)//Show the dialog elements
displayText('FaceIcons/Face1',"This is test number one.","This is test number two.")
displayText('FaceIcons/Face',"This is text number three.")
displayScreen(0)

proc
setScreen()//Set's two variables and adds elements to screen.
if(client)
placeHolder=new/obj/screenItems/placeHolder
pictureFrame=new/obj/screenItems/pictureFrame
client.screen+=list(new/obj/screenItems/background,new/obj/screenItems/border,new/obj/screenItems/border2,new/obj/screenItems/pressSpace,placeHolder,pictureFrame)

displayText(icon/i)
var/list/L=list()+args//Uses args to allow mulitple monolog with the same picutre
if(istext(i))
L.Insert(1,i)
i='FaceIcons/blank.png'
if(isobj(pictureFrame))
pictureFrame.icon=i
if(isobj(placeHolder))
for(var/argn=2 to L.len)
waitingSpace=1
var/msg=L[argn]
var/buff=0
var/l=length(msg)
var/noMore=FALSE
var/speed=1
for(var/v=1 to l)
var/n=v+buff
if(n>l)
break
if(noMore==FALSE&&findtext(msg,"<",n-1,n))//Skips HTML tags
var/newSpot=findtext(msg,">",n)
if(newSpot)
var/foundPause=findtext(msg,"<pause",n-1,n+5)//Scans for a pause tag. A generic tag used to pause dialog.
var/foundSpeed=findtext(msg,"<speed",n-1,n+5)//Scans for a speed altering tag. A generic tag used to change the speed the dialog is created.
if(foundPause||foundSpeed)
var/tspot=findtext(msg,"t=",n-1,newSpot)
if(tspot)
var/pause=text2num(copytext(msg,tspot+2,newSpot))
if(foundPause)
sleep(pause)
if(foundSpeed)
speed=pause
newSpot++
var/nBuff=newSpot-n
buff+=nBuff
continue
else
noMore=TRUE
if(findtext(msg," ",n-1,n))//Skip spaces
continue
var/t=copytext(msg,1,n)
if(!waitingSpace)//If space was pressed, displayes message without delay
waitingSpace=1
break
placeHolder.maptext="<font align=top face='Times New Roman'>[t]</font>"//You could simply use this, instead of the complicated for(var/v=1 to l)
sleep(speed)
placeHolder.maptext="<font align=top face='Times New Roman'>[msg]</font>"
while(waitingSpace)//Wait for space before message ends
sleep(1)

displayScreen(inv)//Triggers invisiblity of dialog.
if(inv==0)
inv=4
else
inv=0
for(var/obj/screenItems/o in client.screen)
set background = 1
o.invisibility=inv


The above is an overly complicated dialog system I made awhile back. Despite it being overly complicated, it does use some good methods (such as assigning objects to be placeHolders for text output, and a pictureFrame for face icons during the dialog).

Explaining how to create a dialog system is just rather bothersome because of the detail that would require. So, I hope a working reference will be just as good.
Well thanks i guess? lol.

Its far more complicated than I wanted, but its fairly appreciated.