Mod:Knightcore/MonsKC: Difference between revisions
Created page with "{{stub}} The following functions are found in the <code>MonsKC.lua</code> file in Knightcore. These functions can be called from other lua script files by including the line <code>require 'knightcore.MonsKC'</code>, and then called with the prefix <code>MonsKC</code>. == MakeID == Generates a monster ID from the specified parameters. == MakeAndAddToParty == Create a mon and add them to the party in the last open slot. == MakeAndAddToPartyID == Crea..." |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
''Main Page: [[Mod:Knightcore]]'' | |||
The following functions are found in the <code>MonsKC.lua</code> file in [[Mod:Knightcore|Knightcore]]. These functions can be called from other lua script files by including the line <code>require 'knightcore.MonsKC'</code>, and then called with the prefix <code>MonsKC</code>. | The following functions are found in the <code>MonsKC.lua</code> file in [[Mod:Knightcore|Knightcore]]. These functions can be called from other lua script files by including the line <code>require 'knightcore.MonsKC'</code>, and then called with the prefix <code>MonsKC</code>. | ||
== MakeID == | == MakeID == | ||
Generates a monster ID from the specified parameters. | Generates a monster ID from the specified parameters. Used for setting defaults. | ||
Arguments: | |||
* <code>pkm</code>, string: The Pokemon species to create. | |||
* <code>gender</code>, gender, optional: The gender to use. Defaults to genderless. | |||
* <code>formNum</code>, positive integer, optional: The form number to use. Defaults to 0. | |||
== MakeAndAddToParty == | == MakeAndAddToParty == | ||
Create a mon and add them to the party in the last open slot. | Create a mon and add them to the party in the last open slot. | ||
Arguments: | |||
* <code>pkm</code>, string: The Pokemon species to create. | |||
* <code>gender</code>, gender, optional: The gender to use. Defaults to genderless. | |||
* <code>name</code>, string, optional: The name to give the Pokemon. Defaults to the species name. | |||
* <code>ability</code>, string: The ability to give the Pokemon. | |||
* <code>level</code>, positive integer, optional: The level to set the Pokemon to. Defaults to 5. | |||
* <code>formNum</code>, positive integer, optional: The form number to use. Defaults to 0. | |||
* <code>lastSlot</code>, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party. | |||
== MakeAndAddToPartyID == | == MakeAndAddToPartyID == | ||
Create a mon and add them to the party in the last open slot from a MonsterID. | Create a mon and add them to the party in the last open slot from a MonsterID. | ||
Arguments: | |||
* <code>pkm</code>, MonsterID: The ID to create from. | |||
* <code>name</code>, string, optional: The name to give the Pokemon. Defaults to the species name. | |||
* <code>ability</code>, string: The ability to give the Pokemon. | |||
* <code>level</code>, positive integer, optional: The level to set the Pokemon to. Defaults to 5. | |||
* <code>lastSlot</code>, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party. | |||
== SetUpPlayer == | == SetUpPlayer == | ||
Create a mon and add them to the party in the last open slot, with appropriate flags for a permanent leader character. | Create a mon and add them to the party in the last open slot, with appropriate flags for a permanent leader character. | ||
== SetUpPlayerID = | Arguments: | ||
* <code>pkm</code>, string: The Pokemon species to create. | |||
* <code>gender</code>, gender, optional: The gender to use. Defaults to genderless. | |||
* <code>name</code>, string, optional: The name to give the Pokemon. Defaults to the species name. | |||
* <code>ability</code>, string: The ability to give the Pokemon. | |||
* <code>level</code>, positive integer, optional: The level to set the Pokemon to. Defaults to 5. | |||
* <code>formNum</code>, positive integer, optional: The form number to use. Defaults to 0. | |||
* <code>lastSlot</code>, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party. | |||
== SetUpPlayerID == | |||
Create a mon and add them to the party in the last open slot from a MonsterID, with appropriate flags for a permanent leader character. | Create a mon and add them to the party in the last open slot from a MonsterID, with appropriate flags for a permanent leader character. | ||
Arguments: | |||
* <code>pkm</code>, MonsterID: The ID to create from. | |||
* <code>name</code>, string, optional: The name to give the Pokemon. Defaults to the species name. | |||
* <code>ability</code>, string: The ability to give the Pokemon. | |||
* <code>level</code>, positive integer, optional: The level to set the Pokemon to. Defaults to 5. | |||
* <code>lastSlot</code>, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party. | |||
== SetUpPartner == | == SetUpPartner == | ||
Create a mon and add them to the party in the last open slot, with appropriate flags for a permanent partner character. | Create a mon and add them to the party in the last open slot, with appropriate flags for a permanent partner character. | ||
Arguments: | |||
* <code>pkm</code>, string: The Pokemon species to create. | |||
* <code>gender</code>, gender, optional: The gender to use. Defaults to genderless. | |||
* <code>name</code>, string, optional: The name to give the Pokemon. Defaults to the species name. | |||
* <code>ability</code>, string: The ability to give the Pokemon. | |||
* <code>level</code>, positive integer, optional: The level to set the Pokemon to. Defaults to 5. | |||
* <code>formNum</code>, positive integer, optional: The form number to use. Defaults to 0. | |||
* <code>lastSlot</code>, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party. | |||
== SetUpPartnerID == | == SetUpPartnerID == | ||
Create a mon and add them to the party in the last open slot from a MonsterID, with appropriate flags for a permanent partner character. | Create a mon and add them to the party in the last open slot from a MonsterID, with appropriate flags for a permanent partner character. | ||
Arguments: | |||
* <code>pkm</code>, MonsterID: The ID to create from. | |||
* <code>name</code>, string, optional: The name to give the Pokemon. Defaults to the species name. | |||
* <code>ability</code>, string: The ability to give the Pokemon. | |||
* <code>level</code>, positive integer, optional: The level to set the Pokemon to. Defaults to 5. | |||
* <code>lastSlot</code>, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party. | |||
Latest revision as of 16:43, 21 October 2025
Main Page: Mod:Knightcore
The following functions are found in the MonsKC.lua file in Knightcore. These functions can be called from other lua script files by including the line require 'knightcore.MonsKC', and then called with the prefix MonsKC.
MakeID
Generates a monster ID from the specified parameters. Used for setting defaults.
Arguments:
pkm, string: The Pokemon species to create.gender, gender, optional: The gender to use. Defaults to genderless.formNum, positive integer, optional: The form number to use. Defaults to 0.
MakeAndAddToParty
Create a mon and add them to the party in the last open slot.
Arguments:
pkm, string: The Pokemon species to create.gender, gender, optional: The gender to use. Defaults to genderless.name, string, optional: The name to give the Pokemon. Defaults to the species name.ability, string: The ability to give the Pokemon.level, positive integer, optional: The level to set the Pokemon to. Defaults to 5.formNum, positive integer, optional: The form number to use. Defaults to 0.lastSlot, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party.
MakeAndAddToPartyID
Create a mon and add them to the party in the last open slot from a MonsterID.
Arguments:
pkm, MonsterID: The ID to create from.name, string, optional: The name to give the Pokemon. Defaults to the species name.ability, string: The ability to give the Pokemon.level, positive integer, optional: The level to set the Pokemon to. Defaults to 5.lastSlot, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party.
SetUpPlayer
Create a mon and add them to the party in the last open slot, with appropriate flags for a permanent leader character.
Arguments:
pkm, string: The Pokemon species to create.gender, gender, optional: The gender to use. Defaults to genderless.name, string, optional: The name to give the Pokemon. Defaults to the species name.ability, string: The ability to give the Pokemon.level, positive integer, optional: The level to set the Pokemon to. Defaults to 5.formNum, positive integer, optional: The form number to use. Defaults to 0.lastSlot, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party.
SetUpPlayerID
Create a mon and add them to the party in the last open slot from a MonsterID, with appropriate flags for a permanent leader character.
Arguments:
pkm, MonsterID: The ID to create from.name, string, optional: The name to give the Pokemon. Defaults to the species name.ability, string: The ability to give the Pokemon.level, positive integer, optional: The level to set the Pokemon to. Defaults to 5.lastSlot, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party.
SetUpPartner
Create a mon and add them to the party in the last open slot, with appropriate flags for a permanent partner character.
Arguments:
pkm, string: The Pokemon species to create.gender, gender, optional: The gender to use. Defaults to genderless.name, string, optional: The name to give the Pokemon. Defaults to the species name.ability, string: The ability to give the Pokemon.level, positive integer, optional: The level to set the Pokemon to. Defaults to 5.formNum, positive integer, optional: The form number to use. Defaults to 0.lastSlot, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party.
SetUpPartnerID
Create a mon and add them to the party in the last open slot from a MonsterID, with appropriate flags for a permanent partner character.
Arguments:
pkm, MonsterID: The ID to create from.name, string, optional: The name to give the Pokemon. Defaults to the species name.ability, string: The ability to give the Pokemon.level, positive integer, optional: The level to set the Pokemon to. Defaults to 5.lastSlot, positive integer, optional: The slot ID in the party to place them in. Defaults to the last slot in the party.
