Another question about my to be fabulous mod that you should all try:
I want to create a soul gem like Azura's Star and place a super high soul in it and have the whole thing in a crate with an unlimited supply.

What I have so far:
1. I've made a copy of Azura's Star
2. I've made a creature with a super high soul
3. I have a crate to put it all in (negative number for the infinite amount).

I just need to know how to put these all together. More specifically, I don't know how to get the soul of the creature I created into the soul gem. Any hints?
When you say you made a copy of Azura's Star - I don't think making new soul gems works. So if you made a new object, bad, if you just placed Azura's Star in a new location, that's fine.

I'm not sure you can actually have a soul gem with a soul in it in a container... Because you need to double click on the soul gem and look in "Extra Data", which you can't do when it's in a container.

Hope that helps.

- Danjb
There is however a script function "AddSoulGem" that might work (you still can't create new types though). But in the quick test I did it appeared that it only works on actors, not containers. The negative item trick only works on items that will be sold by a trader, so maybe that's what you're trying to do anyway. If so just use AddSoulGem to give them to the trader directly. There's also a function "HasSoulgem", so you could check when they've sold all they have and the script should add more.
QUOTE(ManaUser @ May 19 2008, 03:05 PM) *
There is however a script function "AddSoulGem" that might work (you still can't create new types though). But in the quick test I did it appeared that it only works on actors, not containers. The negative item trick only works on items that will be sold by a trader, so maybe that's what you're trying to do anyway. If so just use AddSoulGem to give them to the trader directly. There's also a function "HasSoulgem", so you could check when they've sold all they have and the script should add more.


I think you can get around that issue by using AddItem instead of AddSoulGem. Since it's just a misc item that should work...
QUOTE(peachykeen @ May 19 2008, 11:51 AM) *
I think you can get around that issue by using AddItem instead of AddSoulGem. Since it's just a misc item that should work...

Uhh, yeah, but AddItem can't add a filled soul gem, which is what Tnega Terces wants.
Negative numbers in a crate wont give infinite items? Should I make it a trading crate instead? (Or a trading NPC, if crates can't do that...) Or should I just make the crate organic and respawning? (I have replenishable items in it, throwing stars etc, that I want the player to be able to come back and get more)

Also, I've tried just setting my creature in the game and creating a weapon with multiple soultraps on it to speed up harvesting (and lessen the number of creatures needed. However I'm having trouble capturing the soul, even when I cast soultrap. Am I missing anything? My creatures have a soul value of 99999, can Azura still hold them? If not, how do I get a soulgem that can?
The simplest thing to do is make a "soul dispenser". Just attach this to an activator:
CODE
if ( OnActivate )
     Player->AddSoulGem "YOUR CREATURE GOES HERE", "Misc_SoulGem_Grand"
     MessageBox "Soul of the great foozle has been added to your inventory."
endif

The man's a genius wink.gif

If Azura's Star can't hold it, nothing can. But if you just want a super-powered enchantment, it can be done in the editor (you probably knew that, but yeah, there's not really any other way)...


Oh, and you can make the crate respawning but it will only respawn once per month of game time, I think. And it has to be an organic container, so the player can't put things in it. Welcome to the limited-ness of Morrowind wink.gif
Nah, on the whole it's pretty flexible.

If you double click the crate and look in the "Extra Data" section, you can give the crate an owner. If the owner is a trader, he'll sell what's in the crate, and if it's negative, it should be infinite...
As manauser said, using a negative number for an infinite inventory of an object only works when the items are sold by a merchant, either from their inventory or from a container owned by the merchant. If you remove the items directly from the container or from the merchant's inventory (i.e., by stealing), they won't restock. If you put the items in an organic container set to respawn, then they'll be restocked to their original quantity every four months when the chest respawns (the same as the equipment chests in some of the guilds).

----------------------------------------------------------------------------

As others have already pointed out, there's no way to add more soul gem objects to the game. The soul gem property is hard-coded to the original six soul-gem objects in the game; there's no way to make a new object into a soul gem using the Construction Set.

You could edit the properties of one the existing soul gem objects, but that would affect the properties of every soul gem of that type in the game.

----------------------------------------------------------------------------

You've already discovered that there's no way to add a soul to a soul gem object: you can only add a soul to a soul gem reference that's placed in the game world.

If you only need a limited number of filled soul gems, probably the simplest way is to just set them out in the game world for the player to pick up or for an NPC merchant to sell.

If you need them to replenish automatically, you'll need to script it: I don't think there's any way to handle filled soul gems with infinite inventory items or with a respawning container.
OK, so, lets say that I wanted to try going the trader route. I don't want the player to have to pay for any of the items, but I don't want them to be worth 0 gold either. How can I get the trader to just give them to the player, while still allowing the player to select which items they want, like in a normal barter?
Far as I know, that can't be done. The bartering system is hard-coded, at least to the extent you'd need. However, a relatively simple work-around would be checking the player's gold, record how much they have, remove it all, add 1m, trigger bartering, and afterwards reset their gold to the original value. It would take just a little bit of scripting (except for the variable-amount removeitems, which would be a little lengthy but still simple), and should work decently.
For the trader route, make a "dummy" Azura's Star that costs whatever you want, then have dialogue or scripting change it to the regular Azura's Star.
That, or make the process work through dialogue... if that would even work.

If you want them to be free, why not just place them somewhere for the player to take?
Heck of a lot of work to make a cheat. I don't see why the dispenser method I suggested isn't good enough for something like that.
OK, so I'm just trying to attach a script to the crate that will give the option of giving the player X filled soulgems. Everything works, except the fact that the crate inventory closes as soon as it opens. What am I doing wrong?

CODE
Begin u-m_soul_dispencer_script

Short controlvar
Short button

If (OnActivate == 1); Ask if the player wants any filled soulgems, and how many.
    If (controlvar == 0)
        MessageBox "Would you like an Ulte-Mati Soul?", "No", "One", "Five", "Ten"
        Set controlvar to 1
    endif
endif

if (controlvar == 1);Find out how many the player wants
    set button to GetButtonPressed

    if (button == -1)
        return
    elseif (button == 1);Add one filled soulgem
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        MessageBox "The Ulte-Mati Soul has been added to your inventory."
        Activate
        set controlvar to 2
    elseif (button == 2);Add five filled soulgems
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        MessageBox "Five Ulte-Mati Souls have been added to your inventory."
        Activate
        set controlvar to 2
    elseif (button == 3);Add ten filled soulgems
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        MessageBox "Ten Ulte-Mati Souls have been added to your inventory."
        Activate
        set controlvar to 2
    else;Add no filled soulgems
        Activate
        set controlvar to 2
    endif
elseif (controlvar == 2); Reset
        if (INVENTORY CLOSED)
                set controlvar to 0
        endif
endif

End
I'm not sure why you're getting the problem you described, but I see no way for controlvar to go back to 2, meaning you can only use the dispenser once? Unless you've taken care of that outside of this script...

Possible fix would be to reset it to 0?
Not sure, haven't got time to look in great detail...

EDIT: You've also got "float timer" in there, without using it, I think...
QUOTE(Danjb @ May 21 2008, 10:05 AM) *
I'm not sure why you're getting the problem you described, but I see no way for controlvar to go back to 2, meaning you can only use the dispenser once? Unless you've taken care of that outside of this script...

Possible fix would be to reset it to 0?
Not sure, haven't got time to look in great detail...

I'm thinking that MAYBE what I need is some way to see when the player has exited the crate's inventory so the whole processes can be restarted. Any suggestions?
Here's the line you want:
CODE
        if ( menumode == 0)

This is a very useful line, as its use ensures that the action isn't performed in any pause mode.
I've run into another, werid problem. I hit escape and exit, then changed my mind and said No (I don't want to exit Morrowind). The script on my crate then gave me an Ulte-Mati soul. So I'm guessing the GetButtonPressed works for any message? Why though is it coming up in this case, since the code that adds filled soulgems should be locked inside an "if (controlvar == 1)", and at that time controlvar should equal either 0 or 2? The script specifically sets controlvar to 2 after giving the player a filled soulgem, so even if it did mess up and give one under the condtions I mentioned above, this should only happen once, but it does not, it happens repeatedly...

WHAT IS GOING ON HERE???!!!

(Edit: I hadn't clicked on the crate with the script, so controlvar should have been zero when I went into the escape menu, and after the error that added the first soulgem controlvar should then have been 2. Did I totally misunderstand what I wrote? Am I missing something in my code?)
OK, I got the other menu error fixed, but the crate inventory still only pops up for a split second before disappearing... Everything else works exactly as it should (filled soulgem, multiple visits to get more filled soulgems) except that. What line in my code makes the menu (if that is the right word) close?
QUOTE(Tnega Terces @ May 21 2008, 02:40 PM) *
So I'm guessing the GetButtonPressed works for any message?


If that's the case, that would be an amazing occurence. We could do some interesting things (you click options in the menu, then go back to game and the mod options menu will pop up...).
I'm going to spend the night testing that'n out.
QUOTE(peachykeen @ May 21 2008, 12:58 PM) *
If that's the case, that would be an amazing occurence. We could do some interesting things (you click options in the menu, then go back to game and the mod options menu will pop up...).
I'm going to spend the night testing that'n out.

I think it happens when you don't protect that portion of your code with some control variable that only lets it execute when your message is open... (just in case that helps)
Maybe it doesn't like activating just after giving the message. Try putting activate under controlvar ==2, and move what's currently in controlvar == 2 to controlvar == 3. If it continues having problems, keep those but add a timer to make a delay before both the controlvar==2 and controlvar==3 blocks..
I feel like I ought to be able to help as I recently had the exact same problem - turns out it was because the crate was getting deleted, though, which isn't happening here :/
QUOTE(Tnega Terces @ May 21 2008, 06:05 PM) *
I think it happens when you don't protect that portion of your code with some control variable that only lets it execute when your message is open... (just in case that helps)



I'm not sure. What I've tried so far hasn't gotten any results, but I think I made a kinda-big mistake (tests for a value in GetButton always, but I forget to make it wait till menumode closes after it gets something to show the msg which would break it... anyways, I'll be working on that). If it's possible to detect various buttons within menus, we could set something up so that you cast a spell, then click options-video and exit it will open the mod's video-related options. Dunno, more experimenting later.

I do know though, that most of the time when you hit escape after a msgbox pops up, it tends to break the box as it forces a menuclose. Like popping 2 with buttons in 2 back-to-back frames, locks you in menumode and only shows the first.

EDIT: As far as I can tell, it doesn't happen. It might be a bug with the pause menu breaking messageboxes, I'll try another technique later, but I don't think it'll work.
QUOTE(peachykeen @ May 22 2008, 01:36 PM) *
I'm not sure. What I've tried so far hasn't gotten any results, but I think I made a kinda-big mistake (tests for a value in GetButton always, but I forget to make it wait till menumode closes after it gets something to show the msg which would break it... anyways, I'll be working on that). If it's possible to detect various buttons within menus, we could set something up so that you cast a spell, then click options-video and exit it will open the mod's video-related options. Dunno, more experimenting later.

I do know though, that most of the time when you hit escape after a msgbox pops up, it tends to break the box as it forces a menuclose. Like popping 2 with buttons in 2 back-to-back frames, locks you in menumode and only shows the first.

EDIT: As far as I can tell, it doesn't happen. It might be a bug with the pause menu breaking messageboxes, I'll try another technique later, but I don't think it'll work.

Here's what happed with mine. I had the script I posted earlier. Then, while in the same cell as the crate the script was attached to, I hit escape (I had not tried to activate the crate first, just hit escape), and chose exit. when the message box popped up asking if I really wanted to quit, I hit no (the second option) and right away I got a message saying a single ulte-mati soul had been added to my inventory (and it had). Everything worked exactly as if I had clicked the crate and asked for one soul gem (the second option there as well), except the crate's inventory didn't flash for one split second like it normally does when I click on it and try to open it (regardless of asking for any or no filled soul gems).

So, as regards what you are trying to do, peachykeen, it should work whenever you click on any menu (unless you add that second condition of having to activate a spell or something...)

Hope that helps!
Well, I know the pause menu options (New/Load/etc) don't do anything.
I know the close button on the load menu doesn't. The no button on exit I didn't try, but that looks basically like a messagebox, so I might give that a shot. Anyways, looks like the idea doesn't work.
OK, So I've changed course slightly... Now I want to make a book that will dispense the soul gems when you open it (that way you can take it with you! heee.gif). I used the code I had been trying on the crate and stuck it in a book instead. Just about every thing's handy dandy, except the fact that the *take* option to pick up the book doesn't appear (thus you can't keep the book, which defeats the whole point). Any ideas on why its not showing? Furthermore (I just found out), you can not open the book a second time (which is even worse). Help?! PLEASE?!! Here's the code I'm using...

CODE
Begin u-m_soul_dispencer_script

Short controlvar
Short button

If (OnActivate == 1); Ask if the player wants any filled soulgems, and how many.
    If (controlvar == 0)
        MessageBox "Would you like an Ulte-Mati Soul?", "No", "One", "Five", "Ten"
        Set controlvar to 1
    endif
endif

if (controlvar == 1);Find out how many the player wants
    set button to GetButtonPressed

    if (button == -1)
        return
    elseif (button == 1);Add one filled soulgem
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        MessageBox "The Ulte-Mati Soul has been added to your inventory."
        Activate
        set controlvar to 2
    elseif (button == 2);Add five filled soulgems
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        MessageBox "Five Ulte-Mati Souls have been added to your inventory."
        Activate
        set controlvar to 2
    elseif (button == 3);Add ten filled soulgems
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
        MessageBox "Ten Ulte-Mati Souls have been added to your inventory."
        Activate
        set controlvar to 2
    else; Add no filled soulgems
        Activate
        set controlvar to 2
    endif

elseif (controlvar == 2); Reset
        if (MenuMode == 0)
                set controlvar to 0
        endif
endif

End
Does anyone know scripting real well, because I'M STILL HAVING TROUBLE WITH THIS THING!!! As noted above, I want to make a book that gives you the option of receiving a special filled soul gem when you open it. You can look above to see the script I am currently using. Errors: a) The “Take” option is unavailable, so you can’t carry the book with you, and b) It will only give you a filled soul gem the first time you open it. I’ve gone over it, and I don’t know what I’m doing wrong. COULD SOMEONE PLEASE HELP ME…?
Maybe you could make an activator that gives you the misc object and equips it and gives you the soul gem?
Okay, yeah, I see what you're saying... Let me explain how I was hoping to get this to work...

You find the book in a crate. You take it out and, if you want a soul gem, place it on the ground (is there any way to open a book directly from the inventory? Wait, let me guess, you place it on your character, right? *Sigh*). Anyways, you open the book, and a message box appears asking if you want one, five, or ten Ulte-Mati souls (already created the creature), or none at all. You pick, and that many grand soul gems with Ulte-Mati souls are added to your inventory. You may then read the book, and when done, click "Take" to put it back in your inventory for future use.

Only, using the script I have above, the "Take" option never shows its head, and the message box only appears the first time you open the book...

(Also, do you think that I should start a new thread, since the title of this one of what I'm trying to do is no longer strictly true?)
Im revamping my goal here and starting a fresh topic, check it out at: http://www.bethsoft.com/bgsforums/index.php?showtopic=868417
Submit a Thread