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

bug: invisible system at pos 0 0 #2369

Open
EndrosG opened this issue Apr 6, 2017 · 19 comments
Open

bug: invisible system at pos 0 0 #2369

EndrosG opened this issue Apr 6, 2017 · 19 comments
Labels
enhancement A suggestion for new content or functionality that requires code changes
Milestone

Comments

@EndrosG
Copy link
Contributor

EndrosG commented Apr 6, 2017

In the 2nd chapter of my plugin I have a mission which places an NPC in a system which has not yet been defined for the game.
Though I came across this bug by accident (accidently clicking next to Kor Men while doing ......) and though the bug in this case is caused by some sort of "intention", this can happen to any content writer with the simplest typo. So: Better watch out for typos! ;-)

In my current active savegame, the event has not been offered yet, the to offer requirement has not been met so far. But the game parses through all data files upon start and thus through all missions and thereby seems to find the reference to the system "Ancient ship". It seems then to create an empty data node in memory (not even filling it with the name of the unknown ship) which is positioned at 0 0 and invisible, but selectable. Below the code segment you find a screenshot composition.

  • Background: System message upon entering at the very bottom, empty location name box in the upper right corner.
  • Upper right: the selected invisible system while being in the neighbourhood.
  • Upper left: a different system has been selected as target and the invisible system marked with arrows - really no hints visible.
  • Lower right: I jumped to the system and opened the map again.

To give you an idea I pasted a strapped mission and event definition below.

mission "ship wreckage 1"
	landing
	name "Fly to the ancient ship"
	description "Fly to the ancient ship just outside of this system and scan its outfits."
	to offer
		has "event: ship wreckage"
	source "Ancient Home"
	destination "Ancient Home"
	on offer
		require "Jump Drive" 1
		require "Outfit Scanner" 1
		conversation
			`"Welcome back, Captain <last>! Did you read our newsletter regarding the ancient ship nearby? Our sensors recently detected something what we believe could be one of these ancient ships. It is just outside of this solar system. Since we dont have any jump drive equipped ships here we cant send a team there.`
			`Please fly to the ship, perform some scans and then return here. If the ship should be still in an acceptable condition we would then ask you to transport a small expedition team to it. But first we need those scans."`
			choice
				`	"Sure, I'd be glad to help."`
					goto yes
				`	"Since I am the only captain here with a jump drive right now..."`
					goto yes
				`	"Sorry, but what if it opens fire on me? It sounds too dangerous."`
					decline

			label yes
			`	"Thank you in advance. I will tell my team to send you the coordinates of the ship within the next hour."`
				accept
	on accept
		event "ship wreckage location"
	on complete
		payment 120000
		conversation
			`As you approach the landing pad the scientist already awaits you.`
			`"Welcome back, Captain <last>! Did you succeed in scanning the ship? Do you think it is safe to send a team over there?"`
			choice
				`	"Yes, the mission was a full success. The ship looks extremely old and the hull is still somehow holding. It might be a risk for your team but I would give you a ride."`
				`	"Yes, I could scan it. On this chip you will find all scanning data. But the ship is in a very bad shape. I would not recommend anybody to board it."`
				`	"Sorry, but all I found there was a huge wreckage. The hull is merely holding but there is no atmosphere or energy signature on it."`
			`"I understand. Thank you for your opinion. We will check the scans and if you want, you can find me again in the spaceport. Here is your payment of <payment>."`

	npc save "scan outfits"
		government Derelict
		personality derelict timid disables staying uninterested
		system "Ancient ship"
		ship "Ancient ship class (wreckage)" "Ancient wreckage"
		dialog "You make the requested scans of the <npc>. Time to head back to <planet>."

event "ship wreckage"

event "ship wreckage location"
	system "Ancient ship"
# changed it to be near Sol for the github issue only
		pos -415 119
		government Uninhabited
		habitable 10
		asteroids "small rock" 51 1.1925

The system definition is by purpose that short. No star or other objects. The system wrapper is only a necessity to provide a location wrapper for the jump drive and for the npc location. ;-)
I dont want to "exist" the system in advance because its pure existance would give a hint on there being something...

endless_sky_v0_9_6__20170406__unnamed_ undefined _system

@ReimeiSky
Copy link
Contributor

ReimeiSky commented Apr 6, 2017

I'm certain I've seen this in a Steam image somewhere, but thanks for providing a method which we can use to reproduce it.
(not implying that I've actually reproduced it, of course, too lazy...)

@Amazinite
Copy link
Collaborator

Amazinite commented Apr 6, 2017

I think this is a duplicate issue. Trying to find it.

Edit: Not sure if there ever actually was an issue of it here, but here is a Steam thread on the topic.

@gunqqer
Copy link
Contributor

gunqqer commented Apr 6, 2017

Can confirm this invisible system. I thought it was just one of my many, many, many plugins.

@endless-sky
Copy link
Collaborator

If you create a system and don't define its location, that's a bug in your mod, not in the game itself. There's no way for the game to know whether you really meant to create a system or not, so it always assumes that you do.

An easy work-around would just be to have the system start off in a position so far off the map that the player will never see it.

@EndrosG
Copy link
Contributor Author

EndrosG commented Apr 7, 2017

@endless-sky : I mostly agree with you.
I admitted already that it was caused by some "intention" in my case, and not just by a typo.
I created this issue for several reasons.

  • First, to have this as issue here for anybody searching here (and yes, I was not aware of the similar Steam thread, to be honest). It provides explanations for others to come.
  • Second, it is confusing that the game creates the system even before any job is offered that needs it.
  • Third, the game fails to create the system with the proper name. When it creates the system, it does so because it is referenced by name inside a mission, thus it can create it with a name. --- still a content bug from the mod, yes, but then easier to find, since the player finds ingame the wrong spelled name (in case of typo) or a hint that something with that system is wrong (not correctly defined).

I though about your work-around before you suggested it :-)
Would you please define / recommend a "safe" area where, upon your general intention, the map will not be filled with something? - Just want to avoid in advance (yeah, hard approach) conflicts with future equivalents of "Over the Rainbow" / World's End.

@Wrzlprnft
Copy link
Contributor

if you do not want the system and job be available, you could try adding both via an event.

@EndrosG
Copy link
Contributor Author

EndrosG commented Apr 7, 2017

that's exactly what I am doing, @Wrzlprnft -- I supplied a stripped version of the code for exactly that purpose, showing that that is exactly what I wanted to achieve. ;-)

@Lorantine
Copy link
Contributor

ya can spawn entire systems w/ events (and thus remove them too)? kinky

@EndrosG
Copy link
Contributor Author

EndrosG commented Apr 7, 2017

I have not yet tested if you really can remove a system completely. @KiLEdEnNis

  • You can move it by altering it's position. That's what MZ said and I was thinking as work-around for the invisible issue as well.

  • I did not pay any attention towards the habitable zone attribute so far as I dont know yet what it is used for in the game (mechanics) at all.

  • Faction wars have altered government a few times (republic -> free worlds ; wanderer -> hai ; Pug in Deneb etc.)

  • You can alter the asteroid & minables duo (this is a combined thing, imho).

  • I did not yet try to modify the trade values but I would be surprise if that particular thing would NOT work.

  • Faction wars alter fleet lists.

  • You can spawn any object inside it, as the Pug demonstrate with wormholes twice and with hyperspace links as well. This includes: You can create manned station objects, moons, planets, gas giants, ring worlds (= stations), stars.

  • Yes, you can spawn an entire system.
    But I dont know if you can erase it. I am too laze to test for a proper syntax.

system Sol
	clear

might eventually only empty it and not remove it completely.
Well, Sol cant be removed completely ingame as it is hard coded into missions.

Actually, I have not even yet tested if I can fully clear the object list later on.
I currently plan to transform the ancient ship temporarily from the "ship" status to an "object" (planet) status for "landing" purposes (without a spaceport, because of lack of fuel for refuelling).
After the player makes some deliveries (which in terms of game mechanics are not the same when just using the npc assist tag) like repair crew, materials, a dozen hyperdrives, reactors etc., the "object" shall be reverted back to "ship" status, i.e. I need some "object clear" method by then because I have no other object in the system.
A few missions later the system could be removed as well, but we now know already that this is impossible in terms of game mechanics because the system is referenced by missions. Thus I can only move it to "Beyond Horizon" which is far far far behind the rainbow and is waiting for a "safe" location provided by MZ.

But you can spawn entire systems dynamically - without them appearing in advance at pos 0 0 - if you never reference them explicitely but only use them via filters. And if you connect them via hyperspace links, of course.
Example: spawn a system next to Sol, assign government Hai / Wanderer / Coalition (or Korath, Pirate, ...) and you are able to definetively filter it with "near Sol / Earth distance 1 government xyz" criteria. The distance filter is the thing that requires the hyperspace link.

In my case, I dont have a link but have an isolated location, and creating a link would in my case be against canon (missing technology) and non-sense (the players jump drive fleet is needed...) That means I do not know how I could locate it through filters.

@endless-sky endless-sky added the enhancement A suggestion for new content or functionality that requires code changes label May 3, 2017
@endless-sky endless-sky added this to the 1.0.0 milestone May 3, 2017
@Amazinite
Copy link
Collaborator

Amazinite commented Jul 5, 2020

So has #5142 fixed this in full, or did that only change incorrect pathfinding through 0,0?

@Amazinite
Copy link
Collaborator

Can confirm that people have seen the 0,0 system in v0.9.13, so it still exists, but that was on saves from before v0.9.12 where it probably already existed. I'm wondering if it can be caused to appear on a brand new save, though.

@Amazinite Amazinite pinned this issue Nov 13, 2022
@Amazinite
Copy link
Collaborator

Amazinite commented Nov 13, 2022

I still get reports of this every so often, although I'm still uncertain if it's a save age situation. Seems like something we just need someone to do a bit of digging into.

@Hurleveur
Copy link
Member

Hurleveur commented Nov 14, 2022

I can confirm I don't have this on my v0.9.16 pilot, same for 0.9.15.
I remember this happening at some point in the past but it wasnt in any post 9.14 builds.
Probably linked to a plugin definition being wrong or smth which would mean this is indeed an issue? Idk
Will look into it further tomorrow (surprised Ssil Vida doesnt trigger this?)

edit: just saw this happen in my plugin playtrough in v9.1.16.2

@Hurleveur
Copy link
Member

When a system is not valid (no position defined) it is not drawn (u can't click it) but it seems that pressing tab will actually be able to select it. I'll fix this.

@Hurleveur
Copy link
Member

Was fixed by the relevant PR not sure why it didjt get linked but I'll close this

@quyykk
Copy link
Member

quyykk commented Nov 17, 2022

Was fixed by the relevant PR not sure why it didjt get linked but I'll close this

There might be some other place where that system appears 😅.

@Hurleveur
Copy link
Member

Hurleveur commented Nov 17, 2022

Not sure what you mean.
It was not just one system, it was any system that was not properly defined (and thus didnt have a position defined and defaulted to 0,0); tab didnt check for it being defined correctly before letting you select it.
Now it does, meaning there shouldnt be any instance of this bug reappearing.

Also this whole thing was a hacky way of doing "hidden", before it existed, or errors in system definitions.

@Amazinite Amazinite modified the milestones: 0.9.x, 0.9.17 Nov 17, 2022
@quyykk
Copy link
Member

quyykk commented Nov 18, 2022

Hopefully that was the last instance of the bug, I'll unpin this for now.

@quyykk quyykk unpinned this issue Nov 18, 2022
@Hurleveur
Copy link
Member

Hurleveur commented Jan 28, 2023

https://www.reddit.com/r/endlesssky/comments/10cfx84/so_i_jumped_into_this_spot_of_empty_space_pretty/ seems we need to check for this when looking at the flight path as well.

shouldn't be too hard though

@Hurleveur Hurleveur reopened this Jan 28, 2023
@Amazinite Amazinite pinned this issue Feb 12, 2023
@Amazinite Amazinite modified the milestones: 0.10.0, 0.10.x Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A suggestion for new content or functionality that requires code changes
Projects
None yet
Development

No branches or pull requests

8 participants