A new problem

Thanatos
13 Oct 2008, 00:32
Whassup. Here is the problem:
' "Baldur's Gate II - Shadows of Amn"
' Created with QDK Pro 4.03

!include <stdverbs.lib>

define game <Baldur's Gate II - Shadows of Amn>
asl-version <400>
gametype singleplayer
start <Character Creation>
game author <Thanatos // Andrew Trewin>
game info <Created with QDK Pro 4.03>
define variable <gender>
type string
value <Unspecified>
display <Gender: !>
end define
define variable <race>
type string
value <Unknown>
display <Race: !>
end define
define variable <class>
type string
value <Unspecified>
display <Class: !>
end define
end define

define options
debug on
panes on
abbreviations on
end define

define room <Character Creation>
indescription <Welcome to:>
script {
msg <Please select your gender.>
choose <genderselect>
wait <Gender selected. Please press any key to move to

the next phase of Character Creation.>
choose <raceselect>
wait <Race selected. Please press any key to move to

the next phase of Character Creation.>
}
end define

define selection <genderselect>
info <Gender Selection>
choice <Male> {
msg <This is an aesthetic choice, and will not affect

your attributes in any fashion. It can, however, affect whether or not

an NPC becomes romantically interested in your character.|n|nMales of

the Realms can excel in whatever profession they choose, whether

wizardry, thievery, or the arts of war.>
set string <gender; Male>
}
choice <Female> {
msg <This is an aesthetic choice, and will not affect

your attributes in any fashion. It can, however, affect whether or not

an NPC becomes romantically interested in your character.|n|nFemales of

the Realms can excel in any area they wish, and are easily the equals

of their male counterparts in every skill or respect.>
set string <gender; Female>
}
end define
define selection <raceselect>
info <Race Selection>
choice <Human> {
msg <The race of your character will determine what

their base abilities can be, as well as assign possible intrinsic

talents such as infravision. Some restrictions in class selection may

also apply, because game balance dictates that certain races are

unsuited for certain professions.|n|nHUMAN: Humans are the predominant

race in Faerun. Humans rule most of the Forgotten Realms. They are the

most social and tolerant of races, exceptting perhaps the halflings.

The only special ability that a human possesses is that they may

advance as any class, and advance to any level.>
set string <race; Human>
}
choice <Elf> {
msg <The race of your character will determine what

their base abilities can be, as well as assign possible intrinsic

talents such as infravision. Some restrictions in class selection may

also apply, because game balance dictates that certain races are

unsuited for certain professions.|n|nELVES: Elves tend to be shorter

and slimmer than normal humans. Their features are finely chiseled and

delicate, and they speak in melodic tones. Elves are looked upon as

frivolous and aloof. They concern themselves with natural beauty,

dancing, frolicking, and other similar pursuits. Their humor is clever,

as are their songs and poetry. Elves have a natural resistance to charm

and sleep magics. They can see in the dark with infravision, and they

are very skilled in the use of the bow and long sword. They have a

bonus to their dexterity, but incur a penalty to their constitution.

There are five racial divisions of elves within the Realms: Gold elves,

Moon elves, Wild elves, Sea elves, and Drow.>
set string <race; Elf>
}
choice <Half-Elf> {
msg <The race of your character will determine what

their base abilities can be, as well as assign possible intrinsic

talents such as infravision. Some restrictions in class selection may

also apply, because game balance dictates that certain races are

unsuited for certain professions.|n|nHALF ELVES: Half elves are a mix

of human and elven blood. They are handsom folk, with good features of

each of their races. A half elf has the curiosity, inventiveness, and

ambition of their human ancestors, and the refined senses, love of

nature, and artistic tastes of their elven ancestors. Half elves have a

limited resistance to charm and sleep spells. They can see in the dark

with infravision.>
set string <race; Half-Elf>
}
choice <Gnome> {
msg <The race of your character will determine what

their base abilities can be, as well as assign possible intrinsic

talents such as infravision. Some restrictions in class selection may

also apply, because game balance dictates that certain races are

unsuited for certain professions.|n|nGNOMES: Kin to dwarves, gnomes are

noticeably smaller than their distant cousins. Gnomes, as they proudly

maintain, are also less rotund as dwarves. Most have dark tan or brown

skin, white hair, and rather large noses. Gnomes have lively and sly

senses of humor, especially for practical jokes. They have a love for

nature that is only matched by their love for gems and jewelry. Gnomes

have natural resistance to magic. They can see in the dark with

infravision. They gain a bonus to their intelligence scores, but incur

a penalty to their wisdom.>
set string <race; Gnome>
}
choice <Halfling> {
msg <The race of your character will determine what

their base abilities can be, as well as assign possible intrinsic

talents such as infravision. Some restrictions in class selection may

also apply, because game balance dictates that certain races are

unsuited for certain professions.|n|nHALFLINGS: Halflings are short,

generally plump people, very much like small humans. Their faces are

round and broad, and often quite florid. Their hair is typocally curly,

and the tops of their feet are covered with coarse hair. Overall they

prefer the comforts of home to dangerous adventuring. They enjoy good

living, rough humor, and homespun tales. Halflings are highly resistant

to poisons and magic. They are naturally skilled with sling weapons,

and have a limited ability to see in the dark. They recieve a bonus to

their dexterity, and incur a penalty to their strength. There are three

racial divisions of halflings within the Realms: the Hairfoot,

Tallfellow, and Stout.>
set string <race; Halfling>
}
choice <Dwarf> {
msg <The race of your character will determine what

their base abilities can be, as well as assign possible intrinsic

talents such as infravision. Some restrictions in class selection may

also apply, because game balance dictates that certain races are

unsuited for certain professions.|n|nDWARVES: Dwarves are short stocky

fellows, easily identifiable by their size and shape. They have ruddy

cheeks, dark eyes, and dark hair. Dwarves tend to be dour and taciturn.

They are given to hard work, and care little for humor. They enjoy

beer, ale, mead, but most of all, they love gold. dwarves have a

natural resistance to magic and poison. They possess infravision, which

allows them to see in the dark. They gain a bonus to constitution, but

incur a penalty to their charisma and dexterity. There are four racial

divisions of dwarves within the Realms: Shield dwarves, Gold dwarves,

Wild dwarves, and Duergar.>
set string <race; Dwarf>
}
choice <Half-Orc> {
msg <The race of your character will determine what

their base abilities can be, as well as assign possible intrinsic

talents such as infravision. Some restrictions in class selection may

also apply, because game balance dictates that certain races are

unsuited for certain professions.|n|nHALF-ORCS: Half-orcs are born from

the union of human and orc parents. They are as tall as humans, but a

little heavier due to their muscular builds. Their greenish

pigmentation, sloping forehead, jutting jaw, prominent teeth, and

coarse body hair make their lineage plain for all to see. In the lands

of Amn, half-orcs are tolerated, as unlike in the north the people of

Amn haven't had centuries of warfare with orc kind. Half-orcs recieve a

bonus to strength and constitution, but incur a penalty to

intelligence.>
set string <race; Half-Orc>
}
end define
define selection <classselect>
info <Class Selection>
choice <Fighter> msg <A character class is like a profession or

career. It is what your character has worked and trained at during his

younger years. Each class has differebt special powers and abilities

that are available only to that class.|n|nFIGHTER: The fighter is a

champion, swordsman, soldier, and brawler. He lives or dies by his

knowledge of weapons and tactics. Fighters can be found at the front of

any battle, contesting toe-to-toe with monsters and villains. A good

fighter needs to be strong and healthy is he hopes to survive.>
choice <Ranger> msg <RANGER: The ranger is a warrior and a

woodsman. He is skilled with weapons and is knowledgeable in the ways

of the forest. The ranger often protects and guides lost travelers and

honest peasent-folk. A ranger needs to be strong and wise to the ways

of nature to live a full life.>
choice <Paladin> msg <PALADIN: A paladin is a warrior bold and

pure, the exemplar of everything good and true. Like the fighter, the

paladin is a man of combat. However, the paladin lives for the ideals

of righteousness, justice, honesty, piety, and chivalry. He strives to

be living example of these virtues so that others might learn from him

as well as gain by his actions.>
end define
define selection <fighterkitselect>
info <Would you like to select a Kit?>
choice <No> set string <class; Fighter>
choice <Yes (Recommended)>
end define
define selection <fighterkits>
info <Fighter Kit Selection>
choice <Berserker> {
msg <BERSERKER: This is a warrior who is in tune with

his animalistic side and, during combat, can achieve an ecstatic state

of mind that will enable him to fight longer, harder and more savagely

than any normal fighter has a right to. Berserkers tend to be

barbarian-like in nature, but not always. Sometimes it is a consious

choice that a warrior in training makes. Regardless, opponents on the

battlefield will be unsettled when they see the savage and inhuman

elements of the berserker's personality. This class is common amongst

dwarves, know to them as 'battleragers'.|n|nAdvantages:|n- May use

'enrage' ability once per day per 4 levels. The enraged state lasts for

6 turns.|n- While enraged: +2 to hit, +2 damage, -2 AC|n- While

enraged: Immune to charm, hold and fear, maze, imprisonment, stun and

sleep.|n- While enraged: gains 15 hit points. These hit points are

temporary, and are taken away at the end of his berserk spree, possibly

killing the berserker.|n|nDisadvantages: |n- Becomes winded after

berserking. While he's winded he recieves -2 to hit, -2 to damage and a

+2 penalty to armour class.|n- Cannot specialize in ranged weapons>
set string <class; Berserker>
}
choice <Wizard Slayer> {
msg <WIZARD SLAYER: This warrior has been specially

trained by his sect to excel in hunting attacking spellcasters of all

kinds.|n|nAdvantages:|n- For each successful hit on an opponent, 10%

cumulative spell failure penalty is applied.|n- 1% magic resistance per

level|n|nDisadvantages:|n- May not use any magic items except for

weapons and armor>
set string <class; Wizard Slayer>
}
choice <Kensai> {
msg <KENSAI: This class is also known as the 'Sword

Saint', and consists of a warrior who has been specially trained to be

one with his sword. They are deadly and fast and trained to fight

without encumberance.|n|nAdvantages:|n- Bonus +1 to hit and +1 damage

for every 3 levels|n- Bonus -2 to AC|n- Bonus -1 to speed factor for

every 4 levels|n- May use 'kai' ability one time per day for every 4

levels (starts at 1st level with one use): this ability lasts 1 turn

and makes all attacks do maximum damage.|n|nDisadvantages:|n- May not

use missile weapons|n- May not wear armor|n- May not wear gauntlets or

bracers>
set string <class; Kensai>
}
choice <<--> choose <fighterkitselect>
end define
define selection <rangerkitselect>
info <Would you like to select a Kit?>
choice <No> set string <class; Ranger>
choice <Yes (Recommended)> choose <rangerkits>
end define
define selection <rangerkits>
info <Ranger Kit Selection>
choice <Archer> {
msg <ARCHER: The archer is the epitome of skill with

the bow. he is the ultimate marksman, able to make almost any shot, no

matter how difficult. To become so skilled with the bow, the archer has

had to sacrifice some of his proficiency with melee weapons and

armor.|n|nAdvantages:|n- +1 to hit, and +1 to damage with any missile

weapon for every 3 levels of experience.|n- Every 4 levels he gains the

ability to make a called shot once per day. When he activates this

ability, any shot made within the next turn is augmented in the

following manner (according to the level of the archer):|n4th level: -1

toTHACO of target|n8th level: -1 to save vs magic of target|n12th

level: -1 to strength of target|n16th level: +2 bonus to

damage|n|nDisadvantages:|n- An archer can only become proficient in

Melee weapons; he may never specialize.|n- An archer cannot wear any

metal armor.>
set string <class; Archer>
}
choice <Stalker> {
msg <STALKER: Stalkers serve as covert

intelligence-gatherers, comfortable in both wilderness and urban

settings. They are the spies, informants, and interrogators, and their

mastery of stealth makes them deadly opponents.|n|nAdvantages:|n- +20%

to stealth ability |n- May backstab for a lesser amount than the thief

class (level 1-8: x1, level 9-16: x2, level 17+: x3)|n- Has access to

three mage spells at 12th level. They are Haste, Protection from Normal

Missiles and Minor Spell Deflection.|n|nDisadvatages:|n- May not wear

armor greater than studded leather>
set string <class; Stalker>
}
choice <Beast Master> {
msg <BEAST MASTER: This ranger is a wanderer, and is

not comfortable in civilized lands. He maintains a natural affinity for

animals; they are his friends and comrades-in-arms, and the Beast

Master has a limited form of telepathic communication with

them.|n|nAdvantages:|n- +15% to stealth ability|n- Enhanced spell

ability with regard to the following spells:|nMay cast 4th level druid

spell Animal Summoning 1 at 8th level.|nMay cast Animal Summoning 2 at

10th level.|nMay cast Animal Summoning 3 at 12th level.|n- May cast

Find Familiar at 8th level. If the familiar dies, the Beast Master does

not incur the usual penalty of 1 point of constitution lost

permenantly.|n|nDisadvantages:|n- Cannot use metal weapons (such as

swords, halberds, hammers or morning stars).>
set string <class; Beast Master>
}
choice <<--> choose <rangerkitselect>
end define
define selection <paladinkitselect>
info <Would you like to select a Kit?>
choice <No> set string <class; Paladin>
choice <Yes (Recommended)> msg <>
end define
define selection <paladinkits>
info <Paladin Kit Selection>
choice <Cavalier> {
msg <CAVALIER: This class represents the most common

picture of the knight: the gentleman warrior who epitomizes honor,

courage and loyalty. He is specialized in battling 'classical' evil

monsters such as demons and dragons.|n|nAdvantages:|n- Bonus +3 to hit

and +3 to damage against all demonic and draconic creatures.|n- May

cast 'remove fear' 1 ime per day per level|n- Immune to fear and morale

failure|n- Immune to charm|n- Immune to poison|n- 20% resistance to

fire|n- 20% resistance to acid|n|nDisadvantages:|n- May not use missile

weapons>
set string <class; Cavalier>
}
choice <Inquisitor> {
msg <INQUISITOR: The Inquisitor has dedicated his life

to finding and eliminating practicioners of evil magic and defeating

the forces of darkness, and his god has provided him with special

abilities towards that end.|n|nAdvantages:|n- May use 'Dispel Magic'

ability once per day per 4 levels (starts at 1st level with one use):

ability is used at speed factor 1 and acts at twice his actual

level.|n- May cast 'True Sight' once per day per 4 levels (starts at

1st level with one use)|n- Immune to Hold and Charm

spells|n|nDisadvantages|n- May not use 'lay on hands' ability|n- May

not cast priest spells|n- May not turn undead>
set string <class; Inquisitor>
}
choice <Undead Hunter> {
msg <UNDEAD HUNTER: This holy avenger has honed his

abilities towards the destruction of the undead and other unnatural

creatures, and is immune to many of their more devastating

abilities.|n|nAdvantages:|n- +3 to hit and +3 damage vs. undead|n-

Immune to hold|n- Immune to level drain|n|nDisadvantages:|n- May not

use 'lay on hands' ability>
set string <class; Undead Hunter>
}
choice <<--> choose <paladinkitselect>
end define



Try to play it. You'll see. Any suggestions?

Alex
13 Oct 2008, 16:46
That code has msg statements split up over multiple lines, and these choice statements are curious:

choice <<--> choose <fighterkitselect>

Not sure if phpBB is ruining the file though - maybe easier to attach it instead?

Thanatos
14 Oct 2008, 03:14
The <<--> is a back option. So it shows up like this:
Berserker
Wizard Slayer
Kensai
<--

If I change the <-- to Back, will that repair it?

Freak
14 Oct 2008, 09:36
IIRC, change it to $symbol(gt)$.

Thanatos
15 Oct 2008, 04:24
Eh?
Please realise I don't understand code writing. Speak english :(

Elexxorine
27 Oct 2008, 17:24
$symbol(gt)$ makes the '<' symbol, as it messes quest up normally. Replace '<' with that function where you want the player to see it.

Thanatos
28 Oct 2008, 03:55
's ok. I replaced <-- with Back and now everything works fine. Thanks anyway!