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 comment
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 comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...