Still worth knowing. So thanks.Profit. Well not really, but peace of mind.
One thing about importing database records:
By reading these forums and by experimenting, I have learned that instead of importing database records one by one in Art Manager, it's possible to manually copy extracted database records directly to the mod's database folder. This method is quite simple and a lot faster than importing the records one by one in Art Manager, when importing more than a couple of records.
However, I noticed that some people had suggested something like this:
1.) Create a new mod (let's call it "AllDBRecords" in this example). Build the mod (so the mod's folder structure is created).
2.) Extract TQIT's Database.arz into a separate folder (with ARZExplorer for example). (And if you want both TQ and TQIT databases, extract TQ's Database.arz first, then extract TQIT's Database.arz in the same folder so that TQ's database files get overwritten with the TQIT ones.)
3.) Copy all the extracted database records (including their folders, so that the paths remain correct) into the "AllDBRecords" mod's database folder, so that the paths match (contents of records folder go into the records folder of the mod, and so on).
I understand that the "AllDBRecords" mod can be opened in a separate instance of Art Manager and used as a reference when building a mod, but on the other hand, you can simply open the database.arz with ARZExplorer and explore the contents in it, so I don't see an advantage in using the mod as a database reference, compared to simply using ARZExplorer, or am I missing something?
I also saw a mention that then you can copy the database records from that "AllDBRecords" mod into your mod, but what does that mean exactly? Copy them inside the Art Manager somehow? (I just copy the database records in windows explorer (any directory/file browser can be used for that of course).)
So what is the advantage of making an "AllDBRecords" mod which contains all the original database records, compared to just keeping the extracted database records in a separate folder of your choosing, and manually copying them (e.g. with windows explorer) to your mod's database folder as needed, and using ARZExplorer to browse Database.arz file's contents for quick reference?
Looking at dbr files in the AM is a lot more comfortable than using a text editor.I understand that the "AllDBRecords" mod can be opened in a separate instance of Art Manager and used as a reference when building a mod, but on the other hand, you can simply open the database.arz with ARZExplorer and explore the contents in it
Basically you can browse through stuff and look at the details of how TQ is built.
If you are going to make more complex things in your mod, you will spend a lot of time just learning how to make stuff work.
I just spent the last 4 days making a total of two bosses, for example, until everything worked like I wanted it to. Learned new ways of crashing the game in the process, because I linked two things that apparently weren't compatible.
And yes, you can also copy things that you like, switch mods, then paste into yours.
But that is really the same as doing it manually.
Now something about gameengine.dbr's "global" spawn modifiers, and possible default limits (this is with TQIT fanpatch 1.17a):
1.) When increasing "global" monster spawning by changing the spawnMin and spawnMax values in gameengine.dbr file to 10 for example (this method is used in monsters-xMAX), the boss monsters spawn only in 3, because they are limited to 1 per each variation (each boss has 3 variations, each being of different level). However, the TQ boss pool records do not have the limit lines, so where does the game get the default limit of 1 for TQ bosses? Is it just hard-coded that if the limit is not set in the boss pool records, it defaults to 1?
The TQIT bosses on the other hand do have have the spawn limits set to 1 (in their pool dbr files there are lines limit1,1, limit2,1, limit3,1,), so it's clear why the TQIT bosses don't spawn more than 1 per each variation by default.
2.) When the spawnMin and spawnMax values in gameengine.dbr are set to 2, why does the game still spawn 3 bosses (1 of each variation)? Based on what I read on these forums, I had thought that the spawnMin and spawnMax values in the gameengine.dbr are like a multiplier. spawnMin 2 and spawnMin 2 = twice as many monsters, so shouldn't only 2 bosses spawn (1 x 2 = 2)?
A theory: Could it be that the spawnMin and spawnMax values actually ADD to the existing spawnMin and spawnMax values in each monster pool record? That would make sense, because bosses have those values at 1 and 1, so with monsters-x2 those values would have 2 added to them, which would result in 3 for each (= 3 bosses). And going higher than 2 doesn't make any difference for bosses because by default they're limited to 1 per variation anyway.
3.) The spawnMinModifier and spawnMaxModifier in gameengine.dbr - do they multiply the spawnMin and spawnMax values in the monster pool records? For example, spawnMinModifier 2 and spawnMaxModifier 2 would then effectively double the spawnMin and spawnMax values in the monster pool records.
That would seem logical to me, because from what I've seen, modifier usually means that something is multiplied by the modifier value. But all this is just guessing.
Edit: Oh, I just checked the GameEngine.tpl template file. There are descriptions for these values:
For spawnMin and spawnMax it shows:
description = "Additive"
Aaaand for spawnMinModifier and spawnMaxModifier it shows:
description = "Percent (0 or 100) no change"
So that seems to be clear then. spawnMin and spawnMax values should indeed be additive, as in they simply add the value to the proxy pool records' spawnMin and spawnMax values. Is this correct?
As for the Modifiers, well that seems a bit strange. Does it mean that 0 = 0 = no spawn and 100 = 100% = normal spawn? Or 0 = 0% increase to spawn and 100 = 100% increase to spawn = twice as many monsters?
Last edited by justdownloading; 05-16-2012 at 08:29 AM. Reason: Clarifying and found partial answers
I did some testing and seems I found answers to my questions. I was going to edit the answers into the previous post, but I thought these deserve their own post, because they could be interesting to some other modders too:
1. If a boss pool does not have the spawn limit value(s) set, and the boss pool's own spawnMin/Max values are 1, that boss can spawn only once per each variation regardless of what the global spawnMin/Max or spawnMin/MaxModifier are set to in gameengine.dbr.
For example, adding a limit value of 2 for that boss pool's each boss variation (3 variations usually) allows the gameengine.dbr spawnMin/Max values to increase the boss spawning to a maximum of 2 per boss variation (the limit value), which usually means a maximum total of 6 bosses, because each boss typically has 3 variations, and the limit value is separate for each variation. Thus, limit values of 3 would allow a maximum of 9 bosses, as long as the spawnMin/Max values set in the gameengine.dbr are high enough, and so on.
More about spawn capping in the additional observations section.
2. The spawnMin and spawnMax values in gameengine.dbr are additive.
Example: If the global spawnMin and spawnMax values in gameengine.dbr are set to 1 each, then a monster pool that normally spawns 4 monsters, spawns 5 monsters (4+1=5), and, bosses spawn in 2 (1+1=2).
This explains why bosses spawn in 3 even with monsters-x2; it's because x2 has spawnMin/Max values of 2 each, which adds 2 bosses, thus reaching the default cap for bosses (default cap for bosses is 1 per each variation and almost all bosses have 3 variations = 3 bosses).
This also means that monsters-x3 mod for example is not really "x3"; it's +3.
3. The spawnMin/MaxModifier values are percentage modifiers.
100 = no increase in monster spawns, 200 = double spawn, 300 = triple spawn. I don't know is the percentage capped, I only tried up to 300 so far. What happens when using the Modifier values instead of the additive ones is that if a monsters pool spawns 4 monsters, then with a Modifier value of 200 it will spawn 8 monsters (4 x 200% = 8), so it literally doubles the pool's spawn, so the increase is proportional to the pool's default spawn number, which results in different spawns than using the additive values.
Bosses have spawnMin/Max values of 1 by default, so with spawnMin/MaxModifier set to 200, only 2 bosses will spawn.
So, in order to really get a monsters-x3 mod for example, instead of spawnMin/Max 3 values it should have spawnMin/MaxModifier set to 300. Although sometimes the number of monsters can get capped by the monster pool's own values so that it won't always be x3, but still it's closer to real x3 that way.
Edit: In act 2, the quest for getting Hand of Balance from the Great Sphinx, there are those obelisks which when destroyed make the Pharaos' Honor Guard statues come alive. I was testing a simple fix there to make the game spawn 3 obelisks so the quest can be completed normally even in "x3" mode (all of the statues are awakened).
However, when the spawnMin/MaxModifier was set to 200 (x2), the statues and obelisks spawned only once, and with 300 (x3), only twice. On a hunch I changed the Modifier values to 201 and 301, and then it worked. Strange that it takes 201% and 301% to spawn them twice and thrice respectively, especially because the gorgon queens for example did spawn in 2 and 3 with 200 and 300. Maybe it's somehow caused by number rounding for example.
A. Adding monsters with the global spawn values (both additive and percentage modifier) in gameengine.dbr get capped based on 3 factors: 1. The number of different monsters in the pool. 2. The pool's own spawnMin/Max values. 3. And whether the limit values are set for monsters in the pool or not.
Example 1: A proxy pool has 4 different normal monsters listed, and the pool's own spawnMin and spawnMax are set to 1. The pool does not have limit values set. In that case that pool can only spawn up to 4 monsters, regardless of how high the global spawn values are set in gameengine.dbr. This is the case when the monsters do not have a limit value (limit1,x, etc.) set, or if the limit value is 1 (limit1,1, etc.).
Example 2: If a proxy pool has all its monsters limited to a value higher than 1 (e.g. limit1,4, limit2,4, etc.), then those monsters can spawn up to the limit numbers, OR up to the resulting pool spawn value after being modified by the global spawn value(s) set in the gameengine.dbr, and by the equation set in proxypoolequation_01.dbr, so that the total number of monsters spawned by that proxy pool cannot get higher than the modified pool spawn value, whichever comes first (limit OR modified pool spawn value).
Edit: I should give more examples to make it more clear, but I didn't test the capping as thoroughly as I should have, so at best I can give a guess for Example 3:
If a proxy pool has its own spawnMin/Max set to 2 and no limit values set, then each monster defined in the pool can spawn up to 2 times. So if a pool has 4 different monsters, and the pool's own spawnMin/Max are set to 2, it should spawn 8 monsters AT MOST. That would be because if there are no separate limits set, the value of spawnMax works as a limit for each monster.
B. A monster pool's championMin/Max values determine how many of the regular monsters can get converted into "champions" (monsters with yellow name).
Example: A pool's spawnMin/Max are set to 1, and the championMin/Max are set to 1 as well. The championChance is set to 100, so that champions are spawned every time. These pool settings will spawn only 1 champion and no regular monsters. That 1 champion has a chance of becoming hero of course.
Next, setting the spawnMin/Max to 2 and leaving the championMin/Max at 1, 1 regular monster will spawn together with 1 champion.
C. The default proxypoolequations (proxypoolequation_01.dbr) makes it so that a pool record's value becomes slightly higher than 1 per 1 monster. For example a pool with a spawnMin/Max of 4 spawns 5 monsters.
Last edited by justdownloading; 05-17-2012 at 06:26 PM.
Hey. Nice work again. Some of that was known, but good to have it all on one page.
Are you positively sure that's how it works? Because everywhere else, a % modifier adds that many percent to the value.The spawnMin/MaxModifier values are percentage modifiers.
100 = no increase in monster spawns
With some error, that may also explain why +201% yields 3, since it's then a total of 301% or 3x.
Or, of course, it's like you first said, and the system always rounds up.
Thanks. I guessed that some if not all of that is probably known already, but oh well. At least there's more information in one place, could help (or mislead : P) others who are searching for modding info.
However, the Pharaoh's Honor Guard statues spawned in 1 @ 200 and 2 @ 300. Then I increased the Modifiers by 1 and the statues spawned in 2 @ 201 and in 3 @ 301. And the Gorgon Queens still spawn in 2 each even with 201, so that didn't affect them. It's a bit odd because both of those monsters are bosses, so they aren't affected by proxypoolequation for example, so I wonder what causes that difference.
Edit: I tested now with spawnMin/MaxModifier of 101 each, and at least the Gorgon Queens still spawned only 1 each, so that seems quite strong indication that in the case of those spawnMin/MaxModifier values, 100 = 100% = no increase in spawns.
Edit2: Ok this seems to be quite definitive proof. I set the spawnMin/MaxModifier values to 1 each, and almost no regular monsters spawn at all. Champions (yellow) and heroes seem to spawn normally, but I saw only 1 regular monster during a short test run, which was probably that lucky 1%. This also includes bosses, at least the Gorgon Queens don't seem to spawn at all when the modifiers are set to 1. And I know it'd probably be the same thing to just set the spawnMinModifier and leave the Max one blank, instead of using same value in both Min and Max, but I just like to set them both.
When the values were set to 0, it didn't seem to have any effect, so the Modifier values need to be other than 0 to have an effect. I don't know if negative values work, possibly yes, but I'll skip testing that now because negative values for those Modifiers wouldn't be of much use anyway.
Last edited by justdownloading; 05-18-2012 at 03:12 PM. Reason: Moved part of the post into the next post
Then about TQIT Quest Editor. I can't open TQIT quest files. The program shows an error about "System.NullReferenceException: Object reference not set to an instance of an object." and doesn't open the quest file.
Here are the steps I did:
1. Extract TQIT Quests.arc file to a folder of my choosing. I used ARZExplorer (Should they be extracted to some specific place so that the Quest Editor can find things related to the quests?)
2. Open TQIT QuestEditor.exe.
3. Choose File -> Open...
4. Browse to the folder where I extracted the quest files and open the quest file.
5. The error window pops up. There are options quit or continue (and details). Choosing to continue allows to continue using the Quest Editor, but the quest file is not loaded.
The above is on a Windows 7 Home Premium 64 bit. Then I tried to do the same thing on an older computer which has Windows XP Pro 32 bit. I didn't copy any of the files from the Win7 PC, so pretty much everything is different on the WinXP PC. As you can guess, the same thing happens on the WinXP PC...
So it's starting to seem that I'm just doing something wrong, but I can't figure out what. Art Manager and Editor seem to work ok, although I haven't used Editor much. Could someone please point out what I'm doing wrong?
Thanks in advance.
Last edited by justdownloading; 05-18-2012 at 03:28 PM.
No idea. My quest editor open extracted IT quests just fine.
The only problem is that - as opposed to standard TQ quests - you cannot edit them.
At least in a soft mod, changes I made had no effect.
Quest Editor is CASE SENSITIVE for the quest file name endings and lower-case seems to be the case of choice for quest file name endings (.qst vs .QST), i.e. a quest file with its file name ending in CAPS (.QST) does NOT load in Quest Editor, but with the file name's ending in lower-case (.qst) it works just fine.
I'm using ARZ Explorer. ARZ Explorer uses caps for the file names (which never was a problem until now with Quest Editor).
In hindsight, had I realized that in the first place, I'd have saved myself hours of installing/uninstalling .NET frameworks and reading info about them.
Off to kill a few hundreds of gorgons, that ought to relieve the pain.
Last edited by justdownloading; 05-19-2012 at 08:30 AM. Reason: It's just the .qst ending that's case sensitive, not the file name