Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Add item with a button - harder version


NotEvenHere
 Share

Recommended Posts

Hello! I'm having a problem writing a script, since it is something I've never done before in my life. I did the beginner tutorial where you get gold with a click of a button, and it worked perfectly, but now I'm trying something harder.

I want to make some activator that adds one of those letters that will have player's name, some hold etc. written in it - a letter that fills it's text with aliases I mean. Currently I'm trying this with a bounty on player just because (one from quest we36). This is my script and it's not working:

 

Scriptname _aaatest extends ObjectReference  
 
LocationAlias Property Alias_myHoldLocation  Auto  
 
ReferenceAlias Property Alias_Jarl  Auto  
 
ReferenceAlias Property Alias_Player  Auto  
 
ReferenceAlias Property Alias_Steward  Auto  
 
ReferenceAlias Property Alias_Letter  Auto  
 
int Button
 
EVENt onActivate(objectReference akActionRef)
if akActionRef == Game.GetPlayer()
Game.GetPlayer().AddItem(Alias_Letter.GetReference(), 1, false)
endif
endEVENT
Link to comment
Share on other sites

int Button defines the variable called Button that I'm using. It stands for integer i think? If you mean the book's text, it basically goes like this: "blah blah <Alias=Jarl> asdasdasd <Alias.Race=Player> <Alias=Player> <Alias=myHoldLocation> <Alias.PronounObj=Player>  <Alias=Steward>". That's in the original game text.

I don't necessarily need to use this particular letter, I just want a some sort of script that fills all those <Alias> things in any type of notes/books. 

Link to comment
Share on other sites

-there has to be a quest (any quest) that links to the book in the Quest Aliases tab.
-If the book is on an NPC, that NPC also has to be Aliased in the Quest Aliases tab, and has to be listed HIGHER than the book.
-The actor should be "specific reference" (then select forced reference and double click the npc in the render window)
-The book should be "create reference to object [select your book from the dropdown], "create In", [select the alias of the npc in the dropdown]. Check "uses stored text" and "stores text"
-if the actor starts dead or might die, check "allow dead".
-don't manually insert the book into the NPC's inventory. This Alias stuff should do it automatically
-You can use more than just the player's name. You can also get gender-specific pronouns

 

http://forums.bethsoft.com/topic/1414436-quick-questions-quick-answers-thread-8/page-6?pid=21660752#entry21660752

http://www.creationkit.com/Text_Replacement

 

This might help you out.

Link to comment
Share on other sites

Dammit, it's not working :( I created a quest, just like you said, without any stages or objectives, just with aliases. My NPC is on top, and I have my script attached to the button. It's not adding anything to my inventory though.

Should I attach some stages/this script to a quest then? Maybe aliases are not filling because my quest isn't running for some reason? Help?

Link to comment
Share on other sites

Your best bet is to start very simple. Try to get the book into the players hands with your quest/activator. Then start adding the alais tags in. Look through all of the CK's books to find some examples.

I wish I could help more but I don't have access to these things for awhile more. Sry NotEvenHere.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...