Jump to content

[1.12.x] Reviva - the IVA revival and editor/flight switcher. Bug fixing release. (1.0.0 - 17th Feb 2024)


610yesnolovely

Recommended Posts

KSP 1.12.x - Reviva - The IVA Revival!

Reviva Screenshot

KSP Reviva is the IVA Revival! For Kerbals who like to fly first person.

  • Supports multiple IVA mods at once (IVA mods not included).
  • Supports RPM and MAS.
  • Allows IVA internal switch via B9PartSwitch:
    • Allows selecting different IVA on each command module in editor/saves.
    • Allows for on-the-fly IVA switching while in flight.

Soon :: CKAN support so you can install Reviva and all the IVA mods you ever wanted.

Currently only stock IVA and some popular IVA mods are covered, the intent is to extended the coverage over time.

Required Mods

Recommended Mods

Optional Mods

Changes

1.0.0 Release - Major Updates by JonnyOThan

JonnyOThan is awesome! He's now a co-contributor for Reviva on GitHub, so he has full power and authority to do anything with the mod.

This release is mostly due to his hard work to really make this mod shine.

  • Giant refactoring of patches to make it easier to add support for mods and parts
  • Fixed bugs regarding RPM variable persistence and action group memos being lost
  • Fixed bugs that prevented ProbeControlRoom from working properly with Reviva
  • Added Apex and Kermantech options for mk3 cockpit
  • Fixed some configuration bugs

0.8.1 Release - Bug fixing (2nd Jan 2023)

Fixes:

  • Added support for AirplanePlus Mk1/0 Caged Inline (same as Mk1 Caged Inline).
    • Note that the part does not fit exactly and has the wrong interior window structure, but is better than nothing.

0.8.0 Release - Bug fixing (16th Dec 2022)

Fixes:

  • Fix GitHub Issue 9: Thanks to JonnyOThan:
    • Clone the partInfo so that changes to the internal config don't affect all instances of the same part.
  • Extra fix from Fix GitHub Issue 9, again thanks to JonnyOThan:
    • Fix an issue with internals that don't have crew capacity, exposed by FreeIva.

0.7.7 Release - BDB 1.11 Support (22nd Oct 2022)

Adds:

  • Slightly improved support for BDB 1.11 Release.
    • Hermes/Mercury: Added Placeholder (empty) and BDBAlternate (super minimal, non-functional)
    • Vinci/Gemini: Added Placeholder (empty) and BDBAlternate (old FASA, non-functional)
    • Kane/Apollo: Added Placeholder (empty) and BDBRPM (functional RPM variant of non-functional BDB)
    • Sina/LEM: Added Placeholder (empty) and BDB2 (new BDB non-functional IVA), the older BDB remains unchanged for compatibility.

NOTES:

  • Previous Reviva 0.7.6, 0.7.5, 0.7.4 will still work fine with BDB 1.11 - though the new non-functional LEM IVA will not be selectable.
  • Currently no LEM variants have IVA switching: ie. no engine cover, Taxi, Lab, Shelter. You get the BDB default only.
  • Similarly any Mercury, Gemini or Apollo variants (eg. Big Gemini or Apollo 5-Crew) do not have IVA switching, BDB default only.

0.7.6 Release - Moar IVA and BDB (24th Sep 2022)

Adds:

  • Support for:
    • Starilex Intra-Vehicular Solutions - an excellent retro Mk1 pod. Available for Stock Mk1 and BDB Hermes / Mercury CM. Uses RPM.
    • Max-Ksp MAS IVA Pack - excellent retro Mk1-3 and MEM pods. Available for Stock Mk1-3, Making History MEM, BDB Kane / Apollo, Sina / LEM. Uses MAS.
    • SABS_IVA: MAS-enabled IVA - partial support (it provides a full set of Stock and Making History pods using MAS) for Mk1, Mk2, Mk1-3, MEM and BDB equivalents. Uses MAS. These are work-in-progress, I may add configs for everything else later.
    • Snakeru's Mk2 Pod IVA - excelent retro style Mk2. Available for Stock and BDB Vinci / Gemini. Note that this is a ZIP file in a GitHub issue and is Beta, but to me is the best retro MAS style IVA for the Mk2.

0.7.5 Release - Airplane Plus (28th Apr 2022)

Adds:

  • Support for Airplane Plus:

0.7.4 Release - BDB experimental (28th Apr 2022)

Adds:

  • Added "Experimental" support for MOARdvPlus BDB Kane (Apollo) CM:
    • MOARdV's Avionics System (MAS)
    • Only covers the standard 3 crew Kane/Apollo CM.
    • Original MOARdVPlus FASA variants still present and unmodified, they're hidden, don't use them as they won't work as well.
    • Reviva MM config changed to support BDB 1.10.x naming
    • Specialized action group switches work (eg. EVA Light)
    • Glass variant also seems to work.
    • Interior model does not match exterior so "Interior Overlay" will not look great.
    • Will improve when BDB updates the interior.
    • Also even more "Experimental", all Mk1-3 IVA interiors also available and seem to be functional, but definitely look even more silly with "Interior Overlay". Will not ever fix this.

Fixes:

  • Fix MASFlightComputer support to correctly update config data.
    • This was required to get the MOARdVPlus special action groups to work.
    • Probably helps make other IVA a little more accurate.
  • Updated README.md with more IVAs, and links to completed mods.

0.7.3 Release - Bug fixes (12th Apr 2022)

Fixes:

0.7.2 Release - Bug fixes (11th Mar 2022)

Fixes:

  • Undocking two of same craft causing crash (GitHub Issue #3)
  • Correctly switch IVA for in-flight craft where multiple similar craft present (GitHub Issue #4)

0.7.1 Release - Stock and Missing History (28th Feb 2022)

  • Support Missing History KV-1, KV-2, KV-3, MK2 command pod and M.E.M. lander.
  • Configurations for Stock, ASET IVA for Making History Pods, and MAS alternatives for Mk2 and M.E.M (the KV pods are meant to be low to medium tech only).

0.7.0 Pre-Release (3rd Feb 2022)

  • Support for RasterPropMonitor (RPM) and/or Avionics System (MAS) IVA.
  • Covers stock command pods, cockpits, landers and cuppola only.
  • Configurations for Stock, RPM, MAS, ASET, DE_IVAExtension, Warbird Cokcpits and Ultimate Shuttle IVA variants.

For Players

If you like flying in first-person from the in-vehicle crewed cockpit, either in stock or using RPM and/or MAS, then this mod is for you.

Features:

  • Allow switching of IVA from stock to different alternates (if needed mods are loaded) using B9PartSwitch

    • This can be done from the editor, and the settings are saved with the ship design.
    • This can also be done live from flight! Use the PAW right-click menu on the command module when not in IVA (yup, not realistic, but this is KSP). This allows for the player to load this mod on existing saves and change IVAs on already flying craft, or to try out different IVA.
    • Without Reviva, only the "last" IVA mod for each command module would be available.
  • Links together stock and modded IVA into one place and provides limited patches to ensure they work in 1.12.x.

    • Note that this mod doesn't include the IVAs, but provides links for recommended or optional IVA mods, plus patches to allow them to run and be switched dynamically.
  • Very low overhead on in-game CPU/GPU performance: command modules get an extra ModuleIVASwitch, and switch detection only happens when changes are made.

    • Note however that all the Internal modules are loaded into memory, so load times will be a little slower, and memory usage a little higher for each IVA pack you install. Don't go too crazy. The best way is to look at all the different IVA mods for a particular command pod or cockpit, try them out and pick one or two.

    • Note that the first option is usually the non-functional stock or original mod IVA, these typically have less performance impact.

  • The different IVA selection does not change the characteristics, mass, cost or other data on the actual command pod: it's all visual for IVA. This means you can change at any time without penalty, by design.

Thanks

  • blowfish :: For B9PartSwitch which provides all the clever part switching and UI.
  • Electrocutor :: For ideas in WPF and KSP forum that inspired idea.
  • sarbian :: For Module Manager which provides ways to reconfigure everything.
  • alexustas :: For the amazing ASET IVAs and props.
  • MOARdV, JonnyOThan :: For Raster Prop Monitor (RPM), making IVAs look all fancy.
  • MOARdV :: For Avionics System (MAS), making IVAs look even more fancy.
  • DemonEin :: For DE_IVAExtension which provides decent IVA for all of stock.
  • Honk Hogan :: For IVA_ASET_MAKING_HISTORY which provides decent IVA for Missing History.
  • theonegalen :: For Warbird Cockpits IVA, and forum posts that inspired that this is possible.
  • G'th :: For the Ultimate Shuttle IVA.
  • linuxgurugamer :: For the hopeful adoption of this mod if I wander off in the future.

License

MIT License - (C) 2022 Harvey Thompson

Source

Repository on GitHub

For More Information

See the GitHub README

Edited by 610yesnolovely
Released 1.0.0
Link to comment
Share on other sites

6 minutes ago, Doc Shaftoe said:

I was just wondering if something like this was possible! It's very exciting to see this in action!

The idea came from the B9PartSwitch thread, both @theonegalen and @Bonus Eventus had experiments that suggested it was, so thanks to them for trail blazing. The motivation was I fly mostly first person, especially aircraft in IVA with TrackIR, joystick and throttle. Flight Sim KSP!

Bonus: I put in DE+MAS on most stock command pods (you'll need MAS, RPM, DE IVA and all their dependencies). This provides alternative IVA which are copies of the DE ones, but one or two of the MFD have been upgraded to MAS MFD's, which are superb.

Link to comment
Share on other sites

1 hour ago, Stone Blue said:

FINALLLYYY!!! :O

I know, all 22 of us who fly in IVAs will be happy (a joke from the MAS topic). I was just flying using the Mk1 Cockpit, the ASET variant is great, but it doesn't have access to NavUtils, so while in flight I switched to the DE IVA which does. However I might add an alternative that patches in an RPM MFD to replace the green screen CRT in that IVA.

That's the beauty of the system, you can use ModuleManager magic to do minor edits like this without even touching the other mod. I supply additional DE IVA alternates for all of stock which replace one or two ASET MFD with the brilliant MAS MFD, so you can select either DE or DE+MAS. The latter is probably my favourite setting. I also took time to add the Warbirds Metric and Imperial variants for the Mk1 Inline both normal and retro all in one part - I think @theonegalen will appreciate that, as they're such fantastic cockpits.

For modders it could be used to provide an empty IVA (for performance), and one or more alternative IVAs, and due to using B9PartSwitch, adding part upgrades is totally possible: you could have an analog command module with a couple of tech upgrades. I may add options for that for stock one day (it's on the task list).

The secondary point of the mod is to collect all the known working IVA mods with links and instructions (or CKAN config) in one place, so people can install them easily. Reviva will provide patches via MM to make sure they work (as much as possible).

Edited by 610yesnolovely
Link to comment
Share on other sites

@610yesnolovely yup... I was working on a couple variants of MacLuky's Lander Can IVA... One was a stock IVA, with just a 3rd seat & some aesthetic props added, one a basic analog RPM IVA, and one was a moar advanced, full-on, digital/glass ASET variant... It kinda sucked that you would have to mess with moving the .cfg files in/out of GameData, *BEFORE* starting the game to choose between them...

With Reviva, I might go bac and finish those :P

Now if we could just get this to work with Probe Control Room... Especially, since I *know* its possible, tho possibly buggy, that PCR can already be switched on *manned* IVAs, *in-game*, to use either PCR or the part's existing IVA

Edited by Stone Blue
Link to comment
Share on other sites

Excellent, the more IVA choices, the better. There's two ways you could do this: both would need to depend on Reviva - either change the IVA package itself and add a MM script to add an additional "SUBTYPE" node to the Mk1 Lander IVA supplied by reviva, or send me a pull request on GitHub to add it. The file in question is https://github.com/harveyt/reviva/blob/main/GameData/Reviva/Stock/mk1lander.cfg - ModuleB9PartSwitch with moduleID = IVASwitch and follow the same pattern.

If the IVA needs data in the RasterPropMonitorComputer - check the DE_IVAExtension SUBTYPE, you put it into the subtype - the Reviva DLL can handle both RPM and/or MAS settings: it essentially removes those modules and reloads them (a reboot) when you switch. If the IVA does anything more than that (changing other module via MM) those changes are probably not going to work, at least for in-flight switching and probably doesn't make sense anyway - for example the Ultimate Shuttle IVA changed the crew capacity which would be interesting in-flight (when you switch back, do the extra 3 kerbals go on forced EVA, or do you store them in carbonite...). Such edits, even in editor, may or may not work - I've not fully investigated that: if it's changing a property marked KSPField for example, in-editor, does that get saved for the vessel, and/or OnLoad/OnSave do it, or are the parts and modules always loaded from the part database.

As to Probe Control Room - I'm going to look at that soonish, after Missing History support, since I do use it myself. I'm guessing it's weird but from what you say, sounds like it'll be possible.

 

 

Edited by 610yesnolovely
Link to comment
Share on other sites

37 minutes ago, 610yesnolovely said:

As to Probe Control Room - I'm going to look at that soonish, after Missing History support, since I do use it myself. I'm guessing it's weird but from what you say, sounds like it'll be possible.

A while back, @JonnyOThan had been able to modify the PCR code to allow for using with *manned* IVAs, IIRC... Hopefully he may have some thoughts to share... Both on PCR compatability, as well as Reviva itself... I know *he* is a huge IVA player :P

Link to comment
Share on other sites

  • 3 weeks later...
On 2/3/2022 at 7:55 PM, 610yesnolovely said:
  • Allows IVA internal switch via B9PartSwitch:
    • Allows selecting different IVA on each command module in editor/saves.
    • Allows for on-the-fly IVA switching while in flight.

:O

Awesome! That's a giant leap forward for IVAs!

On 2/4/2022 at 1:54 PM, 610yesnolovely said:

The idea came from the B9PartSwitch thread, both @theonegalen and @Bonus Eventus had experiments that suggested it was, so thanks to them for trail blazing.

Yes, and I got it originally from  @Electrocutor, so all credit to them!

And thanks for the shout out!

Link to comment
Share on other sites

1 hour ago, theonegalen said:

Yes, and I got it originally from  @Electrocutor, so all credit to them!

And thanks for the shout out!

Gosh, yes, I remember reading about how it might be done in the WPF thread - I'll add that when I start adding in support for Making History, soonish, once I get to that in my play thru, I'm stuck on building probes - since I use Unkerballed Start :-). By the way, the Warbird Cockpits are excellent.

Link to comment
Share on other sites

On 2/27/2022 at 1:29 PM, 610yesnolovely said:

Gosh, yes, I remember reading about how it might be done in the WPF thread - I'll add that when I start adding in support for Making History, soonish, once I get to that in my play thru, I'm stuck on building probes - since I use Unkerballed Start :-). By the way, the Warbird Cockpits are excellent.

 0.7.1 Pre-Release (28th Feb 2022)

- Support Missing History KV-1, KV-2, KV-3, MK2 command pod and M.E.M. lander.
- Configurations for Stock, ASET IVA for Making History Pods, and MAS alternatives for Mk2
  and M.E.M (the KV pods are meant to be low to medium tech only).
 

Link to comment
Share on other sites

4 hours ago, Stone Blue said:

I'm hoping to maebbe add support for ASET Exploration Rover System pretty Soon™

 

Pull requests welcome!

Does the rover have other IVA configurations? Intrigued as to what you're thinking of doing. Cool stuff I'm sure. What I've done is added a MAS upgrade variant where I replace a couple of MFD with the improved MAS variant, and I'm going to do that with the ALCOR lander - it'll have just two configs: ALCOR and ALCOR+MAS.

Even then, if there's IVA / mods with just one IVA, my intention is to simply add links to the README and eventually add CKAN support for recommends/optionals such that it's easy to install all the IVA you could ever need.

My next tasks are to work on a CKAN and test it locally, and set up automation for publishing on CKAN, Curse, and Spacedock - I've seen a few modders provide python automation for this. I'm currently play testing also, finally reached crewed in UKS tech tree and so  thatprompted me to do the KV-1 (and missing history).

Link to comment
Share on other sites

19 minutes ago, 610yesnolovely said:

Pull requests welcome!

Does the rover have other IVA configurations? Intrigued as to what you're thinking of doing.

I'll probably just include the patch in ERS itself, when I push a bunch of changes/updates to LGG for it. Blurb & links for RevIVA will probably be in the new README I'm putting together for ERS.

It currently has a partial stock IVA, as well as partial ASET+RPM IVAs... wasnt quite clear, and it seems they werent completely working, due to the way they were setup in the cfgs/filenames.
Just doing final testing on the IVAs now.

I also have some unfinished work on a Lander Can IVA, I think Mcdouble was working on... Both 2-seat & 3-seat versions of stock IVA, basic RPM IVA, & advanced ASET IVAs.

I'ld like to do more MAS IVA's, but dang... they are sooo tedious & time consuming :(

Edited by Stone Blue
Link to comment
Share on other sites

21 minutes ago, Stone Blue said:

I'll probably just include the patch in ERS itself, when I push a bunch of changes/updates to LGG for it. Blurb & links for RevIVA will probably be in the new README I'm putting together for ERS.

It currently has a partial stock IVA, as well as partial ASET+RPM IVAs... wasnt quite clear, and it seems they werent completely working, due to the way they were setup in the cfgs/filenames.
Just doing final testing on the IVAs now.

I also have some unfinished work on a Lander Can IVA, I think Mcdouble was working on... Both 2-seat & 3-seat versions of stock IVA, basic RPM IVA, & advanced ASET IVAs.

I'ld like to do more MAS IVA's, but dang... they are sooo tedious & time consuming :(

Very exciting. More IVA the better. Having the IVA switching in another mod is great also - totally expect to see people do that. It'll help once I get CKAN working, then Reviva could be a recommend or option in ERS via CKAN.

And yes, making IVA of any kind seems time consuming. The way I cheated is to hand edit a couple of MAS MFDs using ModuleManager in Reviva itself as variants, as I use RPM and MAS together. The MAS MFD have much better navigation, and MechJeb support.

Interesting... I've found some IVA, especially fighter style cockpits or planes, don't let you look around too much. I use TrackIR in IVA (KSP Flight Sim 2005), so I may add something like this.

Did I imagine it, or did somebody have an IVA where they used external camera display parts as mirrors in a fighter cockpit? I may have seen this in another game and got confused, but it's a neat idea also.

 

Link to comment
Share on other sites

@610yesnolovely So, I sort of have two IVAs switching sucessfully. However, when I switch to one, textures for the IVA model are not being used.
I ask, does RevIVA access/load/define/do *anything*, with the IVA model?

The IVA I'm having an issue with, works perfectly without RevIVA installed.

Link to comment
Share on other sites

6 minutes ago, Stone Blue said:

@610yesnolovely So, I sort of have two IVAs switching sucessfully. However, when I switch to one, textures for the IVA model are not being used.
I ask, does RevIVA access/load/define/do *anything*, with the IVA model?

The IVA I'm having an issue with, works perfectly without RevIVA installed.

The mod uses the KSP API to load the model - in my testing of simpler stock IVA it works well enough, but sure, entirely possible that there's more to be done in more complex examples. Most of the time these things are "guess the api". If you look here: in https://github.com/harveyt/reviva/blob/22528d1ab2df6794e19975a8657376edf3696561/plugin/ModuleIVASwitch.cs#L165

The two calls that do most of the work are:

this.part.CreateInternalModel(); 

this.part.SpawnIVA();

I assume you're talking about switching the stock and ASET IVA in the ERS that you're working on? Perhaps available on GitHub so I can clone and take a look? Alternatively it's a process of looking at the API documentation for InternalModule, Vehicle, and anything similar looking for possible routines and trying them (which is how I got it to work). Possibly also do GitHub search to see if there's any KSP mods that do similar things.

Edited by 610yesnolovely
Link to comment
Share on other sites

9 minutes ago, Stone Blue said:

@610yesnolovely Kewl... I'll poke the code... In the meantime, I sent you a PM ;)

@Angel-125(WBI) and @Sir Mortimer(Kerbalism) - pinging these guys, did a search on GitHub and some of their mods use SpawnIVA(), in fact Angel's code seems to try to do IVA switching perhaps? I can't remember if I read that code a long time ago, but probably did. Probably won't get a response, but at least in a few months time they can tell us how to do it properly. :lol:

Link to comment
Share on other sites

2 hours ago, 610yesnolovely said:

@Angel-125(WBI) and @Sir Mortimer(Kerbalism) - pinging these guys, did a search on GitHub and some of their mods use SpawnIVA(), in fact Angel's code seems to try to do IVA switching perhaps? I can't remember if I read that code a long time ago, but probably did. Probably won't get a response, but at least in a few months time they can tell us how to do it properly. :lol:

It’s been a few years but my code created  the IVA after the inflatable part was assembled. It wasn’t so much about switching the Iva as it was making it show up. Making it switch is another thing. You can swap out the model and props with some effort but seat placement is fixed- or really hard to do and not something that I figured out.

For Buffalo 2 I plan on just a small model update rather than a wholesale replacement.

Link to comment
Share on other sites

5 hours ago, Angel-125 said:

It’s been a few years but my code created  the IVA after the inflatable part was assembled. It wasn’t so much about switching the Iva as it was making it show up. Making it switch is another thing. You can swap out the model and props with some effort but seat placement is fixed- or really hard to do and not something that I figured out.

For Buffalo 2 I plan on just a small model update rather than a wholesale replacement.

Currently Reviva manages to switch the IVA of all the stock cockpits essentially by doing DespawnIVA(), then sets the internal model name, calls CreateInternalModel() and finally SpawnIVA(). 

This works, and I've been using in real world play through, but assumes that the crew count is the same (it should be), the Ultimate Shuttle IVA doesn't have the same crew count (6 vs 3 in stock), so I fixed it in a patch. It seems this is enough to work, without doing stuff with parts, it's essentially what seems to happen (with the IVA at least) is loaded or goes on-rails and back. In game when you switch in flight, the Kerbals disappear into static for a while, then the IVA comes back with them sitting in a seat - what I think happens is that the proto vessel (used when on rails) has the Kerbal crew / seat set up saved, so the Despawn() removes the actual models, IVA, etc, then the internal model is recreated and spawned back in from the proto definition, Kerbals assigned to physically newly spawned seats again, etc. Viola, switched. I'm relying on the KSP code that does all the work usually, to do all the work in a "faked" off-on rails just for the IVA.

I have to handle some RPM and MAS specific cases - I destroy and recreate/reload the computers that run these after switching the module definitions dynamically, it doesn't seem to be actually required, but it's possible that some minor colour settings and configuration are missed. Mostly cosmetic. I also took care to keep the ordering of the part modules the same, though I'm not even sure that's needed.

Aside: Reviva is now on CKAN

Edited by 610yesnolovely
CKAN
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...