The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

> Progress report (2011+)
aigleborgne
post May 27 2011, 06:39 AM
Post #1



Group Icon

Mod Developer
Posts: 210
Joined: 3-December 05




After all this years, it's good to start a new thread smile.gif

Side work:
- Monsters : preparation task (sort, group, and find stats) : 100%
- AI script (complete rework in progress) : 50%

Main component:
- BG1 Monsters : 10%
- BG2 Monsters : 0%
- BG1 Adventurers: 0%
- BG2 Adventurers: 0%

At this moment, it seems that I undo some of my previous work (compared to old progress report).
This is true, but it isn't the same quality, it is a lot higher now.

With my new own tools and material, I'll be able to work 5 times faster on main components later on and still get an overall better result.

This post has been edited by aigleborgne: Jun 22 2011, 06:41 AM
Go to the top of the page
 
Quote Post
 
Start new topic
Replies
aigleborgne
post Oct 30 2011, 10:17 AM
Post #2



Group Icon

Mod Developer
Posts: 210
Joined: 3-December 05




I am currently rebuilding my mage scripts with Spell Revision in mind.
I have many scripts, for each class and eventually for some kits if necessary. On top of that, for spellcasters, I do a script for each new spell level.
It is easier to select spell order this way, and depending on level, spell order can change. For example, magic missile is rather weak at level 1, but become great later on.

I have added doom to detectable spells. Priest will now cast doom before casting another spell.
For example, he want to cast hold spell. He checks a valid target (not disabled), then he checks a valid target affected by either Doom or Greater Malison.
If he found a target affected by doom, he cast hold. If not and if he has doom, he will cast it before hold.

This way, he makes a good use of doom spell. In fact, he will try to focus all spells after that. Doom can be seen as "focus on him". Althrough, target must be fill other criteria (like not beeing disable, ...)

By now, I have only done a few scripts : fighter (only one script) and druid level 1, 3, 5, 7.
I am testing druid script with Seniyad and Amarande and I am satisfied with current results.

I have tested SCS for these foes and don't like it at all. Yes, they are powerful and it is well done but there are several things I don't like:
- spellbooks are generated. It reminds me my old generator smile.gif It is a good way to quickly do all casters but it is a lot better to make a custom spellbook for each caster.
- scripts still cheat in some ways. Some spells are cast even if not memorized (Detect invisibility for example)
- scripts do many check for each spell : resistances, immunity... some may like it, some don't. I have added all checks in my mod, but they all depend on a parameter, it can be enable or disable.

It will take me some time to do all scripts. Cleric will be very closed to druid so it will be quick.
But mages are huge ! mage, bard, wild mage on one set, then all others on separate set.
Sorcerer will be the hardest and I don't know yet if I will put on them in game. My editor can build a sorcerer spellbook but I need a script dedicated and efficient.
Initially, I will do script to spell level 6 as it covers most spell casters. Then, I will add others when needed.

Below an example of a script before baf generation.
Java program uses an ini file for a few parameters and IMMUNITY_CHECK is one of them.
Globally, it is quite simple but the job is done.

CODE
// Druid
[CASTER=PRIEST]

[include=init_npc]

[include=tracking]

[include=potions]

[include=disable_spellcasting]

//[include=shapeshift_druid]

// Improved Invisibility
[action=SPELL(SPDR401,,75,notarget);require=*visible]

// Gust of Wind
[action=SPELL(SPPR318,,75,notarget,hit);require=range(6,attacker)]

// Cloak of Fear
[action=SPELL(CLERIC_CLOAK_OF_FEAR,,75);target=NearestEnemy(num:6);require=range(6),!disable,!fearImmunity]

// Neutralize poison
[action=SPELL(CLERIC_NEUTRALIZE_POISON,,,notarget);require=*state(STATE_POISONED)]

// Slow Poison
[action=SPELL(CLERIC_SLOW_POISON,,,notarget);require=*state(STATE_POISONED)]

// Cure Critical Wounds
[action=SPELL(CLERIC_CURE_SERIOUS_WOUNDS,,,notarget);require=*hp%lt(70),OR(*sanctuary,!seeEnemy,!hit)]

// Cure Moderate Wounds
[action=SPELL(SPPR215,,,notarget);require=*hp%lt(80),OR(*sanctuary,!seeEnemy,!hit)]

// Cure Light Wounds
[action=SPELL(CLERIC_CURE_LIGHT_WOUNDS,,,notarget);require=*hp%lt(90),OR(*sanctuary,!seeEnemy,!hit)]

// Strength of One
[action=SPELL(CLERIC_STRENGTH_OF_ONE,,75,notarget)]

// Death Ward
[action=SPELL(CLERIC_DEATH_WARD,,75,notarget)]

// Free action
[action=SPELL(CLERIC_FREE_ACTION,,75,notarget)]

// Woodland beings
[action=SPELL(CLERIC_CALL_WOODLAND_BEINGS,,75,notarget)]

// Animal Summoning 1
[action=SPELL(CLERIC_ANIMAL_SUMMONING_1,,75,notarget)]

// Totemic animals
[action=TIMER(ja#totemic,30),SPELL(SPCL621,,50,notarget)]

// Web
[action=SPELL(SPDR201,,75);require=!disable,!magicImmunity,!globe,!holdImmunity]

// Entangle  
[action=SPELL(CLERIC_ENTANGLE,,75);target=NearestEnemy(num:5);require=!disable,!magicImmunity,!globe]

// Ice Storm
[target=Summon(num:5);require=valid,!magicImmunity,!coldImmunity]
[action=SPELL(SPPR418,,75);target=Player;require=*resistCold,!magicImmunity,!coldImmunity]

// Fire Trap
[target=Summon(num:5);require=valid,!magicImmunity,!fireImmunity,!globe]
[action=SPELL(SPPR216,,75);target=Player;require=!magicImmunity,!fireImmunity,!globe]

// Dispel Magic
[action=SPELL(CLERIC_DISPEL_MAGIC,,75),RUN(30);target=Player;require=enchanted,!range(15)]

// Storm shield
[action=SPELL(SPPR322,,75,notarget)]

// Charm Person or Animal
[target=Fighter;require=valid,!disable,!magicImmunity,!globe,!charmImmunity]
[target=Fighter;require=valid,!disable,!magicImmunity,!globe,!charmImmunity,stat(1,WIZARD_GREATER_MALISON)]
[action=SPELL(CLERIC_DOOM,,75);require=!stat(1,WIZARD_GREATER_MALISON),!disable,!magicImmunity,!globe,!charmImmunity]
[action=SPELL(CLERIC_CHARM_PERSON,,75,fighter);require=!disable,!magicImmunity,!globe,!charmImmunity]

// Hold Person or Animal
[target=Player;require=!disable,!magicImmunity,!globe,!holdImmunity]
[target=Player;require=!disable,!magicImmunity,!globe,!holdImmunity,stat(1,WIZARD_GREATER_MALISON)]
[action=SPELL(CLERIC_DOOM,,75);require=!stat(1,WIZARD_GREATER_MALISON),!disable,!magicImmunity,!globe,!holdImmunity]
[action=SPELL(SPPR305,,75);require=!disable,!magicImmunity,!globe,!holdImmunity]

// Summon Insects
[target=Caster;require=valid,!disable,!silence,!failure,!magicImmunity,!globe]
[target=Caster;require=valid,!disable,!silence,!failure,!magicImmunity,!globe,stat(1,WIZARD_GREATER_MALISON)]
[action=SPELL(CLERIC_DOOM,,75);require=!stat(1,WIZARD_GREATER_MALISON),!disable,!silence,!failure,!magicImmunity,!globe]
[action=SPELL(CLERIC_SUMMON_INSECTS,,75,caster);require=!disable,!silence,!failure,!magicImmunity,!globe]

// Mistcast Magic
[action=SPELL(CLERIC_MISCAST_MAGIC,,75,caster);require=!disable,!silence,!failure,!magicImmunity,!globe]

// Contagion
[target=Fighter;require=valid,!disable,!magicImmunity,!globe]
[target=Fighter;require=valid,!disable,!magicImmunity,!globe,stat(1,WIZARD_GREATER_MALISON)]
[action=SPELL(CLERIC_DOOM,,75);require=!stat(1,WIZARD_GREATER_MALISON),!disable,!magicImmunity,!globe]
[action=SPELL(SPPR311,,75,fighter);target=Fighter;require=!disable,!magicImmunity,!globe]

// Select random target or doomed target
[target=Player;require=valid,!magicImmunity,!globe]
[target=Player;require=valid,!magicImmunity,!globe,stat(1,WIZARD_GREATER_MALISON)]
[action=SPELL(CLERIC_DOOM,,75);require=!stat(1,WIZARD_GREATER_MALISON),!magicImmunity,!globe]

// Poison
[action=SPELL(CLERIC_POISON,,75);require=!magicImmunity,!poisonImmunity]

// Call Lightning
[action=SPELL(CLERIC_CALL_LIGHTNING,,75);require=!magicImmunity,!globe,!electricityImmunity]

// Lightning Bolt
[action=SPELL(SPDR301,,75);require=!magicImmunity,!globe,!electricityImmunity]

// Bless
[action=SPELL(CLERIC_BLESS,,75,notarget)]

// Neutralize poison
[action=SPELL(CLERIC_NEUTRALIZE_POISON,,75,notarget)]

// Barkskin
[action=SPELL(CLERIC_BARKSKIN,,75,notarget)]

// Resist Fire and Cold
[action=SPELL(CLERIC_RESIST_FIRE,,75,notarget)]

// Armor of faith
[action=SPELL(CLERIC_ARMOR_OF_FAITH,,75,notarget);require=*stat(0,CLERIC_ARMOR_OF_FAITH)]

// Flame Blade
[action=SPELL(CLERIC_FLAME_BLADE,,75,notarget);require=!*magicalWeaponItem]

// Shillelagh
[action=SPELL(CLERIC_SHILLELAGH,,75,notarget);require=!*magicalWeaponItem]

// Strength of Stone
[action=SPELL(SPPR115,,75,notarget)]

// Know Opponent
[action=SPELL(SPPR209,,75);require=!magicImmunity,!globe]

// Faerie Fire
[action=SPELL(SPPR114,,75);require=!magicImmunity,!globe]

// Chromatic Orb
[action=SPELL(SPDR101,,75);require=!magicImmunity,!globe]

// Sunscorch
[action=SPELL(SPPR116,,75);require=!magicImmunity,!globe,!fireImmunity]

[action=WALK;require=*invisible]

[include=combat_smart_both]


A few explanations of code:
CODE
// Hold Person or Animal
[target=Player;require=!disable,!magicImmunity,!globe,!holdImmunity]
[target=Player;require=!disable,!magicImmunity,!globe,!holdImmunity,stat(1,WIZARD_GREATER_MALISON)]
[action=SPELL(CLERIC_DOOM,,75);require=!stat(1,WIZARD_GREATER_MALISON),!disable,!magicImmunity,!globe,!holdImmunity]
[action=SPELL(SPPR305,,75);require=!disable,!magicImmunity,!globe,!holdImmunity]

It randomly selects a valid target (no sanctuary or improved invisibility), not disable (charm, stun, fear, hold, fear...)
It randomly selects a valid target (no sanctuary or improved invisibility), not disable (charm, stun, fear, hold, fear...), and affected by doom or greater malison
If selected target is not affect by doom or greater malison and I have doom, 75% to cast doom
75% to cast Hold Person or Animal
Other attributes are used if IMMUNITY_CHECK is set to true.

It generates:
CODE
// Hold Person or Animal
IF
  OR(6)
    StateCheck(Player6,STATE_CHARMED)
    CheckStatGT(Player6,0,HELD)
    StateCheck(Player6,STATE_HARMLESS)
    StateCheck(Player6,STATE_CONFUSED)
    StateCheck(Player6,STATE_PANIC)
    RandomNumGT(1000,167)
  OR(6)
    StateCheck(Player5,STATE_CHARMED)
    CheckStatGT(Player5,0,HELD)
    StateCheck(Player5,STATE_HARMLESS)
    StateCheck(Player5,STATE_CONFUSED)
    StateCheck(Player5,STATE_PANIC)
    RandomNumGT(1000,200)
  OR(6)
    StateCheck(Player4,STATE_CHARMED)
    CheckStatGT(Player4,0,HELD)
    StateCheck(Player4,STATE_HARMLESS)
    StateCheck(Player4,STATE_CONFUSED)
    StateCheck(Player4,STATE_PANIC)
    RandomNumGT(1000,250)
  OR(6)
    StateCheck(Player3,STATE_CHARMED)
    CheckStatGT(Player3,0,HELD)
    StateCheck(Player3,STATE_HARMLESS)
    StateCheck(Player3,STATE_CONFUSED)
    StateCheck(Player3,STATE_PANIC)
    RandomNumGT(1000,333)
  OR(6)
    StateCheck(Player2,STATE_CHARMED)
    CheckStatGT(Player2,0,HELD)
    StateCheck(Player2,STATE_HARMLESS)
    StateCheck(Player2,STATE_CONFUSED)
    StateCheck(Player2,STATE_PANIC)
    RandomNumGT(1000,500)
  OR(5)
    StateCheck(Player1,STATE_CHARMED)
    CheckStatGT(Player1,0,HELD)
    StateCheck(Player1,STATE_HARMLESS)
    StateCheck(Player1,STATE_CONFUSED)
    StateCheck(Player1,STATE_PANIC)
THEN
  RESPONSE #100
    Continue()
END

IF
  OR(7)
    StateCheck(Player6,STATE_CHARMED)
    CheckStatGT(Player6,0,HELD)
    StateCheck(Player6,STATE_HARMLESS)
    StateCheck(Player6,STATE_CONFUSED)
    StateCheck(Player6,STATE_PANIC)
    !CheckStat(Player6,1,WIZARD_GREATER_MALISON)
    RandomNumGT(1000,167)
  OR(7)
    StateCheck(Player5,STATE_CHARMED)
    CheckStatGT(Player5,0,HELD)
    StateCheck(Player5,STATE_HARMLESS)
    StateCheck(Player5,STATE_CONFUSED)
    StateCheck(Player5,STATE_PANIC)
    !CheckStat(Player5,1,WIZARD_GREATER_MALISON)
    RandomNumGT(1000,200)
  OR(7)
    StateCheck(Player4,STATE_CHARMED)
    CheckStatGT(Player4,0,HELD)
    StateCheck(Player4,STATE_HARMLESS)
    StateCheck(Player4,STATE_CONFUSED)
    StateCheck(Player4,STATE_PANIC)
    !CheckStat(Player4,1,WIZARD_GREATER_MALISON)
    RandomNumGT(1000,250)
  OR(7)
    StateCheck(Player3,STATE_CHARMED)
    CheckStatGT(Player3,0,HELD)
    StateCheck(Player3,STATE_HARMLESS)
    StateCheck(Player3,STATE_CONFUSED)
    StateCheck(Player3,STATE_PANIC)
    !CheckStat(Player3,1,WIZARD_GREATER_MALISON)
    RandomNumGT(1000,333)
  OR(7)
    StateCheck(Player2,STATE_CHARMED)
    CheckStatGT(Player2,0,HELD)
    StateCheck(Player2,STATE_HARMLESS)
    StateCheck(Player2,STATE_CONFUSED)
    StateCheck(Player2,STATE_PANIC)
    !CheckStat(Player2,1,WIZARD_GREATER_MALISON)
    RandomNumGT(1000,500)
  OR(6)
    StateCheck(Player1,STATE_CHARMED)
    CheckStatGT(Player1,0,HELD)
    StateCheck(Player1,STATE_HARMLESS)
    StateCheck(Player1,STATE_CONFUSED)
    StateCheck(Player1,STATE_PANIC)
    !CheckStat(Player1,1,WIZARD_GREATER_MALISON)
THEN
  RESPONSE #100
    Continue()
END

IF
  HaveSpell(CLERIC_DOOM)
  Global("ja#disable_spellcasting","LOCALS",0)
  !GlobalTimerNotExpired("ja#round","LOCALS")
  !CheckStatGT(LastSeenBy(Myself),0,SANCTUARY)
  !StateCheck(LastSeenBy(Myself),STATE_IMPROVEDINVISIBILITY)
  !General(LastSeenBy(Myself),WEAPON)
  See(LastSeenBy(Myself))
  !CheckStat(LastSeenBy(Myself),1,WIZARD_GREATER_MALISON)
  !CheckStatGT(LastSeenBy(Myself),0,HELD)
  !StateCheck(LastSeenBy(Myself),STATE_HARMLESS)
  !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
  !StateCheck(LastSeenBy(Myself),STATE_PANIC)
  RandomNumGT(100,25)
THEN
  RESPONSE #100
    SetGlobalTimer("ja#round","LOCALS",6)
    Spell(LastSeenBy(Myself),CLERIC_DOOM)
END

IF
  HaveSpellRES("SPPR305")
  Global("ja#disable_spellcasting","LOCALS",0)
  !GlobalTimerNotExpired("ja#round","LOCALS")
  !CheckStatGT(LastSeenBy(Myself),0,SANCTUARY)
  !StateCheck(LastSeenBy(Myself),STATE_IMPROVEDINVISIBILITY)
  !General(LastSeenBy(Myself),WEAPON)
  See(LastSeenBy(Myself))
  !CheckStatGT(LastSeenBy(Myself),0,HELD)
  !StateCheck(LastSeenBy(Myself),STATE_HARMLESS)
  !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
  !StateCheck(LastSeenBy(Myself),STATE_PANIC)
  RandomNumGT(100,25)
THEN
  RESPONSE #100
    SetGlobalTimer("ja#round","LOCALS",6)
    SpellRES("SPPR305",LastSeenBy(Myself))
END


This post has been edited by aigleborgne: Oct 30 2011, 01:18 PM
Go to the top of the page
 
Quote Post

Posts in this topic
aigleborgne   Progress report (2011+)   May 27 2011, 06:39 AM
aigleborgne   Currently on Death Knight (aka Demon Knight). It i...   Jun 22 2011, 06:46 AM
aigleborgne   Haven't finished Death Knight tonight finally ...   Jun 22 2011, 09:17 PM
aigleborgne   Not many updates these days, I'm pretty tired ...   Jul 5 2011, 06:36 PM
aigleborgne   I'm back in modding! Finally, I didn't...   Sep 5 2011, 11:57 AM
Salk   Nice to see you back in action! :thumb:   Sep 9 2011, 12:31 PM
aigleborgne   Hello, Already late, but I have 3 weeks at home r...   Sep 20 2011, 08:09 AM
aigleborgne   I have definitly finished and tested 2 monsters: -...   Sep 30 2011, 10:09 AM
aigleborgne   Now finished: - Bear - Crawler - Cat - Dog - Const...   Oct 2 2011, 11:53 AM
aigleborgne   I have finished to test and package all monsters u...   Oct 4 2011, 02:16 PM
aigleborgne   Back to work, so less time to mod. Right now, I en...   Oct 12 2011, 06:53 PM
aigleborgne   aTweaks is gonna make enhanced monsters obsolete, ...   Oct 25 2011, 10:05 PM
aigleborgne   After long considerations, I confirm that my mod w...   Oct 26 2011, 06:06 PM
aigleborgne   I am currently rebuilding my mage scripts with Spe...   Oct 30 2011, 10:17 AM
aigleborgne   I have finished all cleric and druid scripts. For ...   Nov 1 2011, 12:58 PM
aigleborgne   I have finished mage spellbooks up to spell level ...   Nov 5 2011, 08:58 AM
aigleborgne   I was busy on my real life last month but I found ...   Dec 27 2011, 06:36 PM
aigleborgne   I am highly motivated these days and I even work o...   Dec 29 2011, 07:43 AM
Salk   These are great news, aigleborgne! Thanks for...   Dec 29 2011, 09:18 AM
aigleborgne   Yeah, I gave up Divine Remix too. Regarding SR, I ...   Dec 29 2011, 06:10 PM
aigleborgne   I still plan to release something this week-end. I...   Jan 5 2012, 09:08 PM
aigleborgne   This is it, first release is done :) Next release...   Jan 7 2012, 06:51 PM
aigleborgne   I have migrated all monster scripts and while it i...   Jan 11 2012, 06:10 PM
Salk   The script looks really neat! And great news ...   Jan 12 2012, 11:28 AM
aigleborgne   I've finished my refactoring. I've started...   Jan 17 2012, 07:20 AM
aigleborgne   Things are doing well :) I've finished several...   Jan 23 2012, 12:59 PM
aigleborgne   I'm glad to have time to work on my project th...   Feb 3 2012, 12:27 PM
aigleborgne   I'm closed to release alpha v0.2. Only 2 monst...   Feb 10 2012, 07:23 AM
aigleborgne   Before finishing Hobgobelin and Kobold, I'm do...   Feb 15 2012, 12:29 PM
aigleborgne   Hard Times is now part of my install. I have spent...   Feb 20 2012, 12:08 PM
aigleborgne   I have worked a bit these last weeks and I have do...   Mar 12 2012, 01:10 PM
Salk   Sounds good. In BG1 Ogra Mages were rather scary a...   Mar 14 2012, 03:53 PM
aigleborgne   I have almost finished all ogres (will be finished...   Mar 26 2012, 12:05 PM
Salk   This update is really interesting. Ogres are some...   Apr 5 2012, 03:18 PM
aigleborgne   This update is really interesting. Ogres are some...   Apr 7 2012, 07:28 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 2nd August 2025 - 09:15 AM