Jump to content

Adding new items to my existing Custom Items module


Recommended Posts

I followed the tutorial on Fextralife to create new custom items (https://fextralife.com/forums/t264474/custom-player-items-in-single-player/) a week or so ago.

 

I made a series of items, exported, and got them in my inventory no problem.

I went back in it today to add two new items (creating them + adding to the script), re-exported, load game... and no new items :sad: The old ones (well, those I created the first time) are still there.

 

Can I add new items to an existing module as so? Or do I need to make a brand new modules? That would seem like I'd end up with a LOT of folders...

Edited by LithIthilwa
Link to comment
Share on other sites

I'm certainly not an expert at anything to do with scripting (or anything to do with modding, really), but IIRC, the script in the weriKK tutorial runs, spawns the items, and then sets a plot flag to indicate that the task was completed... on subsequent loads, it doesn't check again for individual items, rather, the check is for that plot flag.... since the flag is set to 'TRUE' (i.e. completed), it doesn't run the 'AddItemToInventory' bit of the script.

 

If you load a save from before your first set of items were added, then all the items should spawn. (If that isn't desirable or feasible, I'd offer that you could just confirm that it was all working as intended with a fresh save, and then spawn the new items in the later save with a dev console additem runscript.)

Edited by theskymoves
Link to comment
Share on other sites

Ahhh, makes total sense. Thanks :)

 

I'll probably just create a new module for this time then. I thought it only set the flag to true per item, not for the whole script, and so adding more to the script would add the new ones and not the old ones :teehee:

Link to comment
Share on other sites

BINGO. Thx for the pointer Sky, that was exactly what was happening.

 

Thought I'd share this in case someone has the same question. Here is how I worked around that.

 

 

Note: Remember to delete the files in "MyDocuments\Bioware\Dragon Age\packages\core\override\toolsetexport\" after each export!

 

I put the lines checking for if the plot flag was TRUE in comment form, so the script wouldn't compile that code.

Also set in comment form the items I already had so it wouldn't create them again (optional, if you want them a second time, then leave them in code).

Left the last line of code that sets plot flag and item flag to true, so my new items would be flagged.

Re-export and load game. NEW ITEMS THERE. Yas.
Return to script, remove comment forms, re-export, load game. STILL THERE. Yas x2.

 

It's a bit of a work-around that I'm sure more skilled modders would know a better one, but it worked for now :thumbsup:

 

 

Attaching an image of my script with the relevant lines in comment forms.

:dance:

 

 

2019-08-29.png

Link to comment
Share on other sites

  • Recently Browsing   0 members

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