Stellaris

Stellaris

Video Player for Diplomacy Screens [3.10]
 This topic has been pinned, so it's probably important
主​​​Miͥภgͣcͫℝ♚  [developer] 14 Oct, 2023 @ 4:22am
generate and use videos
Required tools: ffmpeg, ImageMagick, gcc, additionally bc on Linux

1: Navigate to the /generate folder.
1.1: I actually recommend making a copy of it somewhere else and using that, to prevent the workshop synchronization from messing with it.
2: Put a video you want to be converted there. Make sure to remove any whitespaces from the name, replace them with underscores instead. It must be in the mp4 format.
3: Open a shell in that folder.
4: Execute the command "./generate.sh video_name" (Linux) or "generate.bat video_name" (Windows), with video_name replaced by the name of the file you put there. Do not include the .mp4 as part of the name.
5: Copy the /generate/gfx (NOT the root gfx) folder to your own mod.


To play a video, add the following code to an event:

diplomatic = yes picture_event_data = { portrait = video_name }


You can check whether this mod is installed after the start of the game like this:

if = { limit = { has_global_flag = mcr_video_player_enabled } // code goes here }
This allows for video playback to be an optional feature of any mod.
Last edited by 主​​​Miͥภgͣcͫℝ♚; 14 Oct, 2023 @ 7:29am