adding things, maybe
Go to file
2024-03-01 13:19:54 +03:00
dev dev folder: spec and testdata 2023-05-28 07:52:57 +02:00
json.lua Add json dependency and dev docs 2023-05-19 22:08:19 +02:00
models add a fixed (non-rotating) screen option 2023-07-21 01:32:11 +03:00
textures New icons 2023-08-21 11:16:55 +02:00
.luacheckrc Fix integration 2023-06-11 20:47:14 +02:00
api.lua Chatcommands 2023-05-30 14:02:45 +02:00
chatcommand_movie_imprint.lua Added chatcommands imprint and reload 2023-08-21 11:03:50 +02:00
chatcommand_movie_list.lua #4668 no24 2023-06-11 20:26:48 +02:00
chatcommand_movie_reload.lua Rework chatcommands 2023-07-30 10:07:25 +02:00
chatcommand_movie_show.lua #4668 no24 2023-06-11 20:26:48 +02:00
chatcommands.lua Added chatcommands imprint and reload 2023-08-21 11:03:50 +02:00
config.lua your-land/bugtracker#5187 Missing entity properties no longer lead to crash. 2023-08-24 11:00:59 +02:00
dependencies.lua Initialization: Loading movies and images 2023-05-28 11:37:07 +02:00
feature_bigscreen_crafting.lua Clarify precedence 2023-06-03 19:15:51 +02:00
feature_bigscreen_entity.lua set is_ground_content 2024-03-01 13:19:54 +03:00
feature_bigscreen_integration.lua add flatscreen to replacer and piston blacklists 2024-02-14 13:16:36 +03:00
feature_bigscreen_items.lua Added chatcommands imprint and reload 2023-08-21 11:03:50 +02:00
feature_bigscreen.lua #4668 no24 2023-06-11 20:42:12 +02:00
features.lua Add movie items 2023-06-02 08:40:09 +02:00
init.lua Add movie items 2023-06-02 08:40:09 +02:00
initialize.lua Added chatcommands imprint and reload 2023-08-21 11:03:50 +02:00
internal_initialize.lua Added chatcommands imprint and reload 2023-08-21 11:03:50 +02:00
internal.lua your-land/bugtracker#5259 Warning message when movie files have wrong type or are missing 2023-09-21 07:18:57 +02:00
mod.conf Fix integration 2023-06-11 20:47:14 +02:00
movie_schema.json Add schema the movies could be tested against 2023-09-21 06:27:42 +02:00
README.md update readme to have current command names 2024-01-08 20:27:14 +03: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 Onetime Setup 2023-05-20 01:48:59 +02:00

yl_cinema

Purpose

The yl_cinema mod enables staff or code to show movies to players.

Download

Download the mod from here.

Installation

  1. Copy the "yl_cinema" folder to your mod directory.
  2. Enable the mod in your world.mt file.

Configuration

The mod's configuration can be found in ./settingtypes.txt. Modify the following settings:

yl_cinema.settings.save_path = "yl_cinema_movies"
yl_cinema.settings.admin_priv = "staff"
yl_cinema.settings.enable_bigscreen = true
yl_cinema.settings.enable_craft_bigscreen = true
yl_cinema.settings.enable_craft_bigscreen_recipe = "wool:grey,wool:grey,wool:grey,wool:grey,wool:grey,wool:grey,wool:black,,wool:black"

The save_path is relative to the directory of the world that's using this mod.

Modmakers

API Functions

The yl_cinema mod provides the following API functions that can be called from your own mod:

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

Parameters:

  • searchterm (optional): A string used to filter the movie list by title or description.

Returns:

  • success: A boolean indicating whether the movie list was returned successfully.
  • msg: An error message if success is false, or the number of movies if success is true.
  • movielist: An unordered table of movie IDs in the format {"id1","id7","id27","id3"}. It may be empty {} if no movies were found.
success, movie = yl_cinema.showmovie(name, movie_id, target_player_name)

Parameters:

  • name: The name of the player who triggers the movie to be shown.
  • movie_id: The ID of the movie to be shown.
  • target_player_name (optional): The name of the player the movie is shown to.

Returns:

  • success: A boolean indicating whether the movie was shown successfully.
  • movie: A string containing an error message if success is false, or a table representing the movie if success is true.
success, msg = yl_cinema.getmovie(movie_id)

Parameters:

  • movie_id: The ID of the movie you want to retrieve.

Returns:

  • success: A boolean indicating whether the movie was retrieved successfully.
  • msg: An error message if success is false, or a table with the movie structure (as described in "Create a movie") if success is true.

Usage

The mod provides two chat commands for showing movies and listing movies:

  • /movie_list [<searchstring>]: Lists all movies. Optionally, you can provide a <searchstring> to filter the movie list.
  • /movie_show <name> <movie>: Shows the <movie> to the specified <player>.
  • /movie_reload [<movie_id>]: Reload specific <movie_id> or all movies, but does not create movie reel items.
  • /movie_imprint <movie>: Imprints the <movie> on the wielded reel.

Default itemstrings:

  • yl_cinema:bigscreen_base for the rotating screen base (projector)
  • yl_cinema:flatscreen_base for the static screen base
  • yl_cinema:movie_reel for the blank movie reel (needs to be imprinted).

Create a Movie

To create a new movie, follow these steps:

  1. Create a folder with the movie ID as the name. Consult your admin for any required prefixes, suffixes, or other markings.
  2. Inside the folder, create a JSON file with the following structure: {movie_id, name, description, title_texture, version, replay, [{order, texturename, caption, captionposx, captionposy, duration},{...}]}.
  3. Create a "textures" folder inside the movie ID folder and place all the textures of your movie in it. Ensure that the filenames correspond to the title_texture and texturename specified in the JSON file.
  4. Copy the movie to the yl_cinema.save_path, which is by default "yl_cinema_movies".

Uninstall

To uninstall the mod:

  1. Remove the mod from your mod folder.
  2. Deactivate it in your world.mt file.

Note: If other mods depend on yl_cinema, they will stop working if the mod is removed without a proper replacement.

License

This mod is licensed under the MIT License.

Dedication

This mod is dedicated to daydream, whose determined love for the movie Princess Bride willed this mod into existence.