Can I rename and save a *NEW* map from a script?

I'm creating a custom template to help me map the decks of the habitat ring of a large rotating space station. (13 decks averaging about a mile long with widths varying from 72 to 114 feet for a total area of 155 acres. Since each map will cover a 30° arc of one deck, that's a 156 maps! ?) A hotspot runs a script that asks some questions to prepare the map; specifically the deck number (1-13) and the sector (Alpha, Beta, Gamma and Delta) and subsectors to be mapped (1-3, 4-6 or 7-9). Before the hotspot is clicked the map looks like this:

After the data is collected, the script asks for confirmation to change the map.

If "Yes" is clicked, the hotspot will be deleted and this map will be produced:

At this point the new map is still unsaved with the temporary name (Map).FCW . Is there a way for the script to save the map to a predetermined location with a constructed name (format "Sector-Subsector-Deck.FCW")?

Best Answers

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    edited September 2020 Accepted Answer

    Have you tried using the SAVEASM command? I don't think that should run into the same issues with a constructed name as GOTO.

    I am not using SAVEASM myself, but I am using WBSM in a similar manner to automatically export images for atlas maps and put them in the appropriate folder, as well as in my large export script from annual 129.

    Saving may kill the macro though, so I don't know if it can be anywhere but the last line.

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Accepted Answer
    You can put the file saved with SAVEVARS wherever you want but that one you do want to be easily accessible in a predictable location, so it should be in the data directory so you can use the @-path.
  • DaltonSpenceDaltonSpence Mapmaker
    edited September 2020 Accepted Answer

    It might be better to save the path variable directly in the OnNewMacro and OnOpenMacro notes of the template since I don't really want to reuse the other variables saved when creating new maps. Which macro note would it be best to add the GL savefile SAVEASM path\ command prefix to? Also wouldn't running a SAVEVARS script from within another script terminate the calling one?

Answers

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    edited September 2020 Accepted Answer

    Have you tried using the SAVEASM command? I don't think that should run into the same issues with a constructed name as GOTO.

    I am not using SAVEASM myself, but I am using WBSM in a similar manner to automatically export images for atlas maps and put them in the appropriate folder, as well as in my large export script from annual 129.

    Saving may kill the macro though, so I don't know if it can be anywhere but the last line.

  • I'll have to set it up so that nothing important is left undone before I use SAVEASM and there is a GOTO immediately after to the end of the script in case it doesn't crash. My biggest problem may be deciding where to put the maps! (That means an absolute path unfortunately so the script would have to be customized for other users.) I'll let you know if it works.

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    edited September 2020

    You don't need to use an absolute path, if you can be happy with a path relative to the data directory (@) or the current map location before saving ($).

    You can also collect the path on first run and save it to a script file with SAVEVARS. Then, as long as this is set, it won't ask again. (See page 417 of the Tome)

  • DaltonSpenceDaltonSpence Mapmaker
    edited September 2020

    The problem for me is that a new map (straight from the template) (MAP).FCW seems to consider the installation directory as its current location (or at least that is the first one it tries to save it to). As for the data directory (@)  I don't mind saving my custom scripts, templates, textures and symbols there but I prefer saving my data files and downloads to a removable thumb drive. (The data directory itself is on an external hard drive.) As for the SAVEVARS file, where do I put that?

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Accepted Answer
    You can put the file saved with SAVEVARS wherever you want but that one you do want to be easily accessible in a predictable location, so it should be in the data directory so you can use the @-path.
  • DaltonSpenceDaltonSpence Mapmaker
    edited September 2020 Accepted Answer

    It might be better to save the path variable directly in the OnNewMacro and OnOpenMacro notes of the template since I don't really want to reuse the other variables saved when creating new maps. Which macro note would it be best to add the GL savefile SAVEASM path\ command prefix to? Also wouldn't running a SAVEVARS script from within another script terminate the calling one?

  • I browse to my map save folders when I start a new map of any type and save as there. After that, I just go to that folder and load the map I am working on.

  • DaltonSpenceDaltonSpence Mapmaker
    edited September 2020

    When I'm considering 156 potential maps of the habitat ring of a rotating space station using the same format I want to automate the process as much as possible. Part of that is automatically putting them all in the same place and standardizing their names in an informative way. I don't know how far I want to take this project yet but I do want to have the tools to at least make it possible.

    I was inspired by a modeler's calculations about how big Space Station V from the movie “2001: A Space Odyssey” had to be based on what the size of the Orion III Space Plane that docked with it must be (based on photographic evidence from the movie). Both sizes were significantly larger than the generally accepted dimensions. This turned my Space Station into a Space City. It will require planning as such to fill the 155 acres of deck space plausibly. (And that's just the Habitat Ring: don't talk to me about the Hub yet. ?) Nobody ever said I thought small.

    JimP
  • JimPJimP 🖼️ 280 images Cartographer
    edited September 2020

    My Starship Wander is miles long x miles wide, by miles high. I'll never get it finished. I think I have substationaly less than one percent done. The control section dome is 5 miles across and 3 miles in diameter.

    edit: I added a link instead of an image so it wouldn't mess up the discussion.

  • @JimP Well it's nice to know I'm not the only one out here with big ideas. How does it go? “A man’s reach should exceed his grasp, or what’s a heaven for?” Should I start my own discussion about the space station project and what category should I post it under?

    I've got a ton of ideas I'd like to share and I already have Deck 1 of the ring almost done. Several sources have said 1 hour a day spent under 0.3 g would be enough to maintain one's health in a low gravity environment so I got the idea of large maglev trains running spinward on the lowest deck to provide this to permanent residents and long-term guests of the Hilton. The only thing I haven't worked out is the furnishings of the two train cars (one is a fully equipped gym, the other is a combined lounge/dining car for passengers waiting for or returning from their turn at the gym). Note: this is not a transit system; its a public health utility (and occasional tourist attraction)! Here's the map so far:

    The grey blocks are ballast tanks used to keep the station balanced by spreading mass evenly around the habitat ring. This map is repeated throughout Deck 1 but the “Fast Track Express” only stops at Subsector 5. (There is one for each Sector.) There are more details but I don't want to bore you.

    JimP
  • Well, I stopped on that star ship some years ago. I'm working on one for my GURPS Space site. Smaller, but similar. Top decks, 2 so far, are in my gallery.

    As for my Traveller site, I have over 1600 planets there. i made my own templates for sectors and sub-sectors. I load those, then save as for the different locations on my galaxy map. This is the map I tossed together in CC3. The only Path partially mapped so far is Path 02.



Sign In or Register to comment.