Jump to content

Debug Functions


Recommended Posts

Now that BoE is open source we have had the opportunity to create proper debug functions for scenario designers.

In BoA there is a debug call but it does not do everything. Here is one approach to giving an item, this approach does not require you to break off the game, go to the Character Editor, save and then reload.

 

beginstate 26;

get_text_response("Choose a letter: ");

check_text_response_match("I");

if (got_text_match())

set_state_continue(136);

break;

 

beginstate 136;

i = 0;

while (i < 3) {

get_text_response("Give Item, what digit: 0 - 9?");

check_text_response_match("0");

if (got_text_match()){

set_flag(200,i,0);

}

check_text_response_match("1");

if (got_text_match()){

set_flag(200,i,1);

}

check_text_response_match("2");

if (got_text_match()){

set_flag(200,i,2);

}

check_text_response_match("3");

if (got_text_match()){

set_flag(200,i,3);

}

check_text_response_match("4");

if (got_text_match()){

set_flag(200,i,4);

}

check_text_response_match("5");

if (got_text_match()){

set_flag(200,i,5);

}

check_text_response_match("6");

if (got_text_match()){

set_flag(200,i,6);

}

check_text_response_match("7");

if (got_text_match()){

set_flag(200,i,7);

}

check_text_response_match("8");

if (got_text_match()){

set_flag(200,i,8);

}

check_text_response_match("9");

if (got_text_match()){

set_flag(200,i,9);

}

i = i + 1;

}

 

a = 100 * get_flag(200,0) + 10 * get_flag(200,1) + get_flag(200,2);

reward_give(a);

reward_give(a);

break;

 

This approach can be customized, for example if you want to choose which outdoor section the party will visit next. You would have a change outdoor location added to all exit specials of a town, the x and y values would be SDFs, then in the scenario script the while clause would set the two flags concerned. It would take effect when party exits the town. The party can move between towns at will via this method.

 

Edit:

Insert this into your Scenario script. You can use any state number that you like.

 

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