[Release] Clear HUD 1.3 and Sniper Sight for Clear HUD
Moderators: winston, another_commander
Re: [Release] Clear HUD
Uploaded a new version with persistent log screen
- Rese249er
- ---- E L I T E ----
- Posts: 647
- Joined: Thu Jun 07, 2012 2:19 pm
- Location: Well, I WAS in G3...
Re: [Release] Clear HUD
I was not aware of that! To the text editor!another_commander wrote:...you can make it persistent if you want. Just set the permanent key toyes
...
Got all turned around, lost my nav connection... Where am I now?
Re: [Release] Clear HUD
Another new version (now with version number! ).
Download here: https://www.box.com/s/8m0m4f3rxw1xwl2qcd1r
- Integrated cim and spara's Talkative space compass with distances and time calculation.
It works exactly like in Aad-HUD. When condition is green, it shows constantly the distance and the time to arrive.
- Cyan crosshair when condition is yellow or red. Dark grey in green condition.
We need a bright crosshair only when fighting.
- Additional upper shileds and energy indicators in yellow and red conditions.
Useful when fighting, as we don't have to move the eyes to the extreme left side of the screen to see the shields and enegy state.
New screenshots in the first post
Download here: https://www.box.com/s/8m0m4f3rxw1xwl2qcd1r
- Integrated cim and spara's Talkative space compass with distances and time calculation.
It works exactly like in Aad-HUD. When condition is green, it shows constantly the distance and the time to arrive.
- Cyan crosshair when condition is yellow or red. Dark grey in green condition.
We need a bright crosshair only when fighting.
- Additional upper shileds and energy indicators in yellow and red conditions.
Useful when fighting, as we don't have to move the eyes to the extreme left side of the screen to see the shields and enegy state.
New screenshots in the first post
- Gimbal Locke
- ---- E L I T E ----
- Posts: 293
- Joined: Sun Jan 08, 2012 11:32 pm
- Location: Brussels
- Contact:
Re: [Release] Clear HUD
I like the Clear HUD design very much, but it does not play well with the Sniper Sight OXP: in the middle of a fight, the sniper sight often suddenly disappears.
I _think_ it is when the Clear HUD cross hairs change colour that I get kicked out of Sniper Sight.
(As with all other HUDs, the HUD layout changes while the Sniper Sight is enabled, maybe it would be a nice to integrate the Sniper Sight completely into the Clear HUD? But I know I'm asking a lot now.)
I _think_ it is when the Clear HUD cross hairs change colour that I get kicked out of Sniper Sight.
(As with all other HUDs, the HUD layout changes while the Sniper Sight is enabled, maybe it would be a nice to integrate the Sniper Sight completely into the Clear HUD? But I know I'm asking a lot now.)
Re: [Release] Clear HUD
You see the crosshair changing, when the script switches the hud.
But, I have no idea how to fix the problem with Sniper Sight.
At the moment, my scripting capabilities are quite limited...
However, I prefer to not integrate Sniper Sight. I like to keep the hud as simple as possible. But everyone is free to take the hud, modify and release modified versions at will. I'll be glad to try and use any variantion and improvement.
But, I have no idea how to fix the problem with Sniper Sight.
At the moment, my scripting capabilities are quite limited...
However, I prefer to not integrate Sniper Sight. I like to keep the hud as simple as possible. But everyone is free to take the hud, modify and release modified versions at will. I'll be glad to try and use any variantion and improvement.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: [Release] Clear HUD
Gimbal Locke wrote:I like the Clear HUD design very much, but it does not play well with the Sniper Sight OXP: in the middle of a fight, the sniper sight often suddenly disappears.
I _think_ it is when the Clear HUD cross hairs change colour that I get kicked out of Sniper Sight.
The problem is the last two lines of this function in Spara's script:-Sniper Sight README wrote:Compatibility note:
Sniper Sight 2 is NOT compatible with scripted HUDs, such as MilHUD, which switch the whole HUD file to achieve changes in the HUD while in flight. It is compatible with scripts that switch only between 'docked' and 'in-flight' HUDs.
Code: Select all
//Switch hud to distance hud on state green and normal hud otherwis
this.alertConditionChanged = function(newCondition, oldCondition) {
if (this.distanceTimer) {
this.distanceTimer.stop();
}
if (newCondition == 1){
player.ship.hud = this.distHud;
if (player.ship.equipmentStatus("EQ_ADVANCED_COMPASS") == "EQUIPMENT_OK") {
if (!this.distanceTimer){
this.distanceTimer = new Timer(this,this.updateDistance,0,0.5);
}
else {
this.distanceTimer.start();
}
}
}
else if (player.ship.hud != this.normalHud){
player.ship.hud = this.normalHud;
}
}
if (newCondition == 1)
(that's green alert) to switch HUDs, but at the bottom it checks for else if (player.ship.hud != this.normalHud)
to switch them back. That second check will pass when the alert condition changes from red to yellow or from yellow to red, as well at the intended time changing from green to yellow. I haven't tested it yet, but...Replacing the line
else if (player.ship.hud != this.normalHud){
with either else if (player.ship.hud == this.distHud) {
or if (oldCondition == 1) {
(note there is no "else" in this one) should fix the problem.Re: [Release] Clear HUD
There will probably be trouble with the distance timer when switching to and from sniper zoom. I'll check it out when I have some time to spare. There was some reason for that "!=" thing, just can't remember what . It's probably from experimenting with more than two switching huds.Wildeblood wrote:Gimbal Locke wrote:I like the Clear HUD design very much, but it does not play well with the Sniper Sight OXP: in the middle of a fight, the sniper sight often suddenly disappears.
I _think_ it is when the Clear HUD cross hairs change colour that I get kicked out of Sniper Sight.The problem is the last two lines of this function in Spara's script:-Sniper Sight README wrote:Compatibility note:
Sniper Sight 2 is NOT compatible with scripted HUDs, such as MilHUD, which switch the whole HUD file to achieve changes in the HUD while in flight. It is compatible with scripts that switch only between 'docked' and 'in-flight' HUDs.Near the top it checks forCode: Select all
//Switch hud to distance hud on state green and normal hud otherwis this.alertConditionChanged = function(newCondition, oldCondition) { if (this.distanceTimer) { this.distanceTimer.stop(); } if (newCondition == 1){ player.ship.hud = this.distHud; if (player.ship.equipmentStatus("EQ_ADVANCED_COMPASS") == "EQUIPMENT_OK") { if (!this.distanceTimer){ this.distanceTimer = new Timer(this,this.updateDistance,0,0.5); } else { this.distanceTimer.start(); } } } else if (player.ship.hud != this.normalHud){ player.ship.hud = this.normalHud; } }
if (newCondition == 1)
(that's green alert) to switch HUDs, but at the bottom it checks forelse if (player.ship.hud != this.normalHud)
to switch them back. That second check will pass when the alert condition changes from red to yellow or from yellow to red, as well at the intended time changing from green to yellow. I haven't tested it yet, but...
Replacing the lineelse if (player.ship.hud != this.normalHud){
with eitherelse if (player.ship.hud == this.distHud) {
orif (oldCondition == 1) {
(note there is no "else" in this one) should fix the problem.
Re: [Release] Clear HUD
Ok. I dug into this and to make my script and sniper zoom cooperate would probably need a constant in-flight frame callback function, that would monitor the hud in use. The problem lies in switching to the sniper zoom on status green and off on yellow. Sniper zoom restores the green state hud when it should be yellow state. It's easy to fix with a frame callback, but is there a problem in using it like this? I'm not familiar with the overhead of it. Is it advisable or not?spara wrote:There will probably be trouble with the distance timer when switching to and from sniper zoom. I'll check it out when I have some time to spare. There was some reason for that "!=" thing, just can't remember what . It's probably from experimenting with more than two switching huds.
Another clitch is that sniper zoom switches to it's own hud, which will cause message and comms logs to be under/over hud. To make it flawless, one should integrate the sniper zoom into the hud.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: [Release] Clear HUD
To make it compatible you need to change two lines of the script in Clear HUD.Gimbal Locke wrote:I like the Clear HUD design very much, but it does not play well with the Sniper Sight OXP: in the middle of a fight, the sniper sight often suddenly disappears.
I _think_ it is when the Clear HUD cross hairs change colour that I get kicked out of Sniper Sight.
Firstly, near the end of the this.alertConditionChanged() function, replace the line else if (player.ship.hud != this.normalHud){ with else if (player.ship.hud == this.distHud) {
Secondly, at the very top of the this.showMessage() function, insert if (!player.ship.compassTarget) return; as the first line off the function, above - not replacing - the existing first line (about line 146 in the script, IIRC). Spara, Tichy, that second is a bug fix that needs to go into the script regardless of whether you care about making it compatible with Sniper Sight.
Easy, peasy. I'll make up the necessary HUD files for you sometime this week.Gimbal Locke wrote:As with all other HUDs, the HUD layout changes while the Sniper Sight is enabled, maybe it would be a nice to integrate the Sniper Sight completely into the Clear HUD? But I know I'm asking a lot now.
- Gimbal Locke
- ---- E L I T E ----
- Posts: 293
- Joined: Sun Jan 08, 2012 11:32 pm
- Location: Brussels
- Contact:
Re: [Release] Clear HUD
You guys are far beyond and above awesome!Wildeblood wrote:Easy, peasy. I'll make up the necessary HUD files for you sometime this week.Gimbal Locke wrote:As with all other HUDs, the HUD layout changes while the Sniper Sight is enabled, maybe it would be a nice to integrate the Sniper Sight completely into the Clear HUD? But I know I'm asking a lot now.
Re: [Release] Clear HUD
I just uploaded an updated version with the script patched as taught by Wildeblood.
https://www.box.com/s/8m0m4f3rxw1xwl2qcd1r
Could you please try it and tell me if it works correctly?
Edit: In the new version (1.1-2) I moved the additional energy and shields gauges to the bottom. Now they are just above the scanner. I'm triyng to find a position where they are easily reachable when fighting.
https://www.box.com/s/8m0m4f3rxw1xwl2qcd1r
Could you please try it and tell me if it works correctly?
Edit: In the new version (1.1-2) I moved the additional energy and shields gauges to the bottom. Now they are just above the scanner. I'm triyng to find a position where they are easily reachable when fighting.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: [Release] Clear HUD
Don't change the script again, Tichy. The devs will need to look at this one, I think.
https://bb.oolite.space/viewtopic.php?f=3&t=12823
https://bb.oolite.space/viewtopic.php?f=3&t=12823
Re: [Release] Clear HUD
Ok! My last change was to hud.plist. I'll leave the script unchanged to let the devs track the problem.Wildeblood wrote:Don't change the script again, Tichy. The devs will need to look at this one, I think.
https://bb.oolite.space/viewtopic.php?f=3&t=12823
Re: [Release] Clear HUD
Firstly, thank you Wildeblood for taking a close look at the script. I really appreciate it.
Green state, distHud on. Switch sniper sight on (target buoy for example). Then state goes to yellow, which normally would cause switch to normalHud, but that does not happen because hud is not distHud anymore. Switch sniper sight off. Sniper sight restores distHud, when it should be normalHud.
I have an idea how this could be fixed once and for all. I'll do it when I have some quiet spare time on my own. (means that wife and kids sleeping ).
For the sniper sight, I would like to propose message_gui and comm_log_gui definitions. Otherwise they are inherited from other huds. This would solve the overlapping problem and there would be no need for hud integration. Could there even be a sniperish hud?
This will make clear-hud work better with sniper sight, but it will not make them fully compatible. For example next situation causes erratic behaviour.Wildeblood wrote:Firstly, near the end of the this.alertConditionChanged() function, replace the line else if (player.ship.hud != this.normalHud){ with else if (player.ship.hud == this.distHud) {
Green state, distHud on. Switch sniper sight on (target buoy for example). Then state goes to yellow, which normally would cause switch to normalHud, but that does not happen because hud is not distHud anymore. Switch sniper sight off. Sniper sight restores distHud, when it should be normalHud.
I have an idea how this could be fixed once and for all. I'll do it when I have some quiet spare time on my own. (means that wife and kids sleeping ).
I see a possible problem, but can't think of a situation it will happen. When does compassTarget return null exactly? I mean when showMessage is run, there is always a check for the ASC. Am I not getting something? Better include it anyway .Wildeblood wrote:Secondly, at the very top of the this.showMessage() function, insert if (!player.ship.compassTarget) return; as the first line off the function, above - not replacing - the existing first line (about line 146 in the script, IIRC). Spara, Tichy, that second is a bug fix that needs to go into the script regardless of whether you care about making it compatible with Sniper Sight.
For the sniper sight, I would like to propose message_gui and comm_log_gui definitions. Otherwise they are inherited from other huds. This would solve the overlapping problem and there would be no need for hud integration. Could there even be a sniperish hud?
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: [Release] Clear HUD
I agree with your reasoning (so I tried something else first, which didn't work), but when I actually tried it, that didn't seem to be a problem. For example, in one test I targeted a rock hermit (which has scan class rock, so stays at green alert) and shot it using sniper sight, but it launched a defence ship before it exploded, so then I was at yellow alert. That's the situation you're describing, but it worked okay.spara wrote:This will make clear-hud work better with sniper sight, but it will not make them fully compatible. For example next situation causes erratic behaviour.Wildeblood wrote:Firstly, near the end of the this.alertConditionChanged() function, replace the line else if (player.ship.hud != this.normalHud){ with else if (player.ship.hud == this.distHud) {
Green state, distHud on. Switch sniper sight on (target buoy for example). Then state goes to yellow, which normally would cause switch to normalHud, but that does not happen because hud is not distHud anymore. Switch sniper sight off. Sniper sight restores distHud, when it should be normalHud.
Compass target is undefined when you are docked, whenever the compass is not drawn on the HUD, and when you are in interstellar space.spara wrote:I see a possible problem, but can't think of a situation it will happen. When does compassTarget return null exactly? I mean when showMessage is run, there is always a check for the ASC. Am I not getting something? Better include it anyway .Wildeblood wrote:Secondly, at the very top of the this.showMessage() function, insert if (!player.ship.compassTarget) return; as the first line off the function, above - not replacing - the existing first line (about line 146 in the script, IIRC). Spara, Tichy, that second is a bug fix that needs to go into the script regardless of whether you care about making it compatible with Sniper Sight.