Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

Is there a way to create and store a function in skyrim for future use? I don't like having to re-enter codes all the time of what I commonly use, so I'd rather I be able to just call a function like function items() and it it activates something like

function items() {
  player.additem xxxxxx;
  player.additem xxxxxx;
  player.additem xxxxxx;
}

Or even just be able to store and call a variable via command line like:

$gem=player.additem 2E504 10;
$gem;
share|improve this question
add comment

1 Answer

I'm not aware of a way to use variables, but it is possible to create function-like batch scripts.

This can be done by creating an ordinary text file containing the commands you wish to run together (one per line, CRLF, no other delimiters). Save this file as e.g. myscript.txt in your Skyrim folder (in the same location as TESV.exe). In-game, you can then run this script via the bat console command:

bat myscript

Unfortunately, this does not appear to support arguments, so cannot be parameterized.

share|improve this answer
    
nice. gonna leave the question open for a couple of days to see if anyone has anything else. –  Mechaflash Nov 23 '11 at 8:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.