Lvl based shop?
#1
Posté 16 août 2010 - 01:54
Am a pretty green in writing scripts so if anyoen want to help me with this then I really, really REALLY appreciate it.
I am at my wits end here, please help me!
#2
Posté 16 août 2010 - 04:15
L8
#3
Posté 16 août 2010 - 04:40
Also in The CEP, you can up the level requirements for the item by increasing the cost, which is achieved by adding the property Increased Value +1 through + 20, and you can naturally increase the value as well, though it's limited to 32,000 in additional cost.
That's the easiest way to control items in your module...
I suppose you could create multiple stores that the PC's could'nt access till they were the appropriate level, however any smart player will just have a friend or their other character buy it for them, and believe me, It will happen!
There really is no point in a Level Based Shop, and many players do NOT like level item based restriction, so if your building for only your module, then I'd recommend that you put the shop somewhere, where only higher levels can reach it, but like I said, they will just have a friend buy it, or once they are high enough to buy it, they may just transfer it to their other characters. (Unless your preventing this, which would be tough to do & annoying to players)
Obviously it's much easier to use Item level Restrictions rather than "try" to prevent players from cheating, because they will, and it's a lot of work to stop them from doing it..(sometimes)
Modifié par Genisys, 16 août 2010 - 04:48 .
#4
Posté 16 août 2010 - 07:31
Modifié par Who said that I, 16 août 2010 - 07:32 .
#5
Posté 16 août 2010 - 08:25
#6
Posté 16 août 2010 - 08:31
Any way your question was about How to do what you wanted to do, Not why you should not do it.
Another way to do it other then the one I posted above. Would be to create a master store and move the items to the other child stores as the PC open them. One of the porblems you need to look at with this method is if more then one PC has a store open at a time. You could easily end up with a situation where, in moving items back and forth. you either doup the items or drain them out of a store while a PC is still shopping.
I am not sure what your scripting level is. Did you need more help then just Ideas on how to pull it off?
#7
Posté 16 août 2010 - 08:41
#8
Posté 16 août 2010 - 08:47
//Set this to the Level the PC Needs to See the Line in the Conversation
const int LEVEL_NEEDED = 10; //Default = 10 (PC Must be Level 10 or higher to see the line)
//Note this line in the conversation does NOT show if the PC isn't High Enough In Total Levels
int StartingConditional()
{
int iResult = FALSE;
object oPC = GetPCSpeaker();
int nLvl = GetHitDice(oPC);
if(nLvl >= LEVEL_NEEDED)
{ iResult = TRUE; }
return iResult;
}
Modifié par Genisys, 16 août 2010 - 08:48 .
#9
Posté 16 août 2010 - 10:26
Are you wanting the Items limited by the standard level restriction? (the Standard Level restriction GP value can be found in itemvalue.2da under the MAXSINGLEITEMVALUE column.)
Did you want the price of the items in the store to very per the clients appraise skill?
Did you want the items shown to the PC to vary by anything other then level? (ex. If you have PC known as nobles do they get a better selection for there level. Or a PC who has a high appraise or persuade skill get a better selection then a pc with a low skill. )
Some thought also need to go into what happens when two players (if it is a multiplayer game) try to open the same store at the same time. The two simplest options would be to leave the store in the state it is in when the first player opened it for the second player. Or to stop the second player from being able to shop until the first player is finished shopping.
Is the store also going to buy items.? ( if they do what happens if you end up with more items then will fit in the shop.)
If you are wanting the store limited in in items in 1 level increments. I doubt you want to create 40 stores for every store you have in the game. That brings another Question:
Is this going to be for every store in the game or just a select few.
****
Basic Idea: create Two stores with Tags built off of the Shopkeepers tag. (ex. Shopkeeper Tag = ShopKeep; The Show Room Store tag = ShopKeep_SR; Then the WareHouse stores tag= ShopKeep_WH)
When A PC wants to open the store move the Items from the WareHouse store to the ShowRoom that the merchant is willing to show to him. when the store is closed move them back to the WareHouse.
You just need to be careful and either track how many PC have the store open or limit it to one having it open at a time.
I can really see you getting fancy with this idea and taking it to different levels. Such a secrete fence that Show stolen items to gang members or thieves only. Or a cleric shop that will not show the holy items to the heathen. Just thoughts. Getting a little ahead of the game here one step at a time.
Edit: Cut and Past is hit a miss here. Sometimes it doubles your blank lines. other times it removes them. LOL.
Modifié par Lightfoot8, 16 août 2010 - 10:30 .
#10
Posté 17 août 2010 - 01:28
1. I want it to have the standard NWN lvl restriction
2.I do want to price of the items vary depending on their appraise skill
3. I did fancy the idea of making nobles/charismatic or PC's with a high appraise skill get a better selection of goods then people of normal "stock " or having lower appraise skill.
4. Store is going to buy items from the PC but then depending on what kind of shop it is.
5. This is going to be for every store in the server, though I need to add that I was also planning on making differences in in the quality of goods they sell. Also race and location and maybe allignment or deity of the owner of the store is deciding what is going to end up being sold by the shop owner.
so yeah that is basically my idea and you know exactly how I want it Lightfoot8!
#11
Posté 17 août 2010 - 05:54
#12
Posté 17 août 2010 - 01:08
Who said that I wrote...
okay here is how I basically want to see it:
1. I want it to have the standard NWN lvl restriction
2.I do want to price of the items vary depending on their appraise skill
3. I did fancy the idea of making nobles/charismatic or PC's with a high appraise skill get a better selection of goods then people of normal "stock " or having lower appraise skill.
4. Store is going to buy items from the PC but then depending on what kind of shop it is.
5. This is going to be for every store in the server, though I need to add that I was also planning on making differences in in the quality of goods they sell. Also race and location and maybe allignment or deity of the owner of the store is deciding what is going to end up being sold by the shop owner.
so yeah that is basically my idea and you know exactly how I want it Lightfoot8!:D:D:D:D
1) That's simple, just turn on IRL in the ini file..
2) You have to set the script to use appraise when you open the store...
3) As far as the Appraise goes, you will HAVE to make multiple stores for this, and use the starting conditional to determine which store they see based upon their appraise skill level...
4) When you set up the store you can determine what the store buys and what it will not buy, how much it buys it for, based upon the current GP Value of the item, and because your using multipel stores you have greater control over this.
5) You should make one template store and then copy and adjust the template for every store after that, this will save some time, but you will still need to place items in each store individually, therefore you will need to make your items in a seperate module, paint down all the stores, then copy the stores to your module, this will of course reduce the # of items on your palette TREMENDOUSLY!... (Good advice here)
You copy the stores by highlighting them, pressing Control (ctrl) + C, then open the other module and click on the area you wish to paint them and press Control + V... simple enough... (don't forget to save the module..)
Hope this helps some...
#13
Posté 17 août 2010 - 01:53
#14
Posté 17 août 2010 - 01:59
#15
Posté 17 août 2010 - 02:04
change this: ItemLevelRestrictions=0
To this: ItemLevelRestrictions=1
#16
Posté 17 août 2010 - 02:09
Who said that I wrote...
What I do wonder though, since its basicly only Appraise check, would it also like lock for example holy items from heathens? Making sure that only thieves or gangs can buy stolen goods?
You check appraise only once, when the store opens, and all said items in the store would be at a discounted price, and of course they could sell "approved" items at a higher price as well, you set this up...
Now, as far as limiting WHO can access what, again, it's simply a matter of determining WHO can open the store in the first place...
Now if you really want to get realistic, you should create a seperate NPC for each store, in a town preferrably, maybe have mutliple NPCs in a temple, for your temple items... which each NPC would then appraise the person they are speaking to, to determine what they should say, e.g.
What do you want heathern? //TextAppearsWhen - It's not a cleric or druid?
By all the gods, why I never! [end dialogue] // - get lost PC..
Hello there brother/sister how can I help you this day? //it's a Cleric the clergy is talking with..
I am in desperate need of some potions //for the potion store.. (if the PC is say X level)
I need to see some basic items //for low level clerics
I need to see some finer items // for medium level clerics..
I need to see some church items // for cleric specific weapons & gear.. //cleric levels required..
Do you see where this is going?
#17
Posté 17 août 2010 - 02:24
So basically you need a merchant with about 3 or 4 conversation bars so the PC can choose which one he wants to look at and if the PC has the allignment/class or whatever for it + level the store of that lvl will open correct?
#18
Posté 17 août 2010 - 02:56
You can use the default bioware wizard to create these, as they are rather trivial to create...
essentiallly, you will want to create it something like so...
int StartingConditional()
{
object oPC = GetPCSpeaker();
int i; //The variable we will be checking..
i = FALSE; //Always return false (dont' show the line) if the PC isn't qualified..
if(GetHitDice(oPC) >= 10) //if the PC is level 10 or higher...
{
i = TRUE; //Show the line in the conversation..
}
return i;
}
We will replace if(GetHitDice(oPC) >= 10) with other functions to do different kinds of checks...
For Example...
// if the PC has at least 20 Skill Ranks in Appraise... (With Bonuses)
// use TRUE instead of FALSE (To see if the player has 20 Base Ranks - with no bonuses)
if(GetSkillRank(SKILL_APPRAISE, oPC, FALSE) >=20)
{
i = TRUE;
}
or..
//For Multiple Checks... just use multiple conditionals...
if(GetLevelByclass(class_TYPE_CLERIC, oPC)>=1) //if the PC is a Cleric..
{
i = TRUE;
}
//If the PC is a Druid & at least level 10 or higher...
if(GetLevelByclass(class_TYPE_DRUID, oPC)>=1 && GetHitDice(oPC) >=10)
{
i = TRUE;
}
Is this the kind of help you were looking for?
Modifié par Genisys, 17 août 2010 - 03:08 .
#19
Posté 17 août 2010 - 03:34
But what about the IRL ini file? I still didnt get that part....
#20
Posté 17 août 2010 - 07:05
Genisys wrote...
in the nwnplayer.ini file...
change this: ItemLevelRestrictions=0
To this: ItemLevelRestrictions=1
#21
Posté 17 août 2010 - 08:48
Ill start working on some scripts In case you are still interested in the system I suggested.
#22
Posté 18 août 2010 - 04:10
thank you so much! Sometimes I seem so lost in scripting XD
#23
Posté 18 août 2010 - 12:58
I'd think the best way to handle this whole thing, would be to spawn the items into the store base upon conditions (When the Conversation Starts), so make like X Placeable Objects (with inventories), which hold items for each class, and then give the items a resref or tagname based upon the level of the item maybe?, to achieve a more dynamic result, we could do the Appraise Skill Check and adjust the price of the store as well based upon the results, which would in turn give you a more dynamic control over the whole thing, without all the frustrations, one script, one simple solution..
The PC wouldn't be able to purchase anything you didn't want them purchasing... And if you wanted to prevent transferring, just script it so the item is associated with the PC buying the item, meaning if they bought it, they can't just give it away... (Though they could resell it..) All you'd have to do is change the tagname to the PC's name (or the likes) and check when the item is Acquired.. if the name of the PC isn't the same as the tagname, kill the item..
WARN YOUR PLAYERS BEFORE HAND< before you implement any special systems, that way they don't complain to you excessively about item loss or anything other grievance you place upon them, whether intentional or not....
I may not be the smartest or best scripter or builder, but that doesn't mean I'm a bad one either...
#24
Posté 18 août 2010 - 01:40
especially seeing how green I am in this, I can actually feel my brain grow
#25
Posté 18 août 2010 - 11:29
Modifié par Genisys, 18 août 2010 - 11:29 .





Retour en haut







