Odessey.lua

*No download available for this framework yet.*

Odyssey.lua is a framework that adds the ability to possess enemies like in Super Mario Odyssey. You may customize the possession behavior and much more.

=Insallation= To load the API, place this line in your script.

This API requires a folder called. The is a required file in this folder must be a PNG file called

=AI= You may customize the AI of the NPC when it is possessed. To make an AI function you set it up as:

This function is organized by NPC's IDs and will get called during onTick and pass  as an NPC object. The NPC passed is the current enemy that is possessed.

Example:

If an enemy is possessed and it does not find a defined function it will instead use ai[0]. This is the only ai that is defined in the API and it is the function shown below. The API will only use this AI if it does not find an AI for the set ID. You may also redefine this AI if needed.

=Hat= This table holds customizable values and other data for the hat. You can customize the hat by changing some of these values.

=HatNPC= This table holds customizable values and other data for the hat possession effect. This will only be active when  is set to

=PlayerIMG= This is a table that contains all of the characters images of them in their normal and hatless value.

The structure of the table is as follows:

By default, it will load the player images inside the "Odyssey" folder. File names with an h stand for files that represent the player hatless. For example, placing an image called "mario-1.png" will make mario be that image when he has a hat, and setting an image called "mario-1h.png" will make Mario turn into that image when he activates his hat. If the image is not found inside the folder, it will not swap the player's images. The images supported are all of the powerup files (mario-1.png, luigi-2.png, megaman-1.png), and all of the death effects (3,5,129,130,134,149,150,151,152,153,154,155,156,157,158,159,160,161).

=OnDeath= The API by default kills the player if they are possessing an enemy as it is dying. You may replace it with your own behavior. You can have a behavior per-NPC.

The API has two default functions:  and. The first function is the default behavior, and the second function will revert the player back. You can also make the value nil, and no actions will happen when the NPC dies.

=Misc=

=CUSTOM AI= You can put here your own custom AI!