Difference between revisions of "HowTo:Edit Communications"
(Created page with "In-game communications (unit-to-unit chat) are implemented as conversation finite state machine - each state has a set of possible nodes, each node has a text and deltaRelation v...") |
m |
||
Line 123: | Line 123: | ||
| 0 | | 0 | ||
| | | | ||
− | | Value is set to -.125 or so. | + | | Value is set to -.125 or so. Both "close and engage!" part and relations are hardcoded anyway, though. |
+ | See also variables - [[Manual:Config:Advanced:Variables#contraband|AI/ContrabandMadness]], etc. | ||
|- | |- | ||
| N-6 | | N-6 | ||
Line 171: | Line 172: | ||
** <code>relationship</code> [float] [0.0] - relationship adjustment. | ** <code>relationship</code> [float] [0.0] - relationship adjustment. | ||
*** (see above) | *** (see above) | ||
− | ** <code><'''edge'''> ... </ | + | ** <code><'''edge'''> ... </edge></code> -- connection to other nodes. Typically, there are 3 (good-neutral-bad) entries at the top level. |
*** <code>index</code> [int] - linked node's number. | *** <code>index</code> [int] - linked node's number. | ||
− | ** <code><'''sound'''> ... </ | + | ** <code><'''sound'''> ... </sound></code> -- voice. Sound nodes corresponding to '''text''', '''text1''', etc are simply added in this order |
− | *** <code>file</code> [string] [""] - OGG file name, relative to '''data''' ("communications/sounds/lihw/lihw_good-day.ogg") | + | *** <code>file</code> [string] [""] - OGG file name, relative to '''data/''' ("communications/sounds/lihw/lihw_good-day.ogg") |
*** <code>gain</code> [float] [1.0] - relative volume. | *** <code>gain</code> [float] [1.0] - relative volume. | ||
*** <code>sex</code> [unsigned small int] [0] - {{FIXME}} Support for variant sounds, doesn't seem to be used yet. | *** <code>sex</code> [unsigned small int] [0] - {{FIXME}} Support for variant sounds, doesn't seem to be used yet. |
Revision as of 06:31, 3 March 2014
In-game communications (unit-to-unit chat) are implemented as conversation finite state machine - each state has a set of possible nodes, each node has a text and deltaRelation value. They are defined by XML files in data/communications.
Nodes: default positions and values
Their default positions and purpose we can see in the function creating the default set and following ones. It have only basic text and relationship adjustment values:
# | Node text | Value | Hardcoded | Comment |
0 | "welcome to cachunkcachunk.com" | 0 | (starting node: Don't link here) | Its edges list starting nodes (depending on relations). |
1 | "I love you!" | +.1 | ||
2 | "J00 0wnz m3" | +.08 | ||
3 | "You are cool!" | +.06 | ||
4 | "You are nice!" | +.05 | ||
5 | "Ya you're naled! NALED PAL!" | -.02 | ||
6 | "i 0wnz j00" | -.08 | ||
7 | "I hate you!" | -.1 | ||
... | Built-ins: | |||
N-16 | "Docking operation complete" | 0 | Dock/undock. | usually set to 0.01 or so: you do business with them, they like you. |
N-15 | "Please move into a green docking box and press d." | 0 | ||
N-14 | "Docking operation begun." | 0 | ||
N-13 | "Clearance denied." | 0 | ||
N-12 | "Clearance granted." | 0 | ||
N-11 | "No." | 0 | ||
N-10 | "Yes." | 0 | ||
N-9 | "Prepare To Be Searched. Maintain Speed and Course." | 0 | ||
N-8 | "No contraband detected: You may proceed." | 0 | ||
N-7 | "Contraband detected! All units close and engage!" | 0 | Value is set to -.125 or so. Both "close and engage!" part and relations are hardcoded anyway, though.
See also variables - AI/ContrabandMadness, etc. | |
N-6 | "Your Course is deviating! Maintain Course!" | 0 | ||
N-5 | "Request Clearance To Land." | 0 | ||
N-4 | 0 | (killed) | ||
N-3 | 0 | (dealt damage) | ||
N-2 | 0 | (got damaged) | ||
N-1 | "*hit*" | -.2 | (got hit) | Not a communication, just reaction on damage. Still supports friendly/neutral/hostile edges. |
XML schema description
-
<comm> ... </comm>
-- Marks the beginning and end of the XML file. -
<node> ... </node>
-- basic data.-
text
[string] [""] - What they say.- (see above)
-
text1
, etc [string] [""] - Variant text (to be chosen randomly). -
relationship
[float] [0.0] - relationship adjustment.- (see above)
-
<edge> ... </edge>
-- connection to other nodes. Typically, there are 3 (good-neutral-bad) entries at the top level.-
index
[int] - linked node's number.
-
-
<sound> ... </sound>
-- voice. Sound nodes corresponding to text, text1, etc are simply added in this order-
file
[string] [""] - OGG file name, relative to data/ ("communications/sounds/lihw/lihw_good-day.ogg") -
gain
[float] [1.0] - relative volume. -
sex
[unsigned small int] [0] - FIXME Support for variant sounds, doesn't seem to be used yet.
-
-