Browse Source

- Hack fix for weird spawning of linebreaks at the end of the doc (only works with html5 enabled)
- Changed Gains/Losses to display all gains first then all losses
- Some CSS magic (both html5 and not)
- Added CharacterCreation test run Quest

SleepyFox 5 years ago
parent
commit
74078d7f8b

+ 1 - 0
glife.qproj

@@ -908,6 +908,7 @@
 		<Location name="DH_Main"/>
 		<Location name="DH_QuestManager"/>
 		<Location name="DH_Quest_NewBeginnings"/>
+		<Location name="DH_Quest_CharacterCreation"/>
 		<Location name="DH_Achievements"/>
 		<Location name="DH_Character"/>
 		<Location name="DH_Creatures"/>

+ 29 - 18
locations/DH_Character.qsrc

@@ -1,4 +1,15 @@
 # DH_Character
+if $ARGS[0] = 'Init':
+	_i = 0
+	:Loop DH_Character_Init_DeleteCharacters
+	if (_i < ARRSIZE('$dhCh_Chars_')):
+		gs 'DH_Character', 'Delete', $dhCh_Chars_[_i]
+		
+		_i += 1
+		jump 'Loop DH_Character_Init_DeleteCharacters'
+	end
+end
+
 if $ARGS[0] = 'Create':
 	$.id   = $ARGS[1]
 	$.name = iif($ARGS[2] ! '', $ARGS[2], $.id)
@@ -32,10 +43,10 @@ if $ARGS[0] = 'Delete':
 		KILLVAR '$dhCh_Class',    _charPos
 		
 		!! Stats
-		KILLVAR 'dhCh_Level',       _charPos
-		KILLVAR 'dhCh_StatPoints',  _charPos
-		KILLVAR 'dhCh_Exp',         _charPos
-		KILLVAR 'dhCh_ExpMax',      _charPos
+		KILLVAR 'dhCh_Level',      _charPos
+		KILLVAR 'dhCh_StatPoints', _charPos
+		KILLVAR 'dhCh_Exp',        _charPos
+		KILLVAR 'dhCh_ExpMax',     _charPos
 		
 		KILLVAR 'dhCh_Health',  _charPos
 		KILLVAR 'dhCh_Stamina', _charPos
@@ -49,13 +60,13 @@ if $ARGS[0] = 'Delete':
 		KILLVAR 'dhCh_RageMax',    _charPos
 		KILLVAR 'dhCh_EnergyMax',  _charPos
 		
-		KILLVAR 'dhCh_Agi',  _charPos
-		KILLVAR 'dhCh_Cha',  _charPos
-		KILLVAR 'dhCh_Int',  _charPos
-		KILLVAR 'dhCh_Lore', _charPos
-		KILLVAR 'dhCh_Luck', _charPos
-		KILLVAR 'dhCh_Per',  _charPos
-		KILLVAR 'dhCh_Str',  _charPos
+		KILLVAR 'dhCh_Agi', _charPos
+		KILLVAR 'dhCh_Cha', _charPos
+		KILLVAR 'dhCh_Int', _charPos
+		KILLVAR 'dhCh_Lor', _charPos
+		KILLVAR 'dhCh_Luc', _charPos
+		KILLVAR 'dhCh_Per', _charPos
+		KILLVAR 'dhCh_Str', _charPos
 		
 		KILLVAR 'dhCh_ArmorVal',  _charPos
 		KILLVAR 'dhCh_WeaponDmg', _charPos
@@ -117,13 +128,13 @@ if $ARGS[0] = 'CreateStats':
 	dhCh_RageMax[$.id]    = 0
 	dhCh_EnergyMax[$.id]  = 0
 	
-	dhCh_Agi[$.id]  = 1 &!Agility      - Evasion
-	dhCh_Cha[$.id]  = 1 &!Charisma     - Dialogue choices + shop prices
-	dhCh_Int[$.id]  = 1 &!Intelligence - Magic dmg
-	dhCh_Lore[$.id] = 1 &!Lore         - Puzzle answers + crit(if P lore > E lore)?
-	dhCh_Luck[$.id] = 1 &!Luck         - Loot + crit
-	dhCh_Per[$.id]  = 1 &!Perception   - Find/Alert chance + crit
-	dhCh_Str[$.id]  = 1 &!Strength     - Phys dmg
+	dhCh_Agi[$.id] = 1 &!Agility      - Evasion
+	dhCh_Cha[$.id] = 1 &!Charisma     - Dialogue choices + shop prices
+	dhCh_Int[$.id] = 1 &!Intelligence - Magic dmg
+	dhCh_Lor[$.id] = 1 &!Lore         - Puzzle answers + crit(if P lore > E lore)?
+	dhCh_Luc[$.id] = 1 &!Luck         - Loot + crit
+	dhCh_Per[$.id] = 1 &!Perception   - Find/Alert chance + crit
+	dhCh_Str[$.id] = 1 &!Strength     - Phys dmg
 	
 	dhCh_Defense[$.id]    = 0
 	dhCh_DmgMin[$.id]     = 0

+ 124 - 234
locations/DH_Classes.qsrc

@@ -29,13 +29,13 @@ if $ARGS[0] = 'ChangeClass':
 	dhCh_RageMax[$.character]    -= dhCl_RageMax
 	dhCh_EnergyMax[$.character]  -= dhCl_EnergyMax
 	
-	dhCh_Agi[$.character]  -= dhCl_Agi
-	dhCh_Cha[$.character]  -= dhCl_Cha
-	dhCh_Int[$.character]  -= dhCl_Int
-	dhCh_Lore[$.character] -= dhCl_Lore
-	dhCh_Luck[$.character] -= dhCl_Luck
+	dhCh_Agi[$.character] -= dhCl_Agi
+	dhCh_Cha[$.character] -= dhCl_Cha
+	dhCh_Int[$.character] -= dhCl_Int
+	dhCh_Lor[$.character] -= dhCl_Lor
+	dhCh_Luc[$.character] -= dhCl_Luc
 	dhCh_Per[$.character] -= dhCl_Per
-	dhCh_Str[$.character]  -= dhCl_Str
+	dhCh_Str[$.character] -= dhCl_Str
 	!!~~#
 	
 	!!~~ Store old stats
@@ -45,13 +45,13 @@ if $ARGS[0] = 'ChangeClass':
 	dhCl_StatOld['RageMax']    = dhCl_RageMax
 	dhCl_StatOld['EnergyMax']  = dhCl_EnergyMax
 	
-	dhCl_StatOld['Agi']  = dhCl_Agi
-	dhCl_StatOld['Cha']  = dhCl_Cha
-	dhCl_StatOld['Int']  = dhCl_Int
-	dhCl_StatOld['Lore'] = dhCl_Lore
-	dhCl_StatOld['Luck'] = dhCl_Luck
-	dhCl_StatOld['Per']  = dhCl_Per
-	dhCl_StatOld['Str']  = dhCl_Str
+	dhCl_StatOld['Agi'] = dhCl_Agi
+	dhCl_StatOld['Cha'] = dhCl_Cha
+	dhCl_StatOld['Int'] = dhCl_Int
+	dhCl_StatOld['Lor'] = dhCl_Lor
+	dhCl_StatOld['Luc'] = dhCl_Luc
+	dhCl_StatOld['Per'] = dhCl_Per
+	dhCl_StatOld['Str'] = dhCl_Str
 	!!~~#
 	
 	!!~~ Get new stats
@@ -65,13 +65,13 @@ if $ARGS[0] = 'ChangeClass':
 	dhCh_RageMax[$.character]    += dhCl_RageMax
 	dhCh_EnergyMax[$.character]  += dhCl_EnergyMax
 	
-	dhCh_Agi[$.character]  += dhCl_Agi
-	dhCh_Cha[$.character]  += dhCl_Cha
-	dhCh_Int[$.character]  += dhCl_Int
-	dhCh_Lore[$.character] += dhCl_Lore
-	dhCh_Luck[$.character] += dhCl_Luck
-	dhCh_Per[$.character]  += dhCl_Per
-	dhCh_Str[$.character]  += dhCl_Str
+	dhCh_Agi[$.character] += dhCl_Agi
+	dhCh_Cha[$.character] += dhCl_Cha
+	dhCh_Int[$.character] += dhCl_Int
+	dhCh_Lor[$.character] += dhCl_Lor
+	dhCh_Luc[$.character] += dhCl_Luc
+	dhCh_Per[$.character] += dhCl_Per
+	dhCh_Str[$.character] += dhCl_Str
 	!!~~#
 	
 	!!~~ Store stat changes
@@ -81,13 +81,13 @@ if $ARGS[0] = 'ChangeClass':
 	dhCl_StatDif['RageMax']    = dhCl_RageMax    - dhCl_StatOld['RageMax']
 	dhCl_StatDif['EnergyMax']  = dhCl_EnergyMax  - dhCl_StatOld['EnergyMax']
 	
-	dhCl_StatDif['Agi']  = dhCl_Agi  - dhCl_StatOld['Agi']
-	dhCl_StatDif['Cha']  = dhCl_Cha  - dhCl_StatOld['Cha']
-	dhCl_StatDif['Int']  = dhCl_Int  - dhCl_StatOld['Int']
-	dhCl_StatDif['Lore'] = dhCl_Lore - dhCl_StatOld['Lore']
-	dhCl_StatDif['Luck'] = dhCl_Luck - dhCl_StatOld['Luck']
-	dhCl_StatDif['Per']  = dhCl_Per  - dhCl_StatOld['Per']
-	dhCl_StatDif['Str']  = dhCl_Str  - dhCl_StatOld['Str']
+	dhCl_StatDif['Agi'] = dhCl_Agi - dhCl_StatOld['Agi']
+	dhCl_StatDif['Cha'] = dhCl_Cha - dhCl_StatOld['Cha']
+	dhCl_StatDif['Int'] = dhCl_Int - dhCl_StatOld['Int']
+	dhCl_StatDif['Lor'] = dhCl_Lor - dhCl_StatOld['Lor']
+	dhCl_StatDif['Luc'] = dhCl_Luc - dhCl_StatOld['Luc']
+	dhCl_StatDif['Per'] = dhCl_Per - dhCl_StatOld['Per']
+	dhCl_StatDif['Str'] = dhCl_Str - dhCl_StatOld['Str']
 	
 	$dhCl_StatDifTxT['HealthMax']  = iif(dhCl_StatDif['HealthMax']  >= 0, '+' + str(dhCl_StatDif['HealthMax']),  str(dhCl_StatDif['HealthMax']))
 	$dhCl_StatDifTxT['StaminaMax'] = iif(dhCl_StatDif['StaminaMax'] >= 0, '+' + str(dhCl_StatDif['StaminaMax']), str(dhCl_StatDif['StaminaMax']))
@@ -95,190 +95,80 @@ if $ARGS[0] = 'ChangeClass':
 	$dhCl_StatDifTxT['RageMax']    = iif(dhCl_StatDif['RageMax']    >= 0, '+' + str(dhCl_StatDif['RageMax']),    str(dhCl_StatDif['RageMax']))
 	$dhCl_StatDifTxT['EnergyMax']  = iif(dhCl_StatDif['EnergyMax']  >= 0, '+' + str(dhCl_StatDif['EnergyMax']),  str(dhCl_StatDif['EnergyMax']))
 	
-	$dhCl_StatDifTxT['Agi']  = iif(dhCl_StatDif['Agi']  >= 0, '+' + str(dhCl_StatDif['Agi']),  str(dhCl_StatDif['Agi']))
-	$dhCl_StatDifTxT['Cha']  = iif(dhCl_StatDif['Cha']  >= 0, '+' + str(dhCl_StatDif['Cha']),  str(dhCl_StatDif['Cha']))
-	$dhCl_StatDifTxT['Int']  = iif(dhCl_StatDif['Int']  >= 0, '+' + str(dhCl_StatDif['Int']),  str(dhCl_StatDif['Int']))
-	$dhCl_StatDifTxT['Lore'] = iif(dhCl_StatDif['Lore'] >= 0, '+' + str(dhCl_StatDif['Lore']), str(dhCl_StatDif['Lore']))
-	$dhCl_StatDifTxT['Luck'] = iif(dhCl_StatDif['Luck'] >= 0, '+' + str(dhCl_StatDif['Luck']), str(dhCl_StatDif['Luck']))
-	$dhCl_StatDifTxT['Per']  = iif(dhCl_StatDif['Per']  >= 0, '+' + str(dhCl_StatDif['Per']),  str(dhCl_StatDif['Per']))
-	$dhCl_StatDifTxT['Str']  = iif(dhCl_StatDif['Str']  >= 0, '+' + str(dhCl_StatDif['Str']),  str(dhCl_StatDif['Str']))
+	$dhCl_StatDifTxT['Agi'] = iif(dhCl_StatDif['Agi'] >= 0, '+' + str(dhCl_StatDif['Agi']), str(dhCl_StatDif['Agi']))
+	$dhCl_StatDifTxT['Cha'] = iif(dhCl_StatDif['Cha'] >= 0, '+' + str(dhCl_StatDif['Cha']), str(dhCl_StatDif['Cha']))
+	$dhCl_StatDifTxT['Int'] = iif(dhCl_StatDif['Int'] >= 0, '+' + str(dhCl_StatDif['Int']), str(dhCl_StatDif['Int']))
+	$dhCl_StatDifTxT['Lor'] = iif(dhCl_StatDif['Lor'] >= 0, '+' + str(dhCl_StatDif['Lor']), str(dhCl_StatDif['Lor']))
+	$dhCl_StatDifTxT['Luc'] = iif(dhCl_StatDif['Luc'] >= 0, '+' + str(dhCl_StatDif['Luc']), str(dhCl_StatDif['Luc']))
+	$dhCl_StatDifTxT['Per'] = iif(dhCl_StatDif['Per'] >= 0, '+' + str(dhCl_StatDif['Per']), str(dhCl_StatDif['Per']))
+	$dhCl_StatDifTxT['Str'] = iif(dhCl_StatDif['Str'] >= 0, '+' + str(dhCl_StatDif['Str']), str(dhCl_StatDif['Str']))
 	!!~~#
 end
 
 if $ARGS[0] = 'PrintStatChanges':
 	$.elementId = $ARGS[1]
 	
-	!!~~ Personal Resources
-	if (dhCl_StatDif['HealthMax'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['HealthMax'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['HealthMax'], 'c:-color-num')
-		func('writes', $.elementId, 'Max Health', 'c:-color-stat-health')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
-	
-	if (dhCl_StatDif['StaminaMax'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['StaminaMax'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['StaminaMax'], 'c:-color-num')
-		func('writes', $.elementId, 'Max Stamina', 'c:-color-stat-stamina')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
-	
-	if (dhCl_StatDif['ManaMax'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['ManaMax'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['ManaMax'], 'c:-color-num')
-		func('writes', $.elementId, 'Max Mana', 'c:-color-stat-mana')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
-	
-	if (dhCl_StatDif['RageMax'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['RageMax'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['RageMax'], 'c:-color-num')
-		func('writes', $.elementId, 'Max Rage', 'c:-color-stat-rage')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
-	
-	if (dhCl_StatDif['EnergyMax'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['EnergyMax'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['HealthMax'], 'c:-color-num')
-		func('writes', $.elementId, 'Max Energy', 'c:-color-stat-energy')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
+	!!~~ Gained
+	IF (dhCl_StatDif['HealthMax']  > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'HealthMax',  'Max Health',  'health')
+	IF (dhCl_StatDif['StaminaMax'] > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'StaminaMax', 'Max Stamina', 'stamina')
+	IF (dhCl_StatDif['ManaMax']    > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'ManaMax',    'Max Mana',    'mana')
+	IF (dhCl_StatDif['RageMax']    > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'RageMax',    'Max Rage',    'rage')
+	IF (dhCl_StatDif['EnergyMax']  > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'EnergyMax',  'Max Energy',  'energy')
+
+	IF (dhCl_StatDif['Agi'] > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'Agi',  'Agility',    'agi')
+	IF (dhCl_StatDif['Cha'] > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'Cha',  'Charisma',   'cha')
+	IF (dhCl_StatDif['Int'] > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'Int',  'Intellect',  'int')
+	IF (dhCl_StatDif['Lor'] > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'Lor',  'Lore',       'lor')
+	IF (dhCl_StatDif['Luc'] > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'Luc',  'Luck',       'luc')
+	IF (dhCl_StatDif['Per'] > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'Per',  'Perception', 'per')
+	IF (dhCl_StatDif['Str'] > 0): func('DH_Classes', 'PrintStatGain', $.elementId, 'Str',  'Strength',   'str')
 	!!~~#
 	
-	!!~~ Attributes
-	if (dhCl_StatDif['Agi'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['Agi'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['Agi'], 'c:-color-num')
-		func('writes', $.elementId, 'Agility', 'c:-color-stat-agi')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
-	
-	if (dhCl_StatDif['Cha'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['Cha'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['Cha'], 'c:-color-num')
-		func('writes', $.elementId, 'Charisma', 'c:-color-stat-cha')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
-	
-	if (dhCl_StatDif['Int'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['Int'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['Int'], 'c:-color-num')
-		func('writes', $.elementId, 'Intellect', 'c:-color-stat-int')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
+	!!~~ Lost
+	IF (dhCl_StatDif['HealthMax']  < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'HealthMax',  'Max Health',  'health')
+	IF (dhCl_StatDif['StaminaMax'] < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'StaminaMax', 'Max Stamina', 'stamina')
+	IF (dhCl_StatDif['ManaMax']    < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'ManaMax',    'Max Mana',    'mana')
+	IF (dhCl_StatDif['RageMax']    < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'RageMax',    'Max Rage',    'rage')
+	IF (dhCl_StatDif['EnergyMax']  < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'EnergyMax',  'Max Energy',  'energy')
+
+	IF (dhCl_StatDif['Agi'] < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'Agi',  'Agility',    'agi')
+	IF (dhCl_StatDif['Cha'] < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'Cha',  'Charisma',   'cha')
+	IF (dhCl_StatDif['Int'] < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'Int',  'Intellect',  'int')
+	IF (dhCl_StatDif['Lor'] < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'Lor',  'Lore',       'lor')
+	IF (dhCl_StatDif['Luc'] < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'Luc',  'Luck',       'luc')
+	IF (dhCl_StatDif['Per'] < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'Per',  'Perception', 'per')
+	IF (dhCl_StatDif['Str'] < 0): func('DH_Classes', 'PrintStatLoss', $.elementId, 'Str',  'Strength',   'str')
+	!!~~#
+end
+
+if $ARGS[0] = 'PrintStatGain':
+	$.elementId = $ARGS[1]
+	$.stat      = $ARGS[2]
+	$.statText  = $ARGS[3]
+	$.statColor = $ARGS[4]
 	
-	if (dhCl_StatDif['Lore'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['Lore'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['Lore'], 'c:-color-num')
-		func('writes', $.elementId, 'Lore', 'c:-color-stat-lore')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
+	func('writeN', $.elementId)
+	func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
 	
-	if (dhCl_StatDif['Luck'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['Luck'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['Luck'], 'c:-color-num')
-		func('writes', $.elementId, 'Luck', 'c:-color-stat-luck')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
+	func('write',  $.elementId, 'Gained', 'c:' + $Wf_Colors['gain'])
+	func('writes', $.elementId, $dhCl_StatDifTxt['<<$.stat>>'], 'c:' + $Wf_Colors['num'])
+	func('writes', $.elementId, $.statText, 'c:' + $Wf_Colors['<<$.statColor>>'])
+	func('DH_Screen', 'tooltipend', $.elementId)
+end
+
+if $ARGS[0] = 'PrintStatLoss':
+	$.elementId = $ARGS[1]
+	$.stat      = $ARGS[2]
+	$.statText  = $ARGS[3]
+	$.statColor = $ARGS[4]
 	
-	if (dhCl_StatDif['Per'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['Per'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['Per'], 'c:-color-num')
-		func('writes', $.elementId, 'Perception', 'c:-color-stat-per')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
+	func('writeN', $.elementId)
+	func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
 	
-	if (dhCl_StatDif['Str'] ! 0):
-		func('writeN', $.elementId)
-		func('DH_Screen', 'tooltip', $.elementId, 'From changing class.')
-		
-		if ($dhCl_StatDif['Str'] >= 0):
-			 func('write', $.elementId, 'Gained', 'c:-color-gain')
-		else func('write', $.elementId, 'Lost', 'c:-color-lost')
-		end
-		
-		func('writes', $.elementId, $dhCl_StatDifTxt['Str'], 'c:-color-num')
-		func('writes', $.elementId, 'Strength', 'c:-color-stat-str')
-		func('DH_Screen', 'tooltipend', $.elementId)
-	end
-	!!~~#
+	func('write',  $.elementId, 'Lost', 'c:' + $Wf_Colors['loss'])
+	func('writes', $.elementId, $dhCl_StatDifTxt['<<$.stat>>'], 'c:' + $Wf_Colors['num'])
+	func('writes', $.elementId, $.statText, 'c:' + $Wf_Colors['<<$.statColor>>'])
+	func('DH_Screen', 'tooltipend', $.elementId)
 end
 
 if $ARGS[0] = 'None':
@@ -290,13 +180,13 @@ if $ARGS[0] = 'None':
 	dhCl_RageMax    = 0
 	dhCl_EnergyMax  = 0
 	
-	dhCl_Agi  = 1
-	dhCl_Cha  = 1
-	dhCl_Int  = 1
-	dhCl_Lore = 1
-	dhCl_Luck = 1
-	dhCl_Per  = 1
-	dhCl_Str  = 1
+	dhCl_Agi = 1
+	dhCl_Cha = 1
+	dhCl_Int = 1
+	dhCl_Lor = 1
+	dhCl_Luc = 1
+	dhCl_Per = 1
+	dhCl_Str = 1
 end
 
 if $ARGS[0] = 'Beater':
@@ -308,13 +198,13 @@ if $ARGS[0] = 'Beater':
 	dhCl_RageMax    = 999
 	dhCl_EnergyMax  = 999
 	
-	dhCl_Agi  = 99
-	dhCl_Cha  = 99
-	dhCl_Int  = 99
-	dhCl_Lore = 99
-	dhCl_Luck = 99
-	dhCl_Per  = 99
-	dhCl_Str  = 99
+	dhCl_Agi = 99
+	dhCl_Cha = 99
+	dhCl_Int = 99
+	dhCl_Lor = 99
+	dhCl_Luc = 99
+	dhCl_Per = 99
+	dhCl_Str = 99
 end
 
 if $ARGS[0] = 'Brute':
@@ -326,13 +216,13 @@ if $ARGS[0] = 'Brute':
 	dhCl_RageMax    = 10
 	dhCl_EnergyMax  = 0
 	
-	dhCl_Agi  = 1
-	dhCl_Cha  = 1
-	dhCl_Int  = 1
-	dhCl_Lore = 2
-	dhCl_Luck = 1
-	dhCl_Per  = 1
-	dhCl_Str  = 4
+	dhCl_Agi = 1
+	dhCl_Cha = 1
+	dhCl_Int = 1
+	dhCl_Lor = 2
+	dhCl_Luc = 1
+	dhCl_Per = 1
+	dhCl_Str = 4
 end
 
 if $ARGS[0] = 'Trickster':
@@ -344,13 +234,13 @@ if $ARGS[0] = 'Trickster':
 	dhCl_RageMax    = 0
 	dhCl_EnergyMax  = 0
 	
-	dhCl_Agi  = 1
-	dhCl_Cha  = 1
-	dhCl_Int  = 4
-	dhCl_Lore = 2
-	dhCl_Luck = 1
-	dhCl_Per  = 1
-	dhCl_Str  = 1
+	dhCl_Agi = 1
+	dhCl_Cha = 1
+	dhCl_Int = 4
+	dhCl_Lor = 2
+	dhCl_Luc = 1
+	dhCl_Per = 1
+	dhCl_Str = 1
 end
 
 if $ARGS[0] = 'Pickpocket':
@@ -362,13 +252,13 @@ if $ARGS[0] = 'Pickpocket':
 	dhCl_RageMax    = 0
 	dhCl_EnergyMax  = 12
 	
-	dhCl_Agi  = 2
-	dhCl_Cha  = 1
-	dhCl_Int  = 1
-	dhCl_Lore = 2
-	dhCl_Luck = 2
-	dhCl_Per  = 2
-	dhCl_Str  = 1
+	dhCl_Agi = 2
+	dhCl_Cha = 1
+	dhCl_Int = 1
+	dhCl_Lor = 2
+	dhCl_Luc = 2
+	dhCl_Per = 2
+	dhCl_Str = 1
 end
 
 --- DH_Classes ---------------------------------

+ 25 - 2
locations/DH_Functions.qsrc

@@ -25,14 +25,14 @@ if $ARGS[0] = 'FormatStr':
 end
 
 !! Concatenate string array
-if lcase($ARGS[0]) = 'ConcatStrArr':
+if $ARGS[0] = 'ConcatStrArr':
 	KILLVAR '$_FUNC_concat'
 	KILLVAR '$_FUNC_concatStr'
 	COPYARR '$_FUNC_concat', '<<$ARGS[1]>>'
 	
 	_FUNC_i = 0
 	:Loop DH_Functions_ConcatStrArr_Concatenate
-	if (_FUNC_i < ARRSIZE('$_FUNC_concat'):
+	if (_FUNC_i < ARRSIZE('$_FUNC_concat')):
 		$_FUNC_concatStr += $_FUNC_concat[_FUNC_i]
 		
 		_FUNC_i += 1
@@ -42,6 +42,29 @@ if lcase($ARGS[0]) = 'ConcatStrArr':
 	$RESULT = $_FUNC_concatStr
 end
 
+if $ARGS[0] = 'FireEvent':
+	KILLVAR '$_F_EventArgs_'
+	$_F_Event = $ARGS[1]
+	
+	:Loop Screen_ClearAll_EventArgs
+	if (len('$scr_EventClear_[<<_F_i>>]') > 0):
+		_F_position = strPos($_F_Event, ',')
+		
+		if (_F_position ! 0 and ARRSIZE('$_F_EventArgs_') < 9):
+			$_F_EventArgs_[] = mid($_F_Event, 1, _F_position - 1)
+			$_F_Event = trim(mid($_F_Event, _F_position + 1))
+			
+			_F_i2 += 1
+			jump 'Loop Screen_ClearAll_EventArgs'
+			
+		else
+			$_F_EventArgs_[] = mid($_F_Event, 1)
+		end
+	end
+	
+	gs '<<$_F_EventArgs_[0]>>', '<<$_F_EventArgs_[1]>>', '<<$_F_EventArgs_[2]>>', '<<$_F_EventArgs_[3]>>', '<<$_F_EventArgs_[4]>>', '<<$_F_EventArgs_[5]>>', '<<$_F_EventArgs_[6]>>', '<<$_F_EventArgs_[7]>>', '<<$_F_EventArgs_[8]>>', '<<$_F_EventArgs_[9]>>'
+end
+
 --- DH_Functions ---------------------------
 
 # StrInsert

+ 37 - 10
locations/DH_Main.qsrc

@@ -19,7 +19,7 @@ if $ARGS[0] = 'Init':
 	
 	!!~~ Screen HTML
 	$Scr_HTML['dhScr_Def']  = '<div id="header">'
-	$Scr_HTML['dhScr_Def'] +=     '<img id="headerImage" src="%HEADERIMAGE%" draggable="false">'
+	$Scr_HTML['dhScr_Def'] +=     '<center><img id="headerImage" src="%HEADERIMAGE%" draggable="false"></center>'
 	$Scr_HTML['dhScr_Def'] +=     '<div id="titleContainer">'
 	$Scr_HTML['dhScr_Def'] +=         '<div id="title">%TITLE%</div>'
 	$Scr_HTML['dhScr_Def'] +=     '</div>'
@@ -32,25 +32,46 @@ if $ARGS[0] = 'Init':
 	$Scr_HTML['dhScr_Def'] +=     '<div id="storyCard">'
 	$Scr_HTML['dhScr_Def'] +=         '<div id="storyCardInfo">'
 	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardLvl"><span class="tooltip" data-tooltip-content="#tooltip_content" title="This is a tooltip.">Level: %PLAYER_LEVEL%</span></div>'
-	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardXP"><span class="tooltip" data-tooltip-content="#tooltip_second" title="">Exp: %PLAYER_XP% / %PLAYER_MAXXP%</span></div>'
-	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardHP">Health: %PLAYER_HP% / %PLAYER_MAXHP%</div>'
-	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardSP">Stamina: %PLAYER_SP% / %PLAYER_MAXSP%</div>'
-	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardMP">Mana: %PLAYER_MP% / %PLAYER_MAXMP%</div>'
-	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardRP">Rage: %PLAYER_RP% / %PLAYER_MAXRP%</div>'
-	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardEP">Energy: %PLAYER_EP% / %PLAYER_MAXEP%</div>'
+	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardXP"><span class="tooltip" data-tooltip-content="#tooltip_second" title="">Exp: %PLAYER_XP%/%PLAYER_MAXXP%</span></div>'
+	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardHP">Health: %PLAYER_HP%/%PLAYER_MAXHP%</div>'
+	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardSP">Stamina: %PLAYER_SP%/%PLAYER_MAXSP%</div>'
+	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardMP">Mana: %PLAYER_MP%/%PLAYER_MAXMP%</div>'
+	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardRP">Rage: %PLAYER_RP%/%PLAYER_MAXRP%</div>'
+	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardEP">Energy: %PLAYER_EP%/%PLAYER_MAXEP%</div>'
 	$Scr_HTML['dhScr_Def'] +=             '<div id="storyCardGold">Gold: %PLAYER_GOLD%</div>'
 	$Scr_HTML['dhScr_Def'] +=         '</div>'
 	$Scr_HTML['dhScr_Def'] +=     '</div>'
 	$Scr_HTML['dhScr_Def'] +=     '<div id="storyHUDExp" style="background: linear-gradient(to right, #FFAB00 %EXP_PERCENT%, gray %EXP_PERCENT%);"></div>'
 	$Scr_HTML['dhScr_Def'] += '</div>'
-	$Scr_HTML['dhScr_Def'] += '<div class="tooltip_templates">'
+	$Scr_HTML['dhScr_Def'] += '<div class="tooltip_templates" hidden>'
 	$Scr_HTML['dhScr_Def'] +=     '<span id="tooltip_content">This is a <span style="color: red;">tooltip</span>.</span>'
 	$Scr_HTML['dhScr_Def'] +=     '<span id="tooltip_second">This is a <span style="color: green;">tooltip</span>.</span>'
 	$Scr_HTML['dhScr_Def'] += '</div>'
 	!!~~#
 	
+	!!~~ Colors
+	$Wf_Colors['num'] = '#51bae8'
+	$Wf_Colors['gain'] = '#e8b93a'
+	$Wf_Colors['loss'] = '#7c3d26'
+	
+	$Wf_Colors['health']  = '#b75654'
+	$Wf_Colors['stamina'] = '#5c844b'
+	$Wf_Colors['mana']    = '#384a72'
+	$Wf_Colors['rage']    = '#892e2e'
+	$Wf_Colors['energy']  = '#e0d476'
+	
+	$Wf_Colors['agi'] = '#5fbf5b'
+	$Wf_Colors['cha'] = '#d68bb5'
+	$Wf_Colors['int'] = '#684dc1'
+	$Wf_Colors['lor'] = '#7c27b5'
+	$Wf_Colors['luc'] = '#cbf4e0'
+	$Wf_Colors['per'] = '#eaedc7'
+	$Wf_Colors['str'] = '#c1844f'
+	!!~~#
+	
 	gs 'ScreenInit'
 	gs 'DH_Screen', 'Init'
+	gs 'DH_Character', 'Init'
 	gs 'DH_QuestManager', 'Init'
 	
 	!!~~ Screen Events
@@ -70,11 +91,16 @@ if $ARGS[0] = '':
 	$SETMAINDESCHEAD += '<script src="resources/tooltipster/dist/js/tooltipster-discovery.min.js"></script>'
 	$SETMAINDESCHEAD += '<script src="<<$dhDir_resrc>>/main.js"></script>'
 	
+	!! Styling backup
+	$BACKIMAGE = ''
+	$scr_bcolor = 'rgb(41, 38, 36)'
+	$scr_fcolor = 'rgb(255, 255, 255)'
+	
 	dh_HasCharacter = 0
 	if dh_HasCharacter = 0:
 		'Welcome to Dungeon Hunter!'
 		'Let''s get started by creating your character.'
-		ACT 'Start': gs 'DH_QuestManager', 'Start', 'NewBeginnings'
+		ACT 'Start': gs 'DH_QuestManager', 'Start', 'CharacterCreation'
 	else
 		'Welcome back to Dungeon Hunter!'
 		ACT 'Play': gt 'DH_Main', 'Play'
@@ -102,7 +128,8 @@ end
 if $ARGS[0] = 'Exit':
 	$SETMAINDESCHEAD = ''
 	$BACKIMAGE = ''
-	BCOLOR = RGB(255, 255, 255)
+	$scr_bcolor = '#FFFFFF'
+	$scr_fcolor = '#000000'
 	$scr_Layout = ''
 	func('Screen', 'ClearAll', True)
 	

+ 14 - 8
locations/DH_QuestManager.qsrc

@@ -46,7 +46,11 @@ if $ARGS[0] = 'UpdateStoryCard':
 end
 
 if $ARGS[0] = 'Init':
-	$DhQst_List_[0] = 'NewBeginnings'
+	KILLVAR '$DhQst_List_'
+	KILLVAR '$DhQst_Msg_'
+	
+	$DhQst_List_[] = 'NewBeginnings'
+	$DhQst_List_[] = 'CharacterCreation'
 	
 	$DhQst_Msg_['NoQuest']         = 'Warning: No Quest by the name of ''{0}'' exists.'
 	$DhQst_Msg_['NoSubQuest']      = 'Warning: No SubQuest by the name of ''{0}'' exists in the quest ''{1}''.'
@@ -60,6 +64,8 @@ if $ARGS[0] = 'Init':
 	KILLVAR '$dhQst_Finished'
 	KILLVAR '$dhQst_Progress'
 	KILLVAR '$dhQst_SubQst_'
+	
+	gs 'DH_QuestManager', 'UpdateStoryCard'
 end
 
 if $ARGS[0] = 'Start':
@@ -168,8 +174,8 @@ if $ARGS[0] = 'GoTo':
 		IF (.clearScreen = True): func('Screen', 'ClearAll') else func('Screen', 'Clear', 'actions')
 		
 		KILLVAR '$dhDyn'
-		gs 'DH_QuestManager', 'UpdateStoryCard'
 		gs 'DH_Quest_<<$.questName>>', $.subQuest
+		gs 'DH_QuestManager', 'UpdateStoryCard'
 	else
 		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['QuestComplete'], $.questName)
 		msg($RESULT)
@@ -203,9 +209,9 @@ if $ARGS[0] = 'ProgressAct':
 	$.subQuest   = $ARGS[3]
 	$.textColor  = $ARGS[4]
 	
-	func('write', 'actions', '<a class="action" href="exec:gs ''DH_QuestManager'', ''GoTo'', ''<<$.questName>>'', ''<<$.subQuest>>''">')
-	func('write', 'actions', $.actionText, $.textColor)
-	func('write', 'actions', '</a>')
+	func('write',  'actions', '<a class="action" href="exec:gs ''DH_QuestManager'', ''GoTo'', ''<<$.questName>>'', ''<<$.subQuest>>''" draggable="false">')
+	func('write',  'actions', $.actionText, $.textColor)
+	func('writeL', 'actions', '</a>')
 	func('Screen', 'Update')
 end
 
@@ -214,9 +220,9 @@ if $ARGS[0] = 'DynamicAct':
 	$.dynamicId  = $ARGS[2]
 	$.textColor  = $ARGS[3]
 	
-	func('write', 'actions', '<a class="action" href="exec:DYNAMIC $dhDyn[''<<$.dynamicId>>'']">')
-	func('write', 'actions', $.actionText, $.textColor)
-	func('write', 'actions', '</a>')
+	func('write',  'actions', '<a class="action" href="exec:DYNAMIC $dhDyn[''<<$.dynamicId>>'']" draggable="false">')
+	func('write',  'actions', $.actionText, $.textColor)
+	func('writeL', 'actions', '</a>')
 	func('Screen', 'Update')
 end
 

+ 157 - 0
locations/DH_Quest_CharacterCreation.qsrc

@@ -0,0 +1,157 @@
+# DH_Quest_CharacterCreation
+$dhQst_Current = 'CharacterCreation'
+func('Screen', 'Replace', 'TITLE', 'Character Creation')
+func('Screen', 'Replace', 'HEADERIMAGE', '<<$DhDir_img>>/prisoncell.jpg')
+
+if $ARGS[0] = 'GetSubQuests':
+	KILLVAR '$dhQst_SubQst_'
+	$dhQst_SubQst_[] = 'Intro'
+	$dhQst_SubQst_[] = 'Choose Name'
+	$dhQst_SubQst_[] = 'Choose Race'
+	$dhQst_SubQst_[] = 'Choose Class'
+	$dhQst_SubQst_[] = 'Outro'
+end
+
+if $ARGS[0] = 'Start':
+	$dhQst_Title[$dhQst_Current] = 'Character Creation'
+	
+	dhQst_Started[$dhQst_Current]  = True
+	dhQst_Finished[$dhQst_Current] = False
+	
+	$dhQst_Progress[$dhQst_Current] = ''
+	
+	gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Intro'
+end
+
+if $ARGS[0] = 'Complete':
+	$dhQst_Finished[$dhQst_Current] = True
+end
+
+
+if $ARGS[0] = 'Intro':
+	$dhQst_Progress[$dhQst_Current] = $ARGS[0]
+	
+	func('writeP', 'storyText', 'Welcome to Character Creation!')
+	func('writeN', 'storyText', 'This is a test location. Character Creation will be completed through various story choices rather than from a Character Creator like this.')
+	func('writeN', 'storyText', 'There isn''t much to say... Ready to get started?')
+	
+	func('DH_QuestManager', 'ProgressAct', 'Start', $dhQst_Current, 'Choose Name')
+end
+
+if $ARGS[0] = 'Choose Race':
+	$dhQst_Progress[$dhQst_Current] = $ARGS[0]
+	
+	func('writeP', 'storyText', 'There are various different races within Dungeon Hunter.')
+	func('writeN', 'storyText', 'For test purposes, I''ll be including, here, all of the current races to choose from.')
+	
+	$dhDyn['HumanMale'] = {
+		gs 'DH_Races', 'ChangeRace', 'Player', 'HumanMale'
+		gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Choose Class'
+	}
+	
+	$dhDyn['HumanFemale'] = {
+		gs 'DH_Races', 'ChangeRace', 'Player', 'HumanFemale'
+		gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Choose Class'
+	}
+	
+	func('DH_QuestManager', 'DynamicAct', 'Human Male', 'HumanMale')
+	func('DH_QuestManager', 'DynamicAct', 'Human Female', 'HumanFemale')
+end
+
+if $ARGS[0] = 'Choose Class':
+	$dhQst_Progress[$dhQst_Current] = $ARGS[0]
+	
+	func('writeP', 'storyText', 'In a lot of games, classes restrict the spells and abilities you can use.')
+	func('writes', 'storyText', 'In Dungeon Hunter, however, classes only affect stats. Your class can also be changed at any time if you have the required items.')
+	func('writeN', 'storyText', 'Race can also be changed, but it is more difficult.')
+	
+	$dhDyn['None'] = {
+		gs 'DH_Classes', 'ChangeClass', 'Player', 'None'
+		gs 'DH_Classes', 'PrintStatChanges', 'storyText'
+		gs 'DH_QuestManager', 'UpdateStoryCard'
+		gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Outro'
+	}
+	
+	$dhDyn['Brute'] = {
+		gs 'DH_Classes', 'ChangeClass', 'Player', 'Brute'
+		gs 'DH_Classes', 'PrintStatChanges', 'storyText'
+		gs 'DH_QuestManager', 'UpdateStoryCard'
+		gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Outro'
+	}
+	
+	$dhDyn['Trickster'] = {
+		gs 'DH_Classes', 'ChangeClass', 'Player', 'Trickster'
+		gs 'DH_Classes', 'PrintStatChanges', 'storyText'
+		gs 'DH_QuestManager', 'UpdateStoryCard'
+		gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Outro'
+	}
+	
+	$dhDyn['Pickpocket'] = {
+		gs 'DH_Classes', 'ChangeClass', 'Player', 'Pickpocket'
+		gs 'DH_Classes', 'PrintStatChanges', 'storyText'
+		gs 'DH_QuestManager', 'UpdateStoryCard'
+		gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Outro'
+	}
+	
+	$dhDyn['Beater'] = {
+		gs 'DH_Classes', 'ChangeClass', 'Player', 'Beater'
+		gs 'DH_Classes', 'PrintStatChanges', 'storyText'
+		gs 'DH_QuestManager', 'UpdateStoryCard'
+		gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Outro'
+	}
+	
+	func('DH_QuestManager', 'DynamicAct', 'None',       'None')
+	func('DH_QuestManager', 'DynamicAct', 'Brute',      'Brute')
+	func('DH_QuestManager', 'DynamicAct', 'Trickster',  'Trickster')
+	func('DH_QuestManager', 'DynamicAct', 'Pickpocket', 'Pickpocket')
+	func('DH_QuestManager', 'DynamicAct', 'Beater',     'Beater')
+	
+	func('DH_QuestManager', 'DynamicAct', 'None',       'None')
+	func('DH_QuestManager', 'DynamicAct', 'Brute',      'Brute')
+	func('DH_QuestManager', 'DynamicAct', 'Trickster',  'Trickster')
+	func('DH_QuestManager', 'DynamicAct', 'Pickpocket', 'Pickpocket')
+	func('DH_QuestManager', 'DynamicAct', 'Beater',     'Beater')
+end
+
+if $ARGS[0] = 'Choose Name':
+	$dhQst_Progress[$dhQst_Current] = $ARGS[0]
+	
+	func('writeP', 'storyText', 'I want to add TextInput into the game, rather than use the alert box thing - it''s pretty damn ugly, right?')
+	func('writeN', 'storyText', 'But it''ll do for now ;-;')
+	
+	$dhDyn['ChooseName'] = {
+		func('DH_Character', 'Create', 'Player', input('Choose a Name'))
+		gs 'DH_QuestManager', 'GoTo', $dhQst_Current, 'Choose Race'
+	}
+	
+	func('DH_QuestManager', 'DynamicAct', 'Choose Name', 'ChooseName')
+end
+
+if $ARGS[0] = 'Outro':
+	$dhQst_Progress[$dhQst_Current] = $ARGS[0]
+	
+	func('writeP', 'storyText', 'Hey there,')
+	func('writes', 'storyText', $dhCh_Name['Player'])
+	func('write',  'storyText', '!')
+	
+	func('writeP', 'storyText', 'Congratulations on creating a character! Your stats are as follows:')
+	
+	func('writeN', 'storyText', 'Name:')
+	func('writes', 'storyText', $dhCh_Name['Player'])
+	
+	func('writeN', 'storyText', 'Race:')
+	func('writes', 'storyText', $dhCh_Race['Player'])
+	
+	func('writeN', 'storyText', 'SubRace:')
+	func('writes', 'storyText', $dhCh_SubRace['Player'])
+	
+	func('writeN', 'storyText', 'Gender:')
+	func('writes', 'storyText', $dhCh_Gender['Player'])
+	
+	func('writeN', 'storyText', 'Class:')
+	func('writes', 'storyText', $dhCh_Class['Player'])
+	
+	func('Screen', 'Update')
+end
+
+--- DH_Quest_CharacterCreation ------------------------

+ 4 - 5
locations/DH_Quest_NewBeginnings.qsrc

@@ -40,7 +40,7 @@ if $ARGS[0] = 'So Cold':
 	func('Screen', 'Update')
 	
 	$dhDyn['MyName'] = {
-		$_playerName = input("What was my name?")
+		$_playerName = input('What was my name?')
 		$_playerName = iif($_playerName = '', 'Ash', $_playerName) &! Default name.
 		!! Check if valid name
 		
@@ -214,19 +214,18 @@ if $ARGS[0] = 'Path of the Brute':
 	func('writes', 'storyText', 'After a moment, the shock passes and the influx of strength fades, the door feels heavy and it takes all that you have in order to drop the door away from your feet.')
 	func('writes', 'storyText', 'Exhausted, you can''t help but fall against the bars of your cell to catch your breath.')
 	
-	gs 'DH_Classes', 'ChangeClass', 'Player', 'Beater'
-	
 	func('writeP', 'storyText', 'You''ve unlocked the')
-	func('writes', 'storyText', 'Beater', 'c:red')
+	func('writes', 'storyText', 'Brute', 'c:red')
 	func('writes', 'storyText', 'class!')
 	
 	func('writeN', 'storyText', 'You''ve unlocked the')
 	func('writes', 'storyText', 'Rage', 'c:red')
 	func('writes', 'storyText', 'meter!')
 	
+	gs 'DH_Classes', 'ChangeClass', 'Player', 'Brute'
 	gs 'DH_Classes', 'PrintStatChanges', 'storyText'
-	
 	gs 'DH_QuestManager', 'UpdateStoryCard'
+	
 	func('Screen', 'Update')
 	
 	ACT 'Exit Game': gt 'DH_Main', 'Exit'

+ 31 - 31
locations/DH_Races.qsrc

@@ -3,8 +3,8 @@ if $ARGS[0] = 'Init':
 end
 
 if $ARGS[0] = 'ChangeRace':
-$.newRace   = $ARGS[1]
-	$.character = $ARGS[2]
+	$.character = $ARGS[1]
+	$.newRace   = $ARGS[2]
 	
 	IF $.newRace = '' or $.character = '': exit
 	
@@ -12,13 +12,13 @@ $.newRace   = $ARGS[1]
 	gs 'DH_Races', $dhCh_RaceFull[$.character]
 	
 	!! Reset stats
-	dhCh_Agi[$.character]  -= dhRc_Agi
-	dhCh_Cha[$.character]  -= dhRc_Cha
-	dhCh_Int[$.character]  -= dhRc_Int
-	dhCh_Lore[$.character] -= dhRc_Lore
-	dhCh_Luck[$.character] -= dhRc_Luck
-	dhCh_Perd[$.character] -= dhRc_Per
-	dhCh_Str[$.character]  -= dhRc_Str
+	dhCh_Agi[$.character] -= dhRc_Agi
+	dhCh_Cha[$.character] -= dhRc_Cha
+	dhCh_Int[$.character] -= dhRc_Int
+	dhCh_Lor[$.character] -= dhRc_Lor
+	dhCh_Luc[$.character] -= dhRc_Luc
+	dhCh_Per[$.character] -= dhRc_Per
+	dhCh_Str[$.character] -= dhRc_Str
 	
 	!! Get new stats
 	gs 'DH_Races', $.newRace
@@ -28,13 +28,13 @@ $.newRace   = $ARGS[1]
 	$dhCh_SubRace[$.character]  = $dhRc_SubRace
 	$dhCh_Gender[$.character]   = $dhRc_Gender
 	
-	dhCh_Agi[$.character]  += dhRc_Agi
-	dhCh_Cha[$.character]  += dhRc_Cha
-	dhCh_Int[$.character]  += dhRc_Int
-	dhCh_Lore[$.character] += dhRc_Lore
-	dhCh_Luck[$.character] += dhRc_Luck
-	dhCh_Perd[$.character] += dhRc_Per
-	dhCh_Str[$.character]  += dhRc_Str
+	dhCh_Agi[$.character] += dhRc_Agi
+	dhCh_Cha[$.character] += dhRc_Cha
+	dhCh_Int[$.character] += dhRc_Int
+	dhCh_Lor[$.character] += dhRc_Lor
+	dhCh_Luc[$.character] += dhRc_Luc
+	dhCh_Per[$.character] += dhRc_Per
+	dhCh_Str[$.character] += dhRc_Str
 	
 end
 
@@ -48,7 +48,7 @@ if $ARGS[0] = 'CanUseClass':
 	
 	!! Get class lock
 	gs 'DH_Races', $.raceFull
-	if ARRPOS($dhRc_ClassLock, $.class) == -1:
+	if ARRPOS('$dhRc_ClassLock', $.class) = -1:
 		RESULT = True
 	else:
 		RESULT = False
@@ -65,13 +65,13 @@ if $ARGS[0] = 'HumanMale':
 	KILLVAR 'dhRc_ClassLock'
 	$dhRc_ClassLock[0] = ''
 	
-	dhRc_Agi  = 5
-	dhRc_Cha  = 7
-	dhRc_Int  = 5
-	dhRc_Lore = 5
-	dhRc_Luck = 5
-	dhRc_Per  = 3
-	dhRc_Str  = 6
+	dhRc_Agi = 5
+	dhRc_Cha = 7
+	dhRc_Int = 5
+	dhRc_Lor = 5
+	dhRc_Luc = 5
+	dhRc_Per = 3
+	dhRc_Str = 6
 end
 
 if $ARGS[0] = 'HumanFemale':
@@ -83,13 +83,13 @@ if $ARGS[0] = 'HumanFemale':
 	KILLVAR 'dhRc_ClassLock'
 	$dhRc_ClassLock[0] = ''
 	
-	dhRc_Agi  = 5
-	dhRc_Cha  = 7
-	dhRc_Int  = 5
-	dhRc_Lore = 5
-	dhRc_Luck = 5
-	dhRc_Per  = 3
-	dhRc_Str  = 4
+	dhRc_Agi = 5
+	dhRc_Cha = 7
+	dhRc_Int = 5
+	dhRc_Lor = 5
+	dhRc_Luc = 5
+	dhRc_Per = 3
+	dhRc_Str = 4
 end
 
 if $ARGS[0] = 'ElfMale':

+ 16 - 34
locations/ScreenFunctions.qsrc

@@ -3,6 +3,8 @@
 scr_AutoUpdate = False
 $scr_DefaultId = 'screen'
 $scr_Layout = 'Default'
+$scr_bcolor = '#FFFFFF'
+$scr_fcolor = '#000000'
 $Scr_HTML['Default'] = ''
 
 KILLVAR '$scr_EventClear_'
@@ -20,9 +22,9 @@ KILLVAR '$scr_Show'
 
 if $ARGS[0] = 'Update':
 	$scr_Layout = iif($scr_Layout = '', 'Default', $scr_Layout)
-	$_F_layout    = iif($ARGS[1] = '', $scr_Layout, $ARGS[1])
+	$_F_layout  = iif($ARGS[1] = '', $scr_Layout, $ARGS[1])
 	
-	$_F_screenHTML  = '<div id="screen" style="position: absolute; top: 0; left: 0; width: 100%; z-index: -999;">'
+	$_F_screenHTML  = '<div id="screen" style="position: absolute; top: 0; left: 0; overflow-x: hidden; width: 100%; min-height: 100vh; z-index: -999; background-color: <<$scr_bcolor>>; color: <<$scr_fcolor>>; padding: 40px; box-sizing: border-box;">'
 	$_F_screenHTML += $Scr_HTML[$_F_layout]
 	$_F_screenHTML += '</div>'
 	
@@ -53,7 +55,6 @@ if $ARGS[0] = 'Update':
 		jump 'Loop Screen_Update_Replacements'
 	end
 	
-	
 	_F_i = 0
 	:Loop Screen_Update_Show
 	if (_F_i < ARRSIZE('$scr_Show')):
@@ -151,26 +152,7 @@ if $ARGS[0] = 'ClearAll':
 	_F_i = 0
 	:Loop Screen_ClearAll_Events
 	if (_F_i < ARRSIZE('$scr_EventClear_')):
-		KILLVAR '$_F_EventArgs_'
-		$_F_Event = $scr_EventClear_[_F_i]
-		
-		:Loop Screen_ClearAll_EventArgs
-		if (len('$scr_EventClear_[<<_F_i>>]') > 0):
-			_F_position = strPos($_F_Event, ',')
-			
-			if (_F_position ! 0 and ARRSIZE('$_F_EventArgs_') < 9):
-				$_F_EventArgs_[] = mid($_F_Event, 1, _F_position - 1)
-				$_F_Event = trim(mid($_F_Event, _F_position + 1))
-				
-				_F_i2 += 1
-				jump 'Loop Screen_ClearAll_EventArgs'
-				
-			else
-				$_F_EventArgs_[] = mid($_F_Event, 1)
-			end
-		end
-		
-		gs '<<$_F_EventArgs_[0]>>', '<<$_F_EventArgs_[1]>>', '<<$_F_EventArgs_[2]>>', '<<$_F_EventArgs_[3]>>', '<<$_F_EventArgs_[4]>>', '<<$_F_EventArgs_[5]>>', '<<$_F_EventArgs_[6]>>', '<<$_F_EventArgs_[7]>>', '<<$_F_EventArgs_[8]>>', '<<$_F_EventArgs_[9]>>'
+		gs 'DH_Functions', 'FireEvent', $scr_EventClear_[_F_i]
 		
 		_F_i += 1
 		jump 'Loop Screen_ClearAll_Events'
@@ -192,7 +174,7 @@ end
 
 if $ARGS[0] = 'Replace':
 	!! Place-holder cannot contain special characters
-	IF ($ARGS[1] = '' or $strFind($ARGS[1], '[^\w]') ! ''): exit
+	IF ($ARGS[1] = '' or strFind($ARGS[1], '[^\w]') ! ''): exit
 	
 	!! Check if replacement already exists (if so... replace it lul)
 	if (ARRPOS('$scr_Replace', $ARGS[1]) ! -1):
@@ -232,8 +214,8 @@ KILLVAR '$.F_style'
 _F_i = 2
 :Loop Write_OptionalArgs
 if (_F_i <= 9 and $ARGS[_F_i] ! ''):
-	$_F_option   = lcase(strFind($ARGS[_F_i], '(^\w+:)'))
-	$_F_argument = trim(mid($ARGS[_F_i], 3))
+	$_F_option   = lcase(strFind($ARGS[_F_i], '(^\w+[:=])'))
+	$_F_argument = trim(mid($ARGS[_F_i], len($_F_option) + 1))
 	
 	if     ($_F_option = 'c:'):
 		$.F_textColor  = iif(mid($_F_argument, 1, 1) = '-', 'color: var(-<<$_F_argument>>) !important;', 'color: <<$_F_argument>>;')
@@ -244,9 +226,9 @@ if (_F_i <= 9 and $ARGS[_F_i] ! ''):
 	elseif ($_F_option = 't:'):
 		$.F_title    = iif($_F_argument = '', '', ' title="<<$_F_argument>>"')
 		
-	elseif ($_F_option = 'prop:'):
+	elseif (mid($_F_option, len($_F_option), 1) = '='):
 		!! custom property
-		$.F_property[] = ' <<$_F_argument>>'
+		$.F_property[] = ' <<$_F_option + $_F_argument>>'
 		
 	else
 		!! custom style
@@ -309,10 +291,10 @@ KILLVAR '$.F_property'
 KILLVAR '$.F_style'
 
 _F_i = 2
-:Loop Write_OptionalArgs
+:Loop WritePara_OptionalArgs
 if (_F_i <= 9 and $ARGS[_F_i] ! ''):
-	$_F_option   = lcase(strFind($ARGS[_F_i], '(^\w+:)'))
-	$_F_argument = trim(mid($ARGS[_F_i], 3))
+	$_F_option   = lcase(strFind($ARGS[_F_i], '(^\w+[:=])'))
+	$_F_argument = trim(mid($ARGS[_F_i], len($_F_option) + 1))
 	
 	if     ($_F_option = 'c:'):
 		$.F_textColor  = iif(mid($_F_argument, 1, 1) = '-', 'color: var(-<<$_F_argument>>) !important;', 'color: <<$_F_argument>>;')
@@ -323,9 +305,9 @@ if (_F_i <= 9 and $ARGS[_F_i] ! ''):
 	elseif ($_F_option = 't:'):
 		$.F_title    = iif($_F_argument = '', '', ' title="<<$_F_argument>>"')
 		
-	elseif ($_F_option = 'prop:'):
+	elseif (mid($_F_option, len($_F_option), 1) = '='):
 		!! custom property
-		$.F_property[] = ' <<$_F_argument>>'
+		$.F_property[] = ' <<$_F_option + $_F_argument>>'
 		
 	else
 		!! custom style
@@ -333,7 +315,7 @@ if (_F_i <= 9 and $ARGS[_F_i] ! ''):
 	end
 	
 	_F_i += 1
-	jump 'Loop Write_OptionalArgs'
+	jump 'Loop WritePara_OptionalArgs'
 end
 
 $_F_style = ''

+ 17 - 9
resources/games/dungeonhunter/main.css

@@ -14,26 +14,31 @@
 	--bg-secondary-color: #661311;
 	--bg-secondary-value: 100%;
 	
-	--color-num: #51bae8;
+	--color-num:  #51bae8;
 	--color-gain: #e8b93a;
 	--color-lost: #7c3d26;
 	
-	--color-stat-health: #b75654;
+	--color-stat-health:  #b75654;
 	--color-stat-stamina: #5c844b;
-	--color-stat-mana: #384a72;
-	--color-stat-rage: #c1844f;
-	--color-stat-energy: #e0d476;
+	--color-stat-mana:    #384a72;
+	--color-stat-rage:    #892e2e;
+	--color-stat-energy:  #e0d476;
 	
 	--color-stat-agi: #5fbf5b;
 	--color-stat-cha: #d68bb5;
 	--color-stat-int: #684dc1;
-	--color-stat-lore: #7c27b5;
-	--color-stat-luck: #cbf4e0;
+	--color-stat-lor: #7c27b5;
+	--color-stat-luc: #cbf4e0;
 	--color-stat-per: #eaedc7;
-	--color-stat-str: #892e2e;
+	--color-stat-str: #c1844f;
+}
+
+body {
+	pointer-events: none;
 }
 
 #screen {
+	background-color: transparent !important;
 	background-image: var(--image-overlay),
 		linear-gradient(
 			var(--bg-main-color, #161311) var(--bg-main-value, 100%),
@@ -41,6 +46,8 @@
 		);
 	background-attachment: fixed;
 	background-blend-mode: screen;
+	pointer-events: initial;
+	padding: 0 !important;
 }
 
 #header {
@@ -63,6 +70,7 @@
 		rgba(0, 0, 0, 1) 40px,
 		rgba(0, 0, 0, 0) 90%
 	);
+	pointer-events: none;
 }
 
 #titleContainer {
@@ -82,7 +90,7 @@
 	width: 70%;
 	margin: auto;
 	padding: 15px;
-	margin-top: 350px;
+	padding-top: 400px;
 	padding-bottom: 60vmin;
 	text-align: justify;
 }