Aller au contenu

Photo

This is vexing!


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

#1
rdr99

rdr99
  • Members
  • 32 messages
Ok... I admit I'm no pro at modding with the toolset.  I have managed,
by following various tutorials, to create some new weapons and armor
using standard items in Dragon Age Origins from the toolset.  I am
merely adding properties and such, not changing textures and so on.  I
wrote a script which puts the stuff in the game into my inventory.  My
items showed up in the game, and I can use them from almost the
beginning, through Ostagar, and on into Lothering until I get to the
tavern there.  I can enter the tavern, kill Logain's minions there,
trade with the merchant in the tavern and get his quest for poison and
so on.   Then things go badly!  I cannot leave the tavern without
crashing the game.  If I remove my items from myself and my companions
(I spawn several of each item and give them to various of my companions
as well), then I can leave the tavern... though I am naked and so are
some of my companions.  Once outside I can re-equip my items and
proceed, even doing battle and so on.  If I try to enter the Chantry in
Lothering, the same thing occurs.  I must un-equip all items created
from myself and my companions to enter the building (go through a
transition) whereupon I can complete a quest, ask the Rev. Mother to
free Sten etc.  I can then leave, re-equip, kill the darkspawn on the
road out of town, talk to Bohden and so on, only to crash again when
transitioning to the next scene, which would be the first party camp I
believe.

My question is WHY IS THIS HAPPENING?  I played though
several levels previous to Lothering with no problem, and indeed had
equipped myself and Alaister and even Morrigan with some of my items...
but then WHAM!  NO JOY once I enter the tavern at Lothering and get
Lilliana in the party instead of the hound.  What gives?  True... they
are relatively powerful items... but still, I have played the game
through perhaps 8-9 timese before, and a couple of those times with "God
Items" developed by someone else and they didnt crash the game.  So
it's not that.  What makes Lothering so touchy and why was I able to use
everything before that?  What can I do to fix this... I really like my
items.  Please give me some hints.

I am using Vista64, the 1.01
release of the toolset, and have vers. 1.03 of the game from Steam.  The
folder is the main folder (\\\\).  The items are created in the "core
game resources" module using my module name as the "owner", and the
script as my script name as the "Script" and the extended Module as
"Single Player" as the most recent tutorials I could find suggest.  If
any other information is needed that I can provide I would certainly do
so to help me solve this vexing problem.  Oh... and I played Awakening
once but my items never did show up in there... so I dont understand
that either... but then... a lot of things dont show up in Awakening,
and in fact I got robbed of the armor I did have in the Silverite mine,
never to see it again, though my companions regained their stuff.  But I
digress... Please tell me what is happening in Origins and I will deal
with Awakening later!

Here is the script I am using...

// 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)
    {
        case EVENT_TYPE_MODULE_LOAD:
        {

            // get the object which contains the player.
            object oPlayer = GetHero();
            int iItemCount = CountItemsByTag(oPlayer,"rdr_trigger_ring_01");
            if(iItemCount ==  1)
            break;

            object oTrigger = GetObjectByTag("rdr_trigger_ring_01");
            if(!IsObjectValid(oTrigger))
                UT_AddItemToInventory(R"rdr_amulet_01.uti",4);
                UT_AddItemToInventory(R"rdr_armor_01.uti",2);
                UT_AddItemToInventory(R"rdr_belt_01.uti",4);
                UT_AddItemToInventory(R"rdr_boots_01.uti",2);
                UT_AddItemToInventory(R"rdr_bow_01.uti",2);
                UT_AddItemToInventory(R"rdr_gloves_01.uti",2);
                UT_AddItemToInventory(R"rdr_helm_01.uti",2);
                UT_AddItemToInventory(R"rdr_magestaff_01.uti",2);
                UT_AddItemToInventory(R"rdr_ring_01.uti",4);
                UT_AddItemToInventory(R"rdr_ring_02.uti",4);
                UT_AddItemToInventory(R"rdr_sword_01.uti",2);
                UT_AddItemToInventory(R"rdr_sword_02.uti",2);
                UT_AddItemToInventory(R"rdr_trigger_ring_01.uti",1);

            //object oAttribbook = GetObjectByTag("cdon_book_attrib");
            //if(!IsObjectValid(oAttribbook))
            //UT_AddItemToInventory(R"cdon_book_attrib.uti",99);

            //object oSkillbook = GetObjectByTag("cdon_book_skill");
            //if(!IsObjectValid(oSkillbook))
                //UT_AddItemToInventory(R"cdon_book_skill.uti",99);

            //object oTalentmbook = GetObjectByTag("cdon_book_talentm");
            //if(!IsObjectValid(oTalentmbook))
                //UT_AddItemToInventory(R"cdon_book_talentm.uti",99);

            //object oTalentwbook = GetObjectByTag("cdon_book_talentw");
            //if(!IsObjectValid(oTalentwbook))
                //UT_AddItemToInventory(R"cdon_book_talentw.uti",99);
            break;
        }
        default:
        {
            break;
        }
    }
}

The items that are commented out have never been loaded as I commented them out before I ever used this script in the game, but wanted to see if later I could use them.  I first wanted to make sure the rest was working properly before complicating things this way.
:crying:

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
I don't see anything wrong in the script and I don't think the script is the problem since it seems to be working in areas prior to Lothering.

Does the crash happen even if you don't have Leliana in the party (stick with Alistair, Morrigan, dog)?

Do you have to remove all items to avoid the crash or is it just specific ones (no way to test it other than remove them selectively and see if the transition crashes the game)?

#3
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages
It doesn't seem to me that it has to do something with your problem, but seeing how you have indented those lines, it looks like if you have missed an opening and closing brace in that conditional block. I might be wrong.

if(!IsObjectValid(oTrigger))     
{
    UT_AddItemToInventory(R"rdr_amulet_01.uti",4);
    UT_AddItemToInventory(R"rdr_armor_01.uti",2);
    UT_AddItemToInventory(R"rdr_belt_01.uti",4);
    UT_AddItemToInventory(R"rdr_boots_01.uti",2);             
    UT_AddItemToInventory(R"rdr_bow_01.uti",2);               
    UT_AddItemToInventory(R"rdr_gloves_01.uti",2);               
    UT_AddItemToInventory(R"rdr_helm_01.uti",2);
    UT_AddItemToInventory(R"rdr_magestaff_01.uti",2);
    UT_AddItemToInventory(R"rdr_ring_01.uti",4);               
    UT_AddItemToInventory(R"rdr_ring_02.uti",4);
    UT_AddItemToInventory(R"rdr_sword_01.uti",2);               
    UT_AddItemToInventory(R"rdr_sword_02.uti",2);
    UT_AddItemToInventory(R"rdr_trigger_ring_01.uti",1);
}

#4
rdr99

rdr99
  • Members
  • 32 messages
Hi TimeLord... after some experimentation it seems the game doesn't like it if Lelianna and I both have the same helm on. As the game went along I would add more of the items to her while I was fully equipped. It was still running with all party members having amulets, belts, and rings, and with Lelianna having all the other armor items and at least one sword, but when she donned that second helm... poof!



So I dunno... The helm and the bow both grant rapid aim and I think the values for each are .1 different, but the main character (me) can have both and the game runs just fine. Can different amounts of time on two different items for rapid aim be causing this? Does the game actually use BOTH values? Or does it throw one out and just use the first one it encounters? I have no clue about the engine's use of any of the properties assigned to things. It would be interesting to know that. Perhaps with both of us having bows and helms with different times on the two bows versus the 2 helms things go south. Perhaps the engine is reading her bow or helm just after it reads my bow or helm (that is, it is going back and forth between two different time allocations for the 4 total items) and it crashes... but like I said, I have no clue about how the engine uses item properties or if it is sensitive to such things.



LoBo... Hi and thanks for your observations... I'll look into it, but the addition of another "bracket" layer was not intentional... unless the toolset did that. I, being a newbie, have no idea what it would do if I DID add the bracketing at that point, or if the indention is significant at all WITHOUT brackets. That is... does it actually matter that they are three spaces further in? The script compiled without comment except for the usual "no starting area" thing because I didn't code it to begin at a particular location in the game. Right now, I'm thinking it's more to do with something about the items themselves than with the script... but then I know so little that I'm probably clutching at straws.

#5
TimelordDC

TimelordDC
  • Members
  • 923 messages
That is interesting. So, the game crashes only when Leliana has the helm on (and the player is already wearing the same helm). Is the bow also equipped by Leliana at this point? Does she have any tactic slot associated with Rapid Aim?



It does seem like Rapid Aim is screwing something up. I recall seeing at least one mod that enhanced Archery Skills. Do you have any mod that changes the Rapid Aim talent?

#6
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages

rdr99 wrote...

LoBo... Hi and thanks for your observations...


Don't worry man, it is not really important. I always try to keep the code clean, so if I see an indentation out of place I cannot avoid feeling that maybe something is wrong :D. Those spaces don't matter to the compiler, since they are usually used to make the code easier to see and understand for the programmer.

The difference if you use those braces is that the if condition will be applied to not only the next line but all the lines between the braces. 

That's what you are doing without braces (I'm gonna use some pseudocode here):
...
IF the "rdr_trigger_ring_01" object has not been already created THEN
    add 4 x "rdr_amulet_01" items to the player's inventory (only executed if the condition is true)
END IF

add other items to the inventory (always executed)
...

With braces the following would happen:
...
IF the "rdr_trigger_ring_01" object has not been already created THEN 
    add 4 x "rdr_amulet_01" items to the player's inventory (only executed if the condition is true)
    add other items to the inventory (only executed if the condition is true)
END IF
...

Edit: If condition corrected! :o

Modifié par _L_o_B_o_, 26 mai 2010 - 07:35 .


#7
rdr99

rdr99
  • Members
  • 32 messages
Hi Lobo... now, here's the thing... In Origins the code as written works as I intended... that is, if I destroy the "trigger ring" and save and reload then I get all the items on that reload. In Awakening, all I get so far is another ring. Throw that ring out and save and reload and presto... another ring but no other items. WTF! How could it work one way in Origins and another in Awakening? Perhaps I will rewrite it YOUR way with brackets and see if that will load all the items in Awakening, or perhaps even put the conditional: object oTrigger = GetObjectByTag("rdr_trigger_ring_01");

if(!IsObjectValid(oTrigger))

in for each object using a different item name of course for each one.



However, in your explanation you indicate that the condition would seem to be true to load the stuff. In my understanding that condition is false in order for stuff to load. That is... if(!IsObjectValid(oTrigger)) is false, or no such object is in the inventory, then it will load all the stuff until it loads the trigger, which is the last object in the list. But hey... what do I know! Like I said, it seems to work in Origins, but only loads the trigger ring in Awakening as you indicated it might. So I dunno... I'm getting more lost now. To get the stuff to load in Awakening I edited the xml file by adding the whole list it was loading in Origins at the bottom of the file but with the ExtendedModuleUID="DAO_PRC_EP_1" thingie instead of the single player etc... etc... Again... it will load the trigger ring in Awakening... but nothing else... no amulets, no belts, no rings with properties, no swords, no armor, no bows. I am beginning to think Bioware did something on purpose to make me play the game THEIR way, no matter how many times I play it. That's not me though. I play it once or twice their way... after that its my way or the highway, and I never buy from them again. A game only has replay value if it can be modded. At least to me.


#8
rdr99

rdr99
  • Members
  • 32 messages
Hi Timelord... Yes, Lelianna had a bow, the bow had rapid aim, and one of her "attributes" besides "melee archer" WAS "rapid aim" as well.  And no, I had no other mod loaded which affected Rogue powers or Bow powers.   However, later in the game I tried to give that helm to Orghren and part of his head disappeared where the helm should have been, though it did not do that to Lelianna's head when she wore it. I destroyed it at that point and did not load any others. Perhaps that particular helm got corrupted in creation somehow. Is that possible??? I was able to wear my helm through the entire game with no problems, and the rest of the characters used my other created items with no problems right on to the finish and slaying of the Archdeamon. So I think my stuff works but somehow one thing got corrupted when created. At least I'm trying to convince myself of that because I could not possibly have made a mistake huh! No sireeeee... not me! Ptui!

Modifié par rdr99, 26 mai 2010 - 06:05 .


#9
rdr99

rdr99
  • Members
  • 32 messages
And to the Bioware people... Really??? No way to write scripts to load stuff into Awakening from the toolset without "hand editing" the xml file? And no add on to the toolset to either allow the Origins items to "grow" or progress in the material progressions from Origins, nor do you offer us an add on to allow us to edit items from Awakening? Sheesh! What ARE you thinking?  I mean... the tools obviously exist... YOU did it!  Why can't we?

Modifié par rdr99, 26 mai 2010 - 06:28 .


#10
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages

rdr99 wrote...
In my understanding that condition is false in order for stuff to load.


You are right. My mistake:pinched:.