×
Меню
Индекс

MSFD Checking and managing souls and soulgems

 
HasSoulgem, "CreatureID"
 
If ( Actor->HasSoulGem, "golden saint" )
 
This function checks if the player has a soul gem containing the specified soul in his inventory. A little used function that could allow some fun quests and new uses for soulgems.
 
Sample: This is part of the StrongSoulCheck script:
if ( Player->HasSoulGem "atronach_storm" > 1 )
     Set counter to ( counter + 2 )
elseif ( Player->HasSoulGem "atronach_storm" > 0 )
     Set counter to ( counter + 1 )
endif
 
RemoveSoulgem, "CreatureID", number_enum
 
Actor->RemoveSoulGem, "golden saint", 1
 
 
Removes a soulgem with the specified soul from the players inventory.
Sample: this is the complementary part from RemoveStrongSoul script to the example above:
 
if ( counter > 0 )
     if ( Player->HasSoulGem "atronach_storm" > 0 )
          Player->RemoveSoulGem "atronach_storm" 1
          Set counter to ( counter - 1 )
     endif
endif
 
Note, the player will not be happy if they get Azura's Star taken away by this. Here's a sample solution:
 
     short StarCount ;They could have more than one I guess.
 
     if ( OnActivate )
          if ( Player->HasSoulGem "Golden Saint" > 0 )
               set StarCount to ( Player->GetItemCount "Misc_Soulgem_Azura" )
               Player->RemoveSoulGem "Golden Saint" 1
               if ( ( Player->GetItemCount "Misc_Soulgem_Azura" ) < StarCount )
                    Player->AddItem "Misc_Soulgem_Azura" 1
               endif
               Player->AddItem Gold_001, 10000
               MessageBox "Thank You, Come Again."
          else
               MessageBox "You have no Golden Saint souls."
          endif
     endif
 
AddSoulGem "creature ID", "soulgem ID"
 
AddSoulGem "atronach_storm", Misc_Soulgem_Grand
 
AddSoulGem adds a soulgem of the specified type and with the specified soul to the players inventory. You can't add more than one at a time with this (giving it a count won't cause any problems, it's just ignored).
 
DropSoulgem, "Creature ID"
     DropSoulGem "atronach_storm"
 
As far as I can tell, this function is broken (crashes the game).
 
[no fix] OnPCSoulGemUse          (is short variable)
The Object is a soulgem and it has been used in either recharging or item making
 
The soul gems in the game have the following ID's:
Soul Gem ID's:
Misc_SoulGem_Azura
Misc_SoulGem_Grand
Misc_SoulGem_Greater
Misc_SoulGem_Common
Misc_SoulGem_Lesser
Misc_SoulGem_Petty
 
This function was not used in the original game.