Aller au contenu

Photo

New Custom Shop system:


  • Veuillez vous connecter pour répondre
41 réponses à ce sujet

#26
dethia

dethia
  • Members
  • 146 messages
Just an update on the infinite item thing, I have tested it and in the code there is already a check for the infinite flag. If there is an infinite amount of an item it is not removed from the store. I have tested this and it works like a charm, my advice is check that the "infinite" flag is checked of in the store's inventory itself.
  • Sabranic aime ceci

#27
dethia

dethia
  • Members
  • 146 messages
So in-case anyone is using the system but doesn't check up on the vault, I have made various fixes and small additions here and there, the latest files are on the vault

nwvault.ign.com/View.php

There were a # of oversights on my end which I hopefully resolved.  If there are any bugs or something isn't working as people would like do let me know and I'll do my best to accomodate people.  Hopefully wth regards to haggling, most of you were able to modify the DS_Appraise function to suit your needs

I am planning to write an auction system that will use the 3 tier currency system with a bounty system, hopefully some people will find use for it as well.   I know KEMO has an auction system out but I don't realy like it (15 scripts as opposed to 3 ;/), and while I have converted it to MySQL it still seems a bit messy.

#28
The Fred

The Fred
  • Members
  • 2 516 messages
I'll admit I haven't really had chance to try it out yet, but I do intend to take a look at it even if only to pilfer bits for my own ends... ;-)
It does look very interesting, though.

#29
Dann-J

Dann-J
  • Members
  • 3 161 messages
I've liked this shop system from day 1 (even with the initial bugs it showed promise). And yes - I've created my own appraise function which provides a bit more feedback to the player in the message window, such as "Haggling success - 10% discount" or "Haggling failure - 10% price rise". I used Appraise as the main calculating factor, but I also factored in some of the conversation skills (using the highest of them to contribute to the algorithm).

#30
dethia

dethia
  • Members
  • 146 messages
I have finished writing the auction system that utilizes the 3-tier currency. You can find the files located in the same vault entry.

nwvault.ign.com/View.php

The SHOP SYSTEM is independent of the auction system but the AUCTION system is linked to the shop system. So for those who do not want the auction system they need not use it or change anything. Installing the auction system is pretty easy if one is familiar with nwnx.

--HOW TO INSTALL THE TRADE-HUB SYSTEM-------------------------------------------------------------
Note that this sytem requires the user to be using MySQL and NWNX Scorco scripts

	1)	Import the scripts
	2)	Make sure your module is using the dethia_tradehub.hak (which replaces the dethia_shop.hak)
	3)	Open dethia_tradehub_sys and modify the function:
			string DTH_GetSellerID(object oPC);	- this function gets the character ID.
											This ID is specified by each PW in their own way,
											if you don't know what I am talking about here you would have to
											get in touch with me so that I could explain.

	4)	Lines 31-37 have some self-explanatory constants, change them however you see fit.

	5)	Add the dethia_tradehub_open script as an action within a 
conversation of an NPC or placeable that you wish to act as the 
auctioneer.

That's pretty much it. I know kemo wrote an auction system but I didn't like it too much especially the large amount of unnecessary scripts it used (in my opinion). I intend to expand this system and add a warehouse system to it as well as a bounty system. Screenshots and features for this system are listed below:

dl.dropbox.com/u/11050518/nwn2/dethia_shop/dth_auction_item.jpg
dl.dropbox.com/u/11050518/nwn2/dethia_shop/dth_collect_auction.jpg
dl.dropbox.com/u/11050518/nwn2/dethia_shop/dth_buy_from_auction.jpg

Players can track their current auctions and collect money for partially completed auctions leaving the remainder intact. Players can cancel an auction at any-time. The system shows 50 items per page (as opposed to kemo's 6) though this number can be controlled in the dethia_tradehub_sys file.

Allows for players to search for items based on seller or item name. This is the initial release so please report any bugs that you come across.

The intended warehouse system will offer players an alternate storage system to (what we currently use on the Midgard server) the chest system that I wrote.

The bounty system is intended primarily for crafters it will allow players to place orders for crafting components. Initially it will not allow equipment based items but we'll see how that goes in the future. Players will be able to specify monetary rewards or item rewards. Each system can be enabled/disabled within the sys file, at the moment only the auction system is working.

Modifié par dethia, 30 décembre 2011 - 07:12 .


#31
dethia

dethia
  • Members
  • 146 messages
-Fixed a nasty server crashing bug when a player tries to auction a ghost item (after auctioning something, trying to auction a blank) so please get the latest scripts. Also made it possible for DM's to auction items with a default ID of -1.

EDIT (on 01/01/2012)
-2.02 - Fixed a huge doozy that wrongly removed entries of sold items, this is what happens when you're working late.  Also added a distance check before transactions take place.  So get the latest scripts.  Sorry about the bugs ;) but I hoped to release the system before new years.

Edit #2:
-2.03- Fixed an issue where a player could continually purchase an out of stock item by pressing buy over and over (forgot to update the variables after the purchase).  Please note that you will need to d/l the latest HAK files as I made changes to the xml.

Edit #3:
-2.04 - Removed the feature in the shops that adds a red x to the name of items which cannot be sold to a particular store.  While there was no problem with the code the game simply could not handle so many iterations (if the list contained more than 5 or so things) and would crap out.  I will look for alternative methods to achieve a similar result.

Modifié par dethia, 02 janvier 2012 - 04:22 .


#32
dethia

dethia
  • Members
  • 146 messages
I'm happy to announce that the warehouse system for the Trade-Hub is finished.  It can technically store as many items as you want to allow players (500 by default).  I've also updated some icons for the system and the sell button for the shop system.  Just grab the hak and the scripts from the same vault entry.

dl.dropbox.com/u/11050518/nwn2/dethia_shop/dth_warehouse.jpg

Vault entry link:
nwvault.ign.com/View.php

Just to re-iterate the trade-hub system is an optional addition to the shop system that requires MySQL.  I will try to get the bounty system finished within the next few days.

#33
Saarun

Saarun
  • Members
  • 8 messages
I want to tell you that this system is wonderful and certainly will be used on our PW. Thank you! This is something that I missed in NWN2!

Now here is my feedback (some issues I've fixed/noticed/changed):
- when the store has lot of items it will fail to add certain items to the store (as it will end with TMI). This is fixed by  Skywing's plugin. (when run in the CLR backend) as it enables to run much more instructions!
- sometimes happened (due to TMI mentioned above) that when you changed to the "sell" section and back to the "store" it failed to update GUI buttons which resulted in possible selling of store items!! This is very nasty bug! Fixed easily with swapping position of updating GUI and adding items to the GUI list of items.
- when disabled identify I rather prefer to have 'x' there instead of the default price of 100gp.
- also I would prefer to have possibility of selecting entire groups of items to have in WillNotBuy and WillOnlyBuy settings, e.g. I used negative values for Armors, Weapons, Useable, Trinkets, etc . Therefore when store does not buy weapons I just use this one value instead of all the values for weapons.
- when you right click on item it is selected but button that shows properties of the item does not function or shows previously selected item (with left click) - maybe this is already fixed (haven't checked last update).
- the red cross over item that is not possible to sell functions OK when used the plugin mentioned above (again TMI problem).
- very cool enhancement would be possibility to recognize items that customer can/cannot use! I suppose that the red cross could also be used here.

When we will find more I'll certainly let you know. Thanks again for such cool store system! 

PS: we will certainly adopt your new systems (storage, auction, bounty)..

#34
dethia

dethia
  • Members
  • 146 messages
Thanks for reporting all those issues, I know the TMI's are a problem I'll look into skywing's plug-in to see what I can resolve.

Okay I have done a few things with the latest release:

-2.05 - Added some new constants for use with the DS_WillNotBuy and DS_WillOnlyBuy functions:
//The below variables are used in conjunction with DS_WillOnlyBuy and DS_WillNotBuy functions.
//In the string variables you set on stores for these functions you can specify for example
// -1 to block or allow all items that go in the armor category.  As an example your
//DS_WILL_NOT_BUY list can be -1;75;120;23;2;88 which would in addition to specified base item
//types prevent the store from purchasing any item that falls under the armor category
string    DS_BUY_FILTER_ARMOR            = "-1";    //Filter for the armor category
string    DS_BUY_FILTER_WEAPON        = "-2";    //Filter for the weapon category
string    DS_BUY_FILTER_USEABLE        = "-3";    //Filter for the useable item category
string    DS_BUY_FILTER_TRINKETS        = "-4";    //Filter for the trinkets category
string    DS_BUY_FILTER_MISCELLANEOUS    = "-5";    //Filter for the miscellaneous category

-I've also updated the above functions slightly that reduces the # of computations two-fold, this will hopefully help with TMI issues though certainly not completely.
-Thanks to Saarun's feedback I interchanged the order of when GUI buttons are enabled/disabled, ensuring this happens before the store lists are populated with items to prevent a nasty TMI abuse.

-I've also made it that if a store does not identify items instead of a very high cost it will just list red-x's.

---
I have tried mimicking left-click behaviour to the right click button, but it turns out that the UIObject_Misc_ExtractData does not work with right click at all so while one can select items with the right click button I cannot make the right click button carry out the necessary operations.  I don't think that's a big deal though.

About somehow indicating that a player can't use a particular item, at the moment I am not sure how to do that.  Checking against every feat that grants item use, or caster levels versus spell/scroll use (and UMD on top of that for which I don't know the formula) seems a bit intensive, I will see if there is possibly some function I may not be familiar with that can do all that (hopefully faster than what I suggested above).  I'll continue considering on how to at least mark items that canot be sold meanwhile.

Modifié par dethia, 07 janvier 2012 - 06:56 .


#35
dethia

dethia
  • Members
  • 146 messages
\\o/ The bounty system is finally finished and the system is more or less complete.

Image IPB

The bounty system allows players to create contracts for items where they offer coin in exchange.  Players can also offer item rewards along with coin (or simply item exchange without coins).  This is primarily intended for crafters/manufacturers on PW's.  I have did my best to optimize the system and was able to remove about 100 lines of unnecessary code, I've also set update rates in all text fields to 1/10th of a second (as opposed to once per frame rate).  Get the system from the same vault link in the original post, suggestions for changes or new features are welcome so long as they're sensible.

I will also update the icons as some people have complained about their design.

#36
dethia

dethia
  • Members
  • 146 messages
Hey sorry to bump up this old thread, but I have made a nifty improvement in the system allowing for buying/selling of things via double clicking. Not sure why I hadn't added this feature to begin with but it's really convenient so if anyone is using the shop system grab the latest tradehub hak and shop scripts to get the new changes.

#37
PJ156

PJ156
  • Members
  • 2 980 messages
This looks great and I know I am coming late to the thread but does the original GUI and functionality still exist? So as not to have the PW functionality for Sp mods.

PJ

#38
Alupinu

Alupinu
  • Members
  • 528 messages

PJ156 wrote...

This looks great and I know I am coming late to the thread but does the original GUI and functionality still exist? So as not to have the PW functionality for Sp mods.

PJ


I was kind of wondering the same thing.

#39
dethia

dethia
  • Members
  • 146 messages

PJ156 wrote...

This looks great and I know I am coming late to the thread but does the original GUI and functionality still exist? So as not to have the PW functionality for Sp mods.

PJ


Not sure what you mean by original GUI and functionality.  The store system and tradehub system are two differnt things (though are bulked into one hak).  The store system works fine in pw's and single player modules, the tradehub system is geared towards pw's.

#40
Loki_999

Loki_999
  • Members
  • 430 messages

Anyone ever try running this mod in a PW environment? Any performance issues? What about TMIs?



#41
PJ156

PJ156
  • Members
  • 2 980 messages

Bumped for Sabranic.

 

PJ



#42
Sabranic

Sabranic
  • Members
  • 306 messages

Pretty impressive here!