Jump to content


Issue with cr_level call


  • Please log in to reply
3 replies to this topic
Callie Callie

SuperCalliefragilisticexpialidocious

  • Member
    • Member ID: 4,904
  • 4,168 posts
  • LocationNevada, USA

Posted 26 January 2015 - 06:17 PM #1 Issue with cr_level call

I've run into an odd obstacle: importing a creature and increasing its level using the cr_level call prevents it from using spells.  The creature does have a custom script, but it's unable to use spells even when set to the basicnpc script.  I know the custom script works because I tested it on a normal good witch (the imported creature).  Once I remove the cr_level call, the creature uses spells normally (regardless of the creature script used).  What's wrong?

Here's the creature's definition in the scenario file:

begindefinecreature 241;
import = 82; //Good Witch
cr_name = "Tamara";
cr_level = 30;
cr_icon_adjust = 16;
cr_default_script = "tamara";
cr_hp_bonus = 500;

"I'm so glad you mentioned [goat heads] were weeds. I had never heard of them before, and thought maybe Excalibur lived in an area strewn with the heads of slaughtered goats. : p " - Tyranicus
Restless Souls - My first BoA scenario

Ishad Nha Ishad Nha

Hand of Avadon

  • Member
    • Member ID: 4,773
  • 2,366 posts

Posted 26 January 2015 - 11:27 PM #2 Issue with cr_level call

Try manually setting the spellcasting skill:
    cr_what_stat_adjust 0 = 11;
    cr_amount_stat_adjust 0 = 11;
This may or may not work.

Callie Callie

SuperCalliefragilisticexpialidocious

  • Member
    • Member ID: 4,904
  • 4,168 posts
  • LocationNevada, USA

Posted 27 January 2015 - 09:14 AM #3 Issue with cr_level call

That didn't work.  Thanks though.

Does the AI consider 11 mage low for a level 30 creature?  If I do set the level to 30, the creature will solely use melee attacks that only hit about 35 hp.
"I'm so glad you mentioned [goat heads] were weeds. I had never heard of them before, and thought maybe Excalibur lived in an area strewn with the heads of slaughtered goats. : p " - Tyranicus
Restless Souls - My first BoA scenario

BJearles BJearles

Shadowwalker

  • Member
    • Member ID: 7,126
  • 461 posts

Posted 27 January 2015 - 10:44 PM #4 Issue with cr_level call

I tried reproducing the error using the code you posted, but the creature was always able to use mage spells.  As far as I can tell, there shouldn't be any reason why yours can't.  Just changing the level doesn't affect the creature's mage spell skill.  The Good Witch creature you imported has its default strategy set to 1, so it should try to use ranged abilities like mage spells whenever possible.  The mage spell skill being high or low compared to the level of the creature should be irrelevant.
I can't fathom why cr_level should be causing this problem.  You could try removing it from the data script and instead putting in a set_level call in the INIT_STATE of the creature script.  It should look something like below.
beginstate INIT_STATE;
set_level(ME,30);
break;
Hopefully that will work.
-Benjamin




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users