From 175e0a206e1b12506e6dd7fd2a5730b79ebbc3e1 Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Tue, 5 Jun 2018 23:07:46 -0700 Subject: [PATCH 01/11] Battle Arena Illegal/Military/Shatter achievements --- TransCore/BattleArena.xml | 19 ++++++++++++++++++- TransCore/BattleArenaChallenger.xml | 8 ++++++++ TransCore/BattleArenaFight.xml | 12 ++++++++++++ TransCore/RPGCommonText.xml | 1 + 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/TransCore/BattleArena.xml b/TransCore/BattleArena.xml index 7315342b..0d2fe934 100644 --- a/TransCore/BattleArena.xml +++ b/TransCore/BattleArena.xml @@ -172,6 +172,8 @@ (block ( (arenaRank (typGetData &stBattleArena; 'arenaRank)) (katamiStatus (typGetData &stBattleArena; 'katamiStatus)) + (usedIllegal (typGetData &stBattleArena; 'usedIllegal)) + (usedMilitary (typGetData &stBattleArena; 'usedMilitary)) ) (append (if (and arenaRank (!= arenaRank 'rookie)) @@ -189,7 +191,22 @@ (typTranslate &unidCommonText; 'achievementsAndRegrets) )) ) - + + (if usedIllegal + (list (list + "Used illegal items in the Arena" + Nil + (typTranslate &unidCommonText; 'notes) + )) + ) + (if usedMilitary + (list (list + "Used military items in the Arena" + Nil + (typTranslate &unidCommonText; 'notes) + )) + ) + ; Missions (rpgMissionAchievements &stBattleArena; "* +gladiatorFight;") ) diff --git a/TransCore/BattleArenaChallenger.xml b/TransCore/BattleArenaChallenger.xml index 09e26321..1d0e4bd7 100644 --- a/TransCore/BattleArenaChallenger.xml +++ b/TransCore/BattleArenaChallenger.xml @@ -39,6 +39,11 @@ > + + (if (typGetData &msBattleArenaChallenger; 'shatteredSlicer) + (list (list "Invoked Shatter on The Slicer in the Arena" Nil (typTranslate &unidCommonText; 'notes))) + ) + (switch ; This mission only works in Rigel Aurelius @@ -83,6 +88,9 @@ (block Nil + (if (eq (msnGetData gSource 'destroyReason) 'shatter) + (typSetData &msBattleArenaChallenger; 'shatteredSlicer True) + ) (msnSetData gSource 'nextSoundTrack &muArenaChampion;) (typFireObjEvent &msBattleArenaFight; gSource 'OnCompleted) (switch diff --git a/TransCore/BattleArenaFight.xml b/TransCore/BattleArenaFight.xml index cef64a62..43c32f61 100644 --- a/TransCore/BattleArenaFight.xml +++ b/TransCore/BattleArenaFight.xml @@ -126,6 +126,15 @@ (arenaObj (objGetObjByID (msnGetProperty gSource 'ownerID))) (theShip (objGetObjByID (msnGetData gSource 'opponentID))) ) + + ; Note whether player is using military or illegal items + (if (objGetItems gPlayerShip "*I +military;") + (typSetData &stBattleArena; 'usedMilitary True) + ) + (if (objGetItems gPlayerShip "*I +illegal;") + (typSetData &stBattleArena; 'usedIllegal True) + ) + ; Position the opponent at the right spot (objMoveTo theShip (sysVectorPolarOffset arenaObj (random 204 336) 45)) (objResume theShip) @@ -360,6 +369,9 @@ (block ( (fightTime (msnGetData gSource 'fightTime)) ) + + (msnSetData gSource 'destroyReason aDestroyReason) + ; Adjust timers in case we miss the window (if (gr (msnGetData gSource 'timeTo50) fightTime) (msnSetData gSource 'timeTo50 fightTime)) (if (gr (msnGetData gSource 'timeTo25) fightTime) (msnSetData gSource 'timeTo25 fightTime)) diff --git a/TransCore/RPGCommonText.xml b/TransCore/RPGCommonText.xml index 0b520607..e5a1c1b2 100644 --- a/TransCore/RPGCommonText.xml +++ b/TransCore/RPGCommonText.xml @@ -36,6 +36,7 @@ achievements & regrets missions & activities + notes From d5d8e973d6f77e758f91c0dc5210896275d55719 Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Tue, 5 Jun 2018 23:08:38 -0700 Subject: [PATCH 02/11] Track player items confiscated in achievements --- TransCore/Code.xml | 10 +++++++++- TransCore/Commonwealth.xml | 14 ++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/TransCore/Code.xml b/TransCore/Code.xml index 37dc40f2..ce84b412 100644 --- a/TransCore/Code.xml +++ b/TransCore/Code.xml @@ -140,6 +140,7 @@ (block (theList resurrectCount totalGMProfit totalArmsProfit totalEquipProfit totalMedsProfit totalLuxProfit totalIllegalProfit + totalItemsConfiscated friendlyShipsDestroyed friendlyStationsDestroyed systemData neverBacktracked slavesFreed slaveSales @@ -168,6 +169,8 @@ (plyGetItemStat gPlayer "itemsBoughtValue" "*~wsam +Illegal")) ) + (setq totalItemsConfiscated (objGetData gPlayerShip 'totalConfiscatedList)) + ; Conducts (setq systemData (plyGetStat gPlayer "systemData")) (setq neverBacktracked (not (filter systemData theData (not (eq (item theData 1) (item theData 2)))))) @@ -254,6 +257,10 @@ (list (list "Profit on ship's equipment" totalEquipProfit "commerce")) ) + (if totalItemsConfiscated + (map (@ totalItemsConfiscated) theItemName (list theItemName (@ totalItemsConfiscated theItemName) "items confiscated")) + ) + ; Slave sales (if slaveSales (list (list "Profit on slave sales" slaveSales "commerce")) @@ -264,7 +271,8 @@ (list (list "Slaves freed" slavesFreed "missions & activities")) ) )) - + + theList ) )) diff --git a/TransCore/Commonwealth.xml b/TransCore/Commonwealth.xml index 96057528..26512635 100644 --- a/TransCore/Commonwealth.xml +++ b/TransCore/Commonwealth.xml @@ -1609,7 +1609,7 @@ - (block (desc itemToRemove itemsToConfiscate) + (block (desc itemToRemove itemsToConfiscate playerData) ; If we don't have a smuggler's cargo hold, then we confiscate ; all illegal items. @@ -1627,11 +1627,17 @@ )) ) - ; Remove items + (setq recordList (objGetData gPlayerShip 'totalConfiscatedList)) + ; Remove items (and track losses at the player's expense) (enum itemsToConfiscate itemToRemove - (objRemoveItem gPlayerShip itemToRemove) + (block (itemName) + (setq itemName (itmGetName itemToRemove (list 'plural 'actual))) + (set@ recordList itemName (add (@ recordList itemName) (itmGetCount itemToRemove))) + (objRemoveItem gPlayerShip itemToRemove) + ) ) - + (objSetData gPlayerShip 'totalConfiscatedList recordList) + ; Compose text (setq desc "Commonwealth Customs has inspected your ship's cargo hold and confiscated ") (if (eq (count itemsToConfiscate) 1) From 3417bb38a31f7cac0a7bc1f60f71f68a4293ea8b Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Wed, 6 Jun 2018 15:50:36 -0700 Subject: [PATCH 03/11] Note when player uses alien devices in the Arena --- TransCore/BattleArena.xml | 8 ++++++++ TransCore/BattleArenaFight.xml | 3 +++ 2 files changed, 11 insertions(+) diff --git a/TransCore/BattleArena.xml b/TransCore/BattleArena.xml index 0d2fe934..6890a889 100644 --- a/TransCore/BattleArena.xml +++ b/TransCore/BattleArena.xml @@ -174,6 +174,7 @@ (katamiStatus (typGetData &stBattleArena; 'katamiStatus)) (usedIllegal (typGetData &stBattleArena; 'usedIllegal)) (usedMilitary (typGetData &stBattleArena; 'usedMilitary)) + (usedAlien (typGetData &stBattleArena; 'usedAlien)) ) (append (if (and arenaRank (!= arenaRank 'rookie)) @@ -206,6 +207,13 @@ (typTranslate &unidCommonText; 'notes) )) ) + (if usedAlien + (list (list + "Used alien items in the Arena" + Nil + (typTranslate &unidCommonText; 'notes) + )) + ) ; Missions (rpgMissionAchievements &stBattleArena; "* +gladiatorFight;") diff --git a/TransCore/BattleArenaFight.xml b/TransCore/BattleArenaFight.xml index 43c32f61..50adac42 100644 --- a/TransCore/BattleArenaFight.xml +++ b/TransCore/BattleArenaFight.xml @@ -134,6 +134,9 @@ (if (objGetItems gPlayerShip "*I +illegal;") (typSetData &stBattleArena; 'usedIllegal True) ) + (if (objGetItems gPlayerShip "*I +alien;") + (typSetData &stBattleArena; 'usedAlien True) + ) ; Position the opponent at the right spot (objMoveTo theShip (sysVectorPolarOffset arenaObj (random 204 336) 45)) From b2f3d9ea315204a4c7b9b69e3a46d831b2cc5f16 Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Wed, 6 Jun 2018 15:51:56 -0700 Subject: [PATCH 04/11] Note player's kills using Penitent Cannon --- TransCore/Penitents.xml | 71 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/TransCore/Penitents.xml b/TransCore/Penitents.xml index 9e0127ab..a8f8263f 100644 --- a/TransCore/Penitents.xml +++ b/TransCore/Penitents.xml @@ -536,8 +536,77 @@ + + + (block ( + (killsPenitent (objGetData gPlayerShip 'absolutionKillsPenitent)) + (killsEnemy (objGetData gPlayerShip 'absolutionKillsEnemy)) + (killsFriend (objGetData gPlayerShip 'absolutionKillsFriend)) + (killsTotal (add killsPenitent killsEnemy killsFriend)) + ) + (append + (if killsTotal + (list (list + "Ships destroyed by Penitent Cannon" + killsTotal + (typTranslate &unidCommonText; 'notes) + 1 + )) + ) + (if killsPenitent + (list (list + "Penitents destroyed by Penitent Cannon" + killsPenitent + (typTranslate &unidCommonText; 'notes) + 2 + )) + ) + (if killsEnemy + (list (list + (if killsPenitent + "Other enemies destroyed by Penitent Cannon" + "Enemies destroyed by Penitent Cannon" + ) + killsEnemy + (typTranslate &unidCommonText; 'notes) + 3 + )) + ) + (if killsFriend + (list (list + "Friends destroyed by Penitent Cannon" + killsFriend + (typTranslate &unidCommonText; 'notes) + 4 + )) + ) + ) + ) + + + ; Track the player's kills for this item + (switch + (neq aDestroyer gPlayerShip) + Nil + + (not (objIsShip aObjDestroyed)) + Nil + + ; Track irony + (objHasAttribute aObjDestroyed 'penitents) + (objIncData gPlayerShip 'absolutionKillsPenitent) + + ; Enemies + (objIsEnemy gPlayerShip aObjDestroyed) + (objIncData gPlayerShip 'absolutionKillsEnemy) + + ; Friends + (objIncData gPlayerShip 'absolutionKillsFriend) + ) + + - + Date: Thu, 7 Jun 2018 21:31:34 -0700 Subject: [PATCH 05/11] autons/wingmen track kills and react to them (requires OnDestroyObj) Autons and wingmen now track their kill count. They add to the player's total "kills by auton" or "kills by wingmen" stat. They also display a 'DestroyedTarget message when they destroy a target. --- TransCore/RPGAutons.xml | 13 +++++++++++++ TransCore/RPGWingmen.xml | 16 ++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/TransCore/RPGAutons.xml b/TransCore/RPGAutons.xml index 6703fccb..61c31910 100644 --- a/TransCore/RPGAutons.xml +++ b/TransCore/RPGAutons.xml @@ -497,6 +497,18 @@ ) ) + + + (if (objGetProperty gSource 'playerWingman) + (block Nil + (if (eq (objGetTarget gSource) aObjDestroyed) + (objSendMessage gSender gSource (objTranslate gSource 'DestroyedTarget)) + ) + (objSetTypeData gSource 'kills (add (objGetTypeData gSource 'kills))) + (objIncData gPlayerShip 'killsByAutons) + ) + ) + ; If we returned to a ship or non-gate station, convert back to an item @@ -602,6 +614,7 @@ "Auton order acknowledged" (objTranslate gSource 'DeployAckString { autonName:(objGetName auton 0x01) } ) "%autonName% online" + "Target destroyed" "Not enough space in cargo hold to return to ship" "Auton order acknowledged" diff --git a/TransCore/RPGWingmen.xml b/TransCore/RPGWingmen.xml index cecc1c98..9af89cf7 100644 --- a/TransCore/RPGWingmen.xml +++ b/TransCore/RPGWingmen.xml @@ -246,6 +246,7 @@ "" ) + "Target neutralized" "Acknowledged" "Unable to comply" "Unable to comply" @@ -267,7 +268,6 @@ "Watch your targets!" "Ready" Wingman killed - %name% refuses to switch to an inferior ship. @@ -348,7 +348,7 @@ (sysAddObjRecurringTimerEvent 60 gSource "OnBehavior") ) - + (switch (eq (objGetCharacterData gSource 'status) 'returnedHome) @@ -363,6 +363,18 @@ ) ) + + + (if (objGetProperty gSource 'playerWingman) + (block Nil + (if (eq (objGetTarget gSource) aObjDestroyed) + (objSendMessage gSender gSource (objTranslate gSource 'DestroyedTarget)) + ) + (objSetCharacterData gSource 'kills (add (objGetCharacterData gSource 'kills) 1)) + (objIncData gPlayerShip 'killsByWingmen) + ) + ) + (if (eq (objGetData gSource "behavior") 'goingHome) From 50df866a94a82dc2483458c4c148297f59ac5afa Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Thu, 7 Jun 2018 21:33:45 -0700 Subject: [PATCH 06/11] Add "autons and wingmen" achievement category This category is for tracking auton/wingman statistics such as kill counts. --- TransCore/Code.xml | 11 +++++++++++ TransCore/Jenna.xml | 12 ++++++++++-- TransCore/RPGCommonText.xml | 1 + TransCore/Rama.xml | 10 +++++++++- TransCore/Volkov.xml | 11 +++++++++-- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/TransCore/Code.xml b/TransCore/Code.xml index ce84b412..ff476ec6 100644 --- a/TransCore/Code.xml +++ b/TransCore/Code.xml @@ -142,6 +142,7 @@ totalGMProfit totalArmsProfit totalEquipProfit totalMedsProfit totalLuxProfit totalIllegalProfit totalItemsConfiscated friendlyShipsDestroyed friendlyStationsDestroyed + killsByAutons killsByWingmen systemData neverBacktracked slavesFreed slaveSales neverReachedBA neverReachedStK neverReachedJiangs neverReachedPointJuno neverReachedHeretic) @@ -177,6 +178,9 @@ (setq friendlyShipsDestroyed (plyGetStat gPlayer "friendlyShipsDestroyed")) (setq friendlyStationsDestroyed (plyGetStat gPlayer "friendlyStationsDestroyed")) + (setq killsByAutons (objGetData gPlayerShip 'killsByAutons)) + (setq killsByWingmen (objGetData gPlayerShip 'killsByWingmen)) + ; Exploration (setq neverReachedBA (not (find systemData "BA" 0))) (setq neverReachedStK (not (find systemData "SK" 0))) @@ -217,6 +221,13 @@ (list (list "Never destroyed friendly stations" Nil "conducts")) ) ) + + (if killsByAutons + (list (list "Kills by autons" killsByAutons (typTranslate &unidCommonText; 'autonsAndWingmen) -1)) + ) + (if killsByWingmen + (list (list "Kills by wingmen" killsByWingmen (typTranslate &unidCommonText; 'autonsAndWingmen) -1)) + ) ; Exploration (if neverReachedBA diff --git a/TransCore/Jenna.xml b/TransCore/Jenna.xml index 09655c5b..1e1c95ad 100644 --- a/TransCore/Jenna.xml +++ b/TransCore/Jenna.xml @@ -60,6 +60,7 @@ "\"Good as new!\"" "\"I got it!\"" "\"Roger, I'm inbound\"" + "\"Done!\"" "\"Roger, I'm inbound\"" "\"Aren't they the good guys?\"" "\"Yeah, right!\"" @@ -79,7 +80,6 @@ "\"Hey, watch it!\"" "\"Ready for action, boss\"" "You have a sad feeling for a moment, then it passes" - (list { @@ -112,8 +112,9 @@ - (block (theList status) + (block (theList status kills) (setq status (typGetData &chJenna; "status")) + (setq kills (typGetData &chJenna; 'kills)) (if status (setq theList (list @@ -131,10 +132,17 @@ ) )) ) + (if kills + (setq theList (append theList + (list (list "Kills by Jenna" kills (typTranslate &unidCommonText; 'autonsAndWingmen) 3)) + )) + ) theList ) + + (sysCreateShip &scRoninJenna; (@ gData 'pos) &svCommonwealth;) diff --git a/TransCore/RPGCommonText.xml b/TransCore/RPGCommonText.xml index e5a1c1b2..53d4361a 100644 --- a/TransCore/RPGCommonText.xml +++ b/TransCore/RPGCommonText.xml @@ -37,6 +37,7 @@ achievements & regrets missions & activities notes + autons & wingmen diff --git a/TransCore/Rama.xml b/TransCore/Rama.xml index ea5029a1..2f2465cc 100644 --- a/TransCore/Rama.xml +++ b/TransCore/Rama.xml @@ -54,6 +54,7 @@ "\"My ship's as good as new\"" "\"Target acquired\"" "\"Acknowledged\"" + "\"Target destroyed\"" "\"Acknowledged\"" "\"I won't kill innocents!\"" "\"Someday, perhaps...\"" @@ -132,8 +133,9 @@ - (block (theList status) + (block (theList status kills) (setq status (typGetGlobalData &chRama; "status")) + (setq kills (typGetData &chRama; 'kills)) (if status (setq theList (list @@ -152,6 +154,12 @@ )) ) + (if kills + (setq theList (append theList + (list (list "Kills by Rama" kills (typTranslate &unidCommonText; 'autonsAndWingmen) 4)) + )) + ) + theList ) diff --git a/TransCore/Volkov.xml b/TransCore/Volkov.xml index de0504e1..b678eedf 100644 --- a/TransCore/Volkov.xml +++ b/TransCore/Volkov.xml @@ -242,6 +242,7 @@ "\"Good! Armor is repaired\"" "\"Da! Target acquired\"" "\"Da! Returning now\"" + "\"Target destroyed\"" "\"Da! Returning now\"" "\"Helena would not want me to\"" "\"Is joke?\"" @@ -296,8 +297,9 @@ - (block (theList status) - (setq status (typGetGlobalData &chVolkov; "status")) + (block (theList status kills) + (setq status (typGetGlobalData &chVolkov; "status")) + (setq kills (typGetData &chVolkov; 'kills)) (if status (setq theList (list @@ -315,6 +317,11 @@ ) )) ) + (if kills + (setq theList (append theList + (list (list "Kills by Volkov" kills (typTranslate &unidCommonText; 'autonsAndWingmen) 2)) + )) + ) theList ) From 6b69e361ae39d51a2876c71bb3c3714d16e9526c Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Thu, 7 Jun 2018 21:34:25 -0700 Subject: [PATCH 07/11] Fix "Ships destroyed by Penitent Cannon" stat --- TransCore/Penitents.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TransCore/Penitents.xml b/TransCore/Penitents.xml index a8f8263f..35f9be7c 100644 --- a/TransCore/Penitents.xml +++ b/TransCore/Penitents.xml @@ -545,7 +545,7 @@ (killsTotal (add killsPenitent killsEnemy killsFriend)) ) (append - (if killsTotal + (if (gr killsTotal 0) (list (list "Ships destroyed by Penitent Cannon" killsTotal From eece8eded010cf9aa8bf64e4a7bd52000b263140 Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Fri, 8 Jun 2018 13:39:25 -0700 Subject: [PATCH 08/11] Remember whether player has analyzed/used unidentified items --- TransCore/RPGAnalyzers.xml | 4 ++++ TransCore/RPGUsefulItems.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/TransCore/RPGAnalyzers.xml b/TransCore/RPGAnalyzers.xml index 9c7858b2..e737843e 100644 --- a/TransCore/RPGAnalyzers.xml +++ b/TransCore/RPGAnalyzers.xml @@ -344,6 +344,8 @@ (setq result (objFireItemEvent sourceObj itemToAnalyze 'OnAnalyzeItem)) (block Nil + (typIncData &dsRPGAnalyzeItem; 'hasAnalyzedItem True) + (setq desc (@ result 'desc)) (setq modifiedItem (@ result 'modifiedItem)) ) @@ -352,6 +354,8 @@ (not (itmIsKnown itemToAnalyze)) (block Nil + (typIncData &dsRPGAnalyzeItem; 'hasAnalyzedItem True) + (itmSetKnown itemToAnalyze) (setq desc (typTranslate &dsRPGAnalyzeItem; 'descIdentified { itemName:(itmGetName itemToAnalyze '(article escapeQuotes)) diff --git a/TransCore/RPGUsefulItems.xml b/TransCore/RPGUsefulItems.xml index 06cafd50..74a90cef 100644 --- a/TransCore/RPGUsefulItems.xml +++ b/TransCore/RPGUsefulItems.xml @@ -207,6 +207,10 @@ itemToUseOn: dstItem shipObj: theShip })) + + (if (not (itmIsKnown dstItem)) + (typSetData &dsRPGUseItemBase; 'hasUsedUnidentifiedItem True) + ) ; Restore the cursor position (scrSetListCursor gScreen theCursor) From 38c5fdc77dbbd15b3096ecdab98ed2e176aa8a0f Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Mon, 25 Jun 2018 16:48:31 -0700 Subject: [PATCH 09/11] Add "Never used any unidentified items" note for dsRPGUseItemBase --- TransCore/RPGUsefulItems.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TransCore/RPGUsefulItems.xml b/TransCore/RPGUsefulItems.xml index 74a90cef..8abc34aa 100644 --- a/TransCore/RPGUsefulItems.xml +++ b/TransCore/RPGUsefulItems.xml @@ -294,6 +294,13 @@ You cannot use %useItem% on %dstItem%. + + + (if (not (typGetData &dsRPGUseItemBase; 'hasUsedUnidentifiedItem)) + (list (list "Never used any unidentified items" Nil (typTranslate &unidCommonText; 'notes))) + ) + + From 73d53d989eeb2eda421d6fd3a0e187bfe4baa560 Mon Sep 17 00:00:00 2001 From: INeedAUniqueUsername Date: Mon, 25 Jun 2018 16:48:50 -0700 Subject: [PATCH 10/11] Add "Never analyzed any items" note for dsRPGAnalyzeItem --- TransCore/RPGAnalyzers.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TransCore/RPGAnalyzers.xml b/TransCore/RPGAnalyzers.xml index e737843e..666a3c8e 100644 --- a/TransCore/RPGAnalyzers.xml +++ b/TransCore/RPGAnalyzers.xml @@ -250,6 +250,13 @@ You run the analyzer but are unable to reveal any additional information about %itemName%. + + + (if (not (typGetData &dsRPGAnalyzeItem; 'hasAnalyzedItems)) + (list (list "Never analyzed any items" Nil (typTranslate &unidCommonText; 'notes))) + ) + +