Jump to content

Issue with cr_level call


Callie

Recommended Posts

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;

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...