Would like to make a wholesale shop mod

Post » Thu Apr 07, 2011 10:24 pm

I would like to create a mod that allows the player to sort of run their own wholesale shop as opposed to just selling their spoils to merchants. To me the whole selling menu is clunky and time consuming, and honestly not much fun. But, I'm a compulsive looter and will pretty much pick up everything I can that has value, lol. (I just hate going to sell the stuff!)

So, what I would like to do (and need your help figuring out) is to set up a shop where you could drop off your spoils into a container, and a few days later come back and collect the gold for the items you left before. It would sort of simulate a "wholesale" shop where your staff takes your wares and sells them for wholesale prices to distributors, other merchants and vendors. (You just don't get to see them)

So, I guess in its most simple form, it would basically be a container that you put items in, and a script to calculate the value of said items, and remove them and replace them with the appropriate amount of gold based on a percentage of total value. Also, it would be nice if it could also increase your Mercantile skill a little with each drop off since you're not actually selling to merchants as much.

Is this even remotely possible, and what would the scripts be to make something like this work? (I am pretty ignorant when it comes to scripting.)

If I can get a container working like I described, I could then easily make a shop, clutter it and add some NPC's for atmosphere later on. The main thing would be the distribution/collection system.

Thanks!

Oh yeah, I think for a wholesale shop, the percentage of base value could be say 65% or so. So if you had an item worth $100 gold, you would collect $65 at wholesale pricing. I feel that would be a fair trade.
User avatar
Haley Merkley
 
Posts: 3356
Joined: Sat Jan 13, 2007 12:53 pm

Post » Thu Apr 07, 2011 7:22 pm

I am no pro at scripting, but here is a modified script I made for using a container that changes an OOO wolf pelt into a vanilla wolf pelt (because of issues I had with a mod that required so many wolf pelts and wouldn't accept OOO added wolf pelts). I have altered it to give 10 gold for each wolf pelt in the container.

However, for you, I'm not sure the best way to do it, as you want the script to detect any item in the game and what its value is. My script here would involve having to reference every object in the game and how much gold to give for it!!! Obviously not a good idea.

But here it is anyway, maybe it will help in some way or you can modify it to work.

You put any number of wolf pelts into the container and when you open it again, you find your gold instead of the wolf pelts.

float Timershort sStartBegin OnActivate	Activate ;;;;;This line allows the container to be opened.  Only needed when an OnActivate is used, as the container will not open without this line if OnActivate is used.	set sStart to 1 ;;;;;This is so the script only runs after activated, so the script doesn't run in the background all the time, wasting CPU power.EndBegin GameMode	if sStart == 1		set timer to 9 ;;;;;Gives the script 9 seconds before it stops, again, this is to stop CPU being wasted.  The script will stop here after 9 seconds instead of cycling through the whole script all the time, even when not being used.				if MyChest.GetItemCount WolfPelt01 > 0 ;;;;;Check any WolfPelt01 is present			MyChest.RemoveItem WolfPelt01 1 ;;;;;Remove 1 WolfPelt01			MyChest.AddItem F 10 ;;;;;Add 10 gold to chest		endif		if timer > 0			set timer to timer - getsecondspassed ;;;;;This line makes the timer keep checking to see if it is at 0 yet.		else			set sStart to 0 ;;;;;Script will stop running now, after 9 seconds has passed.		endif	endifEnd

User avatar
Adam Porter
 
Posts: 3532
Joined: Sat Jun 02, 2007 10:47 am

Post » Fri Apr 08, 2011 4:40 am

I would imagine that OBSE might have some way of determining the items in a chest and their value, but I wouldn't know how as I don't have much experience with OBSE. Look on the Wiki, search Functions and look at OBSE Get functions.

Also, if you hate selling stuff, why not make a script that is added to enemies, that adds gold to them, based on how much their loot would normally fetch when sold.

You could use IsInFaction to check their faction and use that as a way of determining if they are bandits or what ever. Then you could just take the gold instead of the loot.

Or just add Gold to enemies in their inventory one by one.
User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am

Post » Thu Apr 07, 2011 10:42 pm

I really don't know jack about scripting, I just make the dungeons, path-node 'em, populate 'em, put loot inside of 'em, and then the other fun stuff.

But what I was thinking is make a separate container for each TYPE of item? It would still have to reference every item of that type, but a bit less than every item, eh?

-Chicken-
User avatar
Heather M
 
Posts: 3487
Joined: Mon Aug 27, 2007 5:40 am


Return to IV - Oblivion