Jump to content

Writing dialog to code


EiriktheScald

Recommended Posts

I know a lot of you are writing your dialog directly in code. I've tried it, but I find that my mind goes off on tangents. I start thinking of all the possible conversation avenues, and I usually loose focus on the one line I was writing. It really gets convoluted. The result: About 5 mintues worth of dialog taking an hour (or more, if my brain is really imaginative) to code. Is this normal? Or, have you found ways to write more efficiently?

Link to comment

I get it all planned out ahead of time. I'll start with a single state with a series of PC responses, then follow it up with a number of empty states. If I want to throw NPC interjections in, I'll change to CHAIN on the fly. That way, I won't have to fuss with the actual coding all that much when my brain is working.

 

Example

 

IF ~Global("B!GavPC1","GLOBAL",1)~ THEN BGavPC1

SAY ~Can I speak with you?~

++ ~What is it this time?~ + BGavPC1.1

++ ~Can it wait?~ + BGavPC1.2

++ ~Sure.~ + BGavPC1.3

++ ~You talk too much. Get back in line.~ + BGavPC1.4

 

IF ~~ THEN BGavPC1.1

SAY ~~

IF ~~ THEN EXIT

END

 

IF ~~ THEN BGavPC1.2

SAY ~~

IF ~~ THEN EXIT

END

 

IF ~~ THEN BGavPC1.3

SAY ~~

IF ~~ THEN EXIT

END

 

IF ~~ THEN BGavPC1.4

SAY ~~

IF ~~ THEN EXIT

END

 

IF ~~ THEN BGavPC1.5

SAY ~~

IF ~~ THEN EXIT

END

 

IF ~~ THEN BGavPC1.6

SAY ~~

IF ~~ THEN EXIT

END

 

IF ~~ THEN BGavPC1.7

SAY ~~

IF ~~ THEN EXIT

END

 

IF ~~ THEN BGavPC1.8

SAY ~~

IF ~~ THEN EXIT

END

 

IF ~~ THEN BGavPC1.9

SAY ~~

IF ~~ THEN EXIT

END

 

//ETC.

 

Then, I go back and fill in the blanks. When the states have nothing in them, it's mostly just cutting and pasting when it isn't actually writing out the dialogue. If I need to change a state to a CHAIN, I'll just have to be sure to stick an END above it and an APPEND below it, and I'm more or less set.

 

The part that bites me sometimes is that I need to delete that IF ~~ THEN EXIT if the state has PC replies, or there will be a NVROL in-game.

Link to comment

I'm not a writer, Eirik, but I would still suggest that you write as if you were creating one of those books where at the end of a page, the reader gets to choose which way the story goes based on the reader's response.

 

Then after you have the story, grab some of us to help code it.

 

I have admiration for the ladies here, who can do everything, but since the story is the important thing and the code a very minor supporting role, [ok, important, but not the point] where the story gets woven into the game, you could just write like a fiend and then worry about code later.

 

What did they call those things? "Flip books?" Choose-Your-Own-Adventure?

Link to comment

I can't write not in code, because I would continously lose myself in the half-forgotten dialogues when I start to code. So what I do, and I am sure it drives anyone who reads my d's insane, is code 'backward', ie I start with the first block, omitting any conditions/variables:

 

SAY ~Blah-blah~

++ ~Reply 1.~ + 1

++ ~Reply 2.~ + 2

++ ~Reply N.~ + N

END

 

Then I do block 1, but instead of placing block 2 underneat it, like Berelinde I put it before, ie:

 

IF ~~ N

Block N

 

IF ~~ 2

BLOCK 2

 

IF ~~ 1

BLOCK1

 

I find that this allows me to always see how the dialogue started and track the flow.

 

If I thougt of a particulary good reply, I'll type it with a tag, and it will stay on top till I worked my way towards it and can develop it.

 

I also do have a break down of the talks, and often have the beginning and the outcome in mind to start with and try to direct the dialogue to the main conversational nodes allowing the tangents once in a while, and trying to have each dialogue to come in under 30 states, because I find that a larger dialogue too difficult to handle and it takes too long in the game for the player to go through it.

 

I normally aim for a dialogue where PC and NPC will have 3 to 5 there and back remarks.

 

If an interesting topic starts cropping up, deserving a bigger dialogue, I mercilessly pluck it out and make it into a new dialogue.

 

And, to be honest, I found that the more I write, the easier it becomes.

 

With Electron, now, I was really, really lost for the very first dialogue until my brain 'switched' from the flat D form to the true tree. There, I still have to fight the temptation to run into the long, long, long branch, forgetting that I left other replies behind on every nod that are yet to be developped ;)

Link to comment
Then after you have the story, grab some of us to help code it.

Heh, that's too easy (for me anyway)! ;) Seriously, I was curious what others do ahead of time before actually writing code? berelinde, you mentioned getting it planned out ahead of time; I assume what followed, described your planning? I do it similarly, but I loose my train of thought and have to get my bearings straight again. Especially with a lot of empty blocks; mentally, I want to go fill them up; which is distracting -- must be the way I'm wired. Thus, I spend considerable time reading through all the code over and over again; but that's just me.

 

And with a little (actually a lot) of help ;) The story has made wonderful progress this week. I feel a lot better about it.

 

Domi's method might actually avert my tendency to "fill the empty buckets."

Link to comment

By "all planned out," I mean that I have an outline for the talk. I will plan how the talk will start, plan where it will go, and plan if there are any milestone issues raised.

 

For example, in one of Gavin's chapter talks, he starts out by lamenting the poverty, grief and violence he sees around him, but depending on how the PC plays it, he will probably, but not definitely, wind up talking about the desperate acts provoked by poverty. Or maybe the PC will tick him off. That is as far as my planning will go. The talk can take unexpected directions from there.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...