Aller au contenu

Photo

Does a modified ginc* include override the OEI version?


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

#1
Morbane

Morbane
  • Members
  • 1 883 messages
This is a two-fold question...

I have modified "ginc_trigger" to have a short-circuit parameter and it was saved to my module by default after changing it. Will it take precedence over the original?

And, will this conditional logic work?

if ( GetLocalString( OBJECT_SELF, sShortCircuit ) == GetGlobalString( "Short_Circuit" ) ) return;

i.e. can a Global String be compared to a Local String for equality?

#2
MasterChanger

MasterChanger
  • Members
  • 686 messages

Morbane wrote...

And, will this conditional logic work?

if ( GetLocalString( OBJECT_SELF, sShortCircuit ) == GetGlobalString( "Short_Circuit" ) ) return;

i.e. can a Global String be compared to a Local String for equality?


Both GetLocalString(...) and GetGlobalString(...) just return string variables, don't they? So it's the same as

string sLocString = GetLocalString(...);
string sGlobString = GetGlobalString(...);
if (sLocString == sGlobString) return;

Another way to think about is that [GetGlobalString("Short_Circuit")] isn't in itself a global string, but it has value equal to a certain global string. What makes that string global wouldn't be what kind of value it holds but rather where and how it's stored.

#3
Morbane

Morbane
  • Members
  • 1 883 messages
So the string values are all that matters, and the comparison is valid?

I just thought I would ask in the forums - I am trying to debug and the way I am applying the comparison should prevent the script from firing after the two strings are determined as equal - but the script and hence a conversation is still firing.

Modifié par Morbane, 18 août 2010 - 08:15 .


#4
Shallina

Shallina
  • Members
  • 1 011 messages
yup it will.



A script placed in the campaign directory, or Module directory override the default one.



I think that the campaign directory override the override folder. But that the override folder override the module directory. But I 'am not 100% sure on those one.



Something that is linked in hak override everything (a 2da for exemple). This one I am 90% sure about it.

#5
Morbane

Morbane
  • Members
  • 1 883 messages
 Well - having run through the script and testing in-game, it turns out that simply having a modified "ginc_trigger" in the Module Directory was not working as an override of the OEI "ginc_trigger". I had to rename the modified script and adjust the associated gtr_speak_node as well - with both scripts renamed and attached to my triggers my ShortCircuit variable parameter modification functioned properly.
But this all relates to having a Companion be the Conversation subject of a triggered conversation - all is well in the universe :D

Modifié par Morbane, 18 août 2010 - 05:24 .


#6
Morbane

Morbane
  • Members
  • 1 883 messages
Just a note on "gtr_speak_node" - the variable "NPC_Tag" must be BLANK - not an empty string, not a zero, if a companion is to be able to be the conversation speaker when interacting with a triggered conversation - i.e. not an actual NPC, thus allowing the companion to have skill rolls...

Modifié par Morbane, 19 août 2010 - 08:08 .


#7
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 585 messages
Just placing a modified include file in the override or campaign folder isn't enough. You have to recompile the scripts that include it as well and those recompiled scripts need to be in your override or campaign folder to override any module or standard versions of them.



Regards

#8
Morbane

Morbane
  • Members
  • 1 883 messages
Yep - found that out when debugging.