Log in to reply

[SCRIPT] [RELEASED] On-Foot Cinematic Cam

  • Note to self: Shut Up!!!

  • A good 24 hours followed by a typically sh** 24 hours... can't win 'em all I guess. :(

    But while I was on my way back from shopping (at 1:30am), my mind was ticking over this block-timer I've added. One area that I am still not happy with, is when you walk behind something low, like a bench. Because it's long enough to trip the timer check, but low enough for you to still be fairly visible.

    So what I am also going to try, is adding a secondary check that runs from the camera, to either the upper torso, or the head. That way, even if you are blocked where the camera is aiming at, that should allow you to carry with the current camera, if a good percentage of you is still visible.

    Will it work? Probably. Will it work and look right? I really don't know... like most things, until you try it, you just don't know. But to me, a try and a fail, is far better than a don't try and never know.

  • Another slow day at the grindstone, bad case of fuzzy head syndrome. But what I have added is the second part of my block-timer idea, that adds a secondary check looking at the player's head. What that means, is that if you ever end up in a situation like this:

    alt text

    It won't trigger a camera change.

    It's not a situation that happens a lot but is likely when walking in the OnFoot camera mode. It just means there is one less situation that will trigger a camera change, when a change isn't really needed... or expected. It works well on the newspaper machines in Vinewood and will probably cater for things like the planters on the pier, or benches... short walls, that kind of thing... things that would normally trigger a change, even with the first version of this added timer, because they're too long to walk past.

    Edit: On a side note, I can't believe this thread is now 9 pages and 204 posts long... I'm amazed I'm the only one telling me to shut up. :)

  • @LeeC2202 Love your mod, and reading your new "diary". You don't need to stop posting updates.

  • @Akila_Reigns Thanks, I can be a bit verbose at times. :)

    Edit: This bit isn't meant as a direct comment to your last response, I just thought it best to add an edit, rather than jump my thread to the top again.

    I just can't help but snigger at these Reshade mods sometimes.... I'm not going to name the one I've just seen but it's probably handed out the most convincing demonstration yet, of just how good the Vanilla graphics are.

    I remember when I fist got into graphics, one of the first things I learned about TV pictures, is:

    1. Don't turn the contrast right up to maximum, because you'll crush the life out of the picture. Contrast determines maximum white, not minimum black... that's what brightness is for.
    2. Don't turn the colour all the way up, because you'll induce severe eye bleeding... maybe not quite true but it sounded good. Overly-saturated clothes are unpleasant to wear, there's a lesson there. ;)

    I used to have a shitty old Epson projector (it was great when I got it) that seemed to have a function in the picture processing algorithm something like if (black <= 50) { black = 0];. Watching some of these videos is like watching my old Epson projector again. :)

    But hey, going to bed with a smile on your face isn't that bad eh?

  • Sometimes, I spend so long looking for he ingenious, that I miss the bleedin' obvious, as our cockney friends might say. It was a couple of hours after I posted my last revelation about adding the secondary camera to my block-timer, that it occurred to me... why not just have the one check against the head and abandon the first one aimed at the player origin? If the second check is going to have the ultimate say on whether a camera change is triggered, then the first one has no say in anything, it is irrelevant.

    That's what happens when you do "have idea > write code" instead of "have idea > think about it > write code". So I am going to remove the first check via comment removal rather than deletion and see how it goes. I could be missing something that requires the first check but nothing springs to mind right now.

    After that, I need to have a really good sit and think about making some real progress with this mod, because it's stagnating. The more I rewrite stuff, the more I lose sense of which direction it should be going. I need to work out what still needs adding from the previous version and then what needs adding to make this better. Time to refocus my efforts and get things moving... it's been far too long since I released an update.

    Edit: And within about five minutes of tonight's test session, I realised why the idea was to have both checks. One case of a stray map object going across your head triggering a camera change was all that was needed... so two checks it is.

  • Well it seems today is going to be a day full of stupid things. I already posted (and deleted) something about how my vehicle camera was being confounded by where the vehicle was placed. After shutting everything down, it occurred to me why it as failing...

    If you jump back a couple of posts, I posted about my great idea of adding a timer to avoid the camera changing... it's great that it delays the point where it reports that the view is blocked... unless you need it to report it instantly that is, like it does with vehicle and melee cameras. :blush:

    I've been getting into fights and wondering why my views are getting blocked and why when I get into vehicles, there's a wall in the way. sigh

    So first task of the afternoon is to fix that cock-up...

    Edit: Turned out to be even more simple... and more stupid than that... say no more.

  • @LeeC2202 Wow, so the updated can be expected anytime? :) waiting for it.

  • @ashishcw Yes, it can be expected anytime but when it arrives, is a different matter. ;)

    Trust me, nobody is more annoyed at the length of time this is taking than me... and when I do stupid things like this last one, it makes me wonder if I should be doing this at all.

  • @LeeC2202 I could totally understand, but one more thing for sure, there are users of your mod like me, who will be waiting for the newer updates, doesn't matter how long it takes. We will wait for good.
    Cause your mod is one of the few mods, where an update news, comes as a treat to eyes :musical_score: , and it's totally worth the WAIT. :)

  • Finally dealt with something that has been bugging me for ages but like most small things, I keep putting it off. It now handles the situation where a vehicle is spawned with a trainer when you have got "Warp into vehicle" set on in the Trainer.

    This should also catch the situations where you switch players and the player you switch to is in a different situation to the one you switched from. For example, Trevor is on foot, switches to Franklin and Franklin is sat in his car.

    I know those might seem like things it should already do but the majority of how this mod works, is based on transitions from state to state, where a set sequence of tasks are carried out. For instance: Player is on foot > You press the "Enter Vehicle control" > Player tries to enter a vehicle > the player gets into the vehicle and starts the engine > the sequence stops. So when that sequence is suddenly changed to Player is on foot > Player is sat in a vehicle, it omits a number of tasks that switch the state into a relevant state. I wasn't checking for that because I was testing using the normal process.

    On top of that, there is now a set of probes for boats. Typically though, that didn't go smoothly. Some boats have a rudder, some boats don't have a rudder but have two seats, some boats don't have a rudder but only have a single seat. So now, if a boat has a rudder, the camera will use the Boat probes and focus on the rear of the boat. If they don't have a rudder but have seats, it will use the normal vehicle probes and will focus on the seats from relevant side. If it falls into the latter category of no rudder and just one seat, it will use the Motorcycle, quad-bike system where it uses the relevant side but focuses on the centre of the vehicle. I think that has all bases covered.

    Helicopters seem to work fine because they have doors like cars. Planes seem to work fine although I suspect the duster might need further attention... although I do like the camera view where it shoots from the front showing the player through the wings, so I might leave that. What the plane situation possibly means, is no need for the camera sections in the ini file but that does require further testing.

    I still have the pain-in-the-backside vehicles that allow you to use a turret or whatever, which don't complete the sequence in the normal way, which relies on you being sat in the vehicle with the engine running. I could just make my mod delete those from the game. ;) just kidding.

    It's tricky sometimes knowing whether to devote my time to new things, or testing existing things. Testing can eat up a lot of time, I can spend three or four hours in a single night just trying to break things, which is time I that could be used to create something. But from my experience, both are equally important, so both deserve the same attention. Although when I do get stressed, walking the streets as a sexy dead hooker is good for the soul... and as I sold mine years ago, it can't get much worse.:imp:

  • @ashishcw Thank you. :)

  • I was this close (imagine finger and thumb really close together) to releasing an update, when I decided to try and implement some of the new camera related actions, like rising and falling. If I get those two added quickly, and they don't break anything, then it could still be close... we shall see.

  • Al...most...here. :)

    New cameras implemented, nothing broken... Version 3.0 is about to enter... the building.

    I have no idea what to do about the changelog. I think the most appropriate thing to write is "Everything".. although that will be slightly misleading because it does in fact look pretty much identical at first glance. It's only as you start digging into it, that the differences start to appear.

    But based on the fact that I have had almost zero blocked views or any crashes for a couple of days now, I think it is stable enough to let people get their hands on it. I could do with some new testers anyway. ;)

    Edit: Pending approval...

    Double Edit: And approved it is...

  • I can't believe I uploaded the new version with a bug in it... well not so much a bug, just values left in for testing purposes that alter the frequency of certain camera types appearing. All this time trying to get it just right, and I still screw something up. :blush:

    Edit: FFS!!!! Now I've just realised that the version number of the file is going to say v3.1 but in the mod it's going to say v3.0

    I think there's a message in all this... quit and stop pissing people about until you can do something properly, without mistakes. Oh well, there goes sleep tonight. :(

  • @LeeC2202 Amazing, now gonna try my hands on with the newly updated version. :D :basketball_player_tone3:


    Eh, it happens. Small mistakes are okay :)

    It starts to get worrisome when you make changes that outright crash the game. Not even make your own mod crash and ScriptHookV catches the error/exception, but just outright crash it. ^^'

  • Have you ever sat there and wondered "How many CCTV cameras are there in this game?"... no? Must be just me then.

    Do you want to know how many there are in the game? Course you do, everyone loves pointless trivia... well there are precisely six hundred and ninety-seven. Imagine placing them one-by-one, by hand...

    Now you're thinking "Wow, that many really? It would be great if we knew where they were, what type they were and what street they were on."... aren't you? That just me as well then? You won't want to see this file then, that just happens to have them all listed... would you? ;)


    See, the thing about developers who get bored, is that they can then get entertained by the most mundane of things... like watching a camera scan the map in 20 unit steps at 30 units above the ground (or waves) scanning for CCTV cameras.... for 30 minutes, at a speed that's so fast, you can't actually see anything beyond a blur and the occasional notification that it's found a new camera... woohoo!! :)

    It was like one of those mesmerising loading bars you used to watch, or those speccy loading screens that used to appear a line at a time.

  • I like your style.

    Keep on truckin man, love keeping up to date with all this.

  • So yesterday was a bit of a downtime day after the previous night's rush.. and mess up. So today it's back to planning for where this mod needs to go next.

    I'd like the static cameras to do more, I'm just not sure there's enough time for them to do too much. I might try extending the timer out to the full duration to get a feel for how long they really last. I've also been considering integrating my state machine skeleton code into them to try and give them a bit more adaptability when it comes to performing actions. Just one of the many things running round my head that I want to try and make them do.

    I'm also going to do a bit of work with all the camera data that I collected... sorry, my drone collected. I'm going to use my Bus Route Planner app to plot out the locations of all the cameras on the map, so I can see what types of cameras are used in different areas. All that data might have no use but I'll have a better idea when I can see it in place. As another side project tied to that, I am going to look into sending keypresses to external processes again. I want to be able to trigger either Fraps or Bandicam to do a screengrab via software control. I've had one try and failed but I'm sure I can manage to fit in time for some more failures. :)

  • @LeeC2202 What would be the benefit controlling Fraps from a software control?

  • @DazRave I could send the software off round the map taking pictures of locations without me having to sit there pressing keys and watching it. As you can see from my recent posts, there are almost 700 CCTV cameras and I really don't want to press the screenshot key 700 times or so.

    But it would also mean I could do test grabs that are triggered by conditions in the code... it would be really useful to have.

  • Would a video work then? if you know when the video starts and you know the time each position was recorded. You could map that out against the time frame of the video?

    That way, only 1 key press needed.

  • @LeeC2202 Loving the newest version as always, the new cuts are much more crisp and fluid-feeling than before but unfortunately I've noticed a few things to bring to your attention.. keep it mind you know I love everything about the script thus far and only wish to see it bettered, this is in no way a talk-down or whatever of you work. I believe you're one of the most talented minds on the 5 modding scene at the moment personally.

    The first issue is the bug when you begin entering a vehicle (which starts a cinematic cam) but stop before you get in fully (say you just wanna rip the guy out of his car for whatever reason), the cinematic camera will remain forever, or until you force it to change via melee-ing a nearby ped or manually turning the cinematic cam on and off using shift + F11. In earlier versions, even in this scenario I believe the camera would turn itself off after 10 seconds, albeit awkwardly.

    The other, much more smaller issue I've noticed is sometimes you can run into a cramped room, and it seems some form of debug UI notification appears and tells you there are no available angles or something along those lines.. I can't remember what exactly, as I only had it appear on me twice, but I know if you walk into the bar out in Sandy Shores to play Darts it will trigger the notification.

    That brings me to my last issue, which was when I eventually got into a fistfight in the Darts bar, every time I would swing on someone it would cut the camera to the outside of the bar somewhere, looking at the exterior walls in whichever direction I was probably fighting inside. It seemed to not realize the building was in the way..

    Sorry to be the bearer of bad bugs, but once again, I only wish this mod and your work the best. Many thanks in advance!

    EDIT: seems I can't get the debug message to appear again, even after walking around through the bar. odd, maybe you can look into it regardless. either way it's not that big of a deal :P

  • @Zippo-Raid I'll take them in order:

    1. I'd seen this happen once and it was a nagging thing in the back of my mind since I changed the way things work. You've basically confirmed that it is, so that can go on my list as a fix that needs urgent attention.

    2. That's a situation I don't know how to avoid... the biggest peril of this mod, is that you can walk into spaces so small it just can't function properly. Whilst the notification is partly a debug message, it is also there to let the user know that the reason it has dropped out of the camera system, is because there are no free cameras. The annoying thing, is that scattered through the source files are warnings about things that need attention... this is one of them.

    3. This is worrying because it shouldn't activate inside. However, you have also highlighted one part of the testing process that I should have paid more attention to and that is what you can get up to inside a building.

    The biggest trap you can fall into with your own code, is testing with too much of a focus in a specific area. The result of that is that you get fairly common situations causing a problem, that you have just forgotten about.

    What you have posted is exactly what I need to hear from people when problems happen. I will never consider bug reports as anything other than essential pieces of information. People should never worry about saying "It doesn't work" because I am well aware of the simple fact that my level of programming skill will ultimately result in things that don't work at some point or another, and despite my best efforts, I don't always catch them all.

    Edit: So two of those fixes took literally 30 seconds and that's disappointing because had I taken those 30 seconds before releasing the new version, there would have just been the single problem.

    One was a case of a false being where a true should have been. My cinematic camera has a flag that basically says "Will this camera expire on a timer?" and I had it set to false... the copy & paste curse.

    The other simply required an "Are we inside?" check, to prevent it initiating a cinematic camera on an indoor melee fight.

    The last one is a pain, and I'll give you a prime example of why. When you walk out of any building, it registers as being outside, while you're still inside, so the camera system has to find a free camera in a corridor with a door blocking the exit. I could add a timer that delays it when you exit but there's nothing stopping you from simply standing in the doorway until the timer expires, at which point it will still fail... It's going to take some further thought to deal with that one. I'll release the version with those other two fixes shortly though.

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.