Mod:Nebula's Mission Board/ Editing settings
The Mission Generation Library is designed to be highly customizable. This choice is reflected in its missiongen_settings.lua file. This file is what modders are supposed to edit, changing the values inside the giant table it defines.
Here's a list of all settings in the library, with documentation:
sv_root_name
Name of the SV table that will contain all stored data. Use a table to specify a deeper path. If not present in the SV structure, the defined path will be generated automatically. An empty list would just use SV as root.
Examples:
"jobs"would useSV.jobsas its root.{"adventure", "jobs"}would useSV.adventure.jobsas its root.
Example
"jobs"
boards
A list of board ids and the data necessary to define their behavior.
Format for each board:
<board_id>: {
display_key: string,
size: integer,
location: {
zone: string,
map: integer
},
condition: function(library),
job_types: {id = string, weight = integer}[]
}
- <board_id>: The id of the board. It will be used to identify and reference this specific board inside scripts
- display_key: the string key used when displaying the job menu for this board. The localized strings are fetched from the Menu Text list (strings.resx)
- size: the amount of quests this board can hold at a time
- location: a zone id and a map index. This data is where the player will be brought for the job completion cutscene. All of these maps must call library:PlayJobsCompletedCutscene before fade-in for the reward sequence to work correctly.
- condition: Optional. A function called to determine if library:PopulateBoards() should fill out this board. It receives the library object as an argument and returns a boolean. If it returns true, the board is filled out. If it returns false, it is left empty. If this property is missing, this board will always be active.
- job_types: a list of job types and their probability weight. Higher weight means more common.
Example
{
quest_board = {
display_key = "BOARD_QUEST_TITLE",
size = 8,
location = {zone = "guildmaster_island", map = 2},
condition = function (library)
local root = library.root
local completed = 0
for _, segments in pairs(root.dungeon_progress) do
for _, state in pairs(segments) do
if state then
completed = completed + 1
if completed>=3 then return true end
break
end
end
end
return false
end,
job_types = {
{id = "RESCUE_SELF", weight = 5},
{id = "RESCUE_FRIEND", weight = 5},
{id = "ESCORT", weight = 2},
{id = "EXPLORATION", weight = 2},
{id = "DELIVERY", weight = 2},
{id = "LOST_ITEM", weight = 4},
{id = "OUTLAW", weight = 5},
{id = "OUTLAW_ITEM", weight = 2},
{id = "OUTLAW_ITEM_UNK", weight = 1},
{id = "OUTLAW_MONSTER_HOUSE", weight = 1},
{id = "OUTLAW_FLEE", weight = 1}
}
}
}
end_dungeon_day_destination
Zone and map id of the ground map where players will be sent to when a day ends and there is at least one mission to hand in. This map must contain a call to library:PlayJobsCompletedCutscene
Format: {zone: string, map: integer}
Example
{ zone = "guildmaster_island", map = 2 },
after_rewards_function
Function ran after the game is done with the job completion cutscene. It takes no arguments, and is not expected to return anything. You can use it to fix up the game state however you like before returning control to the player.
Example
after_rewards_function = function() GAME:MoveCamera(0, 0, 1, true) SOUND:PlayBGM(SV.base_town.Song, true) end
taken_limit
The maximum number of jobs that can be taken from job boards at a time.
Example
8
taken_jobs_start_active
If true, taken jobs will be activated automatically. Players can always deactivate them manually if they so choose.
Example
true
max_guests
The maximum amount of guest-based jobs that can be generated in the same dungeon.
Guest-based jobs are: ESCORT, EXPLORATION
Example
1
guests_take_up_space
The maximum amount of guest-based jobs that can be generated in the same dungeon.
Guest-based jobs are: ESCORT, EXPLORATION
Example
1
min_party_limit
Minimum number for the party limit when it is reduced because of guests. This value cannot be lower than 1, for obvious reasons. Any excess guests will simply add to the party count, without reducing the limit.
Example
1
losing_guests_means_defeat
If true, losing any guest will count as a loss for the entire exploration. If false, it will simply mark that specific job as failed.
Example
false
dungeon_boss_steps_piority
The priority of the SpawnOutlaw handler event. It can be either an integer or a list of integers. This value should always be lower than dungeon_gen_steps_piority.
Example
-11
dungeon_gen_steps_piority
The priority that most of the job handlers will have when being added to the event list. It can be either an integer or a list of integers. This value should always be equal to or higher than the priority set for the event that calls library:GenerateJobInFloor.
Example
-6
dungeon_npc_steps_piority
The priority that job npc spawners will have when being added to the event list. It can be either an integer or a list of integers. This value should always be equal to or higher than dungeon_gen_steps_piority.
Example
{ 5, 2, 1 }
difficulty_list
A list of all difficulty rank id strings you want to use. The order of these strings will define the difficulty scale used by the library.
Example
{ "F", "E", "D", "C", "B", "A", "S", "STAR_1", "STAR_2", "STAR_3", "STAR_4", "STAR_5", "STAR_6", "STAR_7", "STAR_8", "STAR_9" }
difficulty_data
All the data required to define difficulty rank behavior. There must be an entry for every rank defined in difficulty_list:
Format: <diff_id>: {display_key: string, money_reward: integer, extra_reward: integer, outlaw_level: integer, escort_level: integer}
- <diff_id>: one of the difficulties defined in "difficulty_list"
- display_key: string key used when displaying the name of the rank. The localized strings are fetched from the Menu Text list (strings.resx)
- money_reward: the amount of money awarded at the end of the job. If set to 0, money rewards will simply not award anything
- extra_reward: the points of extra reward awarded at the end of the job. What these points are depends on extra_reward_type. If set to 0, extra_reward_type will be considered to be "none"
- outlaw_level: Optional. The base level of all outlaws spawned by jobs with this difficulty. If omitted, it will be equal to the dungeon's expected level.
- escort_level: Optional. The level of all guests spawned by jobs with this difficulty. If omitted, it will be equal to the dungeon's expected level.
Example
{
F = {display_key = "RANK_STRING_F", money_reward = 100, extra_reward = 0},
E = {display_key = "RANK_STRING_E", money_reward = 200, extra_reward = 100},
D = {display_key = "RANK_STRING_D", money_reward = 400, extra_reward = 200},
C = {display_key = "RANK_STRING_C", money_reward = 600, extra_reward = 400},
B = {display_key = "RANK_STRING_B", money_reward = 700, extra_reward = 1250},
A = {display_key = "RANK_STRING_A", money_reward = 1500, extra_reward = 2500},
S = {display_key = "RANK_STRING_S", money_reward = 3000, extra_reward = 5000},
STAR_1 = {display_key = "RANK_STRING_STAR_1", money_reward = 6000, extra_reward = 10000},
STAR_2 = {display_key = "RANK_STRING_STAR_2", money_reward = 10000, extra_reward = 20000},
STAR_3 = {display_key = "RANK_STRING_STAR_3", money_reward = 15000, extra_reward = 30000},
STAR_4 = {display_key = "RANK_STRING_STAR_4", money_reward = 20000, extra_reward = 40000},
STAR_5 = {display_key = "RANK_STRING_STAR_5", money_reward = 25000, extra_reward = 50000},
STAR_6 = {display_key = "RANK_STRING_STAR_6", money_reward = 30000, extra_reward = 60000},
STAR_7 = {display_key = "RANK_STRING_STAR_7", money_reward = 35000, extra_reward = 70000},
STAR_8 = {display_key = "RANK_STRING_STAR_8", money_reward = 40000, extra_reward = 80000},
STAR_9 = {display_key = "RANK_STRING_STAR_9", money_reward = 45000, extra_reward = 90000}
}
guest_level_scaling
Function that changes the level of guests based on the player's level. It must return the new level for the guest, or it will have no effect.
Arguments:
- lvl: base level of the guest.
- dungeon: if true, the level is the dungeon's recommended level. If false, it's taken from the difficulty data.
- avg_team_lvl: average level of the player team. It may or may not be an integer.
- hst_team_lvl: highest level in the player team.
- settings: the settings data structure itself
Example
function(lvl, dungeon, avg_team_lvl, hst_team_lvl, settings) local add = 0 if dungeon then lvl = lvl*4//5 end if avg_team_lvl > lvl then add = (avg_team_lvl - lvl) // 10 end return lvl + add end
outlaw_level_scaling
Function that changes the level of guests based on the player's level. It must return the new level for the guest, or it will have no effect.
Arguments:
- lvl: base level of the guest.
- dungeon: if true, the level is the dungeon's recommended level. If false, it's taken from the difficulty data.
- avg_team_lvl: average level of the player team. It may or may not be an integer.
- hst_team_lvl: highest level in the player team.
- settings: the settings data structure itself
Example
function(lvl, dungeon, avg_team_lvl, hst_team_lvl, settings) local add = 0 if dungeon then lvl = lvl*23//20 end if avg_team_lvl > lvl then add = (avg_team_lvl - lvl) // 8 end add = add + (hst_team_lvl - avg_team_lvl) // 4 return lvl + add end
apply_outlaw_changes
Function that allows you to edit an outlaw's data just before they are spawned.
You can change just about anything except its position and recruitability state. Its HP will also
always be automatically set to full after this function is called.
You will also be unable to change the EquippedItem of an "OUTLAW_ITEM" or "OUTLAW_ITEM_UNK" outlaw.
Arguments:
- outlaw: the outlaw Character itself
- job: the current job data table
Example
function(outlaw, job)
local max_boost = PMDC.Data.MonsterFormData.MAX_STAT_BOOST
outlaw.MaxHPBonus = math.min(outlaw.Level * max_boost // 64, max_boost);
if job.Type == "OUTLAW_FLEE" then
local speedMin = math.floor(outlaw.Level * 4 // 3)
local speedMax = math.floor(outlaw.Level * 6 // 2)
outlaw.SpeedBonus = math.min(_DATA.Save.Rand:Next(speedMin, speedMax), 100)
end
end
fleeing_outlaw_restrictions
A list of ids for types that are banned from ever being picked as fleeing outlaws.
Example
{ "ghost" }
outlaw_music_name
The name of the outlaw music file. This file will be sourced from the Content/Music folder.
Example
"Outlaw.ogg"
dungeons
This is where dungeon difficulty is set. Quests can only generate for dungeons inside this list. Given the complexity of this structure, it is best generated using the |AddDungeonSection function at the bottom of this page.
dungeon_order
Jobs are sorted by dungeon, following the order defined in this table. Missing dungeons are shoved at the bottom and sorted alphabetically. This list is automatically populated in call order when using the "AddDungeonSection" function near the bottom of this file.
external_events
A list of events unrelated to this library that can cause job generation to ignore a specific dungeon.
They can also be displayed in the objectives log if you so choose.
Format: {condition: function(zone), message_key: string, message_args: function(zone), icon: string}
- condition: a function that takes a zone and returns a boolean. If it returns true, jobs will not be generated for this dungeon, and all already taken jobs will be automatically suspended.
- message_key: Optional. It will be used in the objectives log instead of the default message if the condition is true.
- message_args: Optional. If the message's localization string contains placeholders, this function is in charge of taking a zone and returning a list of values that will be used for those placeholders in the form of a table array (Up to 5).
- icon: Optional. The icon that will be displayed beside the corresponding dungeon in the dungeon selection menu if the condition is true for any of its segments. Defaults to ""
Example
{
{condition = function(zone) return COMMON.HasSidequestInZone(zone) end, icon = "\\uE111", message_key = "MENU_JOB_OBJECTIVE_DEFAULT"}
}
external_events_icon_mode
How to display external event icons in the dungeon list. This value can only be either "FIRST" or ALL".
- If set to "ALL", they will always be displayed in the order defined by external_events. Only one copy of the same icon will be shown, no matter how many conditions require it.
- If set to "FIRST", only the first event in the list's order will be displayed, no matter how many events are actually there. This setting does not prevent multiple messages from appearing in the objectives list.
Example
"FIRST"
dungeon_list_pattern
The pattern that will define how to display entries in the dungeon list.
{0} is the placeholder for the dungeon name, {1} for pending job icon and {2} for external condition icons.
Example
"FIRST"
job_types
Table used to determine various properties regarding job types.
Remove a job type entirely to disable its generation altogether.
Format: <job_type_id>: {rank_modifier: integer, min_rank: string}
- <job_type_id>: one of RESCUE_SELF, RESCUE_FRIEND, ESCORT, EXPLORATION, DELIVERY, LOST_ITEM, OUTLAW, OUTLAW_ITEM, OUTLAW_ITEM_UNK, OUTLAW_MONSTER_HOUSE, OUTLAW_FLEE
- rank_modifier (optional): these jobs will always have this modifier applied to their rank.
- min_rank (optional): this type of jobs can never be of a rank lower than this.
- This influences possible dungeon spawn: a rank_modifier 1 job with min_rank "C" can also spawn in "D" rank dungeons.
Example
{
RESCUE_SELF = {rank_modifier = 0, min_rank = "F"},
RESCUE_FRIEND = {rank_modifier = 0, min_rank = "E"},
ESCORT = {rank_modifier = 1, min_rank = "C"},
EXPLORATION = {rank_modifier = 1, min_rank = "C"},
DELIVERY = {rank_modifier = 0, min_rank = "D"},
LOST_ITEM = {rank_modifier = 0, min_rank = "D"},
OUTLAW = {rank_modifier = 1, min_rank = "C"},
OUTLAW_ITEM = {rank_modifier = 1, min_rank = "C"},
OUTLAW_ITEM_UNK = {rank_modifier = 1, min_rank = "C"},
OUTLAW_MONSTER_HOUSE = {rank_modifier = 2, min_rank = "S"},
OUTLAW_FLEE = {rank_modifier = 1, min_rank = "B"}
}
dungeon_job_modifiers
Special table that allows modders to specify chance multipliers for job types depending on the dungeon.
Format: <dungeon_id>: {<job_type_id>: <multiplier>}
- <dungeon_id>: the string id of a dungeon
- <job_type_id>: one of RESCUE_SELF, RESCUE_FRIEND, ESCORT, EXPLORATION, DELIVERY, LOST_ITEM, OUTLAW, OUTLAW_ITEM, OUTLAW_ITEM_UNK, OUTLAW_MONSTER_HOUSE, OUTLAW_FLEE
- <multiplier>: a multiplier number. It doesn't need to be an integer. It will be multiplied with the board's base chances, rounding up, when choosing the type of a job. Set it to 0 or less to disable the job type altogether.
Example
{
ambush_forest = {
OUTLAW = 3,
OUTLAW_ITEM = 3,
OUTLAW_ITEM_UNK = 3,
OUTLAW_MONSTER_HOUSE = 3,
OUTLAW_FLEE = 3
},
treacherous_mountain = {
OUTLAW = 3,
OUTLAW_ITEM = 3,
OUTLAW_ITEM_UNK = 3,
OUTLAW_MONSTER_HOUSE = 3,
OUTLAW_FLEE = 3
}
}
special_chance
Chance of special missions to be generated. Special missions are just handcrafted scenarios with specific client and target pairs and custom flavor texts. Set to 0 to disable altogether.
Example
0.2
special_jobs
This is where you can define special cases for specific types of jobs.
Format: <job_type_id>: <special_id>[]
- <job_type_id>: one of RESCUE_SELF, RESCUE_FRIEND, ESCORT, EXPLORATION, DELIVERY, LOST_ITEM, OUTLAW, OUTLAW_ITEM, OUTLAW_ITEM_UNK, OUTLAW_MONSTER_HOUSE, OUTLAW_FLEE
- <special_id>: any id of your choosing except RESCUE_SELF, RESCUE_FRIEND, ESCORT, EXPLORATION, DELIVERY, LOST_ITEM, OUTLAW, OUTLAW_ITEM, OUTLAW_ITEM_UNK, OUTLAW_MONSTER_HOUSE, OUTLAW_FLEE
Example
{
RESCUE_FRIEND = {"CHILD", "LOVER", "RIVAL", "FRIEND"}
}
hidden_floor_chance
Chance for supported quest types to have their destination floor hidden. Set to 0 to disable altogether.
Players will still be notified when reaching the floor. It just won't show in the quest description.
Job types that can have their floor hidden are: RESCUE_FRIEND, EXPLORATION, OUTLAW, OUTLAW_ITEM, OUTLAW_ITEM_UNK, OUTLAW_FLEE.
Example
0.15
reward_types
A list of all types of rewards to be offered to players.
Format: {id: string, weight: integer, min_rank: string}
- id: one of the supported reward types. You can use duplicate values to alter odds depending on job rank.
- Supported reward types are: item, money, item_item, money_item, client, exclusive
- weight: Chance of appearing. Set to 0 or delete altogether to stop a type of reward from being offered.
- min_rank: optional. If set, this type of reward will only be offered if the job is this rank or higher.
Example
{
{id = "item", weight = 6},
{id = "money", weight = 2},
{id = "item_item", weight = 3},
{id = "money_item", weight = 1},
{id = "client", weight = 1, min_rank = "STAR_1"},
{id = "exclusive", weight = 1, min_rank = "STAR_4"}
}
extra_reward_type
The type of extra reward for all quests. It can be "none", "rank" or "exp". Any other value will result in "none".
Example
"exp"
rewards_per_difficulty
This table assigns different weights to reward pools depending on the difficulty rank of the mission.
Format: <diff_id>: {id: string, weight: integer}[]
- <diff_id>: one of the difficulties defined in difficulty_list"
- id: the id of one of the reward pools defined in "reward_pools"
- weight: Chance of appearing. Set to 0 or delete altogether to stop a reward pool from being picked.
Example
{
F = {
{id = "NECESSITIES", weight = 10}
},
E = {
{id = "NECESSITIES", weight = 10},
{id = "APRICORN_GENERIC", weight = 10},
{id = "FOOD_LOW", weight = 10},
{id = "SEED_LOW", weight = 10},
{id = "HELD_LOW", weight = 3},
{id = "LOOT_LOW", weight = 3},
{id = "EVO_ITEMS", weight = 1},
{id = "WANDS_LOW", weight = 10}
},
D = {
{id = "NECESSITIES", weight = 5},
{id = "AMMO_LOW", weight = 10},
{id = "APRICORN_GENERIC", weight = 10},
{id = "APRICORN_TYPED", weight = 2},
{id = "FOOD_LOW", weight = 4},
{id = "SEED_LOW", weight = 4},
{id = "SEED_MID", weight = 10},
{id = "HELD_LOW", weight = 10},
{id = "HELD_TYPE", weight = 3},
{id = "LOOT_LOW", weight = 10},
{id = "EVO_ITEMS", weight = 2},
{id = "ORBS_LOW", weight = 2},
{id = "WANDS_LOW", weight = 4},
{id = "WANDS_MID", weight = 10},
},
[...]
}
reward_pools
List of all reward pools and the items they contain. You must at least include all pools referenced in the rewards_per_difficulty table, but you can add more.
Entry ids may be either items or other pools. A pool doesn't have to only contain one of the two.
Format: <pool id>: {id: string, count: integer, hidden: string, weight: integer}[]
- <pool_id>: the id of the pool. It should be used somewhere else either in this table or in rewards_per_difficulty.
- id: item_id or pool_id. If it matches a pool, count and hidden will be ignored.
- count: Optional. The amount of items awarded. It cannot be higher than the item's max stack. Defaults to the item's max stack.
- hidden: Optional. Hidden value that can be used for various purposes depending on the item. Defaults to "".
- weight: Chance of appearing. Set to 0 or delete altogether to stop an entry from being picked.
Example
{
NECESSITIES = {
{id = "seed_reviver", weight = 10},
{id = "berry_leppa", weight = 5},
{id = "berry_oran", weight = 5},
{id = "berry_lum", weight = 5},
{id = "food_apple", weight = 5},
{id = "orb_escape", weight = 5},
{id = "apricorn_plain", weight = 5},
{id = "key",count = 3, weight = 2}
},
AMMO_LOW = {
{id = "ammo_iron_thorn", count = 3, weight = 5},
{id = "ammo_geo_pebble", count = 3, weight = 1},
{id = "ammo_stick", count = 3, weight = 1},
},
[...]
}
target_items
Ids of items that can be used as targets, divided depending on the job type.
Make sure they're either easy enough to obtain or impossible to lose, depending on the job.
Using stackable items is highly discouraged for all job types, as it may result in odd behaviors.
Please keep in mind that if you want to use the "mission_" items shown in the example you must either recreate them or copy them over from the example mod.
Format: <job_type_id>: <item_id>[]
- <job_type_id>: the id of a job type defined inside "job_types"
- <item_id>: the id of the item to use
Example
{
LOST_ITEM = {
"mission_lost_scarf",
"mission_lost_specs",
"mission_lost_band"
},
OUTLAW_ITEM = {
"mission_stolen_scarf",
"mission_stolen_band",
"mission_stolen_specs"
},
DELIVERY = {
"berry_oran",
"berry_leppa",
"food_apple",
"berry_lum",
"apricorn_plain"
},
[...]
}
difficulty_to_tier
Weighted table that associates mission difficulty to a specific tier of characters and outlaws.
Format: <diff_id>: {id: string, weight: integer}[]
- <diff_id>: one of the difficulties defined in "difficulty_list"
- id: A string that defines a pokémon tier id.
- weight: Chance of being picked. Set to 0 or delete altogether to stop an entry from being picked.
Example
{
F = {
{id = "TIER_LOW", weight = 10}
},
E = {
{id = "TIER_LOW", weight = 9},
{id = "TIER_MID", weight = 1}
},
D = {
{id = "TIER_LOW", weight = 7},
{id = "TIER_MID", weight = 3}
},
[...]
}
pokemon
A list of Pokémon that will be used for job generation, sorted by arbitrary quest tiers.
Any of these entries may be picked when choosing client and target.
If the client picked is not in the seen dex, the reward type can never be "client" nor "exclusive".
Format: <tier>: <monster_id>[]
- <tier>: one of the tier ids used in difficulty_to_tier
- <monster_id>: either the species id of a pokémon or a MonsterIDTable
Format of MonsterIDTable: see the "monsterIdTemplate" function in missiongen_lib.lua
Example
{
TIER_LOW = {
"abra","amaura","anorith","applin","archen","aron","arrokuda","axew","azurill", [...]
},
[...]
}
job_titles
A list of all possible job display titles, divided by job type.
You must also include lists for any special job types you intend to use.
Format: <job_type_id>: <string_key>[]
- <job_type_id>: either the id of a job type defined inside "job_types", or the id of a special job type
- <string_key>: the localization key used for the title. The localized strings are fetched from the Menu Text list (strings.resx)
Localization placeholders:
- {0}: target (or client, if there is no target)
- {1}: dungeon
- {2}: item
Example
{
RESCUE_SELF = {
"MISSION_TITLE_RESCUE_SELF_001",
"MISSION_TITLE_RESCUE_SELF_002",
"MISSION_TITLE_RESCUE_SELF_003",
"MISSION_TITLE_RESCUE_SELF_004",
[...]
},
[...]
}
job_flavor
A list of all possible job flavor text entries, divided by job type and by line.
Format: <job_type_id>: {<string_key>[], <string_key>[]}
- <job_type_id>: either the id of a job type defined inside "job_types", or the id of a special job type
- <string_key>: the localization key used for the flavor text. Every job has 2 lists assigned: one for the top string and one for the bottom one.
If only the first list is specified, the second one will be left empty. The localized strings are fetched from the Menu Text list (strings.resx)
Localization placeholders:
- {0}: target (or client, if there is no target)
- {1}: dungeon
- {2}: item
Example
{
RESCUE_SELF = {
{
"MISSION_BODY_TOP_RESCUE_SELF_001",
"MISSION_BODY_TOP_RESCUE_SELF_002",
"MISSION_BODY_TOP_RESCUE_SELF_003",
"MISSION_BODY_TOP_RESCUE_SELF_004",
[...]
},
{
"MISSION_BODY_BOTTOM_RESCUE_SELF_001",
"MISSION_BODY_BOTTOM_RESCUE_SELF_002",
"MISSION_BODY_BOTTOM_RESCUE_SELF_003",
[...]
}
},
[...]
}
law_enforcement
Law enforcement characters in your setting. All OUTLAW jobs except OUTLAW_ITEM and OUTLAW_ITEM_UNK use these characters as job clients.
You may specify only 1 officer, and then a list containing any number of agents. Two of the latter will be randomly picked every time the job completion cutscene is played.
You may add a weight property to agents to specify a custom chance of being picked. Any without will
have a weight of 1.
Add "unique = true" to the MonsterIDTable to stop an agent from being picked twice. You must
have at least either 1 non-unique agent or 2 unique ones for this list table to be valid.
Format of MonsterIDTable: see the "monsterIdTemplate" function in missiongen_lib.lua
Example
{
OFFICER = {Species = "magnezone", Gender = 0},
AGENT = {
{Species = "magnemite", Gender = 0, Weight = 31},
{Species = "magnemite", Gender = 0, Skin = "shiny", Weight = 1, Unique = true}
}
}
enforcer_chance
Defines the chance of either the officer or an agent being the client of a mission depending on the character tier of the mission, as defined in difficulty_to_tier.
Format: <tier>: {id: string, weight: integer}[]
- <tier>: one of the tier ids used in difficulty_to_tier
- id: One of: OFFICER, AGENT
- index: Optional. Ignored if id is OFFICER. You can set it to specify a specific agent instead of rolling using their chance in "law_enforcement".
- weight: Chance of being picked. Set to 0 or delete altogether to stop an entry from being picked.
Example
{
TIER_LOW = {
{id = "OFFICER", weight = 2},
{id = "AGENT", weight = 8}
},
TIER_MID = {
{id = "OFFICER", weight = 5},
{id = "AGENT", weight = 5}
},
TIER_HIGH = {
{id = "OFFICER", weight = 8},
{id = "AGENT", weight = 2}
}
}
special_data
Data of characters and flavor key used for special jobs, divided by tier.
In outlaw related quests, you may use ENFORCER as a keyword for a random law enforcement character.
You may also use OFFICER or AGENT to specify a more specific selection.
These keywords can only be used in place of MonsterIDTables.
Format: <special_type>: {<tier>: {client: MonsterIDTable, target: MonsterIDTable, item: string, flavor: string}[]}
- <special_type>: an id of your choosing. It must be different from any basic job id
- <tier>: one of the tier ids used in difficulty_to_tier
- client: the data used to generate this Pokémon.
- target: the data used to generate this Pokémon. Only used in job types that require a target.
- item: the id of the item that will be used for this job. Only used in job types that require an item.
- flavor: flavor string key used for the job, sourced from the Menu Text list (strings.resx)
Format of MonsterIDTable: see the "monsterIdTemplate" function in missiongen_lib.lua
Localization placeholders:
- {0}: target (or client, if there is no target)
- {1}: dungeon
- {2}: item
Example
{
LOVER = {
TIER_LOW = {
{client = {Species = "volbeat", Gender = 1}, target = {Species = "illumise", Gender = 2}, flavor = "MISSION_BODY_SPECIAL_LOVER_001"},
{client = {Species = "minun", Gender = 1}, target = {Species = "plusle", Gender = 2}, flavor = "MISSION_BODY_SPECIAL_LOVER_002"},
{client = {Species = "mareep", Gender = 2}, target = {Species = "wooloo", Gender = 1}, flavor = "MISSION_BODY_SPECIAL_LOVER_003"},
[...]
},
TIER_MID = {
{client = {Species = "miltank", Gender = 2}, target = {Species = "tauros", Gender = 1}, flavor = "MISSION_BODY_SPECIAL_LOVER_005"},
{client = {Species = "venomoth", Gender = 1}, target = {Species = "butterfree", Gender = 2}, flavor = "MISSION_BODY_SPECIAL_LOVER_006"},
[...]
},
[...]
},
[...]
}
escort_talks
String keys to be used whenever the player interacts with an escort mission client, depending on the job type.
You can also include tables for special escort jobs. If no such table exists for a specific case, the generic table for the job type will be used.
Format: <job_type_id>: <string_key>[]
- <job_type_id>: "ESCORT", "EXPLORATION", or the id of a special job type that corresponds to one of these job types
- <string_key>: the localization key of possible messages. The localized strings are fetched from the Gameplay Text list (stringsEx.resx)
Localization placeholders:
- {0}: target
- {1}: dungeon
- {2}: item
Example
{
ESCORT = {
"MISSION_ESCORT_INTERACT"
},
EXPLORATION = {
"MISSION_EXPLORATION_INTERACT"
}
}
rescue_responses
Strings keys to be used whenever the player interacts with a pokémon that needs rescue, depending on the job type and the response given.
You must include a "_DEFAULT" table, but you can also include tables for special job types. _DEFAULT will still be used for any special
case that doesn't have a table associated with it.
Format: {rescue_yes: {<case_id>: {key: string, emotion: string}[]}, rescue_no: {<case_id>: {key: string, emotion: string}[]}}
- <case_id>: "_DEFAULT", or the id of a special job type that corresponds to either "RESCUE_SELF" or "RESCUE_FRIEND"
- key: the localization key of possible messages. The localized strings are fetched from the Gameplay Text list (stringsEx.resx)
- emotion: Optional. An emotion id to use with this specific message. Defaults to "Normal"
Localization placeholders:
- {0}: client
- {1}: target
- {2}: dungeon
Example
{
rescue_yes = {
_DEFAULT = { {key = "MISSION_RESCUE_CONFIRM_DEFAULT"} },
CHILD = { {key = "MISSION_RESCUE_CONFIRM_CHILD", emotion = "Joyous"} },
FRIEND = { {key = "MISSION_RESCUE_CONFIRM_FRIEND"} },
RIVAL = { {key = "MISSION_RESCUE_CONFIRM_RIVAL"} },
LOVER = { {key = "MISSION_RESCUE_CONFIRM_LOVER", emotion = "Joyous"} }
},
rescue_no = {
_DEFAULT = { {key = "MISSION_RESCUE_DENY_DEFAULT", emotion = "Surprised"} },
CHILD = { {key = "MISSION_RESCUE_DENY_CHILD", emotion = "Crying"} },
FRIEND = { {key = "MISSION_RESCUE_DENY_FRIEND", emotion = "Surprised"} },
RIVAL = { {key = "MISSION_RESCUE_DENY_RIVAL", emotion = "Stunned"} },
LOVER = { {key = "MISSION_RESCUE_DENY_LOVER", emotion = "Stunned"} }
}
}
mission_callback_root
The object that contains job callback functions. It is recommended to define this object somewhere else.
Job callbacks are stored inside jobs as strings. These strings are then used as an index in the callback root object to retrieve the actual function.
The callback system is a pretty involved one, that gives a modder the ability to handcraft entirely new types of jobs if they so choose, but is also pretty difficult to handle, so it will be discussed in its own guide.
Example
COMMON
settings.AddDungeonSection(zone, segment, start, difficulty, finish, must_end)
Adds a new dungeon section to the list of possible job destinations. Section start values must always be added in ascending order. Failing to do so may cause inconsistent behaviors.
Arguments
zone-string: the string id of the dungeon zone.segment-integer: the numeric id of the dungeon segment.start-integer: the starting floor of this dungeon section (start counting from 1 for this).difficulty-string: the string id of the difficulty assigned to this section.finish-integer: Only considered when first adding a segment to the list. Can be omitted otherwise. This will be the last floor of the segment where jobs can spawn (start counting from 1 for this). If higher than the dungeon floors, it will default to the full dungeon length.must_end-booleanOnly considered when first adding a segment to the list. Can be omitted otherwise. If true, this segment must be completed before jobs can spawn in it. If false, the segment must be accessed at least once, unless it's segment 0, which just needs to be unlocked. Defaults to true.
Example
settings.AddDungeonSection("faultline_ridge", 0, 6, "D", 10)
settings.AddDungeonSection("sickly_hollow", 0, 9, "S", 16, false)
settings.AddDungeonSection("sickly_hollow", 0, 13, "STAR_1")
