Mod:Knightcore/MonsKC

From PMDOWiki

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.