1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Wondering about BG games AI

Discussion in 'BG2: Throne of Bhaal (Classic)' started by Melhisedek, Apr 29, 2008.

  1. Melhisedek Gems: 5/31
    Latest gem: Andar


    Veteran

    Joined:
    Mar 1, 2005
    Messages:
    138
    Likes Received:
    0
    2 days ago I became obsessed with AI :) Can't explain why, was watching some speed runs and thought monsters reacted dumbly. One thing led to another and now 2 days later I've been constructing some simple AI algorithms (just in my head pseudo code) for so long that I'm gonna pass out soon ;)

    Sadly my coding suck so I would like to check some finished examples.

    I know people have been modding BG2 and creating AI scripts, I just wonder if I can see source somehow? Either their scripts or original files, so I can see how basic things work :)
     
  2. Baronius

    Baronius Mental harmony dispels the darkness ★ SPS Account Holder Veteran

    Joined:
    Aug 13, 2002
    Messages:
    1,783
    Likes Received:
    14
    You might already know these, but a little information on formats: the binary data of scripts are stored in BCS, the game uses these. The decompiled files have BAF extension. WeiDU extends this format a little bit (the extension does't change, it's still BAF, but it can only be compiled by WeiDU). WeiDU, in case you didn't know, is the currently used platform to package and maintain mods.

    You can find source files in the Scripts folder of your BG2 if I remember correctly, and just look for BAF files in the package of most mods.

    Scripts are the most important dynamic aspect of the game. AI (and the whole BG2 world) is basically controlled by communicating extended (deterministic) finite state automata, that is what you realize via scripts. SimDing0 has a good practical tutorial (with smaller inaccuries and problems), it's called Scripting Guide or something like that, I suppose google finds it if you type "SimDing0 scripting" (without quotes, of course). If not, you can find it on pocketplane.net somewhere.
     
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.