Well here is another treasure system to pile on top of all the others. This one runs off of 2DA file treasure tables that you create. It allows you to link simpler treasure tables together to form more complex treasure tables and generate loot drops based on these treasure tables. The KTG system is seamlessly compatible with all custom content you add to your module including the CEP.
The idea was to create a system that works conceptually very similar to the way the old PnP systems handled loot. With tables that allow for categories of loot to be combined into a list that can be selected from using a dice roll. You roll the dice and the table tells you 1-3 items from category A plus 1-4 items from category B. Then you roll on the category A & B tables to see what items you get. I wanted a system that allowed me to easily create loot tables that worked this way so I invented the KTG system. It is remarkably simple and surprisingly flexible.
See the User's Guide and Tutorial that accompanies this erf for instructions on how to use this package and the Readme file for installation instructions and an introductory overview of the KTG system.
Note: The user's guide has a very poorly written statement about requiring only NWN original. I meant that to mean that it will work in any expansion pack configuration:
OC, OC +SOU, OC +HOTU, and OC +SOU +HOTU.
Axe Murderer's Killer Treasure Generator Library v1.0
It's another loot generation system. This one lets you specify and chain together treasure tables you create in 2DA files to drive the loot generation process. Extreemly simple to set up and use -- even the noobs can figure this one out. Seamlessly compatible with all custom content including the CEP. Incredible flexibility. Give it a try...
The undeclared table message you are seeing means that you have failed to successfully declare the treasure table you are tying to generate a loot drop from (tt_sword001). You can turn on the logging feature and look in the module's log file to get additional debugging details about why tables that fail to get declared during the OnModuleLoad could not be loaded. The user's guide explains how to do that as well as describing several conditions which render treasure tables invalid.
This system looks great but i'm having a problem. I keep getting an error message that says: ***KTG System Warning***
Function: KTG_GenerateTreasure
Caller: 'Mountain Giant'
Located in Area: 'Area 01'
Treasure table 'tt_sword001' is not declared.
I'll keep messing around with it and see if I can figure it out but if anyone that might possibly know what is happening can help me, it would be appreciated!
Posted by Katdoral at 2009-02-13 07:42:45 Voted 10.00 on 02/13/09
I don't own NWN2 so I cannot say one way or the other whether or to what extent it is compatible with that. I understand much of NWN2 is identical to NWN1 script-wise, but I have no way of testing. It would not surprise me to learn it is incompatible. I suggest you ask somebody in the NWN2 scripting forums to take a look at it. It is a very simple system code-wise.
The html file that comes with it explains the optimization steps as well as I know how. I'm afraid I cannot be any more clear than that. There is even an example there you can follow.
The undefined table message you are seeing means that you have failed to successfully declare the treasure table you are tying to generate a loot drop from. You can turn on the logging feature and look in the module's log file to get additional debugging details about why tables that fail to get declared during the OnModuleLoad could not be loaded.
Posted by Greywolf2001ca at 2008-10-15 11:58:22 Voted 10.00 on 10/15/08
Really great useful treasure system. I have adopted it although I have some trouble as explained above...
Posted by Greywolf2001ca at 2008-10-14 19:41:04 Voted 10.00 on 10/15/08
Hi!
I would like to know if this system is compatible with NWN 2.
I have tried the basic system (without the additional code posted in the comments, which I don't understand) in NWN 2, but all I get is "table "table's name" undeclared" or something like that each time I use a script.
I wanted to know if it is compatible with NWN 2 basically, and how do you write the code you mentioned in the comments below about too many instructions in the OnModuleLoad script. Because I have no clue what that second part is, it simply does not compile and I have no clue how to make it work. Because if it is like NWN 1, it might be the problem.
Thanks in advance... my NWN forum alias is the same btw. ;)
Posted by Jimmy_Buffit at 2008-05-14 09:00:45 Voted 10.00 on 05/14/08
Pretty Sweet System Axe:) _________________________ Currently stalking the dungeons of ForkWest.com
Posted by friendlyfire at 2007-12-16 10:59:22 Voted 10.00 on 12/16/07
Really good, easy to use and well supported. Nice one.
Posted by Uze at 2007-08-05 09:22:49 Voted 10.00 on 08/05/07
Engenius
Posted by Daijin at 2006-06-15 23:45:45 Voted 10.00 on 06/15/06
A most useful system!! _________________________ Dream Well, Faith, Loyalty, Truth, Honor, Friendship always.....
Daijin Dreamweaver, Leader of the Dream Warriors for 32 years, going strong.
Posted by lostminds at 2006-03-10 18:50:20 Voted 9.75 on 03/10/06
Very well done. Was about to start making a system like this but no need now :) Scripts are quite well done, can't believe no one else has voted for this yet... I just had to modify 1 or 2 things (nothing major) and it fit exactly how I needed things. Once more thanks :)
I may have worded that poorly. The minimum requirement is that you own the original game. I should have said it supports all expansion pack configurations:
OC, OC + SOU, OC + HOTU, OC + SOU + HOTU
It is also compatible with CEP and any other hak paks you have or will have in the future (assuming the hak pak does not override my script by including a modified copy of it).
Posted by Anonymous ( 81.231.xxx.xxx ) at 2005-12-18 12:06:24
Hi!
This system seems very promising but i must ask, and sorry if the question is stupid, but it states in the text that it only works on NWN original game, so not HoU and SoU?
Someone ran into the instruction limit in their OnModuleLoad script after putting in 20 treasure tables. The KTG_DeclareTreasureTable function can require lots of instructions to complete for a large treasure table or once you get to a certain number of "tabled items". There is a limit on the number of instructions a single script is allowed to execute. The game engine interrupts the script when the limit is reached. Normally you will see a TMI (Too Many Instructions) error displayed when this limit is reached by a script and the game interrupts it. But since nobody is logged in when the OnModuleLoad script runs, you cannot see the message. What ends up happening is that the end of the OnModuleLoad script does not complete which obviously will cause problems with those systems you are using that rely on initialization in OnModuleLoad to complete correctly.
The good news is that there is a way to work around the limit by postponing part of a script so it gets run later after OnModuleLoad completes. The idea is to move some of the code out of the script into a script of its own, then have the original script call the new script using a DelayCommand. This allows the original script to use only a single instruction to accomplish what used to take very many...but the trade off is that the code won't get done until after the original script ends. This means it matters what code you choose to move out to the new script. Depending on what the original script is doing, it is not always safe to move the code out because it is needed later on in the original script. But for code that does not matter if it gets done just after the original script ends, you can safely move it out and thus effectively "give" the original script more instructions to run.
In KTG, declaring treasure tables need not be done in the OnModuleLoad script at all. You can declare a table from anywhere. Since it only ever needs to be done once, the OnModuleLoad is the best choice, but that is not a requirement. The requirement is that all tables be declared before you try to generate loot drops with KTG_GenerateTreasure using those tables. So it is safe to move the KTG table declaration stuff out of OnModuleLoad into a delayed script to allow OnModuleLoad to have as many instructions available to it as possible. This is a very good idea to implement in your module even if you aren't seeing a problem and I suggest using the following method instead of what is written in the user's guide.
Here's what you do:
===========================================================
First move all your KTG_DeclareTreasureTable calls out of the OnModLoad script and put them into a new script called "tt_declares" that looks like this:
Notice how the delay on each successive line increases by 0.1 seconds so that the lines at the top will run first and those at the bottom will run last. This is important for the same reasons explained in the KTG user's guide.
Next, where you removed all those declares from the OnModLoad, put this:
Hopefully using technique this will move enough instructions out of the OnModuleLoad script to allow it to complete all its tasks. It will minimize KTG's use of OnModuleLoad instructions and will also help protect against a really big treasure table causing a TMI that prevents other treasure tables from getting declared.
Posted by bloodrose ( 68.201.xxx.xxx ) at 2005-12-06 19:56:14
I posted below before I found you on the Bioware forum and sent you the PM.
I'd appreciate it if you would make sure you know there is actually a conflict with some other package before stating so. Since you obviously haven't found the reason why your spawning deal stopped working, you cannot be sure that it has anything at all to do with KTG and its scripts. It is highly unlikely that there is any conflict with KTG here. So don't say there is unless you've found one and can identify it so that I can fix it.
Thanks...
Posted by flyingaquarium ( 69.179.xxx.xxx ) at 2005-11-18 01:42:44
Ooo! This looks cool! I luv the concept!
~JayAre _________________________ You left the bodies and you only moved the HEADSTONES!!! YOU ONLY MOVED THE HEADSTONES!!!
You must be Logged In to post comments in this section.