Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow HourglassTwins marker type without invoking the FocalPoint machinery #847

Closed
tgiddings opened this issue Apr 19, 2024 · 3 comments
Closed
Labels
feature Features that should be implemented fixed in dev Instead of closing issues when you fix them in dev just add this.

Comments

@tgiddings
Copy link

tgiddings commented Apr 19, 2024

Feature

It is my understanding that MarkerType.HourglassTwins is what allows the marker to disappear when viewed up close in the map. This would be useful for any named cluster of objects where the individual markers would clash when viewed from afar. However, currently the only code path in New Horizons that sets this checks for the FocalPoint configuration, and this configuration also overrides the gravity settings of the body it's applied to and the orbit settings of the bodies referenced as primary and secondary.

Context

Consider the following example. It would not be possible to rework "Equilateral Trinary" to use FocalPoint, since the gravity would be too small and none of the bodies are 180 degrees apart. I would like to be able to add a configuration to "Equilateral Trinary" which results in its map marker popping out at the same time that the map markers for the individual bodies pop in.

{
    "name": "Equilateral Trinary",
    "$schema": "https://raw.githubusercontent.com/Outer-Wilds-New-Horizons/new-horizons/main/NewHorizons/Schemas/body_schema.json",
    "starSystem": "SolarSystem",
    "Base": {
        "surfaceSize": 1,
        "surfaceGravity": 3636,
        "soiOverride": 0,
        "hasMapMarker": true
    },
    "Orbit": {
        "semiMajorAxis": 13000,
        "primaryBody": "SUN",
        "isTidallyLocked": true
    }
}
{
    "name": "Trinary 1",
    "$schema": "https://raw.githubusercontent.com/Outer-Wilds-New-Horizons/new-horizons/main/NewHorizons/Schemas/body_schema.json",
    "starSystem": "SolarSystem",
    "Base": {
        "groundSize": 100,
        "surfaceSize": 101,
        "surfaceGravity": 12,
        "hasMapMarker": true
    },
    "Orbit": {
        "semiMajorAxis": 700,
        "primaryBody": "Equilateral Trinary",
        "isMoon": true
    }
}
{
    "name": "Trinary 2",
    "$schema": "https://raw.githubusercontent.com/Outer-Wilds-New-Horizons/new-horizons/main/NewHorizons/Schemas/body_schema.json",
    "starSystem": "SolarSystem",
    "Base": {
        "groundSize": 100,
        "surfaceSize": 101,
        "surfaceGravity": 12,
        "hasMapMarker": true
    },
    "Orbit": {
        "semiMajorAxis": 700,
        "primaryBody": "Equilateral Trinary",
        "isMoon": true,
        "trueAnomaly": 120
    }
}
{
    "name": "Trinary 3",
    "$schema": "https://raw.githubusercontent.com/Outer-Wilds-New-Horizons/new-horizons/main/NewHorizons/Schemas/body_schema.json",
    "starSystem": "SolarSystem",
    "Base": {
        "groundSize": 100,
        "surfaceSize": 101,
        "surfaceGravity": 12,
        "hasMapMarker": true
    },
    "Orbit": {
        "semiMajorAxis": 700,
        "primaryBody": "Equilateral Trinary",
        "isMoon": true,
        "trueAnomaly": 240
    }
}
@tgiddings tgiddings added the feature Features that should be implemented label Apr 19, 2024
@xen-42
Copy link
Member

xen-42 commented Apr 28, 2024

Does this not achieve what you want to do here, under the Orbit module
image
Think the wording on these is a bit confusing, but I think if Equilateral Trinary had its fade start distance equal to the fade end distance of the other 3 it'd do what you're trying to achieve, right?

@MegaPiggy
Copy link
Member

Does this not achieve what you want to do here, under the Orbit module image Think the wording on these is a bit confusing, but I think if Equilateral Trinary had its fade start distance equal to the fade end distance of the other 3 it'd do what you're trying to achieve, right?

That is different. He is talking about the map markers that show the name of the object.

var markerType = MapMarker.MarkerType.Planet;
if (config.Orbit.isMoon)
{
markerType = MapMarker.MarkerType.Moon;
}
else if (config.Star != null)
{
markerType = MapMarker.MarkerType.Sun;
}
else if (config.FocalPoint != null)
{
markerType = MapMarker.MarkerType.HourglassTwins;
}
/*
else if (config.Base.IsSatellite)
{
markerType = MapMarker.MarkerType.Probe;
}
*/
mapMarker._markerType = markerType;

The display distances for the markers depend on the type

switch (_markerType)
{
    case MarkerType.Planet:
    case MarkerType.Ship:
    case MarkerType.Probe:
        _maxDisplayDistance = 50000f;
        break;
    case MarkerType.HourglassTwins:
        _maxDisplayDistance = 50000f;
        _minDisplayDistance = 5000f;
        break;
    case MarkerType.ShipLog:
        _maxDisplayDistance = 50000f;
        _disableMapMarker = true;
        break;
    case MarkerType.Sun:
        _maxDisplayDistance = 1E+10f;
    case MarkerType.Moon:
    default:
        _maxDisplayDistance = 5000f;
        break;
    case MarkerType.Player:
        _maxDisplayDistance = 0f;
        break;
}

@tgiddings
Copy link
Author

@MegaPiggy is correct about what I'm wanting. Name markers clash and create visual noise much more readily than orbit lines.

Also, the behavior of orbitLineFadeEndDistance and orbitLineFadeStartDistance are backwards from their descriptions. orbitLineFadeEndDistance caused the orbit line to fade when close.

MegaPiggy added a commit that referenced this issue Jun 4, 2024
#878)

## Minor features

- Added a map marker module with display distance overrides (#847)
@MegaPiggy MegaPiggy mentioned this issue Jun 4, 2024
@MegaPiggy MegaPiggy added the fixed in dev Instead of closing issues when you fix them in dev just add this. label Jun 4, 2024
xen-42 added a commit that referenced this issue Jun 10, 2024
## Major features

- Updated to work with Patch 15 (fixed game libs + game over text issue)
(thanks Jeff from Mobius for pointing that one out!)

## Minor features

- New slide reel options. `reelModel` and `reelCondition` parameters for
slide reel mesh and material. (#811)
- Models: 6-slided, 7-slided, 8-slided, and Whole (7-slided but
connected like 8-slided).
- Conditions: Antique (Stranger), Pristine (Dreamworld), Rusted (Burnt)
- `rotate` parameter added to slide info. Rotates the slide reel item
while inside a projector.
- Added map marker module with display distance overrides (#847)

## Improvements
- Relative spawning when warping with vessel just like vanilla
- No more wake up effects for vessel warping
- Map mode icon setting changes now work when updating an existing
planet. Fixes #875

## Bug fixes

- Fixed nomai lamps on custom vessel looking like they are off
- Fixed broken black and white holes on custom vessel
- Fixed vessel coordinate orb not unlocking on start
- Dialogue replacement can no longer replace dialogue on other planets
than the one the config file is for.
- Fix seeing solar system before opening your eyes if there was
conditional object activation being used
- Fix getting stuck in chair when warping back from NH Examples
- Fix seeing solar system for one frame when going to the Eye
@xen-42 xen-42 closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features that should be implemented fixed in dev Instead of closing issues when you fix them in dev just add this.
Projects
None yet
Development

No branches or pull requests

3 participants