View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0020791 | AI War 2 | GUI | Nov 19, 2018 12:17 pm | Feb 20, 2019 4:37 pm | |
Reporter | Dominus Arbitrationis | Assigned To | BadgerBadger | ||
Status | resolved | Resolution | fixed | ||
Product Version | 0.806 Sabre Company | ||||
Fixed in Version | 0.814 Of Runaway AIs And Tech Cost Revamps | ||||
Summary | 0020791: Route vs Controlled Systems lines are difficult to distinguish between | ||||
Description | The difference between the color of link between two controlled systems light blue and the color of the "this is the route you will take" light blue is also extremely hard to make out. Credit Delor on Steam https://steamcommunity.com/app/573410/discussions/0/2479690531137706730/ | ||||
Tags | No tags attached. | ||||
|
I'm experiencing the same issue -- came here to report the same problem and found this bug report already here. I'm attaching a screenshot (annotated with my text in yellow) to show what I see on my screen. The light blue color(s) used to show "controlled/friendly territory" versus military ship routing within explored territory are almost the exact same color, if not actually the exact same color... I actually can't tell. |
|
This colour of those lines is determined by public abstract class BaseGalaxyMapDisplayMode : IGalaxyMapDisplayModeImplementation { public virtual Color GetColorForLinkBetweenPlanets(Planet FirstPlanet, Planet SecondPlanet) { ProjectedMultiPathData pathData = SpecialFaction_Human.NonSim_PlanetsInvolvedInPathToCurrentHoverPlanet_LocalFactionOnly; if ( pathData != null && pathData.GetAreConnected( FirstPlanet, SecondPlanet ) ) return World_AIW2.Instance.GetLocalPlayerFaction().TeamCenterColor.TeamColorHighlighted; <====== That value is from TeamColorDefinition.cs TypeDataObject.TeamColorHighlighted = ColorMath.AdjustBrightness0To1( TypeDataObject.TeamColor, 0.4f ); or TypeDataObject.TeamColorHighlighted = ColorMath.AdjustBrightness0To1( TypeDataObject.TeamColor, -0.3f ); This isn't sufficient differentiation. |
|
DarkArchon suggests that actually changing the link width as well would be desirable, but I'm not sure how to do that. I think that's in the core visualization project and I'm not going to chase that right now. |
|
I agree strongly with the suggestion to make the line width larger (bolder) as well as changing the color to indicate the currently selected or shown route or path, that would help a lot. I think even more important is just the fact that currently routes/paths outside of "known space" don't show *at all*, at least not for scouts, haven't checked in a while for other ships/fleets. |
|
Thickness implementation for AIW2, code changes here in text form as talked to BadgerBadger. Attaching GalaxyMapDisplayMode_Normal.cs as well ArcenAIW2Visualization.dll GalaxyMapPlanetLinkBase.cs public abstract class GalaxyMapPlanetLinkBase { [...] public abstract void SetThicknessMultiplier(float multiplier); } GalaxyMapPlanetLink.cs public class GalaxyMapPlanetLink : GalaxyMapPlanetLinkBase { [...] private float thicknessMultiplier = 1.0f; [...] public override void RenderLink() { [...] float num = 1.5f * thicknessMultiplier; [...] } public override void SetThicknessMultiplier(float multiplier) { this.thicknessMultiplier = multiplier; } } --- ArcenAIW2Core.dll IGalaxyMapDisplayModeImplementation.cs public interface IGalaxyMapDisplayModeImplementation { [...] float GetThicknessMultiplierForLinkBetweenPlanets(Planet FirstPlanet, Planet SecondPlanet); } Planet.cs public void UpdateVisualObj(bool IsCurrentPlanet, bool IsTextHidden, bool AreIconsHidden) { [...] Color color = !galaxyMapLine.HumansHaveAnyKnowledgeOf ? Planet.grayColor : implementation.GetColorForLinkBetweenPlanets(galaxyMapLine.PlanetOne, galaxyMapLine.PlanetTwo); galaxyMapLine.SetThicknessMultiplier(implementation.GetThicknessMultiplierForLinkBetweenPlanets(galaxyMapLine.PlanetOne, galaxyMapLine.PlanetTwo)); [...] } --- AIWarExternalVisualizationCode.dll GalaxyMapDisplayMode_Normal.cs public abstract class BaseGalaxyMapDisplayMode : IGalaxyMapDisplayModeImplementation { [...] public virtual float GetThicknessMultiplierForLinkBetweenPlanets(Planet FirstPlanet, Planet SecondPlanet) { ProjectedMultiPathData localFactionOnly = SpecialFaction_Human.NonSim_PlanetsInvolvedInPathToCurrentHoverPlanet_LocalFactionOnly; if (localFactionOnly != null && localFactionOnly.GetAreConnected(FirstPlanet, SecondPlanet)) return 3.0f; return 1.0f; } } GalaxyMapDisplayMode_Normal.cs (16,033 bytes)
using Arcen.AIW2.Core; using System; using System.Collections.Generic; using System.Text; using Arcen.Universal; using Arcen.AIW2.External; using UnityEngine; namespace Arcen.AIW2.ExternalVisualization { public static class UtilityMethodsFor_GalaxyMapDisplayMode { public static void BasePickGalaxyMapOtherThingsToShow(Planet planet, GameEntity_Squad EntityToSkip, GameEntity_Squad[] ArrayToFill, GameEntity_Squad.EvaluatorDelegate evaluator) { bool canSeeEnemies = planet.HumansHaveCurrentBroadIntel; int newOtherGimbalIndex = 0; planet.DoForEntities( EntityRollupType.DrawsInGalaxyView, delegate( GameEntity_Squad entity ) { if ( EntityToSkip != null ) { if ( entity == EntityToSkip ) return DelReturn.Continue; } if ( !evaluator( entity ) ) return DelReturn.Continue; if ( !canSeeEnemies ) { if ( entity.PlanetFaction == null ) return DelReturn.Continue; if ( entity.PlanetFaction.Faction.GetIsHostileToLocalFaction() ) return DelReturn.Continue; } ArrayToFill[newOtherGimbalIndex] = entity; newOtherGimbalIndex++; if ( newOtherGimbalIndex >= ArrayToFill.Length ) return DelReturn.Break; return DelReturn.Continue; } ); } } public abstract class BaseGalaxyMapDisplayMode : IGalaxyMapDisplayModeImplementation { public virtual Color GetColorForLinkBetweenPlanets(Planet FirstPlanet, Planet SecondPlanet) { ProjectedMultiPathData pathData = SpecialFaction_Human.NonSim_PlanetsInvolvedInPathToCurrentHoverPlanet_LocalFactionOnly; if ( pathData != null && pathData.GetAreConnected( FirstPlanet, SecondPlanet ) ) return World_AIW2.Instance.GetLocalPlayerFaction().TeamCenterColor.TeamColorHighlighted; Faction FirstFaction = FirstPlanet.GetFactionWithSpecialInfluenceHere(); if ( FirstFaction.Type == FactionType.NaturalObject ) FirstFaction = FirstPlanet.GetControllingFaction(); Faction SecondFaction = SecondPlanet.GetFactionWithSpecialInfluenceHere(); if ( SecondFaction.Type == FactionType.NaturalObject ) SecondFaction = SecondPlanet.GetControllingFaction(); if ( FirstFaction == SecondFaction ) return FirstFaction.TeamCenterColor.TeamColor; else if ( FirstFaction.GetIsFriendlyTowards( SecondFaction ) ) return Color.blue; else if ( FirstFaction.GetIsHostileTowards( SecondFaction ) ) return Color.red; else return Color.gray; } public virtual void WriteNameText( Planet planet, ArcenDoubleCharacterBuffer buffer ) { if ( planet == null ) { ArcenDebugging.ArcenDebugLog( "Warning: WriteNameText found planet == null", Verbosity.ShowAsInfo ); return; } Faction faction = planet.GetFactionWithSpecialInfluenceHere(); if ( faction == null ) { ArcenDebugging.ArcenDebugLog( "Warning: WriteNameText found faction == null", Verbosity.ShowAsInfo ); return; } if ( faction.TeamCenterColor == null ) { ArcenDebugging.ArcenDebugLog( "Warning: WriteNameText found faction.TeamColor == null", Verbosity.ShowAsInfo ); return; } if ( faction.Type == FactionType.NaturalObject ) faction = planet.GetControllingFaction(); bool haveIntelAndNotSetup = planet.HumansHaveCurrentBroadIntel && !World_AIW2.Instance.InSetupPhase; if ( haveIntelAndNotSetup || faction.Type == FactionType.Player ) buffer.Add( "<color=#" ).Add( faction.TeamCenterColor.ColorHexLinearBrighter ).Add( ">" ); buffer.Add( planet.Name ); if ( World_AIW2.Instance.InSetupPhase ) { List<int> controllingPlayers = planet.GetControllingFaction().ControlledByPlayerAccounts; if ( controllingPlayers != null && controllingPlayers.Count > 0 && controllingPlayers[0] < World.Instance.AllPlayerAccounts.Count ) buffer.Add( "\n" ).Add( World.Instance.AllPlayerAccounts[controllingPlayers[0]].Username ); } if ( haveIntelAndNotSetup || faction.Type == FactionType.Player ) buffer.Add( "</color>" ); if ( haveIntelAndNotSetup && faction.Type == FactionType.AI && !Engine_AIW2.Instance.IsTestChamber ) buffer.Add( " " ).Add( planet.MarkLevel.MapDisplayWithColor ); } public virtual float GetThicknessMultiplierForLinkBetweenPlanets(Planet FirstPlanet, Planet SecondPlanet) { ProjectedMultiPathData localFactionOnly = SpecialFaction_Human.NonSim_PlanetsInvolvedInPathToCurrentHoverPlanet_LocalFactionOnly; if (localFactionOnly != null && localFactionOnly.GetAreConnected(FirstPlanet, SecondPlanet)) return 3f; return 1.0f; } public virtual void WriteLeftRightText( Planet planet, ArcenDoubleCharacterBuffer LeftBuffer, ArcenDoubleCharacterBuffer RightBuffer ) { if ( World_AIW2.Instance.InSetupPhase ) return; int threatStrengthInt, hostileStrengthMinusThreatInt, myTotalStrength, myMobileStrength, myAndAlliedTotalStrength, myAndAlliedMobileStrength; Faction hostileFaction; string myOrAlliedColor; Window_InGameHoverPlanetInfo.GetPlanetFactionalData( planet, out threatStrengthInt, out hostileStrengthMinusThreatInt, out myTotalStrength, out myMobileStrength, out myAndAlliedTotalStrength, out myAndAlliedMobileStrength, out myOrAlliedColor, out hostileFaction, false ); //LEFT if ( myAndAlliedTotalStrength > 0 ) { LeftBuffer.StartColor( myOrAlliedColor ); LeftBuffer.Add( ArcenExternalUIUtilities.StrengthTextIcon ); ArcenExternalUIUtilities.WriteRoundedNumberWithSuffix( LeftBuffer, myAndAlliedMobileStrength, true, true ); LeftBuffer.Add( "\n" ).Add( ArcenExternalUIUtilities.StrengthTextIcon ); ArcenExternalUIUtilities.WriteRoundedNumberWithSuffix( LeftBuffer, myAndAlliedTotalStrength - myAndAlliedMobileStrength, true, true ); } //RIGHT LINE 1 if ( hostileStrengthMinusThreatInt > 0 ) { if ( hostileFaction != null ) RightBuffer.StartColor( hostileFaction.TeamCenterColor.ColorHexLinearBrighter ); else RightBuffer.StartColor( "ffffff" ); RightBuffer.Add( ArcenExternalUIUtilities.StrengthTextIcon ); ArcenExternalUIUtilities.WriteRoundedNumberWithSuffix( RightBuffer, hostileStrengthMinusThreatInt, true, true ); if ( threatStrengthInt > 0 ) RightBuffer.Add( "</color>\n" ); } //RIGHT LINE 2 if ( threatStrengthInt > 0 ) { if ( hostileFaction != null ) RightBuffer.StartColor( ( hostileStrengthMinusThreatInt > 0 ? hostileFaction.TeamBorderColor : hostileFaction.TeamCenterColor ).ColorHexLinearBrighter ); else RightBuffer.StartColor( "ffffff" ); RightBuffer.Add( ArcenExternalUIUtilities.StrengthTextIcon ); ArcenExternalUIUtilities.WriteRoundedNumberWithSuffix( RightBuffer, threatStrengthInt, true, true ); } } public abstract void PickOtherThingsToShow(Planet planet, GameEntity_Squad EntityToSkip, GameEntity_Squad[] ArrayToFill); public void WriteEntityPlanetViewText( GameEntity_Base entity, ArcenDoubleCharacterBuffer Buffer) { int debugLine = 0; try { debugLine = 1; bool debug = false; if ( entity == null ) return; debugLine = 2; if ( entity.TypeData.OtherSpecialType != OtherSpecialEntityType.Wormhole ) return; GameEntity_Other wormhole = (GameEntity_Other)entity; debugLine = 3; Planet currentPlanet = entity.Planet; debugLine = 4; Planet wormholeDestPlanet = wormhole.GetLinkedPlanet(); debugLine = 5; if ( wormholeDestPlanet == null ) return; debugLine = 6; bool shouldBeSelectedColorOnText = entity == GameEntity_Base.CurrentlyHoveredOver; debugLine = 6; Faction faction = wormholeDestPlanet.GetControllingFaction(); debugLine = 7; if ( debug ) ArcenDebugging.ArcenDebugLogSingleLine( "currentPlanet " + currentPlanet.Name + " wormhole to " + wormholeDestPlanet.Name + " figuring out colour", Verbosity.DoNotShow ); debugLine = 8; if ( faction != null && faction.Type != FactionType.NaturalObject && wormholeDestPlanet.HumansHaveCurrentBroadIntel ) { debugLine = 9; bool isWaveIncomingThroughWormhole = false; debugLine = 10; Faction controllingFaction = currentPlanet.GetControllingFaction(); debugLine = 1001; if ( controllingFaction != null && controllingFaction.Type == FactionType.Player && faction.Type == FactionType.AI ) { debugLine = 11; //check whether this wormhole has a wave going to come through it, //and if so then show that if ( faction.Type == FactionType.AI ) { debugLine = 12; List<PlannedWave> localList = faction.GetWaveList(); debugLine = 13; for ( int i = 0; i < localList.Count; i++ ) { debugLine = 14; PlannedWave wave = localList[i]; debugLine = 15; if ( wave.playerBeingAlerted ) { debugLine = 16; Planet warpGatePlanet = World_AIW2.Instance.GetPlanetByIndex( wave.planetWithWarpGateIdx ); debugLine = 17; Planet targetPlanet = World_AIW2.Instance.GetPlanetByIndex( wave.targetPlanetIdx ); debugLine = 18; if ( targetPlanet == currentPlanet && wormholeDestPlanet == warpGatePlanet ) { debugLine = 19; isWaveIncomingThroughWormhole = true; debugLine = 20; i = localList.Count; debugLine = 21; } } } } } debugLine = 22; if ( isWaveIncomingThroughWormhole ) //not a AI wave coming, so just show the faction team colour { debugLine = 23; if ( debug ) ArcenDebugging.ArcenDebugLogSingleLine( "currentPlanet " + currentPlanet.Name + " wormhole to " + wormholeDestPlanet.Name + " showing incoming wave colour", Verbosity.DoNotShow ); debugLine = 24; Color incomingWaveColour = ColorMath.Red; debugLine = 25; Color colorToShow = ColorMath.GetTimeLerpedColor( incomingWaveColour, faction.TeamCenterColor.TeamColor, 3000 ); debugLine = 26; Buffer.Add( "<color=#" ).Add( shouldBeSelectedColorOnText ? faction.TeamCenterColor.ColorHexLinearHighlighted : colorToShow.linear.GetHexCode() ).Add( ">" ); debugLine = 27; } else { debugLine = 28; if ( debug ) ArcenDebugging.ArcenDebugLogSingleLine( "currentPlanet " + currentPlanet.Name + " wormhole to " + wormholeDestPlanet.Name + " showing faction colour " + faction.TeamCenterColor, Verbosity.DoNotShow ); debugLine = 29; Buffer.Add( "<color=#" ).Add( shouldBeSelectedColorOnText ? faction.TeamCenterColor.ColorHexLinearHighlighted : faction.TeamCenterColor.ColorHexLinearBrighter ).Add( ">" ); debugLine = 30; } } else { debugLine = 31; if ( debug ) ArcenDebugging.ArcenDebugLogSingleLine( "currentPlanet " + currentPlanet.Name + " wormhole to " + wormholeDestPlanet.Name + " showing showing no owner", Verbosity.DoNotShow ); debugLine = 32; Buffer.Add( "<color=#" ).Add( shouldBeSelectedColorOnText ? TeamColorDefinitionTable.Hovered.ColorHexLinear : TeamColorDefinitionTable.White.ColorHexLinear ).Add( ">" ); debugLine = 33; } debugLine = 34; Buffer.Add( wormholeDestPlanet.Name ); debugLine = 35; Buffer.Add( "</color>" ); debugLine = 36; } catch ( Exception e ) { ArcenDebugging.ArcenDebugLog( "Warning: WriteEntityPlanetViewText encountered exception on debugLine==" + debugLine + "\n" + e.ToString(), Verbosity.ShowAsInfo ); } } } public class GalaxyMapDisplayMode_Normal : BaseGalaxyMapDisplayMode { public override void PickOtherThingsToShow(Planet planet, GameEntity_Squad EntityToSkip, GameEntity_Squad[] ArrayToFill) { // UtilityMethodsFor_GalaxyMapDisplayMode.BasePickGalaxyMapOtherThingsToShow( planet, EntityToSkip, ArrayToFill, // delegate(GameEntity_Squad entity) { return ArcenStrings.ListContains( entity.TypeData.Tags, "ShowsOnNormalDisplayMode" ); } ); //As a stopgap during the UI upheaval, "Normal" now just does the most critical gameplay elements UtilityMethodsFor_GalaxyMapDisplayMode.BasePickGalaxyMapOtherThingsToShow( planet, EntityToSkip, ArrayToFill, delegate( GameEntity_Squad entity ) { return ArcenStrings.ListContains( entity.TypeData.Tags, "ShowsOnNormalDisplayMode" ) || ArcenStrings.ListContains( entity.TypeData.Tags, "ProgressReducer" ) || ArcenStrings.ListContains( entity.TypeData.Tags, "Capturable" ); } ); } } } |
|
Fixed! 100% credit for this fix goes to DarkArchon |
|
Woo |
Date Modified | Username | Field | Change |
---|---|---|---|
Nov 19, 2018 12:17 pm | Dominus Arbitrationis | New Issue | |
Nov 19, 2018 12:17 pm | Dominus Arbitrationis | Status | new => assigned |
Nov 19, 2018 12:17 pm | Dominus Arbitrationis | Assigned To | => Chris_McElligottPark |
Dec 23, 2018 2:10 am | nomad_delta | File Added: controlled-vs-route.jpg | |
Dec 23, 2018 2:10 am | nomad_delta | Note Added: 0050646 | |
Feb 7, 2019 4:00 pm | BadgerBadger | Note Added: 0050789 | |
Feb 20, 2019 1:11 pm | BadgerBadger | Note Added: 0050823 | |
Feb 20, 2019 1:58 pm | nomad_delta | Note Added: 0050824 | |
Feb 20, 2019 3:31 pm | darkarchon | File Added: GalaxyMapDisplayMode_Normal.cs | |
Feb 20, 2019 3:31 pm | darkarchon | Note Added: 0050825 | |
Feb 20, 2019 4:37 pm | BadgerBadger | Note Added: 0050826 | |
Feb 20, 2019 4:37 pm | BadgerBadger | Assigned To | Chris_McElligottPark => BadgerBadger |
Feb 20, 2019 4:37 pm | BadgerBadger | Status | assigned => resolved |
Feb 20, 2019 4:37 pm | BadgerBadger | Resolution | open => fixed |
Feb 20, 2019 4:37 pm | BadgerBadger | Fixed in Version | => 0.814 Of Runaway AIs And Tech Cost Revamps |
Feb 20, 2019 4:37 pm | BadgerBadger | Note Added: 0050827 |