Video in the elevator does not work after update

Avatar
Tullio
31 Posts
Posted May 09, 2012
Hi

As the title implies, videos in elevator does not work after update authoring tools.
Does anybody know how to fix?

thanks

Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted May 09, 2012
Replied 6 hours later
Are you trying a custom video to appear in them or is it a stock one?

Check if it was a custom one and accidentally was deleted during the update.

If it was a stock one, check into "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2\media" (or wherever you have your media files stocked) and assure that you have the video indeed...

Avatar
Rand0mNumbers
76 Posts
Posted May 09, 2012
Replied 24 minutes later
Videos aren't working here either. Valve's maps work fine, but my maps aren't working with them. I've tried removing "media/", the extension, both, and changing it to "/media/". Nothing. Not even the dlc2 videos work via the elevator transition instance.

EDIT:
If you have videos and upload to the workshop, they'll default to the animal king.

Avatar
Tullio
31 Posts
Posted May 09, 2012
Replied 14 minutes later
Hello josepezdj
Thanks for the reply.

The video is in the media folder and I put the address in a func_instance

img

Before the upgrade worked fine, now no video plays in the elevator

Avatar
josepezdj
2,386 Posts
Posted May 09, 2012
Replied 35 minutes later
I'll try to check out into the arrival_elevator_logic. There are many relays and scripts that could be pointing to modified paths... for instance, the video/splitter_nut could be now into a different pak01_dir.vpk (we've got now 3 of them!!).

I have no time for checking that out now... it's late here. I'll try tomorrow to check that out myself.

Good luck

Avatar
Tullio
31 Posts
Posted May 10, 2012
Replied 10 hours later

Quote:
... I'll try tomorrow to check that out myself.

Thanks josepezdj

I have tried to solve without success and I do not know where to put their own hands.

The videos in the maps from Valve are working normally.
Video on the community maps do not work: black screen :angrysquare:

Avatar
soptipp1
60 Posts
Posted May 10, 2012
Replied 13 hours later
Yep, this is probably something with the scripts for the elevator. I just tested a vgui_movie_display ingame. It showed a file from the /media folder the same way as before dlc 2.
Avatar
Wanderer2021
90 Posts
Posted May 10, 2012
Replied 35 minutes later
If you don't mind me asking, are you using the instances from the tube/turbine elevator folders, or the instances from the p2editor folder? Going by what Motanum demoed in his vids, I had used the p2e files rather than the older instances, and the videos worked fine. Now if your using custom vids, I have no idea.
Avatar
Tullio
31 Posts
Posted May 11, 2012
Replied 18 hours later
No. I've also followed the tutorial Motanum but still can not see the video in the elevator.
Avatar
josepezdj
2,386 Posts
Posted May 18, 2012
Replied 7 days later
Hey Tullio, and the rest! I have made the videos show in the arrival/departure elevators.

I'm going deeper into that but it'll take some time as it's a bit more complex than I thought to find out where is the issue located exactly!

They have modified the video_splitter.nut vscript including too many variables (...lol...) related to the new community chambers, like for example:

function StartDestructedDepartureVideo(width,height)
{
   local playDestructed = true
   local videoName = "";

   // If we're in a community map, pick a random one
   local communityMapIndex = GetMapIndexInPlayOrder()
   if ( communityMapIndex != -2 )
   {   
      if ( communityMapIndex == -1 )
      {
         communityMapIndex = GetNumMapsPlayed()
      }
         
      playDestructed = false;
      videoName = "media\\" + RandomVideos[communityMapIndex % RandomVideos.len()]
      // reprintl("Setting arrival movie to " + videoName )
   }
   else
   {
      local mapName = GetMapName()
      foreach (index, level in ElevatorVideos)
      {
         if (FIRST_CLEAN_MAP == level.map )
         {
            playDestructed = false
         }
         
         if (level.map == mapName && ("departure" in level) )
         {
            if( level.departure == "" )
               return
   
            local videoName = "media\\"
            if( OVERRIDE_VIDEOS == 1 ) 
               videoName += "exit_emergency.bik"
            else
               videoName += level.departure
               
            break
         }
      }
   }
      
   if ( videoName != "" )
   {
      //printl("Setting departure movie to " + videoName )
      EntFire("@departure_video_master", "SetMovie", videoName, 0)
      
      EntFire("@departure_video_master", "Enable", "", 0.1)
      StartVideo(playDestructed ? DEPARTURE_DESTRUCTED_VIDEO : DEPARTURE_VIDEO, width, height)
   }
}

Maybe the key is in the PlayDestructed = false line or around that... I don't really know how this script works exactly, I can only extract some logical information from that. Maybe another person could help us out with this in depth :biggrin:

At first I thought that maybe into this script the entity names referred have been changed because, and this detail is important, it's not that the arrival/departure elevator screens don't display the video you want them to, it's that it seems that the triggers/logic_relays are not fired: the screens are NOT emitting white light... they're completely dark, like if the logic_relay called "signs_on" into the elevator_logic instance was not fired, or like the one called "signs_off" would have been fired...

Anyway, I changed the video_splitter.nut into portal2/portal2_dlc2/scripts/vscripts/videos by the original one (located into portal2/portal2/scripts/vscripts/videos) and the videos show up again. This means that Valve screwed up something in this file...

At least we know where this issue is located... Someone please help us out from this on!

EDIT: btw, you can add whatever video into any /media folder (portal2/media, portal2_dlc01/media or portal2_dlc02/media) 'coz all of them will work.

Avatar
ChickenMobile
2,460 Posts
Posted May 19, 2012
Replied 14 hours later
Well you found the reason why.
The function GetMapIndexInPlayOrder() is obviously called to see if the map you are playing is a community map. A custom map will return -2 (I tested it). Not entirely sure when -1 would be returned (perhaps when you haven't played any community maps previously?). But because anything published inside the PTI editor will assume it is a community map, it will ovveride your video because of the script.

I tried doing this in a logic_auto however it seems like a no go
output: OnMapSpawn -> @arrival_video_master -> SetMovie -> media\videoname.bik

I think the only way in order to get a custom bik on your screen is to copy valve's old script and rename it. Inside the elevator instance, instead of using their script, replace it with your custom one.

Avatar
josepezdj
2,386 Posts
Posted May 19, 2012
Replied 8 minutes later
Yes chicken, I guess that's it: we should use the old script saving it as a different name and then simply put that new name into the logic_script entities inside the arrival_elevator_logic / departure_elevator_logic instances...

chickenmobile wrote:
Not entirely sure when -1 would be returned (perhaps when you haven't played any community maps previously?)

I think you're maybe right.

Avatar
Kasc
77 Posts
Posted May 19, 2012
Replied 3 hours later
Could someone provide this script or the location of it if it still exists please?
Avatar
josepezdj
2,386 Posts
Posted May 19, 2012
Replied 6 minutes later
Kasc, allow me to quote myself:> josepezdj wrote:

Anyway, I changed the video_splitter.nut into portal2/portal2_dlc2/scripts/vscripts/videos by the original one (located into portal2/portal2/scripts/vscripts/videos) and the videos show up again. This means that Valve screwed up something in this file...

So there are 2 ways for doing this, the easy and the complex:

Easy: you only have to copy the script (video_splitter.nut) located in portal2/portal2/scripts/vscripts/videos into the new folder portal2/portal2_dlc2/scripts/vscripts/videos. BUT that will erase the new video_spitter.nut file Valve created in there.

Complex: in order to avoid destroying files, which on the other hand is useless if you verify your game cache files because all original files will be recovered again, you should make a copy of the original script saving it with a different name, placing it into "portal2/portal2_dlc2/scripts/vscripts/videos" and then go into your arrival/departure_elevator_logic instances (click on "edit instance" on bottom left), find the entity called logic_script, open its properties, and where it says "Entity scripts" put the name you gave to your script. Then remember to save the arrival/departure_elevator_logic instances under different names.

Avatar
Kasc
77 Posts
Posted May 19, 2012
Replied 5 minutes later
Sorry, should have read instead of skim, my bad.

Thanks!

Avatar
Tullio
31 Posts
Posted May 20, 2012
Replied 14 hours later
Hello Josepezdj
Not knowing where to put my hands I have sidestepped the problem and I used the new instances to fit the map to the workshop.
The video in the elevator work if I start the map from the "community maps" of Portal 2, but they appear randomly and still do not work if I try the file directly *.bsp.
I do not know if it helps but I noticed that the trigger that sends output to the instance elevator_a4_logic signs_on is commented and his name appears red: / / signs_on:

img

I tried putting the exact name but the videos do not work.

We must find a way (if possible) to restore the personal choice of video in the elevator and make sure that everything works in the test map in Hammer and in workshops.

Thank you Josepezdj, thank you all for your interest.

Avatar
josepezdj
2,386 Posts
Posted May 20, 2012
Replied 36 minutes later
Hey Tullio:

Well, I also checked those red inputs and outputs, but the key is not really there. Because all those entities have been setted up always the same and they always worked out properly...

As those instances, the elevator instances, are just that, instances, you can make your one ones with your settings and get the videos to work. Follow these steps:

  1. Make a copy of the original script "video_splitter.nut" (located into "portal2/portal2/scripts/vscripts/videos" folder) saving it with a different name (like "my_video_splitter.nut"); then place it into "portal2/portal2_dlc2/scripts/vscripts/videos" folder.

  2. Go into your arrival/departure_elevator_logic instances, click on "edit instance" on bottom left corner of its properties window, find the entity called logic_script (in front of the vactube near 2 logic_relays... it looks like a written paper icon), open its properties, and where it says "Entity scripts" put the name you gave to your script, in our example my_video_splitter.nut. Then remember to save the arrival/departure_elevator_logic instances under different names ("my_arrival_elevator_logic.vmf" / "my_departure_elevator_logic.vmf" for example).

It's really simple, try this way. This simple change will save many other headaches messing around with the rest of triggers and relays in the instances... The only thing that Valve didn't polish too well here with the dlc2 was the video_splitter.nut script.

EDIT: In fact, there's no need to place the script (my_video_splitter.nut) into portal2/portal2_dlc2/scripts/vscripts/videos folder, it'll work if you place it into portal2/portal2/scripts/vscripts/videos... or even into portal2/portal2_dlc1/scripts/vscripts/videos

Avatar
Brainstone
401 Posts
Posted May 20, 2012
Replied 2 hours later
But when I copy this script, won't I need to pack it inside the BSP for the case other people are gonna use it?
Avatar
ChickenMobile
2,460 Posts
Posted May 20, 2012
Replied 7 minutes later

Brainstone wrote:
But when I copy this script, won't I need to pack it inside the BSP for the case other people are gonna use it?

You can pack any .nut file into the bsp using pakrat. But you will need to publish your file using the p2map_publish.exe in your portal 2/bin folder.

Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted May 20, 2012
Replied 18 minutes later

Brainstone wrote:
But when I copy this script, won't I need to pack it inside the BSP for the case other people are gonna use it?

Correct. As Chickenmobile says, you can add it with pakrat, I always embbed the files into the bsp with it.