Jump to content

turn_on_debug_mode( )


Recommended Posts

I have never used the debug mode either; but there are easier ways than the character editor to set sdfs. What I have found is that generally I wanted to set several sdf's to a particular set of values all at once; for instance, so that once I've tested and I'm sure that a quest works, I want to set all the flags as if I had done it, so that I don't have to do it over and over to test the next bit of the scenario. To that end, I made an item which when used presents a text entry box, and when you enter a number code into it, sets a group of flags to pedefined values. I then put the item right next to where the party starts, (I'll remove it in the final version of course.) and when I enter the scenario again, all I have to do is use this wand a couple of times and skip the first half of the scenario. Depending on what you want to set sdf's for, I think that this method might help.

 

EDIT: Thought I would post the code for that:

The item definition:

Code:
 begindefineitem 451;	clear;	it_name = "Wand of Debug";	it_full_name = "Wand of Debug";	it_inventory_icon = 8;	it_floor_which_sheet = 1045;	it_floor_which_icon = 9;	it_variety = 21;	it_ability_1 = 207;	it_ability_str_1 = 28;	it_identified = 1;	it_magic = 1; 
and the state the item calls:

Code:
 beginstate 28; //Wand of debug	reset_dialog();	add_dialog_choice(0,"Ok");	add_dialog_choice(1,"Cancel");	add_dialog_str(0,"A=All, 1=Camp Placing, 2=put base camp in clearing, 3=Visiting Village and Manor, 4=Notebook Quest, 5=1st Crystal Quest, 6=2nd Crystal Quest, Z=set off attack",0);	x = run_dialog(0);	if(x == 2)		end();	get_text_response("A or 1-6; other gives list");	y = 0;	check_text_response_match("A");	if(got_text_match())		y = 100;	check_text_response_match("1");	if(got_text_match())		y = 1;	check_text_response_match("2");	if(got_text_match())		y = 2;	check_text_response_match("3");	if(got_text_match())		y = 3;	//more checking for text matches, but I think you get the point	if((y == 1) || (y == 100)){		//set a bunch of flags	}	if((y == 2) || (y == 100)){		//set a bunch of flags	}	if((y == 3) || (y == 100)){		//set a bunch of flags	}	if((y == 4) || (y == 100)){		//set a bunch of flags	}	if((y == 5) || (y == 100)){		//set a bunch of flags	}	if((y == 6) || (y == 100)){		set_flag(204,1,1);		set_flag(205,3,1);	}	if(y == 100)		set_flag(5,9,2);	if(y==7)		set_flag(5,3,1);	if(y==0)		set_state_continue(28);break; 
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...