Chart Screens
Moderators: winston, another_commander
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Chart Screens
What am i doing wrong - i've jumped, docked, gone to the chart then searched on a planet name. got the full galaxy map up but from that point i can't get back to the local chart, pressing the key just toggles the "search for planet" on and off.
TIA
TIA
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Chart Screens
...and script issues. i'm trying to get the script to work that pop's my new item in a particular place. took a crack at the code phkb pasted, and nothing showed up. i've eventually cut it back to see if it's my amendments or something else, so basically now it should just write a log message when i jump into Ansoreus in Galaxy 2. as far as i'm reading on the wiki, it's planet 191 and the galaxy numbers start at 0 for Galaxy 1, so i've got;-
i no longer get compilation errors, log says the world script has loaded, but when i exit witchspace i'm not getting the log message.
TIA
Code: Select all
this.systemWillPopulate = function() {
if (galaxyNumber === 1 && system.ID === 191) {
log("Arrived ");
}
}
TIA
Re: Chart Screens
I have no idea what the actual problem is , but I suggest debugging by printing galaxyNumber and system.ID to the log.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Chart Screens
With the script issues, it sounds like your function is not being called. Is your script file called “script.js”, located in the Config folder? Or have you created a unique filename in the Scripts folder, and referenced it in world-scripts.plist?
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Chart Screens
The F6 charts were amalgamated back in v.1.82 (2015):Killer Wolf wrote: ↑Sat Nov 18, 2023 11:15 amWhat am i doing wrong - i've jumped, docked, gone to the chart then searched on a planet name. got the full galaxy map up but from that point i can't get back to the local chart, pressing the key just toggles the "search for planet" on and off.
TIA
But, as you noticed, the ability to search for planets seems to have escaped the amalgamation and is now the remaining difference between the two.Graphics and interface upgrades
We've made some improvements to some of the graphics and interfaces, with the main one being the fully zoomable and scrollable galaxy map, which replaces the separate short-range and long-range charts. Route plotting has also been improved: with the Advanced Navigational Array, you can set a route to the other side of the chart, and then jump along it a step at a time without having to re-plot.
Introducing the zoom also made the circle of jumpable range less accurate - and wrecked the original BGS-X addition of templates showing the different regions and the GNN updates of these.
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Chart Screens
With the chart screen, do the page up and page down keys work?
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
Re: Chart Screens
What has happened is that while working with the chart, you set it to max zoom out using PgUp/PgDn or mousewheel. Then you pressed F6 to search for a planet, then pressed F6 to go back to the local area view of the chart, but because it had been already in full zoom out, you did not notice any change other than toggling the Find Planet text input on and off.Killer Wolf wrote: ↑Sat Nov 18, 2023 11:15 amWhat am i doing wrong - i've jumped, docked, gone to the chart then searched on a planet name. got the full galaxy map up but from that point i can't get back to the local chart, pressing the key just toggles the "search for planet" on and off.
TIA
Solution: Zoom back in with mousewheel or PgUp/PgDn.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Chart Screens
the latter, i was copying the Tianve pulsar thing as that was an example of something that occurs in a specific system. i've got a world-scripts entry from "II_populator.js" and a Scripts folder holding the same-named item. in the log however it says
Code: Select all
15:08:08.569 [script.load.world.listAll]: Loaded 46 world scripts:
...
II_populator.js.anon-script
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Chart Screens
tch! i knew it would be something obvious! cheers.another_commander wrote: ↑Sat Nov 18, 2023 8:21 pmWhat has happened is that while working with the chart, you set it to max zoom out using PgUp/PgDn or mousewheel. Then you pressed F6 to search for a planet, then pressed F6 to go back to the local area view of the chart, but because it had been already in full zoom out, you did not notice any change other than toggling the Find Planet text input on and off.Killer Wolf wrote: ↑Sat Nov 18, 2023 11:15 amWhat am i doing wrong - i've jumped, docked, gone to the chart then searched on a planet name. got the full galaxy map up but from that point i can't get back to the local chart, pressing the key just toggles the "search for planet" on and off.
TIA
Solution: Zoom back in with mousewheel or PgUp/PgDn.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Chart Screens
It's probably something significant, and probably also the cause of your issues, but I'm not sure what the cause would be. The main thing is that you can't mix using a "script.js" file with a "world-scripts.plist" file. But if you're not using a script.js, that question is answered. Can you post a copy of the content of your world-scripts.plist file?Killer Wolf wrote: ↑Sun Nov 19, 2023 10:42 amis there any significance to it appending "anon-script"? non of the other couple dozen entries have that.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Chart Screens
I had a quick look at the source, and it might occur if you haven't given your script file a "this.name" property at the top. For example, taken from the VimanaX_HUD.js fileKiller Wolf wrote: ↑Sun Nov 19, 2023 10:42 amis there any significance to it appending "anon-script"? non of the other couple dozen entries have that.
Code: Select all
"use strict";
this.name = "VimanaX_HUD"; // << this line
this.author = "Gnievmir, phkb";
this.license = "CC-BY-NC-SA 3.0";
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Chart Screens
ta for that. i've been fiddling re the above comments and in an effort to try and track down what's not working i went back to my simple populator script.js in the config folder. it spawns the item no prob on exit from WS, so i added a line or two;
when i run and spawn, i got the "generated message" but nothing about the gal/system. i commented out the spawn message, still nothing
no compy errors, why's it ignoring me?
Code: Select all
this.role = "KWii";
this.count = 1;
this.kwgal = galaxyNumber;
this.kwsys = system.ID;
// Standard attributes
this.name = "Spawn-" + this.role;
this.author = "Jens Ayton";
this.copyright = "This script is hereby placed in the public domain.";
this.version = "1.0.1";
this.description = "Script to make several ships of a given role appear outside the station upon launching."
//this.shipWillLaunchFromStation = function()
this.shipWillExitWitchspace = function()
{
system.addShipsToRoute(this.role, 1, 0.7, "ws")
//system.legacy_addSystemShips(this.role, this.count, 1.0);
// log("testscript.spawn", "Generated " + this.count + " " + this.role + " for testing purposes.");
log("gal" + this.kwgal + " planet " + this.kwsys);
}
no compy errors, why's it ignoring me?
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Chart Screens
Can you try changing “this.name” to a basic string eg
and see if that makes a difference?
Code: Select all
this.name = “spawningmyship”;
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Chart Screens
nope, still spawns but doesn't write :-/
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Chart Screens
Can you send me a copy of the OXP as it is now? This one has me a bit stumped as well!