Jump to content

Adding SPECIAL Mod


21stcenturybreakdown

Recommended Posts

Hi all.

 

Been working on a mod to find Holotapes that are either found, boss inventories, or given to the player as a reward for something.

I'm fairly new to Scripting, and I created an activator with a Holotape model, and tried to set the script to that holotape.

 

Here's the script I used, basing it off the scripts I found on the holotape;

 

scn MODHolotapeStrengthScript
begin OnActivate
if ( Player.GetPermanentActorValue Strength < 10 )
Player.ModAv Strength 1
ShowMessage MODSkillHoloSTRMessage1
else ( Player.AddItem Caps001 1000 )
ShowMessage MODSkillHoloSTRMessage2
endif
End
Now, this half worked. The Strength level went up, with the correct message I left.
However, when the Strength was already 10, I tried again to see if the second message came up and the caps were rewarded. The message was properly displayed, but it didn't give any caps. If anyone could explain to me how to make it give caps to the player when the Strength level is already 10, I'd be grateful enough to give a shout-out on the mod page.
P.S. I was confused as to why it didn't disappear when activated, but I realised that I had to make the script attached to an actual object. At the moment, it's always there and can repeatedly be activated. So I'm going to fix that today. I just want to know how to make the caps appear.
Link to comment
Share on other sites

shouldn't it be something like

 

if ( Player.GetPermanentActorValue Strength < 10 )

Player.ModAv Strength 1
ShowMessage MODSkillHoloSTRMessage1
else ( )
Player.AddItem Caps001 1000
ShowMessage MODSkillHoloSTRMessage2
endif
from my understanding of scripting , what is between the parenthesis is a Boolean argument , rather than a command
so moving the command out should work (theoretically , based on what I know from scripting , though I've never used scripting in games)
also , are you sure that Caps001 is the correct ID for bottlecaps? I'm not sure which ID you are supposed to use , but maybe 0000000f will work instead?
Link to comment
Share on other sites

 

shouldn't it be something like

 

if ( Player.GetPermanentActorValue Strength < 10 )

Player.ModAv Strength 1
ShowMessage MODSkillHoloSTRMessage1
else ( )
Player.AddItem Caps001 1000
ShowMessage MODSkillHoloSTRMessage2
endif
from my understanding of scripting , what is between the parenthesis is a Boolean argument , rather than a command
so moving the command out should work (theoretically , based on what I know from scripting , though I've never used scripting in games)
also , are you sure that Caps001 is the correct ID for bottlecaps? I'm not sure which ID you are supposed to use , but maybe 0000000f will work instead?

 

Thanks, I'll give that a try.

And yes, Caps001 appears to be the correct ID for bottlecaps. 000000f I believe is only relevant for the console commands

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...