Jump to content

Beginner at Modding... Need some help


TesseractE

Recommended Posts

I decided to try my hand at creating a mod the other day. I've gotten the conversation options in place by following the CK tutorial, but I'm a little lost on how to give the reward to the player.

 

I've created a new Spell Tome item (labelled 'SpellTomeC' here), and tried to insert the following code:

 

Game.GetPlayer().AddItem(SpellTomeC, 1)

 

But when I try to compile, I get the following Error.

 

Starting 1 compile threads for 1 files...

Compiling "TIF__010022F8"...
C:\Games\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__010022F8.psc(9,25): variable SpellTomeC is undefined
No output generated for TIF__010022F8, compilation failed.

 

I'm probably missing something simple, but I haven't been able to find any hints elsewhere that work. Any thoughts?

Edited by TesseractE
Link to comment
Share on other sites

OK, I think I've worked out the error, but it's not quite functional yet.

 

I added Quest Aliases for the Item and the NPC that grants it. Then I moved the code to trigger on a Quest Stage instead of a Dialogue prompt, and changed it to this:

 

 

Game.GetPlayer().AddItem(Alias_SpellTomeC.GetReference())

 

I no longer get an error when I compile, but I think some of my other logic might be off because I was unable to get the dialogue prompt that's supposed to show up when you bring him the items he asked for and that causes the item to be granted. I'll poke into it and check back here.

 

I'll probably have more questions as I go... I'll just re-use this thread if I do. ^^d

Link to comment
Share on other sites

About your original problem, did you define the property spelltomeC ? might be easier than making an alias for it.

How would I do that? I'm all for simplifying the process.

 

Right now, everything else with the conversation tree is working except for granting the item. When I tried to do it manually via console in-game, it didn't work at all. Wondering if there's a different problem at work here.

 

Mousing over the item in the Object Window gives me the ID of 010022F9. player.additem 010022F9 1 did not work ( Item '010022F9' not found for parameter ObjectID ), though. Is this the actual ID number? Is this something that would be fixed by going this other route of defining properties rather than aliases?

Edited by TesseractE
Link to comment
Share on other sites

  • Recently Browsing   0 members

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