Jump to content


Photo

AI Script not working...


  • Please log in to reply
8 replies to this topic

#1 Le Magos

Le Magos
  • Member
  • 15 posts

Posted 12 August 2011 - 08:56 AM

Hi !!!



Ok, I tried something:

I have a kit of mine, that uses a custom AI script (via the use of an AP_spell on its 2DA, that sets AI Script (opcode 82 I think...))...

The Script works with vanilla BGII, but not with my install... any idea ???


Spoiler


#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 12 August 2011 - 11:15 AM

Look at the .cre or .chr you're applying the script to and see if there are other scripts that might be interfering with it. Also make sure it's actually getting that script applied to it.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 Le Magos

Le Magos
  • Member
  • 15 posts

Posted 12 August 2011 - 10:51 PM

Thanks...


Ok, I did that (excuse me, but I'm... huh... new ??? In the modding scene...):

I exported my character, and opened it with NearInfinity: no script... :(

I added it manually with NI (override script), saved the CHR...

I imported the modified Character, not working... :(

I exported it again: the new CHR has no trace of my script again... >_<   (the only one is DPLAYER3.BCS, Default Script)


Did I do something really stupid ???

#4 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 13 August 2011 - 07:57 PM

What exactly are you trying to do with the kit? Set AI script probably will not work with the player character (as he is under your control, not the AI's).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#5 Le Magos

Le Magos
  • Member
  • 15 posts

Posted 14 August 2011 - 05:43 AM

I'll try t explain, but I will be unclear, I 'm afraid... (English is not my native languagre... :()


I try to make the kit able to follow a tree of aptitudes...


         L3
        /
      L2
     /  \L3'
   L1     
  /  \L2'
L0        L3"
  \L1'   /
     \L2"
         \L3"'
etc.

The player (me :P) choose, at the level 1, an aptitude (L1, or L1')

Depending of the choice I made: at the level 2, I can take L2 or L2' if I took L1, or L2" if I took L1', etc.

I tried to set AI script, but if you're right, it won't work...


Maybe, I 'll try to modify the default scripts ??? (Dplayer2, and Dplayer3)

Or I could try to use The Invisible Creature Trick, with a custom dialog file...

Or I am totally crazy...   :crazy: :tease:

#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 17 August 2011 - 09:14 PM

Or I could try to use The Invisible Creature Trick, with a custom dialog file...

That's what I would do, should work in theory. We do a lot of invisible creature stuff in Aurora (though not with kits). I think I know what you're talking about because it's similar to what happens in Baldur's Gate: Dark Alliance I & II and Demon Stone and probably a lot of other games (basic 3rd edition feat selection I suppose).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#7 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 21 September 2011 - 08:08 PM

not sure if you've settled on a way to do what you wanted...
just wanted to offer a bit of working script switch code (from IWD) that takes place via an AI script. All of the games using the IE engine, take advantage of the ChangeAIScript at one point or another. Never did see the spell opcode in use and couldn't get it to work myself either.

I think this might be what you are looking for.

//switch cleric thieves to their spells script
IF
  ActionListEmpty()                                //not doing anything
  Class(Myself,CLERIC_THIEF)
  Or(2)
    See([ENEMY])                                     //see enemy
    GlobalTimerExpired("ab_switch_script","LOCALS")  //timer has expired
THEN
  RESPONSE #100
    SetGlobalTimer("ab_switch_script","LOCALS",70) //set a ten round timer or 1 turn -- will get several spells per run through
    ChangeAIScript("ab_cler",CLASS)                //set cleric script to CLASS level
END

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#8 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 22 September 2011 - 11:23 PM

Well, the main problem seems to be this:

Set AI script probably will not work with the player character (as he is under your control, not the AI's).


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#9 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 24 September 2011 - 01:57 PM

Well, the main problem seems to be this:

Set AI script probably will not work with the player character (as he is under your control, not the AI's).

the opcode which is described to set ai script? That doesn't work for anything that I know of. Probably why all of bioware's script changing is done via script or dialog actions.

but ChangeAIScript does work on the player character. just don't change the script in the default slot which should be dplayer3.bcs or the class script cause that's where the in game selected party ai script goes (unless you purposefully change it as part of a party ai script)

So if the OP wants to allow the player to use an party AI script of their choice, they could use dplayer3 to assign the race level script initially and then the race level script could be changed as needed according to the kit progression. At least it should work in theory...

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm