dialogs in S3?


  • Please log in to reply
25 replies to this topic

#21 vs322

vs322

    modder

  • Retired Staff
  • PipPipPip
  • 72 posts
  • Location:New York

Posted 25 May 2005 - 02:52 AM

Yea, It's really the more RPG elements that I want to work with- I've been making my maps and just doing the scripting to allow for choices(made by dialogs), but have no way for the user to actually make those sort of decisions.
I also just like being able to tell a story in a way other then hints or journal entries, you know?
You say that you have seen hammer + sickle screens with branching dialog? Perhaps it would be worth tracking Novic(sp) down... I think that the ss engine has so much possibility and that I can almost get what I want out of it... this is like the last thing I need to figure out to do all the stuff that I want with it.
-vs

#22 KoMik

KoMik

    Lieutenant

  • Members
  • PipPipPipPip
  • 295 posts
  • Location:Finland

Posted 25 May 2005 - 05:06 AM

I do now have 25 scripted 'ready' missions and about 20 waiting to be scripted so I still have lots of 'basic scripting' work to do. My missions usually starts with little 'movie'(camera moves and animations) and then comes texts(ShowObjectives) where players can read main goals. It is just eneugh mission-story telling for me. I have also used hints as dialogs and yes-no-dialogs as some kind of non-linearity bringers... Do you want to have fun? YES or NO? (...why I should even ask... dialogs like that are for braindeads or something :) )

One thing what I like in SS-modding is the fact that after proper dialogs knowhow I could update my old missions to be more non-linear and make whole new events/ways to complete objectives WITHOUT making new maps (which is nice and 'funny' work but takes lots of time too). Interactivity with npcs is always welcome to game worlds... it make those more lively.

I can't do my gampaing too non-linear because my mod is going/supposed to be for 'coop'. Playing multiple choices game with friends can/may end up to fistfight... if you know what I mean?

I'm still learning new ways (but all roads still takes me to Rome) of interesting. ;)

#23 vs322

vs322

    modder

  • Retired Staff
  • PipPipPip
  • 72 posts
  • Location:New York

Posted 15 June 2005 - 05:21 PM

Ok- progress:

Messing around with the DialogModeSet  command and have had a breakthrough! I can't believe that I didn't try it earlier. Anyway here is an example of code I mad for a door that requires a number to open it:

( the nums table is just strings like:  <center>#1 ect.
sEnter: Enter first number
sNext: enter next number
sError: ERROR: wrong number
sCorrect: Correct.
sClose: close)

function switch2()
out('2 click')
WaitForUI(DialogModeBegin())
WaitForUI(DialogModeSet(sEnter,5,1,nums[1],nums[2],nums[3],nums[4],nums[5]))
local Code_1=GetLastDialogResult()
WaitForUI(DialogModeSet(sNext,5,1,nums[1],nums[2],nums[3],nums[4],nums[5]))
local Code_2=GetLastDialogResult()
WaitForUI(DialogModeSet(sNext,5,1,nums[1],nums[2],nums[3],nums[4],nums[5]))
local Code_3=GetLastDialogResult()

if Code_1==3 and Code_2==5 and Code_3==1 then
  WaitForUI(DialogModeSet(sCorrect,1,1,sClose))
  switch()
else
  WaitForUI(DialogModeSet(sError,1,1,sClose))
end
WaitForUI(DialogModeEnd())
end

The thing is GetLastDialogResult() gives you the parameter number that was clicked, starting with 1. (you specify the number of choices in the second argument) So I keep Those numbers in the Code_1,2,3 variables then check them against the numbers at the end. This opens up full dialog trees!

Now if only I can figure out what to do with the CUICmdDialogSet error when someone presses Esc during a dialog. Anyone figured that out?
-vs

#24 KoMik

KoMik

    Lieutenant

  • Members
  • PipPipPipPip
  • 295 posts
  • Location:Finland

Posted 17 June 2005 - 01:00 PM

Nice info vs!

I tested it like that and it seems to work pretty well. But there is some things what have to and must not do:
-DialogModeBegin() must not be started in sequence (esc cause crash). So allways EndSequence() before DialogModeBegin. It makes little camera movement but camera can be locked with command CameraLock( true ).
-If you press esc during dialog game count it as DialogResult #0 so don't use command elseif... just else (so pressing esc doesn't cause crash).
-Don't start mission script with command DelayGameStartEx() or game won't count DialogResults (don't know why) so just use DelayGameStart().

That CUICmdDialogSet error is a bad thing... it is unexpected and it means there was no command for #0 DialogResult... so just make:

if fResult == 1 then
    WaitForUI( DialogModeSet( second, 1, 1, choice ) )
    sResult = GetLastDialogResult()
    if sResult == 1 then
        (...and so on to the last dialog...)
    else
        WaitForUI( DialogModeEnd() )
    end
else
    WaitForUI( DialogModeEnd() )
end
script after all that kind of dialogs (even if there is only one result). Keep up :confused: !

#25 vs322

vs322

    modder

  • Retired Staff
  • PipPipPip
  • 72 posts
  • Location:New York

Posted 17 June 2005 - 02:45 PM

That Camera lock trick is a good idea. I had already realized that you can't do dialogs inside of a sequence... so I would have the sequence end-after I had the camera placed perfectly- then jerk away (especially if the camera's focus was not on floor 0)-Thanks!

I'll play around with CUICmdDialogSet being 0.

#26 KoMik

KoMik

    Lieutenant

  • Members
  • PipPipPipPip
  • 295 posts
  • Location:Finland

Posted 21 September 2005 - 04:51 AM

Heypie, (edit: answer lies below)

I got back to this topic because I really would use the knowhow to way to do proper dialogs now.

-How can I use Excel files (xls.) to dialogs... and acks?

Could someone gimme answer please-please ( :D ?). This is nowdays actually for me 'the one and only problem'.

Thanks and take care.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Right away edit:

Sorry guys, about the unnecessary post... BUT I wound the answer from the Nival forum by Novik! What a great fellow he is. :D I pudda link to this topic so I hope someone others get now a sparkle to start making their own prober dialogs too (new SS story mods there, story mods here, would make koMik a happy happy joy joy boy)...

http://forum.nival.c...ead.php?t=28061

Thanks Novik, those files came in big need... I'll sure try and use those. Marvelous! ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users