PnP Coins for NWN1
Version 1.3
Created by: David Douglas
(NOTE: If you downloaded this package before 8pm EST on 5/27/2011, redownload and reinstall the package.)
FEATURES:
1.) Changes the module economy from one based solely on gold coins to one featuring five denominations (coin names are determined by the builder).
2.) Uses any merchant in any module in which it is configured.
3.) Coins are now items in a PC's inventory and can therefore be dropped, pickpocketed, or traded as such.
4.) Builders may create several types of currency and easily configure merchants to only take one type (each currency has five denominations--this could be useful in large modules where PCs deal with merchants from several nations/regions).
2.) Builders may set coins to encumber and weigh down PCs.
4.) Is CEP compatible but not CEP dependent.
5.) Does not use Heartbeat scripts.
SYSTEM SPECIFICS:
1.) PnP Coins works by converting coin items into NWN default gold when a PC opens a store and re-converts this gold to custom coinage upon closing the store.
2.) During this transaction, coin quantities are stored as local variables on the PC. As a PC buys or sells, these quantities change to reflect their new balance. After a sale, PCs will always receive platinum first and gold second (they will never receive electrum, silver, or copper during a sale). During a purchase, merchants take from higher value denominations first. This order can be altered by the builder by reordering lines 132-151 in the coins_inc script. The system will not exchange lower denomination coins for higher ones during a sale as each coin type is saved as a separate variable. Builders should feel free to create conversation based money-changers who are more than willing to play the currency markets.
3.) Coins are stackable to 50,000 per stack.
4.) The default exchange rate is 100 copper = 10 silver = 2 electrum = 1 gold = 1/10 platinum. It would be possible to adjust this exchange rate or add new denominations to the system but that is beyond the scope of this writing.
5.) For encumbrance and weight purposes, all coins are considered to weight exactly 0.02 pounds (50 = 1 pound; this is adjustable in coins_inc). When coin is acquired, weight objects are destroyed from the PC, coins_onacqu counts the number of coins carried and divides it by 50, and then weight objects are created on the PC (stackable to 50,000, each weighs one pound). These objects are then marked as cursed so that they cannot be dropped. Should a PC drop their weight stones the OnUnAcquire script will instantly recognize the imbalance between weight and coin items and give them more. In other words, I am uncertain if it is even possible for players to cheat the weight system. These weight items are not created on DMs and NPCs. Builders should feel free to remove the GetIsPC check to coins_acqu and coins_unacqu if they want DM/NPC encumbrance due to coins.
CREDITS:
Special thanks to Kilana Evra, Accerak, and the C.R.A.P. team for providing the basis and model (indeed large chunks of code) to this endeavor. My only contribution was building upon their excellent ideas and work. Theirs is the credit. Special mention also goes to Greyfort for the testing and feedback of the system.
If you have any questions, have recommendations, or find any errors with the system please contact me at [email protected] or send a PM to Mad.Hatter on the Bioware Social forums.
-David Douglas
CHANGE LOG:
v1.3 -- 5/27/11 Optimized encumbrance code. Actors can now carry up to 50,000 pounds of coin without issue.
v1.2 -- 5/24/11 Added additional conditions to prevent TMI errors. Removed CEP dependancy.
v1.1 -- 5/20/11 Added optional encumbrance scripts and weight item to the system.
CEP VERSION: (Updated 5/27/11) v1.3 has an altered hak and scripts that make it incompatible with previous versions. Upgrading is as simple as associating the new hak with your module, removing the old one, and importing the erf (overwriting all earlier scripts).
NON-CEP VERSION: (Updated 5/27/11) v1.3 has an altered hak and scripts that make it incompatible with previous versions. Upgrading is as simple as associating the new hak with your module, removing the old one, and importing the erf (overwriting all previous scripts).
Okay, 1.3 is now up. I feel like the system is completely usable at this point. The only additions/alterations that I would like to make are:
(1) Making the system compatible with default treasure scripts out of the box and
(2) Making it to where all coin icons have an associated model (currently only one of each type does, the rest get the default coin bag model while on the ground).
v1.3 is in the works (yes, I do quick updates. Thanks me for being a teacher and this being summer...).
1.3 simplifies the weight code by a ton. It is faster at low coin counts and can now handle tons of coins without freezing. (I tested 1,880,000 NWN gold worth today) I will also clean up the erfs and demonstration mods (somehow despite my double-triple checking the wrong weight item got in there).
Finally, if I have time I will start to work on the loot system so that this can be used out of the box in any module using default loot systems.
I'm taking this down for a few hours or so. I apparently packaged the files incorrectly in v1.2 and it isn't working properly. My profuse apologies for my incompetence.
Posted by Sethan at 2011-05-24 07:20:03 Voted 10.00 on 05/24/11
Thank you for making a non-CEP version - I'm really looking forward to using this. _________________________ PW Story server Narfell - Since 2002
So... I forgot that this thing reads greater than and less than signs as code tags. Ignore the below post.
What I meant to say was that I have received questions regarding how to sell items that cost less than 1gp. I don't feel that converting prices in the store interface is worth it due to the amount of work that would be involved.
In my own module I have instead worked my merchants' conversations something like this:
M: How may I help you today?
PC: 1. I would like to see your items that are worth more than 1gp. (opens the standard store)
2. I would like to see your items that are worth less than 1gp. (leads to another conversation branch that lists all such items and there prices. The action taken on those nodes TakeItems the coins and GiveItems the items using the same logic as found in coins_inc)
3. Nevermind.