Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > Baldurs Gate II: Shadows of Amn & Throne of Bhaal
FAQ Calendar Arcade Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 10-12-2002, 01:13 PM   #11
jcompton
Elminster
 

Join Date: May 29, 2002
Location: USA
Age: 48
Posts: 453
To compile scripts, get yourself any decent text editor (PFE or ConText work great) and compile your scripts in Near Infinity, available from http://www.idi.ntnu.no/~joh/ni/ ... NI does so many other things it's pretty indispensible anyway.

Dundee: I fear I don't know combat AI so I can't answer your question.
__________________
"(I)t's a testament to the determined RPG fraternity that a number of Baldur's Gate II mods have been successfully produced. The best can be found at pocketplane.net." - PC Gamer UK
jcompton is offline   Reply With Quote
Old 10-14-2002, 05:47 AM   #12
White Lancer
Drizzt Do'Urden
 

Join Date: August 30, 2002
Location: Australia
Age: 40
Posts: 628
Ok, im into this scripting stuff now. The first script i made totally by myself was a simple one. All it did was attack imoen when i saw her Just playing around with scripts. Now i want to write one that casts different spells based on different situations. I have set it to cast melf's acid arrow at the nearest enemy, but now i want it to cast melf's minute meteors when i dont have any currently. this is what i have so far:

IF
ActionListEmpty()
HaveSpell(WIZARD_MELF_MINUTE_METEOR)
!HaveItem...

I don't know which item the meteors are, and i dont know where to find out, could anyone point me in the right dirrection? Also, i dont want my mage to cast melfs acid arrow on an enemy who is protected, so how do i tell it not to cast it if they are protected?
__________________
It deons\'t mttaer waht oredr the ltteers in a wrod are, it olny mtaetrs taht the frsit and lsat ltteer be croecrt. The rset can be a tatol mses and you can sitll raed it. The huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
White Lancer is offline   Reply With Quote
Old 10-14-2002, 06:31 AM   #13
Dundee Slaytern
Ironworks Moderator
 

Join Date: June 10, 2001
Location: Pasir Ris, Singapore
Age: 42
Posts: 11,063
The code below means that the Mage will not cast Melf's Acid Arrow on a target if the target is under the influences of (Minor) Globe of Invulnerability, or has more than 75% Acid Resistance, or has more than 50% Magic Resistance, or has Mirror Image active, or has (Minor) Spell Turning active. I am still trying to figure out how to handle Mages with Spell Immunity and Spell Deflection.

code:
IF
ActionListEmpty()
See(NearestEnemyOf(Myself))
CheckStat(NearestEnemyOf(Myself),0,MINORGLOBE)
CheckStat(NearestEnemyOf(Myself),0,SHIELDGLOBE)
!CheckStatGT(NearestEnemyOf(Myself),75,RESISTACID)
!CheckStatGT(NearestEnemyOf(Myself),50,RESISTMAGIC )
!StateCheck(NearestEnemyOf(Myself),STATE_MIRRORIMA GE)
!HasBounceEffects(LastSeenBy(Myself))
HaveSpell(WIZARD_MELF_ACID_ARROW)
THEN
RESPONSE #100
Spell(NearestEnemyOf(Myself),WIZARD_MELF_ACID_ARRO W)
END
[/QUOTE]The IWD Mage AI script I have now is still a bit buggy in the defensive area, but most of the offensive scripts are working perfectly.
Dundee Slaytern is offline   Reply With Quote
Old 10-14-2002, 06:35 AM   #14
White Lancer
Drizzt Do'Urden
 

Join Date: August 30, 2002
Location: Australia
Age: 40
Posts: 628
Great, thanks, that helped heaps. Do you know how i can set my mage to cast minute meteors when he/she doesn't have any?
__________________
It deons\'t mttaer waht oredr the ltteers in a wrod are, it olny mtaetrs taht the frsit and lsat ltteer be croecrt. The rset can be a tatol mses and you can sitll raed it. The huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
White Lancer is offline   Reply With Quote
Old 10-14-2002, 06:42 AM   #15
LennonCook
Jack Burton
 

Join Date: November 10, 2001
Location: Bathurst & Orange, in constant flux
Age: 38
Posts: 5,452
Quote:
Originally posted by White Lancer:
Great, thanks, that helped heaps. Do you know how i can set my mage to cast minute meteors when he/she doesn't have any?
By cheating
LennonCook is offline   Reply With Quote
Old 10-14-2002, 06:48 AM   #16
White Lancer
Drizzt Do'Urden
 

Join Date: August 30, 2002
Location: Australia
Age: 40
Posts: 628
Quote:
Originally posted by LennonCook:
By cheating
No, you miss-understand. I dont want to cast a spell i don't have, i want to cast a memorised melfs minute meteors, when i dont have any meteors in my hand.
As in, i throw my last meteor, then cast melfs minute meteors, so i get more.

EDIT] Dundee (or anyone who can answer this)what is SHIELDGLOBE? and What are BounceEffects?

And another thing, why do you sometimes use NearestEnemyof() and other times use LastSeenBy()? What is wrong with just using NearestEnemyOf() all the time?

[ 10-14-2002, 06:55 AM: Message edited by: White Lancer ]
__________________
It deons\'t mttaer waht oredr the ltteers in a wrod are, it olny mtaetrs taht the frsit and lsat ltteer be croecrt. The rset can be a tatol mses and you can sitll raed it. The huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
White Lancer is offline   Reply With Quote
Old 10-14-2002, 07:00 AM   #17
Dundee Slaytern
Ironworks Moderator
 

Join Date: June 10, 2001
Location: Pasir Ris, Singapore
Age: 42
Posts: 11,063
Quote:
Originally posted by White Lancer:
Great, thanks, that helped heaps. Do you know how i can set my mage to cast minute meteors when he/she doesn't have any?
Alas! I too wish to know. [img]smile.gif[/img] Remember that I have only been doing this for less than 2 days so far.
Dundee Slaytern is offline   Reply With Quote
Old 10-14-2002, 07:06 AM   #18
Dundee Slaytern
Ironworks Moderator
 

Join Date: June 10, 2001
Location: Pasir Ris, Singapore
Age: 42
Posts: 11,063
Quote:
Originally posted by White Lancer:
EDIT] Dundee (or anyone who can answer this)what is SHIELDGLOBE? and What are BounceEffects?
And another thing, why do you sometimes use NearestEnemyof() and other times use LastSeenBy()? What is wrong with just using NearestEnemyOf() all the time?
Nothing wrong I guess. LastSeenBy() is just more cautious, as in so long as somebody has it active. Feel free to change it to NearestEnemyOf().

Personally I use SecondNearestEnemyOf() for Melf's Acid Arrow to make it more random since enemies move around.

SHIELDGLOBE is referring to Globe of Invulnerability(99% sure), while HasBounceEffects is referring to whether or not the target has (Minor) Spell Turning active.

ADD] Personally, I regret not doing a fighter script first as that would be soooo much easier to do as all I need to add it to make them drink healing potions and antidotes when necessary.

Custom AI Scripts rock! Now... if only I can figure out how to implement my PRATI tactic into an AI script... then I can play BG2 as though it is a movie. [img]tongue.gif[/img]

[ 10-14-2002, 07:10 AM: Message edited by: Dundee Slaytern ]
Dundee Slaytern is offline   Reply With Quote
Old 10-14-2002, 07:22 AM   #19
White Lancer
Drizzt Do'Urden
 

Join Date: August 30, 2002
Location: Australia
Age: 40
Posts: 628
Quote:
Originally posted by Dundee Slaytern:
Personally I use SecondNearestEnemyOf() for Melf's Acid Arrow to make it more random since enemies move around.

ADD] Personally, I regret not doing a fighter script first as that would be soooo much easier to do as all I need to add it to make them drink healing potions and antidotes when necessary.

Custom AI Scripts rock! Now... if only I can figure out how to implement my PRATI tactic into an AI script... then I can play BG2 as though it is a movie. [img]tongue.gif[/img]
Hmm. i've seen others using TenthNeasrestEnemyOf(), i dont know what these actually do, but im guessing it choses randomly from the ten closest enemies?

Fighter scripts... no point, i never use fighters

LOL, not quite playable as a movie, you still have to talk to people and tell your mage/sorc where to walk.

ADD] BTW, do you think this would work?

IF
ActionListEmpty() //not doing anything
!StateCheck(Myself,STATE_STONESKIN) //not stoneskin-ed
HaveSpell(WIZARD_STONESKIN) //have stonskin
THEN
RESPONSE#100 //always
Spell(Myself,WIZARD_STONESKIN) //cast stoneskin
END

[ 10-14-2002, 07:28 AM: Message edited by: White Lancer ]
__________________
It deons\'t mttaer waht oredr the ltteers in a wrod are, it olny mtaetrs taht the frsit and lsat ltteer be croecrt. The rset can be a tatol mses and you can sitll raed it. The huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
White Lancer is offline   Reply With Quote
Old 10-14-2002, 07:48 AM   #20
White Lancer
Drizzt Do'Urden
 

Join Date: August 30, 2002
Location: Australia
Age: 40
Posts: 628
*Evil Grin*

IF
ActionListEmpty()
See("Jahiera")
HPGt("Jahiera",0)
HaveSpell(WIZARD_FIRE_ARROW)
THEN
RESPONSE#100
Spell("Jahiera",WIZARD_FIRE_ARROW)
END

*Evil Grin*

BTW, found a list of item codes... go to shadow keeper, open the item browser, look to the far right... item codes! Spells are the same, just use the spell browser instead.
__________________
It deons\'t mttaer waht oredr the ltteers in a wrod are, it olny mtaetrs taht the frsit and lsat ltteer be croecrt. The rset can be a tatol mses and you can sitll raed it. The huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
White Lancer is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any modders out there? Froberg General Discussion 0 04-30-2005 01:31 PM
For all modders out there SecretMaster Miscellaneous Games (RPG or not) 6 11-27-2003 05:55 AM
Game question Tyrion Miscellaneous Games (RPG or not) 16 03-03-2003 11:58 AM
Sazerac or Memnoch plz read this...or DJG or any other modders FelixJaeger Baldurs Gate II: Shadows of Amn & Throne of Bhaal 9 07-16-2002 04:28 PM
End of game question Raptor Baldurs Gate II Archives 1 03-13-2001 08:51 PM


All times are GMT -4. The time now is 12:15 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved