Aller au contenu

Photo

Module Help


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

#1
Lasseda

Lasseda
  • Members
  • 86 messages
Okay - so I just got through making a couple weapons to see how toolset and I worked together but now comes the problem of getting the items into my inventory.

I am no scripter and every tutorial I've read has me scratching my head. So my question is this - is there some monkeyfied version of the script and possibly tutorial? I also remember reading somewhere that there was a script for this included in the core of the game but I have yet to locate it :/

Thanks in advance!

#2
Eshme

Eshme
  • Members
  • 756 messages
I have found this link recently.. but i cant say what it does. The person sais it brings items into bodahns shop. But how that works dont ask me. No tutorial.



http://forum.worldof...86&postcount=28

#3
thebigMuh

thebigMuh
  • Members
  • 98 messages
The easiest way to get the item on your character is to make a script that spawns it:

Create a script (named "my_item_spawn" for example):

void main()
{
    CreateItemOnObject(R"your_item_name.uti", GetHero());
}

Save it, export it, and then start Dragon Age with the console enabled (info on how to do that can be found on the wiki or on dragonage.wikia.com)

Open the console in game, and type

runscript my_item_spawn

That should put it in your inventory.

Ciao, muh!

Modifié par thebigMuh, 18 janvier 2010 - 01:17 .


#4
rturcic

rturcic
  • Members
  • 8 messages
***** EDIT ****

http://dragonagemodd...player-an-item/

Try that tutorial. I think that was the one I used. Very easy to follow and gives you a good understanding if you intend on furthering your designing beyond just cheating
**********

Make a new module.

Create your custom items.

Create a new plot item.

Create a new script.

Copy this code in:

// ---- SCRIPT STARTS HERE ----

// Later on in this script, we will use the UT_AddItemToInventory()
// function to add an item to the player's inventory.
// But before we could use it, we have to tell the toolset where
// to look for it. The function is in the "utility_h" script file
// under _Core Includes, we will include this file at the top of
// our script file, above the main function.

#include "utility_h"
#include "NEW PLOT ITEM"

void main()
{
// If our plot flag is set to TRUE, that means we have already
// given the items to the player, there is no need to continue
// running this script.
if ( WR_GetPlotFlag( PLT_, ) == TRUE )
return;

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

// We will watch for every event type and if the one we need
// appears we will handle it as a special case. We will ignore the rest
// of the events
switch ( nEventType )
{
// This event happenes every time the module loads
// This usually happenes when creating a new game
// or loading a savegame
case EVENT_TYPE_MODULE_LOAD:
{
// The UT_AddItemToInventory function adds various resources to a
// creature's inventory. Here we add one weapon and one shield.
UT_AddItemToInventory(R".uti", );

// Set our plot flag to TRUE, so the next time this script tries
// to run it will not add extra items to the player's inventory
WR_SetPlotFlag( PLT_, , TRUE );

// We have dealt with the event we were waiting for.
// At this point we can stop looking for other events
break;
}
default:
break;
}
}
// ---- SCRIPT ENDS HERE ----

Export without dependent resources.

Export Module and Manifest.

Start Dragon Age, go to DLC and out a checknext to your custom item module.

Load a saved game.

That should be all. There is a tutoria on this somewhere but I dont remember exactly where. If this doesnt work you may have to look for it as I may have skipped a step.

Modifié par rturcic, 18 janvier 2010 - 12:18 .


#5
Lasseda

Lasseda
  • Members
  • 86 messages
Thanks so much everyone for all of your help! :D



I'm off to try the spawning idea first and will return with the end results!

#6
thebigMuh

thebigMuh
  • Members
  • 98 messages
The idea behind both approaches is the same (make the item automagically appear in your inventory), but the latter one makes it "nice", by spawning the item on a character as soon as a game gets entered with the module loaded. It also keeps track of the whole spawning thing, so you get only 1 copy of the item. It's just like all those special offer DLCs, or the first part of the blood dragon armor.



Ciao, muh!

#7
Lasseda

Lasseda
  • Members
  • 86 messages
The spawning idea worked perfectly! So much easier than scripting it to appear into ones inventory lol



I just need to figure out how to work out the stats of my dagger - I keep on getting just the basic stats of it w/o the properties I added... it's weird. Can't seem to figure out how to add rune slots either... bah-humbug! lol



Thanks again for the help! :D