Jump to content

A21.1 VideoPlayers Mod


xyth

Recommended Posts

VideoPlayers Modlet (Single Player Stable)

Note: Seems to work on Dedi, if you follow the install instructions, otherwise it will crash your server!  You were warned.

 

This A21 modlet now combines several A18/A19 modlets (Video Players, Billboards, and Theater Screens)

 

You must connect a wire to each device using the wire tool to activate it, then you can remove that wire.  

 

 

YouTube Video:

   

YouTube Video:

YouTube Video:

 

Description

 

 

Introduces mass media into the game.  Be sure to active each of these with a wire using the wire tool.  

 

 

Billboard01 is a mechanical billboard that shows 3 unique images on each side of the billboard. This is a single texture sheet which you can edit in a graphics program then import into unity and the reexport.

 

BillboardVideoMP4 is a electronic version, that will play 12 video clips in rotation. Like 12 TV channels.  Best part is you can replace the 12 video files in the mods/resources folder with your own.  In default, video0 is static, 1 is a cartoon clip, and 3 a classic video.  All the rest are static.  

 

Theater Screen  Adds a flat theater screen into the game. Designed with POI makers in mind, this screen is 16:9 format and 8x5 blocks in size. 

 

VideoTV is a large tabletop television that will play 12 video clips (or entire movies) in rotation. 

 

TVWall is a wall mounted version setup to replace the existing small wall mounted televisions. Its currently set to replace 20% of them but that can be adjusted in xml.  Some will be on by default, playing static, but otherwise are broken.  Replace video0 with a public service disaster message of your choice.

 

If you put down a land claim block you can pick these up by holding the E key.

 

Installing

 

Single Player

 

Normal mod install.  Drop the mod into your Mods folder and your done.  If you swap out any of the videos, they must have the exact same name and file extension as the one you're replacing. Those names are hard coded. It won't like strange .mp4 encoding so keep it simple.  Encoding help can be found in the old thread.

 

Dedi   Experimental - read carefully

For some reason, the dedicated servers default startup file named startdedicated.bat has a Unity startup parameter -nographics .   -nographics means dont load various shaders and the video decoding files needed to render video.  So your job is to edit that file before starting up the dedi.

 

On about line 69 of that file you will see this line:         start %GAMENAME% -logfile "%LOGFILE%" -quit -batchmode -nographics -configfile=serverconfig.xml -dedicated

 

Change it to:     start %GAMENAME% -logfile "%LOGFILE%" -quit -batchmode  -configfile=serverconfig.xml -dedicated

 

Failure to do this properly will crash your dedi hard and fast.

 

Download

The Modlet can be found here: https://github.com/7D2D/A21Mods/blob/main/VideoPlayers.zip or in the ModLauncher.

 

Known Issues

 

Sometimes the sound plays for a few seconds if you enter the game next to a billboard that has sound. This is because I need to active them on start as I can't use code to do that. Minor annoyance. 

 

You need to activate a newly placed video device by attaching a wire to it, but you can immediately remove that wire. That is because I'm using the switch class and it expects a wire to the switch. No way to fix that without code.

 

Videos need to be in .mp4 format.   There is a limit to how much memory can be allocated to video, so 12 long movies may well crash the server.

 

Edited by xyth (see edit history)
Link to comment
Share on other sites

Thanks for the update but there's a little error for the "</recipe>" here:

 

<recipe name="Billboard01" count="1" >
            <ingredient name="resourceMechanicalParts" count="10"/>
            <ingredient name="resourceElectricParts" count="10"/>
        </recipe>    
        <effect_group>
            <passive_effect name="CraftingIngredientCount" level="0,1,2,3,4" operation="perc_add" value=".56,.56,.56,.34,.15" tags="resourceElectricParts,resourceMechanicalParts"/>
        </effect_group>

 

Like for all previous version, TheaterScreen need this:

<property name="ModelOffset" value="0.5,0,0.5"/>

 

If not, seem like not to work, the video don't show & got this yellow console error:

wrn audiomanager loadaudio failed to load audio source object for audiosource_interactfullvolume

(But I play with a20b238, do this need the last version ?)

Link to comment
Share on other sites

20 hours ago, xyth said:

if you link your logfile I will see if I can help.

 

Not sure if thats it ? I also tested in with no other Mods.

 

Mono path[0] = '/home/zugi/Games/steamapps/common/7 Days To Die/7DaysToDie_Data/Managed'
Mono config path = '/home/zugi/Games/steamapps/common/7 Days To Die/7DaysToDie_Data/MonoBleedingEdge/etc'
Preloaded 'libEOSSDK-Linux-Shipping.so'

 

Edited by xyth (see edit history)
Link to comment
Share on other sites

Oky, I tested & that's work with a20.3b3 but sadly not with a20b238 & so it's seem like a "bug" of the audio manager from a20b238.

 

That's work so that can be oky but if not (with a20.3), all TV have a problem to load correctly the next video, the sound is always read but the video have difficulty to show up on the TV (it's black screen). After several reading cycles all video can be read but example, can read video only 1,2,5,6,9 ect & the next round cycle that read only 1,3,6,7,9 ect I use my personnel video (all encoded in the same way) but it's the samething.

 

Edit: Just say LOLLL

The mod work finally with a20b238, because I renamed the mold folder & so I let the original name then the mod work well ! I can play all video without any black screen... But it's very strange, because I already rename many mods & that work well, it's the first one who don't want...

 

& I forget onething, your link go to a19 mod & not a20 mod, that can make confuse when people download & that not work at all...

Edited by Life_For_Dead (see edit history)
Link to comment
Share on other sites

5 hours ago, Life_For_Dead said:

Oky, I tested & that's work with a20.3b3 but sadly not with a20b238 & so it's seem like a "bug" of the audio manager from a20b238.

 

That's work so that can be oky but if not (with a20.3), all TV have a problem to load correctly the next video, the sound is always read but the video have difficulty to show up on the TV (it's black screen). After several reading cycles all video can be read but example, can read video only 1,2,5,6,9 ect & the next round cycle that read only 1,3,6,7,9 ect I use my personnel video (all encoded in the same way) but it's the samething.

 

Edit: Just say LOLLL

The mod work finally with a20b238, because I renamed the mold folder & so I let the original name then the mod work well ! I can play all video without any black screen... But it's very strange, because I already rename many mods & that work well, it's the first one who don't want...

 

& I forget onething, your link go to a19 mod & not a20 mod, that can make confuse when people download & that not work at all...

 

I fixed the download link, thanks.  

 

I'm not sure if your saying the mod has an issue on 20.3 or not.  If there is an issue on 20.3, please let me know.

Link to comment
Share on other sites

16 hours ago, xyth said:

 

I fixed the download link, thanks.  

 

I'm not sure if your saying the mod has an issue on 20.3 or not.  If there is an issue on 20.3, please let me know.

 

Seem to work well with 20.3 but it's a little difficult to place the TheaterScreen, IDK if it's the problem of the game or the block itself but need to be like +/-5m from where we want to place it. Anyway, thanks again !

(Note, IDK for any Billboard because I don't use it & the video00.mp4 for any POIActive will need maybe a little lower sound by 50% that was I do myself.)

Edited by Life_For_Dead (see edit history)
Link to comment
Share on other sites

THANK YOU SOOO MUCH for updating it.

 

Just a few questions:

1: 12 is the max possible amount of vids or could you add even more

2: IF you could add more could you add a "remote" so we don't have to turn the screen on/off until we reach the vid but select it directly OR add a TV/Billboard for every video so it plays just 1 vid in a loop?

3:is there a way to skip forward or rewind IN a  video (not switch from vid 1 to vid 2)

Link to comment
Share on other sites

I have an issue, didn't see it here. The video flickers for me. It is not a steady video, it does it with all the videos, on all the screens. The weird part is, it only happens to me in game. I am the host, and the other people in game see a steady video. I figured maybe it's something in my settings or something, but I couldn't figure it out. Any idea what I might need to change, or have you heard of this yet? I love the mod, just wish I could actually watch the videos. Thanks for making it, I appreciate the effort.

Link to comment
Share on other sites

On 3/4/2022 at 8:54 PM, kanealpha said:

THANK YOU SOOO MUCH for updating it.

 

Just a few questions:

1: 12 is the max possible amount of vids or could you add even more

2: IF you could add more could you add a "remote" so we don't have to turn the screen on/off until we reach the vid but select it directly OR add a TV/Billboard for every video so it plays just 1 vid in a loop?

3:is there a way to skip forward or rewind IN a  video (not switch from vid 1 to vid 2)

 

It used to be 3, I changed it to 12.  More is possible but there isnt a good way to select each video, so 12 is a lot to click through already.   Playing 1 video in a loop could be done.    No way to rewind , sorry

 

 

7 hours ago, MurphyLLama said:

I have an issue, didn't see it here. The video flickers for me. It is not a steady video, it does it with all the videos, on all the screens. The weird part is, it only happens to me in game. I am the host, and the other people in game see a steady video. I figured maybe it's something in my settings or something, but I couldn't figure it out. Any idea what I might need to change, or have you heard of this yet? I love the mod, just wish I could actually watch the videos. Thanks for making it, I appreciate the effort.

 

No idea, sorry.

28 minutes ago, dujinyuan said:

yeah....hey there...there's just one little questions     

       Why i can hear the videos and it's not my?   I mean i don't trun on the video.... why this thing can still work 

 

There is one wall tv that replaces the vanilla small tv that plays static, or could play a public message if you changed that video0

Link to comment
Share on other sites

For flickering video, it might be due to having two screens in close proximity playing the same video with the same videoplayer. I had that problem with a similar project I was testing--two screens next to each other with the same clip stuttered, but were fine with different clips (mine were actually different blocks which upgraded to the next block/clip in an endless loop).

Link to comment
Share on other sites

On 3/12/2022 at 2:58 PM, xyth said:

 

It used to be 3, I changed it to 12.  More is possible but there isnt a good way to select each video, so 12 is a lot to click through already.   Playing 1 video in a loop could be done.    No way to rewind , sorry

 

 

 

No idea, sorry.

 

There is one wall tv that replaces the vanilla small tv that plays static, or could play a public message if you changed that video0

increasing 3 to 12 is already fantastic indeed. but more is always better. But obv. not if it means a ton of complicated extra work on top.  Its just with 3 videos i had an idea for 6, now with 12 i have already 16+ potential vids of all sorts, short and long, i wanna play (thats why i had the idea for the 1 looping video screens so i can place screens according to "themes")

Link to comment
Share on other sites

Yeah it would be nice if there was a setting or something to just play all 12 (or however many) videos one after another, then start over and keep playing them all. You probably need a loop command to do it. I used to make those for mIRC. They look like this, (I know it's a different language, but maybe it might help).|

 

Spoiler
alias nestedLoopExample {
  var %x = 1
  ;outer loop
  while (%x <= 3) {
    var %y = 1
    ;inner loop
    while (%y <= 3) {
      echo -a %x - %y
      inc %y
    }
    inc %x
  }
}

This code will generate the following output:

1 - 1
1 - 2
1 - 3
2 - 1
2 - 2
2 - 3
3 - 1
3 - 2
3 - 3

 

Also, I can't seem to connect power to the Theater screen. The other ones seem to work though. If you made one the size of the vanilla Large TV, that would be cool.

 

OH, and here is an idea...make the billboards have room to put a solar panel and battery bank. That would make getting power to them easier.

Edited by Zagan (see edit history)
Link to comment
Share on other sites

This mod was made so no code was needed, and as such, has limited functionality.  It really needs an update with code to make a video selection interface, but that's not something I can do, I'm Unity and xml only.  

 

Theater screen can be hooked up, you just need to find the spot on the bottom.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...