Character Generator #141

Parent #118Owner #36Flags Source RPG Core/rpgcore-patched.db

Aliases: Character Generator, cg

15 verbs · 74 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
descriptionthis none thisrxd#14136
set_statsthis none thisrxd#14111
factsnone none nonerd#14126
rollnone none nonerd#1416
clearnone none nonerd#14116
racenone none nonerd#1411
orgnone none nonerd#1415
pick_racethis none thisrxd#14165
setany at/to anyrxd#14128
limit_checkthis none thisrxd#14152
pick_orgthis none thisrxd#14157
o*ut exit leave goany none nonerd#14114
help_msgthis none thisrxd#1415
init_for_corethis none thisrxd#14131
merge_lang_liststhis none thisrxd#14115

Properties

PropertyDefinerFlagsOwnerValue
build_help_random#141rc#36
list of 35{"===================== random chargen =====================", " Organization-Specific Random Character Generator", "==========================================================", "The order of the 4 basic statistics are always:", "{\"Strength\", \"Dexterity\", \"Intelligence\", \"Health\"}", "in the .stats and .stats_current player properties.", "Look at $rp_regulator:random_stat for a clearer", "understanding of the .stat_keys property. This room", "holds information about the organization in the", "'org_facts' property. Racial info should be written", "to race-name properties on $rpg_help.", "", "EXAMPLE: @prop $rpg_help.humans {\"Humans are the standard race upon which game statistics are based. There are usually greater opportunities for members of the human race, despite their lack of initial bonuses.\"} rc #36", "", "This is how each race is set up:", "{\"race name\", {strength alteration, dexterity alteration, intelligence alteration, health alteration}, {language info}, gender restrictions}", "", "", "*** Sample Set-up: Org requires minimum 9.0 IQ and allows humans, gnomes", " Gnomes have -1.5 & +1.5 adjustments to strength & dexterity, respectively.", " #875 is the $default_lang of the MOO, #1098 is \"Gnomish\".", " Humans members of this org are partially familiar with Gnomish, and must", " be male or female. Gnomes are fluent in Gnomish, and can be any gender.", "@set here.stat_keys to {2, 2, 1, 2}", "@set here.races_random to {{\"human\",{0.0, 0.0, 0.0, 0.0}, {{#875, #1098}, {2.0, 0.7}}, 3}, {\"gnome\",{-1.5, 1.5, 0.0, 0.0}, {{#875, #1098}, {2.0, 2.0}}, 0}}", "@set here.org to \"org name\"", "@set here.stat_keys to {2, 1, 2, 2}", "@edit here.org_facts", "", "A language rating of 2.0+ means a player can speak the language. Less means partial understanding.", "", "Gender restrictions: 0=ANY 1=MALE 2=FEMALE 3=MALE/FEMALE", "", "Type \"? $rp_regulator:random_stat\" for info on setting up the .stat_keys", ""}
build_help_choice#141rc#36
list of 25{"===================== choice chargen =====================", " Player Choice Character Generator", "==========================================================", " This character generator allows a single room to generate characters", "for all players. This room uses a verb called 'set' that allows players", "to spend 'free points' to build their characters.", " Help topics for all orgs and races should be written to $rpg_help.", "EXAMPLE: @prop $rpg_help.thieves {\"*forward*\", \"thief\"} rc", " @prop $rpg_help.thief {\"Information about\", \"thieves & such.\"} rc", " Dig the room, @chparent <room> to $chargen, @set <room>.type to \"choice\",", "then @prop $local.chargen <#room>", " MAKE SURE THE ONLY EXIT IS NAMED 'Out' WITH ALIASES 'o', 'exit', 'leave'.", "", " The \".orgs\" property is structured as {org1, org2, org3, etc.}, with", "each org a list, structured as follows:", " {\"org name\", {\"allowable race 1\", \"allowable race 2\"}, {strength minimum, dexterity minimum, intelligence minimum, health minimum}, {{#languages}, {language ratings}}, gender restriction}", "", " The \".races_choice\" property is structured as {race1, race2, etc.}, with", "each race a list, structured as follows:", " {\"race name\", {{str min, str max}, {dex min, dex max}, {int min, int max}, {hea min, hea max}}, {{#languages}, {language ratings}}, gender restriction}", "", "A language rating of 2.0+ means a player can speak the language. Less means partial understanding.", "", "Gender restrictions: 0=ANY 1=MALE 2=FEMALE 3=MALE/FEMALE", ""}
type#141rc#36"random"
org#141rc#36""
stat_keys#141rc#36{2, 2, 2, 2}
races_random#141rc#36{{"human", {0.0, 0.0, 0.0, 0.0}, {{#142}, {2.0}}, 3}, {"gnome", {-1.5, 1.5, 0.0, 0.0}, {{#142}, {2.0}}, 3}}
org_facts#141rc#36{"Average citizens have no distinct advantages in acquiring skills, but suffer no penalties, either."}
races_choice#141rc#36{{"human", {{1.0, 18.0}, {1.0, 18.0}, {1.0, 18.0}, {1.0, 18.0}}, {{#271}, {2.0}}, 3}, {"brute", {{7.0, 20.0}, {2.0, 18.0}, {1.0, 9.0}, {7.0, 19.0}}, {{#271}, {2.0}}, 0}}
orgs#141rc#36
list of 2{{"Clerical Order", {"human"}, {2.0, 2.0, 9.0, 1.5}, {{#142}, {2.0}}, 1}, {"Thieves' Guild", {"human", "brute"}, {5.0, 8.5, 6.0, 2.5}, {{#142}, {2.0}}, 0}}
instructions_random#141rc#36
list of 4{" Type \"facts\" for more information.", " Type \"race\" to choose a race. (before 'roll')", " Type \"roll\" to regenerate stats. (after 'race')", " Type \"clear\" to reset to defaults."}
instructions_choice#141rc#36
list of 4{"Type: \"set <stat> to <level>\" to set your statistics.", " \"race\" to choose a race.", " \"org\" to choose an organization.", " \"clear\" to reset to defaults."}
clear_all_skills#141rc#361
virtual_exit_task#118r#2<clear>
defaulting_exit_oleave_msg#118rc#36<clear>
blessed_entrances#118rc#36<clear>
virtual_exits#118rc#36{}
give_short_alias#118rc#36<clear>
virtual_exit_to_use#118r#2<clear>
lit_from_outside#118rc#36<clear>
bot_locked#104rc#36<clear>
fakes#104r#36<clear>
retail#104rc#360
seat#104r#36<clear>
pool#104r#36<clear>
seat_desc#104r#36<clear>
pool_desc#104r#36<clear>
sit_phrase#104rc#36<clear>
stand_phrase#104rc#36<clear>
swim_phrase#104rc#36<clear>
dry_phrase#104rc#36<clear>
push_phrase#104rc#36<clear>
seat_aliai#104r#36<clear>
pool_aliai#104r#36<clear>
seat_contents#104r#36<clear>
pool_contents#104r#36<clear>
seat_max#104r#36<clear>
pool_max#104r#36<clear>
details#104rc#36<clear>
temp_detail_index#104rc#36<clear>
temp_detail_desc#104rc#36<clear>
outdoors#104r#36<clear>
attack_queue#104r#2<clear>
battle_on#104r#2<clear>
stop_msg#104rc#36<clear>
remove_msg#104rc#36<clear>
dump_msg#104rc#36<clear>
dump_loc#104rc#36<clear>
sanctuary#104rc#36<clear>
ansi_title#104r#36<clear>
dark_desc#104rc#36<clear>
title_style#104rc#36<clear>
build_help#104rc#36
list of 31{" Do not use the $chargen object as the active character generator. @Create, @dig/@vdig a new room, and @chparent to $chargen.", "", " There are two kinds of character generators: \"random\" & \"choice\". Random generators require a room for each player org. If you @set room.type to \"choice\", you must also create a \"chargen\" property on $local that contains that room #.", "", "The $chargen.clear_all_skills property will make the following verbs:", " org", " race", " clear", "clear the following player properties:", " skills", " languages", " speaking", " short_desc_msg", " remembered_names", " money", "if the <room>.clear_all_skills property is turned on.", "", " Alter $rp_regulator:boost_mod() to make allowances for person.race or person.org. Here's an example of how to make it more expensive for gnomes to @boost combat skill, by inserting 3 lines of code between lines 9 & 10:", "", " 8: m = c > 4.0 ? 2.0 | 1.5;", " 9: endif", " if (args[2].race == \"gnome\" && args[1] == \"combat\")", " m = m + 0.75;", " endif", "10: return m;", "", " Increasing the value of 'm' in the verb increases the free point cost of boosting a stat or skill.", "", " To reset the new character generator to default settings, a wizard must enter ;<#room>:init_for_core()", "", " If you want to add a customized finish to character generation, create a callable verb on your chargen (not the original $chargen!) called \"special\". It should take no arguments, relying on \"player\" properties for its variables."}
battle_task#104r#2<clear>
dig_level#104rc#36<clear>
holes#104r#2<clear>
help_msg#104rc#36<clear>
who_location_msg#3rc#36<clear>
free_home#3rc#36<clear>
victim_ejection_msg#3rc#36<clear>
ejection_msg#3rc#36<clear>
oejection_msg#3rc#36<clear>
residents#3rc#36<clear>
free_entry#3rc#36<clear>
entrances#3c#36<clear>
blessed_object#3rc#36<clear>
blessed_task#3rc#36<clear>
exits#3c#36<clear>
dark#3rc#36<clear>
ctype#3rc#36<clear>
key#1c#360
aliases#1rc#36{"Character Generator", "cg"}
description#1rc#36<clear>
object_size#1r#36{28882, -1090650497}
html#1rc#36<clear>

Ancestry

Ancestors (nearest first): #118 virtual exit room#104 RPG room#3 generic room#1 Root Class

Children: none

Call graph

calls n141_0 #141:description n1_9 #1:description n141_0->n1_9 n20_71 #20:redirect_ansi n141_0->n20_71 n20_4 #20:columnize n141_0->n20_4 n6_13 #6:linelen n141_0->n6_13 n141_1 #141:set_stats n55_16 #55:slice n141_1->n55_16 n98_14 #98:random_stat n141_1->n98_14 n141_2 #141:facts n6_79 #6:tell_lines n141_2->n6_79 n20_15 #20:capitalize n141_2->n20_15 n20_61 #20:a_or_an n141_2->n20_61 n6_18 #6:tell n141_2->n6_18 n20_6 #20:english_list n141_2->n20_6 n141_3 #141:roll n141_3->n141_0 n141_3->n141_1 n141_3->n6_79 n141_3->n6_18 n141_4 #141:clear n141_4->n141_0 n141_4->n6_79 n141_5 #141:race n141_7 #141:pick_race n141_5->n141_7 n141_7->n20_4 n141_7->n55_16 n141_7->n6_79 n141_7->n6_18 n56_4 #56:yes_or_no n141_7->n56_4 n56_2 #56:read n141_7->n56_2 n141_14 #141:merge_lang_lists n141_7->n141_14 n141_9 #141:limit_check n141_7->n141_9 n141_6 #141:org n141_6->n6_79 n141_10 #141:pick_org n141_6->n141_10 n141_10->n20_4 n141_10->n55_16 n141_10->n6_79 n141_10->n6_18 n141_10->n56_4 n141_10->n56_2 n141_10->n141_14 n141_10->n141_9 n141_9->n55_16 n141_8 #141:set n141_8->n6_79 n141_8->n6_18 n141_8->n141_9 n141_11 #141:o*ut n141_11->n6_79 n141_11->n6_18 n141_11->n141_9 n118_7 #118:here_huh n141_11->n118_7 n141_12 #141:help_msg n104_46 #104:help_msg n141_12->n104_46 n141_13 #141:init_for_core n118_19 #118:init_for_core n141_13->n118_19

Source

description

Spec this none thisFlags rxdOwner #36Definer #141

Referenced by

Source

1desc = (typeof(d = pass(@args)) == LIST) ? d | {d};
2if (this.type == "random")
3bar = $string_utils:space(24, "=");
4stats = {};
5for line in [1..4]
6space = ((st = player.stats[2][line]) < 10.0) ? " " | "";
7stat = $string_utils:columnize({tostr("| ", player.stats[1][line]), (space + floatstr(st, 2)) + " |"}, 2, 33)[1];
8stats = {@stats, stat + this.instructions_random[line]};
9endfor
10desc = this.clear_all_skills ? {bar, "WARNING: \"Race\", \"roll\" & \"clear\" will clear all skills.", @desc} | desc;
11return {bar, @stats, bar, @desc};
12elseif (this.type == "choice")
13bar = $string_utils:space(player:linelen() - 13, "_");
14st = tostr(floatstr(player.stats_current[2][1], 2), "/", floatstr(player.stats[2][1], 2));
15spacer = $string_utils:space((player:linelen() / 2) - (19 + length(st)), " ");
16st = tostr("STRENGTH", spacer, st);
17DX = tostr(floatstr(player.stats_current[2][2], 2), "/", floatstr(player.stats[2][2], 2));
18spacer = $string_utils:space((player:linelen() / 2) - (20 + length(DX)), " ");
19DX = tostr("DEXTERITY", spacer, DX);
20IQ = tostr(floatstr(player.stats_current[2][3], 2), "/", floatstr(player.stats[2][3], 2));
21spacer = $string_utils:space((player:linelen() / 2) - (23 + length(IQ)), " ");
22IQ = tostr("INTELLIGENCE", spacer, IQ);
23HT = tostr(floatstr(player.stats_current[2][4], 2), "/", floatstr(player.stats[2][4], 2));
24spacer = $string_utils:space((player:linelen() / 2) - (17 + length(HT)), " ");
25HT = tostr("HEALTH", spacer, HT);
26spacer = $string_utils:space((player:linelen() / 2) - 20, ".");
27info = tostr(spacer, "CUR/MAX");
28header = $string_utils:columnize({info, info}, 2, player:linelen() - 4);
29stats = $string_utils:columnize({st, DX, IQ, HT}, 2, player:linelen() - 4);
30stathead = tostr("STATISTICS", $string_utils:space(player:linelen() - 23, "_"));
31persnl = $string_utils:columnize({player.gender, player.race, player.org, "free: " + floatstr(player.free_points, 2)}, 4, player:linelen() - 6);
32desc = this.clear_all_skills ? {bar, "WARNING: \"Race\", \"org\" & \"clear\" will clear all skills.", @desc} | desc;
33return {stathead, @header, @stats, bar, @persnl, bar, @this.instructions_choice, @desc};
34else
35return {"Here.type must be either \"random\" or \"choice\""};
36endif

set_stats

Spec this none thisFlags rxdOwner #36Definer #141

Referenced by

Source

1"for random chargens";
2who = args[1];
3r = who.race in $list_utils:slice(this.races_random);
4boost = (!r) ? {0.0, 0.0, 0.0, 0.0} | this.races_random[r][2];
5who.stats[2][1] = $rp_regulator:random_stat(this.stat_keys[1]) + boost[1];
6who.stats[2][2] = $rp_regulator:random_stat(this.stat_keys[2]) + boost[2];
7who.stats[2][3] = $rp_regulator:random_stat(this.stat_keys[3]) + boost[3];
8who.stats[2][4] = $rp_regulator:random_stat(this.stat_keys[4]) + boost[4];
9who.stats_current = who.stats;
10who.org = this.org;
11this.clear_all_skills && clear_property(who, "skills");

facts

Spec none none noneFlags rdOwner #36Definer #141

Referenced by

none

Source

1"for random chargens";
2"automatically handles race penalties/bonuses report";
3if (this.type != "random")
4return player:tell_lines(this.instructions_choice);
5endif
6player:tell_lines(this.org_facts);
7for r in (this.races_random)
8racestring = ((("  " + $string_utils:capitalize($string_utils:a_or_an(r[1]))) + " ") + r[1]) + " has";
9stats = {" to strength,", " to dexterity,", " to intelligence,", " to health,"};
10bonustring = "";
11for s in [1..4]
12if (r[2][s] > 0.0)
13bonustring = ((((bonustring + " a +") + floatstr(r[2][s], 2)) + " bonus") + stats[s]) + ",";
14elseif (r[2][s] < 0.0)
15bonustring = (((bonustring + " a ") + floatstr(r[2][s], 2)) + " penalty") + stats[s];
16endif
17endfor
18bonustring = (!bonustring) ? " no bonuses or penalties." | bonustring[1..$ - 1];
19bonustring[$] = ".";
20bonustring = ((bonustring + " ") + $string_utils:capitalize(r[1])) + " languages: ";
21langs = {};
22for l in [1..length(r[3][1])]
23langs = (r[3][2][l] >= 2.0) ? {@langs, r[3][1][l].lang_name} | {@langs, "some " + r[3][1][l].lang_name};
24endfor
25player:tell(((racestring + bonustring) + $string_utils:english_list(langs)) + ".");
26endfor

roll

Spec none none noneFlags rdOwner #36Definer #141

Referenced by

none

Source

1"for random chargens";
2if (this.type != "random")
3return player:tell("This is not a random statistics generator.");
4endif
5this:set_stats(player);
6player:tell_lines(this:description());

clear

Spec none none noneFlags rdOwner #36Definer #141

Referenced by

none

Source

1clear_property(player, "stats");
2clear_property(player, "stats_current");
3clear_property(player, "org");
4clear_property(player, "race");
5clear_property(player, "short_desc_msg");
6(this.type == "choice") && (player.free_points = 50.0);
7(this.type == "random") && (player.org = this.org);
8if (this.clear_all_skills)
9clear_property(player, "skills");
10clear_property(player, "languages");
11clear_property(player, "speaking");
12clear_property(player, "remembered_names");
13clear_property(player, "short_desc_msg");
14clear_property(player, "money");
15endif
16player:tell_lines(this:description());

race

Spec none none noneFlags rdOwner #36Definer #141

Referenced by

none

Source

1this:pick_race(@args);

org

Spec none none noneFlags rdOwner #36Definer #141

Referenced by

none

Source

1if (this.type != "random")
2this:pick_org(@args);
3else
4player:tell_lines(this.org_facts);
5endif

pick_race

Spec this none thisFlags rxdOwner #36Definer #141

Referenced by

Source

1"USAGE: pick_race()";
2"Allows player to choose a race, and adjustments are made to stats.";
3if (player.location != this)
4return;
5endif
6racelist = {};
7raceprop = "races_" + this.type;
8if (length(this.(raceprop)) == 1)
9if (this.(raceprop)[1][1] == player.race)
10return player:tell("You are already \"", player.race, "\".");
11else
12player:tell("========================================================");
13player:tell("Your current race is \"", player.race, "\". The only race available here is \"", this.(raceprop)[1][1], "\".");
14if (!$command_utils:yes_or_no("Do you want to become one now?"))
15return player:tell("Your race remains unchanged.");
16endif
17player.race = this.(raceprop)[1][1];
18endif
19else
20r = 0;
21for race in (this.(raceprop))
22r = r + 1;
23racelist = {@racelist, tostr(r, " - ", race[1])};
24endfor
25player:tell("========================================================");
26player:tell_lines($string_utils:columnize(racelist, 2, 50));
27if (!$command_utils:yes_or_no("Do you know enough about these races to make the choice?"))
28return player:tell("Type \"? <race name>\" to find out more.");
29endif
30ok = 0;
31while (!ok)
32player:tell("Enter the race name or index number.");
33newrace = $command_utils:read();
34if (((x = toint(newrace)) && (x <= length(this.(raceprop)))) && (x > 0))
35player.race = this.(raceprop)[x][1];
36ok = 1;
37elseif (x = newrace in $list_utils:slice(this.(raceprop)))
38player.race = this.(raceprop)[x][1];
39ok = 1;
40else
41player:tell("Invalid race.");
42endif
43endwhile
44endif
45x = player.race in $list_utils:slice(this.(raceprop));
46if (this.type == "random")
47player.stats[2] = {0.0, 0.0, 0.0, 0.0};
48player.stats_current = player.stats;
49player.languages = this.(raceprop)[x][3];
50player:tell("You must 'roll' now.");
51elseif (g = player.org in $list_utils:slice(this.orgs))
52player.languages = this:merge_lang_lists(this.(raceprop)[x][3], this.orgs[g][4]);
53endif
54player:tell("Your race is \"", player.race, "\".");
55if (this.clear_all_skills)
56clear_property(player, "skills");
57clear_property(player, "languages");
58clear_property(player, "speaking");
59clear_property(player, "remembered_names");
60clear_property(player, "short_desc_msg");
61clear_property(player, "money");
62endif
63if ((this.type == "choice") && (limit = this:limit_check(player)))
64return player:tell_lines(limit);
65endif

set

Spec any at/to anyFlags rxdOwner #36Definer #141

Referenced by

none

Source

1"for choice chargens";
2if (this.type != "choice")
3return player:tell("You cannot set your own statistics in this generator. Try \"roll\".");
4endif
5info = $RP_regulator:parse_stat_level(dobjstr, iobjstr, player);
6if (length(info) != 3)
7return;
8elseif (info[1] == "skill")
9return player:tell("Skills must be learned in the game.");
10else
11index = info[2];
12newlevel = info[3];
13endif
14player.free_points = player.free_points + $RP_regulator:statcost(player.stats[2][index]);
15newcost = $RP_regulator:statcost(newlevel);
16if (newcost <= player.free_points)
17player.free_points = player.free_points - newcost;
18player.stats[2][index] = newlevel;
19player:tell(player.stats[1][index], " => ", floatstr(newlevel, 2));
20player.stats_current = player.stats;
21if (limit = this:limit_check(player))
22return player:tell_lines(limit);
23endif
24else
25player.free_points = player.free_points - $RP_regulator:statcost(player.stats[2][index]);
26player:tell("You don't have enough points for that change.");
27player:tell("You may lower another statistic to gain points.");
28endif

limit_check

Spec this none thisFlags rxdOwner #36Definer #141

Referenced by

Source

1"for both chargens";
2person = args[1];
3violations = {};
4if (this.type == "choice")
5"check for org against race";
6if (o = player.org in $list_utils:slice(this.orgs))
7if (!(player.race in this.orgs[o][2]))
8violations = {@violations, tostr("The ", player.org, " does not allow any ", player.race, ".")};
9endif
10endif
11"check for gender & stats against race";
12if (r = player.race in $list_utils:slice(this.races_choice))
13"gender from .races_choice[4] => 0=ANY, 1=Male, 2=Female 3=Male/Female";
14if ((this.races_choice[r][4] == 1) && (!(player.gender == "male")))
15violations = {@violations, tostr("Any \"", player.race, "\" race requires a male gender.")};
16elseif ((this.races_choice[r][4] == 2) && (!(player.gender == "female")))
17violations = {@violations, tostr("Any \"", player.race, "\" race requires a female gender.")};
18elseif ((this.races_choice[r][4] == 3) && (!(player.gender in {"male", "female"})))
19violations = {@violations, tostr("The \"", player.race, "\" race requires a male or female gender.")};
20endif
21for s in [1..4]
22if ((player.stats[2][s] < this.races_choice[r][2][s][1]) || (player.stats[2][s] > this.races_choice[r][2][s][2]))
23violations = {@violations, tostr(player.stats[1][s], " is outside the limits for ", player.race, ".")};
24endif
25endfor
26endif
27"check for gender & stats against org";
28if (o = player.org in $list_utils:slice(this.orgs))
29if ((this.orgs[o][5] == 1) && (player.gender != "male"))
30violations = {@violations, tostr("The ", player.org, " requires a male gender.")};
31elseif ((this.orgs[o][5] == 2) && (player.gender != "female"))
32violations = {@violations, tostr("The ", player.org, " requires a female gender.")};
33endif
34for s in [1..4]
35if (player.stats[2][s] < this.orgs[o][3][s])
36violations = {@violations, tostr(player.stats[1][s], " is under the minimum for the ", player.org, ".")};
37endif
38endfor
39endif
40else
41if (r = player.race in $list_utils:slice(this.races_random))
42"gender from .races_random[4] => 0=ANY, 1=Male, 2=Female 3=Male/Female";
43if ((this.races_random[r][4] == 1) && (!(player.gender == "male")))
44violations = {@violations, tostr("Any \"", player.race, "\" member of this org must be male.")};
45elseif ((this.races_random[r][4] == 2) && (!(player.gender == "female")))
46violations = {@violations, tostr("Any \"", player.race, "\" member of this org must be female.")};
47elseif ((this.races_random[r][4] == 3) && (!(player.gender in {"male", "female"})))
48violations = {@violations, tostr("The \"", player.race, "\" race requires a male or female gender.")};
49endif
50endif
51endif
52return violations || 0;

pick_org

Spec this none thisFlags rxdOwner #36Definer #141

Referenced by

Source

1"USAGE: pick_org()";
2"For 'choice' chargens.";
3"Allows player to choose an organization.";
4if (length(this.orgs) == 1)
5if (this.orgs[1][1] == player.org)
6return player:tell("You are already a member of \"", player.org, "\".");
7else
8player:tell("========================================================");
9player:tell("Your current org is \"", player.org, "\". The only org available here is \"", this.orgs[1][1], "\".");
10if (!$command_utils:yes_or_no("Do you want to join now?"))
11return player:tell("Your organization remains unchanged.");
12endif
13player.org = this.orgs[1][1];
14endif
15else
16orglist = {};
17o = 0;
18for org in (this.orgs)
19o = o + 1;
20orglist = {@orglist, tostr(o, " - ", org[1])};
21endfor
22player:tell("========================================================");
23player:tell_lines($string_utils:columnize(orglist, 2, 50));
24if (!$command_utils:yes_or_no("Do you know enough about these organizations to make the choice?"))
25return player:tell("Type \"? <org name>\" to find out more.");
26endif
27ok = 0;
28while (!ok)
29player:tell("Enter the organization name or index number.");
30neworg = $command_utils:read();
31if (((x = toint(neworg)) && (x <= length(this.orgs))) && (x > 0))
32player.org = this.orgs[x][1];
33ok = 1;
34elseif (x = neworg in $list_utils:slice(this.orgs))
35player.org = this.orgs[x][1];
36ok = 1;
37else
38player:tell("Invalid organization.");
39endif
40endwhile
41endif
42player:tell("Your organization is the \"", player.org, "\".");
43if (this.clear_all_skills)
44clear_property(player, "skills");
45clear_property(player, "languages");
46clear_property(player, "speaking");
47clear_property(player, "remembered_names");
48clear_property(player, "short_desc_msg");
49clear_property(player, "money");
50endif
51x = player.org in $list_utils:slice(this.orgs);
52if ((g = player.race in $list_utils:slice(this.races_choice)) && x)
53player.languages = this:merge_lang_lists(this.races_choice[g][3], this.orgs[x][4]);
54endif
55if (limit = this:limit_check(player))
56return player:tell_lines(limit);
57endif

o*ut exit leave go

Spec any none noneFlags rdOwner #36Definer #141

Referenced by

none

Source

1"Checks for proper settings before allowing the player to leave.";
2"Calls this:special(), if such a verb exists, to handle any";
3"customized touch-ups to character generation.";
4if (limit = this:limit_check(player))
5player:tell("CHARACTER VIOLATIONS:");
6player:tell_lines(limit);
7endif
8if ((!`player.build_options ! E_PROPNF => 0') && limit)
9"a non-builder cannot leave unfixed.";
10return player:tell("Fix this problem, and then you can leave.");
11elseif (player.location == this)
12`this:special() ! E_VERBNF => 0';
13this:here_huh(verb, args);
14endif

help_msg

Spec this none thisFlags rxdOwner #2Definer #141

Referenced by

none

Source

1msg = pass(@args);
2if (`this.build_help ! E_PROPNF => 0' && (parent(player) != $rpgamer))
3msg = {@msg, "", @this.("build_help_" + this.type)};
4endif
5return msg;

init_for_core

Spec this none thisFlags rxdOwner #2Definer #141

Referenced by

none

Source

1if (caller_perms().wizard)
2if (this != $chargen)
3for p in (properties($chargen))
4if ((!p) in {"build_help", "help_msg"})
5clear_property(this, p);
6endif
7endfor
8endif
9try
10for x in [1..length(this.races_random)]
11this.races_random[x][3] = {{$default_lang}, {2.0}};
12endfor
13except (E_RANGE)
14"pass";
15endtry
16try
17for y in [1..length(this.races_choice)]
18this.races_choice[y][3] = {{$default_lang}, {2.0}};
19endfor
20except (E_RANGE)
21"pass";
22endtry
23try
24for z in [1..length(this.orgs)]
25this.orgs[z][4] = {{$default_lang}, {2.0}};
26endfor
27except (E_RANGE)
28"pass";
29endtry
30return pass(@args);
31endif

merge_lang_lists

Spec this none thisFlags rxdOwner #36Definer #141

Referenced by

Source

1"Takes two versions of the $rpgamer.languages settings and merges the best of both.";
2final = alist = args[1];
3blist = args[2];
4for l in (blist[1])
5ib = l in blist[1];
6if (ia = l in alist[1])
7if (alist[2][ai] < blist[2][bi])
8final[2][ai] = blist[2][bi];
9endif
10else
11final[1] = {@final[1], blist[1][ib]};
12final[2] = {@final[2], blist[2][ib]};
13endif
14endfor
15return final;