23 #if defined _MSC_VER && _MSC_VER < 1600
783 "TARGET_MONITOR_EXTRA_DATA",
784 "TARGET_SHIELD_ICON",
785 "PLAYER_SHIELD_ICON",
793 "AFTERBURNER_ENERGY",
795 "WEAPON_LINKING_GAUGE",
797 "OFFSCREEN_INDICATOR",
801 "MISSILE_WARNING_ARROW",
803 "OBJECTIVES_NOTIFY_GAUGE",
807 "ATTACKING TARGET COUNT",
842 #define SEXP_NODE_INCREMENT 250
865 #define SEO_DECAY_TIME 1
866 #define SEO_DAMPING 2
881 #define EO_INNER_RADIUS 2
882 #define EO_OUTER_RADIUS 3
883 #define EO_SHOCKWAVE_SPEED 4
884 #define EO_DEATH_ROLL_TIME 5
886 char *
Explosion_option[] = {
"damage",
"blast",
"inner radius",
"outer radius",
"shockwave speed",
"death roll time" };
923 #define NO_OPERATOR_INDEX_DEFINED -2
924 #define NOT_A_SEXP_OPERATOR -1
931 #define SEXP_HUD_GAUGE_WARPOUT "warpout"
987 if (this->
next != NULL) {
1001 while (this->
next != NULL)
1032 return (this->
next == NULL);
1038 if (Num_sexp_nodes == 0 || Sexp_nodes == NULL)
1041 nprintf((
"SEXP",
"Reinitializing sexp nodes...\n"));
1042 nprintf((
"SEXP",
"Entered function with %d nodes.\n", Num_sexp_nodes));
1046 int i, last_persistent_node = -1;
1051 last_persistent_node =
i;
1056 nprintf((
"SEXP",
"Last persistent node index is %d.\n", last_persistent_node));
1059 if (last_persistent_node == -1)
1069 Num_sexp_nodes = (last_persistent_node + 1);
1073 Verify(Sexp_nodes != NULL);
1076 nprintf((
"SEXP",
"Exited function with %d nodes.\n", Num_sexp_nodes));
1079 static void sexp_nodes_close()
1082 if (Sexp_nodes != NULL)
1093 Sexp_replacement_arguments.clear();
1094 Sexp_applicable_argument_list.
expunge();
1095 Sexp_current_argument_nesting_level = 0;
1098 static bool done_sexp_atexit =
false;
1099 if (!done_sexp_atexit)
1101 atexit(sexp_nodes_close);
1102 done_sexp_atexit =
true;
1137 if (node == Num_sexp_nodes || node == -1)
1147 Verify(Sexp_nodes != NULL);
1148 nprintf((
"SEXP",
"Bumping dynamic sexp node limit from %d to %d...\n", old_size, Num_sexp_nodes));
1162 strcpy_s(Sexp_nodes[node].text, text);
1166 Sexp_nodes[node].
rest = rest;
1174 static int Sexp_hwm = 0;
1178 int i,
f = 0,
p = 0;
1188 if (Num_sexp_nodes - f > Sexp_hwm)
1190 nprintf((
"Sexp",
"Sexp nodes: Free=%d, Used=%d, Persistent=%d\n", f, Num_sexp_nodes - f,
p));
1191 Sexp_hwm = Num_sexp_nodes -
f;
1205 if (Num_sexp_nodes == 0 || Sexp_nodes == NULL)
1253 Sexp_nodes[
n].
type &= ~SEXP_FLAG_PERSISTENT;
1264 Assert((num >= 0) && (num < Num_sexp_nodes));
1285 Assert((num >= 0) && (num < Num_sexp_nodes));
1299 i = Sexp_nodes[
i].
rest;
1305 if (Sexp_nodes[i].
first == num)
1306 Sexp_nodes[
i].
first = rest;
1308 if (Sexp_nodes[i].rest == num)
1309 Sexp_nodes[
i].
rest = rest;
1332 i = Sexp_nodes[
i].
rest;
1360 (Sexp_nodes[node].
first == node) ||
1361 (Sexp_nodes[node].rest == node)) {
1366 if (Sexp_nodes[node].
first != -1){
1369 if (Sexp_nodes[node].rest != -1){
1381 int cur,
first, rest;
1390 cur =
alloc_sexp(Sexp_nodes[node].text, Sexp_nodes[node].
type, Sexp_nodes[node].
subtype, first, rest);
1410 if ((node1 == -1) && (node2 == -1)){
1414 if ((node1 == -1) || (node2 == -1)){
1419 if (
stricmp(Sexp_nodes[node1].text, Sexp_nodes[node2].text)){
1427 if (!
cmp_sexp_chains(Sexp_nodes[node1].rest, Sexp_nodes[node2].rest)){
1465 if (Sexp_nodes[i].
first == num)
1479 Assert((node >= 0) && (node < Num_sexp_nodes));
1497 if (Sexp_nodes[i].rest == node)
1501 if (i == Num_sexp_nodes)
1519 Assert((node >= 0) && (node < Num_sexp_nodes));
1529 if ((Sexp_nodes[i].
first == node) || (Sexp_nodes[i].rest == node))
1546 while (
CAR(n) != arg)
1564 Assertion(token != NULL,
"get_operator_index(char*) called with a null token; get a coder!\n");
1567 if (!
stricmp(token, Operators[i].text)){
1580 Assertion(node >= 0 && node < Num_sexp_nodes,
"Passed an out-of-range node index (%d) to get_operator_index(int)!", node);
1624 for ( ; n != -1; n =
CDR(n))
1642 if (count < Operators[op].min || count > Operators[op].max)
1660 int i = 0,
z,
t,
type, argnum = 0,
count, op, type2 = 0, op2;
1665 Assert(node >= 0 && node < Num_sexp_nodes);
1670 if (Sexp_nodes[node].rest != -1)
1678 *bad_node = op_node;
1701 else if (
z != return_type)
1718 node = Sexp_nodes[op_node].
rest;
1719 while (node != -1) {
1726 i = Sexp_nodes[node].
first;
1802 i = atoi(
CTEXT(node));
1805 if ( (argnum == 2) && (i < 1) )
1811 if ( i < 0 || i > 255)
1819 if ( (i < 0) || (i > 200) )
1848 node = Sexp_nodes[node].
rest;
1962 if (!strcmp (
"<all fighters>",
CTEXT(node))) {
2009 int shipnum,ship_class;
2041 ship_index =
CDR(
CDR(op_node));
2046 ship_index =
CDR(op_node);
2065 ship_index =
CDR(op_node);
2069 shipname =
CTEXT(ship_index);
2104 for (i=0; i<
Ship_info[ship_class].n_subsystems; i++)
2112 if (i ==
Ship_info[ship_class].n_subsystems)
2142 if (i == SUBSYSTEM_MAX)
2190 if (i == Num_ai_classes)
2211 if (i == MAX_ARRIVAL_NAMES)
2232 if (i == MAX_DEPARTURE_NAMES)
2292 if (i == Num_soundtracks)
2306 if (!
stricmp(name,
"<no anchor>"))
2338 if (!
stricmp(
CTEXT(node),
"<species support ship class>"))
2350 i = std::distance(
Ship_info.cbegin(), it);
2410 int ship_num, ship2,
w = 0;
2422 *bad_node = Sexp_nodes[op_node].
rest;
2430 z = Sexp_nodes[node].
first;
2433 if (ship_num >= 0) {
2446 if ((
z ==
OP_AI_DOCK) && (Sexp_nodes[node].rest >= 0)) {
2455 z = Sexp_nodes[node].
first;
2490 if (i == Num_messages)
2624 if ( i == Num_mission_events )
2636 int ship_num, model;
2656 *bad_node = Sexp_nodes[
z].
rest;
2680 int ship_num, model;
2686 for (i = 0; i < 3; i++)
2687 z = Sexp_nodes[
z].rest;
2697 *bad_node = Sexp_nodes[op_node].
rest;
2718 if (*
CTEXT(node) !=
'#') {
2740 if (i == Num_personas) {
2821 if (i == Num_fonts) {
2895 if ( i == NUM_SKILL_LEVELS )
2908 if ( i == Num_medals )
2922 if ( i == Num_weapon_types )
2943 if ( i == Intel_info_size )
2957 if ( i == NUM_TURRET_ORDER_TYPES )
3039 if ( i == NUM_HUD_GAUGES )
3063 if ( i == Num_skybox_flags )
3080 if ( var_index == -1) {
3084 switch (Operators[op].
value)
3130 char *gauge =
CTEXT(node);
3148 int num_banks = atoi(
CTEXT(node));
3186 node = Sexp_nodes[node].
rest;
3201 formatted = formatted_pre+1;
3203 formatted = formatted_pre;
3206 end_index = strcspn(formatted,
"[");
3208 strncpy(unformatted, formatted, end_index);
3209 unformatted[end_index] =
'\0';
3227 Assert(sexp_var_index != -1);
3228 sprintf(text,
"%d", sexp_var_index);
3242 if (arg_handler_node < 0)
3246 for (n =
CDR(arg_handler_node); n != -1; n =
CDR(n))
3248 preloader(
CTEXT(n));
3255 preloader(
CTEXT(arg_node));
3313 while (*
Mp !=
')') {
3327 else if (*
Mp ==
'\"') {
3328 int len = strcspn(
Mp + 1,
"\"");
3330 if (*(
Mp + 1 + len) !=
'\"') {
3331 Error(
LOCATION,
"Unexpected end of quoted string embedded in sexp!");
3347 strncpy(variable_token,
Mp + 2, length);
3348 variable_token[
length] = 0;
3359 strncpy(token,
Mp + 1, len);
3395 token[len++] = *
Mp++;
3400 if (!
stricmp(token,
"set-ship-position"))
3401 strcpy_s(token,
"set-object-position");
3402 else if (!
stricmp(token,
"set-ship-facing"))
3403 strcpy_s(token,
"set-object-facing");
3404 else if (!
stricmp(token,
"set-ship-facing-object"))
3405 strcpy_s(token,
"set-object-facing-object");
3406 else if (!
stricmp(token,
"ai-chase-any-except"))
3408 else if (!
stricmp(token,
"change-ship-model"))
3409 strcpy_s(token,
"change-ship-class");
3410 else if (!
stricmp(token,
"radar-set-max-range"))
3411 strcpy_s(token,
"hud-set-max-targeting-range");
3412 else if (!
stricmp(token,
"ship-subsys-vanished"))
3413 strcpy_s(token,
"ship-subsys-vanish");
3414 else if (!
stricmp(token,
"directive-is-variable"))
3415 strcpy_s(token,
"directive-value");
3416 else if (!
stricmp(token,
"variable-array-get"))
3417 strcpy_s(token,
"get-variable-by-index");
3418 else if (!
stricmp(token,
"variable-array-set"))
3419 strcpy_s(token,
"set-variable-by-index");
3439 Sexp_nodes[last].
rest = node;
3467 int n, parent, arg_handler = -1;
3474 arg_handler =
CADR(parent);
3529 else if (atoi(
CTEXT(n)) == 1)
3569 int id = atoi(Sexp_nodes[
CDR(n)].text);
3572 sprintf(xstr,
"XSTR(\"%s\", %d)", Sexp_nodes[n].text,
id);
3574 memset(Sexp_nodes[n].text, 0,
NAME_LENGTH*
sizeof(
char));
3607 error_display(1,
"Reading sexp variable list. Found [%c]. Expecting '('.\n", *
Mp);
3614 while (*
Mp !=
')') {
3634 if (!
stricmp(str_type,
"number")) {
3636 }
else if (!
stricmp(str_type,
"string")) {
3638 }
else if (!
stricmp(str_type,
"block")) {
3645 Error(
LOCATION,
"SEXP variable '%s' is an unknown type!", var_name);
3681 Error(
LOCATION,
"Error parsing sexp variables - unknown persistence type encountered. You can continue from here without trouble.");
3716 *index = current_index;
3722 *index = current_index;
3731 bool already_added =
false;
3732 int num_sexp_variables;
3736 Num_special_expl_blocks = 0;
3751 if (current_index < num_sexp_variables) {
3757 if (!already_added) {
3766 for (i = current_index; i < (current_index +
BLOCK_EXP_SIZE); i++ ) {
3770 Num_special_expl_blocks++;
3787 Assert( (node >= 0) && (node < Num_sexp_nodes) );
3792 Assertion(sexp_variables_index != -1,
"Couldn't find variable: %s\n", Sexp_nodes[node].text);
3797 Assert(Sexp_variables[sexp_variables_index].
type & SEXP_VARIABLE_NUMBER);
3802 sprintf(dest,
"%s[%s] ", Sexp_nodes[node].text, Sexp_variables[sexp_variables_index].text);
3804 sprintf(dest,
"%s[%s] ", Sexp_variables[sexp_variables_index].variable_name, Sexp_variables[sexp_variables_index].text);
3809 sprintf(dest,
"@%s[%s] ", Sexp_nodes[node].text, Sexp_variables[sexp_variables_index].text);
3814 Assert(Sexp_variables[sexp_variables_index].
type & SEXP_VARIABLE_STRING);
3819 sprintf(dest,
"%s[%s] ", Sexp_variables[sexp_variables_index].variable_name, Sexp_variables[sexp_variables_index].text);
3821 sprintf(dest,
"%s[%s] ", Sexp_nodes[node].text, Sexp_variables[sexp_variables_index].text);
3826 sprintf(dest,
"\"@%s[%s]\" ", Sexp_nodes[node].text, Sexp_variables[sexp_variables_index].text);
3842 int node, old_length = accumulator.length();
3844 accumulator +=
"( ";
3846 while (node != -1) {
3847 Assert(node >= 0 && node < Num_sexp_nodes);
3848 if (Sexp_nodes[node].
first == -1) {
3857 node = Sexp_nodes[node].
rest;
3860 accumulator +=
") ";
3861 if ((accumulator.length() - old_length) > 40) {
3862 accumulator.resize(old_length);
3873 int i, flag = 0, node;
3875 accumulator +=
"( ";
3877 while (node != -1) {
3880 for (i=0; i<level + 1; i++)
3885 Assert(node >= 0 && node < Num_sexp_nodes);
3886 if (Sexp_nodes[node].
first == -1) {
3894 accumulator +=
"\n";
3895 node = Sexp_nodes[node].
rest;
3898 for (i=0; i<
level; i++)
3906 if (cur_node >= 0) {
3924 int sindex, np_index = -1;
3943 if(
Ships[sindex].objnum >= 0) {
3948 if (test_respawns && np_index < 0) {
3951 if (p_objp != NULL) {
3978 if (
Ships[sindex].objnum < 0) {
3982 shipp = &
Ships[sindex];
3999 if ((i >= 0) && (
Wings[i].num_waves >= 0) && !
Wings[i].total_arrived_count){
4012 if (
CAR(n) != -1) {
4022 sum = atoi(
CTEXT(n) );
4024 while (
CDR(n) != -1) {
4045 if (Sexp_nodes[n].
first != -1)
4048 sum = atoi(
CTEXT(n));
4050 while (
CDR(n) != -1) {
4064 if (Sexp_nodes[n].
first != -1)
4067 sum = atoi(
CTEXT(n));
4069 while (Sexp_nodes[n].rest != -1) {
4071 n = Sexp_nodes[
n].
rest;
4083 if (Sexp_nodes[n].
first != -1)
4086 sum = atoi(
CTEXT(n));
4088 while (Sexp_nodes[n].rest != -1) {
4089 int div =
eval_sexp(Sexp_nodes[n].rest);
4090 n = Sexp_nodes[
n].
rest;
4092 Warning(
LOCATION,
"Division by zero in sexp. Please check all uses of the / operator for possible causes.\n");
4108 if (Sexp_nodes[n].
first != -1)
4111 sum = atoi(
CTEXT(n));
4113 while (Sexp_nodes[n].rest != -1) {
4114 sum = sum %
eval_sexp(Sexp_nodes[n].rest);
4115 n = Sexp_nodes[
n].
rest;
4135 return (low +
rand32() % (diff + 1));
4147 int temp, min_val = INT_MAX;
4165 int temp, max_val = INT_MIN;
4183 int num = 0, avg_val = 0;
4193 return (
int) floor(((
double) avg_val / num) + 0.5);
4205 Warning(
LOCATION,
"Power function pow(%d, %d) attempted to raise to a negative power!", num_1, num_2);
4209 double pow_result = pow(static_cast<double>(num_1), num_2);
4211 if (pow_result > static_cast<double>(INT_MAX))
4213 nprintf((
"SEXP",
"Power function pow(%d, %d) is greater than INT_MAX! Returning INT_MAX.", num_1, num_2));
4216 else if (pow_result < static_cast<double>(INT_MIN))
4218 nprintf((
"SEXP",
"Power function pow(%d, %d) is less than INT_MIN! Returning INT_MIN.", num_1, num_2));
4222 return static_cast<int>(pow_result);
4247 if (bit_index < 0 || bit_index > 31)
4249 Warning(
LOCATION,
"Bit index %d out of range! Must be between 0 and 31.", bit_index);
4254 return val | (1<<bit_index);
4256 return val & ~(1<<bit_index);
4265 if (bit_index < 0 || bit_index > 31)
4267 Warning(
LOCATION,
"Bit index %d out of range! Must be between 0 and 31.", bit_index);
4271 if (val & (1<<bit_index))
4305 return result & INT_MAX;
4317 int low, high, rand_num, seed;
4329 return atoi(
CTEXT(n));
4351 sprintf(Sexp_nodes[n].text,
"%d", rand_num);
4384 result |= atoi(
CTEXT(n));
4386 while (
CDR(n) != -1)
4424 result &= atoi(
CTEXT(n));
4426 while (
CDR(n) != -1)
4431 result &= new_result;
4467 result &= atoi(
CTEXT(n));
4476 while (
CDR(n) != -1)
4481 if ( next_result && !result )
4483 result &= next_result;
4524 result = atoi(
CTEXT(n));
4534 for (
int n = node;
n != -1;
n =
CDR(
n))
4540 return (num_true == 1);
4548 int first_number =
eval_sexp(first_node);
4552 if (
CAR(first_node) != -1)
4557 if (
CDR(first_node) != -1)
4564 for (current_node =
CDR(first_node); current_node != -1; current_node =
CDR(current_node))
4567 if (
CAR(current_node) != -1)
4572 if (
CDR(current_node) != -1)
4578 current_number =
eval_sexp(current_node);
4584 if (first_number != current_number)
return SEXP_FALSE;
4588 if (first_number == current_number)
return SEXP_FALSE;
4592 if (first_number <= current_number)
return SEXP_FALSE;
4596 if (first_number < current_number)
return SEXP_FALSE;
4600 if (first_number >= current_number)
return SEXP_FALSE;
4604 if (first_number > current_number)
return SEXP_FALSE;
4623 char *first_string =
CTEXT(first_node);
4626 for (current_node =
CDR(first_node); current_node != -1; current_node =
CDR(current_node))
4628 val = strcmp(first_string,
CTEXT(current_node));
4651 #define OSWPT_TYPE_NONE 0
4652 #define OSWPT_TYPE_SHIP 1
4653 #define OSWPT_TYPE_WING 2
4654 #define OSWPT_TYPE_WAYPOINT 3
4655 #define OSWPT_TYPE_SHIP_ON_TEAM 4 // e.g. <any friendly>
4656 #define OSWPT_TYPE_WHOLE_TEAM 5 // e.g. Friendly
4657 #define OSWPT_TYPE_PARSE_OBJECT 6 // a "ship" that hasn't arrived yet
4658 #define OSWPT_TYPE_EXITED 7
4659 #define OSWPT_TYPE_WING_NOT_PRESENT 8 // a wing that hasn't arrived yet or is between waves
4704 if (set_parse_flag_too) {
4719 int team, ship_num, wing_num;
4724 Assert(object_name != NULL);
4759 if (!set_parse_flag_too) {
4789 oswpt->
wingp = wingp;
4809 oswpt->
wingp = wingp;
4818 if ((wpt != NULL) && (wpt->
get_objnum() >= 0))
4872 switch (oswpt1.
type){
4968 int count, num_destroyed, wing_index;
4990 if ( latest_time && (time > *latest_time) )
4991 *latest_time = time;
5007 if (
Wings[wing_index].current_wave <
Wings[wing_index].num_waves )
5011 if ( count == num_destroyed )
5022 char *ship_name, *subsys_name;
5026 ship_name =
CTEXT(n);
5049 int count, num_arrived;
5060 if ( latest_time && (time > *latest_time) )
5061 *latest_time = time;
5066 if ( count == num_arrived )
5078 int count, num_departed;
5096 if ( latest_time && (time > *latest_time) )
5097 *latest_time = time;
5102 if ( count == num_departed )
5114 int count, num_disabled;
5132 if ( latest_time && (time > *latest_time) )
5133 *latest_time = time;
5138 if ( count == num_disabled )
5149 char *ship_name, *waypoint_name;
5151 ship_name =
CTEXT(n);
5177 int count, num_disarmed;
5195 if ( latest_time && (time > *latest_time) )
5196 *latest_time = time;
5201 if ( count == num_disarmed )
5241 char* destroyer_ship_name;
5242 char* destroyed_ship_name;
5243 int count = 0, num_destroyed;
5248 destroyer_ship_name =
CTEXT(n);
5252 for (n =
CDR(n); n != -1; n =
CDR(n))
5255 destroyed_ship_name =
CTEXT(n);
5268 if (latest_time && (time > *latest_time))
5269 *latest_time = time;
5273 if (count == num_destroyed)
5310 char *ship_name, *subsys_name;
5315 ship_name =
CTEXT(n);
5490 char *ship_name, *waypoint_name;
5494 ship_name =
CTEXT(n);
5496 waypoint_name =
CTEXT(n);
5500 count = (n >= 0) ?
eval_num(n) : 1;
5503 Warning(
LOCATION,
"Are-waypoints-done-delay count should be at least 1! This has been automatically adjusted.");
5599 ship_name =
CTEXT(n);
5613 if (
Ships[shipnum].special_warpout_objnum < 0) {
5618 if ( (
Ships[shipnum].special_warpout_objnum < 0) && (
Ships[shipnum].special_warpout_objnum >=
MAX_OBJECTS) ) {
5625 object *warp_objp = &
Objects[Ships[shipnum].special_warpout_objnum];
5778 shipname =
CTEXT(node);
5781 if ( sindex == -1 ){
5786 shipp = &
Ships[sindex];
5857 float maximum = 0.0f, current = 0.0f;
5863 shipname =
CTEXT(node);
5866 if ( sindex == -1 ){
5870 shipp = &
Ships[sindex];
5889 return (
int)(100 * (current/maximum));
5897 int shipnum, percent;
5900 shipname =
CTEXT(n);
5908 if ( shipnum == -1 ){
5913 if (
Ships[shipnum].ship_max_shield_strength == 0.0
f)
5930 int shipnum, percent;
5933 shipname =
CTEXT(n);
5941 if ( shipnum == -1 ){
5955 int shipnum, percent;
5958 shipname =
CTEXT(n);
5966 if ( shipnum == -1 ){
5989 int ship_is_visible = 0;
5996 shipname =
CTEXT(n);
6004 if ( shipnum == -1 ){
6013 ship_is_visible = 2;
6020 if (awacs_level >= 1.0
f) {
6021 ship_is_visible = 2;
6022 }
else if (awacs_level > 0) {
6023 ship_is_visible = 1;
6027 return ship_is_visible;
6038 shipname =
CTEXT(n);
6046 if ( shipnum == -1 ) {
6064 shipname =
CTEXT(n);
6072 if ( shipnum == -1 ) {
6097 Warning(
LOCATION,
"sexp-team-score: team %d is not a valid team #", team);
6116 int shipnum, percent,
type, single_subsystem = 0;
6120 shipname =
CTEXT(n);
6128 if ( shipnum == -1 ){
6156 Error(
LOCATION,
"Invalid subsystem '%s' passed to hits-left-subsystem", subsys_name);
6173 int i, ship_num, subsys_type;
6174 char *ship_name, *subsys_type_name;
6176 ship_name =
CTEXT(node);
6177 subsys_type_name =
CTEXT(
CDR(node));
6198 if (subsys_type < 0) {
6199 Warning(
LOCATION,
"Subsystem type '%s' not recognized in hits-left-subsystem-generic!", subsys_type_name);
6205 Warning(
LOCATION,
"Cannot use SUBSYSTEM_UNKNOWN in hits-left-subsystem-generic!");
6218 char *ship_name, *subsys_name;
6221 ship_name =
CTEXT(node);
6243 Error(
LOCATION,
"Invalid subsystem '%s' passed to hits-left-subsystem", subsys_name);
6251 int directive_value;
6258 directive_value = 0;
6287 len = strlen(subj + 5) - 1;
6288 strncpy(team_name, subj + 5, len);
6289 team_name[
len] =
'\0';
6301 if (objp1 == NULL || objp2 == NULL)
6322 int dist, dist_min = 0,
inited = 0;
6324 switch (oswpt2->
type)
6336 if (!
inited || (dist < dist_min))
6367 if (!
inited || (dist < dist_min))
6393 int dist, dist_min = 0,
inited = 0;
6403 switch (oswpt1.
type)
6415 if (!
inited || (dist < dist_min))
6446 if (!
inited || (dist < dist_min))
6473 Assert(subsys_world_pos);
6492 Error(
LOCATION,
"sexp_get_subsystem_world_pos could not find subsystem '%s'", subsys_name);
6504 int ship_with_subsys_num, dist, dist_min = 0,
inited = 0;
6505 char *ship_with_subsys_name, *subsys_name;
6510 ship_with_subsys_name =
CTEXT(
CDR(n));
6523 if (ship_with_subsys_num < 0)
6541 if (!
inited || (dist < dist_min))
6570 if (!
inited || (dist < dist_min))
6591 for(i = 0; i < 3; i++)
6593 if(pos->
a1d[i] < (box_vals[i] - box_vals[i+3])
6594 || pos->
a1d[i] > (box_vals[i] + box_vals[i+3]))
6610 for(i = 0; i < 6; i++)
6617 for(;n != -1; n =
CDR(n))
6619 ship_wing =
CTEXT(n);
6632 bool wing_check =
true;
6654 Assert(axis >= 0 && axis <= 2);
6658 vec3d subjective_vel;
6664 subjective_vel.
a1d[axis] =
i2fl(speed);
6680 int speed, subjective = 0;
6719 int speed = 0, axis = 0, subjective = 0;
6731 Assertion(((axis >= 0) && (axis <= 2)),
"Axis is out of range (%d)", axis);
6737 vec3d subjective_vel;
6739 speed =
fl2i(subjective_vel.
a1d[axis]);
6754 int speed, subjective = 0;
6787 Assert(axis >= 0 && axis <= 2);
6789 if (relative_location == NULL)
6791 return fl2i(origin->
a1d[axis]);
6795 vec3d new_world_pos;
6800 return fl2i(new_world_pos.
a1d[axis]);
6808 Assert(axis >= 0 && axis <= 2);
6817 case 0: rad = a.
p;
break;
6818 case 1: rad = a.
b;
break;
6819 case 2: rad = a.
h;
break;
6820 default: rad = 0.0f;
break;
6825 int deg2 =
static_cast<int>(deg < 0.0f ? deg - 0.5f : deg + 0.5f);
6837 char *subsystem_name = NULL;
6838 vec3d *
pos = NULL, *relative_location = NULL, relative_location_buf, subsys_pos_buf;
6846 subsystem_name =
CTEXT(n);
6851 relative_location = &relative_location_buf;
6886 pos = &subsys_pos_buf;
6932 vec3d target_vec, orig_leader_vec;
6992 orig_leader_vec = oswpt.
objp->
pos;
7001 if (objp != oswpt.
objp)
7077 objp->
orient = target_orient;
7090 Assert(objp && location);
7120 Warning(
LOCATION,
"error in sexp setting ship orientation: can't point to self; quitting...\n");
7136 Assert(oswpt && location);
7138 switch (oswpt->
type)
7162 int turn_time, bank;
7169 if (oswpt1.
objp == NULL)
7179 if (oswpt2.
objp == NULL)
7186 location = &location_buf;
7197 turn_time = bank = 0;
7211 void sexp_set_ship_man(
object *
objp,
int duration,
int heading,
int pitch,
int bank,
bool apply_all_rotate,
int up,
int sideways,
int forward,
bool apply_all_lat)
7222 if (apply_all_rotate) {
7241 if (apply_all_lat) {
7251 if (sideways != 0) {
7266 switch (oswpt->
type)
7269 sexp_set_ship_man(oswpt->
objp, duration, heading, pitch, bank, apply_all_rotate, up, sideways, forward, apply_all_lat);
7278 sexp_set_ship_man(objp, duration, heading, pitch, bank, apply_all_rotate, up, sideways, forward, apply_all_lat);
7288 int bank = 0, heading = 0, pitch = 0;
7289 int up = 0, sideways = 0, forward = 0;
7290 int duration,
i,
temp;
7291 bool apply_all_rotate =
false, apply_all_lat =
false;
7306 if (temp > 100) temp = 100;
7307 if (temp < -100) temp = -100;
7326 if (temp > 100) temp = 100;
7327 if (temp < -100) temp = -100;
7341 if ((bank == 0) && (pitch == 0) && (heading == 0) && !apply_all_rotate && (up == 0) && (sideways == 0) && (forward == 0) && !apply_all_lat)
7344 sexp_set_oswpt_maneuver(&oswpt, duration, heading, pitch, bank, apply_all_rotate, up, sideways, forward, apply_all_lat);
7366 if ( instance != -1 ) {
7370 if ( instance == -1 )
7386 if ( i == MAX_AI_GOALS )
7420 level_name =
CTEXT(n);
7422 if (level_name == NULL)
7459 medal_name =
CTEXT(n);
7461 if (medal_name == NULL)
7481 float damage_total = 0.0f;
7489 if (
Ships[sindex].damage_ship_id[idx] == attacker) {
7500 if (
Ships_exited[sindex].damage_ship_id[idx] == attacker) {
7508 return damage_total;
7514 int sindex, damaged_sig, attacker_sig;
7515 float damage_caused = 0.0f;
7526 return fl2i(damage_caused);
7543 for ( ; node != -1; node =
CDR(node) ) {
7558 if (attacker_sig < 0) {
7565 Assertion((ship_class > -1) && (ship_class < static_cast<int>(
Ship_info.size())),
"Invalid ship class '%d' passed to sexp_get_damage_caused() (should be >= 0 and < %d); get a coder!\n", ship_class,
static_cast<int>(
Ship_info.size()));
7566 return (
int) ((damage_caused/
Ship_info[ship_class].max_hull_strength) * 100.0
f);
7587 for ( n =
CDR(n); n != -1; n =
CDR(n) ) {
7593 if ( wingnum != -1 ) {
7604 Error(
LOCATION,
"Invalid status check '%d' for wing '%s' in sexp_percent_ships_arrive_depart_destroy_disarm_disable", what, name);
7624 Error(
LOCATION,
"Invalid status check '%d' for ship '%s' in sexp_percent_ships_depart_destroy_disarm_disable", what, name);
7630 if ( ((count * 100) / total) >= percent )
7642 int delay,
count, num_departed;
7643 char *jump_node_name, *
name;
7644 fix latest_time, this_time;
7650 jump_node_name =
CTEXT(n);
7670 if ( this_time > latest_time )
7671 latest_time = this_time;
7676 if ( (count == num_departed) && ((
Missiontime - latest_time) >= delay) )
7688 fix delay, latest_time;
7709 if ( wingnum != -1 ) {
7712 if (
Wings[wingnum].time_gone > latest_time ){
7726 if ( time_gone > latest_time ){
7727 latest_time = time_gone;
7733 if ( (count == total) && (
Missiontime > (latest_time + delay)) )
7741 int shipnum, knossos_shipnum;
7742 char *ship_name, *knossos;
7744 ship_name =
CTEXT(node);
7760 if (knossos_shipnum < 0) {
7778 int count, ship_num, num_known, delay;
7818 if (exited_index != -1)
7826 if (
f2i(time_known) >= delay )
7839 if ( ship_num != -1 )
7844 if (
f2i(time_known) >= delay )
7863 if ( count == num_known )
7890 int delay,
count, num_known, ship_num;
7891 char *ship_name, *subsys_name;
7903 ship_name =
CTEXT(n);
7925 subsys_name =
CTEXT(n);
7962 if ( ship_num != -1 )
7964 int cargo_revealed(0);
7965 fix time_revealed(0);
7973 if (
f2i(time_known) >= delay )
7992 if ( count == num_known )
8001 char *ship_name, *subsys_name;
8006 ship_name =
CTEXT(n);
8040 subsys_name =
CTEXT(n);
8055 Error(
LOCATION,
"Couldn't find subsystem '%s' on ship '%s' in sexp_set_scanned_unscanned", subsys_name, ship_name);
8065 int count, shipnum, num_known, delay;
8097 if (exited_index != -1 ) {
8104 if (
f2i(time_known) >= delay )
8111 if ( shipnum != -1 ) {
8112 if (
Ships[shipnum].time_first_tagged != 0 ) {
8114 if (
f2i(time_known) >= delay )
8131 if ( count == num_known )
8143 ptr = Sexp_applicable_argument_list.
get_next();
8147 Sexp_replacement_arguments.push_back(ptr->
text);
8149 Sexp_current_argument_nesting_level++;
8157 Sexp_current_argument_nesting_level--;
8160 Sexp_replacement_arguments.pop_back();
8174 ptr = Sexp_applicable_argument_list.
get_next();
8178 Sexp_replacement_arguments.push_back(ptr->
text);
8185 Sexp_replacement_arguments.pop_back();
8245 ptr = Sexp_applicable_argument_list.
get_next();
8260 Warning(
LOCATION,
"<Argument> used within Do-for-valid-arguments SEXP. Skipping entire SEXP");
8265 while (do_node != -1) {
8267 do_node =
CDR(do_node);
8301 bool first_loop =
true;
8304 ptr = Sexp_applicable_argument_list.
get_next();
8309 Sexp_replacement_arguments.push_back(ptr->
text);
8310 actions = all_actions;
8312 while (actions != -1)
8319 int do_node =
CDR(exp);
8320 while (do_node != -1) {
8322 do_node =
CDR(do_node);
8332 Sexp_current_argument_nesting_level++;
8336 Sexp_current_argument_nesting_level--;
8345 actions =
CDR(actions);
8355 Sexp_replacement_arguments.pop_back();
8367 int cond,
val, actions;
8379 while (actions != -1)
8382 int exp =
CAR(actions);
8387 actions =
CDR(actions);
8403 int arg_handler = -1, cond,
val, actions;
8410 arg_handler =
CAR(n);
8414 Sexp_current_argument_nesting_level++;
8433 int exp =
CAR(actions);
8445 while (actions != -1)
8453 actions =
CDR(actions);
8465 actions =
CDR(actions);
8468 while (actions != -1)
8471 int exp =
CAR(actions);
8476 actions =
CDR(actions);
8487 ptr = Sexp_applicable_argument_list.
get_next();
8488 while(ptr != NULL) {
8490 Current_event_log_argument_buffer->push_back(ptr->
text);
8497 Sexp_current_argument_nesting_level--;
8501 int short_circuit_node = (arg_handler >= 0) ? arg_handler : cond;
8532 actions =
CDR(node);
8533 while (actions >= 0)
8539 actions =
CDR(actions);
8556 int val, num_valid_arguments;
8557 Assert(n != -1 && condition_node != -1);
8558 Assert((num_true != NULL) && (num_false != NULL) && (num_known_true != NULL) && (num_known_false != NULL));
8562 Applicable_arguments_temp.clear();
8565 num_valid_arguments = 0;
8568 *num_known_true = 0;
8569 *num_known_false = 0;
8581 Sexp_replacement_arguments.push_back(Sexp_nodes[n].text);
8585 val = Sexp_nodes[condition_node].
value;
8595 Applicable_arguments_temp.push_back(Sexp_nodes[n].text);
8603 (*num_known_true)++;
8604 Applicable_arguments_temp.push_back(Sexp_nodes[n].text);
8608 (*num_known_false)++;
8613 Sexp_replacement_arguments.pop_back();
8616 num_valid_arguments++;
8625 while (!Applicable_arguments_temp.empty())
8627 Sexp_applicable_argument_list.
add_data(Applicable_arguments_temp.back());
8628 Applicable_arguments_temp.pop_back();
8631 return num_valid_arguments;
8638 int val, num_valid_arguments;
8639 Assert(condition_node != -1);
8640 Assert((num_true != NULL) && (num_false != NULL) && (num_known_true != NULL) && (num_known_false != NULL));
8644 Applicable_arguments_temp.clear();
8647 num_valid_arguments = 0;
8650 *num_known_true = 0;
8651 *num_known_false = 0;
8654 for (
size_t i = 0;
i < argument_vector.size();
i++)
8662 Sexp_replacement_arguments.push_back(argument_vector[
i]);
8666 val = Sexp_nodes[condition_node].
value;
8676 Applicable_arguments_temp.push_back(argument_vector[i]);
8684 (*num_known_true)++;
8685 Applicable_arguments_temp.push_back(argument_vector[i]);
8689 (*num_known_false)++;
8699 Sexp_replacement_arguments.pop_back();
8702 num_valid_arguments++;
8708 while (!Applicable_arguments_temp.empty())
8713 Sexp_applicable_argument_list.
add_data_set_dup(Applicable_arguments_temp.back());
8715 Sexp_applicable_argument_list.
add_data_dup(Applicable_arguments_temp.back());
8717 Applicable_arguments_temp.pop_back();
8720 return num_valid_arguments;
8726 int n, num_valid_arguments, num_true, num_false, num_known_true, num_known_false;
8727 Assert(arg_handler_node != -1 && condition_node != -1);
8730 n =
CDR(arg_handler_node);
8736 if (num_known_true || num_true)
8738 else if (num_known_false == num_valid_arguments)
8747 int n, num_valid_arguments, num_true, num_false, num_known_true, num_known_false;
8748 Assert(arg_handler_node != -1 && condition_node != -1);
8751 n =
CDR(arg_handler_node);
8757 if ((!num_valid_arguments) || num_known_false)
8768 int n, num_valid_arguments, num_true, num_false, num_known_true, num_known_false, threshold;
8769 Assert(arg_handler_node != -1 && condition_node != -1);
8772 n =
CDR(arg_handler_node);
8783 if (num_true + num_known_true >= threshold)
8785 else if (num_valid_arguments - num_known_false < threshold)
8798 int n = -1,
i,
val, num_valid_args, random_argument, num_known_false = 0;
8799 Assert(arg_handler_node != -1 && condition_node != -1);
8804 if (num_valid_args == 0)
8812 n =
CDR(arg_handler_node);
8815 for ( ; n != -1; n =
CDR(n))
8825 n =
CDR(arg_handler_node);
8831 for (
int j = 0; j < num_valid_args; temp_node =
CDR(temp_node))
8838 if (
i < random_argument && (++
i == random_argument)) {
8848 if (num_known_false == num_valid_args) {
8868 Sexp_replacement_arguments.push_back(Sexp_nodes[n].text);
8874 Sexp_applicable_argument_list.
add_data(Sexp_nodes[n].text);
8880 Sexp_replacement_arguments.pop_back();
8893 Assert(arg_handler_node != -1 && condition_node != -1);
8896 n =
CDR(arg_handler_node);
8919 Sexp_replacement_arguments.push_back(Sexp_nodes[n].text);
8925 Sexp_applicable_argument_list.
add_data(Sexp_nodes[n].text);
8931 Sexp_replacement_arguments.pop_back();
8940 template <
typename T>
8946 return (t < 0) ? T(-1) : T(1);
8952 int n, num_valid_arguments, num_true, num_false, num_known_true, num_known_false;
8953 int i, counter_start, counter_stop, counter_step;
8955 Assert(arg_handler_node != -1 && condition_node != -1);
8958 n =
CDR(arg_handler_node);
8963 counter_step = (n >= 0) ?
eval_num(n) : 1;
8966 if (counter_step == 0)
8968 Warning(
LOCATION,
"A counter increment of 0 is illegal! (start=%d, stop=%d, increment=%d)", counter_start, counter_stop, counter_step);
8971 else if (counter_start == counter_stop)
8973 Warning(
LOCATION,
"The counter start and stop values are identical! (start=%d, stop=%d, increment=%d)", counter_start, counter_stop, counter_step);
8976 else if (
sign(counter_stop - counter_start) !=
sign(counter_step))
8978 Warning(
LOCATION,
"The counter cannot complete with the given values! (start=%d, stop=%d, increment=%d)", counter_start, counter_stop, counter_step);
8984 for (i = counter_start; ((counter_step > 0) ? i <= counter_stop : i >= counter_stop); i += counter_step)
8987 argument_vector.push_back(
vm_strdup(buf));
9000 if (num_known_true || num_true)
9002 else if (num_known_false == num_valid_arguments)
9010 int arg_handler, arg_n;
9015 if (arg_handler < 0)
9024 arg_n =
CDR(arg_handler);
9025 while (arg_n != -1) {
9043 int arg_handler, arg_n;
9049 arg_n =
CDR(arg_handler);
9050 while (arg_n != -1) {
9066 int arg_handler, arg_n;
9072 if (arg_handler < 0)
9085 arg_n =
CDR(arg_handler);
9086 while (invalidate && (arg_n != -1)) {
9102 arg_n =
CDR(arg_handler);
9112 Sexp_nodes[arg_n].
flags &= ~SNF_ARGUMENT_VALID;
9141 int conditional, arg_handler;
9151 if (conditional == -1) {
9158 arg_handler =
CADR(conditional);
9209 for ( ; n != -1; n =
CDR(n) )
9251 if (exited_index >= 0)
9280 shipp->
team = new_team;
9292 parse_obj->
team = new_team;
9303 for ( ; n != -1; n =
CDR(n) )
9351 shipp->
ship_iff_color[observer_team][observed_team] = alternate_iff_color;
9362 parse_obj->
alt_iff_color[observer_team][observed_team] = alternate_iff_color;
9368 int observer_team, observed_team, alternate_iff_color;
9374 Warning(
LOCATION,
"Detected missing observer team parameter in sexp-change_iff_color");
9382 Warning(
LOCATION,
"Detected missing observed team parameter in sexp-change_iff_color");
9392 Warning(
LOCATION,
"Detected incomplete color parameter list in sexp-change_iff_color\n");
9397 Warning(
LOCATION,
"Invalid argument for iff color in sexp-change-iff-color. Valid range is 0 to 255.\n");
9405 for ( ; n != -1; n =
CDR(n) )
9452 int ship_num, ship_class_num;
9471 if (
Ships[ship_num].ship_info_index != ship_class_num)
9485 int ship_num, ship_type_num;
9519 char *ship_name, *subsystem;
9520 int i, ship_num, ai_class_to_check;
9525 ai_class_to_check = -1;
9529 ai_class_to_check =
i;
9532 Assert(ai_class_to_check >= 0);
9535 ship_name =
CTEXT(n);
9551 for ( ; n != -1; n =
CDR(n) )
9553 subsystem =
CTEXT(n);
9583 int i, ship_num, new_ai_class;
9595 Assert(new_ai_class >= 0);
9610 for ( ; n != -1; n =
CDR(n) )
9644 ship_name =
CTEXT(n);
9660 wing_name =
CTEXT(n);
9706 if ( goalindex >= 0 )
9708 if (
Ai_info[
Ships[num].ai_index].active_goal == goalindex )
9728 ship_name =
CTEXT(n);
9744 wing_name =
CTEXT(n);
9813 char* gaugename =
CTEXT(n);
9825 char* gaugename =
CTEXT(n);
9836 char* gaugename =
CTEXT(n);
9856 WarningEx(
LOCATION,
"sexp_hud_set_message couldn't find a message by the name of %s in the mission\n", text);
9861 char* gaugename =
CTEXT(n);
9885 for(
size_t i = 0;
i < num_gauges;
i++) {
9894 for(
size_t i = 0;
i < num_gauges;
i++) {
9905 char* gaugename =
CTEXT(n);
9917 char* gaugename =
CTEXT(n);
9928 char* gaugename =
CTEXT(n);
9971 Sexp_hud_display_warpout = (show_for > 1)?
timestamp(show_for) : (show_for);
9991 for(; node >= 0; node =
CDR(node)) {
10016 if (config_type != -1) {
10020 for(
size_t i = 0;
i < num_gauges;
i++) {
10027 for(
size_t i = 0;
i < num_gauges;
i++) {
10040 for(; node >= 0; node =
CDR(node)) {
10044 if (config_type != -1) {
10048 for(
size_t i = 0;
i < num_gauges;
i++) {
10055 for(
size_t i = 0;
i < num_gauges;
i++) {
10071 Sexp_hud_display_warpout = (show_for > 1)?
timestamp(show_for) : (show_for);
10104 int default_orders;
10108 if (shipp == NULL) {
10164 if ( Sexp_music_handle != -1 ) {
10176 if ( Sexp_music_handle != -1 ) {
10178 Sexp_music_handle = -1;
10199 if ( Sexp_music_handle != -1 )
10218 if ( Sexp_music_handle != -1 ) {
10223 nprintf((
"Warning",
"Can not play music. sexp_start_music called when no music file is set for Sexp_music_handle!\n"));
10230 int sound_index = -1;
10240 const char *sound_name =
CTEXT(node);
10247 if (sound_index < 0)
10252 return sound_index;
10274 if (sound_index >= 0) {
10276 if (snd->
min == 0 && snd->
max == 0) {
10297 int sound_index = -1;
10306 if (sound_index >= 0) {
10308 if (snd->
min == 0 && snd->
max == 0) {
10348 if (soundfx >= 0) {
10417 if (text == NULL) {
10422 if (!strcmp(text, Sound_environment_option[i])) {
10435 int preset_id = -1;
10437 char *preset =
CTEXT(n);
10446 if (preset_id < 0) {
10519 if (text == NULL) {
10524 if (!strcmp(text, Adjust_audio_options[i])) {
10541 float target_volume = 1.0f;
10544 CLAMP(target_volume, 0.0
f, 1.0
f);
10562 if (text == NULL) {
10567 if (!strcmp(text, Explosion_option[i])) {
10578 int n = node, ship_num;
10588 shipp = &
Ships[ship_num];
10684 int max_damage, max_blast, explosion_size, inner_radius, outer_radius, shockwave_speed, fireball_type, sound_index;
10685 int emp_intensity, emp_duration;
10726 Warning(
LOCATION,
"explosion-effect type is out of range; quitting the explosion...\n");
10754 if (sound_index >= 0)
10761 if (explosion_size && inner_radius && outer_radius)
10770 if (max_damage || max_blast)
10772 if ( shockwave_speed > 0 )
10790 float t_blast = 0.0f;
10791 float t_damage = 0.0f;
10813 switch ( objp->
type )
10817 vec3d force, vec_ship_to_impact;
10840 if (emp_intensity && emp_duration)
10842 emp_apply(&origin, (
float)inner_radius, (
float)outer_radius, (
float)emp_intensity, (
float)emp_duration);
10868 int radius, duration, warp_open_sound_index, warp_close_sound_index, fireball_type, extra_flags;
10889 if (duration < 4) duration = 4;
10908 Warning(
LOCATION,
"warp-effect type is out of range; quitting the warp...\n");
10924 Warning(
LOCATION,
"warp-effect shape is out of range; quitting the warp...\n");
10935 Warning(
LOCATION,
"error in warp-effect: warp can't point to itself; quitting the warp...\n");
10943 fireball_create(&origin, fireball_type,
FIREBALL_WARP_EFFECT, -1, (
float)radius, 0, NULL, (
float)duration, -1, &m_orient, 0, extra_flags, warp_open_sound_index, warp_close_sound_index);
10950 int ipriority,
num, ship_index,
source;
10957 Assert( (name != NULL) && (who_from != NULL) && (priority != NULL) );
10960 if ( !
stricmp(priority,
"low") )
10962 else if ( !
stricmp(priority,
"normal") )
10964 else if ( !
stricmp(priority,
"high") )
10977 if ( who_from[0] ==
'#' ) {
10980 }
else if (!
stricmp(who_from,
"<any allied>")) {
10986 if ( ship_index == -1 ) {
11002 }
else if ( !
stricmp(who_from,
"<none>") ) {
11008 if ( ship_index == -1 ) {
11016 if ( ship_index == -1 ){
11019 shipp = &
Ships[ship_index];
11027 char *
name, *who_from, *priority, *tmp;
11034 who_from =
CTEXT(n);
11051 char *
name, *who_from, *priority;
11061 who_from =
CTEXT(n);
11066 Warning(
LOCATION,
"Detected incomplete parameter list in sexp-send-message-list");
11069 priority =
CTEXT(n);
11074 Warning(
LOCATION,
"Detected incomplete parameter list in sexp-send-message-list");
11082 Warning(
LOCATION,
"Detected incomplete parameter list in sexp-send-message-list");
11097 char *
name, *who_from, *priority;
11098 int temp, num_messages, message_num;
11101 who_from =
CTEXT(n);
11112 while ( n != -1 ) {
11116 Assert ( num_messages >= 1 );
11119 message_num =
myrand() % num_messages;
11121 while ( n != -1 ) {
11122 if ( message_num == 0 )
11137 for (n = node; n != -1; n =
CDR(n)) {
11142 if (ship_num >= 0) {
11150 char *mission_name;
11153 mission_name =
CTEXT(n);
11155 if (mission_name == NULL) {
11156 Error(
LOCATION,
"Mission name is NULL in campaign file for next-mission command!");
11165 Error(
LOCATION,
"Mission name %s not found in campaign file for next-mission command", mission_name);
11185 int ignore_player_mortality = 1;
11220 char *shipname, *subsystem;
11221 int percentage, shipnum,
index, generic_type;
11222 float sabotage_hits;
11225 bool do_loop =
true;
11227 shipname =
CTEXT(n);
11234 if ( shipnum == -1 )
11236 shipp = &
Ships[shipnum];
11244 sabotage_hits = ihs * ((
float)percentage / 100.0
f);
11260 sabotage_hits = ihs * ((
float)percentage / 100.0
f);
11272 if (generic_type) {
11276 if (generic_type == ss_start->system_info->type) {
11295 if ( index == -1 ) {
11296 nprintf((
"Warning",
"Couldn't find subsystem %s on ship %s for sabotage subsystem\n", subsystem, shipp->
ship_name));
11303 nprintf((
"Warning",
"Nonexistent subsystem for index %d on ship %s for sabotage subsystem\n", index, shipp->
ship_name));
11329 char *shipname, *subsystem;
11330 int percentage, shipnum,
index, do_submodel_repair, generic_type;
11334 bool do_loop =
true;
11336 shipname =
CTEXT(n);
11343 if ( shipnum == -1 ) {
11346 shipp = &
Ships[shipnum];
11357 repair_hits = ihs * ((
float)percentage / 100.0
f);
11371 repair_hits = ihs * ((
float)percentage / 100.0
f);
11384 if (generic_type) {
11388 if (generic_type == ss_start->system_info->type) {
11407 if ( index == -1 ) {
11408 nprintf((
"Warning",
"Couldn't find subsystem %s on ship %s for repair subsystem\n", subsystem, shipp->
ship_name));
11415 nprintf((
"Warning",
"Nonexistent subsystem for index %d on ship %s for repair subsystem\n", index, shipp->
ship_name));
11440 char *shipname, *subsystem;
11441 int percentage, shipnum,
index, do_submodel_repair, generic_type;
11444 bool do_loop =
true;
11446 shipname =
CTEXT(n);
11455 if ( shipnum == -1 )
11457 shipp = &
Ships[shipnum];
11459 if ( percentage > 100 ) {
11460 mprintf((
"Percentage for set_subsystem_strength > 100 on ship %s for subsystem '%s'-- setting to 100\n", shipname, subsystem));
11462 }
else if ( percentage < 0 ) {
11463 mprintf((
"Percantage for set_subsystem_strength < 0 on ship %s for subsystem '%s' -- setting to 0\n", shipname, subsystem));
11475 if ( percentage == 0 ) {
11502 if (generic_type) {
11506 if (generic_type == ss_start->system_info->type) {
11525 if ( index == -1 ) {
11526 nprintf((
"Warning",
"Couldn't find subsystem %s on ship %s for set subsystem strength\n", subsystem, shipp->
ship_name));
11534 nprintf((
"Warning",
"Nonexistent subsystem for index %d on ship %s for set subsystem strength\n", index, shipp->
ship_name));
11541 if (percentage < 1) {
11563 int shipnum,
index, generic_type;
11574 if ( shipnum == -1 ){
11578 shipp = &
Ships[shipnum];
11584 subsystem =
CTEXT(n);
11591 if (generic_type) {
11606 if ( index == -1 ) {
11607 nprintf((
"Warning",
"Couldn't find subsystem %s on ship %s for destroy-subsys-instantly\n", subsystem, shipp->
ship_name));
11612 nprintf((
"Warning",
"Nonexistent subsystem for index %d on ship %s for destroy-subsys-instantly\n", index, shipp->
ship_name));
11635 while ( n != -1 ) {
11650 char *cargo, *ship_name, *subsystem;
11651 int ship_num, cargo_index;
11666 if (ship_num != -1)
11693 if (exited_index != -1)
11710 if (cargo_index < 0)
11724 char *cargo, *ship_name, *subsystem;
11725 int ship_num,
i, cargo_index;
11751 if (cargo_index == -1)
11772 if (ship_num != -1)
11810 char *shipname1, *shipname2;
11811 int shipnum1, shipnum2,
i;
11813 shipname1 =
CTEXT(n);
11819 if ( (shipnum1 == -1) || (shipnum2 == -1) )
11837 Warning(
LOCATION,
"Transferring cargo to %s which already\nhas cargo %s.\nCargo will be replaced",
Ships[shipnum2].ship_name,
Cargo_names[
Ships[shipnum2].cargo1 & CARGO_INDEX_MASK] );
11843 if ( !(
Ships[shipnum1].cargo1 & CARGO_NO_DEPLETE) ) {
11862 char *shipname1, *shipname2;
11863 int shipnum1, shipnum2,
temp;
11865 shipname1 =
CTEXT(n);
11871 if ( (shipnum1 == -1) || (shipnum2 == -1) )
11892 shipname =
CTEXT(n);
11897 if (shipnum == -1) {
11907 if (speed > 32767) {
11924 shipname =
CTEXT(n);
11948 for (; n != -1; n =
CDR(n))
11952 if (ship_index < 0)
11967 char* docker_ship_name =
CTEXT(n);
11969 char* docker_point_name =
CTEXT(n);
11971 char* dockee_ship_name =
CTEXT(n);
11973 char* dockee_point_name =
CTEXT(n);
11979 if(docker_ship_index < 0 || dockee_ship_index < 0)
11982 ship* docker_ship = &
Ships[docker_ship_index];
11983 ship* dockee_ship = &
Ships[dockee_ship_index];
11991 Assertion(docker_point_index >= 0,
"Docker point '%s' not found on docker ship '%s'", docker_point_name, docker_ship_name);
11992 Assertion(dockee_point_index >= 0,
"Dockee point '%s' not found on dockee ship '%s'", dockee_point_name, dockee_ship_name);
12009 int ship_index, no_deplete = 1;
12012 shipname =
CTEXT(n);
12016 if(ship_index < 0){
12021 Warning(
LOCATION,
"Trying to make non BIG or HUGE ship %s with non-depletable cargo.\n",
Ships[ship_index].ship_name);
12025 if (
CDR(n) != -1) {
12027 Assert((no_deplete == 0) || (no_deplete == 1));
12028 if ( (no_deplete != 0) && (no_deplete != 1) ) {
12137 Assert((n >= 0) && (n < Num_sexp_nodes));
12142 sexp_var = atoi(Sexp_nodes[n].text);
12150 if (new_number < 0)
12156 sprintf(number_as_str,
"%d", new_number);
12163 Error(
LOCATION,
"sexp-add-background-bitmap: Variable %s must be a number variable!", Sexp_variables[sexp_var].variable_name);
12175 if ( instances > slot ) {
12178 Warning(
LOCATION,
"remove-background-bitmap: slot %d does not exist. Slot must be less than %d.",
12228 Assert((n >= 0) && (n < Num_sexp_nodes));
12233 sexp_var = atoi(Sexp_nodes[n].text);
12243 if (new_number < 0)
12249 sprintf(number_as_str,
"%d", new_number);
12256 Error(
LOCATION,
"sexp-add-sun-bitmap: Variable %s must be a number variable!", Sexp_variables[sexp_var].variable_name);
12268 if ( instances > slot ) {
12271 Warning(
LOCATION,
"remove-sun-bitmap: slot %d does not exist. Slot must be less than %d.",
12290 if (name == NULL)
return;
12298 if (i == MAX_NEB2_POOFS)
return;
12322 int ignore_player_mortality = 1;
12323 int boot_to_main_hall = 0;
12324 int from_debrief_to_main_hall = 0;
12345 if (from_debrief_to_main_hall) {
12419 medal_name =
CTEXT(n);
12420 if (medal_name == NULL)
12432 if ( i < Num_medals ) {
12470 while (node >= 0) {
12472 if (plr_index >= 0) {
12475 if (
Net_player[plr_index].m_player->stats.m_score < 0) {
12487 int i, score,
team;
12506 Warning(
LOCATION,
"Invalid team number. Team %d does not exist", team);
12522 while (node >= 0) {
12523 name =
CTEXT(node);
12528 Warning(
LOCATION,
"In tech-add-ship, ship class \"%s\" invalid", name);
12544 while (node >= 0) {
12545 name =
CTEXT(node);
12550 Warning(
LOCATION,
"In tech-add-weapon, weapon class \"%s\" invalid", name);
12567 while (node >= 0) {
12568 name =
CTEXT(node);
12573 Warning(
LOCATION,
"In tech-add-intel, intel name \"%s\" invalid", name);
12583 int i,
id,
n = node;
12594 name = Sexp_nodes[
n].
text;
12598 id = atoi(Sexp_nodes[n].text);
12636 if ( sindex == -1 )
12655 if ( sindex == -1 )
12667 void sexp_deal_with_ship_flag(
int node,
bool process_subsequent_nodes,
int object_flag,
int object_flag2,
int ship_flag,
int ship_flag2,
int p_object_flag,
int p_object_flag2,
bool set_it,
bool send_multiplayer =
false,
bool include_players_in_ship_lookup =
false)
12690 for (; n >= 0; process_subsequent_nodes ? n =
CDR(n) : n = -1)
12693 ship_name =
CTEXT(n);
12700 ship_index =
ship_name_lookup(ship_name, include_players_in_ship_lookup ? 1 : 0);
12703 if (ship_index >= 0)
12721 zero_one_ets(&
Ships[ship_index].shield_recharge_index, &
Ships[ship_index].weapon_recharge_index, &
Ships[ship_index].engine_recharge_index);
12787 p_objp->
flags |= p_object_flag;
12789 p_objp->
flags &= ~p_object_flag;
12793 if (p_object_flag2)
12797 p_objp->
flags2 |= p_object_flag2;
12799 p_objp->
flags2 &= ~p_object_flag2;
12816 int object_flag = 0;
12819 int ship_flag2 = 0;
12820 int p_object_flag = 0;
12821 int p_object_flag2 = 0;
12822 bool set_it =
false;
12823 bool ship_arrived =
true;
12839 if (ship_arrived) {
12841 if (shipp == NULL) {
12842 WarningEx(
LOCATION,
"Null ship pointer in multi_sexp_deal_with_ship_flag(), tell a coder.\n");
12852 shipp->
flags |= ship_flag;
12853 shipp->
flags2 |= ship_flag2;
12858 shipp->
flags &= ~ship_flag;
12859 shipp->
flags2 &= ~ship_flag2;
12902 if (pobjp != NULL) {
12904 pobjp->
flags |= p_object_flag;
12905 pobjp->
flags2 |= p_object_flag2;
12908 pobjp->
flags &= ~p_object_flag;
12909 pobjp->
flags2 &= ~p_object_flag2;
12921 void sexp_alter_ship_flag_helper(
object_ship_wing_point_team &oswpt,
bool future_ships,
int object_flag,
int object_flag2,
int ship_flag,
int ship_flag2,
int parse_obj_flag,
int parse_obj_flag2,
int ai_flag,
int ai_flag2,
bool set_flag)
12923 int i, object_flag_orig;
12928 switch (oswpt.
type)
12942 sexp_alter_ship_flag_helper(oswpt2, future_ships, object_flag, object_flag2, ship_flag, ship_flag2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
12946 if (future_ships) {
12951 sexp_alter_ship_flag_helper(oswpt2, future_ships, object_flag, object_flag2, ship_flag, ship_flag2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
12960 if (!future_ships){
12970 sexp_alter_ship_flag_helper(oswpt2, future_ships, object_flag, object_flag2, ship_flag, ship_flag2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
12977 sexp_alter_ship_flag_helper(oswpt2, future_ships, object_flag, object_flag2, ship_flag, ship_flag2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
13058 if (!future_ships) {
13063 if (parse_obj_flag && oswpt.
p_objp != NULL)
13073 if (parse_obj_flag2 && oswpt.
p_objp != NULL)
13088 void alter_flag_for_all_ships(
bool future_ships,
int object_flag,
int object_flag2,
int ship_flag,
int ship_flag2,
int parse_obj_flag,
int parse_obj_flag2,
int ai_flag,
int ai_flag2,
bool set_flag)
13098 sexp_alter_ship_flag_helper(oswpt, future_ships, object_flag, object_flag2, ship_flag, ship_flag2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
13102 if (future_ships) {
13108 sexp_alter_ship_flag_helper(oswpt, future_ships, object_flag, object_flag2, ship_flag, ship_flag2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
13113 bool sexp_check_flag_arrays(
char *flag_name,
int &object_flag,
int &object_flag2,
int &ship_flags,
int &ship_flags2,
int &parse_obj_flag,
int &parse_obj_flag2,
int &ai_flag,
int &ai_flag2)
13116 bool send_multi =
false;
13149 parse_obj_flag = (1 <<
i);
13156 parse_obj_flag2 = (1 <<
i);
13181 int object_flag = 0;
13182 int object_flag2 = 0;
13183 int ship_flags = 0;
13184 int ship_flags2 = 0;
13185 int parse_obj_flag = 0;
13186 int parse_obj_flag2 = 0;
13193 if (shipp == NULL) {
13199 while (node != -1) {
13200 flag_name =
CTEXT(node);
13201 sexp_check_flag_arrays(flag_name, object_flag, object_flag2, ship_flags, ship_flags2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2);
13211 if (!(shipp->
flags & ship_flags))
13215 if (!(shipp->
flags2 & ship_flags2))
13237 int object_flag = 0;
13238 int object_flag2 = 0;
13239 int ship_flags = 0;
13240 int ship_flags2 = 0;
13241 int parse_obj_flag = 0;
13242 int parse_obj_flag2 = 0;
13246 bool future_ships =
false;
13249 flag_name =
CTEXT(node);
13251 sexp_check_flag_arrays(flag_name, object_flag, object_flag2, ship_flags, ship_flags2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2);
13260 future_ships =
true;
13290 alter_flag_for_all_ships(future_ships, object_flag, object_flag2, ship_flags, ship_flags2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
13298 while (node != -1) {
13307 sexp_alter_ship_flag_helper(oswpt, future_ships, object_flag, object_flag2, ship_flags, ship_flags2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
13312 switch (oswpt.
type) {
13340 int object_flag = 0;
13341 int object_flag2 = 0;
13343 int ship_flag2 = 0;
13344 int parse_obj_flag = 0;
13345 int parse_obj_flag2 = 0;
13347 bool future_ships =
true;
13348 bool process_data =
false;
13372 if (!process_data) {
13373 alter_flag_for_all_ships(future_ships, object_flag, object_flag2, ship_flag, ship_flag2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
13380 switch (oswpt.
type) {
13385 Warning(
LOCATION,
"OSWPT had an invalid ship in multi_sexp_alter_ship_flag(), skipping");
13398 if (
Wings[i].net_signature == wing_sig) {
13414 if (oswpt.
wingp == NULL) {
13415 Warning(
LOCATION,
"Unable to get wing to apply flags to in multi_sexp_alter_ship_flag()");
13423 sexp_alter_ship_flag_helper(oswpt, future_ships, object_flag, object_flag2, ship_flag, ship_flag2, parse_obj_flag, parse_obj_flag2, ai_flag, ai_flag2, set_flag);
13435 int ship_flag, p_object_flag;
13464 char *team_name, *weapon_name, *ship_name;
13465 int num_weapons, weapon_index,
team;
13467 team_name =
CTEXT(n);
13473 if ( weapon_index == -1 ) {
13474 nprintf((
"Warning",
"couldn't find weapon %s for good-secondary-time\n", weapon_name));
13493 int wingnum, shipnum, ship_index;
13498 if (enable_messages)
13513 ship_name =
CTEXT(node);
13519 if (enable_messages)
13528 else if (!
stricmp(ship_name,
"<Any Wingman>"))
13532 for (wingnum = 0; wingnum <
Num_wings; wingnum++ ) {
13535 Assert( ship_index != -1 );
13537 if (enable_messages) {
13558 int persona_index = -1, sindex,
i;
13559 char *persona_name;
13561 persona_name =
CTEXT(node);
13570 if (persona_index == -1) {
13571 Warning(
LOCATION,
"Unable to change to persona type: '%s'. Persona is not a wingman!", persona_name);
13584 for ( ; node >= 0; node =
CDR(node) ) {
13591 if (
Ships[sindex].objnum < 0) {
13610 int persona_index = -1;
13617 Assert(persona_index != -1);
13618 if (shipp != NULL) {
13628 mood =
CTEXT(node);
13630 if (!strcmp(iter->c_str(), mood)) {
13636 Warning(
LOCATION,
"Sexp-mission-mood attempted to set mood %s which does not exist in messages.tbl", mood);
13643 int requested_bank;
13645 int last_fired = -1;
13648 if (shipp == NULL) {
13655 if (requested_bank < 0) {
13682 if (last_fired < 0) {
13687 if (
timestamp() - delay < last_fired) {
13698 int requested_bank;
13700 int num_weapon_banks = 0;
13701 int *weapon_banks = NULL;
13704 if (shipp == NULL) {
13711 requested_bank = -1;
13730 Warning(
LOCATION,
"Unrecognised bank type used in has-x-weapon. Returning false");
13736 while (node > -1) {
13738 Assertion (weapon_index >= 0,
"Weapon name %s is unknown.",
CTEXT(node));
13741 if (requested_bank == -1) {
13742 for (i = 0; i < num_weapon_banks; i++) {
13743 if (weapon_index == weapon_banks[i]) {
13751 if (weapon_index == weapon_banks[requested_bank]) {
13771 char *goal_name, *mission_name;
13772 int i, mission_num, default_value = 0, use_defaults = 1;
13774 mission_name =
CTEXT(n);
13789 nprintf((
"General",
"Couldn't find mission name \"%s\" in current campaign's list of missions.\nReturning %s for goal-status function.", mission_name, (status==
GOAL_COMPLETE)?
"false":
"true"));
13807 Warning(
LOCATION,
"Couldn't find goal name \"%s\" in mission %s.\nReturning %s for goal-true function.", goal_name, mission_name, (status==
GOAL_COMPLETE)?
"false":
"true");
13825 if (use_defaults) {
13829 if ( default_value )
13850 char *
name, *mission_name;
13851 int i, mission_num, default_value = 0, use_defaults = 1;
13853 mission_name =
CTEXT(n);
13868 nprintf((
"General",
"Couldn't find mission name \"%s\" in current campaign's list of missions.\nReturning %s for event-status function.", mission_name, (status==
EVENT_SATISFIED)?
"false":
"true"));
13887 Warning(
LOCATION,
"Couldn't find event name \"%s\" in mission %s.\nReturning %s for event_status function.", name, mission_name, (status==
EVENT_SATISFIED)?
"false":
"true");
13905 if (use_defaults) {
13907 if ( default_value )
13935 if (name == NULL) {
13945 if ( (want_true && result) || (!want_true && !result) )
13951 if ( (want_true && result) || (!want_true && !result) )
13973 int use_as_directive = 0;
13977 if (name == NULL) {
13985 tempDelay = tempDelay << 16;
13986 tempDelay = tempDelay / 1000;
13988 delay = (
fix) tempDelay;
13990 delay =
i2f(tempDelay);
14003 if ( (want_true && result) || (!want_true && !result) ) {
14011 if ( want_true && result ) {
14044 if (name == NULL) {
14142 char *turret_type =
CTEXT(n);
14145 if (!
stricmp(turret_type,
"beam"))
14147 else if (!
stricmp(turret_type,
"flak"))
14149 else if (!
stricmp(turret_type,
"laser"))
14151 else if (!
stricmp(turret_type,
"missile"))
14192 for (; n >= 0; n =
CDR(n))
14215 for (; n >= 0; n =
CDR(n))
14235 for (; n >= 0; n =
CDR(n))
14260 if (shipp == NULL) {
14287 if (generic_type) {
14291 ss->
flags |= ss_flag;
14293 ss->
flags &= ~ss_flag;
14309 ss->
flags |= ss_flag;
14311 ss->
flags &= ~ss_flag;
14328 bool setit =
false;
14340 if (generic_type) {
14344 ss->
flags |= ss_flag;
14346 ss->
flags &= ~ss_flag;
14357 ss->
flags |= ss_flag;
14359 ss->
flags &= ~ss_flag;
14367 int ship_num, tag_level, tag_time, ssm_index(0);
14376 if ( ship_num < 0 )
14395 if (tag_level == 3)
14449 int ship_num, threshold;
14457 for ( ; n != -1; n =
CDR(n) ) {
14459 ship_name =
CTEXT(n);
14468 if (ship_num != -1) {
14477 char *ship_name, *hull_name;
14478 int ship_num, threshold;
14487 ship_name =
CTEXT(n);
14496 if (ship_num == -1) {
14503 for ( ; n != -1; n =
CDR(n) ) {
14505 hull_name =
CTEXT(n);
14507 if (hull_name != NULL) {
14512 else if (generic_type) {
14522 if ( ss == NULL ) {
14524 Warning(
LOCATION,
"Invalid subsystem passed to ship-subsys-guardian-threshold: %s does not have a %s subsystem", ship_name, hull_name);
14541 for ( ; n != -1; n =
CDR(n) )
14543 ship_name =
CTEXT(n);
14569 int new_ship_class = -1;
14570 char *new_ship_name;
14572 angles new_ship_ang = {0.0f, 0.0f, 0.0f};
14574 bool change_angles =
false;
14582 new_ship_name = NULL;
14586 new_ship_name =
CTEXT(n);
14593 if(new_ship_class == -1) {
14594 Warning(
LOCATION,
"Invalid ship class passed to ship-create; ship type '%s' does not exist",
CTEXT(n));
14608 change_angles =
true;
14614 change_angles =
true;
14620 change_angles =
true;
14624 if(change_angles) {
14628 ship_create(&new_ship_ori, &new_ship_pos, new_ship_class, new_ship_name);
14634 int weapon_class, parent_objnum, target_objnum, weapon_objnum;
14638 angles weapon_angles = {0.0f, 0.0f, 0.0f};
14641 bool change_angles =
false;
14645 parent_objnum = -1;
14650 if (parent_ship >= 0)
14657 if (weapon_class < 0)
14659 Warning(
LOCATION,
"Invalid weapon class passed to weapon-create; weapon type '%s' does not exist",
CTEXT(n));
14674 change_angles =
true;
14681 change_angles =
true;
14688 change_angles =
true;
14697 target_objnum = -1;
14702 if (target_ship >= 0)
14708 targeted_ss = NULL;
14711 if (target_objnum >= 0)
14717 is_locked = (target_objnum >= 0) ? 1 : 0;
14720 weapon_objnum =
weapon_create(&weapon_pos, &weapon_orient, weapon_class, parent_objnum, -1, is_locked);
14738 for ( ; n != -1; n =
CDR(n) ) {
14739 ship_name =
CTEXT(n);
14756 object *ship_obj_p;
14763 for ( ; n != -1; n =
CDR(n) ) {
14764 ship_name =
CTEXT(n);
14772 if (ship_num >= 0) {
14836 for ( ; n != -1; n =
CDR(n) )
14841 switch (oswpt.
type)
14925 int n = node, new_alt_index;
14926 char *new_alt_name;
14929 new_alt_name =
CTEXT(n);
14935 new_alt_index = -1;
14940 if (new_alt_index < 0)
14944 for ( ; n != -1; n =
CDR(n) )
14949 switch (oswpt.
type)
14988 char *new_callsign;
14989 int sindex, cindex;
14993 new_callsign =
CTEXT(node);
15012 while ( node >= 0 )
15017 shipp = &
Ships[sindex];
15094 if (
CDR(node) < 0){
15106 for (n = node; n != -1; n =
CDR(n))
15126 while (node > -1) {
15130 if (ignored_key > -1) {
15144 int ignored_key, ignore_count;
15161 }
else if (z == -1) {
15170 if (
CDR(node) >= 0) {
15176 if (
CDR(
CDR(node)) >= 0) {
15197 if (
CDR(node) >= 0) {
15210 if (Training_context_speed_set){
15226 if (the_player != NULL) {
15241 if(the_player != NULL)
15245 int throttle_percent =
eval_num(node);
15246 CLAMP(throttle_percent, 0, 100);
15256 int sindex, num_banks, num_depleted_banks;
15265 shipp = &
Ships[sindex];
15266 if (shipp->
objnum < 0) {
15276 num_depleted_banks = 0;
15287 num_depleted_banks++;
15293 return (num_depleted_banks == num_banks);
15298 int sindex, num_banks, num_depleted_banks;
15307 shipp = &
Ships[sindex];
15308 if (shipp->
objnum < 0) {
15314 num_depleted_banks = 0;
15317 for (
int idx=0;
idx<num_banks;
idx++) {
15319 num_depleted_banks++;
15324 return (num_depleted_banks == num_banks);
15337 if (target_shipp == NULL) {
15364 object *origin_objp, *target_objp;
15369 if (origin_shipp == NULL) {
15395 target_objp = oswpt.
objp;
15438 char *waypoint_name =
CTEXT(node);
15443 if (wp_list == NULL) {
15460 char *order_to =
CTEXT(n);
15474 char *order_to =
CTEXT(n);
15477 char *order_from = NULL;
15478 char *special = NULL;
15496 order_from =
CTEXT(n);
15502 special =
CTEXT(n);
15516 if (Training_context_at_waypoint > Training_context_goal_waypoint){
15527 if (Training_context_at_waypoint < Training_context_goal_waypoint - 1){
15538 if ((
uint) Training_context_goal_waypoint == Training_context_path->
get_waypoints().size()){
15548 int t = -1, delay = 0;
15557 if ((
CDR(node) >= 0) && (
CDR(
CDR(node)) >= 0)) {
15601 if(
Ships[sindex].objnum < 0){
15618 if(
Ships[sindex].objnum < 0){
15635 if(
Ships[sindex].objnum < 0){
15651 ets_type =
CTEXT(node);
15658 if (
Ships[sindex].objnum < 0) {
15662 if (!
stricmp(ets_type.c_str(),
"engine")) {
15664 }
else if (!
stricmp(ets_type.c_str(),
"shield")) {
15666 }
else if (!
stricmp(ets_type.c_str(),
"weapon")) {
15694 for ( ; node != -1; node =
CDR(node)) {
15730 float max_quad, check;
15742 if((
Ships[sindex].ship_info_index < 0) || (
Ships[sindex].ship_info_index >= static_cast<int>(
Ship_info.size()))){
15746 sip = &
Ship_info[Ships[sindex].ship_info_index];
15785 shipp = &
Ships[sindex];
15808 ret_sum[
idx] = 100;
15816 ret += ret_sum[
idx];
15854 shipp = &
Ships[sindex];
15873 ret += ret_sum[
idx];
15904 shipp = &
Ships[sindex];
15944 int requested_bank ;
15945 int requested_weapons ;
15946 int rearm_limit = 0;
15957 if (requested_bank < 0)
15965 if (requested_weapons < 0)
15978 set_primary_ammo (sindex, requested_bank, requested_weapons, rearm_limit);
15983 void set_primary_ammo (
int ship_index,
int requested_bank,
int requested_ammo,
int rearm_limit,
bool update)
15986 int maximum_allowed ;
15992 shipp = &
Ships[ship_index];
16008 if (requested_ammo < 0)
16016 if (maximum_allowed < requested_ammo)
16018 requested_ammo = maximum_allowed ;
16025 if (rearm_limit >= 0)
16028 if (rearm_limit > maximum_allowed)
16030 rearm_limit = maximum_allowed;
16047 int ammo_left = 0 ;
16061 shipp = &
Ships[sindex];
16092 int requested_bank;
16093 int requested_weapons;
16105 if (requested_bank < 0)
16113 if (requested_weapons < 0)
16131 void set_secondary_ammo (
int ship_index,
int requested_bank,
int requested_ammo,
int rearm_limit,
bool update)
16134 int maximum_allowed;
16139 shipp = &
Ships[ship_index];
16148 if (requested_ammo < 0)
16156 if (maximum_allowed < requested_ammo)
16158 requested_ammo = maximum_allowed ;
16165 if (rearm_limit >= 0)
16168 if (rearm_limit > maximum_allowed)
16170 rearm_limit = maximum_allowed;
16188 int sindex, requested_bank, windex, requested_ammo=-1, rearm_limit=-1;
16203 shipp = &
Ships[sindex];
16234 if (requested_ammo < 0) {
16235 requested_ammo = 0;
16249 set_primary_ammo (sindex, requested_bank, requested_ammo, rearm_limit,
false);
16285 if (shipp !=NULL) {
16300 if (shipp == NULL) {
16305 if (num_cmeasures < 0) {
16322 int num_cmeasures = 0;
16326 if (shipp == NULL) {
16368 if (ship_index < 0) {
16372 shipp = &
Ships[ship_index];
16379 new_name =
CTEXT(node);
16389 while (node >= 0) {
16393 if (subsystem_to_rename != NULL) {
16420 if (subsystem_to_rename != NULL) {
16430 Assert(class_num != -1);
16440 for ( ; n != -1; n =
CDR(n))
16445 if (ship_num == -1)
16448 char* ship_name =
CTEXT(n);
16450 bool match_found =
false;
16456 if (!(strcmp(pobj->
name, ship_name)))
16458 match_found =
true;
16499 int class_num = -1;
16506 if (ship_arrived) {
16508 if ((class_num >= 0) && (ship_num >= 0)) {
16517 if ((class_num >= 0) && (pobjp != NULL)) {
16535 nprintf((
"SEXP",
"Copying damage of ship %s to ship %s which has a different ship class. Strange results might occur.\n", source_shipp->
ship_name, target_shipp->
ship_name));
16555 if (target_ss == NULL)
16577 nprintf((
"SEXP",
"Copying damage of ship %s to ship %s which has a different ship class. Strange results might occur.\n", source_shipp->
ship_name, target_pobjp->
name));
16598 if (target_sssp == NULL)
16611 target_sssp->
percent = 100.0f;
16623 int n, source_shipnum, target_shipnum;
16628 if (source_shipnum < 0)
16632 for (n =
CDR(node); n != -1; n =
CDR(n))
16636 if (target_shipnum >= 0)
16644 if (target_pobjp != NULL)
16661 for ( ; n != -1; n =
CDR(n))
16667 Ships[sindex].glow_point_bank_active[i] = activate;
16680 for ( n =
CDR(n); n != -1; n =
CDR(n))
16683 if (num >= 0 && num < (
int)
Ships[sindex].glow_point_bank_active.size())
16697 for ( ; n != -1; n =
CDR(n))
16702 shipp = &
Ships[sindex];
16719 if (red < 0 || red > 255) {
16738 level |= green << 8;
16739 level |= blue << 16;
16769 if (name == NULL) {
16775 if (amount < 0 || amount > 100)
16813 if (n != -1) n =
CDR(n);
16841 if ( !
stricmp(
"default", new_skybox_model )) {
16856 if ( !
stricmp(
"default", name) ) {
16870 int sindex,
n = node;
16884 if (
Ships[sindex].objnum < 0) {
16892 if (fire_info.
turret == NULL) {
16905 fire_info.
target = NULL;
16914 if (Ships[sindex].objnum < 0) {
16989 fire_info.
turret = NULL;
16995 Warning(
LOCATION,
"Invalid weapon class passed to beam-create; weapon type '%s' does not exist!\n",
CTEXT(n));
16999 Warning(
LOCATION,
"Invalid weapon class passed to beam-create; weapon type '%s' is not a beam!\n",
CTEXT(n));
17023 fire_info.
target = NULL;
17087 if(
Ships[sindex].objnum < 0){
17092 for ( ; node >= 0; node =
CDR(node) ) {
17095 if(turret == NULL){
17113 for(; node >= 0; node =
CDR(node)) {
17120 if (
Ships[sindex].objnum < 0) {
17136 for (
int n = node;
n >= 0;
n =
CDR(
n)) {
17144 if (
Ships[sindex].objnum < 0) {
17175 if(
Ships[sindex].objnum < 0){
17180 for ( ; node >= 0; node =
CDR(node) ) {
17183 if(turret == NULL){
17197 for (
int n = node;
n >= 0;
n =
CDR(
n)) {
17205 if (
Ships[sindex].objnum < 0) {
17234 if(
Ships[sindex].objnum < 0){
17239 for ( ; node >= 0; node =
CDR(node) ) {
17242 if(turret == NULL){
17260 for (
int n = node;
n >= 0;
n =
CDR(
n)) {
17268 if (
Ships[sindex].objnum < 0) {
17298 if(
Ships[sindex].objnum < 0){
17303 for ( ; node >= 0; node =
CDR(node) ) {
17306 if(turret == NULL){
17320 for (
int n = node;
n >= 0;
n =
CDR(
n)) {
17328 if (
Ships[sindex].objnum < 0) {
17357 if(
Ships[sindex].objnum < 0){
17384 if(
Ships[sindex].objnum < 0){
17410 if(sindex < 0 ||
Ships[sindex].objnum < 0){
17417 if(turret == NULL){
17429 float capacity,
size;
17503 if(
Ships[sindex].objnum < 0) {
17506 shipp = &
Ships[sindex];
17562 int windex, damage, swave, rset;
17615 int sindex, damage,
debris, rset;
17650 shipp = &
Ships[sindex];
17673 int sindex, damage, rset;
17705 Ship_info[sindex].shockwave.damage_type_idx =
Ship_info[sindex].shockwave.damage_type_idx_sav;
17707 Ship_info[sindex].shockwave.damage_type_idx = damage;
17757 if(
Ships[sindex].objnum < 0){
17764 if(turret == NULL){
17777 if(oindex >= NUM_TURRET_ORDER_TYPES) {
17801 if(
Ships[sindex].objnum < 0){
17814 if(turret == NULL){
17823 if (dirpref == 0) {
17826 CAP(dirpref, 1, 100);
17845 if(
Ships[sindex].objnum < 0){
17858 if(turret == NULL){
17884 if(
Ships[sindex].objnum < 0){
17897 if(turret == NULL){
17925 if(
Ships[sindex].objnum < 0){
17932 if(turret == NULL){
17940 for (j = 0; j < 32; j++) {
17948 for (i = 0; i < 32; i++) {
17955 for(j = 0; j < num_groups; j++) {
17981 if(
Ships[sindex].objnum < 0){
17987 new_target_order[
i] = -1;
17994 if(oindex >= NUM_TURRET_ORDER_TYPES) {
18000 new_target_order[oindex] =
i;
18024 int bank, check, ammo_left = 0;
18030 if (
Ships[sindex].objnum < 0) {
18037 if (turret == NULL) {
18079 int requested_bank;
18080 int requested_weapons;
18092 char *subsys =
CTEXT(node);
18094 if (turret == NULL) {
18102 if (requested_bank < 0)
18109 requested_weapons =
eval_num(node);
18110 if (requested_weapons < 0)
18128 int sindex, requested_bank, requested_weapons;
18156 if (requested_ammo < 0)
18164 if (maximum_allowed < requested_ammo)
18166 requested_ammo = maximum_allowed;
18179 int bank, check, ammo_left = 0;
18185 if (
Ships[sindex].objnum < 0) {
18192 if (turret == NULL) {
18226 int requested_bank;
18227 int requested_weapons;
18239 char *subsys =
CTEXT(node);
18241 if (turret == NULL) {
18249 if (requested_bank < 0)
18258 requested_weapons =
eval_num(node);
18259 if (requested_weapons < 0)
18277 int sindex, requested_bank, requested_weapons;
18299 if (requested_ammo < 0)
18307 if (maximum_allowed < requested_ammo)
18309 requested_ammo = maximum_allowed;
18327 if (
Ships[ship_num].objnum < 0)
18333 for ( ; node >= 0; node =
CDR(node) )
18337 if (rotate == NULL)
18373 if (
Ships[ship_num].objnum < 0)
18379 for ( ; node >= 0; node =
CDR(node) )
18383 if (rotate == NULL)
18396 int ship_num,
n = node;
18397 float turn_time, turn_accel;
18404 if (
Ships[ship_num].objnum < 0)
18410 if (rotate == NULL)
18415 turn_time =
eval_num(n) / 1000.0f;
18422 turn_accel =
eval_num(n) / 1000.0f;
18431 int ship_num, animation_type, animation_subtype, direction,
n = node;
18438 if (
Ships[ship_num].objnum < 0)
18457 if (direction != 1 && direction != -1)
18459 Warning(
LOCATION,
"Direction is %d; it must be 1 or -1!", direction);
18500 if(
Ships[sindex].objnum < 0){
18505 for ( ; node >= 0; node =
CDR(node) ) {
18508 if(subsys == NULL){
18527 if(
Ships[sindex].objnum < 0){
18532 for ( ; node >= 0; node =
CDR(node) ) {
18535 if(subsys == NULL){
18554 if(
Ships[sindex].objnum < 0){
18603 float smallest_hull_pct=1;
18604 int small_shipnum=-1;
18605 float current_hull_pct;
18615 for ( ; n != -1; n =
CDR(n) )
18627 if (
Ships[shipnum].objnum < 0)
18630 shipp=&
Ships[shipnum];
18635 if (current_hull_pct < smallest_hull_pct)
18637 if (small_shipnum != -1)
18642 smallest_hull_pct=current_hull_pct;
18643 small_shipnum=shipnum;
18745 if ((temp_val < 0) && ((
stricmp(
CTEXT(n),
"<species support ship class>")) && (
stricmp(
CTEXT(n),
"<any support ship class>"))) )
18774 int i, arrival_location, arrival_anchor, arrival_mask, arrival_distance, arrival_delay,
n = node;
18783 arrival_location = -1;
18787 arrival_location =
i;
18789 if (arrival_location < 0)
18797 arrival_anchor = -1;
18801 arrival_location = 0;
18809 arrival_anchor =
i;
18812 if (arrival_anchor < 0)
18828 arrival_distance = 0;
18889 int i, departure_location, departure_anchor, departure_mask, departure_delay,
n = node;
18898 departure_location = -1;
18902 departure_location =
i;
18904 if (departure_location < 0)
18912 departure_anchor = -1;
18916 departure_location = 0;
18924 departure_anchor =
i;
18927 if (departure_anchor < 0)
18937 departure_mask = 0;
18943 departure_delay = 0;
19008 int i, j, num_escort_ships, num_priorities, temp_i;
19013 num_priorities = 0;
19014 for ( ; n != -1; n =
CDR(n) )
19016 priority[num_priorities] =
eval_num(n);
19021 num_escort_ships = 0;
19027 if ( shipp->
objnum < 0 )
19035 escort_ship[num_escort_ships].index =
i;
19040 num_escort_ships++;
19044 for (i = 0; i < num_escort_ships; i++)
19046 for (j = 0; j <
i; j++)
19048 if (escort_ship[i].hull < escort_ship[j].hull)
19051 temp_i = escort_ship[
i].index;
19052 temp_f = escort_ship[
i].hull;
19053 escort_ship[
i].index = escort_ship[j].index;
19054 escort_ship[
i].hull = escort_ship[j].hull;
19055 escort_ship[j].index = temp_i;
19056 escort_ship[j].hull = temp_f;
19062 for (i = 0; i < num_escort_ships; i++)
19064 if (i >= num_priorities)
19084 if(
Ships[sindex].objnum < 0){
19104 char *ship_name =
CTEXT(n);
19266 bool add_for_this_player =
true;
19268 if (oswpt_name != NULL) {
19272 add_for_this_player =
false;
19274 switch (oswpt.
type)
19278 add_for_this_player =
true;
19284 add_for_this_player =
true;
19290 add_for_this_player =
true;
19309 char *nav_name =
CTEXT(node);
19310 char *way_name =
CTEXT(
CDR(node));
19316 oswpt_name =
CTEXT(node);
19329 if (oswpt_name != NULL) {
19370 char *nav_name =
CTEXT(node);
19371 char *ship_name =
CTEXT(
CDR(node));
19401 char *nav_name =
CTEXT(node);
19453 char *nav_name =
CTEXT(node);
19461 char *nav_name =
CTEXT(node);
19469 char *nav_name =
CTEXT(node);
19477 char *nav_name =
CTEXT(node);
19486 char *nav_name =
CTEXT(node);
19494 char *nav_name =
CTEXT(node);
19504 char *nav_name =
CTEXT(node);
19514 char *ship_name =
CTEXT(node);
19530 char *nav_name =
CTEXT(node);
19536 char *nav_name =
CTEXT(node);
19558 if(
Ships[sindex].objnum < 0){
19580 if ((Players_target == -1) || (Players_target ==
UNINITIALIZED))
19584 if (!Players_mlocked)
19588 if (
CDR(node) != -1)
19595 if (
CDR(
CDR(node)) != -1)
19620 int sindex, np_index;
19629 if (
CDDR(node) < 0 ) {
19635 if (standard_check) {
19649 while (node >= 0) {
19655 if(
Ships[sindex].objnum >= 0) {
19661 if (standard_check && np_index < 0) {
19664 if (p_objp != NULL) {
19700 while (node != -1) {
19703 if (p_objp != NULL) {
19725 if (p_objp != NULL) {
19738 if ((weapon_info_index > -1) && (
Weapons[i].weapon_info_index != weapon_info_index)) {
19742 if (
Weapons[i].objnum >= 0) {
19750 int weapon_info_index = -1;
19755 if (weapon_info_index == -1) {
19757 mprintf((
"Remove-weapons attempted to remove %s. Weapon not found. Remove-weapons will remove all weapons currently in the mission\n", buf));
19771 int weapon_info_index = -1;
19781 int sindex, np_index = -1;
19789 if(
Ships[sindex].objnum >= 0) {
19795 if (np_index < 0) {
19810 if(
Ships[sindex].objnum < 0){
19855 if (p_objp == NULL) {
19881 int sindex, st_index;
19890 if(
Ships[sindex].objnum < 0){
19925 for(idx = 0; idx < static_cast<int>(
Ship_info.size()); idx++) {
19937 int sindex, si_index;
19945 if(
Ships[sindex].objnum < 0){
19974 if((si_index < 0) || (si_index >= static_cast<int>(
Ship_info.size()))){
19993 if(
Ships[sindex].objnum < 0){
19996 shipp = &
Ships[sindex];
20023 if (exclude_index >= 0) {
20024 exclusion_list[exclude_index] = 1;
20031 for (idx=0; idx<Ship_info[shipp->
ship_info_index].n_subsystems; idx++) {
20032 if ( exclusion_list[idx] == 0 ) {
20035 if (subsys == NULL) {
20036 nprintf((
"Warning",
"Nonexistent subsystem for index %d on ship %s for sabotage subsystem\n", idx, shipp->
ship_name));
20068 if(
Ships[sindex].objnum < 0){
20071 shipp = &
Ships[sindex];
20099 if(
Ships[sindex].objnum < 0){
20102 shipp = &
Ships[sindex];
20125 float remaining = 0.0f;
20160 if (target != -1) {
20189 nprintf((
"Warning",
"Shield-related Special-check SEXPs do not work on ship %s because it uses model point shields.\n",
Player_ship->
ship_name));
20204 nprintf((
"Warning",
"Shield-related Special-check SEXPs do not work on ship %s because it uses model point shields.\n",
Player_ship->
ship_name));
20223 nprintf((
"Warning",
"Shield-related Special-check SEXPs do not work on ship %s because it uses model point shields.\n",
Player_ship->
ship_name));
20235 nprintf((
"Warning",
"Shield-related Special-check SEXPs do not work on ship %s because it uses model point shields.\n",
Player_ship->
ship_name));
20244 nprintf((
"Warning",
"Shield-related Special-check SEXPs do not work on ship %s because it uses model point shields.\n",
Player_ship->
ship_name));
20253 nprintf((
"Warning",
"Shield-related Special-check SEXPs do not work on ship %s because it uses model point shields.\n",
Player_ship->
ship_name));
20265 nprintf((
"Warning",
"Shield-related Special-check SEXPs do not work on ship %s because it uses model point shields.\n",
Player_ship->
ship_name));
20297 nprintf((
"Warning",
"Shield-related Special-check SEXPs do not work on ship %s because it uses model point shields.\n",
Player_ship->
ship_name));
20318 bool first_ch =
true;
20325 for (ch =
CTEXT(n); *ch != 0; ch++)
20327 if ((first_ch && (*ch ==
'-' || *ch ==
'+')) || strchr(
"0123456789", *ch))
20349 int i, sexp_variable_index;
20361 sexp_variable_index = atoi(Sexp_nodes[n].text);
20369 Warning(
LOCATION,
"Cannot assign a string to a non-string variable!");
20383 int sexp_variable_index;
20390 char *str1 =
CTEXT(n);
20392 char *str2 =
CTEXT(n);
20397 sexp_variable_index = atoi(Sexp_nodes[n].text);
20405 Warning(
LOCATION,
"Cannot assign a string to a non-string variable!");
20416 Warning(
LOCATION,
"Concatenated string is too long and will be truncated.");
20427 return strlen(
CTEXT(node));
20434 int sexp_variable_index;
20441 char *parent =
CTEXT(n);
20450 sexp_variable_index = atoi(Sexp_nodes[n].text);
20458 Warning(
LOCATION,
"Cannot assign a string to a non-string variable!");
20462 int parent_len = strlen(parent);
20465 if (pos >= parent_len)
20467 Warning(
LOCATION,
"( string-get-substring %s %d %d ) failed: starting position is larger than the string length!", parent, pos, len);
20472 if (pos + len > parent_len)
20473 len = parent_len -
pos;
20477 strncpy(new_text, &parent[pos], len);
20487 int sexp_variable_index;
20494 char *parent =
CTEXT(n);
20500 char *new_substring =
CTEXT(n);
20505 sexp_variable_index = atoi(Sexp_nodes[n].text);
20513 Warning(
LOCATION,
"Cannot assign a string to a non-string variable!");
20517 int parent_len = strlen(parent);
20518 int new_len = strlen(new_substring);
20521 if (pos >= parent_len)
20523 Warning(
LOCATION,
"( string-set-substring %s %d %d %s ) failed: starting position is larger than the string length!", parent, pos, len, new_substring);
20528 if (len == 1 && new_len == 1)
20531 new_text[
pos] = new_substring[0];
20536 if (pos + len > parent_len)
20537 len = parent_len -
pos;
20540 strncpy(new_text, parent, pos);
20543 strcpy(&new_text[pos], new_substring);
20546 strcat_s(new_text, &parent[pos + len]);
20551 Warning(
LOCATION,
"Concatenated string is too long and will be truncated.");
20568 int no_release_message;
20573 Assertion (node >= 0,
"No message defined in debug SEXP");
20590 if (!no_release_message) {
20617 name =
CTEXT(node);
20643 if (wp_list == NULL)
20647 Training_context_path = wp_list;
20648 Training_context_distance = (
float) atof(
CTEXT(
CDR(node)));
20649 Training_context_goal_waypoint = 0;
20650 Training_context_at_waypoint = -1;
20656 Training_context_speed_min =
eval_num(node);
20657 Training_context_speed_max =
eval_num(
CDR(node));
20658 Training_context_speed_set = 0;
20673 sexp_deal_with_ship_flag(node,
true, 0, 0, 0,
SF2_SCRAMBLE_MESSAGES, 0,
P2_SF2_SCRAMBLE_MESSAGES, scramble,
false,
true);
20686 if(delta_speed > 0.0
f) {
20698 float delta_speed = 0.0f;
20701 delta_speed =
eval_num(node)/1000.0f;
20735 static int Fade_out_r = -1;
20736 static int Fade_out_g = -1;
20737 static int Fade_out_b = -1;
20754 if (R < 0 || R > 255) R = -1;
20760 if (G < 0 || G > 255) G = -1;
20766 if (B < 0 || B > 255) B = -1;
20774 if (R < 0 || G < 0 || B < 0)
20791 if (fade_in && (Fade_out_r >= 0) && (Fade_out_g >= 0) && (Fade_out_b >= 0))
20805 if (!fade_in && ((R > 0) || (G > 0) || (B > 0)))
20839 static camid sexp_camera;
20867 char *cam_name =
CTEXT(node);
20884 float camera_time = 0.0f;
20885 float camera_acc_time = 0.0f;
20886 float camera_dec_time = 0.0f;
20897 camera_time =
eval_num(n) / 1000.0f;
20901 camera_dec_time = camera_acc_time =
eval_num(n) / 1000.0f;
20905 camera_dec_time =
eval_num(n) / 1000.0f;
20910 cam->
set_position(&camera_vec, camera_time, camera_acc_time, camera_dec_time);
20934 float camera_time = 0.0f;
20935 float camera_acc_time = 0.0f;
20936 float camera_dec_time = 0.0f;
20945 cam->
set_position(&camera_vec, camera_time, camera_acc_time, camera_dec_time);
20955 float rot_time = 0.0f;
20956 float rot_acc_time = 0.0f;
20957 float rot_dec_time = 0.0f;
20972 rot_dec_time = rot_acc_time =
eval_num(n) / 1000.0f;
20976 rot_dec_time =
eval_num(n) / 1000.0f;
20981 cam->
set_rotation(&rot_angles, rot_time, rot_acc_time, rot_dec_time);
21000 float rot_time = 0.0f;
21001 float rot_acc_time = 0.0f;
21002 float rot_dec_time = 0.0f;
21011 cam->
set_rotation(&rot_angles, rot_time, rot_acc_time, rot_dec_time);
21021 float rot_time = 0.0f;
21022 float rot_acc_time = 0.0f;
21023 float rot_dec_time = 0.0f;
21037 rot_dec_time = rot_acc_time =
eval_num(n) / 1000.0f;
21041 rot_dec_time =
eval_num(n) / 1000.0f;
21066 float rot_time = 0.0f;
21067 float rot_acc_time = 0.0f;
21068 float rot_dec_time = 0.0f;
21089 switch (oswpt.
type)
21093 Warning(
LOCATION,
"Camera tried to face destroyed/departed object %s", object_name);
21113 float rot_time = 0.0f;
21114 float rot_acc_time = 0.0f;
21115 float rot_dec_time = 0.0f;
21125 rot_dec_time = rot_acc_time =
eval_num(n) / 1000.0f;
21129 rot_dec_time =
eval_num(n) / 1000.0f;
21148 float rot_time = 0.0f;
21149 float rot_acc_time = 0.0f;
21150 float rot_dec_time = 0.0f;
21168 float camera_time = 0.0f;
21169 float camera_acc_time = 0.0f;
21170 float camera_dec_time = 0.0f;
21177 camera_time =
eval_num(n) / 1000.0f;
21181 camera_dec_time = camera_acc_time =
eval_num(n) / 1000.0f;
21185 camera_dec_time =
eval_num(n) / 1000.0f;
21190 cam->
set_fov(camera_fov, camera_time, camera_acc_time, camera_dec_time);
21210 float camera_time = 0.0f;
21211 float camera_acc_time = 0.0f;
21212 float camera_dec_time = 0.0f;
21219 cam->
set_fov(camera_fov, camera_time, camera_acc_time, camera_dec_time);
21227 char *obj_name = NULL;
21228 char *sub_name = NULL;
21230 obj_name =
CTEXT(n);
21233 sub_name =
CTEXT(n);
21236 object *
objp = NULL;
21243 switch (oswpt.
type)
21268 if(o_submodel != NULL)
21397 bool cam_reset =
false;
21416 bool cam_reset =
false;
21419 if((cam != NULL) && cam_reset) {
21428 int x_pos, y_pos,
width=0;
21429 char *text, *imageanim=NULL;
21430 float display_time, fade_time=0.0f;
21431 int r=255,
g=255,
b=255;
21432 bool center_x=
false, center_y=
false;
21434 bool post_shaded =
false;
21449 display_time =
eval_num(n)/1000.0f;
21454 imageanim =
CTEXT(n);
21516 subtitle new_subtitle(x_pos, y_pos, text, imageanim, display_time, fade_time, &new_color, -1, center_x, center_y, width, 0, post_shaded);
21534 int i,
n = node, message_index = -1;
21538 char *ctext =
CTEXT(n);
21569 float display_time =
eval_num(n) / 1000.0f;
21572 float fade_time = 0.0f;
21575 fade_time =
eval_num(n) / 1000.0f;
21610 char *font_name =
CTEXT(n);
21624 bool post_shaded =
false;
21640 if (width_pct > 100)
21658 subtitle new_subtitle(x_pos, y_pos, text, NULL, display_time, fade_time, &new_color, fontnum, center_x, center_y, width, 0, post_shaded);
21666 if (message_index == -1) {
21684 int x_pct, y_pct, width_pct, fontnum, message_index = -1;
21686 float display_time, fade_time=0.0f;
21688 bool center_x=
false, center_y=
false;
21689 bool post_shaded =
false;
21695 if (message_index == -1) {
21699 char *ctext =
Messages[message_index].message;
21721 subtitle new_subtitle(x_pos, y_pos, text, NULL, display_time, fade_time, &new_color, fontnum, center_x, center_y, width, 0, post_shaded);
21751 float display_time =
eval_num(n) / 1000.0f;
21754 float fade_time = 0.0f;
21757 fade_time =
eval_num(n) / 1000.0f;
21761 bool post_shaded =
false;
21779 if (width_pct > 100)
21781 if (height_pct < 0)
21783 if (height_pct > 100)
21793 subtitle new_subtitle(x_pos, y_pos, NULL, image, display_time, fade_time, NULL, -1, center_x, center_y, width, height, post_shaded);
21814 float display_time, fade_time=0.0f;
21815 bool center_x=
false, center_y=
false;
21816 bool post_shaded =
false;
21830 subtitle new_subtitle(x_pos, y_pos, NULL, image, display_time, fade_time, NULL, -1, center_x, center_y, width,
height, post_shaded);
21837 float new_multiplier = 0.0f;
21838 float new_change_time = 0.0f;
21839 float current_multiplier = 0.0f;
21843 new_multiplier =
eval_num(n)/100.0f;
21850 new_change_time =
eval_num(n)/1000.0f;
21857 current_multiplier =
eval_num(n)/100.0f;
21870 float new_change_time = 0.0f;
21871 float new_multiplier = 0.0f;
21872 float current_multiplier = 0.0f;
21953 char *old_name =
CTEXT(n);
21962 char *new_name =
CTEXT(n);
21995 char* jumpnode_name =
CTEXT(n);
22039 char* jumpnode_name =
CTEXT(n);
22046 char* model_name =
CTEXT(n);
22050 jnp->
SetModel(model_name, show_polys);
22077 jnp->
SetModel(model_name, show_polys);
22084 for (
int n = node;
n >= 0;
n =
CDR(
n))
22115 switch(return_type)
22124 Warning(
LOCATION,
"sexp-script-eval failed to evaluate string \"%s\"; check your syntax", s);
22137 Warning(
LOCATION,
"sexp-script-eval failed to evaluate string \"%s\"; check your syntax", s);
22139 if (n != -1 && success)
22142 int variable_index = atoi(Sexp_nodes[n].text);
22149 Warning(
LOCATION,
"Variable for script-eval has to be a string variable!");
22151 else if (ret != NULL)
22170 script_cmd.append(
CTEXT(n));
22177 Warning(
LOCATION,
"sexp-script-eval failed to evaluate string \"%s\"; check your syntax", s);
22188 Warning(
LOCATION,
"sexp-script-eval failed to evaluate string \"%s\"; check your syntax", script_cmd.c_str());
22193 Error(
LOCATION,
"Bad type passed to sexp_script_eval - get a coder");
22203 bool success =
true;
22204 int execute_on_server;
22221 execute_on_server = 1;
22238 execute_on_server = 1;
22248 }
while (node != -1);
22253 if (execute_on_server) {
22258 Warning(
LOCATION,
"sexp-script-eval failed to evaluate string \"%s\"; check your syntax", s);
22266 bool sent_to_all =
false;
22267 bool success =
true;
22278 Assertion(sindex >= 0,
"Illegal value for the ship index sent in multi_sexp_script_eval_multi()! Ship %d does not exist!", sindex);
22286 Warning(
LOCATION,
"sexp-script-eval failed to evaluate string \"%s\"; check your syntax", s);
22303 shipp = &
Ships[sindex];
22304 if (shipp->
objnum < 0) {
22321 vec3d tempv, test_point_buf;
22324 if (reference_ship_obj != NULL)
22329 test_point = &test_point_buf;
22333 return ((test_point->
xyz.x >= box_corner_1->
xyz.x && test_point->
xyz.x <= box_corner_2->
xyz.x) &&
22334 (test_point->
xyz.y >= box_corner_1->
xyz.y && test_point->
xyz.y <= box_corner_2->
xyz.y) &&
22335 (test_point->
xyz.z >= box_corner_1->
xyz.z && test_point->
xyz.z <= box_corner_2->
xyz.z));
22360 vec3d box_corner_1;
22361 box_corner_1.
xyz.x =
MIN(x1, x2);
22362 box_corner_1.
xyz.y =
MIN(y1, y2);
22363 box_corner_1.
xyz.z =
MIN(z1, z2);
22364 vec3d box_corner_2;
22365 box_corner_2.
xyz.x =
MAX(x1, x2);
22366 box_corner_2.
xyz.y =
MAX(y1, y2);
22367 box_corner_2.
xyz.z =
MAX(z1, z2);
22370 object* reference_ship_obj = NULL;
22375 if (sindex < 0 ||
Ships[sindex].objnum < 0)
22382 switch (oswpt.
type)
22404 for (
int n = node;
n != -1;
n =
CDR(
n))
22426 while (node != -1) {
22431 WarningEx(
LOCATION,
"Invalid collision group id %d specified for object %s. Valid IDs range from 0 to 31.\n", group, shipp->
ship_name);
22433 if (add_to_group) {
22434 colgroup_id |= (1<<
group);
22436 colgroup_id &= !(1<<
group);
22457 if (!
stricmp(name, sei->name))
22467 int ship_index, wing_index;
22472 if (effect_num == -1) {
22477 int effect_duration =
eval_num(n);
22523 sp = &
Ships[ship_index];
22530 mprintf((
"Invalid Shipname in SEXP ship-effect\n"));
22549 if (shipp != NULL) {
22550 shippointers.push_back(shipp);
22564 if (fade_time == 0) {
22585 for (
int i = 0;
i < n_ships; ++
i) {
22588 if (fade_time == 0) {
22602 if (ssm_index < 0 || calling_team < 0)
22605 for (
int n = node;
n != -1;
n =
CDR(
n)) {
22608 if (ship_num >= 0) {
22610 object *target_ship = &
Objects[obj_num];
22615 ssm_create(target_ship, &start, ssm_index, NULL, calling_team);
22622 if (Cheats_enabled) {
22691 Error(
LOCATION,
"SEXP has a value which isn't true or false.");
22733 for (
int i = 0;
i < (
int)Current_event_log_buffer->size();
i++) {
22775 Current_event_log_buffer->push_back(buffer);
22779 Current_event_log_buffer->clear();
22792 while (!Current_event_log_buffer->empty()) {
22794 Current_event_log_buffer->pop_back();
22813 return "ALWAYS FALSE";
22816 return "ALWAYS TRUE";
22822 return "NOT A NUMBER";
22825 return "CAN NEVER BE A NUMBER";
22828 return "CAN'T EVALUATE";
22840 Assertion ((Current_event_log_buffer != NULL) &&
22841 (Current_event_log_variable_buffer != NULL)&&
22842 (Current_event_log_argument_buffer != NULL),
"Attempting to write to a non-existent log buffer");
22844 if (op_num == -1) {
22845 nprintf((
"SEXP",
"ERROR: op_num function returned %i, this should not happen. Contact a coder.\n", op_num));
22851 tmp.append(Operators[op_num].text);
22852 tmp.append(
" returned ");
22855 sprintf(buffer,
"%d", result);
22856 tmp.append(buffer);
22863 tmp.append(
" for argument ");
22864 tmp.append(Sexp_replacement_arguments.back());
22867 if (!Current_event_log_argument_buffer->empty()) {
22868 tmp.append(
" for the following arguments");
22869 while (!Current_event_log_argument_buffer->empty()) {
22871 tmp.append(Current_event_log_argument_buffer->back().c_str());
22872 Current_event_log_argument_buffer->pop_back();
22876 if (!Current_event_log_variable_buffer->empty()) {
22877 tmp.append(
"\nVariables:\n");
22878 while (!Current_event_log_variable_buffer->empty()) {
22879 tmp.append(Current_event_log_variable_buffer->back().c_str());
22880 Current_event_log_variable_buffer->pop_back();
22882 tmp.append(Current_event_log_variable_buffer->back().c_str());
22883 Current_event_log_variable_buffer->pop_back();
22888 Current_event_log_buffer->push_back(tmp);
22897 if (cur_node == -1)
22927 if (Sexp_nodes[cur_node].
first != -1) {
22928 node =
CAR(cur_node);
22930 Sexp_nodes[cur_node].
value = Sexp_nodes[node].
value;
22936 node =
CDR(cur_node);
22941 Current_sexp_operator.push_back(op_num);
22943 switch ( op_num ) {
23420 sexp_val =
eval_any_of( cur_node, referenced_node );
25122 Assert(!Current_sexp_operator.empty());
25123 Current_sexp_operator.pop_back();
25165 int arg_num =
find_argnum(parent_node, cur_node);
25172 Error(
LOCATION,
"Error finding sexp argument. Received value %d for sexp:\n%s", sexp_val, sexp_text.c_str());
25208 Warning(
LOCATION,
"Received invalid operator number from host in multi_sexp_eval(). Entire packet may be corrupt. Discarding packet");
25475 Warning(
LOCATION,
"Received invalid SEXP operator number from host. Operator number %d is not supported by this version.", op_num);
25479 Warning(
LOCATION,
"Received invalid SEXP packet from host. Function involving operator %d lacks termination. Entire packet may be corrupt. Discarding remaining packet", op_num);
25496 int start_node, op;
25503 strncpy(buf,
Mp, 512);
25504 if (buf[511] !=
'\0')
25505 strcpy(&buf[506],
"[...]");
25507 Error(
LOCATION,
"Expected to find an open parenthesis in the following sexp:\n%s", buf);
25537 for (i = 0; i < (
int)strlen(buf); i++)
25554 DCF(sexpc,
"Always runs the given sexp command (Warning! There is no undo for this!)")
25560 dc_printf(
"Usage: sexpc sexpression\n. Always runs the given sexp as '( when ( true ) ( sexp ) )' .\n" );
25566 sexp_always =
"( when ( true ) ( " + sexp +
" ) )";
25578 dc_printf(
"Usage: sexp 'sexpression'\n. Runs the given sexp.\n");
25584 int sexp_val =
run_sexp(sexp.c_str());
25594 op = Operators[op].
value;
26179 Warning(
LOCATION,
"Possible unnecessary search for operator index. Trace out and see if this is necessary.\n");
26182 if (Operators[index].
value == op)
26185 Assert(index < Num_operators);
26188 if (argnum >= Operators[index].max)
26256 if (argnum == 0 || argnum == 1) {
26258 }
else if (argnum == 2) {
26265 }
else if (argnum == 1) {
26272 }
else if (argnum == 1 || argnum == 2) {
26274 }
else if (argnum == 3) {
26281 }
else if (argnum == 1 || argnum == 2) {
26283 }
else if (argnum == 3) {
26285 }
else if (argnum == 4) {
26292 }
else if (argnum == 1) {
26384 if(argnum == 1 || argnum == 2)
26398 else if(argnum == 1)
26406 else if (argnum == 1)
26408 else if (argnum == 8)
26410 else if (argnum == 9)
26427 else if (argnum == 1)
26445 else if (argnum == 1)
26466 else if (argnum == 3)
26468 else if (argnum == 7)
26470 else if (argnum > 3)
26547 else if (argnum == 1)
26565 else if (argnum == 1)
26590 else if (argnum < 4)
26598 else if (argnum == 1)
26606 else if (argnum == 1)
26608 else if (argnum < 5)
26610 else if (argnum == 5)
26612 else if (argnum < 9)
26621 else if (argnum == 1)
26623 else if (argnum < 5)
26681 else if (argnum == 1)
26695 else if (argnum == 1)
26701 else if (argnum == 1)
26703 else if (argnum == 2)
26711 else if(argnum < 6)
26719 else if (argnum <= 6)
26731 else if (argnum == 1)
26739 else if (argnum == 1)
26747 else if (argnum == 1)
26753 else if ( argnum == 1 )
26798 else if (argnum == 1)
26830 else if (argnum == 1)
26847 else if (argnum == 1)
26864 else if (argnum == 1)
26866 else if (argnum == 2)
26880 else if (argnum == 1)
26894 else if (argnum == 1)
26896 else if (argnum == 2)
26908 else if (argnum == 1)
26917 else if (argnum == 1)
26974 int a_mod = argnum % 2;
26997 int a_mod = (argnum - 1) % 2;
27037 else if (argnum == 10)
27045 else if (argnum == 8 || argnum == 9)
27054 else if ( argnum == 1 )
27062 int a_mod = argnum % 4;
27067 else if(a_mod == 1)
27069 else if(a_mod == 2)
27071 else if(a_mod == 3)
27098 else if (argnum == 1)
27106 else if (argnum == 1)
27127 else if (argnum == 1 )
27140 else if ( argnum == 1 )
27148 else if (argnum == 1 )
27157 else if (argnum == 1 )
27159 else if (argnum == 2)
27179 else if ( argnum == 1 )
27215 else if (argnum == 1)
27217 else if (argnum == 2)
27267 if ( argnum == 0 ) {
27281 if ( argnum == 0 ) {
27283 }
else if ( argnum == 1 ) {
27352 else if ( argnum == 1 )
27354 else if ( argnum == 2 )
27362 if ( argnum == 0 ){
27371 if ( argnum == 0 ){
27379 if ( argnum == 0 ){
27381 }
else if ( argnum == 1 ){
27388 if ( argnum == 0 ){
27404 }
else if (argnum == 1) {
27406 }
else if (argnum == 2) {
27478 if (argnum == 0 ) {
27522 }
else if(argnum == 1) {
27524 }
else if(argnum == 2) {
27526 }
else if(argnum > 2) {
27533 }
else if(argnum == 1) {
27542 }
else if(argnum == 1) {
27551 }
else if(argnum == 1) {
27560 }
else if(argnum == 1) {
27562 }
else if(argnum == 2) {
27571 }
else if(argnum == 1) {
27573 }
else if(argnum == 2) {
27582 }
else if(argnum == 1) {
27584 }
else if(argnum == 2) {
27593 }
else if(argnum == 1) {
27595 }
else if(argnum == 2) {
27604 }
else if(argnum == 1) {
27620 }
else if(argnum == 1) {
27644 else if (argnum == 1)
27646 else if (argnum == 2)
27654 else if (argnum == 1)
27656 else if (argnum == 2 || argnum == 3)
27658 else if (argnum == 4)
27660 else if (argnum == 5)
27681 }
else if(argnum == 1){
27703 }
else if (argnum == 1 || argnum == 2) {
27765 else if (argnum == 2)
27781 }
else if (argnum == 1){
27830 else if (argnum == 1) {
27883 else if (argnum == 1)
27893 if ((argnum == 0) || (argnum == 2))
27895 if ((argnum == 1) || (argnum == 3))
27909 else if (argnum == 1)
27911 else if (argnum == 2)
27913 else if (argnum == 3)
27915 else if (argnum == 4 || argnum == 5)
27917 else if (argnum == 6)
27925 else if (argnum == 1)
27927 else if (argnum == 2)
27929 else if (argnum == 3 || argnum == 4)
27931 else if (argnum == 5)
27961 else if (argnum == 1)
28000 else if (argnum==1)
28002 else if (argnum==2)
28077 else if (argnum == 2)
28079 else if (argnum == 3)
28081 else if (argnum == 4)
28083 else if (argnum == 5)
28085 else if (argnum < 8)
28087 else if (argnum < 12)
28089 else if (argnum == 12 )
28095 else if (argnum == 1 || argnum == 2)
28097 else if (argnum == 3 || argnum == 4)
28099 else if (argnum >= 5 && argnum <= 10)
28101 else if (argnum == 11)
28103 else if (argnum == 12)
28109 else if (argnum == 1 || argnum == 2)
28111 else if (argnum == 3 || argnum == 4)
28113 else if (argnum >= 5 && argnum <= 8)
28115 else if (argnum == 9)
28123 else if (argnum==1)
28135 else if (argnum == 1)
28147 else if (argnum == 8)
28158 else if (argnum == 5)
28192 else if (argnum == 1)
28198 if ((argnum == 0) || (argnum == 1))
28200 else if ((argnum >= 2) && (argnum <=4))
28205 if ( argnum == 0 ) {
28218 else if (argnum == 1)
28274 else if (argnum == 1)
28309 strcpy(
CTEXT(i), new_name);
28318 if (!strcmp(old_name, new_name)) {
28341 if (Sexp_nodes[node].
first)
28344 if (Sexp_nodes[node].rest)
28358 n = Sexp_nodes[node].
rest;
28373 strcpy(
CTEXT(n), new_name);
28377 n = Sexp_nodes[
n].
rest;
28394 if (n == Num_sexp_nodes){
28404 if (
Ships[i].objnum >= 0) {
28414 if (
Wings[i].wave_count) {
28463 len = strlen(text);
28464 if (text[0] !=
'(' || text[len - 1] !=
')'){
28506 if ((**str ==
' ') || (**str ==
'\t')){
28513 int count = 0, dot = 0;
28515 while (isdigit(**str) || **str ==
'.') {
28516 if (**str ==
'.') {
28574 return "Data shouldn't have arguments";
28577 return "Operator expected instead of data";
28580 return "Unrecognized operator";
28583 return "Argument type mismatch";
28586 return "Argument count is illegal";
28589 return "Unknown operator argument type";
28592 return "Not a number";
28595 return "Invalid ship name";
28598 return "Invalid wing name";
28601 return "Invalid subsystem name";
28604 return "Invalid subsystem type";
28607 return "Invalid team name";
28610 return "Invalid AI class name";
28613 return "Invalid point";
28616 return "Negative number not allowed";
28619 return "Invalid ship/wing name";
28622 return "Invalid ship type";
28625 return "Invalid message name";
28628 return "Invalid priority";
28631 return "Invalid mission filename";
28634 return "Invalid goal name";
28637 return "Mission level too low in tree";
28640 return "Invalid message source";
28643 return "Invalid docker point";
28646 return "Invalid dockee point";
28649 return "Ship not allowed to have this order";
28652 return "Ship can't dock with target ship";
28655 return "Number is out of range";
28658 return "Event name is invalid (not known)";
28661 return "Skill level name is invalid (not known)";
28664 return "Invalid medal name";
28667 return "Invalid weapon name";
28670 return "Invalid intel name";
28673 return "Invalid ship class name";
28676 return "Invalid HUD gauges name";
28679 return "Invalid Jump Node name";
28682 return "Unknown error";
28685 return "Invalid support ship class";
28688 return "Ship does not have a fighter bay";
28691 return "Invalid arrival location";
28694 return "Invalid departure location";
28697 return "Invalid universal arrival anchor";
28700 return "Invalid soundtrack name";
28703 return "Invalid persona name";
28706 return "Invalid variable name";
28709 return "Invalid variable type";
28712 return "Invalid font";
28715 return "Invalid hud element magic name";
28718 return "Invalid sound environment";
28721 return "Invalid sound environment option";
28724 return "Invalid audio volume option";
28727 return "Invalid explosion option";
28730 return "Invalid ship effect name";
28733 return "Invalid turret target order";
28736 return "Invalid armor type";
28739 return "Invalid damage type";
28742 return "Invalid hud gauge";
28745 return "Invalid target priorities";
28748 return "Invalid animation type";
28751 return "Invalid mission mood";
28754 return "Invalid ship flag";
28757 return "Not a valid Team Color setting";
28760 return "Invalid game sound";
28763 return "Invalid SSM class";
28767 return "Unhandled sexp error code!";
28776 if (Operators[op].
value == sexp_ai_goal)
28779 Assert(op < Num_operators);
28781 if (Sexp_ai_goal_links[i].op_code == sexp_ai_goal)
28784 Assert(i < Num_sexp_ai_goal_links);
28792 char *text = Sexp_nodes[node].
text;
28793 char char_index[8];
28795 int variable_index;
28798 start_index = text + 15;
28799 Assert(isdigit(*start_index));
28803 while ( *start_index !=
']' ) {
28804 char_index[len++] = *(start_index++);
28809 char_index[
len] = 0;
28811 variable_index = atoi(char_index);
28814 return variable_index;
28823 int sexp_variable_index = -1;
28825 char *current_argument;
28827 Assertion(n >= 0 && n < Num_sexp_nodes,
"Passed an out-of-range node index (%d) to CTEXT!", n);
28839 return Sexp_nodes[
n].
text;
28844 if (Sexp_replacement_arguments.empty())
28845 return Sexp_nodes[n].text;
28851 current_argument = Sexp_replacement_arguments.back();
28861 if (sexp_variable_index != -1)
28862 return Sexp_variables[sexp_variable_index].
text;
28864 return Sexp_replacement_arguments.back();
28873 Assert(sexp_variable_index != -1);
28877 sexp_variable_index = atoi(Sexp_nodes[n].text);
28886 Current_event_log_variable_buffer->push_back(Sexp_variables[sexp_variable_index].text);
28887 Current_event_log_variable_buffer->push_back(Sexp_variables[sexp_variable_index].variable_name);
28890 return Sexp_variables[sexp_variable_index].
text;
28894 return Sexp_nodes[
n].
text;
28917 strcpy_s(Block_variables[index].text, text);
28918 strcpy_s(Block_variables[index].variable_name, var_name);
28944 strcpy_s(Sexp_variables[index].text, text);
28945 strcpy_s(Sexp_variables[index].variable_name, var_name);
28958 strcpy_s(Sexp_variables[index].text,
"");
28959 strcpy_s(Sexp_variables[index].variable_name,
"variable array block");
28978 if (strchr(text,
'$') != NULL)
28991 strcpy_s(Sexp_variables[index].text, text);
29012 int variable_index = -1;
29024 mprintf((
"Warning; received multi packet for variable index which is not set! Assuming this should be an array block variable...\n"));
29028 strcpy_s(Sexp_variables[variable_index].text, value);
29034 int sexp_variable_index;
29047 sexp_variable_index = atoi(Sexp_nodes[n].text);
29056 sprintf(number_as_str,
"%d", new_number);
29081 if (Sexp_nodes[node].
first >= 0)
29095 int sexp_variable_index;
29107 sexp_variable_index =
eval_num(node);
29127 sprintf(number_as_str,
"%d", new_number);
29149 int sexp_variable_index;
29154 sexp_variable_index =
eval_num(node);
29165 mprintf((
"warning: retrieving a value from a sexp variable which is not in use!\n"));
29169 mprintf((
"warning: retrieving a value from a sexp variable which is not set!\n"));
29174 mprintf((
"warning: variable %d is a string but it is not possible to return a string value through a sexp!\n", sexp_variable_index));
29178 return atoi(Sexp_variables[sexp_variable_index].text);
29206 mprintf((
"warning: retrieving a value from a sexp variable which is not in use!\n"));
29210 mprintf((
"warning: retrieving a value from a sexp variable which is not set!\n"));
29214 to_index = atoi(Sexp_nodes[
CDR(node)].text);
29217 Assert(Sexp_variables[to_index].
type & SEXP_VARIABLE_SET);
29223 Warning(
LOCATION,
"copy-variable-from-index: cannot copy variables of different types! source = '%s', destination = '%s'", Sexp_variables[from_index].variable_name, Sexp_variables[to_index].variable_name);
29263 mprintf((
"warning: retrieving a value from a sexp variable which is not in use!\n"));
29267 mprintf((
"warning: retrieving a value from a sexp variable which is not set!\n"));
29270 if (!(Sexp_variables[to_index].
type & SEXP_VARIABLE_SET))
29280 Warning(
LOCATION,
"copy-variable-between-indexes: cannot copy variables of different types! source = '%s', destination = '%s'", Sexp_variables[from_index].variable_name, Sexp_variables[to_index].variable_name);
29295 strcpy_s(Sexp_variables[index].text, text);
29296 strcpy_s(Sexp_variables[index].variable_name, var_name);
29315 var_index = atoi(Sexp_nodes[node].text);
29329 if ( !strcmp(Sexp_variables[
i].variable_name, text) ) {
29347 if ( text == Sexp_variables[
i].variable_name ) {
29365 if ( !strncmp(startpos, Sexp_variables[
i].variable_name, strlen(Sexp_variables[
i].variable_name)) ) {
29383 size_t pos = text.find(Sexp_variables[
i].variable_name, startpos);
29384 if (pos != SCP_string::npos && pos == startpos) {
29400 bool replaced_anything =
false;
29404 pos = strchr(pos,
'$');
29411 if (var_index >= 0)
29416 strncpy(what_to_replace, pos, strlen(Sexp_variables[var_index].variable_name) + 1);
29419 pos = text +
replace_one(text, what_to_replace, Sexp_variables[var_index].text, max_len);
29420 replaced_anything =
true;
29428 }
while (pos != NULL);
29430 return replaced_anything;
29436 bool replaced_anything =
false;
29438 size_t lookHere = 0;
29443 foundHere = text.find(
'$', lookHere);
29446 if (foundHere != SCP_string::npos)
29450 if (var_index >= 0)
29453 text.replace(foundHere, strlen(Sexp_variables[var_index].variable_name)+1, Sexp_variables[var_index].text);
29454 replaced_anything =
true;
29456 lookHere = foundHere + strlen(Sexp_variables[var_index].text);
29461 lookHere = foundHere + 1;
29464 }
while (foundHere != SCP_string::npos);
29466 return replaced_anything;
29476 if ((Sexp_variables[
i].
type & variable_type)) {
29528 if (!(Sexp_variables[
i].
type & variable_type)) {
29532 if (
i == sexp_variables_index) {
29563 if (!set1 && !set2) {
29565 }
else if (set1 && !set2) {
29567 }
else if (!set1 && set2) {
29596 return atoi(
CTEXT(n));
29604 if (!
stricmp(sexp_name, Operators[
i].text))
29605 return Operators[
i].
value;
30084 {
OP_PLUS,
"Plus (Arithmetic operator)\r\n"
30085 "\tAdds numbers and returns results.\r\n\r\n"
30086 "Returns a number. Takes 2 or more numeric arguments." },
30088 {
OP_MINUS,
"Minus (Arithmetic operator)\r\n"
30089 "\tSubtracts numbers and returns results.\r\n\r\n"
30090 "Returns a number. Takes 2 or more numeric arguments." },
30092 {
OP_MOD,
"Mod (Arithmetic operator)\r\n"
30093 "\tDivides numbers and returns the remainer.\r\n\r\n"
30094 "Returns a number. Takes 2 or more numeric arguments." },
30096 {
OP_MUL,
"Multiply (Arithmetic operator)\r\n"
30097 "\tMultiplies numbers and returns results.\r\n\r\n"
30098 "Returns a number. Takes 2 or more numeric arguments." },
30100 {
OP_DIV,
"Divide (Arithmetic operator)\r\n"
30101 "\tDivides numbers and returns results.\r\n\r\n"
30102 "Returns a number. Takes 2 or more numeric arguments." },
30104 {
OP_RAND,
"Rand (Arithmetic operator)\r\n"
30105 "\tGets a random number. This number will not change on successive calls to this sexp.\r\n\r\n"
30106 "Returns a number. Takes 2 or 3 numeric arguments...\r\n"
30107 "\t1:\tLow range of random number.\r\n"
30108 "\t2:\tHigh range of random number.\r\n"
30109 "\t3:\t(optional) A seed to use when generating numbers. (Setting this to 0 is the same as having no seed at all)" },
30113 "\tGets a random number. This number can and will change between successive calls to this sexp.\r\n\r\n"
30114 "Returns a number. Takes 2 or 3 numeric arguments...\r\n"
30115 "\t1:\tLow range of random number.\r\n"
30116 "\t2:\tHigh range of random number.\r\n"
30117 "\t3:\t(optional) A seed to use when generating numbers. (Setting this to 0 is the same as having no seed at all)" },
30121 "Returns true when the player has visited the given navpoint (Has closed to within 1000m of it). Takes 1 argument...\r\n"
30122 "\t1:\tThe name of the navpoint" },
30125 "Returns the distance from the player ship to that nav point. Takes 1 argument..."
30126 "\t1:\tThe name of the navpoint" },
30129 "Adds a Navpoint to a navpoint path. Takes 3 or 4 Arguments...\r\n"
30130 "\t1:\tName of the new navpoint.\r\n"
30131 "\t2:\tName of the navpoint path the new navpoint should be added to.\r\n"
30132 "\t3:\tPosition where the new navpoint will be inserted. Note: This is 1-indexed, so the first waypoint in a path has position 1.\r\n"
30133 "\t4:\t(Optional Argument) Controls the visibility of the new navpoint. Only entities belonging to the chosen category will be able to see it.\r\n" },
30136 "Binds the named navpoint to the named ship - when the ship moves, the waypoint moves with it. Takes 2 Arguments...\r\n"
30137 "\t1:\tThe NavPoint's Name\r\n"
30138 "\t2:\tThe Ship's Name\r\n" },
30141 "Deletes a nav point. Takes 1 Argument...\r\n"
30142 "\t1:\tNavPoint Name" },
30145 "Hides a nav point. Takes 1 Argument...\r\n"
30146 "\t1:\tNavPoint Name, it then 'hides' that Nav Point\r\n" },
30149 "This causes the nav point to be unselectable. Takes 1 Argument...\r\n"
30150 "\t1:\tThe Navpoint name\r\n" },
30153 "Restores a hidden navpoint. Takes 1 Argument...\r\n"
30154 "\t1:\tThe Navpoint Name\r\n" },
30157 "Removes restrictions from a Navpoint. Takes 1 Argument...\r\n"
30158 "\t1:\tThe Navpoint Name\r\n" },
30161 "Sets the status of the given Navpoint to \"visited\". Takes 1 Argument...\r\n"
30162 "\t1:\tThe Navpoint Name\r\n" },
30165 "Removes the \"visited\" status from a Navpoint. Takes 1 Argument...\r\n"
30166 "\t1:\tThe Navpoint Name\r\n" },
30169 "Sets the Nav Carry flag for all listed ships. Vessels with this flag will follow the player into and out of autopilot.\r\n"
30170 "Takes 1 or more arguments...\r\n"
30171 "\t1:\tShips and Wings that should receive the Nav Carry flag.\r\n" },
30174 "Removes the Nav Carry flag from all listed ships and wings. Takes 1 or more arguments...\r\n"
30175 "\t1:\tShips and Wings to remove the Nav Carry flag from\r\n" },
30178 "Marks all listed ships as needing to link up before entering autopilot.\r\n"
30179 "Takes 1 or more arguments...\r\n"
30180 "\t1:\tShips to mark\r\n" },
30183 "Removes the requirement for the listed ships to link up before entering autopilot.\r\n"
30184 "Takes 1 or more arguments...\r\n"
30185 "\t1:\tShips to mark\r\n" },
30188 "Determines if a ship is linked for autopilot (\"set-nav-carry\" or \"set-nav-needslink\" + linked)"
30189 "Takes 1 argument...\r\n"
30190 "\t1:\tShip to check\r\n"},
30193 "Controls the use of the cinematic autopilot camera. Takes 1 Argument..."
30194 "\t1:\tSet to true to enable automatic cinematics, set to false to disable automatic cinematics." },
30197 "Takes 1 boolean argument.\r\n"
30198 "\t1:\tSet to true to enable autopilot, set to false to disable autopilot." },
30201 "\tSelects a nav point.\r\n\r\n"
30202 "Takes 1 argument...\r\n"
30203 "\t1:\tName of the nav point." },
30206 "\tDeselects any navpoint selected.\r\n\r\n"
30207 "Takes no arguments..." },
30212 {
OP_ABS,
"Absolute value (Arithmetic operator)\r\n"
30213 "\tReturns the absolute value of a number. Takes 1 numeric argument.\r\n" },
30216 {
OP_MIN,
"Minimum value (Arithmetic operator)\r\n"
30217 "\tReturns the minimum of a set of numbers. Takes 1 or more numeric arguments.\r\n" },
30220 {
OP_MAX,
"Maximum value (Arithmetic operator)\r\n"
30221 "\tReturns the maximum of a set of numbers. Takes 1 or more numeric arguments.\r\n" },
30224 {
OP_AVG,
"Average value (Arithmetic operator)\r\n"
30225 "\tReturns the average (rounded to the nearest integer) of a set of numbers. Takes 1 or more numeric arguments.\r\n" },
30228 {
OP_POW,
"Power (Arithmetic operator)\r\n"
30229 "\tRaises one number to the power of the next number. If the result will be larger than INT_MAX or smaller than INT_MIN, the appropriate limit will be returned. Takes 2 numeric arguments.\r\n" },
30232 {
OP_SIGNUM,
"Signum (Arithmetic operator)\r\n"
30233 "\tReturns the sign of a number: -1 if it is negative, 0 if it is 0, and 1 if it is positive. Takes one argument.\r\n" },
30237 "\tTurns on (sets to 1) a certain bit in the provided number, returning the result. This allows numbers to store up to 32 boolean flags, from 2^0 to 2^31. Takes 2 numeric arguments...\r\n"
30238 "\t1: The number whose bit should be set\r\n"
30239 "\t2: The index of the bit to set. Valid indexes are between 0 and 31, inclusive.\r\n" },
30243 "\tTurns off (sets to 0) a certain bit in the provided number, returning the result. This allows numbers to store up to 32 boolean flags, from 2^0 to 2^31. Takes 2 numeric arguments...\r\n"
30244 "\t1: The number whose bit should be unset\r\n"
30245 "\t2: The index of the bit to unset. Valid indexes are between 0 and 31, inclusive.\r\n" },
30249 "\tReturns true if the specified bit is set (equal to 1) in the provided number. Takes 2 numeric arguments...\r\n"
30250 "\t1: The number whose bit should be tested\r\n"
30251 "\t2: The index of the bit to test. Valid indexes are between 0 and 31, inclusive.\r\n" },
30255 "\tPerforms the bitwise AND operator on its arguments. This is the same as if the logical AND operator was performed on each successive bit. Takes 2 or more numeric arguments.\r\n" },
30259 "\tPerforms the bitwise OR operator on its arguments. This is the same as if the logical OR operator was performed on each successive bit. Takes 2 or more numeric arguments.\r\n" },
30263 "\tPerforms the bitwise NOT operator on its argument. This is the same as if the logical NOT operator was performed on each successive bit.\r\n\r\n"
30264 "Note that the operation is performed as if on an unsigned integer whose maximum value is INT_MAX. In other words, there is no need to worry about the sign bit.\r\n\r\n"
30265 "Takes only 1 argument.\r\n" },
30269 "\tPerforms the bitwise XOR operator on its arguments. This is the same as if the logical XOR operator was performed on each successive bit. Takes 2 or more numeric arguments.\r\n" },
30272 "\tSets the X speed of a ship or wing."
30273 "Takes 2 or 3 arguments...\r\n"
30274 "\t1: The name of the object.\r\n"
30275 "\t2: The speed to set.\r\n"
30276 "\t3: Whether the speed on the axis should be set according to the universe grid (when false) or according to the object's facing (when true); You almost always want to set this to true; (optional; defaults to false).\r\n" },
30279 "\tSets the Y speed of a ship or wing."
30280 "Takes 2 or 3 arguments...\r\n"
30281 "\t1: The name of the object.\r\n"
30282 "\t2: The speed to set.\r\n"
30283 "\t3: Whether the speed on the axis should be set according to the universe grid (when false) or according to the object's facing (when true); You almost always want to set this to true; (optional; defaults to false).\r\n" },
30286 "\tSets the Z speed of a ship or wing."
30287 "Takes 2 or 3 arguments...\r\n"
30288 "\t1: The name of the object.\r\n"
30289 "\t2: The speed to set.\r\n"
30290 "\t3: Whether the speed on the axis should be set according to the universe grid (when false) or according to the object's facing (when true); You almost always want to set this to true; (optional; defaults to false).\r\n" },
30293 "\tReturns the X speed of a ship or wing as an integer."
30294 "Takes 2 or 3 arguments...\r\n"
30295 "\t1: The name of the object.\r\n"
30296 "\t2: Whether the speed on the axis should be set according to the universe grid (when false) or according to the object's facing (when true); You almost always want to set this to true; (optional; defaults to false).\r\n" },
30299 "\tReturns the Y speed of a ship or wing as an integer."
30300 "Takes 2 or 3 arguments...\r\n"
30301 "\t1: The name of the object.\r\n"
30302 "\t2: Whether the speed on the axis should be set according to the universe grid (when false) or according to the object's facing (when true); You almost always want to set this to true; (optional; defaults to false).\r\n" },
30305 "\tReturns the Z speed of a ship or wing as an integer."
30306 "Takes 2 or 3 arguments...\r\n"
30307 "\t1: The name of the object.\r\n"
30308 "\t2: Whether the speed on the axis should be set according to the universe grid (when false) or according to the object's facing (when true); You almost always want to set this to true; (optional; defaults to false).\r\n" },
30312 "\tReturns the absolute X coordinate of a set of coordinates relative to a particular object (or object's "
30313 "subsystem). The input coordinates are the coordinates relative to the object's position and orientation. "
30314 "If no input coordinates are specified, the coordinate returned is the coordinate of the object (or object's "
30315 "subsystem) itself. Takes 1 to 5 arguments...\r\n"
30316 "\t1: The name of a ship, wing, or waypoint.\r\n"
30317 "\t2: A ship subsystem (or \"" SEXP_NONE_STRING "\" if the first argument is not a ship - optional).\r\n"
30318 "\t3: The relative X coordinate (optional).\r\n"
30319 "\t4: The relative Y coordinate (optional).\r\n"
30320 "\t5: The relative Z coordinate (optional).\r\n" },
30324 "\tReturns the absolute Y coordinate of a set of coordinates relative to a particular object (or object's "
30325 "subsystem). The input coordinates are the coordinates relative to the object's position and orientation. "
30326 "If no input coordinates are specified, the coordinate returned is the coordinate of the object (or object's "
30327 "subsystem) itself. Takes 1 to 5 arguments...\r\n"
30328 "\t1: The name of a ship, wing, or waypoint.\r\n"
30329 "\t2: A ship subsystem (or \"" SEXP_NONE_STRING "\" if the first argument is not a ship - optional).\r\n"
30330 "\t3: The relative X coordinate (optional).\r\n"
30331 "\t4: The relative Y coordinate (optional).\r\n"
30332 "\t5: The relative Z coordinate (optional).\r\n" },
30336 "\tReturns the absolute Z coordinate of a set of coordinates relative to a particular object (or object's "
30337 "subsystem). The input coordinates are the coordinates relative to the object's position and orientation. "
30338 "If no input coordinates are specified, the coordinate returned is the coordinate of the object (or object's "
30339 "subsystem) itself. Takes 1 to 5 arguments...\r\n"
30340 "\t1: The name of a ship, wing, or waypoint.\r\n"
30341 "\t2: A ship subsystem (or \"" SEXP_NONE_STRING "\" if the first argument is not a ship - optional).\r\n"
30342 "\t3: The relative X coordinate (optional).\r\n"
30343 "\t4: The relative Y coordinate (optional).\r\n"
30344 "\t5: The relative Z coordinate (optional).\r\n" },
30348 "\tInstantaneously sets an object's spatial coordinates."
30349 "Takes 4 arguments...\r\n"
30350 "\t1: The name of a ship, wing, or waypoint.\r\n"
30351 "\t2: The new X coordinate.\r\n"
30352 "\t3: The new Y coordinate.\r\n"
30353 "\t4: The new Z coordinate." },
30357 "\tReturns the pitch angle, in degrees, of a particular object. The returned value will be between 0 and 360. Takes 1 argument...\r\n"
30358 "\t1: The name of a ship or wing.\r\n" },
30362 "\tReturns the bank angle, in degrees, of a particular object. The returned value will be between 0 and 360. Takes 1 argument...\r\n"
30363 "\t1: The name of a ship or wing.\r\n" },
30367 "\tReturns the heading angle, in degrees, of a particular object. The returned value will be between 0 and 360. Takes 1 argument...\r\n"
30368 "\t1: The name of a ship or wing.\r\n" },
30372 "\tInstantaneously sets an object's spatial orientation."
30373 "Takes 4 arguments...\r\n"
30374 "\t1: The name of a ship or wing.\r\n"
30375 "\t2: The new pitch angle, in degrees. The angle can be any number; it does not have to be between 0 and 360.\r\n"
30376 "\t3: The new bank angle, in degrees. The angle can be any can be any number; it does not have to be between 0 and 360.\r\n"
30377 "\t4: The new heading angle, in degrees. The angle can be any number; it does not have to be between 0 and 360." },
30379 {
OP_TRUE,
"True (Boolean operator)\r\n"
30380 "\tA true boolean state\r\n\r\n"
30381 "Returns a boolean value." },
30383 {
OP_FALSE,
"False (Boolean operator)\r\n"
30384 "\tA false boolean state\r\n\r\n"
30385 "Returns a boolean value." },
30387 {
OP_AND,
"And (Boolean operator)\r\n"
30388 "\tAnd is true if all of its arguments are true.\r\n\r\n"
30389 "Returns a boolean value. Takes 2 or more boolean arguments." },
30391 {
OP_OR,
"Or (Boolean operator)\r\n"
30392 "\tOr is true if any of its arguments are true.\r\n\r\n"
30393 "Returns a boolean value. Takes 2 or more boolean arguments." },
30395 {
OP_XOR,
"Xor (Boolean operator)\r\n"
30396 "\tXor is true if exactly one of its arguments is true.\r\n\r\n"
30397 "Returns a boolean value. Takes 2 or more boolean arguments." },
30399 {
OP_EQUALS,
"Equals (Boolean operator)\r\n"
30400 "\tIs true if all of its arguments are equal.\r\n\r\n"
30401 "Returns a boolean value. Takes 2 or more numeric arguments." },
30404 "\tTrue if the first argument is greater than the subsequent argument(s).\r\n\r\n"
30405 "Returns a boolean value. Takes 2 numeric arguments." },
30408 "\tTrue if the first argument is less than the subsequent argument(s).\r\n\r\n"
30409 "Returns a boolean value. Takes 2 numeric arguments." },
30412 "\tIs true if the first argument is not equal to any of the subsequent arguments.\r\n\r\n"
30413 "Returns a boolean value. Takes 2 or more numeric arguments." },
30416 "\tTrue if the first argument is greater than or equal to the subsequent argument(s).\r\n\r\n"
30417 "Returns a boolean value. Takes 2 numeric arguments." },
30420 "\tTrue if the first argument is less than or equal to the subsequent argument(s).\r\n\r\n"
30421 "Returns a boolean value. Takes 2 numeric arguments." },
30425 "\tThis sexp allows actions to be performed as part of a conditional test. It is most useful for assigning variables or performing some sort of pre-test action within the conditional part of \"when\", etc. "
30426 "It works well as the first branch of an \"and\" sexp, provided it returns true so as to not affect the return value of the \"and\".\r\n\r\n"
30427 "Returns a boolean value. Takes 2 or more arguments.\r\n"
30428 "\t1:\tA boolean value to return after all successive actions have been performed.\r\n"
30429 "\tRest:\tActions to perform, which would normally appear in a \"when\" sexp.\r\n" },
30433 "\tIs true if all of its arguments are equal.\r\n\r\n"
30434 "Returns a boolean value. Takes 2 or more string arguments." },
30438 "\tTrue if the first argument is greater than the second argument.\r\n\r\n"
30439 "Returns a boolean value. Takes 2 string arguments." },
30443 "\tTrue if the first argument is less than the second argument.\r\n\r\n"
30444 "Returns a boolean value. Takes 2 string arguments." },
30447 {
OP_IS_IFF,
"Is IFF (Boolean operator)\r\n"
30448 "\tTrue if ship(s) or wing(s) are all of the specified team.\r\n\r\n"
30449 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30450 "\t1:\tTeam (\"friendly\", \"hostile\", \"neutral\", or \"unknown\").\r\n"
30451 "\tRest:\tName of ship or wing to check." },
30455 "\tTrue if ship or ship subsystem(s) is/are all of the specified AI class.\r\n\r\n"
30456 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30457 "\t1:\tAI class (\"None\", \"Coward\", \"Lieutenant\", etc.)\r\n"
30458 "\t2:\tName of ship to check.\r\n"
30459 "\tRest:\tName of ship subsystem(s) to check (optional)" },
30463 "\tTrue if ship or ships is/are all of the specified ship type.\r\n\r\n"
30464 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30465 "\t1:\tShip type (\"fighter\", \"bomber\", etc.)\r\n"
30466 "\t2:\tName of ship to check.\r\n" },
30470 "\tTrue if ship or ships is/are all of the specified ship class.\r\n\r\n"
30471 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30472 "\t1:\tShip class\r\n"
30473 "\t2:\tName of ship to check.\r\n" },
30476 "\tBecomes true when the specified amount of time has elapsed (Mission time "
30477 "becomes greater than the specified time).\r\n"
30478 "Returns a boolean value. Takes 1 numeric argument...\r\n"
30479 "\t1:\tThe amount of time in seconds." },
30481 {
OP_NOT,
"Not (Boolean operator)\r\n"
30482 "\tReturns opposite boolean value of argument (True becomes false, and "
30483 "false becomes true).\r\n\r\n"
30484 "Returns a boolean value. Takes 1 boolean argument." },
30487 "\tReturns true if the specified goal in the specified mission is true "
30488 "(or succeeded). It returns false otherwise.\r\n\r\n"
30489 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30490 "\t1:\tName of the mission.\r\n"
30491 "\t2:\tName of the goal in the mission.\r\n"
30492 "\t3:\t(Optional) True/False which signifies what this sexpression should return when "
30493 "this mission is played as a single mission." },
30496 "\tReturns true if the specified goal in the specified mission "
30497 "is false (or failed). It returns false otherwise.\r\n\r\n"
30498 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30499 "\t1:\tName of the mission.\r\n"
30500 "\t2:\tName of the goal in the mission.\r\n"
30501 "\t3:\t(Optional) True/False which signifies what this sexpression should return when "
30502 "this mission is played as a single mission." },
30505 "\tReturns true if the specified goal in the specified mission "
30506 "is incomplete (not true or false). It returns false otherwise.\r\n\r\n"
30507 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30508 "\t1:\tName of the mission.\r\n"
30509 "\t2:\tName of the goal in the mission.\r\n"
30510 "\t3:\t(Optional) True/False which signifies what this sexpression should return when "
30511 "this mission is played as a single mission." },
30514 "\tReturns true if the specified event in the specified mission is true "
30515 "(or succeeded). It returns false otherwise.\r\n\r\n"
30516 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30517 "\t1:\tName of the mission.\r\n"
30518 "\t2:\tName of the event in the mission.\r\n"
30519 "\t3:\t(Optional) True/False which signifies what this sexpression should return when "
30520 "this mission is played as a single mission." },
30523 "\tReturns true if the specified event in the specified mission "
30524 "is false (or failed). It returns false otherwise.\r\n\r\n"
30525 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30526 "\t1:\tName of the mission.\r\n"
30527 "\t2:\tName of the event in the mission.\r\n"
30528 "\t3:\t(Optional) True/False which signifies what this sexpression should return when "
30529 "this mission is played as a single mission." },
30532 "\tReturns true if the specified event in the specified mission "
30533 "is incomplete (not true or false). It returns false otherwise.\r\n\r\n"
30534 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30535 "\t1:\tName of the mission.\r\n"
30536 "\t2:\tName of the event in the mission.\r\n"
30537 "\t3:\t(Optional) True/False which signifies what this sexpression should return when "
30538 "this mission is played as a single mission." },
30541 "\tReturns true N seconds after the specified goal in the this mission is true "
30542 "(or succeeded). It returns false otherwise.\r\n\r\n"
30543 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30544 "\t1:\tName of the event in the mission.\r\n"
30545 "\t2:\tNumber of seconds to delay before returning true."},
30548 "\tReturns true N seconds after the specified goal in the this mission is false "
30549 "(or failed). It returns false otherwise.\r\n\r\n"
30550 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30551 "\t1:\tName of the event in the mission.\r\n"
30552 "\t2:\tNumber of seconds to delay before returning true."},
30555 "\tReturns true if the specified goal in the this mission is incomplete. This "
30556 "sexpression will only be useful in conjunction with another sexpression like"
30557 "has-time-elapsed. Used alone, it will return true upon misison startup."
30558 "Returns a boolean value. Takes 1 argument...\r\n"
30559 "\t1:\tName of the event in the mission."},
30562 "\tReturns true N seconds after the specified event in the this mission is true "
30563 "(or succeeded). It returns false otherwise.\r\n\r\n"
30564 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30565 "\t1:\tName of the event in the mission.\r\n"
30566 "\t2:\tNumber of seconds to delay before returning true.\r\n"
30567 "\t3:\t(Optional) Defaults to False. When set to false, directives will only appear as soon as the specified event is true.\r\n"
30568 "\t\tWhen set to true, the event only affects whether the directive succeeds/fails, and has no effect on when it appears"},
30571 "\tReturns true N seconds after the specified event in the this mission is false "
30572 "(or failed). It returns false otherwise.\r\n\r\n"
30573 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30574 "\t1:\tName of the event in the mission.\r\n"
30575 "\t2:\tNumber of seconds to delay before returning true.\r\n"
30576 "\t3:\t(Optional) Defaults to False. When set to false, directives will only appear as soon as the specified event is true.\r\n"
30577 "\t\tWhen set to true, the event only affects whether the directive succeeds/fails, and has no effect on when it appears"},
30580 "\tReturns true N milliseconds after the specified event in the this mission is true "
30581 "(or succeeded). It returns false otherwise.\r\n\r\n"
30582 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30583 "\t1:\tName of the event in the mission.\r\n"
30584 "\t2:\tNumber of milliseconds to delay before returning true.\r\n"
30585 "\t3:\t(Optional) Defaults to False. When set to false, directives will only appear as soon as the specified event is true.\r\n"
30586 "\t\tWhen set to true, the event only affects whether the directive succeeds/fails, and has no effect on when it appears"},
30589 "\tReturns true N milliseconds after the specified event in the this mission is false "
30590 "(or failed). It returns false otherwise.\r\n\r\n"
30591 "Returns a boolean value. Takes 2 required arguments and 1 optional argument...\r\n"
30592 "\t1:\tName of the event in the mission.\r\n"
30593 "\t2:\tNumber of milliseconds to delay before returning true.\r\n"
30594 "\t3:\t(Optional) Defaults to False. When set to false, directives will only appear as soon as the specified event is true.\r\n"
30595 "\t\tWhen set to true, the event only affects whether the directive succeeds/fails, and has no effect on when it appears"},
30598 "\tReturns true if the specified event in the this mission is incomplete. This "
30599 "sexpression will only be useful in conjunction with another sexpression like"
30600 "has-time-elapsed. Used alone, it will return true upon misison startup."
30601 "Returns a boolean value. Takes 1 argument...\r\n"
30602 "\t1:\tName of the event in the mission."},
30605 "\tBecomes true <delay> seconds after all specified ships have been destroyed.\r\n\r\n"
30606 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30607 "\t1:\tTime delay in seconds (see above).\r\n"
30608 "\tRest:\tName of ship (or wing) to check status of." },
30611 "\tBecomes true <delay> seconds after all specified ships have been destroyed by the specified first ship.\r\n\r\n"
30612 "Returns a boolean value. Takes 3 or more arguments...\r\n"
30613 "\t1:\tTime delay in seconds (see above).\r\n"
30614 "\t2:\tShip that should have destroyed the other ships (see below).\r\n"
30615 "\tRest:\tName of ships to check status of." },
30618 "\tBecomes true <delay> seconds after the specified subsystem of the specified "
30619 "ship is destroyed.\r\n\r\n"
30620 "Returns a boolean value. Takes 3 arguments...\r\n"
30621 "\t1:\tName of ship the subsystem we are checking is on.\r\n"
30622 "\t2:\tThe name of the subsystem we are checking status of.\r\n"
30623 "\t3:\tTime delay in seconds (see above)." },
30626 "\tBecomes true <delay> seconds after the specified ship(s) are disabled. A "
30627 "ship is disabled when all of its engine subsystems are destroyed. All "
30628 "ships must be diabled for this function to return true.\r\n\r\n"
30629 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30630 "\t1:\tTime delay is seconds (see above).\r\n"
30631 "\tRest:\tNames of ships to check disabled status of." },
30634 "\tBecomes true <delay> seconds after the specified ship(s) are disarmed. A "
30635 "ship is disarmed when all of its turret subsystems are destroyed. All "
30636 "ships must be disarmed for this function to return true.\r\n\r\n"
30637 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30638 "\t1:\tTime delay is seconds (see above).\r\n"
30639 "\tRest:\tNames of ships to check disarmed status of." },
30642 "\tBecomes true <delay> seconds after the specified ships have docked the "
30643 "specified number of times.\r\n\r\n"
30644 "Returns a boolean value. Takes 4 arguments...\r\n"
30645 "\t1:\tThe name of the docker ship\r\n"
30646 "\t2:\tThe name of the dockee ship\r\n"
30647 "\t3:\tThe number of times they have to have docked\r\n"
30648 "\t4:\tTime delay in seconds (see above)." },
30651 "\tBecomes true <delay> seconds after the specified ships have undocked the "
30652 "specified number of times.\r\n\r\n"
30653 "Returns a boolean value. Takes 4 arguments...\r\n"
30654 "\t1:\tThe name of the docker ship\r\n"
30655 "\t2:\tThe name of the dockee ship\r\n"
30656 "\t3:\tThe number of times they have to have undocked\r\n"
30657 "\t4:\tTime delay in seconds (see above)." },
30660 "\tBecomes true <delay> seconds after the specified ship(s) have arrived into the mission\r\n\r\n"
30661 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30662 "\t1:\tTime delay in seconds (see above).\r\n"
30663 "\tRest:\tName of ship (or wing) we want to check has arrived." },
30666 "\tBecomes true <delay> seconds after the specified ship(s) or wing(s) have departed "
30667 "from the mission by warping out. If any ship was destroyed, this operator will "
30668 "never be true.\r\n\r\n"
30669 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30670 "\t1:\tTime delay in seconds (see above).\r\n"
30671 "\tRest:\tName of ship (or wing) we want to check has departed." },
30674 "\tBecomes true <delay> seconds after the specified ship has completed flying the "
30675 "specified waypoint path.\r\n\r\n"
30676 "Returns a boolean value. Takes 3 or 4 arguments...\r\n"
30677 "\t1:\tName of ship we are checking.\r\n"
30678 "\t2:\tWaypoint path we want to check if ship has flown.\r\n"
30679 "\t3:\tTime delay in seconds (see above).\r\n"
30680 "\t4:\tHow many times the ship has completed the waypoint path (optional)." },
30683 "\tBecomes true when the specified percentage of ship types in this mission "
30684 "have been destroyed. The ship type is a generic type such as fighter/bomber, "
30685 "transport, etc. Fighters and bombers count as the same type.\r\n\r\n"
30686 "Returns a boolean value. Takes 2 arguments...\r\n"
30687 "\t1:\tPercentage of ships that must be destroyed.\r\n"
30688 "\t2:\tShip type to check for." },
30691 "\tReturns the time the specified ship was destroy.\r\n\r\n"
30692 "Returns a numeric value. Takes 1 argument...\r\n"
30693 "\t1:\tName of ship we want to check." },
30696 "\tReturns the time the specified ship arrived into the mission.\r\n\r\n"
30697 "Returns a numeric value. Takes 1 argument...\r\n"
30698 "\t1:\tName of ship we want to check." },
30701 "\tReturns the time the specified ship departed the mission by warping out. Being "
30702 "destroyed doesn't count departed.\r\n\r\n"
30703 "Returns a numeric value. Takes 1 argument...\r\n"
30704 "\t1:\tName of ship we want to check." },
30707 "\tReturns the time the specified wing was destroy.\r\n\r\n"
30708 "Returns a numeric value. Takes 1 argument...\r\n"
30709 "\t1:\tName of wing we want to check." },
30712 "\tReturns the time the specified wing arrived into the mission.\r\n\r\n"
30713 "Returns a numeric value. Takes 1 argument...\r\n"
30714 "\t1:\tName of wing we want to check." },
30717 "\tReturns the time the specified wing departed the mission by warping out. All "
30718 "ships in the wing have to have warped out. If any are destroyed, the wing can "
30719 "never be considered departed.\r\n\r\n"
30720 "Returns a numeric value. Takes 1 argument...\r\n"
30721 "\t1:\tName of ship we want to check." },
30724 "\tReturns the current time into the mission.\r\n\r\n"
30725 "Returns a numeric value. Takes no arguments." },
30728 "\tReturns the current time into the mission, in milliseconds. Useful for more fine-grained timing than possible with normal second-based sexps. (Tip: when an event occurs, assign the result of mission-time-msecs to a variable. Then, in another event, wait until mission-time-msecs is greater than the value of that variable plus some delay amount. This second event should be chained or coupled with additional conditions so that it doesn't accidentally fire on an uninitialized variable!)\r\n\r\n"
30729 "Returns a numeric value. Takes no arguments." },
30732 "\tReturns the time the specified ships docked.\r\n\r\n"
30733 "Returns a numeric value. Takes 3 arguments...\r\n"
30734 "\t1:\tThe name of the docker ship.\r\n"
30735 "\t2:\tThe name of the dockee ship.\r\n"
30736 "\t3:\tThe number of times they must have docked to be true." },
30739 "\tReturns the time the specified ships undocked.\r\n\r\n"
30740 "Returns a numeric value. Takes 3 arguments...\r\n"
30741 "\t1:\tThe name of the docker ship.\r\n"
30742 "\t2:\tThe name of the dockee ship.\r\n"
30743 "\t3:\tThe number of times they must have undocked to be true." },
30746 "\tReturns a ship's current engine energy as a percentage.\r\n"
30747 "\t1: Ship name\r\n" },
30750 "\tReturns a ship's current weapon energy as a percentage.\r\n"
30751 "\t1: Ship name\r\n" },
30754 "\tReturns the current level of the specified ship's shields as a percentage.\r\n\r\n"
30755 "Returns a numeric value. Takes 1 argument...\r\n"
30756 "\t1:\tName of ship to check." },
30759 "\tReturns the current level of the specified ship's hull as a percentage.\r\n\r\n"
30760 "Returns a numeric value. Takes 1 argument...\r\n"
30761 "\t1:\tName of ship to check." },
30764 "\tReturns the current level of the specified ship's subsystem integrity as a percentage of the damage done to *all "
30765 "subsystems of the same type*. This operator provides the same functionality as the new hits-left-subsystem-generic "
30766 "operator, except that it gets the subsystem type in a very misleading way. Common consensus among SCP programmers is "
30767 "that this operator was intended to behave like hits-left-subsystem-specific but was programmed incorrectly. As such, "
30768 "this operator is deprecated. Mission designers are strongly encouraged to use hits-left-subsystem-specific rather than "
30769 "the optional boolean parameter.\r\n\r\n"
30770 "Returns a numeric value. Takes 2 or 3 arguments...\r\n"
30771 "\t1:\tName of ship to check.\r\n"
30772 "\t2:\tName of subsystem on ship to check.\r\n"
30773 "\t3:\t(Optional) True/False. When set to true only the subsystem supplied will be tested; when set to false (the default), "
30774 "all subsystems of that type will be tested." },
30777 "\tReturns the current level of integrity of a generic subsystem type, as a percentage. A \"generic subsystem type\" "
30778 "is a subsystem *category*, (for example, Engines), that includes one or more *individual* subsystems (for example, engine01, "
30779 "engine02, and engine03) on a ship.\r\n\r\nThis is the way FreeSpace tests certain subsystem thresholds internally; for "
30780 "example, if the integrity of all engine subsystems (that is, the combined strength of all engines divided by the maximum "
30781 "total strength of all engines) is less than 30%, the player cannot warp out.\r\n\r\n"
30782 "Returns a numeric value. Takes 2 arguments...\r\n"
30783 "\t1:\tName of ship to check\r\n"
30784 "\t2:\tName of subsystem type to check\r\n" },
30787 "\tReturns the current level of integrity of a specific subsystem, as a percentage.\r\n\r\n(If you were looking for the old "
30788 "hits-left-subsystem operator, this is almost certainly the operator you want. The hits-left-subsystem operator "
30789 "suffers from a serious design flaw that causes it to behave like hits-left-subsystem-generic. As such it has been deprecated "
30790 "and will not appear in the operator list; it can only be used if you type it in manually. Old missions using hits-left-subsystem "
30791 "will still work, but mission designers are strongly encouraged to use the new operators instead.)\r\n\r\n"
30792 "Returns a numeric value. Takes 2 arguments...\r\n"
30793 "\t1:\tName of ship to check\r\n"
30794 "\t2:\tName of subsystem to check\r\n" },
30797 "\tReturns the current level of the specified ship's simulated hull as a percentage.\r\n\r\n"
30798 "Returns a numeric value. Takes 1 argument...\r\n"
30799 "\t1:\tName of ship to check." },
30802 "\tReturns the distance between two objects. These objects can be either a ship, "
30803 "a wing, or a waypoint.\r\n"
30804 "When a wing or team is given (for either argument) the answer will be the shortest distance. \r\n\r\n"
30805 "Returns a numeric value. Takes 2 arguments...\r\n"
30806 "\t1:\tThe name of one of the objects.\r\n"
30807 "\t2:\tThe name of the other object." },
30810 "\tReturns the distance between an object and a ship subsystem. The object can be either a ship, "
30811 "a wing, or a waypoint.\r\n\r\n"
30812 "Returns a numeric value. Takes 3 arguments...\r\n"
30813 "\t1:\tThe name of the object.\r\n"
30814 "\t2:\tThe name of the ship which houses the subsystem.\r\n"
30815 "\t3:\tThe name of the subsystem." },
30818 "\t1: Box center (X)\r\n"
30819 "\t2: Box center (Y)\r\n"
30820 "\t3: Box center (Z)\r\n"
30821 "\t4: Box width\r\n"
30822 "\t5: Box height\r\n"
30823 "\t6: Box depth\r\n"
30824 "\tRest:\tShips or wings to check" },
30826 {
OP_IS_IN_BOX,
"Whether an object is in the box specified. If a second ship is specified, "
30827 "the box is relative to that ship's reference frame. \r\n"
30828 "\t1: Ships, wings, or points to check\r\n"
30835 "\t8: Ship to use as reference frame (optional)." },
30837 {
OP_IS_IN_MISSION,
"Checks whether a given ship is presently in the mission. This sexp doesn't check the arrival list or exited status; it only tests to see if the "
30838 "ship is active. This means that internally the sexp only returns SEXP_TRUE or SEXP_FALSE and does not use any of the special shortcut values. This is useful "
30839 "for ships created with ship-create, as those ships will not have used the conventional ship arrival list.\r\n\r\n"
30840 "Takes 1 or more string arguments, which are checked against the ship list." },
30843 "\tReturns the amount of damage one or more ships have done to a ship.\r\n\r\n"
30844 "Takes 2 or more arguments...\r\n"
30845 "\t1:\tShip that has been damaged.\r\n"
30846 "\t2:\tName of ships that may have damaged it." },
30849 "\tReturns true if <count> seconds have elapsed since one or more ships have received "
30850 "a meaningful order from the player. A meaningful order is currently any order that "
30851 "is not the warp out order.\r\n\r\n"
30852 "Returns a boolean value. Takes 2 or more arguments...\r\n"
30853 "\t1:\tTime in seconds that must elapse.\r\n"
30854 "\tRest:\tName of ship or wing to check for having received orders." },
30856 {
OP_WHEN,
"When (Conditional operator)\r\n"
30857 "\tPerforms specified actions when a condition becomes true\r\n\r\n"
30858 "Takes 2 or more arguments...\r\n"
30859 "\t1:\tBoolean expression that must be true for actions to take place.\r\n"
30860 "\tRest:\tActions to take when boolean expression becomes true." },
30866 "\tPerforms specified actions when a condition, given a set of arguments, becomes true.\r\n\r\n"
30867 "Takes 3 or more arguments...\r\n"
30868 "\t1:\tThe arguments to evaluate (see any-of, every-of, random-of, etc.).\r\n"
30869 "\t2:\tBoolean expression that must be true for actions to take place.\r\n"
30870 "\tRest:\tActions to take when the boolean expression becomes true." },
30874 "\tThis is a version of \"when\" that will always evaluate its arguments. It's useful "
30875 "in situations where you need to repeatedly check things that may become true more than "
30876 "once. Since this sexp will execute every time it's evaluated, you may need to use it as "
30877 "an argument to \"when\" if you want to impose restrictions on how it's called.\r\n\r\n"
30878 "Takes 2 or more arguments...\r\n"
30879 "\t1:\tBoolean expression that must be true for actions to take place.\r\n"
30880 "\tRest:\tActions to take when boolean expression is true." },
30884 "\tThis is a version of \"when-argument\" that will always evaluate its arguments. It's useful "
30885 "in situations where you need to repeatedly check things that may become true more than "
30886 "once. Since this sexp will execute every time it's evaluated, you may need to use it as "
30887 "an argument to \"when\" (not \"when-argument\") if you want to impose restrictions on how it's called.\r\n\r\n"
30888 "Takes 3 or more arguments...\r\n"
30889 "\t1:\tThe arguments to evaluate (see any-of, all-of, random-of, etc.).\r\n"
30890 "\t2:\tBoolean expression that must be true for actions to take place.\r\n"
30891 "\tRest:\tActions to take when the boolean expression becomes true." },
30895 "\tPerforms one action if a condition is true (like \"when\"), or another action (or set of actions) if the condition is false. "
30896 "Note that this sexp only completes one of its branches once the condition has been determined; "
30897 "it does not come back later and evaluate the other branch if the condition happens to switch truth values.\r\n\r\n"
30898 "Takes 3 or more arguments...\r\n"
30899 "\t1:\tBoolean expression to evaluate.\r\n"
30900 "\t2:\tActions to take if that expression becomes true.\r\n"
30901 "\tRest:\tActions to take if that expression becomes false.\r\n" },
30905 "\tPerforms specified actions once for each valid " SEXP_ARGUMENT_STRING " in the parent conditional.\r\n"
30906 "\tMust not be used for any SEXP that actually contains " SEXP_ARGUMENT_STRING " as these are already being executed\r\n"
30907 "\tmultiple times without using Do-for-valid-arguments. Any use of " SEXP_ARGUMENT_STRING " and will \r\n"
30908 "\tprevent execution of the entire SEXP unless it is nested inside another when(or every-time)-argument SEXP.\r\n\r\n"
30909 "Takes 1 or more arguments...\r\n"
30910 "\tAll:\tActions to take." },
30914 "\tReturns the number of valid arguments in the argument list.\r\n\r\n"
30915 "Takes no arguments...\r\n"},
30918 {
OP_ANY_OF,
"Any-of (Conditional operator)\r\n"
30919 "\tSupplies arguments for the " SEXP_ARGUMENT_STRING " special data item. Any of the supplied arguments can satisfy the expression(s) "
30921 "In practice, this will behave like a standard \"for-each\" statement, evaluating the action operators for each argument that satisfies the condition.\r\n\r\n"
30922 "Takes 1 or more arguments...\r\n"
30926 {
OP_EVERY_OF,
"Every-of (Conditional operator)\r\n"
30927 "\tSupplies arguments for the " SEXP_ARGUMENT_STRING " special data item. Every one of the supplied arguments will be evaluated to satisfy the expression(s) "
30929 "Takes 1 or more arguments...\r\n"
30933 {
OP_RANDOM_OF,
"Random-of (Conditional operator)\r\n"
30934 "\tSupplies arguments for the " SEXP_ARGUMENT_STRING " special data item. A random supplied argument will be selected to satisfy the expression(s) "
30935 "in which " SEXP_ARGUMENT_STRING " is used. The same argument will be returned by all subsequent calls\r\n\r\n"
30936 "Takes 1 or more arguments...\r\n"
30941 "\tSupplies arguments for the " SEXP_ARGUMENT_STRING " special data item. A random supplied argument will be selected to satisfy the expression(s) "
30943 "Takes 1 or more arguments...\r\n"
30947 {
OP_NUMBER_OF,
"Number-of (Conditional operator)\r\n"
30948 "\tSupplies arguments for the " SEXP_ARGUMENT_STRING " special data item. Any [number] of the supplied arguments can satisfy the expression(s) "
30950 "Takes 2 or more arguments...\r\n"
30951 "\t1:\tNumber of arguments, as above\r\n"
30956 "\tSupplies arguments for the " SEXP_ARGUMENT_STRING " special data item. The first argument in the list will be selected to satisfy the expression(s) "
30957 "in which " SEXP_ARGUMENT_STRING " is used. The same argument will be returned by all subsequent calls\r\n\r\n"
30958 "Takes 1 or more arguments...\r\n"
30963 "\tSupplies counter values for the " SEXP_ARGUMENT_STRING " special data item. This sexp will count up from the start value to the stop value, and each value will be provided as an argument to the action operators. "
30964 "The default increment is 1, but if the optional increment parameter is provided, the counter will increment by that number. The stop value will be supplied if appropriate; e.g. counting from 0 to 10 by 2 will supply 0, 2, 4, 6, 8, and 10; "
30965 "but counting by 3 will supply 0, 3, 6, and 9.\r\n\r\n"
30966 "Note that the counter values are all treated as valid arguments, and it is impossible to invalidate a counter argument. If you want to invalidate a counter value, use Any-of and list the values explicitly.\r\n\r\n"
30967 "This sexp will usually need to be accompanied by the string-to-int sexp, as the counter variables are provided in string format but are most useful in integer format.\r\n\r\n"
30968 "Takes 2 or 3 arguments...\r\n"
30969 "\t1:\tCounter start value\r\n"
30970 "\t2:\tCounter stop value\r\n"
30971 "\t3:\tCounter increment (optional)" },
30975 "\tRemoves an argument from future consideration as a " SEXP_ARGUMENT_STRING " special data item.\r\n"
30976 "Takes 1 or more arguments...\r\n"
30977 "\tAll:\tThe argument to remove from the preceding argument list." },
30981 "\tRestores an argument for future consideration as a " SEXP_ARGUMENT_STRING " special data item.\r\n"
30982 "\tIf the argument hasn't been previously invalidated, it will do nothing.\r\n"
30983 "Takes 1 or more arguments...\r\n"
30984 "\tAll:\tThe argument to restore to the preceding argument list." },
30988 "\tRemoves all argument from future consideration as " SEXP_ARGUMENT_STRING " special data items.\r\n"
30989 "Takes no arguments." },
30993 "\tRestores all arguments for future consideration as " SEXP_ARGUMENT_STRING " special data items.\r\n"
30994 "\tIf the argument hasn't been previously invalidated, it will do nothing.\r\n"
30995 "Takes no arguments." },
30999 "\tSets the specified ship(s) or wing(s) to the specified team.\r\n"
31000 "Takes 2 or more arguments...\r\n"
31001 "\t1:\tTeam to change to (\"friendly\", \"hostile\" or \"unknown\").\r\n"
31002 "\tRest:\tName of ship or wing to change team status of." },
31006 "\tSets the specified ship(s) or wing(s) apparent color.\r\n"
31007 "Takes 6 or more arguments...\r\n"
31008 "\t1:\tName of the team from which target is observed from.\r\n"
31009 "\t2:\tName of the team of the observed target to receive the alternate color.\r\n"
31010 "\t3:\tRed color (value from 0 to 255).\r\n"
31011 "\t4:\tGreen color (value from 0 to 255).\r\n"
31012 "\t5:\tBlue color (value from 0 to 255).\r\n"
31013 "\tRest:\tName of ship or wing to change team status of." },
31017 "\tSets the specified ship or ship subsystem(s) to the specified ai class.\r\n"
31018 "Takes 2 or more arguments...\r\n"
31019 "\t1:\tAI Class to change to (\"None\", \"Coward\", \"Lieutenant\", etc.)\r\n"
31020 "\t2:\tName of ship to change AI class of\r\n"
31021 "\tRest:\tName of subsystem to change AI class of (optional)" },
31024 "\tModifies variable to specified value\r\n\r\n"
31025 "Takes 2 arguments...\r\n"
31026 "\t1:\tName of Variable.\r\n"
31027 "\t2:\tValue to be set." },
31030 "\tGets the value of the variable specified by the given index. This is an alternate way "
31031 "to access variables rather than by their names, and it enables cool features such as "
31032 "arrays and pointers.\r\n\r\nPlease note that only numeric variables are supported. Any "
31033 "attempt to access a string variable will result in a value of SEXP_NAN_FOREVER being returned.\r\n\r\n"
31034 "Takes 1 argument...\r\n"
31035 "\t1:\tIndex of variable, from 0 to MAX_SEXP_VARIABLES - 1." },
31038 "\tSets the value of the variable specified by the given index. This is an alternate way "
31039 "to modify variables rather than by their names, and it enables cool features such as "
31040 "arrays and pointers.\r\n\r\nIn contrast to get-variable-by-index, note that this sexp "
31041 "*does* allow the modification of string variables.\r\n\r\n"
31042 "Takes 2 arguments...\r\n"
31043 "\t1:\tIndex of variable, from 0 to MAX_SEXP_VARIABLES - 1.\r\n"
31044 "\t2:\tValue to be set." },
31047 "\tRetrieves the value of the variable specified by the given index and stores it in another variable. "
31048 "This is very similar to variable-array-get, except the result is stored in a new variable rather than "
31049 "being returned by value. One important difference is that this sexp can be used to copy string variables as well as numeric variables.\r\n\r\n"
31050 "Takes 2 arguments...\r\n"
31051 "\t1:\tIndex of source variable, from 0 to MAX_SEXP_VARIABLES - 1.\r\n"
31052 "\t2:\tDestination variable. The type of this variable must match the type of the variable referenced by the index." },
31055 "\tRetrieves the value of the variable specified by the first index and stores it in the variable specified by the second index. The first variable is not modified.\r\n\r\n"
31056 "Takes 2 arguments...\r\n"
31057 "\t1:\tIndex of source variable, from 0 to MAX_SEXP_VARIABLES - 1.\r\n"
31058 "\t2:\tIndex of destination variable, from 0 to MAX_SEXP_VARIABLES - 1. The types of both variables must match." },
31061 "\tProtects a ship from being attacked by any enemy ship. Any ship "
31062 "that is protected will not come under enemy fire.\r\n\r\n"
31063 "Takes 1 or more arguments...\r\n"
31064 "\tAll:\tName of ship(s) to protect." },
31067 "\tUnprotects a ship from being attacked by any enemy ship. Any ship "
31068 "that is not protected can come under enemy fire. This function is the opposite "
31069 "of protect-ship.\r\n\r\n"
31070 "Takes 1 or more arguments...\r\n"
31071 "\tAll:\tName of ship(s) to unprotect." },
31074 "\tProtects a ship from being attacked with beam weapon. Any ship "
31075 "that is beam protected will not come under enemy beam fire.\r\n\r\n"
31076 "Takes 1 or more arguments...\r\n"
31077 "\tAll:\tName of ship(s) to protect." },
31080 "\tUnprotects a ship from being attacked with beam weapon. Any ship "
31081 "that is not beam protected can come under enemy beam fire. This function is the opposite "
31082 "of beam-protect-ship.\r\n\r\n"
31083 "Takes 1 or more arguments...\r\n"
31084 "\tAll:\tName of ship(s) to unprotect." },
31088 "\tProtects a ship from being attacked with a turret weapon of a given type. Any ship "
31089 "that is turret protected will not come under enemy fire from that type of turret, though it may come under fire by other turrets.\r\n\r\n"
31090 "Takes 2 or more arguments...\r\n"
31091 "\t1:\tType of turret (currently supported types are \"beam\", \"flak\", \"laser\", and \"missile\")\r\n"
31092 "\tRest:\tName of ship(s) to protect." },
31096 "\tUnprotects a ship from being attacked with a turret weapon of a given type. Any ship "
31097 "that is not turret protected can come under enemy fire from that type of turret. This function is the opposite "
31098 "of turret-protect-ship.\r\n\r\n"
31099 "Takes 2 or more arguments...\r\n"
31100 "\t1:\tType of turret (currently supported types are \"beam\", \"flak\", \"laser\", and \"missile\")\r\n"
31101 "\tRest:\tName of ship(s) to unprotect." },
31104 "\tSends a message to the player. Can be send by a ship, wing, or special "
31105 "source. To send it from a special source, make the first character of the first "
31106 "argument a \"#\".\r\n\r\n"
31107 "Takes 3 arguments...\r\n"
31108 "\t1:\tName of who the message is from.\r\n"
31109 "\t2:\tPriority of message (\"Low\", \"Normal\" or \"High\").\r\n"
31110 "\t3:\tName of message (from message editor)." },
31114 "\tTurns the built in messages sent by command or pilots on\r\n"
31115 "Takes 0 or more arguments...\r\n"
31116 "If no arguments are supplied any ships not given individual silence orders will be able\r\n"
31117 "to send built in messages. Command will also be unsilenced\r\n"
31118 "Using the Any Wingman option cancels radio silence for all ships in wings.\r\n"
31119 "\tAll:\tName of ship to allow to talk." },
31123 "\tTurns the built in messages sent by command or pilots off\r\n"
31124 "Takes 0 or more arguments....\r\n"
31125 "If no arguments are supplied all built in messages are disabled.\r\n"
31126 "Using the Any Wingman option silences for all ships in wings.\r\n"
31127 "\tAll:\tName of ship to be silenced." },
31131 "\tSets the mood of the mission, this affects the choice of builtin messages sent by wingmen\r\n"
31132 "Takes 1 argument...\r\n"
31133 "\t1:\tMission mood (from messages.tbl) to use." },
31137 "\tSets the persona of the supplied ship to the persona supplied\r\n"
31138 "Takes 2 or more arguments...\r\n"
31139 "\t1:\tPersona to use."
31140 "\tRest:\tName of the ship." },
31143 "\tCauses the specified ship(s) to self destruct.\r\n\r\n"
31144 "Takes 1 or more arguments...\r\n"
31145 "\tAll:\tName of ship to self destruct." },
31148 "\tThe next mission operator is used for campaign branching in the campaign editor. "
31149 "It specifies which mission should played be next in the campaign. This operator "
31150 "generally follows a 'when' or 'cond' statment in the campaign file.\r\n\r\n"
31151 "Takes 1 argument...\r\n"
31152 "\t1:\tName of mission (filename) to proceed to." },
31155 "\tClears the goals for the specified ships and/or wings.\r\n\r\n"
31156 "Takes 1 or more arguments...\r\n"
31157 "\tAll:\tName of ship or wing." },
31160 "\tAdds a goal to a ship or wing.\r\n\r\n"
31161 "Takes 2 arguments...\r\n"
31162 "\t1:\tName of ship or wing to add goal to.\r\n"
31163 "\t2:\tGoal to add." },
31167 "\tRemoves a goal from a ship or wing.\r\n\r\n"
31168 "Takes 2 arguments...\r\n"
31169 "\t1:\tName of ship or wing to remove goal from.\r\n"
31170 "\t2:\tGoal to remove." },
31173 "\tReduces the specified subsystem integrity by the specified percentage."
31174 "If the percntage strength of the subsystem (after completion) is less than 0%,"
31175 "subsystem strength is set to 0%.\r\n\r\n"
31176 "Takes 3 arguments...\r\n"
31177 "\t1:\tName of ship subsystem is on.\r\n"
31178 "\t2:\tName of subsystem to sabotage.\r\n"
31179 "\t3:\tPercentage to reduce subsystem integrity by." },
31182 "\tIncreases the specified subsystem integrity by the specified percentage."
31183 "If the percntage strength of the subsystem (after completion) is greater than 100%,"
31184 "subsystem strength is set to 100%.\r\n\r\n"
31185 "Takes 4 arguments...\r\n"
31186 "\t1:\tName of ship subsystem is on.\r\n"
31187 "\t2:\tName of subsystem to repair.\r\n"
31188 "\t3:\tPercentage to increase subsystem integrity by.\r\n"
31189 "\t4:\tRepair turret submodel. Optional argument that defaults to true."},
31192 "\tSets the specified subsystem to the the specified percentage."
31193 "If the percentage specified is < 0, strength is set to 0. If the percentage is "
31194 "> 100 % the subsystem strength is set to 100%.\r\n\r\n"
31195 "Takes 3 arguments...\r\n"
31196 "\t1:\tName of ship subsystem is on.\r\n"
31197 "\t2:\tName of subsystem to set strength.\r\n"
31198 "\t3:\tPercentage to set subsystem integrity to.\r\n"
31199 "\t4:\tRepair turret submodel. Optional argument that defaults to true."},
31202 "\tDetroys the specified subsystems without effects."
31203 "\tSingle player only!"
31204 "Takes 2 or more arguments...\r\n"
31205 "\t1:\tName of ship subsystem is on.\r\n"
31206 "\tRest:\tName of subsystem to destroy.\r\n"},
31209 "\tMakes a mission goal invalid, which causes it to not show up on mission goals "
31210 "screen, or be evaluated.\r\n"
31211 "Takes 1 or more arguments...\r\n"
31212 "\tAll:\tName of mission goal to invalidate." },
31215 "\tMakes a mission goal valid again, so it shows up on mission goals screen.\r\n"
31216 "Takes 1 or more arguments...\r\n"
31217 "\tAll:\tName of mission goal to validate." },
31220 "\tSends a random message to the player from those supplied. Can be send by a "
31221 "ship, wing, or special source. To send it from a special source, make the first "
31222 "character of the first argument a \"#\".\r\n\r\n"
31223 "Takes 3 or more arguments...\r\n"
31224 "\t1:\tName of who the message is from.\r\n"
31225 "\t2:\tPriority of message (\"Low\", \"Normal\" or \"High\")."
31226 "\tRest:\tName of message (from message editor)." },
31229 "\tTransfers the cargo from one ship to another ship.\r\n\r\n"
31230 "Takes 2 arguments...\r\n"
31231 "\t1:\tName of ship that cargo is being transferred from.\r\n"
31232 "\t2:\tName of ship that cargo is being transferred to." },
31235 "\tExchanges the cargos of two ships. If one of the two ships contains no cargo, "
31236 "the cargo is transferred instead.\r\n"
31237 "Takes 2 arguments...\r\n"
31238 "\t1:\tName of one of the ships.\r\n"
31239 "\t2:\tName of the other ship." },
31243 "\tSets the cargo on a ship or ship subsystem. The cargo-no-deplete flag status is carried through to the new cargo.\r\n"
31244 "Takes 2 or 3 arguments...\r\n"
31245 "\t1:\tName of the cargo\r\n"
31246 "\t2:\tName of the ship\r\n"
31247 "\t3:\tName of the ship subsystem (optional)" },
31251 "\tChecks whether the specified ship or ship subsystem contains a particular cargo.\r\n"
31252 "Takes 2 or 3 arguments...\r\n"
31253 "\t1:\tName of the cargo\r\n"
31254 "\t2:\tName of the ship\r\n"
31255 "\t3:\tName of the ship subsystem (optional)" },
31259 "\tChanges the mission music. Takes 1 argument...\r\n"
31260 "\t1: Name of the music selection (taken from music.tbl)" },
31264 "\tPlays a sound listed in the Game Sounds section of sounds.tbl. Note that if the sound is a non-3D sound (if the min and max radius are 0, or unspecified), the sound will just play without being fixed at a particular position in space. "
31265 "In this case, the origin coordinates will be ignored. (A better design would have put the sound index first and made the origin arguments optional, but the difference between 2D and 3D sounds was not understood at the time. C'est la vie.)\r\n\r\n"
31266 "Takes 4 arguments...\r\n"
31267 "\t1: Origin X\r\n"
31268 "\t2: Origin Y\r\n"
31269 "\t3: Origin Z\r\n"
31270 "\t4: Sound (index into sounds.tbl or name of the sound entry)" },
31274 "\tPlays a sound, such as a music soundtrack, from a file. Important: Only one sound at a time can be played with this sexp!\r\n"
31275 "Takes 1 to 3 arguments...\r\n"
31276 "\t1: Sound (file name)\r\n"
31277 "\t2: Enter a non-zero number to loop. default is off (optional).\r\n"
31278 "\t3: Enter a non-zero number to use environment effects. default is off (optional)."
31283 "\tCloses the currently playing sound started by play-sound-from-file, if there is any. Takes 1 argument...\r\n"
31284 "\t1: Fade (default is true)" },
31288 "\tPauses or unpauses the currently playing sound started by play-sound-from-file, if there is any. Takes 1 argument...\r\n"
31289 "\t1: Boolean - True to pause, False to unpause" },
31293 "Sets the EAX environment for all sound effects. Optionally sets one or more parameters specific to the environment. Takes 1 or more arguments...\r\n"
31294 "\t1:\tSound environment name (a value of \"" SEXP_NONE_STRING "\" will disable the effects)\r\n"
31295 "\t2:\tEnvironment option (optional)\r\n"
31296 "\t3:\tEnvironment value x 1000, e.g. 10 is 0.01 (optional)\r\n"
31297 "Use Add-Data to specify additional environment options in repeating option-value pairs, just like Send-Message-List can have additional messages in source-priority-message-delay groups.\r\n\r\n"
31298 "IMPORTANT: each additional option in the list MUST HAVE two entries; any option without the two proper fields will be ignored, as will any successive options." },
31302 "Updates the current EAX environment with new values. Takes 2 or more arguments...\r\n"
31303 "\t1:\tEnvironment option\r\n"
31304 "\t2:\tEnvironment value x 1000, e.g. 10 is 0.01\r\n"
31305 "Use Add-Data to specify additional environment options in repeating option-value pairs, just like Send-Message-List can have additional messages in source-priority-message-delay groups.\r\n\r\n"
31306 "IMPORTANT: Each additional option in the list MUST HAVE two entries; any option without the two proper fields will be ignored, as will any successive options." },
31310 "Adjusts the relative volume of one sound type. Takes 1 to 3 arguments....\r\n"
31311 "\t1:\tSound Type to adjust, either Music, Voice or Effects. Will act as a reset for the given category, if no other argument present\r\n"
31312 "\t2:\tPercentage of the users' settings to adjust to (optional), 0 will be silence, 100 means the maximum volume as set by the user\r\n"
31313 "\t3:\tFade time (optional), time in milliseconds to adjust the volume"},
31317 "Sets an explosion option on a particular ship. Takes 3 or more arguments...\r\n"
31318 "\t1:\tShip name\r\n"
31319 "\t2:\tExplosion option\r\n"
31320 "\t3:\tExplosion value (for shockwave speed, 0 will produce no shockwave; for death roll time, 0 will use the default time)\r\n"
31321 "Use Add-Data to specify additional explosion options in repeating option-value pairs, just like Send-Message-List can have additional messages in source-priority-message-delay groups.\r\n\r\n"
31322 "IMPORTANT: Each additional option in the list MUST HAVE two entries; any option without the two proper fields will be ignored, as will any successive options." },
31326 "\tCauses an explosion at a given origin, with the given parameters. "
31327 "Takes 11 or 13 arguments...\r\n"
31328 "\t1: Origin X\r\n"
31329 "\t2: Origin Y\r\n"
31330 "\t3: Origin Z\r\n"
31332 "\t5: Blast force\r\n"
31333 "\t6: Size of explosion (if 0, explosion will not be visible)\r\n"
31334 "\t7: Inner radius to apply damage (if 0, explosion will not be visible)\r\n"
31335 "\t8: Outer radius to apply damage (if 0, explosion will not be visible)\r\n"
31336 "\t9: Shockwave speed (if 0, there will be no shockwave)\r\n"
31337 "\t10: Type - For backward compatibility 0 = medium, 1 = large1 (4th in table), 2 = large2 (5th in table)\r\n"
31338 " 3 or greater link to respctive entry in fireball.tbl\r\n"
31339 "\t11: Sound (index into sounds.tbl or name of the sound entry)\r\n"
31340 "\t12: EMP intensity (optional)\r\n"
31341 "\t13: EMP duration in seconds (optional)" },
31345 "\tCauses a subspace warp effect at a given origin, facing toward a given location, with the given parameters.\r\n"
31346 "Takes 12 arguments...\r\n"
31347 "\t1: Origin X\r\n"
31348 "\t2: Origin Y\r\n"
31349 "\t3: Origin Z\r\n"
31350 "\t4: Location X\r\n"
31351 "\t5: Location Y\r\n"
31352 "\t6: Location Z\r\n"
31354 "\t8: Duration in seconds (values smaller than 4 are ignored)\r\n"
31355 "\t9: Warp opening sound (index into sounds.tbl or name of the sound entry)\r\n"
31356 "\t10: Warp closing sound (index into sounds.tbl or name of the sound entry)\r\n"
31357 "\t11: Type (0 for standard blue [default], 1 for Knossos green)\r\n"
31358 "\t12: Shape (0 for 2-D [default], 1 for 3-D)" },
31362 "\tSets an object's orientation to face the specified coordinates. "
31363 "Takes 4 arguments...\r\n"
31364 "\t1: The name of a ship or wing.\r\n"
31365 "\t2: The X coordinate to face.\r\n"
31366 "\t3: The Y coordinate to face.\r\n"
31367 "\t4: The Z coordinate to face.\r\n"
31368 "\t5: Turn time in milliseconds (optional)\r\n"
31369 "\t6: Bank (optional). Enter a non-zero value to enable banking." },
31373 "\tSets an object's orientation to face the specified object. "
31374 "Takes 2 arguments...\r\n"
31375 "\t1: The name of a ship or wing.\r\n"
31376 "\t2: The object to face.\r\n"
31377 "\t3: Turn time in milliseconds (optional)\r\n"
31378 "\t4: Bank (optional). Enter a non-zero value to enable banking." },
31382 "\tCombines the effects of the ship-rot-maneuver and ship-lat-maneuver sexps. Takes 10 arguments:\r\n"
31383 "\t1: The name of a ship or wing\r\n"
31384 "\t2: Duration of the maneuver, in milliseconds\r\n"
31385 "\t3: Heading movement velocity, as a percentage (-100 to 100) of the tabled maximum heading velocity, or 0 to not modify the ship's current value\r\n"
31386 "\t4: Pitch movement velocity, as a percentage (-100 to 100) of the tabled maximum pitch velocity, or 0 to not modify the ship's current value\r\n"
31387 "\t5: Bank movement velocity, as a percentage (-100 to 100) of the tabled maximum bank velocity, or 0 to not modify the ship's current value\r\n"
31388 "\t6: Whether to apply all of the rotational velocity values even if any of them are 0\r\n"
31389 "\t7: Vertical movement velocity, as a percentage (-100 to 100) of the tabled maximum vertical velocity, or 0 to not modify the ship's current value\r\n"
31390 "\t8: Sideways movement velocity, as a percentage (-100 to 100) of the tabled maximum sideways velocity, or 0 to not modify the ship's current value\r\n"
31391 "\t9: Forward movement velocity, as a percentage (-100 to 100) of the tabled maximum forward velocity, or 0 to not modify the ship's current value\r\n"
31392 "\t10: Whether to apply all of the lateral velocity values even if any of them are 0\r\n" },
31396 "\tCauses a ship to move in a rotational direction. For the purposes of this sexp, this means the ship rotates along its own heading, pitch, or bank axis (or a combination of axes) without regard to normal ship rotation rules. "
31397 "You may find it necessary to disable the ship AI (e.g. by issuing a play-dead order) before running this sexp.\r\n\r\n"
31398 "Takes 6 arguments:\r\n"
31399 "\t1: The name of a ship or wing\r\n"
31400 "\t2: Duration of the maneuver, in milliseconds\r\n"
31401 "\t3: Heading movement velocity, as a percentage (-100 to 100) of the tabled maximum heading velocity, or 0 to not modify the ship's current value\r\n"
31402 "\t4: Pitch movement velocity, as a percentage (-100 to 100) of the tabled maximum pitch velocity, or 0 to not modify the ship's current value\r\n"
31403 "\t5: Bank movement velocity, as a percentage (-100 to 100) of the tabled maximum bank velocity, or 0 to not modify the ship's current value\r\n"
31404 "\t6: Whether to apply all of the above velocity values even if any of them are 0\r\n" },
31408 "\tCauses a ship to move in a lateral direction. For the purposes of this sexp, this means the ship translates along its own X, Y, or Z axis (or a combination of axes) without regard to normal ship movement rules. "
31409 "You may find it necessary to disable the ship AI (e.g. by issuing a play-dead order) before running this sexp.\r\n\r\n"
31410 "Takes 6 arguments:\r\n"
31411 "\t1: The name of a ship or wing\r\n"
31412 "\t2: Duration of the maneuver, in milliseconds\r\n"
31413 "\t3: Vertical movement velocity, as a percentage (-100 to 100) of the tabled maximum vertical velocity, or 0 to not modify the ship's current value\r\n"
31414 "\t4: Sideways movement velocity, as a percentage (-100 to 100) of the tabled maximum sideways velocity, or 0 to not modify the ship's current value\r\n"
31415 "\t5: Forward movement velocity, as a percentage (-100 to 100) of the tabled maximum forward velocity, or 0 to not modify the ship's current value\r\n"
31416 "\t6: Whether to apply all of the above velocity values even if any of them are 0\r\n" },
31420 "\tTags a ship. Takes 3 or 8 arguments...\r\n"
31421 "\t1: The name of a ship.\r\n"
31422 "\t2: The tag level (currently 1, 2, or 3).\r\n"
31423 "\t3: The tag time (in seconds).\r\n"
31424 "\t4: A SSM missile (optional - used only for TAG-C).\r\n"
31425 "\t5: The X origin of the SSM missile (optional - used only for TAG-C).\r\n"
31426 "\t6: The Y origin of the SSM missile (optional - used only for TAG-C).\r\n"
31427 "\t7: The Z origin of the SSM missile (optional - used only for TAG-C).\r\n"
31428 "\t8: The team the SSM missile belongs to (optional - used only for TAG-C).\r\n" },
31436 "\tCauses the specified ship to chase and attack the specified target.\r\n\r\n"
31437 "Takes 2 or 3 arguments...\r\n"
31438 "\t1:\tName of ship to chase.\r\n"
31439 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100).\r\n"
31440 "\t3 (optional):\tWhether to attack the target even if it is on the same team; defaults to false."
31444 "\tCauses one ship to dock with another ship.\r\n\r\n"
31445 "Takes 4 arguments...\r\n"
31446 "\t1:\tName of dockee ship (The ship that \"docker\" will dock with).\r\n"
31447 "\t2:\tDocker's docking point - Which dock point docker uses to dock.\r\n"
31448 "\t3:\tDockee's docking point - Which dock point on dockee docker will move to.\r\n"
31449 "\t4:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100)." },
31452 "\tCauses the specified ship to undock from who it is currently docked with.\r\n\r\n"
31453 "Takes 1 or 2 arguments...\r\n"
31454 "\t1:\tGoal priority (number between 0 and 89).\r\n"
31455 "\t2 (optional):\tShip to undock from. If none is specified, the code will pick the first docked ship." },
31458 "\tCauses the specified ship/wing to immediately warp out of the mission, from its current location. "
31459 "It will warp even if its departure cue is specified as a hangar bay.\r\n\r\n"
31460 "Takes 2 arguments...\r\n"
31461 "\t1:\tName of waypoint path to follow to warp out (not used).\r\n"
31462 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100)." },
31465 "\tCauses the specified ship to fly a waypoint path continuously.\r\n\r\n"
31466 "Takes 2 arguments...\r\n"
31467 "\t1:\tName of waypoint path to fly.\r\n"
31468 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100)." },
31471 "\tCauses the specified ship to fly a waypoint path.\r\n\r\n"
31472 "Takes 2 arguments...\r\n"
31473 "\t1:\tName of waypoint path to fly.\r\n"
31474 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100)." },
31477 "\tCauses the specified ship to attack and try and destroy the specified subsystem "
31478 "on the specified ship.\r\n\r\n"
31479 "Takes 3 or 4 arguments...\r\n"
31480 "\t1:\tName of ship subsystem is on.\r\n"
31481 "\t2:\tName of subsystem on the ship to attack and destroy.\r\n"
31482 "\t3:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100).\r\n"
31483 "\t4 (optional):\tWhether to attack the target even if it is on the same team; defaults to false."
31487 "\tCauses the specified ship to chase and attack the specified target.\r\n\r\n"
31488 "Takes 2 or 3 arguments...\r\n"
31489 "\t1:\tName of wing to chase.\r\n"
31490 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100).\r\n"
31491 "\t3 (optional):\tWhether to attack the target even if it is on the same team; defaults to false."
31495 "\tThis AI goal causes a ship/wing to destroy all of the engine subsystems on "
31496 "the specified ship. This goal is different than ai-destroy-subsystem since a ship "
31497 "may have multiple engine subsystems requiring the use of > 1 ai-destroy-subsystem "
31499 "Please note that this goal may call \"protect-ship\" on the target "
31500 "to prevent overzealous AI ships from destroying it in the process of disabling it. "
31501 "If the ship must be destroyed later on, be sure to call an \"unprotect-ship\" sexp.\r\n\r\n"
31502 "Takes 2 or 3 arguments...\r\n"
31503 "\t1:\tName of ship whose engine subsystems should be destroyed\r\n"
31504 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100).\r\n"
31505 "\t3 (optional):\tWhether to attack the target even if it is on the same team; defaults to false."
31509 "\tThis AI goal causes a ship/wing to destroy all of the turret subsystems on "
31510 "the specified ship. This goal is different than ai-destroy-subsystem since a ship "
31511 "may have multiple turret subsystems requiring the use of > 1 ai-destroy-subsystem "
31513 "Please note that this goal may call \"protect-ship\" on the target "
31514 "to prevent overzealous AI ships from destroying it in the process of disarming it. "
31515 "If the ship must be destroyed later on, be sure to call an \"unprotect-ship\" sexp.\r\n\r\n"
31516 "Takes 2 arguments...\r\n"
31517 "\t1:\tName of ship whose turret subsystems should be destroyed\r\n"
31518 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100).\r\n"
31519 "\t3 (optional):\tWhether to attack the target even if it is on the same team; defaults to false."
31523 "\tCauses the specified ship to guard a ship from other ships not on the same team.\r\n\r\n"
31524 "Takes 2 arguments...\r\n"
31525 "\t1:\tName of ship to guard.\r\n"
31526 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100)." },
31529 "\tCauses the specified ship to chase and attack any ship on the opposite team.\r\n\r\n"
31530 "Takes 1 argument...\r\n"
31531 "\t1:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100)." },
31534 "\tCauses the specified ship to guard a wing of ships from other ships not on the "
31535 "same team.\r\n\r\n"
31536 "Takes 2 arguments...\r\n"
31537 "\t1:\tName of wing to guard.\r\n"
31538 "\t2:\tGoal priority (number between 0 and 200. Player orders have a priority of 90-100)." },
31540 {
OP_NOP,
"Do-nothing (Action operator)\r\n"
31541 "\tDoes nothing. This is used as the default for any required action arguments "
31542 "of an operator." },
31545 "\tBecomes true when the specified default key has been pressed. Default key "
31546 "refers to the what the key normally is when not remapped. FreeSpace will "
31547 "automatically account for any keys that have been remapped. If the optional "
31548 "delay is specified, becomes true that many seconds after the key has been pressed.\r\n\r\n"
31549 "Returns a boolean value. Takes 1 or 2 arguments...\r\n"
31550 "\t1:\tDefault key to check for.\r\n"
31551 "\t2:\tDelay before operator registers as true (optional).\r\n" },
31554 "\tMarks the specified default key as having not been pressed, so key-pressed will be false "
31555 "until the player presses it again. See key-pressed help for more information about "
31556 "what a default key is.\r\n\r\n"
31557 "\tNote that this sexp will not work properly in repeating events. Use key-reset-multiple "
31558 "if this is to be called multiple times in one event.\r\n\r\n"
31559 "Returns a boolean value. Takes 1 or more arguments...\r\n"
31560 "\tAll:\tDefault key to reset." },
31564 "\tMarks the specified default key as having not been pressed, so key-pressed will be false "
31565 "until the player presses it again. See key-pressed help for more information about "
31566 "what a default key is.\r\n\r\n"
31567 "\tThis sexp, unlike key-reset, will work properly if called multiple times in one event.\r\n\r\n"
31568 "Returns a boolean value. Takes 1 or more arguments...\r\n"
31569 "\tAll:\tDefault key to reset." },
31571 {
OP_TARGETED,
"Targeted (Boolean training operator)\r\n"
31572 "\tIs true as long as the player has the specified ship (or ship's subsystem) targeted, "
31573 "or has been targeted for the specified amount of time.\r\n\r\n"
31574 "Returns a boolean value. Takes 1 to 3 arguments (first required, rest optional):\r\n"
31575 "\t1:\tName of ship to check if targeted by player.\r\n"
31576 "\t2:\tLength of time target should have been kept for (optional).\r\n"
31577 "\t3:\tName of subsystem on ship to check if targeted (optional)." },
31580 "\tIs true as long as the player has the specified jump node targeted, "
31581 "or has been targeted for the specified amount of time.\r\n\r\n"
31582 "Returns a boolean value. Takes 1 to 2 arguments (first required, rest optional):\r\n"
31583 "\t1:\tName of Jump Node to check if targeted by player.\r\n"
31584 "\t2:\tLength of time target should have been kept for (optional)."},
31588 "\tIs true as long as the player has had a missile lock for the specified amount of time. "
31589 "Optional arguments require lock to be maintained on a specified ship (or ship's subsystem).\r\n\r\n"
31590 "Returns a boolean value. Takes 1 to 3 arguments (first required, rest optional):\r\n"
31591 "\t1:\tLength of time missile lock should have been kept for.\r\n"
31592 "\t2:\tName of ship to check if locked onto by player (optional).\r\n"
31593 "\t3:\tName of subsystem on ship to check if locked onto (optional)." },
31595 {
OP_SPEED,
"Speed (Boolean training operator)\r\n"
31596 "\tBecomes true when the player has been within the specified speed range set by "
31597 "set-training-context-speed for the specified amount of time.\r\n\r\n"
31598 "Returns a boolean value. Takes 1 argument...\r\n"
31599 "\t1:\tTime in seconds." },
31602 "\tReturns the current throttle speed that the ship has been set to. Reverse speeds are returned as a negative value. "
31603 "Takes 1 argument...\r\n"
31604 "\t1:\tName of the player ship to check the throttle value for." },
31606 {
OP_FACING,
"Facing (Boolean training operator)\r\n"
31607 "\tIs true as long as the specified ship is within the player's specified "
31608 "forward cone. A forward cone is defined as any point that the angle between the "
31609 "vector of the point and the player, and the forward facing vector is within the "
31610 "given angle.\r\n\r\n"
31611 "Returns a boolean value. Takes 2 argument...\r\n"
31612 "\t1:\tShip to check is withing forward cone.\r\n"
31613 "\t2:\tAngle in degrees of the forward cone." },
31615 {
OP_IS_FACING,
"Is Facing (Boolean training operator)\r\n"
31616 "\tIs true as long as the second object is within the first ship's specified "
31617 "forward cone. A forward cone is defined as any point that the angle between the "
31618 "vector of the ship and point, and the forward facing vector is within the "
31619 "given angle. If the distance between the two is greater than the fourth"
31620 "parameter, this will return false.\r\n\r\n"
31621 "Returns a boolean value. Takes 3 or 4 argument...\r\n"
31622 "\t1:\tShip to check from.\r\n"
31623 "\t2:\tObject to check is within forward cone.\r\n"
31624 "\t3:\tAngle in degrees of the forward cone.\r\n"
31625 "\t4:\tRange in meters (optional)."},
31627 {
OP_FACING2,
"Facing Waypoint(Boolean training operator)\r\n"
31628 "\tIs true as long as the specified first waypoint is within the player's specified "
31629 "forward cone. A forward cone is defined as any point that the angle between the "
31630 "vector of the point and the player, and the forward facing vector is within the "
31631 "given angle.\r\n\r\n"
31632 "Returns a boolean value. Takes 2 argument...\r\n"
31633 "\t1:\tName of waypoint path whose first point is within forward cone.\r\n"
31634 "\t2:\tAngle in degrees of the forward cone." },
31637 {
OP_ORDER,
"Order (Boolean training operator)\r\n"
31638 "\tDeprecated - Use Query-Orders in any new mission.\r\n\r\n"
31639 "\tBecomes true when the player had given the specified ship or wing the specified order.\r\n\r\n"
31640 "Returns a boolean value. Takes 2 or 3 arguments...\r\n"
31641 "\t1:\tName of ship or wing to check if given order to.\r\n"
31642 "\t2:\tName of order to check if player has given.\r\n"
31643 "\t3:\tName of the target of the order (optional)." },
31646 "\tBecomes true when the player had given the specified ship or wing the specified order.\r\n\r\n"
31647 "Returns a boolean value. Takes 2 or more arguments...\r\n"
31648 "\t1:\tName of ship or wing to check if given order to.\r\n"
31649 "\t2:\tName of order to check if player has given.\r\n"
31650 "\t3:\tMaximum length of time since order was given. Use 0 for any time in the mission.\r\n"
31651 "\t4:\tName of the target of the order (optional).\r\n"
31652 "\t5:\tName of player ship giving the order(optional).\r\n"
31653 "\t6:\tName of the subsystem for Destroy Subsystem orders.(optional)" },
31657 "\tResets the list of orders the player has given.\r\n"
31658 "Takes no arguments." },
31661 "\tBecomes true when a waypoint is flown, but the waypoint is ahead of the one "
31662 "they are supposed to be flying. The one they are supposed to be flying is the "
31663 "next one in sequence in the path after the last one they have hit.\r\n\r\n"
31664 "Returns a boolean value. Takes no arguments." },
31666 {
OP_PATH_FLOWN,
"Path-flown (Boolean training operator)\r\n"
31667 "\tBecomes true when all the waypoints in the path have been flown, in sequence.\r\n\r\n"
31668 "Returns a boolean value. Takes no arguments." },
31671 "\tBecomes true when a waypoint is hit that is before the last one hit, which "
31672 "indicates they have flown a waypoint twice.\r\n\r\n"
31673 "Returns a boolean value. Takes no arguments." },
31676 "\tSends the player a training message. Uses the same messages as normal messages, "
31677 "only they get displayed differently using this operator. If a secondary message "
31678 "is specified, it is sent the last time, while the primary message is sent all other "
31679 "times (event should have a repeat count greater than 1).\r\n\r\n"
31680 "Takes 1-3 arguments...\r\n"
31681 "\t1:\tName of primary message to send.\r\n"
31682 "\t2:\tName of secondary message to send (optional).\r\n"
31683 "\t3:\tDelay (in seconds) to wait before sending message. (optional)\r\n"
31684 "\t4:\tAmount of Time (in seconds) to display message (optional)." },
31687 "\tTells FreeSpace that the player is expected to fly a waypoint path. This must be "
31688 "executed before waypoint-missed, waypoint-twice and path-flown operators become valid.\r\n\r\n"
31689 "Takes 2 arguments...\r\n"
31690 "\t1:\tName of waypoint path player should fly.\r\n"
31691 "\t2:\tDistance away a player needs to be from a waypoint for it to be registered as flown." },
31694 "\tTells FreeSpace that the player is expected to fly within a certain speed range. Once "
31695 "this operator has been executed, you can measure how long they have been within this "
31696 "speed range with the speed operator.\r\n\r\n"
31697 "Takes 2 arguments...\r\n"
31698 "\t1:\tMinimum speed of range player is to fly between.\r\n"
31699 "\t2:\tMaximum speed of range player is to fly between." },
31703 "\tConverts a string into an integer. All non-numeric characters (except for the negative sign) will be ignored, as will any fractional part of a decimal number. This behavior is somewhat different than the atoi() function in C or C++, which will abort if it encounters any non-numeric character. For a string like \"turret31\", this sexp will return 31, but atoi() will return 0.\r\n\r\n"
31704 "Takes 1 argument...\r\n"
31705 "\t1:\tString to convert" },
31709 "\tReturns the length of the specified string. Takes 1 argument." },
31713 "\tConverts an integer into a string. The destination must be a string variable.\r\n"
31714 "Takes 2 argument...\r\n"
31715 "\t1:\tInteger to convert\r\n"
31716 "\t2:\tString variable to contain the result\r\n" },
31720 "\tConcatenates two strings, putting the result into a string variable. If the length of the string will "
31721 "exceed the sexp variable token limit (currently 32), it will be truncated.\r\n\r\n"
31722 "Takes 3 arguments...\r\n"
31723 "\t1: First string\r\n"
31724 "\t2: Second string\r\n"
31725 "\t3: String variable to hold the result\r\n" },
31729 "\tExtracts a substring from a parent string, putting the result into a string variable. If the length of the string will "
31730 "exceed the sexp variable token limit (currently 32), it will be truncated.\r\n\r\n"
31731 "Takes 3 arguments...\r\n"
31732 "\t1: Parent string\r\n"
31733 "\t2: Index at which the substring begins (0-based)\r\n"
31734 "\t3: Length of the substring\r\n"
31735 "\t4: String variable to hold the result\r\n" },
31739 "\tReplaces a substring from a parent string with a new string, putting the result into a string variable. If the length of the string will "
31740 "exceed the sexp variable token limit (currently 32), it will be truncated.\r\n\r\n"
31741 "Takes 3 arguments...\r\n"
31742 "\t1: Parent string\r\n"
31743 "\t2: Index at which the substring begins (0-based)\r\n"
31744 "\t3: Length of the substring\r\n"
31745 "\t4: New substring (which can be a different length than the old substring)\r\n"
31746 "\t5: String variable to hold the result\r\n" },
31750 "\tPops up a warning on debug builds (and optionally on release builds)\r\n"
31751 "Takes 1 or more arguments...\r\n"
31752 "\t1:\t If false, popup messages in release builds too. Defaults to true.\r\n"
31753 "\t2:\tName of a message which will appear in the warning (optional)\r\n"},
31756 "\tIn a single player game, this function grants a player an automatic promotion to the "
31757 "next rank which the player can obtain. If he is already at the highest rank, this "
31758 "operator has no effect. It takes no arguments." },
31761 "\tIn single player missions, this function grants the given medal to the player. "
31762 "Currently, only 1 medal will be allowed to be given per mission.\r\n\r\n"
31763 "Takes 1 argument...\r\n"
31764 "\t1:\tName of medal to grant to player." },
31767 "\tThis sexpression is used to inform the AI about preferred secondary weapons to "
31768 "fire during combat. When this expression is evaluated, any AI ships of the given "
31769 "team prefer to fire the given weapon at the given ship. (Preferred over other "
31770 "secondary weapons)\r\n\r\n"
31771 "Takes 4 argument...\r\n"
31772 "\t1:\tTeam name which will prefer firing given weapon\r\n"
31773 "\t2:\tMaximum number of this type of weapon above team can fire.\r\n"
31774 "\t3:\tWeapon name (list includes only the valid weapons for this expression\r\n"
31775 "\t4:\tShip name at which the above named team should fire the above named weapon." },
31778 "\tReturns true if all of its arguments have become true in the order they are "
31779 "listed in.\r\n\r\n"
31780 "Returns a boolean value. Takes 2 or more boolean arguments." },
31783 "\tReturns true if the player has selected the given skill level or higher.\r\n\r\n"
31784 "Returns a boolean value. Takes 1 argument...\r\n"
31785 "\t1:\tName of the skill level to check." },
31788 "\tReturns the current number of players (multiplayer) playing in the current mission.\r\n\r\n"
31789 "Returns a numeric value. Takes no arguments." },
31792 "\tReturns true if all of the specified objects' cargo is known by the player (i.e. they "
31793 "have scanned each one.\r\n\r\n"
31794 "Returns a boolean value. Takes 1 or more arguments...\r\n"
31795 "\tAll:\tName of ship to check if its cargo is known." },
31798 "\tReturns true if all of the specified ships have been tagged.\r\n\r\n"
31799 "Returns a boolean value after <delay> seconds when all ships have been tagged. Takes 2 or more arguments...\r\n"
31800 "\t1:\tDelay in seconds after which sexpression will return true when all cargo scanned."
31801 "\tRest:\tNames of ships to check if tagged.." },
31804 "\tReturns true if all of the specified flags have been set for this particular ship.\r\n\r\n"
31805 "Takes 2 or more arguments...\r\n"
31806 "\t1:\tName of the ship."
31807 "\tRest:\tShip, object or ai flags which might be set for this ship.." },
31810 "\tReturns true if all of the specified subsystem cargo is known by the player.\r\n"
31811 "\tNote: Cargo must be explicitly named.\r\n\r\n"
31812 "Returns a boolean value after <delay> seconds when all cargo is known. Takes 3 or more arguments...\r\n"
31813 "\t1:\tDelay in seconds after which sexpression will return true when all cargo scanned.\r\n"
31814 "\t2:\tName of capital ship\r\n"
31815 "\tRest:\tNames of subsystems to check for cargo known.." },
31818 "\tReturns true if all of the specified objects' cargo is known by the player (i.e. they "
31819 "have scanned each one.\r\n\r\n"
31820 "Returns a boolean value after <delay> seconds when all cargo is known. Takes 2 or more arguments...\r\n"
31821 "\t1:\tDelay in seconds after which sexpression will return true when all cargo scanned."
31822 "\tRest:\tNames of ships/cargo to check for cargo known.." },
31825 "\tReturns true if a promotion was granted via the 'Grant promotion' operator in the mission.\r\n\r\n"
31826 "Returns a boolean value. Takes no arguments." },
31829 "\tReturns true if a medal was granted via via the 'Grant medal' operator in the mission. "
31830 "If you provide the optional argument to this operator, then true is only returned if the "
31831 "specified medal was granted.\r\n\r\n"
31832 "Returns a boolean value. Takes 0 or 1 arguments...\r\n"
31833 "\t1:\tName of medal to specifically check for (optional)." },
31836 "\tInforms the game logic that right now is a good time for a given team to attempt to "
31837 "rearm their ships. The time parameter specified how long the \"good time\" will last.\r\n\r\n"
31838 "Takes 2 arguments...\r\n"
31839 "\t1:\tTeam Name\r\n"
31840 "\t2:\tTime in seconds rearm window should last" },
31843 "\tThis operator makes the given ship type available to the Terran team. Players will be "
31844 "able to have ships of this type in their starting wings in all future missions of this "
31845 "campaign.\r\n\r\n"
31846 "Takes 1 argument...\r\n"
31847 "\t1:\tName of ship type (or ship class) to allow." },
31850 "\tThis operator makes the given weapon available to the Terran team. Players will be "
31851 "able to equip ships with in all future missions of this campaign.\r\n\r\n"
31852 "Takes 1 argument...\r\n"
31853 "\t1:\tName of weapon (primary or secondary) to allow." },
31856 "\tThis operator makes the given ship type available in the techroom database. Players will "
31857 "then be able to view this ship's specs there.\r\n\r\n"
31858 "Takes 1 or more arguments...\r\n"
31859 "\tAll:\tName of ship type (or ship class) to add." },
31862 "\tThis operator makes the given weapon available in the techroom database. Players will "
31863 "then be able to view this weapon's specs there.\r\n\r\n"
31864 "Takes 1 or more arguments...\r\n"
31865 "\tAll:\tName of weapon (primary or secondary) to add." },
31867 {
OP_TECH_ADD_INTEL,
"Tech add intel (Action operator, deprecated in favor of tech-add-intel-xstr)\r\n"
31868 "\tThis operator makes the given intel entry available in the techroom database. Players will "
31869 "then be able to view this intel entry there.\r\n\r\n"
31870 "Takes 1 or more arguments...\r\n"
31871 "\tAll:\tName of intel entry to add." },
31874 "\tThis operator makes the given intel entry available in the techroom database. Players will "
31875 "then be able to view this intel entry there.\r\n\r\n"
31876 "Takes 2 or more arguments...\r\n"
31877 "\t1:\tName of intel entry to add.\r\n"
31878 "\t2:\tXSTR ID of intel entry, or -1 if there is no XSTR entry.\r\n"
31879 "Use Add-Data for multiple entries.\r\n\r\n"
31880 "IMPORTANT: Each additional entry in the list MUST HAVE two fields; "
31881 "any entry without both fields will be ignored, as will any successive entries." },
31884 "\tThis operator resets the tech room to the default represented in the tables. This is "
31885 "useful for starting new campaigns, so that the player will not see tech entries carried over "
31886 "from previous campaigns.\r\n\r\n"
31887 "Takes no arguments." },
31890 "\tThis operator allows direct alteration of the player's score for this mission.\r\n\r\n"
31891 "Takes 2 or more arguments."
31892 "\t1:\tAmount to alter the player's score by.\r\n"
31893 "\tRest:\tName of ship the player is flying."},
31896 "\tThis operator allows direct alteration of the team's score for a TvT mission (Does nothing otherwise).\r\n\r\n"
31897 "Takes 2 arguments."
31898 "\t1:\tAmount to alter the team's score by.\r\n"
31899 "\t2:\tThe team to alter the score for. (0 will add the score to all teams!)"},
31902 "\tCauses the specified ship to go into evade mode and run away like the weak "
31903 "sally-boy it is.\r\n\r\n"
31904 "Takes 2 arguments...\r\n"
31905 "\t1:\tName of ship to evade from.\r\n"
31906 "\t2:\tGoal priority (number between 0 and 89)." },
31909 "\tCauses the specified ship to keep itself near the given ship and not stray too far "
31910 "away from it.\r\n\r\n"
31911 "Takes 2 arguments...\r\n"
31912 "\t1:\tName of ship to stay near.\r\n"
31913 "\t2:\tGoal priority (number between 0 and 89)." },
31916 "\tTells the specified ship to stay a safe distance away from any ship that isn't on the "
31917 "same team as it.\r\n\r\n"
31918 "Takes 1 argument...\r\n"
31919 "\t1:\tGoal priority (number between 0 and 89)." },
31922 "\tTells all ships to ignore the given ship and not consider it as a valid "
31923 "target to attack.\r\n\r\n"
31924 "Takes 2 arguments...\r\n"
31925 "\t1:\tName of ship to ignore.\r\n"
31926 "\t2:\tGoal priority (number between 0 and 89)." },
31930 "\tTells the specified ship to ignore the given ship and not consider it as a valid "
31931 "target to attack.\r\n\r\n"
31932 "Takes 2 arguments...\r\n"
31933 "\t1:\tName of ship to ignore.\r\n"
31934 "\t2:\tGoal priority (number between 0 and 89)." },
31937 "\tCauses the specified ship to stay still. The ship will do nothing until attacked at "
31938 "which time the ship will come to life and defend itself.\r\n\r\n"
31939 "Takes 2 arguments...\r\n"
31940 "\t1:\tShip or waypoint the ship staying still will directly face (currently not implemented)\r\n"
31941 "\t2:\tGoal priority (number between 0 and 89)." },
31944 "\tCauses the specified ship to pretend that it is dead and not do anything. This "
31945 "expression should be used to indicate that a ship has no pilot and cannot respond "
31946 "to any enemy threats. A ship playing dead will not respond to any attack. This "
31947 "should really be named ai-is-dead\r\n\r\n"
31948 "Takes 1 argument...\r\n"
31949 "\t1:\tGoal priority (number between 0 and 89)." },
31952 "\tCauses the ship to form on the specified ship's wing. This works analogous to the "
31953 "player order, and will cause all other goals specified for the ship to be purged.\r\n\r\n"
31954 "Takes 1 argument...\r\n"
31955 "\t1:\tShip to form on." },
31958 "\tCauses the specified hud gauge to flash to draw the player's attention to it.\r\n\r\n"
31959 "Takes 1 argument...\r\n"
31960 "\t1:\tName of hud gauge to flash." },
31963 "\tSets a ships flag and/or parse flag.\r\n\r\n"
31964 "Takes 4 or more arguments...\r\n"
31965 "\t1:\tShip flag name\r\n"
31966 "\t2:\tTrue if turning on, false if turning off\r\n"
31967 "\t3:\tTrue\\False - Apply this flag to future waves of this wing. Apply to ship if not present\r\n"
31968 "\tRest:\t (optional) Name of ships, wings, or entire teams. If not supplied, will work on all ships in the mission\r\n\r\n"
31970 "invulnerable - Stops ship from taking any damage\r\n"
31971 "protect-ship - Ship and Turret AI will ignore and not attack ship\r\n"
31972 "beam-protect-ship - Turrets with beam weapons will ignore and not attack ship\r\n"
31973 "no-shields - Ship will have no shields (ETS will be rebalanced if shields were off and are enabled)\r\n"
31974 "targetable-as-bomb - Allows ship to be targetted with the bomb targetting key\r\n"
31975 "flak-protect-ship - Turrets with flak weapons will ignore and not attack ship\r\n"
31976 "laser-protect-ship - Turrets with laser weapons will ignore and not attack ship\r\n"
31977 "missile-protect-ship - Turrets with missile weapons will ignore and not attack ship\r\n"
31978 "immobile - Will not let a ship move or rotate in any fashion\r\n"
31979 "vaporize - Causes a ship to vanish (no deathroll, no debris, no explosion) when destroyed\r\n"
31980 "break-warp - Causes a ship's subspace drive to break. Can be repaired by a support ship\r\n"
31981 "never-warp - Causes a ship's subspace drive to never work. Cannot be repaired by a support ship\r\n"
31982 "afterburner-locked - Will stop a ship from firing their afterburner\r\n"
31983 "primaries-locked - Will stop a ship from firing their primary weapons\r\n"
31984 "secondaries-locked - Will stop a ship from firing their secondary weapons\r\n"
31985 "no-subspace-drive - Will not allow a ship to jump into subspace\r\n"
31986 "don't-collide-invisible - Will cause polygons with an invisible texture to stop colliding with objects\r\n"
31987 "no-ets - Will not allow a ship to alter its ETS system\r\n"
31988 "toggle-subsystem-scanning - Switches between being able to scan a whole ship or individual subsystems\r\n"
31989 "scannable - Whether or not the ship can be scanned\r\n"
31990 "cargo-known - If set, the ships cargo can be seen without scanning the ship\r\n"
31991 "stealth - If set, the ship can't be targeted, is invisible on radar, and is ignored by AI unless firing\r\n"
31992 "friendly-stealth-invisible - If set, the ship can't be targeted even by ships on the same team\r\n"
31993 "hide-ship-name - If set, the ship name can't be seen when the ship is targeted\r\n"
31994 "hidden-from-sensors - If set, the ship can't be targeted and appears on radar as a blinking dot\r\n"
31995 "no-dynamic - Will stop allowing the AI to persue dynamic goals (eg: chasing ships it was not ordered to)\r\n"
31996 "no-secondary-lock-on - Will disable target acquisition for secondaries of all types (does not affect turrets)\r\n"},
31999 "\tCauses the ships listed in this sexpression to be visible with player sensors.\r\n\r\n"
32000 "Takes 1 or more arguments...\r\n"
32001 "\t1+:\tName of ships to make visible to sensors." },
32004 "\tCauses the ships listed in this sexpression to be invisible to player sensors.\r\n\r\n"
32005 "Takes 1 or more arguments...\r\n"
32006 "\t1+:\tName of ships to make invisible to sensors." },
32009 "\tCauses the ship listed in this sexpression to be vulnerable to weapons.\r\n\r\n"
32010 "Takes 1 or more arguments...\r\n"
32011 "\t1+:\tName of ships to make vulnerable to weapons." },
32014 "\tCauses the ships listed in this sexpression to be invulnerable to weapons. Use with caution!!!!\r\n\r\n"
32015 "Takes 1 or more arguments...\r\n"
32016 "\t1+:\tName of ships to make invulnerable to weapons." },
32019 "\tCauses the ships listed in this sexpression to be targetable with bomb targeting key.\r\n\r\n"
32020 "Takes 1 or more arguments...\r\n"
32021 "\t1+:\tName of ships to make targetable with bomb targeting key." },
32024 "\tCauses the ships listed in this sexpression to not be targetable with bomb targeting key.\r\n\r\n"
32025 "Takes 1 or more arguments...\r\n"
32026 "\t1+:\tName of ships to make nontargetable with bomb targeting key." },
32029 "\tCauses the ship listed in this sexpression to have their shields activated.\r\n"
32030 "If the ship had no-shields prior to the sexp being called, the ETS will be rebalanced to default.\r\n"
32031 "Takes 1 or more arguments...\r\n"
32032 "\t1+:\tName of ships to activate shields on." },
32035 "\tCauses the ships listed in this sexpression to have their shields deactivated. \r\n\r\n"
32036 "Takes 1 or more arguments...\r\n"
32037 "\t1+:\tName of ships to deactivate shields on." },
32040 "\tCauses the ships listed in this sexpression to not be killable by weapons. Use with caution!!!!\r\n\r\n"
32041 "Takes 1 or more arguments...\r\n"
32042 "\t1+:\tName of ships to make unkillable." },
32045 "\tCauses the ships listed in this sexpression to be killable by weapons, if not invulnerable.\r\n\r\n"
32046 "Takes 1 or more arguments...\r\n"
32047 "\t1+:\tName of ships to make killable." },
32051 "\tSame as ship-guardian, except the lowest possible hull value is specified by the sexp rather than defaulting to 1.\r\n"
32052 "Call with a threshold of 0 (or use ship-no-guardian) to deactivate.\r\n\r\n"
32053 "Takes 2 or more arguments...\r\n"
32054 "\t1:\tThreshold value.\r\n"
32055 "\t2+:\tName of ships to make unkillable." },
32059 "\tSame as ship-guardian-threshold, but works on subsystems.\r\n"
32060 "Call with a threshold of 0 to deactivate.\r\n\r\n"
32061 "Takes 3 or more arguments...\r\n"
32062 "\t1:\tThreshold value.\r\n"
32063 "\t2:\tShip housing the subsystem(s).\r\n"
32064 "\t3+:\tSubsystems to make unkillable." },
32068 "\tCauses the ships listed in this sexpression to become stealth ships (i.e. invisible to radar).\r\n\r\n"
32069 "Takes 1 or more arguments...\r\n"
32070 "\tAll:\tName of ships to make stealthy." },
32074 "\tCauses the ships listed in this sexpression to become non-stealth ships (i.e. visible to radar).\r\n\r\n"
32075 "Takes 1 or more arguments...\r\n"
32076 "\tAll:\tName of ships to make non-stealthy." },
32080 "\tCauses the friendly ships listed in this sexpression to be invisible to radar, just like hostile stealth ships."
32081 "It doesn't matter if the ship is friendly at the time this sexp executes: as long as it is a stealth ship, it will"
32082 "be invisible to radar both as hostile and as friendly.\r\n\r\n"
32083 "Takes 1 or more arguments...\r\n"
32084 "\tAll:\tName of ships" },
32088 "\tCauses the friendly ships listed in this sexpression to resume their normal behavior of being visible to radar as"
32089 "stealth friendlies. Does not affect their visibility as stealth hostiles.\r\n\r\n"
32090 "Takes 1 or more arguments...\r\n"
32091 "\tAll:\tName of ships" },
32095 "\tCauses the specified ship subsystem(s) to be targetable on radar.\r\n"
32096 "Takes 2 or more arguments...\r\n"
32097 "\t1:\tName of a ship\r\n"
32098 "\tRest: Name of the ship's subsystem(s)" },
32102 "\tCauses the specified ship subsystem(s) to not be targetable on radar.\r\n"
32103 "Takes 2 or more arguments...\r\n"
32104 "\t1:\tName of a ship\r\n"
32105 "\tRest: Name of the ship's subsystem(s)" },
32109 "\tCauses the -destroyed version of specified ship subsystem(s) to not render when it's destroyed.\r\n"
32110 "Takes 3 or more arguments...\r\n"
32111 "\t1:\tName of a ship\r\n"
32112 "\t2:\tTrue = Do not render or False = render if exists\r\n"
32113 "\tRest: Name of the ship's subsystem(s)"
32114 "\tNote: If subsystem is already dead it will vanish or reappear out of thin air" },
32119 "\tCauses the specified ship subsystem(s) to not render live debris when it's destroyed.\r\n"
32120 "Takes 3 or more arguments...\r\n"
32121 "\t1:\tName of a ship\r\n"
32122 "\t2:\tTrue = Do not render or False = render if exists\r\n"
32123 "\tRest: Name of the ship's subsystem(s)" },
32127 "\tCauses the subsystem to vanish without a trace - no fanfare, notification, or special effects. See also ship-vanish.\r\n"
32128 "\tSingle Player Only! Warning: This will cause subsystem destruction not to be logged, so 'has-departed', etc. will not work\r\n"
32129 "Takes 3 or more arguments...\r\n"
32130 "\t1:\tName of a ship\r\n"
32131 "\t2:\tTrue = vanish or False = don't vanish\r\n"
32132 "\tRest: Name of the ship's subsystem(s)"
32133 "\tNote: Useful for replacing subsystems with actual docked models." },
32137 "\tCauses secondary weapons to ignore dead ship subsystem(s)and home on hull instead.\r\n"
32138 "Takes 3 or more arguments...\r\n"
32139 "\t1:\tName of a ship\r\n"
32140 "\t2:\tTrue = Ignore dead or False = don't ignore\r\n"
32141 "\tRest: Name of the ship's subsystem(s)" },
32145 "\tChanges the alternate ship class name displayed in the HUD target window. Takes 2 or more arguments...\r\n"
32146 "\t1:\tThe ship class name to display\r\n"
32147 "\tRest:\tThe ships to display the new class name" },
32151 "\tChanges the callsign of a ship. Takes 2 or more arguments...\r\n"
32152 "\t1:\tThe callsign to display or empty to remove\r\n"
32153 "\tRest:\tThe ships to display the new callsign" },
32157 "\tSets the message displayed when the specified players are killed. Takes 1 or more arguments...\r\n"
32158 "\t1:\tThe message\r\n"
32159 "\tRest:\tThe players for whom this message is displayed (optional) (currently not implemented)" },
32162 "\tBoolean function which returns true if the percentage of ships in the listed ships and wings "
32163 "which have arrived is greater or equal to the given percentage. For wings, all ships of all waves "
32164 "are used for calculation for the total possible ships to arrive.\r\n\r\n"
32165 "Takes 2 or more arguments...\r\n"
32166 "\t1:\tPercentge of arriving ships at which this function will return true.\r\n"
32167 "\t2+:\tList of ships/wings whose arrival status should be determined." },
32170 "\tBoolean function which returns true if the percentage of ships in the listed ships and wings "
32171 "which have departed is greater or equal to the given percentage. For wings, all ships of all waves "
32172 "are used for calculation for the total possible ships to depart.\r\n\r\n"
32173 "Takes 2 or more arguments...\r\n"
32174 "\t1:\tPercentge of departed ships at which this function will return true.\r\n"
32175 "\t2+:\tList of ships/wings whose departure status should be determined." },
32178 "\tBoolean function which returns true if the percentage of ships in the listed ships and wings "
32179 "which have been destroyed is greater or equal to the given percentage. For wings, all ships of all waves "
32180 "are used for calculation for the total possible ships to be destroyed.\r\n\r\n"
32181 "Takes 2 or more arguments...\r\n"
32182 "\t1:\tPercentge of destroyed ships at which this function will return true.\r\n"
32183 "\t2+:\tList of ships/wings whose destroyed status should be determined." },
32187 "\tBoolean function which returns true if the percentage of ships in the listed ships "
32188 "which have been disarmed is greater or equal to the given percentage.\r\n\r\n"
32189 "Takes 2 or more arguments...\r\n"
32190 "\t1:\tPercentge of disarmed ships at which this function will return true.\r\n"
32191 "\t2+:\tList of ships whose disarmed status should be determined." },
32195 "\tBoolean function which returns true if the percentage of ships in the listed ships "
32196 "which have been disabled is greater or equal to the given percentage.\r\n\r\n"
32197 "Takes 2 or more arguments...\r\n"
32198 "\t1:\tPercentge of disabled ships at which this function will return true.\r\n"
32199 "\t2+:\tList of ships whose disabled status should be determined." },
32202 "\tCauses Red Alert status in a mission. This function ends the current mission, and moves to "
32203 "the next mission in the campaign under red alert status. There should only be one branch from "
32204 "a mission that uses this expression\r\n\r\n"
32205 "Takes no arguments."},
32208 "\tTurns nebula on/off\r\n"
32209 "\tTakes1 argument...\r\n"
32210 "\t1:\t0 for nebula off, 1 for nebula on" },
32213 "\tTurns subspace on/off\r\n"
32214 "\tTakes 1 argument...\r\n"
32215 "\r1:\t0 for subspace off, 1 for subspace on" },
32219 "\tEnds the mission as if the player had engaged his subspace drive, but without him doing so. Dumps the player back into a normal debriefing. Does not invoke red-alert status.\r\n"
32220 "\t1:\tEnd Mission even if the player is dead (optional; defaults to true)\r\n"
32221 "\t2:\tBoot the player out into the main hall instead of going to the debriefing (optional; defaults to false; not supported in multi)\r\n"
32222 "\t3:\tGo to the mainhall instead of starting the next mission (optional; defaults to false; not yet tested in multi)"
32227 "\tSets or clears the \"toggle debriefing\" mission flag. If set, the mission will have its debriefing turned off, unless it is a multiplayer dogfight mission, in which case its debriefing will be turned on. Takes 1 argument.\r\n"
32232 "\tForces activation of the player's subspace drive, thus ending the mission. Takes no arguments."
32237 "\tSets the cargo on the specified ship or ship subsystem as known or scanned. Takes 1 or more arguments...\r\n"
32238 "\t1:\tName of a ship\r\n"
32239 "\tRest:\tName of a subsystem on that ship (optional)\r\n" },
32243 "\tSets the cargo on the specified ship or ship subsystem as unknown or unscanned. Takes 1 or more arguments...\r\n"
32244 "\t1:\tName of a ship\r\n"
32245 "\tRest:\tName of a subsystem on that ship (optional)\r\n" },
32248 "\tReturns true N seconds after the listed ships depart, if those ships depart within the "
32249 "radius of the given jump node. The delay value is given in seconds.\r\n\r\n"
32250 "Takes 3 or more arguments...r\n"
32251 "\t1:\tDelay in seconds after the last ship listed departed before this expression can return true.\r\n"
32252 "\t2:\tName of a jump node\r\n"
32253 "\t3+:\tList of ships to check for departure within radius of the jump node." },
32256 "\tReturns true N seconds after all the listed ships or wings have been destroyed or have "
32257 "departed.\r\n\r\n"
32258 "Takes 2 or more arguments...\r\n"
32259 "\t1:\tDelay in seconds after the last ship/wing is destroyed or departed before this expression can return true.\r\n"
32260 "\t2+:\tName of a ship or wing" },
32264 "\tMike K.'s special training sexp. Returns a boolean value. Takes 1 argument as follows:\r\n"
32265 "\t0: Ship \"Freighter 1\" is aspect locked by the player\r\n"
32266 "\t1: Player has fired Interceptor#Weak at Freighter 1\r\n"
32267 "\t2: Ship \"Freighter 1\", subsystem \"Weapons\" is aspect locked by the player\r\n"
32268 "\t3: Apply 10 points of damage to player's forward shields (action operator)\r\n"
32269 "\t4: Player's front shields are nearly gone\r\n"
32270 "\t5: Quickly recharge player's front shields (action operator)\r\n"
32271 "\t6: Reduce all shield quadrants except front to 0 (action operator)\r\n"
32272 "\t7: Front shield quadrant is near maximum strength\r\n"
32273 "\t8: Rear shield quadrant is near maximum strength\r\n"
32274 "\t9: Reduce left and right shield quadrants to 0 (action operator)\r\n"
32275 "\t10: Player has fewer than 8 missiles left\r\n"
32276 "\t11: Player has 8 or more missiles left\r\n"
32277 "\t12: Player has fewer than 4 missiles left\r\n"
32278 "\t13: Reduce front shield quadrant to 0 (action operator)\r\n"
32279 "\t100: Player is out of countermeasures\r\n"
32280 "\t2000: Training failed"
32284 "\tEnds the builtin campaign. Should only be used by the main FreeSpace campaign\r\n"
32285 "\t1:\tEnd Campaign even if the player is dead (optional; defaults to true)\r\n" },
32288 "\tSets the ship to vaporize when it is destroyed. Does not actually destroy the ship - use self-destruct for that.\r\n"
32289 "Takes 1 or more arguments...\r\n"
32290 "\tAll:\tList of ships on which to set the vaporize flag" },
32293 "\tSets the ship to not vaporize when it is destroyed. Does not actually destroy the ship - use self-destruct for that.\r\n"
32294 "Takes 1 or more arguments...\r\n"
32295 "\tAll:\tList of ships on which to unset the vaporize flag" },
32298 "\tSets the \"don't collide invisible\" flag on a list of ships.\r\n"
32299 "Takes 1 or more arguments...\r\n"
32300 "\tAll:\tList of ships on which to set the \"don't collide invisible\" flag" },
32303 "\tUnsets the \"don't collide invisible\" flag on a list of ships.\r\n"
32304 "Takes 1 or more arguments...\r\n"
32305 "\tAll:\tList of ships on which to unset the \"don't collide invisible\" flag" },
32308 "\tAllows the specified ship(s) to move. Opposite of set-immobile.\r\n"
32309 "Takes 1 or more arguments...\r\n"
32310 "\tAll:\tList of ships on which to unset the \"immobile\" flag" },
32313 "\tPrevents the specified ship(s) from moving in any way.\r\n"
32314 "Takes 1 or more arguments...\r\n"
32315 "\tAll:\tList of ships on which to set the \"immobile\" flag" },
32318 "\tCauses the game to ignore (or stop ignoring) a certain key.\r\n"
32319 "Takes 2 or more arguments...\r\n"
32320 "\t1: Number of times to ignore this key (-1 = forever, 0 = stop ignoring). \r\n"
32321 "\tRest: Which key(s) to ignore.\r\n"
32325 "\tBreak the warp drive on the specified ship. A broken warp drive can be repaired by "
32326 "a repair ship. Takes 1 or more arguments...\r\n"
32327 "\tAll:\tList of ships to break the warp drive on" },
32330 "\tFixes a broken warp drive instantaneously. This option applies to warp drives broken with "
32331 "the break-warp sepxression. Takes 1 or more arguments...\r\n"
32332 "\tAll:\tList of ships whose warp drive should be fixed"},
32335 "\tNever allows a ship to warp out. When this sexpression is used, the given ships will "
32336 "never be able to warp out. The warp drive cannot be repaired. Takes 1 or more arguments...\r\n"
32337 "\tAll:\tList of ships whose are not allowed to warp out under any condition"},
32340 "\tAllows a ship which was previously not allowed to warp out to do so. When this sexpression is "
32341 "used, the given ships will be able to warp out again. Takes 1 or more arguments...\r\n"
32342 "\tAll:\tList of ships whose are allowed to warp out"},
32345 "\tTurns on or off the subspace edrive for the given ships. A ship with no subspace drive will act "
32346 "as though it doesn't even occur to him to depart via subspace, and if ordered to do so, he will look "
32347 "for a friendly ship with a hangar bay. If the ship is the player, pressing Alt-J will not not initiate "
32348 "a jump, nor give any indication that a jump failed. Takes 2 or more arguments...\r\n"
32349 "\t1:\tTrue if the ship should have a drive; false otherwise\r\n"
32350 "\tRest:\tList of ships" },
32353 "\tCauses a cargo carrying ship to jettison its cargo without the undocking procedure. Takes 2 or more arguments...\r\n"
32354 "\t1: Ship to jettison cargo\r\n"
32355 "\t2: Delay after which to jettison cargo (note that this isn't actually used)\r\n"
32356 "\tRest (optional): Cargo to jettison. If no optional arguments are specified, the ship jettisons all cargo.\r\n"
32360 "\tCauses one ship to become instantly docked to another at the specified docking ports. Takes 4 arguments...\r\n"
32361 "\t1: Docker ship\r\n"
32362 "\t1: Docker point\r\n"
32363 "\t1: Dockee ship\r\n"
32364 "\t1: Dockee point\r\n"
32368 "\tFire a beam weapon from a specified subsystem\r\n"
32369 "\t1:\tShip which will be firing\r\n"
32370 "\t2:\tTurret which will fire the beam (note, this turret must have at least 1 beam weapon on it)\r\n"
32371 "\t3:\tShip which will be targeted\r\n"
32372 "\t4:\tSubsystem to target (optional)\r\n"
32373 "\t5:\tWhether to force the beam to fire (disregarding FOV and subsystem status) (optional)\r\n" },
32376 "\tFire a beam weapon from a specified subsystem at a set of coordinates. Not compatible with multiplayer.\r\n"
32377 "\t1:\tShip which will be firing\r\n"
32378 "\t2:\tTurret which will fire the beam (note, this turret must have at least 1 beam weapon on it)\r\n"
32379 "\t3:\tx coordinate to be targeted\r\n"
32380 "\t4:\ty coordinate to be targeted\r\n"
32381 "\t5:\tz coordinate to be targeted\r\n"
32382 "\t6:\t(Optional Operator) Whether to force the beam to fire (disregarding FOV and subsystem status). Defaults to False\r\n"
32383 "\t7:\tsecond x coordinate to be targeted (optional; only used for slash beams)\r\n"
32384 "\t8:\tsecond y coordinate to be targeted (optional; only used for slash beams)\r\n"
32385 "\t9:\tsecond z coordinate to be targeted (optional; only used for slash beams)\r\n" },
32388 "\tFire a beam weapon from the specified coordinates to the specified target. Not compatible with multiplayer.\r\n"
32389 "\t1:\tBeam weapon to fire\r\n"
32390 "\t2:\tParent ship (for kill credit, if applicable; can be none)\r\n"
32391 "\t3:\tTeam for this beam to be on (related to difficulty-based damage)\r\n"
32392 "\t4:\tX coordinate to fire from\r\n"
32393 "\t5:\tY coordinate to fire from\r\n"
32394 "\t6:\tZ coordinate to fire from\r\n"
32395 "\t7:\tTarget ship (can be none)\r\n"
32396 "\t8:\tTarget subsystem (optional, can be none)\r\n"
32397 "\t9:\tX coordinate to fire at (optional)\r\n"
32398 "\t10:\tY coordinate to fire at (optional)\r\n"
32399 "\t11:\tZ coordinate to fire at (optional)\r\n"
32400 "\t12:\tSecond X coordinate to fire at (optional; used for slash beams)\r\n"
32401 "\t13:\tSecond Y coordinate to fire at (optional; used for slash beams)\r\n"
32402 "\t14:\tSecond Z coordinate to fire at (optional; used for slash beams)\r\n" },
32405 "\tReturns whether a given ship is tagged or not\r\n"},
32408 "\tReturns true if all the ships specified are currently under control of a player.\r\n"
32409 "\t1 \t(SinglePlayer) When true ships under AI control return false even if they are the player ship\r\n"
32410 "\t \t(Multiplayer) When true ships that are respawning return true if the player is still connected\r\n"
32411 "\tRest \tList of ships to test"},
32414 "\tReturns the # of kills a player has. The ship specified in the first field should be the ship the player is in.\r\n"
32415 "\tSo, for single player, this would be Alpha 1. For multiplayer, it can be any ship with a player in it. If, at any\r\n"
32416 "\ttime there is no player in a given ship, this sexpression will return 0"},
32419 "\tReturns the # of assists a player has. The ship specified in the first field should be the ship the player is in.\r\n"
32420 "\tSo, for single player, this would be Alpha 1. For multiplayer, it can be any ship with a player in it. If, at any\r\n"
32421 "\ttime there is no player in a given ship, this sexpression will return 0"},
32424 "\tReturns the score a player has. The ship specified in the first field should be the ship the player is in.\r\n"
32425 "\tSo, for single player, this would be Alpha 1. For multiplayer, it can be any ship with a player in it. If, at any\r\n"
32426 "\ttime there is no player in a given ship, this sexpression will return 0"},
32429 "\tReturns the # times a ship that is a player start has died.\r\n"
32430 "\tThe ship specified in the first field should be the ship that could have a player in.it\r\n"
32431 "\tOnly really useful for multiplayer."},
32434 "\tReturns the # respawns a player (or AI that could have been a player) has remaining.\r\n"
32435 "\tThe ship specified in the first field should be the player start.\r\n"
32436 "\tOnly really useful for multiplayer."},
32439 "\tRemoves all live weapons currently in the game"
32440 "\t1: (Optional) Remove only this specific weapon\r\n"},
32443 "\tSet the # respawns a player (or AI that could have been a player) has used.\r\n"
32444 "\t1: Number of respawns used up\r\n"
32445 "\tRest: The player start ship to operate on.\r\n"
32446 "\tOnly really useful for multiplayer."},
32449 "\tReturns the # of kills a player has on a given ship type (fighter, bomber, cruiser, etc).\r\n"
32450 "The ship specified in the first field should be the ship the player is in.\r\n"
32451 "\tSo, for single player, this would be Alpha 1. For multiplayer, it can be any ship with a player in it. If, at any\r\n"
32452 "\ttime there is no player in a given ship, this sexpression will return 0"},
32455 "\tReturns the # of kills a player has on a specific ship class (Ulysses, Hercules, etc).\r\n"
32456 "The ship specified in the first field should be the ship the player is in.\r\n"
32457 "\tSo, for single player, this would be Alpha 1. For multiplayer, it can be any ship with a player in it. If, at any\r\n"
32458 "\ttime there is no player in a given ship, this sexpression will return 0"},
32461 "\tSets one or more beam weapons to allow firing for a given ship\r\n"
32462 "\t1: Ship to be operated on\r\n"
32463 "\t2, 3, etc : List of turrets to activate\r\n"},
32466 "\tSets all beam weapons on the specified ship to be active\r\n"},
32469 "\tSets one or more beam weapons to NOT allow firing for a given ship\r\n"
32470 "\t1: Ship to be operated on\r\n"
32471 "\t2, 3, etc : List of turrets to deactivate\r\n"},
32474 "\tSets all beam weapons on the specified ship to be deactivated\r\n"},
32477 "\tSets one or more turret weapons to allow firing for a given ship\r\n"
32478 "\t1: Ship to be operated on\r\n"
32479 "\t2, 3, etc : List of turrets to activate\r\n"},
32482 "\tSets all turret weapons on the specified ship to be active\r\n"},
32485 "\tSets one or more turret weapons to NOT allow firing for a given ship\r\n"
32486 "\t1: Ship to be operated on\r\n"
32487 "\t2, 3, etc : List of turrets to deactivate\r\n"},
32490 "\tSets all turret weapons on the specified ship to be deactivated\r\n"},
32493 "\tSets a given turret weapon slot to the specified weapon\r\n"
32494 "\t1: Ship turret is on\r\n"
32496 "\t3: Weapon to set slot to\r\n"
32497 "\t4: Primary slot (or 0 to use secondary)\r\n"
32498 "\t5: Secondary slot (or 0 to use primary)"},
32501 "\tSets specified ship turrets direction preference to the specified value\r\n"
32502 "\t1: Ship turrets are on\r\n"
32503 "\t2: Preference to set, 0 to disable, or negative to reset to default\r\n"
32504 "\trest: Turrets to set\r\n"},
32507 "\tSets specified ship turrets rate of fire to the specified value\r\n"
32508 "\t1: Ship turrets are on\r\n"
32509 "\t2: Rate to set in percentage format (200 = 2x, 50 = .5x), 0 to set to number of fire points, or negative to reset to default\r\n"
32510 "\trest: Turrets to set\r\n"},
32513 "\tSets specified ship turrets optimum range to the specified value\r\n"
32514 "\t1: Ship turrets are on\r\n"
32515 "\t2: Priority to set, 0 to disable, or negative to reset to default\r\n"
32516 "\trest: Turrets to set\r\n"},
32519 "\tSets target priorities for the specified ship turret\r\n"
32520 "\t1: Ship turret is on\r\n"
32521 "\t2: Turret to set\r\n"
32522 "\t3: True = Set new list, False = Reset to turret default\r\n"
32523 "\trest: Priorities to set (max 32) or blank for no priorities\r\n"},
32526 "\tGets the turret's primary bank ammo, only works with ballistic weapons\r\n"
32527 "\t1: Ship turret is on\r\n"
32528 "\t2: Turret the bank is on\r\n"
32529 "\t3: Bank to check ammo\r\n"},
32532 "\tGets the turret's secondary bank ammo\r\n"
32533 "\t1: Ship turret is on\r\n"
32534 "\t2: Turret to check ammo\r\n"
32535 "\t3: Bank to check ammo\r\n" },
32538 "\tSets the turret's primary bank ammo, only works with ballistic weapons\r\n"
32539 "\t1: Ship turret is on\r\n"
32540 "\t2: Turret the bank is on\r\n"
32541 "\t3: Bank to add ammo to\r\n"
32542 "\t4: Amount to add" },
32545 "\tSets the turret's secondary bank ammo\r\n"
32546 "\t1: Ship turret is on\r\n"
32547 "\t2: Turret the bank is on\r\n"
32548 "\t3: Bank to add ammo to\r\n"
32549 "\t4: Amount to add" },
32552 "\tSets the armor type for a ship or subsystem\r\n"
32553 "\t1: Ship subsystem is on\r\n"
32554 "\t2: Set = true/Reset to defualt = false\r\n"
32555 "\t3: Armor type to set or <none>\r\n"
32556 "\trest: Subsystems to set (hull for ship, shield for shields)\r\n"},
32559 "\tSets the damage type for weapons or their shockwaves\r\n"
32560 "\t1: True = set weapon, False = set shockwave\r\n"
32561 "\t2: damage type to set or <none>\r\n"
32562 "\t3: Set = true/Reset to defualt = false\r\n"
32563 "\trest: Weapons to set\r\n"},
32566 "\tSets the damage type for ships collision or debris\r\n"
32567 "\t1: true = set collision, False = set debris\r\n"
32568 "\t2: Damage type to set or <none>\r\n"
32569 "\t3: Set = true/Reset to defualt = false\r\n"
32570 "\trest: Ships to set\r\n"},
32573 "\tSets the shockwave damage type for a class of ship. All ships of that class are changed.\r\n"
32574 "\t1: Damage type to set or <none>\r\n"
32575 "\t2: Set = true/Reset to defualt = false\r\n"
32576 "\trest: Ship classes to set\r\n"},
32579 "\tSets the damage type for asteroid/debris fields\r\n"
32580 "\t1: Damage type to set or <none>\r\n"
32581 "\t2: Set = true/Reset to defualt = false\r\n"},
32584 "\tSets targeting order of a given turret\r\n"
32585 "\t1: Ship turret is on\r\n"
32587 "\trest: Target order type (Bombs,ships,asteroids)"},
32590 "\tSets targeting order of all turrets on a given ship\r\n"
32591 "\t1: Ship turrets are on\r\n"
32592 "\trest: Target order type (Bombs,ships,asteroids)"},
32595 "\tPrevents turrets from targeting only the subsystems when targeting large targets\r\n"
32596 "\t1: Ship to be operated on\r\n"
32597 "\trest: List of turrets that are affected\r\n"},
32600 "\tSets turret to target the subsystems when targeting large targets\r\n"
32601 "\t1: Ship to be operated on\r\n"
32602 "\trest: List of turrets that are affected\r\n"},
32605 "\tAdds or removes a ship from an escort list.\r\n"
32606 "\t1: Ship to be added or removed\r\n"
32607 "\t2: 0 to remove from the list, any positive value will be used as the escort priority\r\n"
32608 "NOTE : it _IS_ safe to add a ship which may already be on the list or remove\r\n"
32609 "a ship which is not on the list\r\n"},
32612 "\tSets the awacs radius for a given ship subsystem. NOTE : does not work properly in multiplayer\r\n"
32613 "\t1: Ship which has the awacs subsystem\r\n"
32614 "\t2: Awacs subsystem\r\n"
32615 "\t3: New radius\r\n"},
32619 "\tSets the range of the primitive sensors on a ship. Ships outside of this range will not appear on "
32620 "sensors. Has no effect on ships that do not have the \"primitive-sensors\" flag2 set. Takes 2 arguments...\r\n"
32621 "\t1: Ship on which to set range\r\n"
32622 "\t2: Range, in meters\r\n" },
32625 "\tSends a series of delayed messages. All times are accumulated.\r\n"
32626 "\t1:\tName of who the message is from.\r\n"
32627 "\t2:\tPriority of message (\"Low\", \"Normal\" or \"High\").\r\n"
32628 "\t3:\tName of message (from message editor).\r\n"
32629 "\t4:\tDelay from previous message in list (if any) in ms\r\n"
32630 "Use Add-Data for multiple messages.\r\n\r\n"
32631 "IMPORTANT: Each additional message in the list MUST HAVE four entries; "
32632 "any message without the four proper fields will be ignored, as will any "
32633 "successive messages."},
32636 "\tSets the maximum speed of a ship while flying waypoints.\r\n"
32637 "\t1: Ship name\r\n"
32638 "\t2: Maximum speed while flying waypoints\r\n"
32639 "\tNOTE: This will only work if the ship is already in the game\r\n"
32640 "\tNOTE: Set to -1 to reset\r\n"},
32643 "\tMakes turrets target and hence fire strictly at tagged objects\r\n"
32644 "\t1: Ship name\r\n"
32645 "\tNOTE: Will not stop a turret already firing at an untagged ship\r\n"},
32648 "\tRelaxes restriction on turrets targeting only tagged ships\r\n"
32649 "\t1: Ship name\r\n"},
32652 "\tReturns true if ship is out of primary weapons\r\n"
32653 "\t1: Ship name\r\n"},
32656 "\tReturns true if ship is out of secondary weapons\r\n"
32657 "\t1: Ship name\r\n"},
32660 "\tSets ship subsystem strength in a given range\r\n"
32661 "\t1: Ship name\r\n"
32662 "\t2: Low range\r\n"
32663 "\t3: High range\r\n"
32664 "\t4: List of subsys names not to be randomized\r\n"},
32667 "\t1: Time in seconds until the supernova shockwave hits the player\r\n"},
32670 "\t Stops a supernova in progress.\r\n"
32671 "\t Note this only works if the camera hasn't cut to the player's death animation yet.\r\n"},
32674 "\tReturns a percentage from 0 to 100\r\n"
32675 "\t1: Ship name\r\n" },
32678 "\tReturns a percentage from 0 to 100\r\n"
32679 "\t1: Ship name\r\n" },
32682 "\tReturns a percentage from 0 to 100\r\n"
32683 "\t1: Ship name\r\n" },
32686 "\tGets one ETS index for a ship\r\n"
32687 "\t1: ETS index to get, Engine|Shield|Weapon\r\n"
32688 "\t2: Ship name\r\n"},
32691 "\tSets ETS indexes for a ship\r\n"
32692 "\tUse values retrieved with get-ets-value\r\n"
32693 "\tIf you use your own values, make sure they add up to 12\r\n"
32694 "\t1: Engine percent\r\n"
32695 "\t2: Shields percent\r\n"
32696 "\t3: Weapons percent\r\n"
32697 "\t4: Ship name\r\n"},
32700 "\tCauses the named ship to have unlimited cargo.\r\n"
32701 "\tNote: only applies to BIG or HUGE ships\r\n"
32702 "Takes 1 or more arguments...\r\n"
32703 "\t1:\tName of one of the ships.\r\n"
32704 "\t2:\toptional: 1 disallow depletion, 0 allow depletion." },
32707 "\tReturns true if the specified ship has a shield quadrant below\r\n"
32708 "\tthe specified threshold percentage\r\n"
32709 "\t1: Ship name\r\n"
32710 "\t2: Percentage\r\n" },
32713 "\tReturns the percentage of ammo remaining in the specified ballistic primary bank (0 to 100). Non-ballistic primary banks return as 100%.\r\n"
32714 "\t1: Ship name\r\n"
32715 "\t2: Bank to check (from 0 to N-1, where N is the number of primary banks in the ship; N or higher will return the cumulative average for all banks)" },
32719 "\tReturns the amount of ammo remaining in the specified bank\r\n"
32720 "\t1: Ship name\r\n"
32721 "\t2: Bank to check (from 0 to N-1, where N is the number of primary banks in the ship; N or higher will return the cumulative total for all banks)" },
32725 "\tReturns the percentage of ammo remaining in the specified bank (0 to 100)\r\n"
32726 "\t1: Ship name\r\n"
32727 "\t2: Bank to check (from 0 to N-1, where N is the number of secondary banks in the ship; N or higher will return the cumulative average for all banks)" },
32731 "\tReturns the amount of ammo remaining in the specified bank\r\n"
32732 "\t1: Ship name\r\n"
32733 "\t2: Bank to check (from 0 to N-1, where N is the number of secondary banks in the ship; N or higher will return the cumulative total for all banks)" },
32737 "\tReturns the amount of countermeasures remaining\r\n"
32738 "\t1: Ship name\r\n" },
32741 "\tReturns true if the specified bank is selected\r\n"
32742 "\t1: Ship name\r\n"
32743 "\t2: Bank to check (This is a zero-based index. The first bank is numbered 0.)\r\n"},
32746 "\tReturns true if the specified bank is selected\r\n"
32747 "\t1: Ship name\r\n"
32748 "\t2: Bank to check (This is a zero-based index. The first bank is numbered 0.)\r\n"},
32751 "\tReturns distance to the plane of the knossos device in percent length of ship\r\n"
32752 "\t(ie, 100 means front of ship is 1 ship length from plane of knossos device)\r\n"
32753 "\t1: Ship name\r\n"},
32756 "\tSets the name of the knossos device to be used for warpout\r\n"
32757 "\t1: Ship name to exit\r\n"
32758 "\t2: Name of knossos device\r\n"},
32761 "\tMakes the named ship vanish (no log and vanish)\r\n"
32762 "\tSingle Player Only! Warning: This will cause ship exit not to be logged, so 'has-departed', etc. will not work\r\n"
32763 "\t1: List of ship names to vanish\r\n"},
32766 "\tSelf-destructs the named ship without explosion, death roll, or debris. That is, the ship is instantly gone from the mission and the only indication of what happened is a mission log entry.\r\n"
32767 "\tSingle Player Only! Non-player ship only!\r\n"
32768 "\tAll: List of ship names to destroy.\r\n"},
32771 "\tCreates a new ship\r\n"
32772 "\tTakes 5 to 8 arguments...\r\n"
32773 "\t1: Name of new ship (use \"" SEXP_NONE_STRING "\" for a default name)\r\n"
32774 "\t2: Class of new ship\r\n"
32775 "\t3: X position\r\n"
32776 "\t4: Y position\r\n"
32777 "\t5: Z position\r\n"
32778 "\t6: Pitch (optional)\r\n"
32779 "\t7: Bank (optional)\r\n"
32780 "\t8: Heading (optional)\r\n"
32785 "\tCreates a new weapon\r\n"
32786 "\tTakes 5 to 10 arguments...\r\n"
32787 "\t 1: Name of parent ship (or \"" SEXP_NONE_STRING "\" for no parent)\r\n"
32788 "\t 2: Class of new weapon\r\n"
32789 "\t 3: X position\r\n"
32790 "\t 4: Y position\r\n"
32791 "\t 5: Z position\r\n"
32792 "\t 6: Pitch (optional)\r\n"
32793 "\t 7: Bank (optional)\r\n"
32794 "\t 8: Heading (optional)\r\n"
32795 "\t 9: Targeted ship (optional)\r\n"
32796 "\t10: Targeted subsystem (optional)\r\n"
32800 "\tCheck whether ship is visible on Player's radar\r\n"
32801 "\tSingle Player Only! Returns 0 - not visible, 1 - partially visible, 2 - fully visible.\r\n"
32802 "\t1: Name of ship to check\r\n"},
32806 "\tCheck whether ship is currently stealthy.\r\n"
32807 "\tTrue if stealth flag set, false otherwise. Takes 1 argument...\r\n"
32808 "\t1: Name of ship to check\r\n"},
32812 "\tCheck whether ship will be visible to radar as a stealth friendly.\r\n"
32813 "\tTakes 1 argument...\r\n"
32814 "\t1: Name of ship to check\r\n"},
32817 "\tGet the score of a multi team vs team game.\r\n"
32818 "\t1: Team index (1 for team 1 and 2 for team 2)\r\n"},
32822 "\tSets the most damaged ship in <ship list> to <priority1>, sets the others to <priority2>. Don't use this sexp in the same mission as damaged-escort-list-all, or strange results might occur.\r\n"
32823 "\t1: Priority1\r\n"
32824 "\t2: Priority2\r\n"
32825 "\tRest: <ship_list>\r\n\r\n"
32830 "\tSets the most damaged ship in the entire existing escort list (even what's not shown onscreen) to <priority1>, the next most damaged to <priority2>, and so on. "
32831 "If there are more ships than priorities, the least most damaged ships are all set to the last priority in the list. Don't use this sexp in the same mission as damaged-escort-list, or strange results might occur.\r\n"
32832 "\tTakes between 1 and MAX_COMPLETE_ESCORT_LIST (currently 20) arguments...\r\n"
32833 "\t1: Priority 1\r\n"
32834 "\tRest: Priorities 2 through 20 (optional)\r\n\r\n"
32839 "\tCauses the listed ships' classes to be changed to the specified ship class. Takes 2 or more arguments...\r\n"
32840 "\t1: The name of the new ship class\r\n"
32841 "\tRest: The list of ships to change the classes of"
32846 "\tCopies the damage (hull, shields, and subsystems) from the first ship in the list to the rest. The initial ship must be currently "
32847 "present in the mission, but the target ships may be either in-mission or on the arrival list. Takes 2 or more arguments...\r\n"
32848 "\t1: The name of the ship that supplies the damage stats\r\n"
32849 "\tRest: The list of ships to be modified"
32854 "\tSets information for all support ships in a mission. Takes 6 or 7 arguments...\r\n"
32855 "\t1: Arrival location\r\n"
32856 "\t2: Arrival anchor\r\n"
32857 "\t3: Departure location\r\n"
32858 "\t4: Departure anchor\r\n"
32859 "\t5: Ship class\r\n"
32860 "\t6: Maximum number of support ships consecutively in this mission (use a negative number for infinity)\r\n"
32861 "\t7: Maximum number of support ships concurrently in this mission (optional, default 1)\r\n"
32863 "Note: The support ship will emerge from or depart into hyperspace if the location is set as hyperspace *or* the anchor is set as <no anchor>."
32868 "\tSets arrival information for a ship or wing. Takes 2 to 7 arguments...\r\n"
32869 "\t1: Ship or wing name\r\n"
32870 "\t2: Arrival location\r\n"
32871 "\t3: Arrival anchor (optional; only required for certain locations)\r\n"
32872 "\t4: Arrival path mask (optional; this is a bitfield where the bits set to 1 correspond to the paths to use; defaults to 0 which is a special case that means all paths can be used)\r\n"
32873 "\t5: Arrival distance (optional; defaults to 0)\r\n"
32874 "\t6: Arrival delay (optional; defaults to 0)\r\n"
32875 "\t7: Whether to show a jump effect if arriving from subspace (optional; defaults to true)\r\n"
32880 "\tSets departure information for a ship or wing. Takes 2 to 6 arguments...\r\n"
32881 "\t1: Ship or wing name\r\n"
32882 "\t2: Departure location\r\n"
32883 "\t3: Departure anchor (optional; only required for certain locations)\r\n"
32884 "\t4: Departure path mask (optional; this is a bitfield where the bits set to 1 correspond to the paths to use; defaults to 0 which is a special case that means all paths can be used)\r\n"
32885 "\t5: Departure delay (optional; defaults to 0)\r\n"
32886 "\t6: Whether to show a jump effect if departing to subspace (optional; defaults to true)\r\n"
32891 "\tDeactivates all glow points on a ship. Takes 1 or more arguments...\r\n"
32892 "\tAll: Name of ship on which to deactivate glow points\r\n"
32897 "\tActivates all glow points on a ship. Takes 1 or more arguments...\r\n"
32898 "\tAll: Name of ship on which to activate glow points\r\n"
32903 "\tDeactivates the glow maps for a ship. Takes 1 or more arguments...\r\n"
32904 "\tAll: Name of ship on which to deactivate glow maps\r\n"
32909 "\tActivates the glow maps for a ship. Takes 1 or more arguments...\r\n"
32910 "\tAll: Name of ship on which to activate glow maps\r\n"
32915 "\tDeactivates one or more glow point bank(s) on a ship. Takes 2 or more arguments...\r\n"
32916 "\t1: Name of ship on which to deactivate glow point bank(s)\r\n"
32917 "\tRest: Name of glow point bank to deactivate\r\n"
32922 "\tActivates one or more glow point bank(s) on a ship. Takes 2 or more arguments...\r\n"
32923 "\t1: Name of ship on which to activate glow point bank(s)\r\n"
32924 "\tRest: Name of glow point bank to activate\r\n"
32929 "\tTells ships to perform a kamikaze on its current target. Takes 2 or more arguments...\r\n"
32930 "\t1: Damage dealt when kamikaze is done\r\n"
32931 "\tRest: Names of ships to perform kamikaze\r\n"
32936 "\tSpecific turrets on a ship only fire at tagged targets, as opposed to all turrets doing this using turret-tagged-only\r\n"
32937 "\tIt is safe to slave turrets already slaved\r\n"
32938 "\tTakes 2 or more arguments...\r\n"
32939 "\t1: Name of ship to slave some turrets to target only tagged ships\r\n"
32940 "\tRest: Turrets to slave\r\n"
32945 "\tSpecific turrets on a ship are free to fire on untagged ships, as opposed to all turrets doing this using turret-tagged-clear\r\n"
32946 "\tIt is safe to unslave turrets already free\r\n"
32947 "\tTakes 2 or more arguments...\r\n"
32948 "\t1: Name of ship to unslave some turrets to target any hostile ship\r\n"
32949 "\tRest: Turrets to unslave\r\n"
32954 "\tInstantaneously locks a rotating subsystem so that it cannot rotate unless freed by free-rotating-subsystem. "
32955 "Takes 2 or more arguments...\r\n"
32956 "\t1:\tName of the ship housing the subsystem\r\n"
32957 "\tRest:\tName of the rotating subsystem to lock"
32962 "\tInstantaneously frees a rotating subsystem previously locked by lock-rotating-subsystem. "
32963 "Takes 2 or more arguments...\r\n"
32964 "\t1:\tName of the ship housing the subsystem\r\n"
32965 "\tRest:\tName of the rotating subsystem to free"
32970 "\tInstantaneously reverses the rotation direction of a rotating subsystem. "
32971 "Takes 2 or more arguments...\r\n"
32972 "\t1:\tName of the ship housing the subsystem\r\n"
32973 "\tRest:\tName of the rotating subsystem to reverse"
32978 "\tSets the turn time of a rotating subsystem. "
32979 "Takes 3 or 4 arguments...\r\n"
32980 "\t1:\tName of the ship housing the subsystem\r\n"
32981 "\t2:\tName of the rotating subsystem to configure\r\n"
32982 "\t3:\tThe time for one complete rotation, in milliseconds (positive is counterclockwise, negative is clockwise)\r\n"
32983 "\t4:\tThe acceleration (x1000, just as #3 is seconds x1000) to change from the current turn rate to the desired turn rate. "
32984 "This is actually the time to complete one rotation that changes in one second, or the reciprocal of what you might expect, "
32985 "meaning that larger numbers cause slower acceleration. (FS2 defaults to 2pi/0.5, or about 12.566, which would be 12566 in this sexp.) "
32986 "The advantage of this method is so that this argument can be directly compared to the previous argument using a ratio, without worrying about pi. "
32987 "Omit this argument if you want an instantaneous change."
32992 "\tActivates a submodel animation trigger for a given ship. Takes 4 to 6 arguments...\r\n"
32993 "\t1: The ship on which the animation should run\r\n"
32994 "\t2: The type of animation (named as one would see them in ships.tbl)\r\n"
32995 "\t3: The subtype of animation, which is type-dependent. For docking animations this is the dock index.\r\n"
32996 "\t4: The animation direction: 1 for forward, or -1 for reverse\r\n"
32997 "\t5: (Optional) Whether the animation should instantly snap to its final position\r\n"
32998 "\t6: (Optional) A subsystem, if the animation should trigger on only a specific subsystem as opposed to all applicable subsystems\r\n"
33003 "\tSets the amount of ammo for the specified ballistic bank\r\n"
33004 "\t1: Ship name\r\n"
33005 "\t2: Bank to check (0, 1, and 2 are legal banks)\r\n"
33006 "\t3: Number to set this bank to (If this is larger than the maximum, bank will be set to maximum).\r\n"
33007 "\t4: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximum, bank will be set to maximum)"
33012 "\tSets the amount of ammo for the specified bank\r\n"
33013 "\t1: Ship name\r\n"
33014 "\t2: Bank to check (0, 1, 2 and 3 are legal banks)\r\n"
33015 "\t3: Number to set this bank to (If this is larger than the maximum, bank will be set to maximum).\r\n"
33016 "\t4: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximum, bank will be set to maximum)"
33021 "\tSets the weapon for the specified bank\r\n"
33022 "\t1: Ship name\r\n"
33023 "\t2: Bank to check (0, 1 and 2 are legal banks)\r\n"
33024 "\t3: Name of the primary weapon \r\n"
33025 "\t4: Number to set ammo of this bank to (If this is larger than the maximum, bank will be set to maximum)\r\n"
33026 "\t5: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximum, bank will be set to maximum)"
33031 "\tSets the weapon for the specified bank\r\n"
33032 "\t1: Ship name\r\n"
33033 "\t2: Bank to check (0, 1, 2 and 3 are legal banks)\r\n"
33034 "\t3: Name of the secondary weapon \r\n"
33035 "\t4: Number to set ammo of this bank to (If this is larger than the maximum, bank will be set to maximum)\r\n"
33036 "\t5: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximum, bank will be set to maximum)"
33043 "\tSets the number of countermeasures the ship has\r\n"
33044 "\tValues greater than the maximum a ship can carry are set to the maximum\r\n"
33045 "\t1: Ship name\r\n"
33046 "\t2: Number to set"
33051 "\tLocks the primary banks for the specified ship(s)\r\n"
33052 "\tTakes 1 or more arguments\r\n"
33053 "\t(all): Name(s) of ship(s) to lock"
33058 "\tUnlocks the primary banks for the specified ship(s)\r\n"
33059 "\tTakes 1 or more arguments\r\n"
33060 "\t(all): Name(s) of ship(s) to lock"
33065 "\tLocks the secondary banks for the specified ship(s)\r\n"
33066 "\tTakes 1 or more arguments\r\n"
33067 "\t(all): Name(s) of ship(s) to lock"
33072 "\tUnlocks the secondary banks for the specified ship(s)\r\n"
33073 "\tTakes 1 or more arguments\r\n"
33074 "\t(all): Name(s) of ship(s) to lock"
33079 "\tLocks the afterburners on the specified ship(s)\r\n"
33080 "\tTakes 1 or more arguments\r\n"
33081 "\t(all): Name(s) of ship(s) to lock"
33086 "\tUnlocks the afterburners on the specified ship(s)\r\n"
33087 "\tTakes 1 or more arguments\r\n"
33088 "\t(all): Name(s) of ship(s) to lock"
33093 "\tSets the afterburner energy for the specified ship(s)\r\n"
33094 "\tTakes 2 or more arguments\r\n"
33095 "\t1: percentage of maximum afterburner energy.\r\n"
33096 "\t(rest): Name(s) of ship(s)"
33100 "\tSets the weapon energy for the specified ship(s)\r\n"
33101 "\tTakes 2 or more arguments\r\n"
33102 "\t1: percentage of maximum weapon energy.\r\n"
33103 "\t(rest): Name(s) of ship(s)"
33107 "\tSets the shield energy for the specified ship(s)\r\n"
33108 "\tTakes 2 or more arguments\r\n"
33109 "\t1: percentage of maximum shield energy.\r\n"
33110 "\t(rest): Name(s) of ship(s)"
33114 "\tSets the ambient light level for the mission\r\n"
33115 "\tTakes 3 arguments\r\n"
33116 "\t1: Red (0 - 255).\r\n"
33117 "\t2: Green (0 - 255).\r\n"
33118 "\t3: Blue (0 - 255)."
33122 "\tConfigures post-processing effect\r\n"
33123 "\tTakes 2 arguments\r\n"
33124 "\t1: Effect type\r\n"
33125 "\t2: Effect intensity (0 - 100)."
33129 "\tChanges the name of the specified subsystem on the specified ship\r\n"
33130 "\tTakes 3 or more arguments\r\n"
33131 "\t1: Name of the ship.\r\n"
33132 "\t2: New name for the subsystem (names larger than the maximum display size will be truncated\r\n"
33133 "\t3: Name(s) of subsystem(s) to rename\r\n"
33138 "\tReturns the number of ships in battle or the number of ships in battle out of a list of teams, wings, and ships. Takes 1 or more arguments...\r\n"
33139 "\t(all):\tTeams, Wings, and Ships to query (optional)"
33144 "\tReturns the number of ships in battle which belong to a given wing. Takes 1 or more arguments...\r\n"
33145 "\t(all):\tName of wing(s) to check"
33150 "\tSets whether the hud is disabled. Takes 1 argument...\r\n"
33151 "\t1: Flag (1 to disable, 0 to re-enable)"
33156 "\tSets whether the hud (except for messages) is disabled. Takes 1 argument...\r\n"
33157 "\t1: Flag (1 to disable, 0 to re-enable)"
33162 "\tSets the farthest distance at which an object can be targeted. Takes 1 argument...\r\n"
33163 "\1: Maximum targeting distance (0 for infinite)\r\n"
33167 "\tCauses specified hud gauge to appear or disappear for so many milliseconds. Takes 1 argument...\r\n"
33168 "\t1: Number of milliseconds that the warpout gauge should appear on the HUD."
33169 " 0 will immediately cause the gauge to disappear.\r\n"
33170 "\t2: Name of HUD element. Must be one of:\r\n"
33171 "\t\t" SEXP_HUD_GAUGE_WARPOUT " - the \"Subspace drive active\" box that appears above the viewscreen.\r\n"
33176 "\tCauses the player's ship to be controlled by the FreeSpace AI. Takes 0 arguments.\r\n"
33181 "\tCauses the player's ship to not be controlled by the FreeSpace AI. Takes 0 arguments.\r\n"
33186 "\tTurns the Allow Traitor switch on or off in mission. Takes 0 arguments.\r\n"
33187 "\t1:\tTrue/False."
33192 "\tChanges the orders friendly AI will accept. Takes 3 or more arguments.\r\n"
33193 "\t1:\tShip Name\r\n"
33194 "\t2:\tTrue/False as to whether this order is allowed or not\r\n"
33200 "\tSets the text value of a given HUD gauge. Works for custom and certain retail gauges. Takes 2 arguments...\r\n"
33201 "\t1:\tHUD gauge to be modified\r\n"
33202 "\t2:\tText to be set"
33206 "\tSets the text value of a given HUD gauge to a number. Works for custom and certain retail gauges. Takes 2 arguments...\r\n"
33207 "\t1:\tHUD gauge to be modified\r\n"
33208 "\t2:\tNumber to be set"
33212 "\tSets the text value of a given HUD gauge to a message from the mission's message list. Works for custom and certain retail gauges. Takes 2 arguments...\r\n"
33213 "\t1:\tHUD gauge to be modified\r\n"
33219 "\tSets the coordinates of a given HUD gauge. Works for custom and retail gauges. Takes 3 arguments...\r\n"
33220 "\t1:\tHUD gauge to be modified\r\n"
33221 "\t2:\tCoordinate X component\r\n"
33222 "\t2:\tCoordinate Y component"
33227 "\tSets the frame of a given HUD gauge's associated image. Works for custom and certain retail gauges. Takes 2 arguments...\r\n"
33228 "\t1:\tHUD gauge to be modified\r\n"
33229 "\t2:\tFrame number to be changed to"
33234 "\tSets the color of a given HUD gauge. Works only for custom gauges Takes 4 arguments...\r\n"
33235 "\t1:\tHUD gauge to be modified\r\n"
33236 "\t2:\tRed component (0-255)\r\n"
33237 "\t3:\tGreen component (0-255)\r\n"
33238 "\t4:\tBlue component (0-255)"
33243 "\tReturns the speed of the given object. Takes 1 argument...\r\n"
33244 "\t1:\tName of the object"
33249 "\tReturns true if the primary weapon bank specified has been fired within the supplied window of time. Takes 3 arguments...\r\n\r\n"
33250 "\t1:\tShip name\r\n"
33251 "\t2:\tWeapon bank number (This is a zero-based index. The first bank is numbered 0.)\r\n"
33252 "\t3:\tTime period to check if the weapon was fired (in millieconds)\r\n"
33257 "\tReturns true if the secondary weapon bank specified has been fired within the supplied window of time. Takes 3 arguments...\r\n\r\n"
33258 "\t1:\tShip name\r\n"
33259 "\t2:\tWeapon bank number (This is a zero-based index. The first bank is numbered 0.)\r\n"
33260 "\t3:\tTime period to check if the weapon was fired (in millieconds)\r\n"
33265 "\tReturns true if the primary weapon bank specified has any of the weapons listed. Takes 3 or more arguments...\r\n\r\n"
33266 "\t1:\tShip name\r\n"
33267 "\t2:\tWeapon bank number (This is a zero-based index. The first bank is numbered 0.)\r\n"
33268 "\tRest:\tWeapon name\r\n"
33273 "\tReturns true if the secondary weapon bank specified has any of the weapons listed. Takes 3 or more arguments...\r\n\r\n"
33274 "\t1:\tShip name\r\n"
33275 "\t2:\tWeapon bank number (This is a zero-based index. The first bank is numbered 0.)\r\n"
33276 "\tRest:\tWeapon name\r\n"
33281 "\tCauses a value to appear in the directive count\r\n"
33282 "\tAlways returns true. Takes 1 or more arguments...\r\n\r\n"
33284 "\t2:\t(Optional) Ignore the directive count set by any earlier SEXPs in the event. If set to false it will add instead\r\n"
33289 "\tCauses messages to be sent as if the player has sustained communications subsystem or EMP damage. This effect can be reversed using unscramble-messages. Takes zero or more arguments.\r\n"
33290 "\tAll (Optional):\tName of the ship for which to scramble messages. If no ships are specified, message scrambling will be turned on for all messages the player receives.\r\n"
33295 "\tUndoes the effects of scramble-messages, causing messages to be sent clearly. Takes zero or more arguments.\r\n"
33296 "\tAll (Optional):\tName of the ship for which to scramble messages. If no ships are specified, message scrambling will be turned on for all messages the player receives.\r\n"
33300 "\tShows bars at the top and bottom of screen. "
33301 "Takes 0 or 1 arguments...\r\n"
33302 "\t1:\tMilliseconds for bars to slide in\r\n"
33306 "\tRemoves cutscene bars. "
33307 "Takes 0 or 1 arguments...\r\n"
33308 "\t1:\tMilliseconds for bars to slide out\r\n"
33313 "Takes 0 to 4 arguments...\r\n"
33314 "\t1:\tTime to fade in (in milliseconds)\r\n"
33315 "\t2:\tColor to fade to (optional). If arguments 3 and 4 are specified, this is the R component of an RGB color. Otherwise it is 1 for white, 2 for red, and any other number for black.\r\n"
33316 "\t3:\tG component of an RGB color (optional)\r\n"
33317 "\t4:\tB component of an RGB color (optional)\r\n"
33322 "Takes 0 to 4 arguments...\r\n"
33323 "\t1:\tTime to fade in (in milliseconds)\r\n"
33324 "\t2:\tColor to fade to (optional). If arguments 3 and 4 are specified, this is the R component of an RGB color. Otherwise it is 1 for white, 2 for red, and any other number for black.\r\n"
33325 "\t3:\tG component of an RGB color (optional)\r\n"
33326 "\t4:\tB component of an RGB color (optional)\r\n"
33330 "\tSets SEXP camera, or another specified cutscene camera. "
33331 "Takes 0 to 1 arguments...\r\n"
33333 "\t1:\tCamera name (created if nonexistent)\r\n"
33337 "\tMakes the camera face the given point. "
33338 "Takes 3 to 6 arguments...\r\n"
33339 "\t1:\tX position to face\r\n"
33340 "\t2:\tY position to face\r\n"
33341 "\t3:\tZ position to face\r\n"
33343 "\t4:\tTotal turn time (milliseconds)\r\n"
33344 "\t5:\tTime to spend accelerating/decelerating (milliseconds)\r\n"
33345 "\t6:\tTime to spend decelerating (milliseconds)\r\n"
33349 "\tMakes the camera face the given object. "
33350 "Takes 1 to 4 arguments...\r\n"
33351 "\t1:\tObject to face\r\n"
33353 "\t2:\tTotal turn time (milliseconds)\r\n"
33354 "\t3:\tTime to spend accelerating/decelerating (milliseconds)\r\n"
33355 "\t4:\tTime to spend decelerating (milliseconds)\r\n"
33359 "\tSets the camera field of view. "
33360 "Takes 1 to 4 arguments...\r\n"
33361 "\t1:\tNew FOV (degrees)\r\n"
33363 "\t2:\tTotal zoom time (milliseconds)\r\n"
33364 "\t3:\tTime to spend accelerating/decelerating (milliseconds)\r\n"
33365 "\t4:\tTime to spend decelerating (milliseconds)\r\n"
33369 "\tSets the object and subystem camera should view from. Camera position is offset from the host. "
33370 "If the selected subsystem or one of its children has an eyepoint bound to it it will be used for the camera position and orientation."
33371 "If the selected subsystem is a turret and has no eyepoint the camera will be at the first firing point and look along the firing direction."
33372 "If a valid camera target is set the direction to the target will override any other orientation."
33373 "Takes 1 to 2 arguments...\r\n"
33374 "\t1:\tShip to mount camera on\r\n"
33376 "\t2:\tSubystem to mount camera on\r\n"
33380 "\tSets the camera position to a spot in mission space. "
33381 "Takes 3 to 6 arguments...\r\n"
33382 "\t1:\tX position\r\n"
33383 "\t2:\tY position\r\n"
33384 "\t3:\tZ position\r\n"
33386 "\t4:\tTotal turn time (milliseconds)\r\n"
33387 "\t5:\tTime to spend accelerating/decelerating (milliseconds)\r\n"
33388 "\t6:\tTime to spend decelerating (milliseconds)\r\n"
33392 "\tSets the camera rotation. "
33393 "Takes 3 to 6 arguments...\r\n"
33394 "\t1:\tPitch (degrees)\r\n"
33395 "\t2:\tBank (degrees)\r\n"
33396 "\t3:\tHeading (degrees)\r\n"
33398 "\t4:\tTotal turn time (milliseconds)\r\n"
33399 "\t5:\tTime to spend accelerating/decelerating (milliseconds)\r\n"
33400 "\t6:\tTime to spend decelerating (milliseconds)\r\n"
33404 "\tSets the object and subystem camera should track. Camera orientation is offset from the target. "
33405 "Takes 1 to 2 arguments...\r\n"
33406 "\t1:\tShip to track\r\n"
33408 "\t2:\tSubystem to track\r\n"
33412 "\tSets the field of view - overrides all camera settings. "
33413 "Takes 1 argument...\r\n"
33414 "\t1:\tNew FOV (degrees)\r\n"
33419 "\tReturns the current field of view (in degrees) from the Main camera.\r\n\r\n"
33420 "Returns a numeric value. Takes no arguments."
33424 "\tResets the field of view. "
33428 "\tReleases cutscene camera control. "
33429 "Takes 1 optional argument...\r\n"
33431 "\t1:\tReset camera data (Position, facing, FOV...) (default: false)"
33435 "\tDisplays a subtitle, either an image or a string of text. As this operator tries to combine two functions into one and does not adjust coordinates for screen formats, it has been deprecated.\r\n"
33436 "Takes 4 to 13 arguments...\r\n"
33437 "\t1:\tX position (negative value to be from right of screen)\r\n"
33438 "\t2:\tY position (negative value to be from bottom of screen)\r\n"
33439 "\t3:\tText to display\r\n"
33440 "\t4:\tTime to be displayed, not including fadein/out\r\n"
33441 "\t5:\tImage name (optional)\r\n"
33442 "\t6:\tFade in time (optional)\r\n"
33443 "\t7:\tCenter horizontally? (optional)\r\n"
33444 "\t8:\tCenter vertically? (optional)\r\n"
33445 "\t9:\tWidth (optional)\r\n"
33446 "\t10:\tText red component (0-255) (optional)\r\n"
33447 "\t11:\tText green component (0-255) (optional)\r\n"
33448 "\t12:\tText blue component (0-255) (optional)\r\n"
33449 "\t13:\tDrawn after shading? (optional)"
33453 "\tDisplays a subtitle in the form of text. Note that because of the constraints of the subtitle system, textual subtitles are currently limited to 255 characters or fewer.\r\n"
33454 "Takes 6 to 13 arguments...\r\n"
33455 "\t1:\tText to display, or the name of a message containing text\r\n"
33456 "\t2:\tX position, from 0 to 100% (positive measures from the left; negative measures from the right)\r\n"
33457 "\t3:\tY position, from 0 to 100% (positive measures from the top; negative measures from the bottom)\r\n"
33458 "\t4:\tCenter horizontally? (if true, overrides argument #2)\r\n"
33459 "\t5:\tCenter vertically? (if true, overrides argument #3)\r\n"
33460 "\t6:\tTime (in milliseconds) to be displayed, not including fade-in/fade-out\r\n"
33461 "\t7:\tFade time (in milliseconds) to be used for both fade-in and fade-out (optional)\r\n"
33462 "\t8:\tParagraph width, from 1 to 100% (optional; 0 uses default 200 pixels)\r\n"
33463 "\t9:\tText red component (0-255) (optional)\r\n"
33464 "\t10:\tText green component (0-255) (optional)\r\n"
33465 "\t11:\tText blue component (0-255) (optional)\r\n"
33466 "\t12:\tText font (optional)\r\n"
33467 "\t13:\tDrawn after shading? (optional)"
33471 "\tDisplays a subtitle in the form of an image.\r\n"
33472 "Takes 8 to 10 arguments...\r\n"
33473 "\t1:\tImage to display\r\n"
33474 "\t2:\tX position, from 0 to 100% (positive measures from the left; negative measures from the right)\r\n"
33475 "\t3:\tY position, from 0 to 100% (positive measures from the top; negative measures from the bottom)\r\n"
33476 "\t4:\tCenter horizontally? (if true, overrides argument #2)\r\n"
33477 "\t5:\tCenter vertically? (if true, overrides argument #3)\r\n"
33478 "\t6:\tImage width, from 1 to 100% (0 uses original width)\r\n"
33479 "\t7:\tImage height, from 1 to 100% (0 uses original height)\r\n"
33480 "\t8:\tTime (in milliseconds) to be displayed, not including fade-in/fade-out\r\n"
33481 "\t9:\tFade time (in milliseconds) to be used for both fade-in and fade-out (optional)\r\n"
33482 "\t10:\tDrawn after shading? (optional)"
33486 "\tSets the time compression and prevents it from being changed by the user. "
33487 "Takes 1 to 3 arguments...\r\n"
33488 "\t1:\tNew time compression (% of 1x)\r\n"
33489 "\t2:\tTime in ms for change to take\r\n"
33490 "\t3:\tTime compression to start from\r\n"
33494 "\tResets the time compression - that is to say, time compression is set back to 1x, "
33495 "and the time compression controls are unlocked. Always call this when done with set-time-compression. "
33499 "\tPrevents or allows the player from changing the view mode. "
33500 "Takes 1 or 2 arguments...\r\n"
33501 "\t1:\tTrue to lock the view mode, false to unlock it\r\n"
33502 "\t2:\tWhat view mode to lock; 0 for first-person, 1 for chase, 2 for external, 3 for top-down"
33506 "\tCauses the camera to shudder. Currently this will only work if the camera is showing the player's viewpoint (i.e. the HUD).\r\n\r\n"
33507 "Takes 2 arguments...\r\n"
33508 "\t1: Time (in milliseconds)\r\n"
33509 "\t2: Intensity. For comparison, the Maxim has an intensity of 1440."
33513 "\tSets the name of a jump node. Takes 2 arguments...\r\n"
33514 "\t1: Name of jump node to change name for\r\n"
33515 "\t2: New name for jump node\r\n\r\n"
33516 "\tNote: SEXPs referencing the old name will not work after the name change.\r\n"
33520 "\tSets the color of a jump node. "
33521 "Takes 5 arguments...\r\n"
33522 "\t1:\tJump node to change color for\r\n"
33523 "\t2:\tRed value\r\n"
33524 "\t3:\tGreen value\r\n"
33525 "\t4:\tBlue value\r\n"
33526 "\t5:\tAlpha value\r\n"
33530 "\tSets the model of a jump node. "
33531 "Takes 3 arguments...\r\n"
33532 "\t1:\tJump node to change model for\r\n"
33533 "\t2:\tModel filename\r\n"
33534 "\t3:\tShow as normal model. When this is true, the jumpnode will be rendered like a normal model.\r\n"
33538 "\tSets a jump node to display on the screen.\r\n"
33539 "\tAny:\tJump node to show\r\n"
33543 "\tSets a jump node to not display on the screen.\r\n"
33544 "\tAny:\tJump node to hide\r\n"
33549 "\tSets the current skybox model. Takes 1-7 arguments\r\n"
33550 "\t1:\tModel filename (with .pof extension) to switch to\r\n"
33551 "\t2:\tRestart animated textures, if they exist (optional, defaults to true)\r\n"
33552 "\t3-8:\tSet or unset the following skyboxes flags (optional)\r\n"
33553 "\t\t\tadd-lighting, no-transparency, add-zbuffer\r\n"
33554 "\t\t\tadd-culling, no-glowmaps, force-clamp\r\n\r\n"
33555 "Note: If the model filename is set to \"default\" with no extension then it will switch to the mission supplied default skybox."
33560 "\tSets the current skybox orientation. Takes 3 arguments...\r\n"
33563 "\t3:\tHeading\r\n"
33567 "\tAdds a background bitmap to the sky. Returns an integer that is stored in a variable so it can be deleted using remove-background-bitmap\r\n\r\n"
33568 "Takes 8 to 9 arguments...\r\n"
33569 "\t1:\tBackground bitmap name\r\n"
33572 "\t4:\tHeading\r\n"
33573 "\t5:\tX scale (expressed as a percentage of the original size of the bitmap)\r\n"
33574 "\t6:\tY scale (expressed as a percentage of the original size of the bitmap)\r\n"
33575 "\t7:\tX divisions.\r\n"
33576 "\t8:\tY divisions.\r\n"
33577 "\t9:\tVariable in which to store result (optional)\r\n"
33581 "\tRemoves the nth background bitmap from the mission\r\n\r\n"
33582 "Takes 1 argument...\r\n"
33583 "\t1:\tZero based bitmap index from the \'Bitmap\' box in the background editor\r\n"
33584 "\t\t\tYou can also use the result of a previous call to add-background-bitmap to remove that added bitmap\r\n"
33588 "\tAdds a sun bitmap to the sky. Returns an integer that is stored in a variable so it can be deleted using remove-sun-bitmap\r\n\r\n"
33589 "Takes 5 to 6 arguments...\r\n"
33590 "\t1:\tSun bitmap name\r\n"
33593 "\t4:\tHeading\r\n"
33594 "\t5:\tScale (expressed as a percentage of the original size of the bitmap)\r\n"
33595 "\t6:\tVariable in which to store result (optional)\r\n"
33599 "\tRemoves the nth sun from the mission\r\n\r\n"
33600 "Takes 1 argument...\r\n"
33601 "\t1:\tZero based sun index from the \'Suns\' box in the background editor\r\n"
33602 "\t\t\tYou can also use the result of a previous call to add-sun-bitmap to remove that added sun\r\n"
33606 "\tChanges the current nebula storm\r\n\r\n"
33607 "Takes 1 argument...\r\n"
33608 "\t1:\tNebula storm to change to\r\n"
33612 "\tToggles the state of a nebula poof\r\n\r\n"
33613 "Takes 2 arguments...\r\n"
33614 "\t1:\tName of nebula poof to toggle\r\n"
33615 "\t2:\tA True boolean expression will toggle this poof on. A false one will do the opposite."
33619 "\tChanges the current nebula background pattern (as defined in nebula.tbl)\r\n\r\n"
33620 "Takes 1 argument...\r\n"
33621 "\t1:\tNebula background pattern to change to\r\n"
33625 "\tEvaluates script to return a number"
33626 "Takes 1 argument...\r\n"
33631 "\tSwitches a ships' ETS system off\r\n\r\n"
33632 "Takes at least 1 argument...\r\n"
33633 "\tAll:\tList of ships this sexp applies to\r\n"
33637 "\tSwitches a ships' ETS system on\r\n\r\n"
33638 "Takes at least 1 argument...\r\n"
33639 "\tAll:\tList of ships this sexp applies to\r\n"
33643 "\tEvaluates script to return a string\r\n\r\n"
33644 "Takes a multiple of 2 arguments...\r\n"
33645 "\t1:\tScript (Without a leading 'return')\r\n"
33646 "\t2:\tDestination variable\r\n"
33650 "\tEvaluates the given script\r\n"
33651 "Takes at least 1 argument...\r\n"
33652 "\t1:\tScript to evaluate\r\n"
33656 "\tEvaluates the concatenation of all arguments as a script\r\n"
33657 "Takes at least 1 argument...\r\n"
33658 "\tAll:\tScript to evaluate\r\n"
33662 "\tEvaluates script\r\n\r\n"
33663 "Takes at least 2 arguments...\r\n"
33664 "\t1:\tScript to evaluate\r\n"
33665 "\t2:\tTrue/False - Should the script evaluate on the server?\r\n"
33666 "\t(rest):\tList of players who should evaluate this script. If no player is given, all clients will execute the script\r\n"
33670 "\tForces a given ship into glide mode, provided it is capable of gliding. Note that the player will not be able to leave glide mode on his own,, and that a ship in glide mode cannot warp out or enter autopilot."
33671 "Takes 2 Arguments...\r\n"
33672 "\t1:\tShip to force\r\n"
33673 "\t2:\tTrue to activate glide, False to deactivate\r\n"
33677 "\tSets the text of a given custom hud gauge to the provided text."
33678 "Takes 2 Arguments...\r\n"
33679 "\t1:\tHUD Gauge name\r\n"
33680 "\t2:\tText that will be displayed. This text will be treated as directive text, meaning that references to mapped keys will be replaced with the user's preferences.\r\n"
33684 "\tActivates or deactivates a given custom gauge."
33685 "Takes 2 Arguments...\r\n"
33686 "\t1:\tHUD Gauge name\r\n"
33687 "\t2:\tBoolean, whether or not to display this gauge\r\n"
33691 "\tClears active messages displayed on the HUD."
33692 "Takes no arguments\r\n"
33696 "\tActivates or deactivates all hud gauges of a given type."
33697 "Takes 2 Arguments...\r\n"
33698 "\t1:\tGauge Type\r\n"
33699 "\t2:\tBoolean, whether or not to display this gauge\r\n"
33703 "\tActivates or deactivates a custom hud gauge defined in hud_gauges.tbl."
33704 "Takes 2 Arguments...\r\n"
33705 "\t1:\tBoolean, whether or not to display this gauge\r\n"
33706 "\tRest:\tHUD Gauge name\r\n"
33710 "\tActivates or deactivates a retail hud gauge grouping."
33711 "Takes 2 Arguments...\r\n"
33712 "\t1:\tBoolean, whether or not to display this gauge\r\n"
33713 "\tRest:\tHUD Gauge Group name\r\n"
33717 "\tAdds a ship to the specified collision group(s). Note that there are 32 collision groups,\r"
33718 "\tand that an object may be in several collision groups at the same time\r\n"
33719 "Takes 2 or more Arguments...\r\n"
33720 "\t1:\tObject to add\r\n"
33721 "\t2+:\tGroup IDs. Valid IDs are 0 through 31 inclusive.\r\n"
33725 "\tRemoves a ship from the specified collision group(s). Note that there are 32 collision groups,\n"
33726 "\tand that an object may be in several collision groups at the same time\r\n"
33727 "Takes 2 or more Arguments...\r\n"
33728 "\t1:\tObject to add\r\n"
33729 "\t2+:\tGroup IDs. Valid IDs are 0 through 31 inclusive.\r\n"
33733 "\tReturns an objects' collision group ID. Note that this ID is a bitfield.\r\n"
33734 "Takes 1 Argument...\r\n"
33735 "\t1:\tObject name\r\n"
33740 "\tPlays an animated shader effect on the ship(s) or wing(s).\r\n"
33741 "Takes 3 or more arguments...\r\n"
33742 "\t1:\tEffect name (as defined in post_processing.tbl)\r\n"
33743 "\t2:\tHow long the effect should take in milliseconds\r\n"
33744 "\tRest:\tShip or wing name\r\n"
33748 "\tClears the subtitle queue completely.\r\n"
33752 "\tManipulates the thrusters on a ship.\r\n"
33753 "Takes 2 or more arguments...\r\n"
33754 "\t1:\tBoolean, true sets thrusters to visible, false deactivates them.\r\n"
33755 "\t2:\tRest: List of ships this sexp will work on.\r\n"
33759 "\tSets a player's throttle to a percentage of their maximum speed.\r\n"
33760 "\tThis SEXP has no effect if used on an AI ship, however it will still work on an AI-controlled player ship.\r\n"
33761 "Takes 2 arguments...\r\n"
33762 "\t1:\tThe player ship to set the throttle of.\r\n"
33763 "\t2:\tThe percentage of the player's maximum speed to set their throttle to.\r\n"
33764 "\t\tThis is capped to either 0 or 100 if outside the valid range."
33768 "\tChanges the team color setting for one or several ships.\r\n"
33769 "\tThis sexp has no effect on ships that don't have team colors enabled for them.\r\n"
33770 "\tTakes 3 or more arguments...\r\n"
33771 "\t1:\tThe new team color name. Name must be defined in colors.tbl.\r\n"
33772 "\t2:\tCrossfade time in milliseconds. During this time, colors will be mixed.\r\n"
33773 "\t3:\tRest: List of ships this sexp will operate on."
33777 "\tCalls a subspace missile strike on the specified ship.\r\n"
33778 "\tRequires a ssm table (ssm.tbl).\r\n"
33779 "Takes 3 arguments...\r\n"
33780 "\t1:\tStrike name.\r\n"
33781 "\t2:\tCalling team.\r\n"
33782 "\tRest:\tList of ships the strike will be called on."
33786 "\tReturns true if the player is or has been cheating in this mission.\r\n"
33790 "\tControls whether or not motion debris should be active.\r\n"
33791 "\tThis overrides any choice made by the user through the -nomotiondebris commandline flag."
33792 "Takes 1 argument...\r\n"
33793 "\t1:\tBoolean: True will disable motion debris, False reenable it.\r\n"
33857 static void output_sexp_html(
int sexp_idx, FILE *
fp)
33862 bool printed=
false;
33866 if(Sexp_help[
i].
id == Operators[sexp_idx].
value)
33868 char* new_buf =
new char[2*strlen(Sexp_help[
i].
help)];
33869 char* dest_ptr = new_buf;
33870 char* curr_ptr = Sexp_help[
i].
help;
33871 char* end_ptr = curr_ptr + strlen(Sexp_help[
i].help);
33872 while(curr_ptr < end_ptr)
33874 if(*curr_ptr ==
'\n')
33876 strcpy(dest_ptr,
"\n<br>");
33881 *dest_ptr++ = *curr_ptr;
33887 fprintf(fp,
"<dt><b>%s</b></dt>\n<dd>%s</dd>\n", Operators[sexp_idx].text, new_buf);
33895 fprintf(fp,
"<dt><b>%s</b></dt>\n<dd>Min arguments: %d, Max arguments: %d</dd>\n", Operators[sexp_idx].text, Operators[sexp_idx].min, Operators[sexp_idx].max);
33903 FILE *
fp = fopen(filepath,
"w");
33907 MessageBox(NULL,
"Error creating SEXP operator list",
"Error",
MB_OK);
33915 fputs(
"<body>", fp);
33921 fputs(
"<body>", fp);
33927 fputs(
"<body>", fp);
33938 fprintf(fp,
"<dt><a href=\"#%d\">%s</a></dt>", (op_menu[x].
id &
OP_CATEGORY_MASK), op_menu[x].
name);
33941 if(((op_submenu[y].
id & OP_CATEGORY_MASK) == op_menu[x].
id))
33943 fprintf(fp,
"<dd><a href=\"#%d\">%s</a></dd>", op_submenu[y].
id & (OP_CATEGORY_MASK |
SUBCATEGORY_MASK), op_submenu[y].name);
33947 fputs(
"</dl>", fp);
33953 fprintf(fp,
"<dt id=\"%d\"><h2>%s</h2></dt>\n", (op_menu[x].
id &
OP_CATEGORY_MASK), op_menu[x].
name);
33958 if(((op_submenu[y].
id & OP_CATEGORY_MASK) == op_menu[x].
id))
33960 fprintf(fp,
"<dt id=\"%d\"><h3>%s</h3></dt>\n", op_submenu[y].
id & (OP_CATEGORY_MASK |
SUBCATEGORY_MASK), op_submenu[y].name);
33969 output_sexp_html(z, fp);
33972 fputs(
"</dl>", fp);
33973 fputs(
"</dd>", fp);
33981 output_sexp_html(z, fp);
33984 fputs(
"</dl>", fp);
33985 fputs(
"</dd>", fp);
33991 output_sexp_html(z, fp);
33994 fputs(
"</dl>", fp);
33995 fputs(
"</body>\n</html>\n", fp);
#define SEXP_CHECK_OP_EXPECTED
#define OP_WAS_PROMOTION_GRANTED
#define OP_LOCK_PRIMARY_WEAPON
void updateCustomGaugeFrame(int frame_offset)
int sexp_key_pressed(int node)
GLenum GLsizei GLenum format
void send_change_ai_class_packet(ushort net_signature, char *subsystem, int new_ai_class)
#define OP_PRIMARY_FIRED_SINCE
int sexp_num_within_box(int n)
void send_variable_update_packet(int variable_index, char *value)
#define OP_HUD_CLEAR_MESSAGES
SCP_vector< SCP_string > backup_log_buffer
int sexp_script_eval(int node, int return_type, bool concat_args=false)
void multi_sexp_send_training_message()
#define OP_CLEAR_SHIP_GOALS
#define SSF_MISSILES_IGNORE_IF_DEAD
#define P2_SF2_SCRAMBLE_MESSAGES
#define OP_CUTSCENES_SET_CAMERA
int sexp_primary_ammo_pct(int node)
#define OPF_ROTATING_SUBSYSTEM
void add_nav_waypoint(char *nav, char *WP_path, int vert, char *oswpt_name)
#define OPF_AUDIO_VOLUME_OPTION
#define OP_CHANGE_IFF_COLOR
#define SEXP_CHECK_INVALID_MISSION_MOOD
void sexp_turret_lock_all(int node)
void multi_sexp_change_team_color()
#define OP_HUD_SET_MESSAGE
void sexp_allow_treason(int n)
#define TRIGGER_TYPE_NONE
int sexp_special_warp_dist(int n)
char Parse_names[MAX_SHIPS+MAX_WINGS][NAME_LENGTH]
#define MESSAGE_PRIORITY_NORMAL
#define stars_mark_sun_unused(x)
#define FIREBALL_EXPLOSION_LARGE2
void game_start_subspace_ambient_sound()
bool model_anim_start_type(ship_subsys *pss, int animation_type, int subtype, int direction, bool instant)
int dup_sexp_chain(int node)
#define SHIP_GET_UNSILENCED
#define SEXP_CHECK_INVALID_DOCKER_POINT
int shader_effect_duration
#define OP_CUTSCENES_RESET_CAMERA
int timestamp(int delta_ms)
char Neb2_texture_name[MAX_FILENAME_LEN]
int sexp_are_waypoints_done_delay(int node)
#define MULTIPLAYER_CLIENT
int ship_info_lookup(const char *token)
#define OP_SHIP_CHANGE_CALLSIGN
void sexp_key_reset(int node)
fix time_subsys_cargo_revealed
void sexp_modify_variable(int node)
void obj_set_flags(object *obj, uint new_flags)
float get_max_shield_quad(object *objp)
SCP_vector< medal_stuff > Medals
void sexp_get_object_ship_wing_point_team(object_ship_wing_point_team *oswpt, char *object_name, bool set_parse_flag_too=false)
int stars_add_bitmap_entry(starfield_list_entry *sle)
void sexp_set_turret_primary_ammo(int node)
#define OP_AND_IN_SEQUENCE
bool sexp_get_subsystem_world_pos(vec3d *subsys_world_pos, int shipnum, char *subsys_name)
void sexp_add_wing_goal(int n)
camid cam_create(char *n_name, vec3d *n_pos, vec3d *n_norm, object *n_object, int n_object_host_submodel)
int mission_parse_add_callsign(const char *name)
fix team_change_timestamp
int get_handler_for_x_of_operator(int node)
#define OP_HUD_SET_RETAIL_GAUGE_ACTIVE
#define OP_CATEGORY_CONDITIONAL
#define MISSION_FLAG_NO_BUILTIN_MSGS
#define OP_NAV_UNRESTRICT
model_subsystem * system_info
void sexp_set_thrusters(int node)
weapon Weapons[MAX_WEAPONS]
#define CHANGE_SUBCATEGORY_MISSION_AND_CAMPAIGN
int primary_bank_weapons[MAX_SHIP_PRIMARY_BANKS]
SCP_vector< ArmorType > Armor_types
int sexp_has_departed(int n, fix *latest_time)
float Training_context_distance
#define OP_SHIP_COPY_DAMAGE
#define OPF_SUPPORT_SHIP_CLASS
#define SEXP_CHECK_INVALID_SHIP_EFFECT
#define OP_SET_WEAPON_ENERGY
void sexp_set_weapon(int node, bool primary)
#define SEXP_CHECK_INVALID_SHIP_WING
unsigned int DistanceTo(char *nav)
#define MAX_SHIP_PRIMARY_BANKS
void sexp_set_camera_facing_object(int n)
#define SEXP_CHECK_INVALID_GOAL_NAME
#define OP_TURRET_CHANGE_WEAPON
#define SEXP_CHECK_INVALID_DEPARTURE_LOCATION
void updateCustomGaugeCoords(int _x, int _y)
#define MESSAGE_SOURCE_NONE
void multi_sexp_change_soundtrack()
SCP_string secondary_team_name
int count_free_sexp_nodes()
int Cmdline_old_collision_sys
#define SEXP_VARIABLE_NETWORK
int sexp_shields_left(int n)
void lock_time_compression(bool is_locked)
#define SEXP_CHECK_INVALID_EXPLOSION_OPTION
void multi_sexp_modify_variable()
int Players_target_timestamp
#define SEXP_ATOM_OPERATOR
#define P2_SF2_NO_BUILTIN_MESSAGES
int Cmdline_freespace_no_music
#define CHANGE_SUBCATEGORY_BACKGROUND_AND_NEBULA
int get_effect_from_name(char *name)
void sexp_set_armor_type(int node)
waypoint * find_matching_waypoint(const char *name)
#define OP_REMOVE_SUN_BITMAP
float Cutscene_bars_progress
void sexp_variable_sort()
int num_target_priorities
int check_for_string(const char *pstr)
control_info ai_override_ci
#define P_OF_BEAM_PROTECTED
void sexp_pause_unpause_music(bool pause)
#define OP_NAV_UNSET_VISITED
#define OP_SHIP_BOMB_UNTARGETABLE
void mission_goal_mark_valid(char *name)
#define AIG_TYPE_EVENT_WING
#define LOGFILE_EVENT_LOG
void multi_sexp_add_remove_escort()
shockwave_create_info shockwave
void vm_vec_scale_add(vec3d *dest, const vec3d *src1, const vec3d *src2, float k)
void set_object_host(object *objp, int n_object_host_submodel=-1)
#define OF_LASER_PROTECTED
#define MISSION_FLAG_FULLNEB
#define OP_SKILL_LEVEL_AT_LEAST
int ds_eax_set_volume(float volume)
#define OP_AI_FORM_ON_WING
void sexp_deal_with_afterburner_lock(int node, bool lock)
int sexp_query_orders(int n)
int mission_parse_lookup_callsign(const char *name)
void sexp_hud_set_coords(int n)
void sexp_show_subtitle_text(int node)
float frand_range(float min, float max)
Return a floating point number in the range min..max.
#define OP_WAYPOINT_MISSED
SCP_vector< SCP_string > * Current_event_log_buffer
#define MSS_FLAG2_TURRET_USE_AMMO
polymodel * model_get(int model_num)
#define P_OF_INVULNERABLE
weapon_info Weapon_info[MAX_WEAPON_TYPES]
#define OP_GET_NUM_COUNTERMEASURES
#define OP_FLASH_HUD_GAUGE
#define OP_CATEGORY_CHANGE2
#define OPF_SHIP_CLASS_NAME
bool Nav_UnSet_Hidden(char *Nav)
void sexp_set_support_ship(int n)
#define OP_SET_ETS_VALUES
int sound_env_set(sound_env *se)
char * Explosion_option[]
int sexp_shield_quad_low(int node)
#define OPF_WAYPOINT_PATH
#define OP_CUTSCENES_SHOW_SUBTITLE
SCP_vector< game_snd > Snds
void sexp_reset_camera(int node)
int gamesnd_get_by_tbl_index(int index)
int sexp_node_targeted(int node)
void unset_nav_visited(int node)
int sexp_is_destroyed_delay(int n)
void sexp_update_sound_environment(int node)
#define OP_CATEGORY_ARITHMETIC
#define OP_HAS_SECONDARY_WEAPON
void sexp_ingame_ship_change_iff_color(ship *shipp, int observer_team, int observed_team, int alternate_iff_color)
#define OP_PERCENT_SHIPS_DISABLED
int hud_query_order_issued(char *to, char *order_name, char *target_name, int timestamp, char *from, char *special_argument)
#define OP_HITS_LEFT_SUBSYSTEM_GENERIC
submodel_instance_info submodel_info_1
void sexp_set_object_orientation(int n)
void sexp_end_campaign(int n)
#define FIREBALL_LARGE_EXPLOSION
void sexp_alter_ship_flag_helper(object_ship_wing_point_team &oswpt, bool future_ships, int object_flag, int object_flag2, int ship_flag, int ship_flag2, int parse_obj_flag, int parse_obj_flag2, int ai_flag, int ai_flag2, bool set_flag)
#define SEXP_ERROR_CHECK_MODE
#define LOG_SHIP_SUBSYS_DESTROYED
int sexp_add_variable(const char *text, const char *var_name, int type, int index)
int eval_random_of(int arg_handler_node, int condition_node, bool multiple)
#define CHANGE_SUBCATEGORY_MUSIC_AND_SOUND
void sexp_allow_weapon(int n)
void multi_finished_callback()
GLsizei const GLfloat * value
int last_primary_fire_stamp[MAX_SHIP_PRIMARY_BANKS]
void multi_sexp_set_energy_pct()
#define SF2_NO_SUBSPACE_DRIVE
void obj_all_collisions_retime(int checkdly)
SCP_vector< SCP_string > * Current_event_log_variable_buffer
void sexp_grant_medal(int n)
bool Motion_debris_override
#define OP_NEBULA_TOGGLE_POOF
void multi_sexp_pause_sound_from_file()
void sexp_set_respawns(int node)
int sexp_num_ships_in_battle(int n)
void sexp_mission_set_nebula(int n)
#define CHANGE_SUBCATEGORY_SHIELDS_ENGINES_AND_WEAPONS
int sexp_get_real_speed(object *obj)
#define AI_GOAL_CHASE_WING
#define OP_TURRET_GET_PRIMARY_AMMO
char * model_get_dock_name(int modelnum, int index)
void multi_sexp_flash_hud_gauge()
int free_one_sexp(int num)
void sexp_change_iff_color(int n)
#define OP_TURRET_GET_SECONDARY_AMMO
int weapon_create(vec3d *pos, matrix *orient, int weapon_type, int parent_obj, int group_id=-1, int is_locked=0, int is_spawned=0, float fof_cooldown=0.0f, ship_subsys *src_turret=NULL)
#define NO_OPERATOR_INDEX_DEFINED
#define OP_BEAM_FIRE_COORDS
void skip_white(char **str)
#define OP_HITS_LEFT_SUBSYSTEM
matrix * vm_angles_2_matrix(matrix *m, const angles *a)
#define AI_GOAL_WAYPOINTS
void sexp_set_energy_pct(int node, int op_num)
void stars_set_nebula(bool activate)
void multi_sexp_hud_disable()
#define MISSION_FLAG_USE_AP_CINEMATICS
void sexp_grant_promotion()
#define MAX_OBJECT_FLAG_NAMES
#define OP_MISSION_SET_NEBULA
void multi_sexp_hud_set_max_targeting_range()
#define SEXP_CHECK_INVALID_SHIP_TYPE
char * object_name(int obj)
#define OP_CATEGORY_GOAL_EVENT
#define OP_UNPROTECT_SHIP
#define OP_ACTIVATE_GLOW_POINTS
void stars_set_background_orientation(matrix *orient)
void swap_parse_object(p_object *p_obj, int new_ship_class)
#define OPF_VARIABLE_NAME
#define TRAINING_CONTEXT_FLY_PATH
void sexp_set_immobile(int n, bool immobile)
void ai_clear_wing_goals(int wingnum)
#define OP_HAS_UNDOCKED_DELAY
void parse_copy_damage(p_object *target_pobjp, ship *source_shipp)
int ship_explode_area_calc_damage(vec3d *pos1, vec3d *pos2, float inner_rad, float outer_rad, float max_damage, float max_blast, float *damage, float *blast)
int sexp_query_has_yet_to_arrive(char *name)
#define SEXP_CHECK_INVALID_INTEL_NAME
#define MISSION_FLAG_TOGGLE_DEBRIEFING
void sexp_play_sound_from_file(int n)
#define SEXP_ALL_BANKS_STRING
void sexp_manipulate_colgroup(int node, bool add_to_group)
void object_set_gliding(object *objp, bool enable, bool force)
#define OP_SHIELD_RECHARGE_PCT
#define OP_SCRIPT_EVAL_MULTI
float ship_max_shield_strength
#define AITTV_IGNORE_BANK
#define DEFAULT_NMODEL_FLAGS
void multi_send_object(object *objp)
int sexp_variable_typed_count(int sexp_variables_index, int variable_type)
#define OP_TURRET_SUBSYS_TARGET_DISABLE
#define NUM_COMM_ORDER_ITEMS
#define OP_IS_CARGO_KNOWN
void multi_sexp_deal_with_subsys_flag(int ss_flag)
void sexp_set_training_context_speed(int node)
bool IsVisited(char *nav)
int sexp_is_ship_visible(int n)
void sexp_clear_ship_goals(int n)
int ship_iff_color[MAX_IFFS][MAX_IFFS]
#define OP_AFTERBURNER_LEFT
int insert_subsys_status(p_object *pobjp)
#define OP_ENGINE_RECHARGE_PCT
int weapon_info_lookup(const char *name=NULL)
int min
distance at which sound will stop getting louder
int sexp_hits_left_subsystem(int n)
#define MESSAGE_SOURCE_WINGMAN
#define SEXP_INTEGER_OPERATOR
void updateActive(bool show)
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
void multi_sexp_fade(bool fade_in)
int sexp_event_status(int n, int want_true)
#define OP_EXPLOSION_EFFECT
void sexp_add_goal(int n)
int sexp_was_promotion_granted(int n)
void set_flag(ai_profile_t *profile, char *name, int flag, int type)
int extract_sexp_variable_index(int node)
#define OP_SECONDARY_AMMO_PCT
void sexp_object_ship_wing_point_team_set_ship(object_ship_wing_point_team *oswpt, ship *shipp, bool set_parse_flag_too=false)
#define P2_OF_TARGETABLE_AS_BOMB
void get_sexp_text_for_variable(char *text, char *token)
void sexp_add_remove_escort(int node)
#define OP_DISTANCE_SUBSYSTEM
#define OP_CAP_WAYPOINT_SPEED
void _cdecl void void _cdecl void _cdecl void _cdecl WarningEx(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
void sexp_change_team_score(int node)
#define OPF_TURRET_TARGET_ORDER
int sexp_directive_value(int n)
bool AddNav_Waypoint(char *Nav, char *WP_Path, int node, int flags)
#define SEXP_CHECK_NEGATIVE_NUM
void sexp_send_random_message(int n)
void sexp_turret_set_direction_preference(int node)
void sexp_set_ets_values(int node)
submodel_instance_info submodel_info_2
#define OP_COLLIDE_INVISIBLE
#define OP_HAS_ARRIVED_DELAY
#define OP_IS_FRIENDLY_STEALTH_VISIBLE
#define OP_FRIENDLY_STEALTH_VISIBLE
#define OP_BEAM_FLOATING_FIRE
void gr_init_alphacolor(color *clr, int r, int g, int b, int alpha, int type)
int sexp_cap_subsys_cargo_known_delay(int n)
void set_position(vec3d *in_position=NULL, float in_translation_time=0.0f, float in_translation_acceleration_time=0.0f, float in_translation_deceleration_time=0.0f, float in_end_velocity=0.0f)
#define OP_PREVIOUS_GOAL_INCOMPLETE
#define SEXP_VARIABLE_SET
#define P2_SF2_SECONDARIES_LOCKED
#define OP_GET_OBJECT_HEADING
#define SSF_NO_LIVE_DEBRIS
int sexp_is_subsystem_destroyed_delay(int n)
#define DIRECTIVE_WING_ZERO
#define SEXP_CHECK_INVALID_GAME_SND
void sexp_send_message(int n)
void sexp_ship_guardian_threshold(int node)
int weapon_recharge_index
void sexp_self_destruct(int node)
int subsystem_stricmp(const char *str1, const char *str2)
#define OP_STRING_GET_LENGTH
void multi_sexp_change_ship_class()
#define OP_CHANGE_TEAM_COLOR
void sexp_send_one_message(char *name, char *who_from, char *priority, int group, int delay)
#define AI_GOAL_STAY_NEAR_SHIP
void ship_destroy_instantly(object *ship_objp, int shipnum)
void maybe_write_previous_event_to_log(int result)
#define OPF_EXPLOSION_OPTION
void sexp_reset_orders(int n)
void stars_preload_sun_bitmap(char *fname)
#define SEXP_CHECK_INVALID_ARRIVAL_LOCATION
int shockwave_create(int parent_objnum, vec3d *pos, shockwave_create_info *sci, int flag, int delay)
#define OPF_ANIMATION_TYPE
void updateColor(int r, int g, int b, int a=255)
#define OPF_BACKGROUND_BITMAP
int run_sexp(const char *sexpression)
void obj_snd_delete_type(int objnum, int sndnum, ship_subsys *ss)
#define OP_CATEGORY_STATUS
bool sexp_helper_is_within_box(float *box_vals, vec3d *pos)
#define OP_CHANGE_SOUNDTRACK
#define AI_GOAL_CHASE_ANY
GLenum GLsizei GLenum GLenum const GLvoid * image
#define OP_SUPERNOVA_STOP
#define OP_DIRECTIVE_VALUE
int sexp_get_object_angle(int n, int axis)
#define SEXP_BOOLEAN_OPERATOR
#define LOG_WING_DEPARTED
void flush_sexp_tree(int node)
int subsys_guardian_threshold
void sexp_toggle_builtin_messages(int node, bool enable_messages)
#define OP_GET_OBJECT_SPEED_X
void set_object_for_clients(object *objp)
#define MAX_AI_FLAG_NAMES
void sexp_ship_copy_damage(int node)
#define OP_SET_NUM_COUNTERMEASURES
int sexp_missile_locked(int node)
#define LOG_SHIP_UNDOCKED
#define OP_DEACTIVATE_GLOW_POINT_BANK
int secondary_bank_start_ammo[MAX_SHIP_SECONDARY_BANKS]
#define OP_CUTSCENES_SET_CAMERA_POSITION
struct vec3d::@225::@227 xyz
#define OP_PREVIOUS_EVENT_FALSE
int query_sexp_args_count(int node, bool only_valid_args=false)
void sexp_ship_effect(int n)
bool output_sexps(char *filepath)
int sexp_is_in_mission(int node)
int sexp_bitwise_xor(int node)
#define OP_SET_VARIABLE_BY_INDEX
ship_subsys * Players_targeted_subsys
int mission_parse_add_alt(const char *name)
void sexp_force_glide(int node)
bool cam_set_camera(camid cid)
ship_subsys * target_subsys
#define STATUS_SUBCATEGORY_DISTANCE_AND_COORDINATES
#define OP_PRIMITIVE_SENSORS_SET_RANGE
SCP_vector< SCP_string > * Current_event_log_argument_buffer
#define SF2_DONT_COLLIDE_INVIS
int get_sexp_id(char *sexp_name)
void current_log_to_backup_log_buffer()
void sexp_ignore_key(int node)
#define LOG_SHIP_DEPARTED
#define OP_CHANGE_TEAM_SCORE
object * dock_find_object_at_dockpoint(object *objp, int dockpoint)
int sexp_is_disabled(int n, fix *latest_time)
#define STATUS_SUBCATEGORY_SHIELDS_ENGINES_AND_WEAPONS
int num_block_variables()
#define OP_COPY_VARIABLE_FROM_INDEX
void update_sexp_references(const char *old_name, const char *new_name, int format, int node)
#define OP_SHIP_SUBSYS_TARGETABLE
void sexp_set_subsys_rotation_lock_free(int node, int locked)
bool Nav_Set_NoAccess(char *Nav)
#define SEXP_NODE_INCREMENT
void set_nav_needslink(int node)
void sexp_hud_activate_gauge_type(int n)
void multi_sexp_change_subsystem_name()
#define BFIF_TARGETING_COORDS
void sexp_set_mission_mood(int node)
bool is_sexp_node_numeric(int node)
bool multi_sexp_discard_operator()
int gamesnd_get_by_name(const char *name)
#define OP_ENABLE_BUILTIN_MESSAGES
void sexp_play_sound_from_table(int n)
int sexp_campaign_persistent_variable_count()
void ship_do_cargo_revealed(ship *shipp, int from_network)
void hud_cease_targeting()
#define OP_TIME_WING_ARRIVED
#define NUM_TURRET_ORDER_TYPES
void multi_sexp_play_sound_from_file()
#define SF2_FRIENDLY_STEALTH_INVIS
void sexp_fred_modify_variable(const char *text, const char *var_name, int index, int type)
int get_subcategory(int sexp_id)
int is_sexp_top_level(int node)
#define MAX_PARSE_OBJECT_FLAGS
bool dock_check_find_direct_docked_object(object *objp, object *other_objp)
ai_info Ai_info[MAX_AI_INFO]
subsys_status * parse_get_subsys_status(p_object *pobjp, char *subsys_name)
void unset_nav_carry_status(int node)
float afterburner_fuel_capacity
int ai_remove_goal_sexp_sub(int sexp, ai_goal *aigp)
vec3d * vm_vec_rotate(vec3d *dest, const vec3d *src, const matrix *m)
void weapon_mark_as_used(int weapon_id)
#define Assertion(expr, msg,...)
void sexp_change_soundtrack(int n)
void sexp_show_subtitle_image(int node)
int is_nav_visited(int node)
void sexp_damage_escort_list(int node)
int query_referenced_in_sexp(int mode, char *name, int *node)
#define PERSONA_FLAG_WINGMAN
#define OP_SECONDARY_FIRED_SINCE
#define END_OF_LIST(head)
#define SF2_NAVPOINT_CARRY
#define OP_SET_PLAYER_THROTTLE_SPEED
#define OP_SHIP_SUBSYS_GUARDIAN_THRESHOLD
void multi_sexp_hud_display_gauge()
int sexp_time_docked(int n)
void add_block_variable(const char *text, const char *var_name, int type, int index)
void sexp_ships_vaporize(int n, bool vaporize)
void sexp_show_subtitle(int node)
#define AI_GOAL_DISARM_SHIP
model_subsystem * subsystems
int sexp_are_waypoints_done(int n)
#define OP_CHANGE_PLAYER_SCORE
void set_default_recharge_rates(object *obj)
#define SEXP_CHECK_NUM_RANGE_INVALID
#define OP_TURRET_SET_DIRECTION_PREFERENCE
#define OP_NUM_SHIPS_IN_BATTLE
sexp_help_struct Sexp_help[]
float dock_orient_and_approach(object *docker_objp, int docker_index, object *dockee_objp, int dockee_index, int dock_mode, rotating_dockpoint_info *rdinfo=NULL)
int ds_eax_get_preset_id(const char *name)
#define SEXP_ACTION_OPERATOR
ship_subsys * targeted_subsys
int verify_vector(char *text)
void eval_when_do_one_exp(int exp)
int alloc_sexp(char *text, int type, int subtype, int first, int rest)
void sexp_next_mission(int n)
#define OP_DEACTIVATE_GLOW_MAPS
#define OP_EVENT_TRUE_MSECS_DELAY
void sexp_turret_tagged_clear_specific(int node)
int Knossos_warp_ani_used
#define SEXP_CHECK_INVALID_SKYBOX_FLAG
int ship_is_tagged(object *objp)
int ship_find_exited_ship_by_name(char *name)
sexp_variable Sexp_variables[MAX_SEXP_VARIABLES]
int Sexp_hud_display_warpout
void sexp_turret_set_rate_of_fire(int node)
int sexp_bitwise_not(int node)
#define OP_SEND_RANDOM_MESSAGE
#define OP_WAS_MEDAL_GRANTED
void add_to_event_log_buffer(int op_num, int result)
void multi_sexp_set_time_compression()
int sexp_get_secondary_ammo(int node)
#define SEXP_VARIABLE_NOT_USED
int sexp_is_facing(int node)
int ds_eax_set_decay_time(float seconds)
GLenum GLuint GLenum GLsizei const GLchar * message
void sexp_set_camera_shudder(int n)
void set_turret_primary_ammo(ship_subsys *turret, int requested_bank, int requested_ammo, bool update)
#define OP_REVERSE_ROTATING_SUBSYSTEM
void ship_do_cap_subsys_cargo_revealed(ship *shipp, ship_subsys *subsys, int from_network)
float dock_calc_docked_speed(object *objp)
#define OP_NAV_IS_VISITED
void sexp_set_camera_rotation(int n)
void sexp_script_eval_multi(int node)
void unset_nav_needslink(int node)
#define FIREBALL_EXPLOSION_LARGE1
void sexp_hud_gauge_set_active(int n)
void sexp_set_secondary_ammo(int node)
int eval_any_of(int arg_handler_node, int condition_node)
#define SEXP_HUD_GAUGE_WARPOUT
int turret_next_fire_stamp
bool validate_ship_ets_indxes(const int &ship_idx, int(&ets_indexes)[num_retail_ets_gauges])
int Training_context_at_waypoint
void ai_clear_ship_goals(ai_info *aip)
int model_get_num_dock_points(int modelnum)
void sexp_set_time_compression(int n)
#define SEXP_FLAG_VARIABLE
#define OP_SHIP_BOMB_TARGETABLE
void ai_good_secondary_time(int team, int weapon_index, int num_weapons, char *shipname)
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
void sexp_allow_ship(int n)
#define OP_NUM_SHIPS_IN_WING
void set_fov(float in_fov, float in_fov_time=0.0f, float in_fov_acceleration_time=0.0f, float in_deceleration_time=0.0f)
#define OP_WAYPOINT_TWICE
int sexp_is_bit_set(int node)
#define OP_PLAY_SOUND_FROM_FILE
#define OP_AI_DISABLE_SHIP
void sexp_beam_lock(int node)
void sexp_change_subsystem_name(int node)
#define P_SF2_FRIENDLY_STEALTH_INVIS
int primary_bank_capacity[MAX_SHIP_PRIMARY_BANKS]
int replace_one(char *str, char *oldstr, char *newstr, uint max_len, int range)
#define AIG_TYPE_EVENT_SHIP
void sexp_remove_sun_bitmap(int n)
void sexp_supernova_start(int node)
#define SEXP_CHECK_INVALID_MISSION_NAME
void sexp_set_object_orient_sub(object *objp, vec3d *location, int turn_time, int bank)
int current_secondary_bank
GLfloat GLfloat GLfloat v2
#define OPF_ARRIVAL_LOCATION
int get_index_sexp_variable_name(const char *text)
void multi_handle_sudden_mission_end()
void sexp_show_hide_jumpnode(int node, bool show)
int test_argument_nodes_for_condition(int n, int condition_node, int *num_true, int *num_false, int *num_known_true, int *num_known_false)
SOUNDTRACK_INFO Soundtracks[MAX_SOUNDTRACKS]
briefing Briefings[MAX_TVT_TEAMS]
#define MLF_FIRST_TRIGGER_ONLY
int stuff_sexp_variable_list()
SCP_vector< ship_counts > Ship_type_counts
camid game_render_frame_setup()
#define OP_SET_SHIELD_ENERGY
int sexp_is_player(int node)
int special_argument_appears_in_sexp_tree(int node)
char Neb2_poof_filenames[MAX_NEB2_POOFS][MAX_FILENAME_LEN]
void build_extended_sexp_string(SCP_string &accumulator, int cur_node, int level, int mode)
#define SEXP_CHECK_INVALID_MEDAL_NAME
void multi_start_callback()
#define SEXP_CHECK_INVALID_SUBSYS_TYPE
#define SEXP_CHECK_INVALID_DOCKEE_POINT
#define PLAYER_FLAGS_PROMOTED
#define OP_TURRET_SUBSYS_TARGET_ENABLE
GLenum GLuint GLenum GLsizei const GLchar * buf
void ship_apply_whack(vec3d *force, vec3d *hit_pos, object *objp)
void sexp_hud_set_text_num(int n)
int query_operator_argument_type(int op, int argnum)
void multi_sexp_show_hide_jumpnode(bool show)
void sexp_end_mission(int n)
#define OP_IS_SECONDARY_SELECTED
mission_goal Mission_goals[MAX_GOALS]
#define OP_HUD_SET_DIRECTIVE
#define OP_IS_DISARMED_DELAY
int Training_context_speed_min
#define STATUS_SUBCATEGORY_MULTIPLAYER
void sexp_supernova_stop(int node)
#define SEXP_CHECK_INVALID_EVENT_NAME
script_state Script_system("FS2_Open Scripting")
#define SEXP_CHECK_UNKNOWN_OP
#define OP_CUTSCENES_SET_FOV
void sexp_tech_add_intel_xstr(int node)
int multi_find_player_by_ship_name(const char *ship_name, bool inc_respawning)
void sexp_set_arrival_info(int node)
bool Nav_UnSet_NoAccess(char *Nav)
#define OP_CUTSCENES_RESET_TIME_COMPRESSION
void actually_remove_weapons(int weapon_info_index)
#define STATUS_SUBCATEGORY_CARGO
int Training_context_speed_timestamp
int sexp_get_ets_value(int node)
void sexp_mission_set_subspace(int n)
std::deque< bool > glow_point_bank_active
void sexp_set_motion_debris(int node)
#define OPF_AWACS_SUBSYSTEM
#define OP_ARE_SHIP_FLAGS_SET
void sexp_change_ship_class(int n)
int special_argument_appears_in_sexp_list(int node)
#define OPF_ORDER_RECIPIENT
#define OP_SET_MISSION_MOOD
bool multi_get_bool(bool &value)
void multi_sexp_alter_ship_flag()
#define SEXP_CHECK_INVALID_SHIP
#define CHANGE_SUBCATEGORY_OTHER
int translate_key_to_index(const char *key, bool find_override=true)
#define OP_DAMAGED_ESCORT_LIST_ALL
void sexp_set_docked(int n)
#define OP_SET_SOUND_ENVIRONMENT
#define gr_set_ambient_light
#define SHIP_GUARDIAN_THRESHOLD_DEFAULT
void log_string(int logfile_type, const char *string, int add_time)
#define OP_IS_DESTROYED_DELAY
int sexp_weapon_fired_delay(int node, int op_num)
config_item Control_config[]
Stores the keyboard configuration.
void multi_sexp_set_object_position()
#define OP_NAV_SET_NEEDSLINK
void sexp_fade(bool fade_in, int duration, ubyte R, ubyte G, ubyte B)
int obj_snd_assign(int objnum, int sndnum, vec3d *pos, int main, int flags, ship_subsys *associated_sub)
#define IS_VEC_NULL_SQ_SAFE(v)
#define CLAMP(x, min, max)
#define OP_SHIP_SET_DAMAGE_TYPE
waypoint * find_waypoint_with_objnum(int objnum)
void multi_handle_end_mission_request()
#define OPF_FLEXIBLE_ARGUMENT
#define SEXP_CHECK_DOCKING_NOT_ALLOWED
void ai_do_objects_docked_stuff(object *docker, int docker_point, object *dockee, int dockee_point, bool update_clients=true)
#define OP_SET_AMBIENT_LIGHT
void sexp_set_jumpnode_color(int n)
#define SEXP_CHECK_INVALID_ARRIVAL_ANCHOR_ALL
void ship_actually_depart(int shipnum, int method)
#define OP_CUTSCENES_FADE_IN
int sexp_has_arrived(int n, fix *latest_time)
int sexp_sound_environment_option_lookup(char *text)
#define OP_LAST_ORDER_TIME
void sexp_set_object_speed(object *objp, int speed, int axis, int subjective)
#define SF2_SCRAMBLE_MESSAGES
void sexp_variable_delete(int index)
#define P_SF_HIDDEN_FROM_SENSORS
SCP_vector< waypoint > & get_waypoints()
void sexp_flash_hud_gauge(int node)
int audiostream_is_playing(int i)
int sexp_mission_time_msecs()
#define SNF_ARGUMENT_SELECT
void sexp_close_sound_from_file(int n)
#define OP_GOAL_INCOMPLETE
int ship_type_name_lookup(const char *name)
void sexp_beam_floating_fire(int n)
int sexp_waypoint_twice()
void sexp_set_primary_ammo(int node)
#define OF_TARGETABLE_AS_BOMB
int query_operator_return_type(int op)
#define OP_TURRET_SET_PRIMARY_AMMO
int sexp_bitwise_and(int node)
#define OP_CATEGORY_TRAINING
#define OP_TIME_SHIP_DESTROYED
int sexp_targeted(int node)
int rand_sexp(int n, bool multiple)
int Training_context_goal_waypoint
void sexp_copy_variable_between_indexes(int node)
void multi_sexp_set_persona()
int object_is_docked(object *objp)
int sexp_hits_left(int n)
SCP_vector< MMessage > Messages
bool Nav_Set_Visited(char *Nav)
char * HUD_gauge_text[NUM_HUD_GAUGES]
#define OP_CARGO_NO_DEPLETE
void do_preload_for_arguments(void(*preloader)(char *), int arg_node, int arg_handler_node)
int sexp_string_to_int(int n)
void sexp_mark_persistent(int n)
void stars_preload_background_bitmap(char *fname)
bool use_special_explosion
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
#define OP_CATEGORY_OBJECTIVE
void sexp_set_departure_info(int node)
#define MAX_SHIP_SECONDARY_BANKS
int mission_parse_lookup_alt(const char *name)
int sexp_previous_event_status(int n, int status)
void sexp_set_turret_secondary_ammo(int node)
void set_object_target(object *objp, int n_object_target_submodel=-1)
void multi_sexp_set_camera_facing_object()
#define OP_UPDATE_SOUND_ENVIRONMENT
char * Parse_object_flags[MAX_PARSE_OBJECT_FLAGS]
int sexp_was_destroyed_by(int n, fix *latest_time)
void sexp_clear_goals(int n)
int sexp_facing(int node)
#define OP_CATEGORY_CHANGE
void sexp_set_camera_facing(int n)
SCP_vector< HudGauge * > default_hud_gauges
#define OPF_SUBSYSTEM_TYPE
void afterburners_stop(object *objp, int key_released)
#define OP_TURRET_SET_TARGET_PRIORITIES
#define FIREBALL_MEDIUM_EXPLOSION
struct object_ship_wing_point_team object_ship_wing_point_team
#define OP_SET_OBJECT_SPEED_X
matrix * vm_vector_2_matrix(matrix *m, const vec3d *fvec, const vec3d *uvec, const vec3d *rvec)
int get_index_sexp_variable_name_special(const char *startpos)
void red_alert_start_mission()
float ship_get_subsystem_strength(ship *shipp, int type)
int sexp_secondary_ammo_pct(int node)
void sexp_sabotage_subsystem(int n)
p_object * mission_parse_get_arrival_ship(const char *name)
Returns the parse object on the ship arrival list associated with the given name. ...
#define OP_COPY_VARIABLE_BETWEEN_INDEXES
#define SEXP_CHECK_UNKNOWN_ERROR
void weapon_set_tracking_info(int weapon_objnum, int parent_objnum, int target_objnum, int target_is_locked=0, ship_subsys *target_subsys=NULL)
void vm_vec_add2(vec3d *dest, const vec3d *src)
#define MISSION_FLAG_DEACTIVATE_AP
char pof_file[MAX_FILENAME_LEN]
#define OP_GRANT_PROMOTION
void sexp_set_sound_environment(int node)
void sexp_set_skybox_model(int n)
#define OP_NEBULA_CHANGE_STORM
int shader_effect_start_time
int m_okKills[MAX_SHIP_CLASSES]
ship_subsys * ship_get_indexed_subsys(ship *sp, int index, vec3d *attacker_pos)
#define SEXP_CHECK_UNKNOWN_MESSAGE
GLdouble GLdouble GLdouble r
int Num_sound_environment_options
char * Departure_location_names[MAX_DEPARTURE_NAMES]
#define MAX_DEPARTURE_NAMES
void SetModel(char *model_name, bool show_polys=false)
#define OP_CAP_SUBSYS_CARGO_KNOWN_DELAY
void unhide_nav(int node)
float max_shield_recharge
int ship_class_query_general_type(int ship_class)
bool is_blank_argument_op(int op_const)
#define OP_PERCENT_SHIPS_DISARMED
struct matrix::@228::@230 vec
#define WF_NO_DEPARTURE_WARP
int sexp_is_secondary_selected(int node)
int sexp_time_undocked(int n)
int mission_log_get_time(int type, char *pname, char *sname, fix *time)
void send_debrief_event()
#define OP_TURRET_TAGGED_ONLY_ALL
#define LOG_WING_DESTROYED
void ai_remove_wing_goal_sexp(int sexp, int wingnum)
#define SEXP_ARGUMENT_OPERATOR
arg_item Sexp_applicable_argument_list
void sexp_end_of_campaign(int n)
#define LOG_SHIP_DISABLED
void set_use_ap(int node)
float ship_max_hull_strength
#define OP_IS_SUBSYSTEM_DESTROYED
void stars_set_background_model(char *model_name, char *texture_name, int flags)
int mission_log_get_time_indexed(int type, char *pname, char *sname, int count, fix *time)
int sexp_get_energy_pct(int node, int op_num)
#define OP_EVENT_FALSE_MSECS_DELAY
#define OP_TURRET_SET_OPTIMUM_RANGE
#define OP_GET_THROTTLE_SPEED
void vm_vec_scale(vec3d *dest, float s)
#define CHANGE_SUBCATEGORY_ARMOR_AND_DAMAGE_TYPES
#define OP_TURRET_TAGGED_SPECIFIC
#define OP_SET_DEPARTURE_INFO
int sexp_depart_node_delay(int n)
#define OP_MISSION_SET_SUBSPACE
void eval_when_for_each_special_argument(int cur_node)
const int num_retail_ets_gauges
#define P_OF_FLAK_PROTECTED
#define SEXP_CHECK_INVALID_HUD_ELEMENT
int hud_gauge_type_lookup(char *name)
#define LOG_GOAL_SATISFIED
int Multi_sexp_bytes_left
int Ignored_keys[CCFG_MAX]
int sexp_string_compare(int n, int op)
void sexp_remove_goal(int n)
int sexp_last_order_time(int n)
void multi_sexp_ship_change_callsign()
SCP_vector< squadmsg_history > Squadmsg_history
int sexp_num_valid_arguments(int n)
void sexp_turret_tagged_only_all(int node)
#define OP_SABOTAGE_SUBSYSTEM
#define OP_WEAPON_SET_DAMAGE_TYPE
#define OP_CUTSCENES_SET_CUTSCENE_BARS
int primary_bank_ammo[MAX_SHIP_PRIMARY_BANKS]
#define SEXP_CHECK_INVALID_TEAM_COLOR
#define OP_PLAYER_IS_CHEATING_BASTARD
#define OPF_SHIP_WING_SHIPONTEAM_POINT
#define WIF_IN_TECH_DATABASE
void sexp_stop_music(int fade=1)
void sexp_set_debriefing_toggled(int node)
#define OP_SHIP_SUBSYS_NO_LIVE_DEBRIS
void sexp_weapon_create(int n)
#define OP_UNLOCK_AFTERBURNER
#define CHANGE_SUBCATEGORY_MODELS_AND_TEXTURES
#define OP_CUTSCENES_FADE_OUT
#define SW_FLAG_TURRET_LOCK
#define OP_TURRET_SET_SECONDARY_AMMO
int build_sexp_string(SCP_string &accumulator, int cur_node, int level, int mode)
#define OP_TURRET_FREE_ALL
GLboolean GLboolean GLboolean GLboolean a
#define OP_STRING_LESS_THAN
#define OP_PLAY_SOUND_FROM_TABLE
char Mission_alt_types[MAX_ALT_TYPE_NAMES][NAME_LENGTH]
int secondary_bank_capacity[MAX_SHIP_SECONDARY_BANKS]
bool multi_get_int(int &value)
op_menu_struct op_submenu[]
void sexp_set_jumpnode_model(int n)
void sexp_int_to_string(int n)
int armor_type_get_idx(char *name)
#define OP_DO_FOR_VALID_ARGUMENTS
#define OP_TURRET_SET_TARGET_ORDER
float get_hull_pct(object *objp)
void sexp_destroy_instantly(int n)
#define SEXP_VARIABLE_BLOCK
int sexp_shield_recharge_pct(int node)
void sexp_copy_variable_from_index(int node)
void sexp_turret_lock(int node)
void sexp_subsys_set_random(int node)
int test_argument_vector_for_condition(SCP_vector< char * > argument_vector, bool already_dupped, int condition_node, int *num_true, int *num_false, int *num_known_true, int *num_known_false)
int sexp_is_disarmed_delay(int n)
void sexp_hud_disable_except_messages(int n)
#define strnicmp(s1, s2, n)
#define OP_DESTROY_INSTANTLY
int distance_to_nav(int node)
void sexp_change_argument_validity(int n, bool invalidate)
#define OPF_TARGET_PRIORITIES
object * sexp_camera_get_objsub(int node, int *o_submodel)
#define OP_ADJUST_AUDIO_VOLUME
#define OP_TIME_WING_DEPARTED
ai_goal goals[MAX_AI_GOALS]
void sexp_set_oswpt_facing(object_ship_wing_point_team *oswpt, vec3d *location, int turn_time=0, int bank=0)
int snd_play_3d(game_snd *gs, vec3d *source_pos, vec3d *listen_pos, float radius, vec3d *source_vel, int looping, float vol_scale, int priority, vec3d *sound_fvec, float range_factor, int force, bool is_ambient)
int sexp_get_sound_index(int node)
int sexp_set_bit(int node, bool set_it)
mission_event Mission_events[MAX_MISSION_EVENTS]
#define OP_VALIDATE_ARGUMENT
int find_argnum(int parent, int arg)
bool AddNav_Ship(char *Nav, char *TargetName, int flags)
void multi_send_string(char *string)
#define OPF_SHIP_WING_POINT
void sexp_dont_collide_invisible(int n, bool dont_collide)
#define P_OF_LASER_PROTECTED
#define CHANGE_SUBCATEGORY_AI_CONTROL
int ship_get_SIF(ship *shipp)
void send_change_iff_packet(ushort net_signature, int new_team)
void sexp_nebula_change_storm(int n)
int sexp_get_damage_caused(int node)
#define OP_PERCENT_SHIPS_DESTROYED
void zero_one_ets(int *reduce, int *add1, int *add2)
void sexp_scramble_messages(int node, bool scramble)
int stars_find_bitmap(char *name)
int sexp_calculate_coordinate(vec3d *origin, matrix *orient, vec3d *relative_location, int axis)
#define NOT_A_SEXP_OPERATOR
#define OP_CLOSE_SOUND_FROM_FILE
#define SEXP_CHECK_INVALID_ANIMATION_TYPE
void sexp_pause_sound_from_file(int node)
void game_shudder_apply(int, float)
void vm_vec_sub2(vec3d *dest, const vec3d *src)
void message_translate_tokens(char *buf, char *text)
#define MISSION_FLAG_END_TO_MAINHALL
#define OP_ADD_TO_COLGROUP
void ship_subsys_set_name(ship_subsys *ss, char *n_name)
#define MESSAGE_SOURCE_SHIP
#define MAX_MODEL_SUBSYSTEMS
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
int eval_in_sequence(int arg_handler_node, int condition_node)
#define STATUS_SUBCATEGORY_MISSION
ai_flag_name Ai_flag_names[]
float ship_max_hull_strength
void multi_discard_remaining_callback_data()
void hud_gauge_start_flash(int gauge_index)
Call HUD function to flash gauge.
float damage_ship[MAX_DAMAGE_SLOTS]
void sexp_trigger_submodel_animation(int node)
#define BFIF_FLOATING_BEAM
bool multi_get_string(char *buffer)
#define OP_SET_POST_EFFECT
void multi_sexp_reset_camera()
#define WF_NO_ARRIVAL_WARP
#define OP_DONT_COLLIDE_INVISIBLE
int sexp_is_destroyed(int n, fix *latest_time)
void set_time_compression(float multiplier, float change_time)
#define CAMPAIGN_PERSISTENT_SHIP
void hud_shield_quadrant_hit(object *objp, int quadrant)
void set_primary_ammo(int ship_index, int requested_bank, int requested_ammo, int rearm_limit, bool update)
#define OP_TIME_SHIP_ARRIVED
ship * sexp_get_ship_from_node(int node)
#define P_OF_MISSILE_PROTECTED
#define SF_HIDDEN_FROM_SENSORS
#define SEXP_MODE_CAMPAIGN
int sexp_num_ships_in_wing(int n)
void multi_sexp_reset_time_compression()
#define OP_SHIP_ROT_MANEUVER
#define SEXP_CHECK_INVALID_POINT
void multi_sexp_set_camera_shudder()
void sexp_unmark_persistent(int n)
#define OP_SCRIPT_EVAL_BLOCK
bool generate_special_explosion_block_variables()
void sexp_set_ship_man(object *objp, int duration, int heading, int pitch, int bank, bool apply_all_rotate, int up, int sideways, int forward, bool apply_all_lat)
void sexp_turret_set_optimum_range(int node)
void multi_send_ship(int shipnum)
void sexp_hud_set_message(int n)
int sexp_is_tagged(int node)
void hud_add_ship_to_escort(int objnum, int supress_feedback)
#define OP_CUTSCENES_FORCE_PERSPECTIVE
int iff_lookup(char *iff_name)
int special_exp_deathroll_time
#define SSF_CARGO_REVEALED
void set_secondary_ammo(int ship_index, int requested_bank, int requested_ammo, int rearm_limit, bool update)
void sexp_toggle_cutscene_bars(int node, int set)
#define OP_SHIP_VULNERABLE
int stars_find_sun(char *name)
int alt_iff_color[MAX_IFFS][MAX_IFFS]
#define OPF_NEBULA_PATTERN
#define OP_UNLOCK_SECONDARY_WEAPON
void sexp_set_countermeasures(int node)
void sexp_field_set_damage_type(int node)
void sexp_parse_ship_change_iff(p_object *parse_obj, int new_team)
void multi_sexp_add_nav_waypoint()
int sexp_explosion_option_lookup(char *text)
void SetVisibility(bool enabled)
#define OP_TRIGGER_SUBMODEL_ANIMATION
int required_string(const char *pstr)
int sexp_ship_type_destroyed(int n)
void multi_sexp_set_camera_facing()
sexp_com_order Sexp_comm_orders[]
void sexp_ships_visible(int n, bool visible)
void unrestrict_nav(int node)
#define OP_SET_SUBSYSTEM_STRNGTH
int snd_play(game_snd *gs, float pan, float vol_scale, int priority, bool is_voice_msg)
int eval_perform_actions(int n)
#define AI_GOAL_STAY_STILL
void sexp_ingame_ship_change_iff(ship *shipp, int new_team)
#define OP_MODIFY_VARIABLE
int engine_recharge_index
#define SF_PRIMARY_LINKED
#define SEXP_CHECK_INVALID_AI_CLASS
void multi_sexp_script_eval_multi()
void multi_sexp_set_camera_position()
void sexp_change_goal_validity(int n, int flag)
int sexp_special_warpout_name(int node)
fix game_get_overall_frametime()
int secondary_bank_weapons[MAX_SHIP_SECONDARY_BANKS]
#define OP_NAV_USECINEMATICS
#define OP_GREATER_OR_EQUAL
HudGauge * hud_get_gauge(const char *name)
int query_sexp_ai_goal_valid(int sexp_ai_goal, int ship_num)
#define OP_TIME_WING_DESTROYED
void multi_send_parse_object(p_object *pobjp)
#define HUD_OBJECT_MESSAGES
#define OPF_MESSAGE_OR_STRING
bool can_construe_as_integer(const char *text)
int Training_context_speed_max
void lcl_replace_stuff(char *text, size_t max_len)
void sexp_primitive_sensors_set_range(int n)
int sexp_skill_level_at_least(int n)
void sexp_awacs_set_radius(int node)
#define SEXP_CHECK_ORDER_NOT_ALLOWED
object * dock_get_first_docked_object(object *objp)
float vm_vec_dist(const vec3d *v0, const vec3d *v1)
void sexp_deal_with_secondary_lock(int node, bool lock)
void sexp_parse_ship_alt_name(p_object *parse_obj, int alt_index)
int sexp_percent_ships_arrive_depart_destroy_disarm_disable(int n, int what)
void multi_sexp_set_ets_values()
char skybox_model[MAX_FILENAME_LEN]
#define OP_CUTSCENES_SET_TIME_COMPRESSION
void multi_sexp_set_fov()
#define LOG_CAP_SUBSYS_CARGO_REVEALED
char * Turret_target_order_names[NUM_TURRET_ORDER_TYPES]
int ai_query_goal_valid(int ship, int ai_goal_type)
void sexp_tech_add_weapon(int node)
void select_nav(int node)
void sexp_ship_subsys_guardian_threshold(int num)
#define OP_GET_DAMAGE_CAUSED
void sexp_change_iff(int n)
#define OP_PERFORM_ACTIONS
void sexp_clear_wing_goals(int n)
void SelectNav(char *Nav)
void sexp_beam_free(int node)
void sexp_deal_with_ship_flag(int node, bool process_subsequent_nodes, int object_flag, int object_flag2, int ship_flag, int ship_flag2, int p_object_flag, int p_object_flag2, bool set_it, bool send_multiplayer=false, bool include_players_in_ship_lookup=false)
int collision_damage_type_idx
int ship_has_energy_weapons(ship *shipp)
void ai_set_rearm_status(int team, int new_status)
bool dc_optional_string_either(const char *str1, const char *str2)
Searches for an optional string and it's alias.
int sexp_current_speed(int n)
int validate_float(char **str)
#define DEFAULT_SHIELD_SECTIONS
void actually_set_camera_facing_object(char *object_name, float rot_time, float rot_acc_time, float rot_dec_time)
#define OP_PLAYER_NOT_USE_AI
int sexp_is_subsystem_destroyed(int n)
void insertion_sort(void *array_base, size_t array_size, size_t element_size, int(*fncompare)(const void *, const void *))
void sexp_set_subsystem_strength(int n)
int turret_targeting_order[NUM_TURRET_ORDER_TYPES]
void do_subobj_destroyed_stuff(ship *ship_p, ship_subsys *subsys, vec3d *hitpos, bool no_explosion)
void sexp_ship_change_callsign(int node)
void sexp_hud_set_retail_gauge_active(int node)
void multi_sexp_hud_disable_except_messages()
int sexp_is_disarmed(int n, fix *latest_time)
#define OP_VALIDATE_ALL_ARGUMENTS
#define SRC_WING_DEPARTURE
#define OPF_SHIP_WING_WHOLETEAM
int category_of_subcategory(int subcategory_id)
#define SIF_BALLISTIC_PRIMARIES
int model_load(char *filename, int n_subsystems, model_subsystem *subsystems, int ferror=1, int duplicate=0)
int ship_get_random_ship_in_wing(int wingnum, int flags, float max_dist, int get_first)
#define OP_HUD_SET_MAX_TARGETING_RANGE
char Mission_filename[80]
void sexp_cargo_no_deplete(int n)
#define OP_TECH_ADD_INTEL_XSTR
void emp_apply(vec3d *pos, float inner_radius, float outer_radius, float emp_intensity, float emp_time, bool use_emp_time_for_capship_turrets)
int generate_event_log_flags_mask(int result)
#define AI_GOAL_EVADE_SHIP
#define OP_CATEGORY_LOGICAL
int get_operator_index(const char *token)
#define OP_HAS_TIME_ELAPSED
void message_training_queue(char *text, int timestamp, int length)
void multi_send_ushort(ushort value)
int beam_fire(beam_fire_info *fire_info)
void model_page_in_textures(int modelnum, int ship_info_index=-1)
#define OP_SCRIPT_EVAL_NUM
float apply_damage_to_shield(object *objp, int quadrant, float damage)
#define SEXP_CHECK_INVALID_TARGET_PRIORITIES
void sexp_set_jumpnode_name(int n)
int sexp_get_variable_by_index(int node)
#define OP_AI_KEEP_SAFE_DISTANCE
#define MESSAGE_PRIORITY_LOW
#define OPF_HUD_GAUGE_NAME
#define OP_SET_PLAYER_ORDERS
void sexp_force_perspective(int n)
#define OP_GET_OBJECT_SPEED_Y
char * sexp_get_result_as_text(int result)
int secondary_bank_ammo[MAX_SHIP_SECONDARY_BANKS]
void sexp_add_array_block_variable(int index, bool is_numeric)
unsigned __int64 uint64_t
SCP_vector< char * > Applicable_arguments_temp
#define OP_TIME_SHIP_DEPARTED
int sexp_distance_subsystem(int n)
int sexp_distance2(object *objp1, object_ship_wing_point_team *oswpt2)
void audiostream_unpause(int i, bool via_sexp_or_script)
void ship_set_new_ai_class(int ship_num, int new_ai_class)
#define SF_NO_DEPARTURE_WARP
#define SIF_IN_TECH_DATABASE
#define SEXP_CHECK_INVALID_WING
#define OP_DEPART_NODE_DELAY
int check_sexp_syntax(int node, int return_type, int recursive, int *bad_node, int mode)
bool sexp_check_flag_arrays(char *flag_name, int &object_flag, int &object_flag2, int &ship_flags, int &ship_flags2, int &parse_obj_flag, int &parse_obj_flag2, int &ai_flag, int &ai_flag2)
void sexp_exchange_cargo(int n)
#define OP_INVALIDATE_GOAL
void ship_recalc_subsys_strength(ship *shipp)
#define OP_SET_OBJECT_FACING_OBJECT
int sexp_weapon_recharge_pct(int node)
#define stars_mark_bitmap_unused(x)
vec3d * vm_vec_unrotate(vec3d *dest, const vec3d *src, const matrix *m)
void sexp_set_skybox_orientation(int n)
int get_string(char *str, int max)
#define OP_HITS_LEFT_SUBSYSTEM_SPECIFIC
void multi_oo_send_changed_object(object *changedobj)
#define OSWPT_TYPE_WHOLE_TEAM
void ship_apply_global_damage(object *ship_objp, object *other_obj, vec3d *force_center, float damage)
sexp_ai_goal_link Sexp_ai_goal_links[]
int ship_query_state(char *name)
int Sexp_current_argument_nesting_level
#define OP_JUMP_NODE_SET_JUMPNODE_MODEL
void sexp_remove_background_bitmap(int n)
void maybe_write_to_event_log(int result)
#define OP_TECH_RESET_TO_DEFAULT
#define SEXP_CHECK_INVALID_ARMOR_TYPE
#define AI_GOAL_IGNORE_NEW
char * Subsystem_types[SUBSYSTEM_MAX]
#define OP_NUM_CLASS_KILLS
void event_sexp_change_soundtrack(char *name)
#define SEXP_ALL_TURRETS_STRING
void multi_sexp_show_subtitle_image()
int num_target_priorities
void sexp_change_all_argument_validity(int n, bool invalidate)
#define OP_MISSION_TIME_MSECS
#define SEXP_FLAG_PERSISTENT
void sexp_explosion_effect(int n)
#define MAX_PARSE_OBJECT_FLAGS_2
GLint GLint GLint GLint GLint x
object Objects[MAX_OBJECTS]
for(int idx=0;idx< i;idx++)
#define OPF_SOUND_ENVIRONMENT_OPTION
int rand_internal(int low, int high, int seed=0)
void object_jettison_cargo(object *objp, object *cargo_objp)
#define SNF_ARGUMENT_VALID
int ssm_info_lookup(const char *name)
#define OP_SET_MOTION_DEBRIS
#define SEXP_CHECK_INVALID_SUPPORT_SHIP_CLASS
#define MULTI_NOT_DOGFIGHT
void sexp_set_training_context_fly_path(int node)
#define AI_GOAL_PLAY_DEAD
#define OP_SHIELD_QUAD_LOW
#define OP_SHIP_TYPE_DESTROYED
#define OP_GOAL_TRUE_DELAY
#define stars_get_num_bitmaps()
void sexp_tech_reset_to_default()
int sexp_variable_count()
void sexp_turret_free_all(int node)
void sexp_alter_ship_flag(int node)
void hud_set_draw(int draw)
void sexp_string_set_substring(int node)
int sexp_number_compare(int n, int op)
int ship_create(matrix *orient, vec3d *pos, int ship_type, char *ship_name)
#define OP_SET_ARMOR_TYPE
float primary_bank_fof_cooldown[MAX_SHIP_PRIMARY_BANKS]
void sexp_jettison_cargo(int n)
#define OP_PREVIOUS_EVENT_TRUE
#define OP_ADD_BACKGROUND_BITMAP
#define OP_TURRET_SET_RATE_OF_FIRE
int sexp_player_is_cheating_bastard()
void send_force_end_mission_packet()
int get_generic_subsys(char *subsy_name)
#define AI_GOAL_WAYPOINTS_ONCE
void sexp_protect_ships(int n, bool flag)
#define OP_SHIP_CHANGE_ALT_NAME
void sexp_set_skybox_model_preload(char *name)
#define SF_NO_ARRIVAL_WARP
int mission_campaign_find_mission(char *name)
#define OPF_SKYBOX_MODEL_NAME
#define OP_SET_CAMERA_SHUDDER
float Energy_levels[NUM_ENERGY_LEVELS]
#define OP_DEACTIVATE_GLOW_POINTS
#define SEXP_CHECK_INVALID_SHIP_CLASS_NAME
#define OP_SHIP_INVULNERABLE
int sexp_goal_incomplete(int n)
int shield_armor_type_idx
void mission_goal_mark_invalid(char *name)
int query_node_in_sexp(int node, int sexp)
#define OP_TURRET_LOCK_ALL
void sexp_friendly_stealth_invisible(int n, bool invisible)
#define OP_ACTIVATE_GLOW_MAPS
int sexp_has_been_tagged_delay(int n)
#define SEXP_ARITHMETIC_OPERATOR
char * Sound_environment_option[]
DCF(sexp,"Runs the given sexp")
#define OP_IS_DISABLED_DELAY
#define LOG_SHIP_DESTROYED
int ds_eax_set_damping(float damp)
#define OP_HAS_DEPARTED_DELAY
void sexp_ingame_ship_alt_name(ship *shipp, int alt_index)
#define gr_post_process_set_effect
bool ship_class_unchanged(int ship_index)
waypoint_list * Training_context_path
#define OP_HUD_SET_TEXT_NUM
int ship_guardian_threshold
void sexp_set_camera_fov(int n)
float Cutscene_delta_time
#define OPF_SUBSYSTEM_OR_NONE
#define OP_CHANGE_SUBSYSTEM_NAME
#define SEXP_CHECK_INVALID_SOUND_ENVIRONMENT_OPTION
void sexp_ship_create(int n)
int last_secondary_fire_stamp[MAX_SHIP_SECONDARY_BANKS]
void ship_copy_damage(ship *target_shipp, ship *source_shipp)
camera * sexp_get_set_camera(bool reset=false)
int Num_explosion_options
#define MEF_USING_TRIGGER_COUNT
#define SND_PRIORITY_MUST_PLAY
flag_def_list Hud_gauge_types[]
float get_sim_hull_pct(object *objp)
int Hud_max_targeting_range
int max
distance at which sound is inaudible
#define OP_SET_SUBSPACE_DRIVE
#define OP_SET_DEATH_MESSAGE
void ssm_create(object *target, vec3d *start, size_t ssm_index, ssm_firing_info *override, int team)
sexp_variable Block_variables[MAX_SEXP_VARIABLES]
#define OP_HUD_DISABLE_EXCEPT_MESSAGES
int sexp_get_countermeasures(int node)
void sexp_ship_set_damage_type(int node)
int used
has control been used yet in mission? If so, this is the timestamp
#define OP_AI_WAYPOINTS_ONCE
void _cdecl void void _cdecl Error(const char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
int ai_override_timestamp
void sexp_set_object_position(int n)
void ai_add_ship_goal_sexp(int sexp, int type, ai_info *aip)
#define OP_TECH_ADD_WEAPON
#define OP_SHIP_SUBSYS_NO_REPLACE
int sexp_get_colgroup(int node)
#define AI_GOAL_GUARD_WING
int special_warpout_objnum
#define P_OF_PLAYER_START
int sexp_var_compare(const void *var1, const void *var2)
#define OP_SET_DEBRIEFING_TOGGLED
#define OP_CUTSCENES_SET_CAMERA_FOV
float forward_cruise_percent
#define SEXP_SIM_HULL_STRING
SCP_vector< subtitle > Subtitles
#define OSWPT_TYPE_WAYPOINT
void set_rotation(matrix *in_orientation=NULL, float in_rotation_time=0.0f, float in_rotation_acceleration_time=0.0f, float in_rotation_deceleration_time=0.0f)
int sound_env_get(sound_env *se, int preset)
void multi_sexp_toggle_cutscene_bars(int set)
#define OP_SET_ARRIVAL_INFO
#define OP_DESTROYED_DEPARTED_DELAY
#define SF2_NO_BUILTIN_MESSAGES
int wing_name_lookup(const char *name, int ignore_count)
void sanity_check_ets_inputs(int(&ets_indexes)[num_retail_ets_gauges])
#define SEXP_CHECK_BAD_ARG_COUNT
#define OF_MISSILE_PROTECTED
#define OP_TRANSFER_CARGO
void sexp_ships_stealthy(int n, bool stealthy)
#define CHANGE_SUBCATEGORY_MESSAGING
int is_sexp_true(int cur_node, int referenced_node)
GLuint const GLchar * name
#define OPF_SHIP_WITH_BAY
void multi_send_float(float value)
#define SEXP_CHECK_INVALID_SHIP_WITH_BAY
void object_ship_wing_point_team_set_ship(object_ship_wing_point_team *oswpt, ship *shipp, bool set_parse_flag_too)
#define SEXP_CHECK_UNKNOWN_TYPE
int eval_when(int n, int when_op_num)
float get_damage_caused(int damaged_ship, int attacker)
int get_special_anchor(char *name)
#define SW_FLAG_TAGGED_ONLY
int secondary_bank_rearm_time[MAX_SHIP_SECONDARY_BANKS]
void sexp_hud_set_color(int n)
float awacs_get_level(object *target, ship *viewer, int use_awacs)
void sexp_adjust_audio_volume(int node)
#define OSWPT_TYPE_EXITED
bool Nav_UnSet_Visited(char *Nav)
#define OP_SUBSYS_SET_RANDOM
int sexp_is_ship_type(int n)
int Training_context_speed_set
void sexp_send_message_list(int n)
void vm_vec_sub(vec3d *dest, const vec3d *src0, const vec3d *src1)
#define OP_SET_SECONDARY_WEAPON
void multi_sexp_remove_weapons()
void sexp_activate_deactivate_glow_points(int n, bool activate)
int Players_mlocked_timestamp
#define SEXP_CHECK_INVALID_SUBSYS
#define OP_SET_SPECIAL_WARPOUT_NAME
#define vm_realloc(ptr, size)
#define OP_HAS_BEEN_TAGGED_DELAY
#define OP_TURRET_UNPROTECT_SHIP
char command_sender[NAME_LENGTH]
void game_stop_subspace_ambient_sound()
#define OP_CHANGE_SHIP_CLASS
void supernova_start(int seconds)
int check_operator_argument_count(int count, int op)
#define OP_SET_PRIMARY_WEAPON
bool sexp_replace_variable_names_with_values(char *text, int max_len)
#define SF2_PRIMARIES_LOCKED
void sexp_send_training_message(int node)
#define OP_SHIP_SHOCKWAVE_SET_DAMAGE_TYPE
#define TRAINING_CONTEXT_SPEED
#define OP_END_OF_CAMPAIGN
int multi_sexp_get_operator()
int find_sexp_list(int num)
float ship_class_get_length(ship_info *sip)
void sexp_good_secondary_time(int n)
ship_flag_name Ship_flag_names[]
void sexp_weapon_set_damage_type(int node)
#define OSWPT_TYPE_WING_NOT_PRESENT
#define SEXP_CHECK_INVALID_PERSONA_NAME
#define OP_PERCENT_SHIPS_DEPARTED
GLboolean GLboolean GLboolean b
void sexp_string_get_substring(int node)
void send_weapon_or_ammo_changed_packet(int ship_index, int bank_type, int bank_number, int ammo_left, int rearm_limit, int new_weapon_index)
int model_find_dock_name_index(int modelnum, char *name)
void multi_sexp_set_turret_primary_ammo()
int iff_init_color(int r, int g, int b)
int sexp_team_score(int node)
void sexp_set_explosion_option(int node)
int sexp_has_departed_delay(int n)
#define STATUS_SUBCATEGORY_DAMAGE
float get_shield_pct(object *objp)
void audiostream_close_file(int i, int fade)
#define SEXP_CHECK_NONOP_ARGS
#define OP_JETTISON_CARGO
#define OP_SET_OBJECT_POSITION
#define MESSAGE_PRIORITY_HIGH
#define OP_LOCK_ROTATING_SUBSYSTEM
#define OP_PREVIOUS_GOAL_FALSE
int get_category(int sexp_id)
int sexp_get_turret_primary_ammo(int node)
#define CMISSION_FLAG_SKIPPED
SCP_vector< ship_effect > Ship_effects
CJumpNode * jumpnode_get_by_name(const CString &name)
#define OP_SHIP_SUBSYS_UNTARGETABLE
#define OP_SET_AFTERBURNER_ENERGY
int sexp_is_ship_class(int n)
#define OP_SET_SKYBOX_MODEL
int ship_get_by_signature(int signature)
typedef float(SCP_EXT_CALLCONV *SCPTRACKIR_PFFLOATVOID)()
#define OPF_WEAPON_BANK_NUMBER
void stuff_sexp_text_string(SCP_string &dest, int node, int mode)
bool test_point_within_box(vec3d *test_point, vec3d *box_corner_1, vec3d *box_corner_2, object *reference_ship_obj)
void sexp_ship_shockwave_set_damage_type(int node)
#define OP_SEND_MESSAGE_LIST
#define WING_INDEX(wingp)
void shockwave_create_info_init(shockwave_create_info *sci)
void set_use_ap_cinematics(int node)
int mission_log_get_count(int type, char *pname, char *sname)
void sexp_ingame_ship_kamikaze(ship *shipp, int kdamage)
int sexp_and_in_sequence(int n)
#define SEXP_CHECK_INVALID_VARIABLE_TYPE
#define OP_AI_DESTROY_SUBSYS
#define SEXP_GOAL_OPERATOR
void sexp_debug(int node)
#define OP_NUM_TYPE_KILLS
void sexp_set_variable_by_index(int node)
ship_subsys * ship_get_subsys(ship *shipp, char *subsys_name)
void sexp_rotating_subsys_set_turn_time(int node)
int sexp_bitwise_or(int node)
#define EO_SHOCKWAVE_SPEED
int primitive_sensor_range
#define P2_SF2_PRIMARIES_LOCKED
void sexp_parse_ship_change_iff_color(p_object *parse_obj, int observer_team, int observed_team, int alternate_iff_color)
void CAP(T &v, T mn, T mx)
#define OP_SET_SUPPORT_SHIP
void sexp_tech_add_intel(int node)
int sexp_num_class_kills(int node)
waypoint_list * find_matching_waypoint_list(const char *name)
bool ship_has_dock_bay(int shipnum)
#define OP_GET_COLGROUP_ID
void SetName(const char *new_name)
void sexp_ships_bomb_targetable(int n, bool targetable)
#define SEXP_CHECK_INVALID_GAUGE_NAME
#define OP_EVERY_TIME_ARGUMENT
#define OP_SHIP_GUARDIAN_THRESHOLD
#define OPF_JUMP_NODE_NAME
void sexp_add_sun_bitmap(int n)
float favor_current_facing
void sexp_hud_set_max_targeting_range(int n)
GLint GLsizei GLsizei height
float vm_vec_dist_quick(const vec3d *v0, const vec3d *v1)
int sexp_is_cargo_known(int n, int check_delay)
#define SEXP_CONDITIONAL_OPERATOR
#define AI_GOAL_KEEP_SAFE_DISTANCE
void sexp_turret_change_weapon(int node)
void sexp_set_subspace_drive(int node)
void multi_sexp_set_jumpnode_name()
#define BFIF_FORCE_FIRING
void sexp_ship_turret_target_order(int node)
void multi_add_nav_ship()
GLubyte GLubyte GLubyte GLubyte w
#define OP_REPAIR_SUBSYSTEM
void neb2_post_level_init()
void sexp_ships_guardian(int n, int guardian)
#define AI_GOAL_DISABLE_SHIP
int ship_docking_valid(int docker, int dockee)
#define OSWPT_TYPE_PARSE_OBJECT
void sexp_set_ambient_light(int node)
void sexp_ships_invulnerable(int n, bool invulnerable)
#define CHANGE_SUBCATEGORY_HUD
bool multi_get_parse_object(p_object *&pobjp)
void clear_nesting_level()
bool has_special_explosion_block_index(ship *shipp, int *index)
void sexp_transfer_cargo(int n)
camid cam_lookup(char *name)
void sexp_activate_deactivate_glow_point_bank(int n, bool activate)
#define OP_TURRET_PROTECT_SHIP
#define SEXP_CHECK_INVALID_PRIORITY
#define MULTI_CONNECTED(np)
#define OP_DESTROY_SUBSYS_INSTANTLY
#define SEXP_CHECK_INVALID_SKYBOX_NAME
#define SUBSYSTEM_UNKNOWN
void hud_remove_ship_from_escort(int objnum)
#define OPF_SOUNDTRACK_NAME
#define OP_INVALIDATE_ARGUMENT
void hud_disable_except_messages(int disable)
int audiostream_is_paused(int i)
#define OP_SHIP_UNSTEALTHY
#define MAX_COMPLETE_ESCORT_LIST
void multi_sexp_reset_fov()
#define CHANGE_SUBCATEGORY_SPECIAL_EFFECTS
int multi_find_player_by_parse_object(p_object *p_objp)
void sexp_hud_set_custom_gauge_active(int node)
#define OP_RANDOM_MULTIPLE_OF
#define CHANGE_SUBCATEGORY_JUMP_NODES
int eval_sexp(int cur_node, int referenced_node)
int sexp_time_ship_arrived(int n)
void add_data_set_dup(char *str)
void read_mission_goal_list(int num)
#define OP_ALTER_SHIP_FLAG
p_object * mission_parse_get_parse_object(ushort net_signature)
void multi_sexp_ignore_key()
void do_action_for_each_special_argument(int cur_node)
int sexp_facing2(int node)
bool multi_get_float(float &value)
void sexp_call_ssm_strike(int node)
#define OP_EXCHANGE_CARGO
#define OP_CUTSCENES_SET_CAMERA_FACING_OBJECT
void multi_end_callback()
int Campaign_ending_via_supernova
#define OP_SHIP_SUBSYS_IGNORE_IF_DEAD
#define OP_SECONDARIES_DEPLETED
class camera * getCamera()
#define OP_GET_SECONDARY_AMMO
void multi_sexp_play_sound_from_table()
char * Parse_object_flags_2[MAX_PARSE_OBJECT_FLAGS_2]
#define CHANGE_SUBCATEGORY_CARGO
#define OP_CUTSCENES_UNSET_CUTSCENE_BARS
#define OP_GOOD_SECONDARY_TIME
#define OP_MISSILE_LOCKED
int sexp_time_destroyed(int n)
#define OP_JUMP_NODE_SET_JUMPNODE_COLOR
#define OP_NAV_UNSET_NEEDSLINK
#define OP_LOCK_SECONDARY_WEAPON
void sexp_player_use_ai(int flag)
int sexp_was_destroyed_by_delay(int n)
#define SF2_GLOWMAPS_DISABLED
void sexp_ship_deal_with_subsystem_flag(int node, int ss_flag, bool sendit=false, bool setit=false)
#define OP_FREE_ROTATING_SUBSYSTEM
#define SEXP_VARIABLE_CAMPAIGN_PERSISTENT
#define OP_UNSCRAMBLE_MESSAGES
#define NETINFO_FLAG_RESPAWNING
void sexp_hud_clear_messages()
#define SEXP_CHECK_INVALID_JUMP_NODE
#define OP_BEAM_UNPROTECT_SHIP
char subobj_name[MAX_NAME_LEN]
#define OP_FIELD_SET_DAMAGE_TYPE
int sexp_destroyed_departed_delay(int n)
#define OP_HAS_PRIMARY_WEAPON
int sexp_is_ship_stealthy(int n)
#define SEXP_CHECK_INVALID_SKILL_LEVEL
void sexp_set_object_facing(int n, bool facing_object)
void hud_setup_escort_list(int level)
float vm_vec_copy_normalize(vec3d *dest, const vec3d *src)
void ship_do_cargo_hidden(ship *shipp, int from_network)
int Num_special_expl_blocks
void ai_turn_towards_vector(vec3d *dest, object *objp, float frametime, float turn_time, vec3d *slide_vec, vec3d *rel_pos, float bank_override, int flags, vec3d *rvec=NULL, int sexp_flags=0)
int eval_number_of(int arg_handler_node, int condition_node)
#define OP_NAV_ADD_WAYPOINT
bool shader_effect_active
#define CHANGE_SUBCATEGORY_NAV
void sexpLockConfigColor(bool lock)
bool True_loop_argument_sexps
#define OP_IS_PRIMARY_SELECTED
int timestamp_has_time_elapsed(int stamp, int time)
#define MAX_SHIP_FLAG_NAMES
int sexp_time_ship_departed(int n)
#define OP_IS_SHIP_STEALTHY
#define OP_SET_SKYBOX_ORIENT
void multi_sexp_close_sound_from_file()
#define SEXP_CHECK_INVALID_HUD_GAUGE
#define MLF_FIRST_REPEAT_ONLY
#define OP_SHIP_LAT_MANEUVER
#define SEXP_NODE_TYPE(n)
bool multi_get_ship(int &value)
#define SEXP_CHECK_INVALID_SOUNDTRACK_NAME
int sexp_get_primary_ammo(int node)
#define MULTIPLAYER_MASTER
#define SEXP_VARIABLE_CHAR
int verify_sexp_tree(int node)
int sexp_query_type_match(int opf, int opr)
void message_send_unique_to_player(char *id, void *data, int m_source, int priority, int group, int delay)
An overhauled/updated debug console to allow monitoring, testing, and general debugging of new featur...
void ai_add_wing_goal_sexp(int sexp, int type, int wingnum)
void multi_sexp_set_jumpnode_model()
char * Ship_class_names[MAX_SHIP_CLASSES]
#define SEXP_CHECK_INVALID_LEVEL
int sexp_determine_team(char *subj)
SCP_vector< ship_info > Ship_info
dc_printf("SEXP '%s' run, sexp_val = %d\n", sexp_always.c_str(), sexp_val)
#define OP_NUM_VALID_ARGUMENTS
#define OF_FLAK_PROTECTED
void sexp_hud_display_gauge(int n)
float Master_event_music_volume
float ship_max_shield_strength
#define SIF_KNOSSOS_DEVICE
#define OP_STRING_SET_SUBSTRING
#define OP_REMOVE_FROM_COLGROUP
#define SEXP_CHECK_INVALID_IFF
int cmp_sexp_chains(int node1, int node2)
#define OP_TECH_ADD_INTEL
#define EO_DEATH_ROLL_TIME
int MessageBox(HWND h, const char *s1, const char *s2, int i)
#define SF2_AFTERBURNER_LOCKED
const char * Skill_level_names(int skill_level, int translate=1)
void sexp_tech_add_ship(int node)
#define OP_IS_SUBSYSTEM_DESTROYED_DELAY
#define OP_AI_STAY_NEAR_SHIP
int get_operator_const(const char *token)
char * sexp_error_message(int num)
int model_anim_match_type(char *p)
#define OP_JUMP_NODE_HIDE_JUMPNODE
#define OP_SET_OBJECT_SPEED_Y
#define OP_STRING_CONCATENATE
void sexp_set_persona(int node)
#define SNF_DEFAULT_VALUE
float VIEWER_ZOOM_DEFAULT
#define OP_CUTSCENES_RESET_FOV
SCP_vector< DamageTypeStruct > Damage_types
SCP_vector< float > shield_quadrant
void set_nav_visited(int node)
int sexp_distance3(object *objp1, object *objp2)
#define OF_SHOULD_BE_DEAD
SCP_vector< exited_ship > Ships_exited
vec3d * get_subsystem_world_pos(object *parent_obj, ship_subsys *subsys, vec3d *world_pos)
int sexp_event_delay_status(int n, int want_true, bool use_msecs=false)
#define OPF_ARRIVAL_ANCHOR_ALL
#define CHANGE_SUBCATEGORY_COORDINATE_MANIPULATION
int ship_get_default_orders_accepted(ship_info *sip)
void set_turret_secondary_ammo(ship_subsys *turret, int requested_bank, int requested_ammo, bool update)
#define OP_WAS_DESTROYED_BY_DELAY
void multi_send_int(int value)
int get_index_sexp_variable_from_node(int node)
void set_nav_carry_status(int node)
void audiostream_play(int i, float volume, int looping)
#define MISSION_FLAG_NO_BUILTIN_COMMAND
void error_display(int error_level, char *format,...)
int ship_is_visible_by_team(object *target, ship *viewer)
#define OP_NUM_WITHIN_BOX
int process_special_sexps(int index)
void ignore_white_space()
#define SIF2_MODEL_POINT_SHIELDS
void sexp_shields_off(int n, bool shields_off)
#define CHANGE_SUBCATEGORY_SHIP_STATUS
GLsizei GLsizei GLuint * obj
bool EvalString(const char *string, const char *format=NULL, void *rtn=NULL, const char *debug_str=NULL)
#define OP_TURRET_TAGGED_CLEAR_ALL
int sexp_is_ai_class(int n)
void sexp_deal_with_primary_lock(int node, bool lock)
#define OP_SHIP_TURRET_TARGET_ORDER
#define OP_PRIMARY_AMMO_PCT
#define SEXP_CHECK_INVALID_SHIP_FLAG
#define SEXP_CHECK_INVALID_TURRET_TARGET_ORDER
#define OPF_DEPARTURE_LOCATION
object * multi_get_network_object(ushort net_signature)
void mission_campaign_save_persistent(int type, int sindex)
void change_ship_type(int n, int ship_type, int by_sexp)
float vm_vec_dot(const vec3d *v0, const vec3d *v1)
void multi_sexp_set_jumpnode_color()
#define OPF_SOUND_ENVIRONMENT
debriefing Debriefings[MAX_TVT_TEAMS]
GLenum GLuint GLenum GLsizei length
void SetAlphaColor(int r, int g, int b, int alpha)
void shield_set_strength(object *objp, float strength)
void get_unformatted_sexp_variable_name(char *unformatted, char *formatted_pre)
#define SEXP_CHECK_INVALID_DAMAGE_TYPE
void asteroid_hit(object *pasteroid_obj, object *other_obj, vec3d *hitpos, float damage)
#define OP_SET_EXPLOSION_OPTION
int Num_sexp_ai_goal_links
player * get_player_from_ship_node(int node, bool test_respawns=false)
void add_nav_ship(int node)
#define OP_SHIP_SUBSYS_VANISHED
int sexp_calculate_angle(matrix *orient, int axis)
void sexp_set_post_effect(int node)
GLsizei GLsizei GLchar * source
#define OP_WEAPON_ENERGY_LEFT
int sexp_special_training_check(int node)
int sexp_return_player_data(int node, int type)
int sexp_time_wing_destroyed(int n)
#define OP_SUPERNOVA_START
p_object Ship_arrival_list
#define OP_SET_OBJECT_ORIENTATION
void sexp_destroy_subsys_instantly(int n)
#define OSWPT_TYPE_SHIP_ON_TEAM
#define OP_CUTSCENES_SHOW_SUBTITLE_IMAGE
int sexp_are_ship_flags_set(int node)
#define OP_NAV_SET_VISITED
void sexp_nebula_change_pattern(int n)
int find_parent_operator(int node)
#define SEXP_VARIABLE_NUMBER
void sexp_turret_free(int node)
void ship_self_destruct(object *objp)
int sexp_is_primary_selected(int node)
#define OP_CUTSCENES_SET_CAMERA_HOST
void sexp_ship_vanish(int n)
void sexp_nebula_toggle_poof(int n)
int sexp_was_medal_granted(int n)
void _cdecl void void _cdecl void _cdecl void _cdecl void _cdecl ReleaseWarning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
void sexp_good_time_to_rearm(int n)
#define STATUS_SUBCATEGORY_OTHER
void sexp_hud_set_frame(int n)
GLuint GLdouble GLdouble GLint GLint order
void sexp_reset_time_compression()
#define SF_CARGO_REVEALED
void sexp_set_camera_host(int node)
void sexp_add_ship_goal(int n)
#define MAX_ARRIVAL_NAMES
#define OP_REMOVE_BACKGROUND_BITMAP
#define OP_GET_OBJECT_BANK
void multi_sexp_set_respawns()
#define P_SF_NO_ARRIVAL_WARP
char variable_name[TOKEN_LENGTH]
void multi_sexp_set_camera_fov()
#define SEXP_SHIELD_STRING
#define SEXP_CHECK_INVALID_MSG_SOURCE
int audiostream_open(const char *filename, int type)
#define OP_SET_OBJECT_SPEED_Z
#define OP_SET_TRAINING_CONTEXT_SPEED
#define SEXP_CHECK_INVALID_NUM
void send_change_iff_color_packet(ushort net_signature, int observer_team, int observed_team, int alternate_iff_color)
int ship_index[MAX_SHIPS_PER_WING]
#define OP_SCRAMBLE_MESSAGES
#define OP_HUD_SET_CUSTOM_GAUGE_ACTIVE
#define P_SF_NO_DEPARTURE_WARP
void multi_sexp_show_subtitle_text()
#define OP_AI_DISARM_SHIP
#define OP_CARGO_KNOWN_DELAY
void alter_flag_for_all_ships(bool future_ships, int object_flag, int object_flag2, int ship_flag, int ship_flag2, int parse_obj_flag, int parse_obj_flag2, int ai_flag, int ai_flag2, bool set_flag)
void multi_sexp_set_countermeasures()
#define SPECIAL_CHECK_TRAINING_FAILURE
void sexp_kamikaze(int n, int kamikaze)
void gr_create_shader(shader *shade, ubyte r, ubyte g, ubyte b, ubyte c)
#define OP_JUMP_NODE_SHOW_JUMPNODE
void multi_sexp_set_ambient_light()
void sexp_hud_set_directive(int n)
void multi_sexp_set_turret_secondary_ammo()
int primary_bank_rearm_time[MAX_SHIP_PRIMARY_BANKS]
int ship_get_subsys_index(ship *sp, char *ss_name, int error_bypass)
void sexp_load_music(char *fname, int type=-1)
cmdline_parm env("-noenv", NULL, AT_NONE)
void toggle_cutscene_bars(float delta_speed, int set)
void sexp_add_background_bitmap(int n)
void multi_send_bool(bool value)
SCP_map< SCP_string, team_color > Team_Colors
SCP_vector< SCP_string > Builtin_moods
void sexp_turret_tagged_clear_all(int node)
float fvi_ray_plane(vec3d *new_pnt, const vec3d *plane_pnt, const vec3d *plane_norm, const vec3d *ray_origin, const vec3d *ray_direction, float rad)
int is_white_space(char ch)
#define MLF_LAST_REPEAT_ONLY
float hud_find_target_distance(object *targetee, object *targeter)
#define LOG_WAYPOINTS_DONE
int sexp_is_in_box(int n)
char * Adjust_audio_options[]
int primary_bank_start_ammo[MAX_SHIP_PRIMARY_BANKS]
#define OP_PREVIOUS_EVENT_INCOMPLETE
subsys_status * Subsys_status
void eval_when_do_all_exp(int all_actions, int when_op_num)
int shield_armor_type_idx
void restrict_nav(int node)
int Num_adjust_audio_options
#define OP_GET_OBJECT_PITCH
int ship_name_lookup(const char *name, int inc_players)
void lcl_ext_localize(const char *in, char *out, size_t max_len, int *id)
void multi_sexp_set_camera_target()
#define OP_SPECIAL_WARP_DISTANCE
int audio_volume_option_lookup(char *text)
void ship_do_cap_subsys_cargo_hidden(ship *shipp, ship_subsys *subsys, int from_network)
bool multi_get_ushort(ushort &value)
#define FIREBALL_EXPLOSION_MEDIUM
void audiostream_pause(int i, bool via_sexp_or_script)
#define OP_DISABLE_BUILTIN_MESSAGES
void sexp_turret_protect_ships(int n, bool flag)
char filename[MAX_FILENAME_LEN]
#define OS_SUBSYS_ROTATION
#define MLF_LAST_TRIGGER_ONLY
#define CHANGE_SUBCATEGORY_BEAMS_AND_TURRETS
obj_flag_name Object_flag_names[]
int Multi_team_score[MAX_TVT_TEAMS]
int get_nth_variable_index(int nth, int variable_type)
#define CHANGE_SUBCATEGORY_SUBSYSTEMS
void sexp_beam_free_all(int node)
int ship_find_exited_ship_by_signature(int signature)
#define SEXP_CHECK_INVALID_VARIABLE
void sexp_set_player_orders(int n)
int eval_every_of(int arg_handler_node, int condition_node)
void preload_turret_change_weapon(char *text)
#define OP_GOOD_REARM_TIME
void ship_apply_tag(int ship_num, int tag_level, float tag_time, object *target, vec3d *start, int ssm_index, int ssm_team)
#define FIREBALL_WARP_EFFECT
bool Nav_Set_Hidden(char *Nav)
#define AI_GOAL_DESTROY_SUBSYSTEM
int shield_quad_near_max(int quadnum)
#define OP_HUD_GAUGE_SET_ACTIVE
#define SF2_NAVPOINT_NEEDSLINK
int sexp_get_turret_secondary_ammo(int node)
#define MESSAGE_SOURCE_SPECIAL
int sexp_hits_left_subsystem_generic(int node)
void sexp_turret_set_target_order(int node)
void sexp_set_camera_position(int n)
bool DelNavPoint(char *Nav)
int sexp_has_time_elapsed(int n)
#define SEXP_CHECK_INVALID_SSM_CLASS
#define OPF_NEBULA_STORM_TYPE
GLclampf GLclampf GLclampf alpha
#define OP_WAYPOINTS_DONE_DELAY
void snd_adjust_audio_volume(int type, float percent, int time)
#define OP_HUD_SET_COORDS
#define OP_EVENT_FALSE_DELAY
#define OP_SET_SECONDARY_AMMO
#define OPR_FLEXIBLE_ARGUMENT
int sexp_goal_delay_status(int n, int want_true)
void sexp_string_concatenate(int n)
int sexp_secondaries_depleted(int node)
#define OP_CHANGE_AI_CLASS
void sexp_activate_deactivate_glow_maps(int n, int activate)
#define OP_SET_OBJECT_FACING
#define OP_EVENT_TRUE_DELAY
#define OP_ROTATING_SUBSYS_SET_TURN_TIME
void sexp_set_ship_maneuver(int n, int op_num)
#define OP_HUD_ACTIVATE_GAUGE_TYPE
#define OP_BEAM_PROTECT_SHIP
#define MESSAGE_SOURCE_COMMAND
support_ship_info support_ships
void sexp_set_scanned_unscanned(int n, int flag)
#define SRC_SHIP_DEPARTURE
shockwave_create_info shockwave
#define OP_REMOVE_WEAPONS
#define OP_WARP_NOT_BROKEN
void sexp_disable_ets(int n, bool disable)
#define OP_FRIENDLY_STEALTH_INVISIBLE
#define OP_CLEAR_WING_GOALS
void sexp_turret_set_target_priorities(int node)
void get_cap_subsys_cargo_flags(int shipnum, char *subsys_name, int *known, fix *time_revealed)
void preload_change_ship_class(char *text)
int sexp_is_friendly_stealth_visible(int n)
#define CHANGE_SUBCATEGORY_VARIABLES
int multi_find_player_by_object(object *objp)
void multi_sexp_set_object_speed()
#define MISSION_FLAG_NO_TRAITOR
#define CAMPAIGN_PERSISTENT_WEAPON
int sexp_previous_goal_status(int n, int status)
void obj_collide_retime_cached_pairs(int checkdly)
int sexp_primaries_depleted(int node)
#define OP_WEAPON_RECHARGE_PCT
#define SF2_SECONDARIES_LOCKED
void sexp_set_death_message(int n)
void sexp_change_team_color(int n)
void sexp_start_music(int loop)
void sexp_set_camera_target(int node)
void updateCustomGaugeText(const char *txt)
#define STATUS_SUBCATEGORY_VARIABLES
#define OP_PREVIOUS_GOAL_TRUE
void sexp_repair_subsystem(int n)
void add_data_dup(char *str)
SCP_vector< asteroid_info > Asteroid_info
net_player Net_players[MAX_PLAYERS]
void sexp_hud_set_text(int n)
float max_shield_recharge
#define OP_ADD_REMOVE_ESCORT
#define OP_CUTSCENES_SHOW_SUBTITLE_TEXT
#define stars_get_num_suns()
void sexp_beam_lock_all(int node)
#define OP_STRING_GET_SUBSTRING
void sexp_set_oswpt_maneuver(object_ship_wing_point_team *oswpt, int duration, int heading, int pitch, int bank, bool apply_all_rotate, int up, int sideways, int forward, bool apply_all_lat)
int timer_get_milliseconds()
SCP_vector< ai_target_priority > Ai_tp_list
#define OP_CLEAR_SUBTITLES
void gameseq_post_event(int event)
void sexp_warp_effect(int n)
int sexp_has_weapon(int node, int op_num)
#define OP_WAYPOINTS_DONE
int multi_sexp_get_next_operator()
int sexp_num_type_kills(int node)
int shield_recharge_index
#define OP_DAMAGED_ESCORT_LIST
int sexp_get_object_speed(object *objp, int axis, int subjective)
#define OP_KEY_RESET_MULTIPLE
#define OP_NAV_UNSET_CARRY
void sexp_turret_tagged_specific(int node)
#define OP_GET_OBJECT_SPEED_Z
#define OP_UNLOCK_PRIMARY_WEAPON
#define OP_SCRIPT_EVAL_STRING
angles * vm_extract_angles_matrix_alternate(angles *a, const matrix *m)
int sexp_has_docked_or_undocked(int n, int op_num)
void sexp_damage_escort_list_all(int n)
matrix vmd_identity_matrix
#define SEXP_CHECK_INVALID_SOUND_ENVIRONMENT
void sexp_clear_subtitles()
int Mission_alt_type_count
#define P_SF2_DONT_COLLIDE_INVIS
void sexp_ship_tag(int n, int tag)
int is_nav_linked(int node)
void sexp_beam_protect_ships(int n, bool flag)
#define AI_GOAL_FORM_ON_WING
#define OP_PAUSE_SOUND_FROM_FILE
#define OPF_SHIP_NOT_PLAYER
#define OP_CUTSCENES_SET_CAMERA_TARGET
bool is_blank_of_op(int op_const)
#define OP_CALL_SSM_STRIKE
#define OP_ADD_SUN_BITMAP
#define OP_CUTSCENES_SET_CAMERA_FACING
void sexp_ship_change_alt_name(int node)
#define SEXP_ALL_ENGINES_STRING
void sexp_change_player_score(int node)
#define LOG_SHIP_DISARMED
void sexp_hud_disable(int n)
int eval_for_counter(int arg_handler_node, int condition_node)
int sexp_event_incomplete(int n)
char ship_name[NAME_LENGTH]
#define SEXP_CHECK_INVALID_FONT
int sexp_time_wing_departed(int n)
int special_exp_shockwave_speed
#define CHANGE_SUBCATEGORY_CUTSCENES
SCP_vector< char * > Sexp_replacement_arguments
SCP_vector< int > Current_sexp_operator
void sexp_set_camera(int node)
#define OP_INVALIDATE_ALL_ARGUMENTS
#define STATUS_SUBCATEGORY_SHIP_STATUS
#define OPF_SUBSYS_OR_GENERIC
#define OP_ACTIVATE_GLOW_POINT_BANK
void set_rotation_facing(vec3d *in_target, float in_rotation_time=0.0f, float in_rotation_acceleration_time=0.0f, float in_rotation_deceleration_time=0.0f)
#define FBF_WARP_VIA_SEXP
#define OP_SHIP_NO_VAPORIZE
#define OP_EVENT_INCOMPLETE
#define OP_STRING_GREATER_THAN
void sexp_parse_ship_kamikaze(p_object *parse_obj, int kdamage)
#define OP_IS_SHIP_VISIBLE
#define OP_LOCK_AFTERBURNER
int sexp_engine_recharge_pct(int node)
#define OP_SET_PRIMARY_AMMO
#define OP_HUD_DISPLAY_GAUGE
#define OP_HAS_DOCKED_DELAY
void multi_sexp_set_camera_rotation()
#define SEXP_VARIABLE_STRING
#define SEXP_CHECK_INVALID_WEAPON_NAME
void nebl_set_storm(char *name)
int sexp_waypoint_missed()
#define OP_SHIP_NO_GUARDIAN
cmission missions[MAX_CAMPAIGN_MISSIONS]
int sexp_string_get_length(int node)
void multi_sexp_deal_with_ship_flag()
#define LOG_SELF_DESTRUCTED
void sexp_set_cargo(int n)
int sexp_has_arrived_delay(int n)
#define MAX_SEXP_VARIABLES
int debris_damage_type_idx
int stars_add_sun_entry(starfield_list_entry *sun_ptr)
#define MISSION_FLAG_SUBSPACE
void sexp_set_player_throttle_speed(int node)
#define SW_FLAG_BEAM_FREE
void sexp_reverse_rotating_subsystem(int node)
#define SSF_NO_SS_TARGETING
void sexp_remove_weapons(int node)
int current_target_is_locked
#define OPF_SHIP_WING_POINT_OR_NONE
int sexp_get_throttle_speed(int node)
#define OP_CUTSCENES_SET_CAMERA_ROTATION
int sexp_time_wing_arrived(int n)
#define SEXP_VARIABLE_MODIFIED
#define STATUS_SUBCATEGORY_PLAYER
void convert_sexp_to_string(SCP_string &dest, int cur_node, int mode)
void initalise_sexp_packet()
#define OP_GET_VARIABLE_BY_INDEX
ai_goal ai_goals[MAX_AI_GOALS]
#define OP_AWACS_SET_RADIUS
float vm_vec_normalize(vec3d *v)
int fireball_create(vec3d *pos, int fireball_type, int render_type, int parent_obj, float size, int reverse, vec3d *velocity, float warp_lifetime, int ship_class, matrix *orient_override, int low_res, int extra_flags, int warp_open_sound, int warp_close_sound)
#define OF_BEAM_PROTECTED
int sexp_get_object_coordinate(int n, int axis)
#define OP_PRIMARIES_DEPLETED
#define SEXP_VARIABLE_UNKNOWN
void multi_sexp_clear_subtitles()
#define OP_TURRET_TAGGED_CLEAR_SPECIFIC
void ship_subsystem_set_new_ai_class(int ship_num, char *subsystem, int new_ai_class)
void sexp_deal_with_warp(int n, bool repairable, bool damage_it)
#define SEXP_VARIABLE_PLAYER_PERSISTENT
#define OP_SET_TRAINING_CONTEXT_FLY_PATH
#define OP_PERCENT_SHIPS_ARRIVED
bool multi_get_object(object *&objp)
#define OP_JUMP_NODE_SET_JUMPNODE_NAME
#define OP_GET_PRIMARY_AMMO
int sexp_hits_left_subsystem_specific(int node)
#define SEXP_CHECK_INVALID_AUDIO_VOLUME_OPTION
void sexp_cap_waypoint_speed(int n)
int signum_sexp(int node)
int sexp_is_disabled_delay(int n)
int sexp_sim_hits_left(int n)
#define WEAPON_RESERVE_THRESHOLD
#define SEXP_CHECK_TYPE_MISMATCH
void sexp_beam_fire(int node, bool at_coords)
#define OP_NEBULA_CHANGE_PATTERN
void sexp_change_ai_class(int n)
#define OP_GOAL_FALSE_DELAY
#define OP_SHIP_INVISIBLE
char * Arrival_location_names[MAX_ARRIVAL_NAMES]
#define OP_CUTSCENES_GET_FOV
#define SEXP_ARGUMENT_STRING