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...

Need to help in creating a mod


Noura
 Share

Recommended Posts

Hi everyone :wub:

 

I hope that everything is going well with you :good:

 

I have been trying to create a simple mod for more than two months and till now I couldn't make it work :pc:

 

Simple, I am trying to attach a script to the player in Skyrim. I want to show some messages based on the actions of the player.

 

 

I created an empty quest, attached my script (that extends Quest) in the scripts tab and created a reference alias that is linked to the Player. I have been trying to use Papyrus events and show some messages but till now only oninit() event is working. For example, I tried to show some messages when the player is killed by another actor but I couldn't make it work. I also tried to increase/decrease the healing potion but I don't know how to do it!!

 

I will be happy if anyone can explain the steps that I have to follow to make it work. I really need your help :(

 

My second problem is that I want to read some data from an external file and use these data in my Papyrus script. I was looking for a tutorial that explains how I can do that but I couldn't fine any!!

 

 

I am looking forward your help, suggestions and recommendataions :confused::wub: :wub: :wub:

Your comments are much appreciated

Thank you very much :good: :good:

  • Upvote 1
Link to comment
Share on other sites

(Topic moved to appropriate forum)

 

Welcome to TESA, Noura.

 

It might help if you explained your issue a little bit more, like posting your current script you're using and what doesn't work about it. Also what kind of external file do you mean that you're trying to get data from?

  • Upvote 1
Link to comment
Share on other sites

Thank you very much Hanaisse  :wub:  :wub:

 

Basically, I want to attach the script to the player and here is what I did in detail: 

 

I chose on the quests that are available in the creation kit, edited it and in the scripts tab, I attached this script:

 

Scriptname nourascript3 extends Quest
int count
Potion Property itemToAddPotion Auto 
Int Property ItemCount = 1 Auto 
Actor Property PlayerREF Auto 
Event OnInit() ; This event will run once, when the script is initialized
count=count+1
Debug.MessageBox("Message 1")
Debug.MessageBox("Message 2")
Debug.MessageBox(" Message 3")
RegisterForSingleUpdate(2)
EndEvent
Event OnUpdate() 
count=count+2
if count==3
Debug.MessageBox(" Message 4")
 
Endif
bool playerIsDead = Game.GetPlayer().IsDead()
 
if playerIsDead==true
Debug.MessageBox("the player is dead")
else
Debug.MessageBox("he is alive")
Endif
if Game.GetPlayer().IsBleedingOut()
Game.GetPlayer().ResetHealthAndLimbs()
else
Game.GetPlayer().AddItem(itemToAddPotion, 2000)
endif
EndEvent
bool Function IsDead() native
Event OnTriggerEnter(ObjectReference akActionRef)
If akActionRef == PlayerREF ; This condition ensures that only the player will trigger this code
Debug.MessageBox("Yippee!")
EndIf
EndEvent
Event OnEnterBleedout()
  Debug.Trace("Unfortunately, I have entered my bleedout state :(")
endEvent
 
 
I have been trying to see whether the events execute while the player player Skyrim; however, only oninit() works when when the game starts and then nothing works. Although OnUpdate is supposed to work every 2 seconds, it only works one time when the game starts. Also, the events and statements highlighted in green don't work at all. If the code is not clear, I can rewrite everything, but please help me to attach any code to the player and make ti works :( 
 
 
The text file is .txt file which is resulted from a matlap code. I can put the data in a database, but how can I access the data in the creation kit (to be used in the papyrus script) ?
If you found anything unclear, please don't hesitate to comment on it :)
Thaaanks a alot
  • Upvote 1
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...