Compare commits

..

5 Commits

Author SHA1 Message Date
fe65680213 + add an option to have hint messages for puzzle item uses
+ add distinctly colored sprites for the second planet puzzle items
* add q2s2 message
2022-07-10 13:38:57 -06:00
0bf3437719 * add the other two missing font chars 2022-07-10 12:16:52 -06:00
a7b1e0d86e * fix pronouns.. again 2022-07-10 11:33:47 -06:00
502aaf455b + add option to add text to switches that have no markings
* change VHT_OPT_ANGLED text to fit on 4:3
* remove labels for option sections
* fix pronouns being wrong
* detect the first puzzle finish
2022-07-10 11:30:33 -06:00
2716c32826 + add option to change first person pronouns in quest log
+ add missing font characters
^ currently only &
* move quest log display to uiTick
2022-07-10 09:20:24 -06:00
12 changed files with 138 additions and 32 deletions

View File

@ -5,4 +5,7 @@ server int vht_mfrost_damagefunc = 1;
server bool vht_mbloodscourge_foilinvul = false; server bool vht_mbloodscourge_foilinvul = false;
server bool vht_player_touchshatter = true; server bool vht_player_touchshatter = true;
server bool vht_player_questlog = true; server bool vht_player_questlog = true;
user int vht_player_questlogplural = 0;
server bool vht_player_scruteswitch = true;
server bool vht_player_scrutepuzzle = true;
server int vht_monster_centaur = 2; server int vht_monster_centaur = 2;

BIN
graphics/ARTIGMB2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

BIN
graphics/ARTIGMG2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

BIN
graphics/FONTA06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

BIN
graphics/FONTA28.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 B

BIN
graphics/FONTA30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

View File

@ -10,13 +10,40 @@ VHT_MFROST_DAMAGEFUNC = "Frost Shards Damage Function";
VHT_MBLOODSCOURGE_FOILINVUL = "Bloodscourge Foils Invulnerability"; VHT_MBLOODSCOURGE_FOILINVUL = "Bloodscourge Foils Invulnerability";
VHT_PLAYER_TOUCHSHATTER = "Shatter Frozen Enemies On Touch"; VHT_PLAYER_TOUCHSHATTER = "Shatter Frozen Enemies On Touch";
VHT_PLAYER_QUESTLOG = "Enable Quest Log"; VHT_PLAYER_QUESTLOG = "Enable Quest Log";
VHT_PLAYER_QUESTLOGPLURAL = "Quest Log First-Person Pronouns (English)";
VHT_PLAYER_SCRUTESWITCH = "Add Messages For Unmarked Switches";
VHT_PLAYER_SCRUTEPUZZLE = "Add Messages For Missing Puzzle Items";
VHT_MONSTER_CENTAUR = "Centaur Behaviour"; VHT_MONSTER_CENTAUR = "Centaur Behaviour";
VHT_OPT_CONSTANT = "Constant"; VHT_OPT_CONSTANT = "Constant";
VHT_OPT_MODIFIED = "Modified"; VHT_OPT_MODIFIED = "Modified";
VHT_OPT_VANILLA = "Vanilla"; VHT_OPT_VANILLA = "Vanilla";
VHT_OPT_NOREFLECT = "No Projectile Reflection"; VHT_OPT_NOREFLECT = "No Projectile Reflection";
VHT_OPT_ANGLED = "No Reflection, Back is Vulnerable"; VHT_OPT_ANGLED = "No Reflection, Vulnerable Back";
VHT_OPT_SINGULAR = "I/me/my";
VHT_OPT_PLURAL = "we/our/us";
VHT_OPT_PLURAL2 = "we&/our&/us&";
VHT_SWI_PUZZLE0 = "it beckons for the skull of a warrior...";
VHT_SWI_PUZZLE1 = "it beckons for the heart of a serpent rider...";
VHT_SWI_PUZZLE2 = "another red gem should fit here...";
VHT_SWI_PUZZLE3 = "a green gem should fit here...";
VHT_SWI_PUZZLE4 = "another green gem should fit here...";
VHT_SWI_PUZZLE5 = "a blue gem should fit here...";
VHT_SWI_PUZZLE6 = "another blue gem should fit here...";
VHT_SWI_PUZZLE7 = "this could fit a book...";
VHT_SWI_PUZZLE8 = "this could also fit a book...";
VHT_SWI_PUZZLE9 = "this could fit a mask of some kind...";
VHT_SWI_PUZZLE10 = "the shape of the grand weapon of a fighter...";
VHT_SWI_PUZZLE11 = "the shape of the grand weapon of a cleric...";
VHT_SWI_PUZZLE12 = "the shape of the grand weapon of a mage...";
VHT_SWI_PUZZLE13 = "this could be repaired with a steel gear...";
VHT_SWI_PUZZLE14 = "this could be repaired with a bronze gear...";
VHT_SWI_PUZZLE15 = "this could be repaired with a steel and bronze gear...";
VHT_SWI_PUZZLE16 = "this could be repaired with a bronze and steel gear...";
VHT_SWI_5_1275 = "the path to the left lever opens";
VHT_SWI_5_1283 = "the path to the right lever opens";
VHT_QST_1_0 = VHT_QST_1_0 =
"@ must find the emerald key\n" "@ must find the emerald key\n"
@ -51,6 +78,10 @@ VHT_QST_2_1 =
"two more paths become available to @=:\n" "two more paths become available to @=:\n"
"- guardian of fire: %i/1\n" "- guardian of fire: %i/1\n"
"- guardian of steel: %i/2"; "- guardian of steel: %i/2";
VHT_QST_2_2 =
"the eastward guardians opened,\n"
"a parallel portal to the guardian of ice\n"
"opens on the west side.";
VHT_QST_3_0 = VHT_QST_3_0 =
"all that seems to be left here is\n" "all that seems to be left here is\n"
@ -67,3 +98,8 @@ VHT_QST_4_0 =
"there should be a lever somewhere within."; "there should be a lever somewhere within.";
VHT_QST_4_1 = VHT_QST_4_1 =
"the lever is pulled."; "the lever is pulled.";
VHT_QST_5_0 =
"there should be two levers here.";
VHT_QST_5_1 =
"the levers have been pulled.";

View File

@ -1,3 +1,9 @@
OptionValue "VhtPlural" {
0, "$VHT_OPT_SINGULAR"
1, "$VHT_OPT_PLURAL"
2, "$VHT_OPT_PLURAL2"
}
OptionValue "VhtDamageFunc" { OptionValue "VhtDamageFunc" {
0, "$VHT_OPT_VANILLA" 0, "$VHT_OPT_VANILLA"
1, "$VHT_OPT_MODIFIED" 1, "$VHT_OPT_MODIFIED"
@ -21,15 +27,21 @@ AddOptionMenu "OptionsMenu" {
OptionMenu "VhtMenu" { OptionMenu "VhtMenu" {
Title "$OPTMNU_VHT" Title "$OPTMNU_VHT"
StaticText "Weapons"
Option "$VHT_FAXE_PROJECTILE", "vht_faxe_projectile", "OnOff" Option "$VHT_FAXE_PROJECTILE", "vht_faxe_projectile", "OnOff"
StaticText ""
Option "$VHT_MWAND_DAMAGEFUNC", "vht_mwand_damagefunc", "VhtDamageFunc" Option "$VHT_MWAND_DAMAGEFUNC", "vht_mwand_damagefunc", "VhtDamageFunc"
ScaleSlider "$VHT_MWAND_SPEED", "vht_mwand_speed", 0, 6, 1, "$VHT_OPT_VANILLA" ScaleSlider "$VHT_MWAND_SPEED", "vht_mwand_speed", 0, 6, 1, "$VHT_OPT_VANILLA"
Option "$VHT_MFROST_DAMAGEFUNC", "vht_mfrost_damagefunc", "VhtDamageFunc" Option "$VHT_MFROST_DAMAGEFUNC", "vht_mfrost_damagefunc", "VhtDamageFunc"
Option "$VHT_MBLOODSCOURGE_FOILINVUL", "vht_mbloodscourge_foilinvul", "OnOff" Option "$VHT_MBLOODSCOURGE_FOILINVUL", "vht_mbloodscourge_foilinvul", "OnOff"
StaticText "Players"
StaticText ""
Option "$VHT_PLAYER_TOUCHSHATTER", "vht_player_touchshatter", "OnOff" Option "$VHT_PLAYER_TOUCHSHATTER", "vht_player_touchshatter", "OnOff"
Option "$VHT_PLAYER_QUESTLOG", "vht_player_questlog", "OnOff" Option "$VHT_PLAYER_QUESTLOG", "vht_player_questlog", "OnOff"
StaticText "Monsters" Option "$VHT_PLAYER_QUESTLOGPLURAL", "vht_player_questlogplural", "VhtPlural"
Option "$VHT_PLAYER_SCRUTESWITCH", "vht_player_scruteswitch", "OnOff"
Option "$VHT_PLAYER_SCRUTEPUZZLE", "vht_player_scrutepuzzle", "OnOff"
StaticText ""
Option "$VHT_MONSTER_CENTAUR", "vht_monster_centaur", "VhtCentaurBehaviour" Option "$VHT_MONSTER_CENTAUR", "vht_monster_centaur", "VhtCentaurBehaviour"
} }

BIN
sprites/AGB2A0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

BIN
sprites/AGG2A0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

View File

@ -1,6 +1,6 @@
class VhtEvents : StaticEventHandler { class VhtEvents : StaticEventHandler {
bool m_useQuestLog; ui bool m_useQuestLog;
string m_questLog; ui string m_questLog;
VhtFnPlayerInv m_fGetQuests; VhtFnPlayerInv m_fGetQuests;
VhtQuestHolder vhtGetQuests() const { VhtQuestHolder vhtGetQuests() const {
return m_fGetQuests.vhtRun() ? VhtQuestHolder(m_fGetQuests.m_result) : null; return m_fGetQuests.vhtRun() ? VhtQuestHolder(m_fGetQuests.m_result) : null;
@ -30,13 +30,45 @@ class VhtEvents : StaticEventHandler {
} }
} }
} }
override void worldTick() { override void uiTick() {
m_useQuestLog = vht_player_questlog; m_useQuestLog = vht_player_questlog;
if(m_useQuestLog) {
let qh = vhtGetQuests();
if(qh) {
m_questLog = qh.vhtDescribe();
}
}
}
override void worldTick() {
let qh = vhtGetQuests(); let qh = vhtGetQuests();
if(qh) { if(qh) {
qh.vhtTick(); qh.vhtTick();
if(m_useQuestLog) { }
m_questLog = qh.vhtDescribe(); }
override void worldLinePreActivated(WorldEvent e) {
if(vht_player_scrutepuzzle) {
if(e.activatedLine.special == UsePuzzleItem) {
int itemNum = e.activatedLine.args[0];
bool any = false;
for(let item = e.thing.inv; item; item = item.inv) {
let pi = PuzzleItem(item);
if(pi && pi.puzzleItemNumber == itemNum) {
any = true;
break;
}
}
if(!any) {
Console.midPrint(null, "$VHT_SWI_PUZZLE" .. itemNum, true);
}
}
}
}
override void worldLineActivated(WorldEvent e) {
if(vht_player_scruteswitch) {
let which = "VHT_SWI_" .. level.levelNum .. "_" .. e.activatedLine.index();
let loc = StringTable.localize(which, false);
if(loc != which) {
Console.midPrint(null, loc, true);
} }
} }
} }

View File

@ -1,6 +1,11 @@
class VhtQuest abstract play { class VhtQuest abstract play {
int m_mapNum, m_step; int m_mapNum, m_step;
VhtHubQuest m_hubQuest; VhtHubQuest m_hubQuest;
static const string m_pronouns[] = {
"I", "my", "me",
"we", "our", "us",
"we&", "our&", "us&"
};
virtual VhtQuest vhtInit(VhtHubQuest hubQuest) { virtual VhtQuest vhtInit(VhtHubQuest hubQuest) {
m_mapNum = level.levelNum; m_mapNum = level.levelNum;
m_hubQuest = hubQuest; m_hubQuest = hubQuest;
@ -9,11 +14,11 @@ class VhtQuest abstract play {
virtual void vhtTick() {} virtual void vhtTick() {}
virtual void vhtTravelled() {} virtual void vhtTravelled() {}
virtual void vhtPreTravelled() {} virtual void vhtPreTravelled() {}
virtual string vhtDescribe() { virtual ui string vhtDescribe(int pronouns) {
let s = StringTable.localize("$VHT_QST_" .. m_mapNum .. "_" .. m_step); let s = StringTable.localize("$VHT_QST_" .. m_mapNum .. "_" .. m_step);
s.replace("@=", multiplayer ? "us" : "me"); s.replace("@=", m_pronouns[2 + 3 * pronouns]);
s.replace("@'", multiplayer ? "our" : "my"); s.replace("@'", m_pronouns[1 + 3 * pronouns]);
s.replace("@", multiplayer ? "we" : "i"); s.replace("@", m_pronouns[0 + 3 * pronouns]);
return s; return s;
} }
LevelInfo vhtLevelInfo() const { LevelInfo vhtLevelInfo() const {
@ -57,16 +62,11 @@ class VhtQuest1 : VhtHubQuest {
} }
override void vhtTick() { override void vhtTick() {
switch(m_step) { switch(m_step) {
case 0: case 0: if(m_fStep0.vhtRun()) {m_step = 1;} break;
if(m_fStep0.vhtRun()) {m_step = 1;} case 1: if(m_fStep1.vhtRun()) {m_step = 2;} // fall through
break;
case 1:
if(m_fStep1.vhtRun()) {m_step = 2;}
// fall through
case 2: case 2:
// quest 1 step 2: ring the bell // quest 1 step 2: ring the bell
let ln = vhtGetLine(2); if(!(vhtGetLine(2).flags & Line.ML_BLOCKING)) {m_step = 3;}
if(ln && !(ln.flags & Line.ML_BLOCKING)) {m_step = 3;}
break; break;
} }
} }
@ -83,6 +83,15 @@ class VhtQuest2 : VhtHubQuest {
} }
override void vhtTick() { override void vhtTick() {
m_fFlameMask.vhtRun(); m_fFlameMask.vhtRun();
switch(m_step) {
case 1:
if(m_guardianOfFire == 1 && m_guardianOfSteel == 2) {
m_step = 2;
m_guardianOfFire = 0;
m_guardianOfSteel = 0;
}
break;
}
} }
override void vhtTravelled() { override void vhtTravelled() {
// quest 2 step 0: return from guardian of ice // quest 2 step 0: return from guardian of ice
@ -90,8 +99,8 @@ class VhtQuest2 : VhtHubQuest {
m_step = 1; m_step = 1;
} }
} }
override string vhtDescribe() { override string vhtDescribe(int pronouns) {
let s = super.vhtDescribe(); let s = super.vhtDescribe(pronouns);
if(m_step == 1) { if(m_step == 1) {
s = string.format(s, m_guardianOfFire, m_guardianOfSteel); s = string.format(s, m_guardianOfFire, m_guardianOfSteel);
} }
@ -111,10 +120,6 @@ class VhtQuest3 : VhtQuest {
// quest 4: guardian of fire // quest 4: guardian of fire
class VhtQuest4 : VhtQuest { class VhtQuest4 : VhtQuest {
override VhtQuest vhtInit(VhtHubQuest hubQuest) {
super.vhtInit(hubQuest);
return self;
}
override void vhtTick() { override void vhtTick() {
if(level.levelNum == m_mapNum) { if(level.levelNum == m_mapNum) {
switch(m_step) { switch(m_step) {
@ -128,8 +133,8 @@ class VhtQuest4 : VhtQuest {
} }
} }
} }
override string vhtDescribe() { override string vhtDescribe(int pronouns) {
let s = super.vhtDescribe(); let s = super.vhtDescribe(pronouns);
if(!VhtQuest2(m_hubQuest).m_fFlameMask.m_result) { if(!VhtQuest2(m_hubQuest).m_fFlameMask.m_result) {
s = s .. StringTable.localize("$VHT_QST_4_FireMask"); s = s .. StringTable.localize("$VHT_QST_4_FireMask");
} }
@ -138,7 +143,24 @@ class VhtQuest4 : VhtQuest {
} }
// quest 5: guardian of steel // quest 5: guardian of steel
class VhtQuest5 : VhtQuest {} class VhtQuest5 : VhtQuest {
override void vhtTick() {
if(level.levelNum == m_mapNum) {
switch(m_step) {
case 0:
// quest 5 step 0: press the switches
int levers = 0;
levers += vhtCheckLever(1);
levers += vhtCheckLever(2);
if(levers == 2) {
m_step = 1;
}
VhtQuest2(m_hubQuest).m_guardianOfSteel = levers;
break;
}
}
}
}
// quest 6: bright crucible // quest 6: bright crucible
class VhtQuest6 : VhtQuest {} class VhtQuest6 : VhtQuest {}
@ -215,8 +237,9 @@ class VhtQuestHolder : Inventory {
} }
} }
} }
string vhtDescribe() { ui string vhtDescribe() {
string s = ""; string s = "";
int pronouns = multiplayer ? 1 : clamp(CVar.getCVar('vht_player_questlogplural', players[consolePlayer]).getInt(), 0, 2);
for(int i = 0, j = m_quests.size(); i < j; ++i) { for(int i = 0, j = m_quests.size(); i < j; ++i) {
if(m_quests[i]) { if(m_quests[i]) {
s.appendFormat( s.appendFormat(
@ -225,7 +248,7 @@ class VhtQuestHolder : Inventory {
m_quests[i].vhtLevelInfo().levelName, m_quests[i].vhtLevelInfo().levelName,
false false
), ),
m_quests[i].vhtDescribe() m_quests[i].vhtDescribe(pronouns)
); );
} }
} }