auto-cam mod (beta) - anyone know how to toggle the cockpit on and off via MD or Lua?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

auto-cam mod (beta) - anyone know how to toggle the cockpit on and off via MD or Lua?

Post by kuertee » Wed, 23. Jun 21, 11:53

new edited post with new request:
anyone know how to show/hide the cockpit via lua or MD? it's for my auto-cam mod, which plays cutscenes while on auto-pilot. with the cockpit mode off, the ship is invisible during cutscenes.

here's beta 2 of my auto-cam mod: https://drive.google.com/file/d/14uzwpu ... sp=sharing

i think the cockpit mode is controlled with setting the "environment object" with the function setCockpitMode () in monitors.lua. anyone know how to call that from our custom lua?





previous post with old request:
Spoiler
Show
anyone here know how to code cutscenes (e.g. fly-by cutscenes) and want to contribute cutscenes to my unreleased auto-cam mod? egosoft's fly-by cutscenes could be better.
https://drive.google.com/file/d/1YP2pAT ... sp=sharing

auto-cam mod: triggers any of the 2 views: 3rd-person follow cam or a random cutscene with the player ship on focus
on these events: docking started, auto-pilot, station approach.
the view resets to first-person when docking is finished or when the player gets up from the pilot's seat.

there's no config yet in the mod, so the defaults are:
docking started: egosoft's Cutscene_undock_m cutscene. the actual docking cutscenes just didn't look right.
autopillot: any of one of these at the start and every 10-second intervals: Cutscene_flyby1, Cutscene_follow_and_rotate, Cutscene_orbit_and_zoom_1, Cutscene_orbit_and_zoom_2
station approach: 3rd-person follow cam

EDIT: nevermind, I figured out how to build cutscenes.
Last edited by kuertee on Sun, 27. Jun 21, 07:41, edited 2 times in total.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: auto-cam mod (beta). anyone know how to code cutscenes?

Post by Mycu » Wed, 23. Jun 21, 13:56

kuertee wrote:
Wed, 23. Jun 21, 11:53
auto-cam mod: triggers any of the 2 views: 3rd-person follow cam or a random cutscene with the player ship on focus
on these events: docking started, auto-pilot, station approach.
the view resets to first-person when docking is finished or when the player gets up from the pilot's seat.
Of course I had to check it out at least for a while...

Very cool idea. The camera on autopilot start and when docking is great. I'm still not fully convinced about the 3rd person camera when approaching the station - but knowing your mods I'm sure it will be possible to configure it. But I will definitely want to try it more.
The only thing I miss is some kind of timeout from the last played cutscene - so that there is a minimum time intetrval (eg a minute or two) between the auto-cams.

There could be also a rare, occsional cutscene cam when passing through the gate/entering sector.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: auto-cam mod (beta). anyone know how to code cutscenes?

Post by kuertee » Wed, 23. Jun 21, 14:30

Yeah, there’s a 10 second timeout before the next cutscene is played.

And, of course, the cutscene plays as long as the cutscene is programmed to play.

I’m still working out how the player can cancel the autopilot cutscene loop while on auto-pilot. Aborting the cutscene manually triggers the same event as the cutscene finishing, so its difficult to differentiate between the two.

The 3rd-person camera on approach helps with navigating around the station, I think.

And, yes, config options will be available.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: auto-cam mod (beta). anyone know how to code cutscenes?

Post by Mycu » Wed, 23. Jun 21, 14:46

kuertee wrote:
Wed, 23. Jun 21, 14:30
Yeah, there’s a 10 second timeout before the next cutscene is played.
I was able to start new one within a second after previous multiple times.

kuertee wrote:
Wed, 23. Jun 21, 14:30
I’m still working out how the player can cancel the autopilot cutscene loop while on auto-pilot. Aborting the cutscene manually triggers the same event as the cutscene finishing, so its difficult to differentiate between the two.
Pressing Esc on an autopilot's cutscene ends it for me without any consequences.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: auto-cam mod (beta). anyone know how to code cutscenes?

Post by Mycu » Wed, 23. Jun 21, 21:17

Do you think it would be possible to get the cockpit visibility setting (tuned on or off) when starting the cutscene, turn it on while playing and then restore this setting after the custcene ends?
I often play with the cockpit turned off which results in the ship not being visible in cutscenes.

kuertee wrote:
Wed, 23. Jun 21, 14:30
Yeah, there’s a 10 second timeout before the next cutscene is played.
Ok, now I understand what you meant. It autoplays every 10s when autopilot is on. I didn't flown on autopilot that much when checking it earlier, so haven't spotted it :)
Idea: maybe it should play just once when autopilot is being enabled and then sometimes when entering new sector.

Currently it also plays cutscenes on top of open map.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: auto-cam mod (beta). anyone know how to code cutscenes?

Post by kuertee » Thu, 24. Jun 21, 04:34

Mycu wrote:
Wed, 23. Jun 21, 21:17
Do you think it would be possible to get the cockpit visibility setting (tuned on or off) when starting the cutscene, turn it on while playing and then restore this setting after the custcene ends? I often play with the cockpit turned off which results in the ship not being visible in cutscenes.
ahhh, yes. i'll need to find the lua function for toggling it. I'm I saw it somewhere in the luas in the past.
kuertee wrote:
Wed, 23. Jun 21, 14:30
Ok, now I understand what you meant. It autoplays every 10s when autopilot is on. I didn't flown on autopilot that much when checking it earlier, so haven't spotted it :) Idea: maybe it should play just once when autopilot is being enabled and then sometimes when entering new sector.
I restructured the cues in a new version in which its more random rather than it playing intervals of cutscene and cockit.
Currently it also plays cutscenes on top of open map.
oh doh, i'll need to add those triggers to suppress the cutscene.

I'm currently looking at building better cutscenes (interspersed with building my Galactic council mod). I don't like the available cutscenes from the base game. I'm making my camera static. e.g. just view from front, view from back, view from side, 3/4 view, etc. without the sweeping camera views that are currently available.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: auto-cam mod (beta) - anyone know how to toggle the cockpit on and off via MD or Lua?

Post by kuertee » Sun, 27. Jun 21, 07:41

anyone know how to show/hide the cockpit via lua or MD? it's for my auto-cam mod, which plays cutscenes while on auto-pilot. with the cockpit mode off, the ship is invisible during cutscenes.

here's beta 2 of my auto-cam mod: https://drive.google.com/file/d/14uzwpu ... sp=sharing

i think the cockpit mode is controlled with setting the "environment object" with the function setCockpitMode () in monitors.lua. anyone know how to call that from our custom lua?
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Post Reply

Return to “X4: Foundations - Scripts and Modding”