Advertisement
Roalith

Class Quest Files Fix

Aug 12th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. Classes within the Torchlight II modding community have been notorious for not playing nice with one another. After trial and error, a theory and some speculation, and confirmation by Lone Wolf McQuade after he tested for me, I am proud to prevent what I hope will become the golden standard of class modding in regards to quest rewards.
  2.  
  3. I was told by 3 other workshop authors that this was not possible and I am happy to prove this wrong.
  4.  
  5. Here are the ways that mod authors typically do quest rewards for their classes:
  6.  
  7. Method 1 - Set the new class to use the theme of an existing vanilla class, meaning that the new class does not need its own QUEST_ files and instead shares the same ones as the vanilla classes. This causes no conflict or problems but also isn't tailored for the class.
  8.  
  9. Method 2 - The mod author uses a BENEFICIARY_UNITTYPE such as this:
  10.  
  11. [OBJECT]
  12. <STRING>SPAWNCLASS:REWARD_BERSERKER_GEEN
  13. <INTEGER>WEIGHT:0
  14. <INTEGER>MINCOUNT:2
  15. <INTEGER>MAXCOUNT:2
  16. <BOOL>FORCEENCHANT:true
  17. <STRING>BENEFICIARY_UNITTYPE:FIGHTER
  18. [/OBJECT]
  19.  
  20. and adds that to the base QUEST_ files, overwriting all files that other mods try to add.
  21.  
  22. Method 3 - The mod author has his/her own rewards files but still uses the base QUEST_ files to point to those, fully overwriting every other mod that uses QUEST_ files.
  23.  
  24. Using methods 2 and 3 essentially means that only ONE class mod can be loaded at a time that uses Methods 2 or 3; all others will be missing quest rewards and require you to ALT+F4 when turning in certain quests and losing progress.
  25.  
  26.  
  27.  
  28. The new method:
  29.  
  30. I shall use Synergies and Theolentist for my examples here. Synergies uses Method 2 and Theolentist uses Method 3.
  31.  
  32.  
  33.  
  34. Let's look at example 1 (Method 2) with SynergiesMOD:
  35.  
  36. Under the new method, and in this mod, a new file is made:
  37.  
  38. SYNERGIES_QUESTREWARD_EVENT
  39.  
  40. Within this new file you only want the entry for the BENEFICIARY:
  41.  
  42. [SPAWNCLASS]
  43. <STRING>NAME:QUESTREWARD_EVENT
  44. [OBJECT]
  45. <STRING>SPAWNCLASS:REWARD_BERSERKER_GEEN
  46. <INTEGER>WEIGHT:0
  47. <INTEGER>MINCOUNT:2
  48. <INTEGER>MAXCOUNT:2
  49. <BOOL>FORCEENCHANT:true
  50. <STRING>BENEFICIARY_UNITTYPE:FIGHTER
  51. [/OBJECT]
  52. [/SPAWNCLASS]
  53.  
  54.  
  55.  
  56.  
  57. Now let's look at example 2 (Method 3) with Theolentist:
  58.  
  59. Using the new method, and in this mod, a new file is made (following the IZAU theme that the author uses:
  60.  
  61. IZAU_QUESTREWARD_EVENT
  62.  
  63. Within this new file you only want the entry for the Theolentist object:
  64.  
  65. [SPAWNCLASS]
  66. <STRING>NAME:QUESTREWARD_EVENT
  67. [OBJECT]
  68. <STRING>SPAWNCLASS:REWARD_IZAU_DEFENDER_GREEN
  69. <INTEGER>WEIGHT:0
  70. <INTEGER>MINCOUNT:2
  71. <INTEGER>MAXCOUNT:2
  72. <BOOL>FORCEENCHANT:true
  73. <STRING>BENEFICIARY_UNITTYPE:IZAU_DEFENDER
  74. [/OBJECT]
  75. [/SPAWNCLASS]
  76.  
  77. As you can see, these files still contain "<STRING>NAME:QUESTREWARD_EVENT" but have filenames of "SYNERGIES_QUESTREWARD_EVENT" and "IZAU_QUESTREWARD_EVENT". Just like how you can merge merchant files without overwriting you can also merge QUEST_ files. Give your mod files a special prefix (IZAU_, PREACHER_, WSP_, DREAD_, SYNERGIES_, etc) and keep the original spawnclass string, adding only your object entries that specifically belong to your mod within the file. Again, please do not add the 4 vanilla class entries, this is no longer needed if you follow this new format as this will just add your own entry to the unified pool which already has the vanilla OBJECTs.
  78.  
  79. Also, since white items are very strongly considered to be worthless and most people just click something to turn the quest in and move on, adding a "<BOOL>FORCEENCHANT:true" line to each entry as shown above is very useful to the end user as suddenly quest rewards become useful.
  80.  
  81. My mod currently includes QUEST_ files for the following mods (this list will grow more and more over time):
  82.  
  83. Mod name --- File structure
  84.  
  85. All - GLOBAL_QUEST_* (add up to 2 random enchanted weapons/armors to each quest loot pool)
  86. Dread Pirate --- DREAD_QUESTREWARD_
  87. Theolentist --- IZAU_QUESTREWARD_
  88. Preacher --- PREACHER_QUESTREWARD_
  89. SynergiesMOD --- SYNERGIES_QUESTREWARD_
  90. WoW Style Paladin --- WSP_QUESTREWARD_
  91. Kensei --- KENSEI_QUESTREWARD_
  92.  
  93. Additionally, here are mods that use Method 1 that do not use QUEST files at all:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement