Jump to content


Photo

ApplySpell command issue's'


  • Please log in to reply
20 replies to this topic

#1 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 30 August 2010 - 06:46 AM

Excuse me, if these questions were already asked, but I'll try to use the most understanding words. :)

1. I found this script in IE:
IF
	Detect([PC])
	Global("C6EricHelp","GLOBAL",0)
THEN
	RESPONSE #100
		SetGlobal("C6EricHelp","GLOBAL",1)
		DisplayStringHead(Myself,'The paladins of the Order of the Radiant Heart are here to fight at your side, <CHARNAME>!  Glorious shall our victory be if this great evil can be brought to an end!')
END
From all I gathered this line should be codded right. But why when I try to compile it, it gives me this?

Expected I:StrRef* but found 'Indeed.'

from
ActionOverride("Er#Vamp",DisplayStringHead(Myself,'Indeed.'))
Know, it somehow involves 2DA files... Hm... If only I knew how to make them.


2. When I try to open the hand-written scripts with NE, in gives me this. Yep, I know I saved with mistakes, but I don't think it should be like this.
IF
	True()
THEN
	RESPONSE #RS
END
While the compiled part of the script is full. But is very illogical.

3. The first mistake in any script I try to compile is:

RESPONCE#100 -> Missing parenthesis


I may be dumb, but where the Hell should I add brackets? :wacko:

4. No exactly CutScene question: What are the *exact* lines I need to enter in WeiDU.exe in 'Enter arguments', to decompile .DLG files to .D files? I tried commands written in WeiDU documentation and PPG tutorials (with --out Override command), but the maximum I got is a Unknown 'weidu' file which displays 'file ---' in the 'Type' section.

5. Why in 'Class.IDS' 'Mage' is typed properly but instead of 'MAGE_ALL' it's 'LONG_BOW'? ???

Other questions, while I gather my thoughts... :D

Edited by Aliya, 21 September 2010 - 08:50 AM.


#2 Ipsissimus

Ipsissimus

    [Insert witty statement]

  • Member
  • 356 posts

Posted 30 August 2010 - 07:21 AM

DisplayStringHead(Myself,'Text') should be DisplayStringHead(Myself,%Text%)

Almost all scripts need RESPONSE #100, and DisplayStringHead text needs to be in percent signs instead.
And the mirror, it reflects a tiny dancing skeleton, surrounded by a fleshy overcoat and swaddled in
A furry hat, elastic mask, a pair of shiny marble dice, some people call them snake-eyes, but to me they look like mice
-- "Nothing's gonna change my clothes", They Might Be Giants

#3 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 30 August 2010 - 07:38 AM

Still NE, doesn't recognize it, even with percent signs, instead of ''s. Phew, forgot what was that word... :D

Expected I:StrRef* but found %Indeed.%



#4 -Guest-

-Guest-
  • Guest

Posted 30 August 2010 - 01:58 PM

From all I gathered this line should be codded right. But why when I try to compile it, it gives me this?

That line is incorrect. A StrRef is an integer (number) value, not a string. Valid arguments include 100, 10000, 12345. A string reference (StrRef) is simply an index to a string in the talk table (dialog.tlk).

Now, with WeiDU, you can include a string value (enclosed in ~s or %s) that will cause WeiDU to add the string to dialog.tlk and then replace the string with the tlk index (say it appended the string as @75000, it would then compile the script as DisplayStringHead(Myself,75000)). However, if you need this functionality, the script must be compiled with WeiDU.

2. When I try to open the hand-written scripts with NE, in gives me this. Yep, I know I saved with mistakes, but I don't think it should be like this.

What is NE? If you mean Near Infinity, then a script cannot be compiled if it has errors (it will just compile garbage since it can't correctly parse the input), although you can force it to do so. If it tells you there are errors in the script when you're trying to compile, you should fix the errors before continuing.

In this instance, if that is what you're getting when viewing the script in NI (it's decompiled from the actual BCS script on-the-fly), then the BCS is hopelessly corrupt (the script sources, the BAF files, are not saved when compiling and saving, so if you don't have a copy elsewhere, you'd have to recreate the entire script depending on how much is left in the BCS code).

RESPONCE#100 -> Missing parenthesis

The correct command is RESPONSE (with two S's and no C) followed by a space, the pound (#), and the numeric weight.

4. No exactly CutScene question: What are the *exact* lines I need to enter in WeiDU.exe in 'Enter arguments', to decompile .DLG files to .D files? I tried commands written in WeiDU documentation and PPG tutorials (with --out Override command), but the maximum I got is a Unknown 'weidu' file which displays 'file ---' in the 'Type' section.

You have to invoke WeiDU with the executable name (if WeiDU.exe is in your Baldur's Gate II folder, then you need to navigate to that folder in the DOS prompt and run WeiDU.exe path\to\dialogue --options). If the dialogue is located in the keyfile (it's a vanilla dialogue from the game), then you can omit the path and use just the dialogue filename and have WeiDU locate it on its own (as the readme example, "WeiDU.exe SCSARLES.DLG --out Override" will work because WeiDU will look for and find SCSARLES.DLG from the biffs if it can't otherwise be found, in this case unless there's a file named SCSARLES.DLG sitting directly in the Baldur's Gate II folder).

5. Why in 'Class.IDS' 'Mage' is typed properly but instead of 'MAGE_ALL' it's 'LONG_BOW'? ???

A script compiles largely to a series of numbers (you can open a BCS file in a text editor or view the code tab in Near Infinity to see). With BioWare's supplied CLASS.IDS, the value for MAGE_ALL and LONG_BOW are the same (202), so the compiler has to pick one of the symbols when resolving. WeiDU will pick always the last symbol for a value in the IDS file, and Near Infinity will pick always the first (due to the way they parse and cache these files). You can add a "202 MAGE_ALL" line to the top and bottom of the file to ensure that they always decompile as MAGE_ALL, but MAGE_ALL and LONG_BOW will compile identically with the vanilla CLASS.IDS (they both compile to 202, so they're functionally equivalent).

#5 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 31 August 2010 - 06:26 AM

Wow, thanks: now I need to decipher it. The DOS prompt gives me this.

'Microsoft Windows XP (Version 5.1.2600]
<c> Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\USER>'

What should I enter to navigate DOS to BG2? It's installed on D:\ disk, though.

#6 -ardanis-

-ardanis-
  • Guest

Posted 31 August 2010 - 08:22 AM

Just create a batch (*.bat) in BG folder, fill it with decompiling stuff you need, and run. Imo way easier than retyping in cmd each time you need it.

#7 -Guest-

-Guest-
  • Guest

Posted 31 August 2010 - 09:57 AM

Use the "cd" command:
cd "D:\Path\To\Game\Folder"
(You only need the quotes if the path contains spaces, but they should be OK even if it doesn't.)

#8 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 01 September 2010 - 02:16 AM

Okay, I've done something; I created some .CHR files via BG2 engine, that I'll convert to .CREs, and I created some 38x60 and 110x170 complete black portraits, to accept characters. But, they retain their default soundsets; how to remove them and portraits? Because, black space is ridiculous.

#9 Ipsissimus

Ipsissimus

    [Insert witty statement]

  • Member
  • 356 posts

Posted 01 September 2010 - 09:47 AM

Don't bother worrying about soundsets - just make sure that, when you convert the CHRs to CREs, you uncheck the "Exportable" flag. You can assign portraits in NearInfinity, or via TP2 code, like so:



COPY ~Vhersen/Character/i-VherL.bmp~ ~override~ 	// large portrait
COPY ~Vhersen/Character/i-VherM.bmp~ ~override~   // medium portrait
COPY ~Vhersen/Character/i-VherS.bmp~ ~override~   // small portrait
COPY ~Vhersen/Character/i-Vher.cre~ ~override~      // CRE file

WRITE_ASCII 0x0248 ~i-vhers~ #8                            // override script
WRITE_ASCII 0x02cc ~i-vher~ #8                              // pre-joined dialog file
WRITE_ASCII 0x0280 ~i-Vhersen~ #32                 	// Death variable, aka script name
WRITE_ASCII 0x0034  ~i-VherS~ #8                        // small portrait assignation
WRITE_ASCII 0x003c  ~i-VherM~ #8                      // medium portrait assignation

Edited by Ipsissimus, 01 September 2010 - 09:48 AM.

And the mirror, it reflects a tiny dancing skeleton, surrounded by a fleshy overcoat and swaddled in
A furry hat, elastic mask, a pair of shiny marble dice, some people call them snake-eyes, but to me they look like mice
-- "Nothing's gonna change my clothes", They Might Be Giants

#10 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 04 September 2010 - 05:03 AM

Okays, more questions:

1. How to harmlessly edit DIALOG.TLK file? Manually - I'm pretty much scared after the whole .D history... NI gives some error, when I'm trying to Edit->Dialog.TLK. I just wanna fill 'Name' and 'Apparent name' fields in .CRE file.

EDIT: Oh my... I think I misunderstand here something. DragonLance tool runs fine except something... wrong...

Screen.JPG

The thing I boxed is how much I advanced in mod creation... it's scripted *and* cre-fied but ISN'T written. :D

Edited by Aliya, 04 September 2010 - 07:27 AM.


#11 Ipsissimus

Ipsissimus

    [Insert witty statement]

  • Member
  • 356 posts

Posted 04 September 2010 - 09:09 AM

You don't need to edit dialog.tlk to add names. If it's an existing CRE file, use this:

COPY_EXISTING ~mycre.cre~ ~override~
SAY NAME1 ~MyCRE~
SAY NAME2 ~MyCRE~


If it's your CRE file, use this:
COPY ~mymod/mycre.cre~ ~override~

SAY NAME1 ~MyCRE~
SAY NAME2 ~MyCRE~



To add to an existing dialogue, use APPEND.
And the mirror, it reflects a tiny dancing skeleton, surrounded by a fleshy overcoat and swaddled in
A furry hat, elastic mask, a pair of shiny marble dice, some people call them snake-eyes, but to me they look like mice
-- "Nothing's gonna change my clothes", They Might Be Giants

#12 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 05 September 2010 - 09:57 AM

Ehm... :|

okay, I didn't understand, where to type it, though. I'm just learning to code dialogs and create .CREs.

#13 Ipsissimus

Ipsissimus

    [Insert witty statement]

  • Member
  • 356 posts

Posted 05 September 2010 - 10:55 AM

Partial sample TP2, CRE-related stuff:


Spoiler



Most of the WRITE_LONG, WRITE_ASCII, and WRITE_BYTE stuff is because I'm too lazy to keep editing the CRE file. It's all in the IESDP, if you're interested. Technically a soundset should have more lines than that, but I didn't see the point in copying the whole thing.

It's pretty cool what you can do in a tp2 file, though - compile dialogues and scripts, rename existing NPCs, lock a door... The TP2 of the BG1 NPC Project has some neat stuff in it.

Any clearer?

Edited by Ipsissimus, 05 September 2010 - 10:55 AM.

And the mirror, it reflects a tiny dancing skeleton, surrounded by a fleshy overcoat and swaddled in
A furry hat, elastic mask, a pair of shiny marble dice, some people call them snake-eyes, but to me they look like mice
-- "Nothing's gonna change my clothes", They Might Be Giants

#14 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 06 September 2010 - 03:46 AM

Oh! *Now* I get it! :) Thanks, I'll stick to existing TP2s. No more questions.

#15 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 20 September 2010 - 05:08 AM

I have a current version (V7.1) of DLTC Editor Pro, which, judge from Readme, can edit/create new item in BG2. I run it click:

Edit->Items-> A large box pops up. ->New Item. But .Bam and other tabs are empty. I tried to reload the program and restating thw whole system, but half of essential things to create ITM are missing.

But, since I need to create only 1 new thing [and edit the description of other 2] i don't think this should but of the problem.

#16 Turambar

Turambar
  • Modder
  • 935 posts

Posted 20 September 2010 - 06:12 AM

I have a current version (V7.1) of DLTC Editor Pro, which, judge from Readme, can edit/create new item in BG2. I run it click:

Edit->Items-> A large box pops up. ->New Item. But .Bam and other tabs are empty. I tried to reload the program and restating thw whole system, but half of essential things to create ITM are missing.

But, since I need to create only 1 new thing [and edit the description of other 2] i don't think this should but of the problem.


I usually use NI and not DLTCEP; anyway, when I have to make a new item (or whatever), I usually export an existing one and completely edit it.
The only problem is, sometimes the effects get messed up, so you must first write all effects, then all abilities, one by one and completing the effects for each immediately.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#17 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 20 September 2010 - 06:37 AM

Complete guide with creating ITM with NI? Nevermind, I got it.

One more: why when I try to edit dialog.tlk with NI it lagges like hell, and I need to end process via ctrl+alt+delete? And when fianlly closes.

Edited by Aliya, 20 September 2010 - 06:39 AM.


#18 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 20 September 2010 - 06:51 AM

DLTCEP is better for creating files, but starting from an existing item is a good suggestion regardless of what you use.
If you want to add text to the game you need to use WeiDU, at least if you plan on sharing your mod with others.

#19 Aliya

Aliya

    Pink-Eyed Menace!

  • Member
  • 1619 posts

Posted 20 September 2010 - 07:08 AM

I already did start the topic. Ipsi told me about that, but now I to handle the bams.

Edited by Aliya, 20 September 2010 - 07:09 AM.


#20 Ipsissimus

Ipsissimus

    [Insert witty statement]

  • Member
  • 356 posts

Posted 20 September 2010 - 11:24 AM

Wait, so you're having issues creating BAMs? Try BAM Batcher. It makes the whole process considerably easier - but the source images need a background image of a specific color, either pure green (hex code 00FF00) or sort of a brownish-grey, can't quite recall, but there's several sample BMPs in the BAM Batcher that use it, I think.
And the mirror, it reflects a tiny dancing skeleton, surrounded by a fleshy overcoat and swaddled in
A furry hat, elastic mask, a pair of shiny marble dice, some people call them snake-eyes, but to me they look like mice
-- "Nothing's gonna change my clothes", They Might Be Giants