Go to file
2023-04-28 04:00:15 +02:00
dev Initial commit 2023-04-24 01:25:19 +00:00
.luacheckrc Initial commit 2023-04-24 01:25:19 +00:00
chatcommand_admin.lua Initial commit 2023-04-24 01:25:19 +00:00
chatcommand_player.lua Initial commit 2023-04-24 01:25:19 +00:00
chatcommands.lua Initial commit 2023-04-24 01:25:19 +00:00
config.lua Initial commit 2023-04-24 01:25:19 +00:00
globalsteps.lua Initial commit 2023-04-24 01:25:19 +00:00
init.lua Initial commit 2023-04-24 01:25:19 +00:00
internal.lua Initial commit 2023-04-24 01:25:19 +00:00
mod.conf Initial commit 2023-04-24 01:25:19 +00:00
priv_example.lua Initial commit 2023-04-24 01:25:19 +00:00
privs.lua Initial commit 2023-04-24 01:25:19 +00:00
README.md readme 2023-04-28 04:00:15 +02:00
screenshot.png Initial commit 2023-04-24 01:25:19 +00:00
settingtypes.txt Initial commit 2023-04-24 01:25:19 +00:00
setup.lua Initial commit 2023-04-24 01:25:19 +00:00

yl_cinema

Purpose

This mod allows staff or code to show movies to players.

Download

Get it from https://gitea.your-land.de/your-land/yl_cinema

Installation

Copy the "yl_cinema" folder to your mod folder and enable it in your world.mt.

Configuration

Find config in ./settingtypes.txt

yl_cinema.save_path = "yl_cinema_movies"
yl_cinema.admin_priv = "staff"

Modmakers

API: Call these function from your mod to show a movie to a player

success, msg, movielist = yl_cinema.listmovies(name, searchterm)

Parameters

  • name : string. The name of the player the movielist will be shown to.
  • searchterm : string or nil. An optional searchterm. If set, movielist will only contain the movies that have the searchterm in the title or description.

Returns

  • success : boolean. Is true if a movielist was returned. Is false if an error occurred
  • msg : string. Errormessage if success is false, number of movies if success is true
  • movielist : table of strings. Contains unordered list of movie_ids in the format {"id1","id7","id27","id3"}. May be empty {} if no movie was found.
success, msg = yl_cinema.showmovie(name, movie_id, target_player_name)

Parameters

  • name : string. The name of the player who sends causes the movie be shown.
  • movie_id : string. The movie ID that is means to be shown.
  • target_player_name : string or nil. The name of the player the movie is shown to.

Returns

  • success : boolean. Is true if a movielist was returned. Is false if an error occurred
  • msg : string. Errormessage if success is false, number of movies if success is true

Usage

There are two chatcommands to show players movies.

  • showmovie <name> <movie> : Shows to the the .

  • listmovies [<searchstring>] : Shows the whole movielist to you. Filter the movielist with .

Create a movie

Create a folder with the movie_id as name. Ask your admin which prefix, suffix or other markings are accepted.

Inside the folder, create a JSON file with structure {movie_id, name, description, title_texture, replay, [{order, texturename, caption, captionposx, captionposy, duration},{...}]}

Create a new folder inside the movie_id folder and name it textures. Place all the textures of your movie here. Please note, their filenames need to correspond to the title_texture and texturename from the pages.

Copy the movie to your yl_cinema.save_path, by default "yl_cinema_movies"

Uninstall

Remove it from your mod folder or deactivate it in your world.mt

Mods that depend on it will cease to work, if the mod is removed without proper replacement.

License

MIT