Jump to content

PC Abilities


BainIhrno

Recommended Posts

You're gonna have to define them in the scenario script, as usual yeah, but it might be possible not to give the player charges in the skill until later into the scenario, either through the use of SDFs, or even just regular code triggered by other scripts.

 

Of course, there's a quick way for you to find out - just add a node in a town script somewhere that adds charges of a special ability to a PC, and trigger it. If the PC gets can now use the ability, then they can be added whenever (and its been a long while but I'm pretty sure this is the case).

Link to comment
Share on other sites

I have another question - will the init_special_abil call work outside of the scenario script? In other words, can you have custom abilities in your scenario that you don't start out with?

To have custom abilities in your scenario that you don't start out with, init them in the LOAD_SCEN_STATE as usual, but don't call change_custom_abil_uses() until whenever you want the characters to have the ability. You can use the latter call whenever you want.

Link to comment
Share on other sites

Er, small problem. Custom abilities don't take targets. Items take targets. In Exodus, the way I made special spells that damaged enemies that the player selected was through a spellbook item, not through a special ability. (I had a special ability to make the spellbook, in case the player inadvertently dropped the spellbook.) It may be possible to have a custom ability that damages a specific enemy or damages enemies near the party or something like that, but you can't get a custom ability to target a specific enemy.

 

Thus, make an item that takes a target and calls a scenario special (item ability 219). Then, in that special use a damage_char() call with a who_is_custom_item_target() call. Set the appropriate amount of damage and the damage type, and you're done.

Link to comment
Share on other sites

  • 1 month later...

Okay, I'm having another problem with this. I've tested 'ability 3' and it isn't working properly.

 

 

 

 

 

init_special_abil(3,"Natural Wounding",111);

 

beginstate 111;

play_sound(25);

print_str_color("A ball of energy conjures in your hand.",4);

char_give_item(who_used_custom_abil(),465);

c = what_day_of_scenario();

f = who_used_custom_abil();

set_flag(200,9,1);

 

 

break;

 

 

For some reason, however, the game doesn't actually call state 111 when the ability is used. It just gives me a special item.

 

EDIT: Nevermind, the scenario script doesn't go past 100.

Link to comment
Share on other sites

You can actually use Scenario states from 120 onwards, if they are called by a state in the range from 10 to 100.

BoA Editor documentation lists certain reserved state numbers:

INIT_STATE (equal to 0)

DEAD_STATE (equal to 1)

START_STATE (equal to 2)

EXIT_STATE (equal to 1)

START_SCEN_STATE (equal to 111)

SEARCH_STATE (equal to 100)

TALKING_STATE (equal to 110)

UNLOCK_SPELL_STATE (equal to 101)

SANCTIFICATION_STATE (equal to 102)

LOAD_SCEN_STATE (equal to 0)

BLOCK_MOVE_STATE (equal to 112)

DISPEL_BARRIER_STATE (equal to 113)

STEP_INTO_SPOT_STATE (equal to 114)

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...