Aller au contenu

Photo

Issues with items inventory add - Using Werikks guide


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
Scourch

Scourch
  • Members
  • 20 messages
So I have a custom mod that adds some items I made to my inventory via Werikks guide. Always worked without a problem. Before, I could go into the toolset, make an adjustment on an item or two. Ope a save game with a force load as my mod is deactivated, save, then activate it again after having made my changes, load up the game, done. Been that way without any problems, that is until now.

I downloaded the Tevinter Warden mod, which is great, but I think messing with this script. See, the Tevinter Warden mod will automatically put five pieces of Tevinter Warden starter gear in my inventory.... every time I load the game. I am thinking because of this, or perhaps because the Tevinter Warden isn't a core class, or maybe both of those things, are causing my problem.

That problem is when I go to make a change to an item in my mod, deactivate it before force loading the game, then activating it and loading up that save... my items never get pushed through to my inventory. I've tried every combination of off and on with the Tevinter Warden mod and my own and no matter where I am, what class I am (I tried changing from tevinter warden to a warrior or mage in the console and saving) or what mod is on or off... my items just don't push through. So, if I deactivate my mod just once and save that game with it off.... there not coming back.

Any ideas?

#2
Karma

Karma
  • Members
  • 391 messages
I think Werikk's tutorial uses plot flags to add items. You could write a short script that adds your items to your inventory using a console command instead.

#3
Scourch

Scourch
  • Members
  • 20 messages
Now that's a good idea. Except i know about as much scripting as I do rocket science lol.

#4
Karma

Karma
  • Members
  • 391 messages
It's actually a very short script:

void main()
{
CreateItemOnObject(R"resource name goes here.uti", OBJECT_SELF, 1, "", TRUE);
}

If you want to add another item, just tack on another CreateItemOnObject line.

You could also use UT_AddItemToInventory(R"resource name goes here.uti", 1); if CreateItemOnObject causes trouble, but then your script would get longer because of the included file.

Just compile it and drop the compiled version into your packages/core/override. Turn on the console, type "runscript" and then your script name. Don't forget to get rid of your plots and plot scripts. You don't need them anymore.

Modifié par satans_karma, 10 août 2010 - 01:58 .


#5
Scourch

Scourch
  • Members
  • 20 messages
So in your example here....



void main()

{

CreateItemOnObject(R"resource name goes here.uti", OBJECT_SELF, 1, "Is it in here I type what I would type in on the console?", TRUE);

}



And this is going to be it's own script, separate of Werikks?

#6
Karma

Karma
  • Members
  • 391 messages
Nope, just copy and paste what I had. The only thing you need to change is the "resource name goes here" part.



Do you know how to enable the console? If not, go here (http://dragonage.wik...om/wiki/Console). After you get the console running in your game, you type in runscript and then whatever the name of the script is. So if the file name of the script was "give_karma_items.ncs" I'd type "runscript give_karma_items" into the console while playing my game. The items would immediately appear in my inventory.



It'll be a brand new script. Matter of fact, you can delete Werikk's scripts and plots. (Though you may want to wait to delete them until you get the console to work... just in case.)

#7
Scourch

Scourch
  • Members
  • 20 messages
thanks Satans.



P.S. You're my hero.

#8
Scourch

Scourch
  • Members
  • 20 messages
So I compile the script, no idea where the compiled script is though for me to drop in my override folder. And do I compile before or after checking it in, or does it not matter?

Modifié par Scourch, 11 août 2010 - 04:01 .


#9
Karma

Karma
  • Members
  • 391 messages
Scripts compile automatically when you save them. So you'll check it in after saving/compiling. The compiled version will have a .ncs file extension. And it'll be in one of your module's toolexport folders. If you have to, do a search.