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

Post » Tue Apr 05, 2011 6:42 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
renee Duhamel
 
Posts: 3371
Joined: Thu Dec 14, 2006 9:12 am

Post » Mon Apr 04, 2011 7:22 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
Suzy Santana
 
Posts: 3572
Joined: Fri Aug 10, 2007 12:02 am

Post » Tue Apr 05, 2011 1:09 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
Hearts
 
Posts: 3306
Joined: Sat Oct 20, 2007 1:26 am

Post » Tue Apr 05, 2011 6:53 am

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
Gracie Dugdale
 
Posts: 3397
Joined: Wed Jun 14, 2006 11:02 pm

Post » Tue Apr 05, 2011 3:44 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
Nuno Castro
 
Posts: 3414
Joined: Sat Oct 13, 2007 1:40 am

Post » Tue Apr 05, 2011 7:51 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
Mashystar
 
Posts: 3460
Joined: Mon Jul 16, 2007 6:35 am

Post » Mon Apr 04, 2011 5:41 pm

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
Lynne Hinton
 
Posts: 3388
Joined: Wed Nov 15, 2006 4:24 am

Post » Mon Apr 04, 2011 6:05 pm

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
CSar L
 
Posts: 3404
Joined: Fri Nov 09, 2007 9:36 pm

Post » Tue Apr 05, 2011 12:11 am

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
Tiffany Carter
 
Posts: 3454
Joined: Wed Jul 19, 2006 4:05 am

Post » Mon Apr 04, 2011 6:48 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
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm

Post » Tue Apr 05, 2011 2:23 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
Shianne Donato
 
Posts: 3422
Joined: Sat Aug 11, 2007 5:55 am

Post » Tue Apr 05, 2011 5:47 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
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Post » Mon Apr 04, 2011 8:08 pm

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
Nienna garcia
 
Posts: 3407
Joined: Wed Apr 25, 2007 3:23 am

Post » Tue Apr 05, 2011 6:14 am

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
Mandy Muir
 
Posts: 3307
Joined: Wed Jan 24, 2007 4:38 pm

Post » Mon Apr 04, 2011 5:56 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
AnDres MeZa
 
Posts: 3349
Joined: Thu Aug 16, 2007 1:39 pm

Post » Tue Apr 05, 2011 8:38 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
brenden casey
 
Posts: 3400
Joined: Mon Sep 17, 2007 9:58 pm

Post » Tue Apr 05, 2011 8:13 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
Kate Murrell
 
Posts: 3537
Joined: Mon Oct 16, 2006 4:02 am

Post » Tue Apr 05, 2011 8:46 am

Ok, that works.

Now, I need to test it in a merchant situation.
User avatar
Lory Da Costa
 
Posts: 3463
Joined: Fri Dec 15, 2006 12:30 pm

Post » Tue Apr 05, 2011 1:29 am

SWEET! It WORKS!

Now, it's time to go full-scale.
User avatar
Quick Draw
 
Posts: 3423
Joined: Sun Sep 30, 2007 4:56 am

Post » Tue Apr 05, 2011 2:30 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
Aaron Clark
 
Posts: 3439
Joined: Fri Oct 26, 2007 2:23 pm

Post » Tue Apr 05, 2011 2:57 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.

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
MISS KEEP UR
 
Posts: 3384
Joined: Sat Aug 26, 2006 6:26 am

Post » Tue Apr 05, 2011 2:21 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
Neko Jenny
 
Posts: 3409
Joined: Thu Jun 22, 2006 4:29 am


Return to III - Morrowind

cron