How exactly would I go about adding a restocking supply of f

Post » Wed Dec 07, 2011 1:45 am

It seems that I can't specify soul data when sticking the gem directly into the merchant's inventory... but I can't make the quantity infinite if I place it in the cell.

Perhaps some scripting may be necessary?

EDIT: As far as I can tell, the only necessary script would be one that causes the item to reappear after it is taken (or sold, as the case may be). I can "cheat" and place the items outside interior walls (somewhere in the ether) to prevent theft. I think. Ideas?

EDIT, PART 2: ELECTRIC BUGALOO: I wonder if the "AddSoulgem" command might help?

player->AddSoulgem, "golden saint", Grand

Or perhaps DropSoulgem... except I can't figure out how it works.

EDIT, PART 33 1/2: THE FINAL INSULT: I suppose that I could very well *create* new misc objects in the editor with the same graphics as soul gems and place scripts on them that replace themselves with the appropriate filled soul gem (using the AddSoulgem command) once they enter the player's inventory... and I know this should work because the Morrowind Patch Project does something similar with cursed items.

Example:

begin DaeSummon_Diamond_01if (OnActivate == 1)	if ( MenuMode == 1 )		return	else		Activate		PlaceAtPC "Dremora_lord" 1 128 1		player->removeitem "ingred_Dae_cursed_diamond_01" 1		player->additem "ingred_diamond_01" 1	endifendifend DaeSummon_Diamond_01


The only problem I have to work with is that the player isn't *activating* the item, but rather buying it. But this definitely seems to be the way to go. Something tells me that this script right here is just a few tweaks away from being exactly what I want.
User avatar
Wayne W
 
Posts: 3482
Joined: Sun Jun 17, 2007 5:49 am

Post » Tue Dec 06, 2011 10:52 pm

Isn't there an http://www.uesp.net/wiki/Tes3Mod:OnPCAdd trigger? As usual I don't know if it actually does what it says all the time.
User avatar
Lyd
 
Posts: 3335
Joined: Sat Aug 26, 2006 2:56 pm

Post » Wed Dec 07, 2011 9:48 am

Ok, so the script would look like this:

begin BTB_soulgem_mudcrabshort OnPCAddif ( OnPCAdd == 1 )player->removeitem "BTB_soulgem_mudcrab" 1player->AddSoulgem, "mudcrab", pettyreturnendifend BTB_soulgem_mudcrab


(That was a question, by the way. I just pulled that code out of my ass.)
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Post » Tue Dec 06, 2011 7:54 pm

I think that things placed in the cell do actually restock. I seem to remember buying some soul gems from that guy in Vivec, and they restocked despite being clearly visible on a shelf before I bought them.
User avatar
MISS KEEP UR
 
Posts: 3384
Joined: Sat Aug 26, 2006 6:26 am

Post » Wed Dec 07, 2011 12:24 am

It seems that I can't specify soul data when sticking the gem directly into the merchant's inventory... but I can't make the quantity infinite if I place it in the cell.
I've seen (I think in Sandman101's HELLUVA Merchants mod for one) people adding the things they want merchants to stock into a container (crate or something), assigning ownership of the container and then placing the container (cue spooky sound fx) intooo the vooooiiiiid, outside of the visible bits of the interior cell.
User avatar
Justin
 
Posts: 3409
Joined: Sun Sep 23, 2007 12:32 am

Post » Wed Dec 07, 2011 6:42 am

Put a script on a container that randomly has a few filled soulgems from a pre-determined list. (I think you can do that)
It would then be different every time you enter the cell.

I've seen (I think in Sandman101's HELLUVA Merchants mod for one) people adding the things they want merchants to stock into a container (crate or something), assigning ownership of the container and then placing the container (cue spooky sound fx) intooo the vooooiiiiid, outside of the visible bits of the interior cell.

But BTB want them to sell filled soul gems. You can't put those into a container in the usual manner.

I think that things placed in the cell do actually restock. I seem to remember buying some soul gems from that guy in Vivec, and they restocked despite being clearly visible on a shelf before I bought them.

Maybe the ones you bought came from his pocket or container. Unless scripted, the shelf ones wouldn't respawn.
User avatar
Anna S
 
Posts: 3408
Joined: Thu Apr 19, 2007 2:13 am

Post » Wed Dec 07, 2011 9:38 am

Well, like I said, I'm pretty sure that script is going to be the way to go. I just need someone familiar with the concept of scripting to come along and correct it.

...

*Summons Fliggerty*
User avatar
BethanyRhain
 
Posts: 3434
Joined: Wed Oct 11, 2006 9:50 am

Post » Wed Dec 07, 2011 5:07 am

Ah, crap... I just realized somehthing.

This change would make my mod for all intents and purposes dependent on the soul gem value rebalance fix from the Morrowind Code Patch. Because I'll have to manually set the price of the new items I add, but I CAN'T specify the price of the soul gem that replaces it, you would otherwise end up with something worth far more than you paid for it.

Blarg >.<

EDIT: or perhaps not. Operating under the assumption that the game's economy is totally [censored] without the soul gem value rebalance, all I'm really doing without it is pissing into an ocean full of piss.
User avatar
Dalley hussain
 
Posts: 3480
Joined: Sun Jun 18, 2006 2:45 am

Post » Tue Dec 06, 2011 11:49 pm

make a container that has what you want to sell. and then make the quantities all negative(eg -5 soulgems means 5 soulgems in inventory that replenish.)
and the place that container in the cell. does not even have to be in the room. (under the floor is common) and then set that container as being owned by the npc i question. all done :dance:
User avatar
john page
 
Posts: 3401
Joined: Thu May 31, 2007 10:52 pm

Post » Tue Dec 06, 2011 9:17 pm

make a container that has what you want to sell. and then make the quantities all negative(eg -5 soulgems means 5 soulgems in inventory that replenish.)
and the place that contain in the cell. does not even have to be in the room. (under the floor is common) and then set that container as being owned by the npc i qeustion. all done :dance:

No, you cannot place filled soulgems in containers. As it's been stated numerous times in the thread.
User avatar
QuinDINGDONGcey
 
Posts: 3369
Joined: Mon Jul 23, 2007 4:11 pm

Post » Wed Dec 07, 2011 4:20 am

No, you cannot place filled soulgems in containers. As it's been stated numerous times in the thread.

well you can always place it in the npc's personal inventory in -value. if the are blocked. then you just unblock them. if that fails go look at how they did it ingame with the girl in balmora.
User avatar
phil walsh
 
Posts: 3317
Joined: Wed May 16, 2007 8:46 pm

Post » Wed Dec 07, 2011 7:56 am

*Summons Fliggerty*


Not sure if his daughter has gotten ahold of the lamp, so that might not be reliable for the time being. :P




Anyway, if you can use a GetItemCount test on the gems, you could re-add (or randomly add) some to the merchant. You can't test for the soul in the gem, and I'm not sure if filled gems have different IDs, so your options are rather limited.
User avatar
Nienna garcia
 
Posts: 3407
Joined: Wed Apr 25, 2007 3:23 am

Post » Wed Dec 07, 2011 11:38 am

I'm not horribly concerned with randomness... in fact, I've already specified which merchants will receive which gems.

I won;t have a chance to test my script until at least a few days from now, but I think what I have up there *will* work... I just need someone to look at it who knows what in the [censored] they're talking about (because I *really* don't) to tell me if I [censored] something up.
User avatar
Star Dunkels Macmillan
 
Posts: 3421
Joined: Thu Aug 31, 2006 4:00 pm

Post » Tue Dec 06, 2011 10:32 pm

well you can always place it in the npc's personal inventory in -value. if the are blocked. then you just unblock them. if that fails go look at how they did it ingame with the girl in balmora.

Placing them in Inventory can't be done either.
If you mean Galbedir, all her filled soul gems are laying out in the open. ;)
User avatar
Cassie Boyle
 
Posts: 3468
Joined: Sun Nov 05, 2006 9:33 am

Post » Tue Dec 06, 2011 7:59 pm

Yeah, the whole container thing isn't going to work.


Plus, I've already finished with the updated readme that assumes the solution I've been proposing.
User avatar
Soraya Davy
 
Posts: 3377
Joined: Sat Aug 05, 2006 10:53 pm

Post » Wed Dec 07, 2011 5:57 am

Ok, it looks like the script works... sort of. I've yet to test it an a merchant environment, but it half-works if I pick it up. The Addsoulgem command isn't working right, though.
User avatar
Sheeva
 
Posts: 3353
Joined: Sat Nov 11, 2006 2:46 am

Post » Wed Dec 07, 2011 10:44 am

Ok, so the script would look like this:

begin BTB_soulgem_mudcrabshort OnPCAddif ( OnPCAdd == 1 )player->removeitem "BTB_soulgem_mudcrab" 1player->AddSoulgem, "mudcrab", pettyreturnendifend BTB_soulgem_mudcrab


(That was a question, by the way. I just pulled that code out of my ass.)
Ok, it looks like the script works... sort of. I've yet to test it an a merchant environment, but it half-works if I pick it up. The Addsoulgem command isn't working right, though.
In the e.g. script I think it has to be:
player->AddSoulgem, "mudcrab", Misc_SoulGem_Petty
Valid values (according to p132 of MWSFD) are:
Misc_SoulGem_Azura
Misc_SoulGem_Grand
Misc_SoulGem_Greater
Misc_SoulGem_Common
Misc_SoulGem_Lesser
Misc_SoulGem_Petty

Hope I got it right this time :blush:
User avatar
Lisa
 
Posts: 3473
Joined: Thu Jul 13, 2006 3:57 am

Post » Wed Dec 07, 2011 11:13 am

Ok, that works.

Now, I need to test it in a merchant situation.
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Wed Dec 07, 2011 5:35 am

SWEET! It WORKS!

Now, it's time to go full-scale.
User avatar
tannis
 
Posts: 3446
Joined: Sat Dec 09, 2006 11:21 pm

Post » Wed Dec 07, 2011 1:32 am

Well it's working, but it's also crashing the game...

It seems that I'll have to limit the player to buying one at a time.

Here's the final script, by the way:

begin BTB_soulgemscript_bullnetchshort OnPCAddif ( OnPCAdd == 1 )	if ( MenuMode == 1 )	return	else		player->removeitem "BTB_soulgem_bullnetch" 1		player->addsoulgem, "netch_bull", Misc_SoulGem_Common		return	endifendifend BTB_soulgemscript_bullnetch


EDIT: okay, it's *still* crashing the game... why?

EDIT 2: Ok, more info...

The first one works just fine. The second one *always* crashes the game. Setting it to work OnActivate works just fine, so it seems to have to do specifically with OnPCAdd.
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am

Post » Tue Dec 06, 2011 7:25 pm

Well it's working, but it's also crashing the game...

It seems that I'll have to limit the player to buying one at a time.

Here's the final script, by the way:

begin BTB_soulgemscript_bullnetchshort OnPCAddif ( OnPCAdd == 1 )	if ( MenuMode == 1 )	return	else		player->removeitem "BTB_soulgem_bullnetch" 1		player->addsoulgem, "netch_bull", Misc_SoulGem_Common		return	endifendifend BTB_soulgemscript_bullnetch


EDIT: okay, it's *still* crashing the game... why?

EDIT 2: Ok, more info...

The first one works just fine. The second one *always* crashes the game. Setting it to work OnActivate works just fine, so it seems to have to do specifically with OnPCAdd.

what you could do instead is:

begin BTB_soulgemscript_bullnetchif ( MenuMode == 0 )   returnendifif ( "player"->GetItemCount "BTB_soulgem_bullnetch" > 0 )   "player"->removeitem "BTB_soulgem_bullnetch" 1   "player"->addsoulgem, "netch_bull", Misc_SoulGem_Common    returnendifend BTB_soulgemscript_bullnetch

and plug it onto an invisible activator near the merchant. i'd change the name and include all the other gems you want changed as well.

it's kind of like how i handle changing the bag of tithes i made for religious factions from one weight class to another.
User avatar
Mari martnez Martinez
 
Posts: 3500
Joined: Sat Aug 11, 2007 9:39 am

Post » Wed Dec 07, 2011 5:32 am

*snip*


You know what's funny? I JUST thought of the same thing. I thought of the bluescript and knew it did something similar to what I wanted, so I went and had a look at it and then just moved the code over into mine.

I ended up with this:

begin BTB_soulgemscript_mudcrabif ( menumode == 1 )returnelseif ( player->getitemcount, "BTB_soulgem_mudcrab" > 0 )player->removeitem "BTB_soulgem_mudcrab" 1player->addsoulgem, "mudcrab", "Misc_SoulGem_Petty"returnendifendifend BTB_soulgemscript_mudcrab


Works like a charm. Still, I thank you for your help :)
User avatar
Christine
 
Posts: 3442
Joined: Thu Dec 14, 2006 12:52 am


Return to III - Morrowind