Difference between revisions of "HowTo:Add Conversations"
(→ADDING CONVERSATIONS) |
(→ADDING CONVERSATIONS: Added notes about speech variations) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{NAV_Manual | | {{NAV_Manual | | ||
− | | previous= | + | | previous=[[HowTo:Add_Descriptions|Add Descriptions]] |
− | | up=[[ | + | | up=[[HowTos]] |
− | | next=[[HowTo: | + | | next=[[HowTo:Edit faction relationships|Edit relationships]] |
}} | }} | ||
---- | ---- | ||
Line 8: | Line 8: | ||
{{attention}} | {{attention}} | ||
− | Conversation files are found in your communications directory. In a perfect world, there would be one xml file named for each major faction. But there isn't, so the conversation is taken from the neutral.xml file if the factionname.xml file is not found. | + | Conversation files are found in your communications directory. In a perfect world, there would be one xml file named for each major faction. But there isn't, so the conversation is taken from the <code>[http://vegastrike.svn.sourceforge.net/viewvc/vegastrike/trunk/data/communications/neutral.xml?content-type=text%2Fplain neutral.xml]</code> file if the <code><factionname>.xml</code> file is not found. |
A quick sample file; | A quick sample file; | ||
− | * [[HowTo: | + | * [[HowTo:Add Conversations:Xml|communications/neutral.xml]] |
− | The file begins and ends with '''<comm>''' and '''</comm>''' | + | The file begins and ends with <code>'''<comm>'''</code> and <code>'''</comm>'''</code> |
− | From then on are | + | From then on are <code><node></code>'s and <code><edge></code>'s. |
− | + | Nodes have two attributes: <code>text</code> and <code>relationship</code>. <code>relationship</code> is the amount that your friendliness with the other person/alien that you are talking to increases or decreases. Text is what you say. Inside the <code><node></code>'s are <code><edge></code> tags. They have an index attribute which gives an index to the other nodes that the conversation goes to. Nodes may also have a <code><sound></code> tag which gives a file for the sound filename and a <code>sex</code> attribute for the type of picture. | |
+ | Notice all of the comments in the file. There is one starting node where conversations begin. Then the starting node has edges which go the starting points, and the one closest to the current relationship is started at. The starting points go to Other Nodes, which can reference Starting Points or other Other Nodes., but the starting node is never actually used in a conversation. There is another set of nodes which must be at the end. They are built-in, so will always be the same, but you may want to change what they say when one, for example wants to request clearance. You may also want to change where they point to. | ||
+ | |||
+ | ===Adding multiple variations to a node=== | ||
+ | |||
+ | Besides the standard <code>text</code> and <code>sound</code>, you can specify alternative texts and sounds. To do so, you'd add <code>text<n></code> attributes, where <code><n></code> takes increasing numbers, starting from <code>1</code>. The bare <code>text</code> attribute is the zeroth variation, <code>text1</code> is number 1, etc... | ||
+ | |||
+ | Then, inside the node, you specify multiple <code>sound</code> entries, in the order specified for text. So the first <code>sound</code> entry goes to the zeroth variation, the second to the first variation, and so on. | ||
==How does it work?== | ==How does it work?== | ||
Line 25: | Line 32: | ||
You are PERSON A (aera), who meets PERSON B (confed), the computer. B is a carrier. A targets B and, since you hate aera, you start with three choices on your comm screen: | You are PERSON A (aera), who meets PERSON B (confed), the computer. B is a carrier. A targets B and, since you hate aera, you start with three choices on your comm screen: | ||
+ | <pre> | ||
1) I hate you! <Node 5> | 1) I hate you! <Node 5> | ||
2) Prepare to die! <Node 6> | 2) Prepare to die! <Node 6> | ||
Line 62: | Line 70: | ||
1) I'm going to kill everyone you know, you traitor! <Node 3> | 1) I'm going to kill everyone you know, you traitor! <Node 3> | ||
2) Prepare to die! <Node 6> | 2) Prepare to die! <Node 6> | ||
+ | </pre> | ||
==Summary== | ==Summary== | ||
Line 67: | Line 76: | ||
* Use the same amount of choices in each faction conversation tree. | * Use the same amount of choices in each faction conversation tree. | ||
− | * Use the same node numbers for each XML file so they make sense (Don't make node 5 in confed.xml say, "I love you," and node 5 in neutral say, "I'm going to kill everyone you know, you traitor!" | + | * Use the same node numbers for each XML file so they make sense (Don't make node 5 in <code>confed.xml</code> say, "I love you," and node 5 in neutral say, "I'm going to kill everyone you know, you traitor!" |
* Make the better choices first and worse choices last (this makes it easier for people to quickly decide what to say. | * Make the better choices first and worse choices last (this makes it easier for people to quickly decide what to say. | ||
* Don't make more than 9 edges for a node, or else one may run out of keys on his/her keyboard, which is not good. | * Don't make more than 9 edges for a node, or else one may run out of keys on his/her keyboard, which is not good. | ||
Line 74: | Line 83: | ||
=See also= | =See also= | ||
+ | * [[Development:Quests & Campaigns]] | ||
+ | |||
---- | ---- | ||
{{NAV_Manual | | {{NAV_Manual | | ||
− | | previous= | + | | previous=[[HowTo:Add_Descriptions|Add Descriptions]] |
− | | up=[[ | + | | up=[[HowTos]] |
− | | next=[[HowTo: | + | | next=[[HowTo:Edit faction relationships|Edit relationships]] |
}} | }} | ||
− | [[Category: | + | [[Category:HowTos|Add Conversations]] |
[[Category:Development|Add Conversations]] | [[Category:Development|Add Conversations]] |
Latest revision as of 21:55, 13 October 2012
Add Descriptions | HowTos | Edit relationships |
Contents
ADDING CONVERSATIONS
Conversation files are found in your communications directory. In a perfect world, there would be one xml file named for each major faction. But there isn't, so the conversation is taken from the neutral.xml
file if the <factionname>.xml
file is not found.
A quick sample file;
The file begins and ends with <comm>
and </comm>
From then on are <node>
's and <edge>
's.
Nodes have two attributes: text
and relationship
. relationship
is the amount that your friendliness with the other person/alien that you are talking to increases or decreases. Text is what you say. Inside the <node>
's are <edge>
tags. They have an index attribute which gives an index to the other nodes that the conversation goes to. Nodes may also have a <sound>
tag which gives a file for the sound filename and a sex
attribute for the type of picture.
Notice all of the comments in the file. There is one starting node where conversations begin. Then the starting node has edges which go the starting points, and the one closest to the current relationship is started at. The starting points go to Other Nodes, which can reference Starting Points or other Other Nodes., but the starting node is never actually used in a conversation. There is another set of nodes which must be at the end. They are built-in, so will always be the same, but you may want to change what they say when one, for example wants to request clearance. You may also want to change where they point to.
Adding multiple variations to a node
Besides the standard text
and sound
, you can specify alternative texts and sounds. To do so, you'd add text<n>
attributes, where <n>
takes increasing numbers, starting from 1
. The bare text
attribute is the zeroth variation, text1
is number 1, etc...
Then, inside the node, you specify multiple sound
entries, in the order specified for text. So the first sound
entry goes to the zeroth variation, the second to the first variation, and so on.
How does it work?
I'll go through a sample conversation to show how this works.
You are PERSON A (aera), who meets PERSON B (confed), the computer. B is a carrier. A targets B and, since you hate aera, you start with three choices on your comm screen:
1) I hate you! <Node 5> 2) Prepare to die! <Node 6> PRESS 1 The relationship lowers .5 points. B gets now two choices: 1) All systems are nominal. <Node 1> 2) I'm going to kill everyone you know, you traitor! <Node 3> CHOOSE 1 Relationship does not change. A sees two choices on his screen: 1) It is a good day indeed for such heros to meet one another in space. <Node 2> 2) I'm going to kill everyone you know, you traitor! <Node 3> PRESS 2 Relationship lowers .2 points. B now has two choices (do they look familiar?): 1) I hate you! <Node 5> 2) Prepare to die! <Node 6> CHOOSE 2 Relationship lowers 1 point. A sees two choices: 1) I'm going to kill everyone you know, you traitor! <Node 3> 2) All systems are nominal. <Node 1> press 0 to request clearence B declines and says "You are not authorized to land here!" <Node 10> Now A has two more choices. 1) I'm going to kill everyone you know, you traitor! <Node 3> 2) Prepare to die! <Node 6>
Summary
I hope that you now see how the conversations works. Please edit this wiki page to make the stuff clearer because it isn't actually very descriptive. Here are a few rules to go by:
- Use the same amount of choices in each faction conversation tree.
- Use the same node numbers for each XML file so they make sense (Don't make node 5 in
confed.xml
say, "I love you," and node 5 in neutral say, "I'm going to kill everyone you know, you traitor!" - Make the better choices first and worse choices last (this makes it easier for people to quickly decide what to say.
- Don't make more than 9 edges for a node, or else one may run out of keys on his/her keyboard, which is not good.
- Never reference the starting node (node 0).
- Do not make single choices have large effect on the other person (for example having a relationship of -1 so that a friendly guy terns into an angry guy. by saying one wrong thing of pressing the wrong key.
See also
Add Descriptions | HowTos | Edit relationships |