Jump to content

Flying Airship Dev Aveza working LOD, proof of Concept, and script help required


kojak747

Recommended Posts

I've managed to get working LOD for the flying version of Dev Aveza airship. I saw the topic come up in this thread. The ship has full LOD and still functions correctly in flight.

This method works by exploiting the different versions of the same model available to the player, original, and dark. How the method works is to apply the 'IsFullLOD' flag to one of the ship references, whilst leaving the other model as is.

Applying the IsFullLOD Flag renders the ship model "un-sailable". But, (light bulb moment) you can switch to the other ship model, which doesn't have the flag set and voila, back to a fully functioning ship.

By swapping between the two models, you can fly, disembark, leave the cell, view the airship LOD, return to your ship and fly away. However, this all has to be done manually via the MCM currently and that's where I need help in coming up with a more elegant solution to make an efficient method of swapping between the two ship models.

So how can this be done? I don't want to touch any of the existing Dev Aveza scripts or nifs, at all. It's already fragile enough. It needs to be something light and efficient.

Perhaps some kind of script or variant of something like this ?

If the player is near (in the same cell e.g) as the airship, then enable the flyable model, else if the player is not in the same cell as the ship, then apply the LOD model.


Notes:

* Despite the models having different appearances, a simple texture replacer on install will do the job of making both models look identical. You can have one or the other.

* I don't think it's possible to bring the armed version into this as it has separate nifs, plus I never used it anyway so ignore that for now.

* Doesn't work on an existing game with Dev Aveza. Doesn't require DynDOLOD.

* Currently, you don't see the LOD on the first visit as the author set the dark variant as the default. You can see the LOD after your first flight by switching the model in the MCM.



PICS

Airship LOD 1

Airship LOD 2

Airship dark without LOD that CAN fly (NIF)

Airship dark without LOD that CAN fly (Tes5Edit)

Airship original with LOD that CANNOT fly (NIF)

Airship original with LOD that CANNOT fly (Tes5Edit)

Link to download > (the actual version I use is older, but more responsive and stable if you reduce forward flight speed to 14k) > ht tps://mega.nz/#!QhcF3AyQ!6cqCPniEUlCQmAs7wysQJ-rbQ-4FJHoR6GHOu4w3Sww

Link to comment
Share on other sites

If you are doing it in the MCM, then you have code that makes the switch, correct? Have you tried to put that code into an OnActivate event for the ladder or any of the movement controls?

 

Suggestion, have a Global Variable that tracks which model is active. If you don't want to edit the scripts on the ship, perhaps add a new activator to the deck that "prepares the rigging for flight" and use that to swtich the models. You can also have it "secure the rigging" to switch back to the LOD model.

Link to comment
Share on other sites

If you are doing it in the MCM, then you have code that makes the switch, correct? Have you tried to put that code into an OnActivate event for the ladder or any of the movement controls?

 

Suggestion, have a Global Variable that tracks which model is active. If you don't want to edit the scripts on the ship, perhaps add a new activator to the deck that "prepares the rigging for flight" and use that to swtich the models. You can also have it "secure the rigging" to switch back to the LOD model.

 

Interesting. Here's a pastebin link to the MCM script > https://pastebin.com/dMkAAuvz

 

I'm keeping an open mind at the moment and trying to get all the ideas on the table.

 

Other ideas that have been pitched (in another thread) include

 

"add a script containing OnCellAttach() / OnCellDetach() to the models(s) to enable / disable the respective models."

 

however Yausd pointed out that may not work because "one problem with that is that such a persistent reference attaches to the "SkyCell" that is always loaded. So the attach event fires when the player enter the world space"

 

Yausd also suggested "A distance check every few seconds between the ship and the player". to which DavidJCobb noted "If you're going to poll for distance, you may as well use an ability spell on the player (added via a quest alias) whose spell-side conditions check GetDistance"

Edited by kojak747
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...