Aller au contenu

Photo

can't add item to game


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

#1
Three World

Three World
  • Members
  • 16 messages

I made a armor in the toolset but can't seem to add it to game. Was trying to add it to a save file but wont let me move Item from Palette window item to the log window on left on toolset.

 

This is for Dragon Age Origins. I am also not able to use the in game console to try and get it over.

 

I want to add it from toolset to save fail. Can any one help please.

 

 



#2
luna1124

luna1124
  • Members
  • 7 649 messages

Did you make a "new" armor or just restat/upgrade a vanilla armor?

Why can't you use the console?

After you add stats, choose material etc... toolset export without dependent resources...

this will put your armor in packages/core/override/toolsetexport

Then if you can't use the console, you may have to find a merchant who sells this armor. There are other ways, but I think you need scripting to add to the game.???

~~If you get console working~~~

Then note the name of your item. use the console runscript additem gen_im_arm_blah_blah.uti 1

This will add your new armor to your player inventory. Note, all vanilla armor in game will have the same stats as this one since it is in override.

 

ADDED~ http://forums.nexusm...-new-armor-mod/



#3
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

You can't just drag and drop stuff to save files. That's not how the toolset works. Items in the toolset aren't "real", they are just entries in a database. In order for the game to recognise them, they have to be exported as compiled game files (UTIs, in the case of weapons/armour). To actually get the game to load them, you either need to use a script, add via console (just another form of script), or add to a container/merchant.


  • luna1124 aime ceci

#4
Three World

Three World
  • Members
  • 16 messages

@luna1124 I  keep getting like a keyboard show up on screen when I use the console and no box to show what I type.

I duplicate a armor then change it a bit. I will look at your link thank you.

 

@DarthParametric Thank you.

 

 

Note I use to be able to make my own stuff and used it in game but can't find it any more. I use to play this game back when it 1st come out. Thought I get the dust off and play the game.



#5
Three World

Three World
  • Members
  • 16 messages

I just done a test and made a ring. This was more to see it work and learn how to do.

 

I use the toolset and I used http://social.biowar.../5339/blog/576/ to show me how to do it. 

 

But for some reason it wont show up in my bags on my self in game.

 

I did a script here I copy and past from a script online to cyan_ring_event_handler.nss useing the toolset and change and replaced the name of my ring.

Here script:

// All module events
#include "utility_h"
#include "wrappers_h"
#include "events_h"
void main()
{
    event ev   = GetCurrentEvent();
    int nEvent = GetEventType(ev);
    Log_Events("", ev);
    switch (nEvent)
    {
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: The module loads from a save game, or for the first time. This event can fire more than
        //       once for a single module or game instance.
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_MODULE_LOAD:
        {
            // this event can fire multiple times, and we only want to do this once
            // So we save a flag inside a number variable.  We check it here and if its
            // set already then we know we've already done this before.  The name of the
            // variable in quotes can be whatever you want.
            int iModuleLoaded = GetLocalInt(OBJECT_SELF, "cyan_ring_item");
            if (iModuleLoaded == 1)
                break;
 
            // get the object which contains the player
            object oPlayer = GetHero();
 
            // The flag we save won't persist beyond the game session, so its a good idea to actually
            // look to see if the player already has the item, unless you WANT them to get another one
            // The name in quotes is the TAG of the item.  So what we do is see how many of the item
            // the player already has, and if its 0, we know we haven't given it to them yet (or they sold it :P)
            int iItemCount = CountItemsByTag(oPlayer, "cyan_ring_item");
            // if its 0, then let's give them the item.  Now this first parameter is a RESOURCE identifier.  Note
            // how its formatted.  R"resource_file_name"
            // The "R" part is important and identifies it as a resource.  The filename is just the filename of the
            // resource.  You can see this in the toolset on the tabs up top.
            // The number 1 means give 1 item.
            if (iItemCount  == 0)
                UT_AddItemToInventory(R"cyan_ring_item.uti",1);
 
            // lastly we set that number variable we talked about earlier, to save the fact that we've
            // done this already.
            SetLocalInt(OBJECT_SELF, "cyan_ring_item", 1);
            break;
        }
        default:
        {
            break;
        }
    }
 
I also Export without dependent resources, Export both Generate Module XML and Generate Manifest XML 
.
I can see the ring in DAModder and in game at downloadable content which shows as enabled.
 
C:\Users\******\Documents\BioWare\Dragon Age\AddIns\cyan_ring_item\module\override\toolsetexport
 
In foloder are :
cyan_ring.uti
cyan_ring_event_handler.ncs
cyan_ring_event_handler.nss
Manifest.xml
 
Also I got console working as I add something to game to see if it would work. But for some reason my ring wont add to game as I get failure:No such script.
 
 


#6
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

I use the plot-based approach for my mods. Uses this script:

#include "utility_h"
#include "plt_dp_item_plot"

void main()
{
    if ( WR_GetPlotFlag( PLT_DP_ITEM_PLOT, DP_ITEM_CHECK_FLAG ) == TRUE )
        return;

    event ev = GetCurrentEvent();
    int nEventType = GetEventType(ev);

    switch ( nEventType )
    {
        case EVENT_TYPE_MODULE_LOAD:
        {
            UT_AddItemToInventory(R"dp_shd_test1.uti", 1);
            UT_AddItemToInventory(R"dp_arm_test2.uti", 1);

            WR_SetPlotFlag( PLT_DP_ITEM_PLOT, DP_ITEM_CHECK_FLAG, TRUE );

            break;
        }
        default:
            break;
    }
}

And a plot with the appropriate flag. That way the item only gets added once per save.


  • Three World, theskymoves et luna1124 aiment ceci

#7
Three World

Three World
  • Members
  • 16 messages

Thank you DarthParametric



#8
luna1124

luna1124
  • Members
  • 7 649 messages

To use the console, grab these mods first... make console commands visible and AddItem Script - Console by hdhd

 

Make sure your shortcut is correct and reads as follows for your installation (this is mine with Windows 7) "C:\Program Files (x86)\Dragon Age\bin_ship\daorigins.exe" -enabledeveloperconsole