Go to file
2023-05-19 22:08:19 +02:00
dev Add json dependency and dev docs 2023-05-19 22:08:19 +02:00
json.lua Add json dependency and dev docs 2023-05-19 22:08:19 +02:00
.luacheckrc Add json dependency and dev docs 2023-05-19 22:08:19 +02: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
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 Add json dependency and dev docs 2023-05-19 22:08:19 +02:00
README.md Add json dependency and dev docs 2023-05-19 22:08:19 +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, movie = 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
  • movie : string containing Errormessage if success is false, table of movie if success is true
success, msg = yl_cinema.getmovie(movie_id)

Parameters

  • movie_id : string. The movie ID that is means to be shown.

Returns

  • success : boolean. Is true if a movie 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