Aller au contenu

Photo

Problems with Custom Items


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

#1
ChicoQ

ChicoQ
  • Members
  • 5 messages
 I started using the toolset a few days ago and the i followed a tutorial on how to create items and add them to the game wellits was working but since yesterday i started to create new items but some of them didnt load into the game i dont know why, so today i started a new module to add items but now not a single items is load into the game, can someone help me out? this is really frustrating

this is my script

           // ---------- Script Starts Here ----------
// Includes for utility functions and event definitons#include "utility_h"#include "wrappers_h"#include "events_h"
// Include our Plot file#include "plt_mycustomitems"
void main(){// We need to retrieve the event that called our script// and only act if it is the one we are waiting forevent ev = GetCurrentEvent();int nEventType = GetEventType(ev);
// We also need the object representing the player's main character.object oPC = GetHero();
// We look for the even that we needswitch(nEventType){// If our modul just loaded - which happenessomewhere during// the loading of a savegame or resuming an old game -// we add the sword to the player during the loading screencase EVENT_TYPE_MODULE_LOAD:{
// First we make sure that we don't have the item yet// fro manother gameplay session!if ( !WR_GetPlotFlag(PLT_MYCUSTOMITEMS, MYCUSTOMITEMSCHECK) ){
// If the Plot Flag is not set Add our Items// Replace "cach_armor" with your Items File Name            UT_AddItemToInventory(R"ancientring.uti", 1);            UT_AddItemToInventory(R"assassinsbelt.uti", 1);            UT_AddItemToInventory(R"dalishluckycharm.uti", 1);            UT_AddItemToInventory(R"eluviansring.uti", 1);            UT_AddItemToInventory(R"flemethsloststaff.uti", 1);            UT_AddItemToInventory(R"greywardenstales.uti", 1);            UT_AddItemToInventory(R"greywardenstome.uti", 1);            UT_AddItemToInventory(R"maricshonor.uti", 1);            UT_AddItemToInventory(R"ringoffire.uti", 1);
// After Adding the Items set the Plot FlagWR_SetPlotFlag(PLT_MYCUSTOMITEMS, MYCUSTOMITEMSCHECK,TRUE);}
break;}
// Here you Could Add Checks For other Events
}
// Outside of the Event Swithching Code
}// ---------- Script Ends Here ----------

#2
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
If you are using an existing save where you already have the items and the new versions have the same UTI filenames, then the items won't appear as the will have already set the plot flag as true. Try with an earlier save or change the item names.

#3
ChicoQ

ChicoQ
  • Members
  • 5 messages
well some of the items have the same name but other are new and they still dont appear in my inventory after i load the game.

btw i unistalled the game and the toolset, before creating the new items 

Modifié par ChicoQ, 28 juillet 2011 - 04:07 .


#4
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Uninstalling the game won't make any difference if you are using an existing save. If that plot flag has been set in the save then the script will detect the value as true and not add the items. I misspoke before when mentioning the item names - it won't matter if you change the names but still use the same script because the plot flag is the same. Try a fresh save (one where you have never loaded those items) as I said before, or change the plot flag name to something else.

#5
ChicoQ

ChicoQ
  • Members
  • 5 messages
im going to try a new game and also ill change the plotflag name.

Ok i tried a new game i didnt work, after that i changed the plot flag and loaded an old game still i didnt work, i dont know what im doing wrong here.

Modifié par ChicoQ, 28 juillet 2011 - 05:08 .