jordi98cat 0 Posted October 20, 2021 Good morning, I would like to know if it is possible to put a video in a workshop mod and then show it on a server to all players. Currently I know how to create a mod in the workshop to put custom music but I would like to know if it is possible and how to put a video in the mod to subsequently put a command on a server to be played to all players. I have tried to search but I have not found a way, if anyone knows how to do it I would be very grateful. Share this post Link to post Share on other sites
7erra 629 Posted October 20, 2021 Have you checked out https://community.bistudio.com/wiki/BIS_fnc_playVideo? When do you want to play the video? at the start of each mission for each player individually or during the mission for everyone at once? or something else? 1 Share this post Link to post Share on other sites
WarhammerActual 23 Posted October 31, 2021 On 10/20/2021 at 4:56 PM, 7erra said: during the mission for everyone at once . I would be very interested in learning how to set that up for my MP server.. For training videos and classroom trainings. Ty in advance Share this post Link to post Share on other sites
pescadorrr 17 Posted October 31, 2021 its posible, you make a adddon first, and then you can use the resources in a mission, its the same than sound. the comand must be: ["directorio\video.ogv",[safeZoneX,safeZoneY,safeZoneW,safeZoneH]] remoteexec ["BIS_fnc_playVideo", -2]; Share this post Link to post Share on other sites
jordi98cat 0 Posted October 31, 2021 For 7erra (sorry I didn't know how to quote you, it's my first reply in this forum, sorry) I would like it to be played at a certain point in the mission to all players at the same time, although knowing the other way would not be bad either. Since the video is heavy, I would like to put it inside a mod but I don't know if it has to go as an addon with its config.cpp. So I don't know if I should put it in the mod by itself and call it in some way or if it should be done in another way. Thank you very much for your attention. Share this post Link to post Share on other sites
jordi98cat 0 Posted October 31, 2021 1 hour ago, pescadorrr said: its posible, you make a adddon first, and then you can use the resources in a mission, its the same than sound. the comand must be: ["directorio\video.ogv",[safeZoneX,safeZoneY,safeZoneW,safeZoneH]] remoteexec ["BIS_fnc_playVideo", -2]; then I make an addon with a config.cpp inside I put this ["directorio\video.ogv",[safeZoneX,safeZoneY,safeZoneW,safeZoneH]] remoteexec ["BIS_fnc_playVideo", -2]; and the address I start it from the folder of the adon I understand? Once this is done and compacted, how do I call it from the game to run it? Thank you. Share this post Link to post Share on other sites
jordi98cat 0 Posted October 31, 2021 On 10/20/2021 at 10:56 PM, 7erra said: Have you checked out https://community.bistudio.com/wiki/BIS_fnc_playVideo? When do you want to play the video? at the start of each mission for each player individually or during the mission for everyone at once? or something else? I would like it to be played at a certain point in the mission to all players at the same time, although knowing the other way would not be bad either. Since the video is heavy, I would like to put it inside a mod but I don't know if it has to go as an addon with its config.cpp. So I don't know if I should put it in the mod by itself and call it in some way or if it should be done in another way. Thank you very much for your attention. Share this post Link to post Share on other sites
7erra 629 Posted October 31, 2021 so for everyone at once at a certain point in the mission just execute ["\path\to\addon\video.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; if you are new to creating addons then I'd check this topic: But it is not necessary to creat an addon to play a video if you only intend to use it once. You can also play a video from the mission directory: [[], { [getMissionPath "path\to\video.ogv"] call BIS_fnc_playVideo; }] remoteExec ["spawn", 0]; This is a dirty solution security and performance wise but at least it's simple. The path is relative to the directory where the mission.sqm is. Here is also the better solution: Spoiler 1. Create a function with CfgFunctions. It only has to contain this: [getMissionPath "path\to\video.ogv"] spawn BIS_fnc_playVideo; 2. Execute it with: [] remoteExec ["TAG_fnc_runMovie", 0]; (or whatever you called your function) 1 Share this post Link to post Share on other sites
jordi98cat 0 Posted November 1, 2021 16 hours ago, 7erra said: so for everyone at once at a certain point in the mission just execute ["\path\to\addon\video.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; if you are new to creating addons then I'd check this topic: But it is not necessary to creat an addon to play a video if you only intend to use it once. You can also play a video from the mission directory: [[], { [getMissionPath "path\to\video.ogv"] call BIS_fnc_playVideo; }] remoteExec ["spawn", 0]; This is a dirty solution security and performance wise but at least it's simple. The path is relative to the directory where the mission.sqm is. Here is also the better solution: Hide contents 1. Create a function with CfgFunctions. It only has to contain this: [getMissionPath "path\to\video.ogv"] spawn BIS_fnc_playVideo; 2. Execute it with: [] remoteExec ["TAG_fnc_runMovie", 0]; (or whatever you called your function) First of all, thank you very much for the help, I will look at the guide you have given me very carefully as it will be very useful. The issue of putting the video in the mod and not in the mission is because of its weight, the load of the mission would be too long. That said I have tried the last option that you indicated me in the following way: My mod is called: 327thStarCorps. The mod I made for this is called: 327thVideo. Inside the folder: 327thVideo there is; Folder: category Inside category there is: fn_Video1.sqf Containing: [getMissionPath "327thVideo\film\video1.ogv"] spawn BIS_fnc_playVideo; Folder: film Inside film there is: Video1.ogv Config.cpp In the Config.cpp there are: class CfgFunctions { class 327th { class category { class Video1 {}; }; }; }; Having this as you have told me, I have compressed the addon in the Arma3 addon Build (binarized). I put it in the addon folder of my mod. 327thStarCorps. I updated the mod with the Arma3 publisher. I repaired the 327thStarCorps mod in the launcher to make sure it downloaded the latest version. I entered an editable mission, tested it on a hosted server on the internet. There I hit ESC and in the execution console I put: [] remoteExec ["327th_fnc_Video1", 0]; nothing happened, it didn't even give me an error, but the video didn't play either. I also tried with [] remoteExec ["327th_fnc_Video1.sqf", 0]; nothing happened either. Again thank you very much for helping me, I hope you can help me again. Share this post Link to post Share on other sites
7erra 629 Posted November 1, 2021 you also need to add a CfgPatches to your config.cpp and a PBOPREFIX. then you can use the path from your addon: ["\327thVideo\film\video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; Share this post Link to post Share on other sites
jordi98cat 0 Posted November 1, 2021 2 hours ago, 7erra said: you also need to add a CfgPatches to your config.cpp and a PBOPREFIX. then you can use the path from your addon: ["\327thVideo\film\video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; Okay, this time I have tried it: Mod is called: 327thStarCorps. The addon I made for this is called: 327thVideo. Inside the folder: 327thVideo there is; Folder: category Inside category there is: fn_Video1.sqf Containing: [getMissionPath "327thVideo\film\video1.ogv"] spawn BIS_fnc_playVideo; Folder: film Inside film there is: Video1.ogv Config.cpp In the Config.cpp there are: class CfgPatches { class 327thVideo { name = "327thVideo"; author = "reaper"; url = "" requiredVersion = 1.00; requiredAddons[] = {}; units[] = {}; weapons[] = {}; }; }; class CfgFunctions { class 327th { class category { class Video1 {}; }; }; }; txt file: PBOPREFIX 327thStarCorps\327thVideo with all this, when I enter weapon 3 in the main menu I get the error: Script \category\fn_Video1.sqf not found with all this I have entered the mission and I have tested it in hosted server and when entering: ["\327thVideo\film\video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; (in the extended debug console) has shown the following error: '["\327thVideo\film\video1.ogv"] I#IremoteExec ["BIS_fnc_playVideo", 0...' error missing ; again I am sorry to bring so many doubts but it is quite confusing. Thanks for your patience. Share this post Link to post Share on other sites
7erra 629 Posted November 1, 2021 You don't need the CfgFunctions if you are doing it via mod. This is only if you don't want to make a mod and use the mission directory instead. There isn't anything syntax-wise wrong with the remoteExec statement, try to type it 1:1 instead of copying it, this forum likes to insert invisible characters sometimes. Share this post Link to post Share on other sites
jordi98cat 0 Posted November 2, 2021 16 hours ago, 7erra said: You don't need the CfgFunctions if you are doing it via mod. This is only if you don't want to make a mod and use the mission directory instead. There isn't anything syntax-wise wrong with the remoteExec statement, try to type it 1:1 instead of copying it, this forum likes to insert invisible characters sometimes. I am a bit confused. I have tried the same thing but handwritten and I get the same error. What I want is to have the video in the 327thVideo folder (addon) inside the mod and call it through a thisaddaction. Could you tell me the correct way to do it, with the folders and the organization I should have, at some point I must be lost because it does not work. Thank you very much again and I'm sorry for so many questions, I'm embarrassed. Share this post Link to post Share on other sites
7erra 629 Posted November 2, 2021 (edited) to summarize: Your mod folder looks like this on your P: drive: Modname/ ├─ addons/ │ ├─ video/ │ │ ├─ video1.ogg │ │ ├─ config.cpp │ │ ├─ PBOPREFIX the config.cpp contains this: class CfgPatches { class Modname { // Meta information for editor name = "My Addon"; author = "Me"; url = "http://xkcd.com"; // Minimum compatible version. When the game's version is lower, pop-up warning will appear when launching the game. Note: was disabled on purpose some time late into Arma 2: OA. requiredVersion = 1.60; // Required addons, used for setting load order. // When any of the addons is missing, pop-up warning will appear when launching the game. requiredAddons[] = { "A3_Functions_F" }; // List of objects (CfgVehicles classes) contained in the addon. Important also for Zeus content (units and groups) unlocking. units[] = {}; // List of weapons (CfgWeapons classes) contained in the addon. weapons[] = {}; }; }; and your PBOPREFIX: Modname\addons\video now you should be able to play the video with ["\Modname\addons\video\video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; Edited November 2, 2021 by 7erra wrong cfgpatches Share this post Link to post Share on other sites
jordi98cat 0 Posted November 2, 2021 2 hours ago, 7erra said: to summarize: Your mod folder looks like this on your P: drive: Modname/ ├─ addons/ │ ├─ video/ │ │ ├─ video1.ogg │ │ ├─ config.cpp │ │ ├─ PBOPREFIX the config.cpp contains this: class CfgPatches { class Modname { // Meta information for editor name = "My Addon"; author = "Me"; url = "http://xkcd.com"; // Minimum compatible version. When the game's version is lower, pop-up warning will appear when launching the game. Note: was disabled on purpose some time late into Arma 2: OA. requiredVersion = 1.60; // Required addons, used for setting load order. // When any of the addons is missing, pop-up warning will appear when launching the game. requiredAddons[] = { }; }; }; and your PBOPREFIX: Modname\addons\video now you should be able to play the video with ["\Modname\addons\video\video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; hi, (I don't know what the "P: drive:" I have the 327thStarCorps mod on the desktop.) This time I have organized everything like this: 327thStarCorps/ ├─ addons/ │ ├─ 327thVideo.pbo/ │ ├─ 327thmusic.pbo/(this one was already in place and works fine) inside the 327thVideo.pob packaging there are: video1.ogg config.cpp PBOPREFIX.txt the config.cpp contains this: class CfgPatches { class 327thStarCorps { name = "327thStarCorps"; author = "Reaper"; url = "http://xkcd.com"; requiredVersion = 1.60; requiredAddons[] = { }; }; }; and my PBOPREFIX: 327thStarCorps\addons\327thVideo After, in game I put the command in the thisaction or in the debug console but I get the following error when saving the mission and executing the command. this addAction ["video", {["\327thStarCorps\addons\327thVideo\Video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0]}]; ["\327thStarCorps\addons\327thVideo\Video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; No entry 'bin\config.bin/CfgPatches/327thVideo.units'. Thanks again for all your patience. Share this post Link to post Share on other sites
7erra 629 Posted November 2, 2021 whoops I thought that the units and weapons arrays were optional. I updated the originial answer. Also finally found the correct BIKI page to give an introduction to creating addons: https://community.bistudio.com/wiki/Arma_3:_Creating_an_Addon (this is a new page and still WIP). After a bit more reading I think the P drive is not really necessary for such a small mod but if you want more info here you go: https://forums.bohemia.net/forums/topic/190353-howto-work-drive-setup-bulldozer/ Share this post Link to post Share on other sites
jordi98cat 0 Posted November 3, 2021 11 hours ago, 7erra said: whoops I thought that the units and weapons arrays were optional. I updated the originial answer. Also finally found the correct BIKI page to give an introduction to creating addons: https://community.bistudio.com/wiki/Arma_3:_Creating_an_Addon (this is a new page and still WIP). After a bit more reading I think the P drive is not really necessary for such a small mod but if you want more info here you go: https://forums.bohemia.net/forums/topic/190353-howto-work-drive-setup-bulldozer/ Hi, now with the changes the previous error was solved but when executing the script gives this error: Picture \327thstarcorps\addons\327thvideo\video1.ogv not found I will also try to do it with the P drive to see how it works. Thank you very much, I know it is tedious but I think we are on the right track 😃 Share this post Link to post Share on other sites
jordi98cat 0 Posted November 3, 2021 16 hours ago, 7erra said: whoops I thought that the units and weapons arrays were optional. I updated the originial answer. Also finally found the correct BIKI page to give an introduction to creating addons: https://community.bistudio.com/wiki/Arma_3:_Creating_an_Addon (this is a new page and still WIP). After a bit more reading I think the P drive is not really necessary for such a small mod but if you want more info here you go: https://forums.bohemia.net/forums/topic/190353-howto-work-drive-setup-bulldozer/ I have tried exactly the same but with the P: drive mounted but it does not work, I get the same error as above: Picture \327thstarcorps\addons\327thvideo\video1.ogv not found Share this post Link to post Share on other sites
7erra 629 Posted November 4, 2021 I am slowly running out of ideas as this is what I do for my mods. maybe you can check out CBA's repository and compare your setup with theirs: https://github.com/CBATeam/CBA_A3 Share this post Link to post Share on other sites
jordi98cat 0 Posted November 4, 2021 11 hours ago, 7erra said: I am slowly running out of ideas as this is what I do for my mods. maybe you can check out CBA's repository and compare your setup with theirs: https://github.com/CBATeam/CBA_A3 Could you pass me one of your mods with the video inside as an example to see exactly how it is and be able to replicate it? Maybe I ask too much but it would be great and as soon as I find the one I would bring it here so that the solution is written. Could you pass me one of your mods with the video inside as an example to see exactly how it is and be able to replicate it? Maybe I ask too much but it would be great and as soon as I find the one I would bring it here so that the solution is written. sorry again, thank you very much. Share this post Link to post Share on other sites
7erra 629 Posted November 5, 2021 Hmm I don't seem to have any mods that would showcase this best. I'll take some examples from CBA: https://github.com/CBATeam/CBA_A3/blob/master/addons/accessory/script_component.hpp#L2: #include "\x\cba\addons\main\script_mod.hpp" This is a file that resides inside of one of CBA's addons. The path points to a file inside of the "main" folder (this could also be a video, image, etc. for scripts and configs). Now if we look at the "main" addon we can find the script_mod.hpp. Inside of the main addon is also the $PBOPREFIX$: x\cba\addons\main This is the path that is used in the include statement. Also have you opened your pbo in a pboviewer to see if all the files are there? I can recommend this one by @SteezCram: 1 Share this post Link to post Share on other sites
Invizion112 0 Posted February 8 Hi guys i have some problems doing this ive pasted the script ive export the ogv file in the mission file and nothing happen , someone can plase help me Share this post Link to post Share on other sites