Jump to content

Recommended Posts

Posted

Hi, I want to make my own script that will, quite simply, add some items to my inventory when I type it into the console. Nothing else.

 

The items I want to add are custom ones that I made myself, not ones that ship with the game.

 

However, every attempt so far has been a failure and I'm clueless as to how to write a working script. Can someone pretty please give me one that will do what I need it to do? :(

 

 

Posted

Not sure how it works, but this mod adds to the inventory without even needing to invoke the console: Ancient Elven Boots Fix.

 

(Now what it adds is a book. When "used", the book adds the item. I believe that's how the author got around the need for the console.)

 

Hope that helps. :thumbsup:

Posted
  On 6/16/2012 at 9:21 PM, Lehcar said:

Hi, I want to make my own script that will, quite simply, add some items to my inventory when I type it into the console. Nothing else.

 

The items I want to add are custom ones that I made myself, not ones that ship with the game.

 

However, every attempt so far has been a failure and I'm clueless as to how to write a working script. Can someone pretty please give me one that will do what I need it to do? :(

 

This should work:

 

Create new script in your module. module and owner module should be your module name. I believe you have to set this script in module preferences after you create it.

This is what script should contain.

 

void main()

{

object oPC = GetHero(); // with this you are saying that player character will now be called oPC and that it is an object

CreateItemOnObject (R"replacethiswithnameofyouritem.uti", oPC); //here you say give this item to oPC. R stands for resource

}

 

Save script as replacethiswithsomename.nss (You will later type that name in console without .nss part)

  • 7 years later...
  • 3 months later...
Posted

Sorry I would like to create one where you don't add the weapons of the dlc at the start of the game to be prizes in some missions or sold ... that does not break the original plot of it ...

  • Recently Browsing   0 members

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