User Tools

Site Tools


Sidebar

Torchmodders Site


Wiki Navigation

class_quest_fix_spawn_class_compatibility

Class Quest Fix (Spawn Class Compatibility)

By: Roalith

Original post: http://pastebin.com/fdNW9AAt

Note: a forum discussion of this topic can also be found here http://forums.runicgames.com/viewtopic.php?f=57&t=57508&p=479560&hilit=roalith+quest+fix#p479560)

Feel free to credit if you use this change in your mod to hopefully get the word out (just please link to Class Quest Fix page and reference that as credit for your quest change, other authors could then click over and read the documentation and bring the functionality into their own mods). 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, I am proud to present what I hope will become the golden standard of class modding in regards to quest rewards.

I was told by 3 other workshop authors that this was not possible and I am happy to prove this wrong.

1. Previous Methods

Here are the ways that mod authors typically do quest rewards for their classes:

A. 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.

B. Method 2

The mod author uses a BENEFICIARY_UNITTYPE such as this:

[OBJECT]
	<STRING>SPAWNCLASS:REWARD_BERSERKER_GEEN
	<INTEGER>WEIGHT:0
	<INTEGER>MINCOUNT:2
	<INTEGER>MAXCOUNT:2
	<BOOL>FORCEENCHANT:true
	<STRING>BENEFICIARY_UNITTYPE:FIGHTER
[/OBJECT]

and adds that to the base QUEST_ files, overwriting all files that other mods try to add.

C. 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.

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.

2. The new method:

I shall use Synergies and Theolentist for my examples here. Synergies uses Method 2 and Theolentist uses Method 3.

Let's look at example 1 (Method 2) with SynergiesMOD:

Under the new method, and in this mod, a new file is made:

SYNERGIES_QUESTREWARD_EVENT

Within this new file you only want the entry for the BENEFICIARY:

[SPAWNCLASS]
	<STRING>NAME:QUESTREWARD_EVENT
	[OBJECT]
		<STRING>SPAWNCLASS:REWARD_BERSERKER_GEEN
		<INTEGER>WEIGHT:0
		<INTEGER>MINCOUNT:2
		<INTEGER>MAXCOUNT:2
		<BOOL>FORCEENCHANT:true
		<STRING>BENEFICIARY_UNITTYPE:FIGHTER
	[/OBJECT]
[/SPAWNCLASS]

Now let's look at example 2 (Method 3) with Theolentist:

Using the new method, and in this mod, a new file is made (following the IZAU theme that the author uses:

IZAU_QUESTREWARD_EVENT

Within this new file you only want the entry for the Theolentist object:

[SPAWNCLASS]
	<STRING>NAME:QUESTREWARD_EVENT
	[OBJECT]
		<STRING>SPAWNCLASS:REWARD_IZAU_DEFENDER_GREEN
		<INTEGER>WEIGHT:0
		<INTEGER>MINCOUNT:2
		<INTEGER>MAXCOUNT:2
		<BOOL>FORCEENCHANT:true
		<STRING>BENEFICIARY_UNITTYPE:IZAU_DEFENDER
	[/OBJECT]
[/SPAWNCLASS]

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.

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.

Examples of file names:

Mod NameFile structure
Dread PirateDREAD_QUESTREWARD_
TheolentistIZAU_QUESTREWARD_
PreacherPREACHER_QUESTREWARD_
SynergiesMODSYNERGIES_QUESTREWARD_
WoW Style PaladinWSP_QUESTREWARD_
class_quest_fix_spawn_class_compatibility.txt · Last modified: 2016/04/19 02:04 by phanjam