A Sharp Home Page Products Support News About Us Buy

King of Dragon Pass
This illustrates the Opal Scripting Language used in King of Dragon Pass. Note the use of functions, such as BestRelations and KnownClans. # marks a comment. Conditionals are inside [brackets]. Note the use of attributes, such as y.gender, and symbolic constants like 'male. Attributes with no variable, like .mood, refer to the player clan. text: outputs to the screen; saga: outputs to the saga file (and sagaText: does both).

Text inside angle brackets is replaced by a variable, or if it begins with dn, randomized. <he/she> is replaced depending on the gender of the previous variable.

The code below is only an excerpt of the scene, so as not to give too much away!
scene: scene_52politicaltrouble
scener305, left, never
# trigger: from c++
music: "ItIsBad"
otherclan = BestRelations(KnownClans)
anotherClan = WorstRelations(KnownClans)
c = .chief
y = politician # Put in single-letter variable so we can get attributes
x = y.leadership
[.mood < 0] x += 1
if [y.gender = 'male] {
  g = true
  text: A number of the clan's leading men
  complainer = MaleName
  saga: A delegation of the clan's leading men raised serious complaints
} else {
  text: A number of the clan's leading women
  complainer = FemaleName
  picture: "sceneR304"
  position: right
  saga: A delegation of the clan's leading women raised serious complaints
.mood -= 10
[ProDragonewtCharacter = c] n = true
[AntiAldryamiCharacter = c] a = true
[ProverbialCharacter = c] p = true
[MatriarchalCharacter = c] m = true
[PatriarchalCharacter = c] o = true
[TricksterCharacter = c] t = true
[WeLostOurLastRaid] w = true
[S52Again > 1] {
  text: approach the ring again. Their leader, has another list of complaints. "With <c> still as chief," <complainer> says,
  saga: again about the job <c> was doing as chief.
} else {
  text: approach the ring. Their leader, <complainer>, has a litany of complaints. "Ever since <c> became chief," <complainer> says,
  saga: against the job <c> was doing as chief.
text: "<d3:things have gone from bad to worse/this clan has headed downhill/our reputation has suffered>.
text: Our friends the <otherclan.plural> <d4:ridicule our ancestors/tell jokes about us as part of their holy day ceremonies/compare us unfavorably with their livestock/mock us at every chance they get>.
text: The <anotherclan.plural> send curses that <d3:sour our milk/spoil our butter/rot our meat> and <...>. At home, things are no better.
z = d3 # Some randomization to the complaints (below)
[r] {
  text: <complainer> repeats
  [g] text: his
  [NOT g] text: her
  text: complaints. "With <c> as chief, <d2:this clan is the laughingstock of dragon pass/we are on the road to disaster>.
[z = 3] text: Legal cases start up again a week after <c> makes a judgment.
[m AND g] text: She constantly favors the women.
[o AND NOT g] text: He constantly favors the men.
[n AND (dragonAttitude= 'hostile OR dragonAttitude = 'negative)]
text: <he/she> gives away clan wealth to those fiendish talking lizards.
[n AND dragonAttitude= 'positive] text: Despite <his/her> assurance, <he/she> has done little to help our case with the dragonewts.
[n AND dragonAttitude= 'neutral] text: <he/she> wastes time thinking about talking lizards, instead of clan concerns.
[a] text: <he/she> sends our weaponthanes into the woods on pointless hunts for the plant-folk.
[z = 1] text: <he/she> sings off-key.
[p] text: Half the time when <he/she> says something, nobody can figure out what <he/she> really means.
[rabblerouser] text: <he/she> is a good friend of <rabblerouser>, who is never happy unless she's causing trouble for the clan.
[z = 2] text: The spirits of our ancestors are slow to answer us.
[w] text: <c> is unlucky in battle.
[t] text: Worst of all, <he/she> is a Trickster!
text: It's time we had a new chief."
[i = false] response 1: Dispute their allegations.
  test Leadership(c) vs Savvy x
  win: {
    text: <c> patiently addressed each of their complaints. <He/She> exposed each one as an exaggeration or misunderstanding, until even <complainer> reaffirmed
    [g] text: his
    [g = false] text: her
    text: allegiance to <c> as the clan's chosen leader.
    saga: <c>'s clever oration reaffirmed <his/her> right to rule.
    .mood += 20
  lose: {
    text: <c> started explaining <his/her> decisions, but after <he/she> was drowned out by laughter, and then shouted down, <he/she> fell silent.
    saga: <c> attempted to defend <him/her>self, but the clan would not listen.
    .mood -= 5
    c.leadership -= 0.1
    r = true
    i = true
    goto restart
[Animals >= 3 AND ManyCows] No matter what <complainer> may say, our herds are strong, and that's what's really important. [1]
[Animals >= 3 AND FewCows] I hate to say it, but <complainer> has some good points. [45]
[Leadership >= 3] Somehow, I don't think <complainer> is behind this. [16]
[Leadership >= 4 AND NOT s] <complainer> is acting on behalf of someone. [6]
[Leadership >= 4 AND s] Unfortunately, <politician> does have more of a knack for leadership than does <c>. [123]
[Leadership >= 5 AND NOT s] Someone has assembled a powerful bloc; <complainer> is only the spokesman. [1236]
[Leadership >= 5 AND s] Unfortunately, <politician> does have more of a knack for leadership than does <c>, and will be able to maintain a strong anti-<c> faction if we don't ask <c> to resign. [35]

[ Home | Products | Support | News | About Us | Buy ]

Copyright ©2021 A Sharp, LLC. Last updated 05 Aug 21.