Jump to content

Some questions from a noobie


Saradas

Recommended Posts

I would suggest this approach:

 

 

IF ~~ THEN BEGIN 10

SAY @129

IF ~~ THEN REPLY @123

IF ~~ THEN DO SetGlobal("SaradasTalkAfterDavaeorn","GLOBAL",1)~ EXIT

END

 

And then make a script that does the rest, not the dialog file as it can't do all things...

.baf :

IF

   Global(""SaradasTalkAfterDavaeorn"","GLOBAL",1)
THEN
   RESPONSE #100
       SetGlobal("SaradasTalkAfterDavaeorn","GLOBAL",2)
  	 GiveItemCreate("$invscrl","Player1",1,0,0) 
    ActionOverride(Protagonist,AddSpecialAbility("spclinv"))
End 

Link to comment

ok after some scripting I put the lines inside the NPC override script and all is working, but i didn't use GiveItemCreate, instead i put all the desired items inside the npc inventory and used GiveItem. now is working like a charm :)

Link to comment

Yes.

 

But you need to download and install Near Infinity (or Infinity Explorer) to ffind the correct offset of the string reference corresponding to #139 effect. You will find them in Spellhold forums.

 

My code writes the string reference for #139 effect located at the very end of the spell (I don't remember exactly, but it must be the 7° or 8th effect).

 

Considering the 4th position of your effect, I think the good code should be :

 

COPY ~Mymod/Myspell.spl~ ~override/Myspell.spl~ SAY 0x12e @1234

 

But the best way to avoid mistakes is to install Near Infinity and check for the good offset : open your spell file (located in the override folder, not in the "SPL" one), double click on the "Abilities" window, and double click on the #139 effect. You will find the correct effect of the string reference in the far right column of the "value" line : 12e h. Forget the " h" and write SAY 0x12e in your tp2. Depending on the position of the #139 effect, this offset may change.

 

Neccroing this as it pertains to my issue.

 

I have the following:

COPY ~file~ ~override/file~ SAY 0xce ~Blah blah blah~

 

This works, and when the spell is used, the string is displayed, but another string is also displayed that says invalid reference. I only have the effect in there once and I had it set to -1, but after running the install, it has changed it to 32326. Any suggestions?

Link to comment

Are you workin with BG:EE?

 

Invalid string reference and a number is always a sign that the mod content in the game is trying to reference an entry in the dialog.tlk that is not there. This can e.g. happen if the mod is installed to the wrong language dialog.tlk (a different one than the game is played with). Probably also, if you use a modded save but the mod is not installed.

Link to comment

Saradas: I see from your code examples that you are not using a personal prefix. This is an absolute must-have for IE-Modding. Please get your personal prefix, and rework it into your code. The prefix list is at BWL (cannot post a link from this computer, sorry).

Link to comment
This can e.g. happen if the mod is installed to the wrong language dialog.tlk (a different one than the game is played with). Probably also, if you use a modded save but the mod is not installed.
The most likely thing though is that one is trying to install a BG2 mod for a BG(1)EE game, and the string referrence is based on the BG2's, causíng the problem...

 

 

Saradas: I see from your code examples that you are not using a personal prefix. This is an absolute must-have for IE-Modding. Please get your personal prefix, and rework it into your code. The prefix list is at BWL (cannot post a link from this computer, sorry).
Here's a link for the thread.
Link to comment

Jarno: No, that's not the "most likely thing" for this invalid message. 1. BG:EE has more strings than BGII, so most likely is that the wrong string text would be shown. 2. This problem also happen(ed) for a BG:EE mod installed on BG:EE.

 

Thank you for providing the link.

Link to comment

http://www.blackwyrmlair.net/prefixes/

 

I reserved my prefix almost 6 months ago. This thread is old and I already used the prefix in all of my mods. The code you see in this thread is old

 

btw I want to ask you a question regarding prefixes: Weidu seems to not accept "!" symbol inside the interaction files of my npc "xxx25J" "xxx25B".

When compiling, it reports error because of that. Anybody confirms and have a solution for this issue?

Link to comment

Yeah, that's a problem when compiling. "!" gets used to indicate a NOT whatever that follows, which can lead to problems if it's part of a designation.

 

Put all instances of your string inside tildes, like so:

 

BEGIN ~A!MYNPC~

 

APPEND ~A!MYNPC~

 

(Where "A!" is an example prefix, not mine.)

 

EDIT:

 

Or switch your "!" to "#" or something else that isn't an active character; that works too.

Link to comment

the issue appears in the interjections and banters:

 

INTERJECT_COPY_TRANS GORDEMO 1 Demogorgon  //Ingresso Demogorgon
== Sarad25J IF ~InParty("!sartob") InMyArea("!sartob")~ THEN
~Advance carefully now, nothing is as it seems to be, in this place. I sense a great peril ahead.~
END

 

 

let's say I change the name of my interjection file to !Sara25J

 

INTERJECT_COPY_TRANS GORDEMO 1 Demogorgon  //Ingresso Demogorgon
== !Sara25J IF ~InParty("!sartob") InMyArea("!sartob")~ THEN
~Advance carefully now, nothing is as it seems to be, in this place. I sense a great peril ahead.~
END

 

 

weidu will report error near symbol [!]

Link to comment

Try:

 

INTERJECT_COPY_TRANS GORDEMO 1Demogorgon//Ingresso Demogorgon

== ~!Sara25J~ IF ~InParty("~!sartob~") InMyArea("~!sartob~")~ THEN

~Advance carefully now, nothing is as it seems to be, in this place. I sense a great peril ahead.~

END

 

(Many, many compiling problems are caused by tildes, or the lack of same.)

Link to comment

You don't need to tilde a filename, no. I would be wary of ! symbols, but I've heard other people had it installed correctly.

 

I would rather get to the source of the problem, though: does a very simple !SaraJ file, with absolutely no interjections, compile and work in the game?

Link to comment

Saradas: Ah, I see. But the confirmed, working possibilities for prefixes is listed in the first post of the reservation list. It's

First possibility: [A-Za-z][0-9A-Za-z#_!-]

Second possibility: [#][A-Za-z_!-]

 

which could be expressed as:

Any letter, followed by any number, letter, #, _, ! or - character.

OR

A '#' character, followed by a letter, _, ! or - character.

 

So, "!S" might work, but using ~~ almost everywhere would be a minimum, I guess. As Thimblerig pointed out, The "!" is read as the "NOT" symbol, so WeiDU chokes on it.

Link to comment

You don't need to tilde a filename, no. I would be wary of ! symbols, but I've heard other people had it installed correctly.

 

I would rather get to the source of the problem, though: does a very simple !SaraJ file, with absolutely no interjections, compile and work in the game?

 

Yes it works because my npc mod is for ToB, but i created a banter file for SoA named !SarB (empy file) and it compiled correctly and appended correctly to interdia.2da

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...