nognow Posted December 26, 2020 Posted December 26, 2020 I'm creating a script to add a weapon to form lists/leveled lists upon a game quest's completion. I've already created the adder script itself, but I can't figure out how to set a condition when quest X is completed.What's the best way to accomplish that?Thanks! Edit: Of course I can just add the condition the game's quest itself, but it's a very critical quest (the final Dead Money quest AKA finishing Dead Money DLC) and I don't want a tiny weapon script to modify it directly.
clanky4 Posted December 26, 2020 Posted December 26, 2020 You could make a quest that checks if that quest is done through a quest script. The condition you'd be looking for would be getquestcompleted: https://geckwiki.com/index.php/GetQuestCompleted Here is an example of the script:scn AddWeaponQuestScript short DoOnce ;give WEAPON once begin GameMode if DoOnce == 0 if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business set DoOnce to 1 player.additem WEAPON 1 ;give one WEAPON endif endif end
ashtonlp101 Posted December 26, 2020 Posted December 26, 2020 You'd use the "GetQuestCompleted [Quest ID] == 1" The best way to do this is to create your own quest under the Quests tab and Write a Begin Gamemode script and attach it to your newly made quest. Example: SCN WeaponListAdderSCR Begin Gamemode If GetQuestCompleted NVDLC01MQ03== 1AddItemtoLeveledList LevelListID GunID 1 1 99Endif END
ashtonlp101 Posted December 26, 2020 Posted December 26, 2020 On 12/26/2020 at 6:32 PM, clanky4 said: You could make a quest that checks if that quest is done through a quest script. The condition you'd be looking for would be getquestcompleted: https://geckwiki.com/index.php/GetQuestCompleted Here is an example of the script:scn AddWeaponQuestScript short DoOnce ;give WEAPON once begin GameMode if DoOnce == 0 if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business set DoOnce to 1 player.additem WEAPON 1 ;give one WEAPON endif endif endHaha we both wrote it at the same time.
nognow Posted December 26, 2020 Author Posted December 26, 2020 On 12/26/2020 at 6:32 PM, clanky4 said: You could make a quest that checks if that quest is done through a quest script. The condition you'd be looking for would be getquestcompleted: https://geckwiki.com/index.php/GetQuestCompleted Here is an example of the script:scn AddWeaponQuestScript short DoOnce ;give WEAPON once begin GameMode if DoOnce == 0 if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business set DoOnce to 1 player.additem WEAPON 1 ;give one WEAPON endif endif end On 12/26/2020 at 6:40 PM, ashtonlp101 said: On 12/26/2020 at 6:32 PM, clanky4 said: You could make a quest that checks if that quest is done through a quest script. The condition you'd be looking for would be getquestcompleted: https://geckwiki.com/index.php/GetQuestCompleted Here is an example of the script:scn AddWeaponQuestScript short DoOnce ;give WEAPON once begin GameMode if DoOnce == 0 if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business set DoOnce to 1 player.additem WEAPON 1 ;give one WEAPON endif endif endHaha we both wrote it at the same time. thanks!Wouldn't it create bloating? I don't want that thing running constantly to check quest status.
clanky4 Posted December 27, 2020 Posted December 27, 2020 You could use the stopquest function: https://geckwiki.com/index.php/StopQuest Which with the example above should be:scn AddWeaponQuestScript short DoOnce ;give WEAPON once begin GameMode if DoOnce == 0 if (getquestcompleted VMS55a == 1);Whatever your quest ID is, this one is Tend to Your Business set DoOnce to 1 player.additem WEAPON 1 ;give one WEAPON StopQuest VMS55a endif endif end
nognow Posted December 27, 2020 Author Posted December 27, 2020 But that's only after the quest has been completed. Beforehand, it'll keep running until I complete the in-game quest
GamerRick Posted December 27, 2020 Posted December 27, 2020 Why not put your code in the result script of your quest stage that ends the quest?
nognow Posted December 27, 2020 Author Posted December 27, 2020 On 12/27/2020 at 2:08 PM, GamerRick said: Why not put your code in the result script of your quest stage that ends the quest?As I noted, I'm afraid of letting some tiny weapon adder to modify such a critical quest (referenced 205 times) directly.
GamerRick Posted December 28, 2020 Posted December 28, 2020 OK. In that case, the first response you got from Clanky4 is the answer.
Recommended Posts