Jump to content

AI Scripting for newbies


Downs Duck

Recommended Posts

When you set up the Dalphabetsoup Editor Pro v7, you probably did not check the box on the right side of the setup page that enables editing.

You're quite right about that one, though I followed the tutorial to the letter. It didn't tell me about this. But you did, thanks :p

Link to comment
DLTCEP sucks disproportionate amounts of pigeon cock. Your best bet is to use WeiDU to convert your BS files to BAF, edit them in Context / Crimson Editor, and use WeiDU to compile them back to BCS (and rename the file to BS). If you're afraid of the commandline, you should be able to do that by putting weidu.exe in the BG2 directory, and drag-and-drop your BS/BAF files on weidu.exe. Otherwise, there should be a tutorial on command-line somewhere.

I'll try ditching DLTCEP for WeiDU. Thanks :p

 

EDIT: vvvvv Obviously didn't and suffered for it in the end vvvvvv

Link to comment

I am really sorry to bother you with this once again, the thread title includes scripting for newbies though...

 

I am currently using DLTCEP (sigh), which I understand is WeiDU with GUI(?) because I am a coward that are afraid of the commandline.

 

1. I am trying to edit eScripts, namely the script eFighter.

2. I open DLTCEP

3. A little loading box "Reading chitin.key" appears for some seconds, then another box displays the message "Warning: Can't load MORALEAI.ds!" with a OK button attached to it.

4. I click on the OK button.

5. A little loading box with "Reading dialog.tlk" comes up and then disappears. So far so good(?)

6. I now press Edit - Script from the top menu.

7. A new window pops up, which I can load scripts from.

8. I choose "Load external scripts, and doubleclick eFighter from my Script folder (C:\Programfiles\BaldursGateTutu\Scripts). Since the default-show-files is .bcs, I change the files shown to include all files. I then choose eFighter.bs

 

Probably here i sexual intercourse it up, eh?

 

9. The script show up in decompiled(?) form. Looks OK to me.

10. I press "Search" from the top menu, to change all the "POT to _POT to make the sexually intercourse active characters drink their potions in Tutu.

11. I press "Search" from the top menu to change the "WAND to _WAND to make the Sodapop-straw-suckers use their wands in Tutu.

12. I am satisfied and press "Save script as..."

 

Here I probably sexual intercourse it up again:

 

13. I save the script as EFIGHTER.baf in my default Override folder.

14. I start ConText, and open the EFIGHTER.baf file (I don't know why I have to do this instead of just saving the file as EFIGHTER.bs right away, but that's because I'm a newbie and a retard).

15. The script looks just as it did in DLTCED.

16. I save it as "EFIGHTER.bs" in my override folder.

17. I copy it to the Scripts folder (C:\Programfiles\BaldursGateTutu\Scripts).

 

Where did I sexual intercourse it up? I know I did somewhere.

 

EDIT:

Replaced swearing with other, kinder words

Link to comment

If you're trying to look at the scripts introduced by a WeiDU mod, and eScripts *is* a WeiDU mod, why are you even going through the trouble of decompiling scripts at all?

 

When a WeiDU mod is installed, it installs from a mod folder, which contains the uncompiled files, already in BAF format. You can use any text editor, like Crimson Editor or ConTEXT, to modify them to your heart's content.

 

So, open up that mod folder, have a look, and I bet you'll see a bunch of files in there with the extension .baf. Those are the ones you want to look at.

Link to comment
If you're trying to look at the scripts introduced by a WeiDU mod, and eScripts *is* a WeiDU mod, why are you even going through the trouble of decompiling scripts at all?

 

When a WeiDU mod is installed, it installs from a mod folder, which contains the uncompiled files, already in BAF format. You can use any text editor, like Crimson Editor or ConTEXT, to modify them to your heart's content.

 

So, open up that mod folder, have a look, and I bet you'll see a bunch of files in there with the extension .baf. Those are the ones you want to look at.

 

Referring to the Bigg in previous post:

DLTCEP sucks disproportionate amounts of pigeon cock. Your best bet is to use WeiDU to convert your BS files to BAF, edit them in Context / Crimson Editor, and use WeiDU to compile them back to BCS (and rename the file to BS). If you're afraid of the commandline, you should be able to do that by putting weidu.exe in the BG2 directory, and drag-and-drop your BS/BAF files on weidu.exe. Otherwise, there should be a tutorial on command-line somewhere.

 

I am misunderstanding, I know.

 

I am totally confused now :p

 

EDIT: Which Mod folder?

Link to comment

I think I understand i little bit more now. You mean the folder of eSeries in my Tutu install folder.

 

Found it and the .baf's

 

I'll be back to torment you further, in a later time.

 

EDIT: Its a a little later (4 minutes and 34 seconds actually).

I have now changed the .baf for eFighter, eMage and all the others in the eSeries folder.

 

Is that all I have to do? Or do I have to change something else, like in my scripts folder?

Link to comment

Exactly. If you edit these files and then reinstall them using the regualr setup-MyMod.exe (which is probably setup-eSeries.exe for the eSeries), you're going to be able to avoid working with the command line entirely.

 

Mind you, I'm not sure this is the best approach, since you aren't going to learn why it works the way it does, but I think you just want to get your scripts updated with the right potion names, etc.

Link to comment
Exactly. If you edit these files and then reinstall them using the regualr setup-MyMod.exe (which is probably setup-eSeries.exe for the eSeries), you're going to be able to avoid working with the command line entirely.

 

Mind you, I'm not sure this is the best approach, since you aren't going to learn why it works the way it does, but I think you just want to get your scripts updated with the right potion names, etc.

 

Great.

 

I am sure I will have to alter the Threat Assessments too, 'cause the characters will not use the best wands, potions, etc. because the BG1's Xvarts/Kobolds/Bandits are not to be considered critical threats by their BG2 Threat Assessments, right?

 

Their Threat Assessments are waiting for a Giant/Dragon maybe?

Link to comment

The Bigg probably made his recommendations because he believed you were using a non-WeiDU mod, uScripts. Under those circumstances, you would be forced to decompile the script to look at it.

 

If you are using a WeiDU mod, though, that isn't necessary.

Link to comment

Mein Goth, the installer went like persons not applying to normal societies customs and expected behaviour.

 

I doubleclicked the .exe, and it seems the eSeries has to do with everything else installed up to this point. I notice the WeiDU installer reinstalling other components automatically, from other Mods such as BG2Tweak and others.

 

Its still going...

 

EDIT: Bad words replaced with kinder words.

Link to comment

Nice to know, about the reinstalling.

 

 

Oh dear, the scripts now do nothing, after my alteration of potions and wands.

 

The party just stands there, with the AI on, and the scripts re-chosen on their Character Records :p

 

Seems like tougher measures, than simply renaming the potions and wands with an underscore, must be taken.

 

EDIT: Bad words, be-gone

Link to comment

Now you're into the area where I absolutely cannot help you, as my own ability to write AI script is as bad as it could possibly be. I will always be bad at it, for the same reason I am really bad at chess: my brain just doesn't work that way.

Link to comment
I then received the following message: "Java out of memory"
Ah, the wonders of Java managed memory. Launch with -Xms128M or download and use the BAT that Jon has up to run NI. You shouldn't ever have to edit dialog.tlk (and certainly shouldn't use NI if you do), however; if you just want to see the strings, use the string lookup command (Search -> StringRef).

 

Also, case matters in triggers/actions, but it doesn't for item names (= stuff in ""s).
I'd be surprised if this were the case. For scripts, it's obviously dependent on the compiler used (I know NI doesn't pay attention to the case); I don't know why they would have done case-sensitive matching in DLG files, so I doubt it matters there either (of course, WeiDU will just assume the IDS files are better than what I've written and destructively change everything when compiling anyway, so who cares).

 

DLTCEP sucks disproportionate amounts of pigeon cock.
Wonderful. This is my first smile of the day. :)
Link to comment

Archived

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

×
×
  • Create New...