Name change via "Replace" or "Modify"

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
NuclearVacuum
Posts: 41
Joined: 15.09.2008
Age: 34
With us: 16 years 2 months

Name change via "Replace" or "Modify"

Post #1by NuclearVacuum » 26.10.2008, 20:15

Is there a way to change (or add) a name to a planet when you use the "replace" and "modify" setting?
Я люблю экзопланет

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Name change via "Replace" or "Modify"

Post #2by John Van Vliet » 28.10.2008, 06:08

--- edit ---
Last edited by John Van Vliet on 25.10.2013, 03:31, edited 1 time in total.

Topic author
NuclearVacuum
Posts: 41
Joined: 15.09.2008
Age: 34
With us: 16 years 2 months

Re: Name change via "Replace" or "Modify"

Post #3by NuclearVacuum » 28.10.2008, 14:46

Thanks for that, but I would like to know if there is a way to change it with a replace or modify setting. Yes or no, is there one?
Я люблю экзопланет

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Name change via "Replace" or "Modify"

Post #4by selden » 28.10.2008, 16:23

Modify only lets you change the part between the squiggly brackets.

However, you can use Modify or Replace to insert the line
Class "invisible"
That effectively deletes the object.

Then define an entirely new object with whatever characteristics you want,
which could include a copy of the original definition.
Selden

Topic author
NuclearVacuum
Posts: 41
Joined: 15.09.2008
Age: 34
With us: 16 years 2 months

Re: Name change via "Replace" or "Modify"

Post #5by NuclearVacuum » 28.10.2008, 21:29

Wow, I had no idea that "invisible" was an option for this. This both answers how to change names, and to remove an object. This helps me out quite well. I have been meaning to ask this because I have several reasons. For instance, I would like to make the mythological nickname for some extrasolar planets.

Code: Select all

Modify "b" "51 Peg"
   {
   Class      "invisible"
   }

"Bellerphon" "51 Peg"
   {
   Texture         "exo-class4.*"
   NightTexture      "exo-class4night.*"
   Color         [0 0.36 1]
   Albedo         0.05
   Mass         150
   Radius         98000
   InfoURL         "http://exoplanet.eu/star.php?st=51+Peg"
   EllipticalOrbit
      {
      Period         0.0116
      SemiMajorAxis      0.0527
      Eccentricity      0.013
      ArgOfPericenter      142
      MeanAnomaly      296
      }
   }


I also wish to use this to give some planets and dwarf planets their [nick]names. I would rather not change the official code (in case I were to mess something up).

This is also good for some add-ons that I have, which have also given names to exoplanets, but have not removed the already in use code. This causes the new and old planets to overlap with each other.

Thank you again :mrgreen:
Я люблю экзопланет

Topic author
NuclearVacuum
Posts: 41
Joined: 15.09.2008
Age: 34
With us: 16 years 2 months

Re: Name change via "Replace" or "Modify"

Post #6by NuclearVacuum » 28.10.2008, 21:37

Is there a way to do this with STC-files?
Я люблю экзопланет

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Name change via "Replace" or "Modify"

Post #7by selden » 28.10.2008, 23:58

You have to use a different method to rename Celestia's Stars. As with STC object,s it's a bit of a hack. It'd be really nice if Celestia had a Rename option.

Rather than explaining the method here, I'd rather point you to the documentation. Please read the WikiBook's sections on Celestia's catalog files.
http://en.wikibooks.org/wiki/Celestia#C ... g_Celestia
Selden

Topic author
NuclearVacuum
Posts: 41
Joined: 15.09.2008
Age: 34
With us: 16 years 2 months

Re: Name change via "Replace" or "Modify"

Post #8by NuclearVacuum » 29.10.2008, 16:12

Sorry, I meant to say is there a way to remove a star (or make it invisible), to make a new version of it? I made the proper data for Delta Trianguli, yet the original one is still in the sky.
Я люблю экзопланет

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Name change via "Replace" or "Modify"

Post #9by selden » 29.10.2008, 19:25

If you provide a Star definition which specifies its Hipparcos ID number, it should completely replace the original definition. Note that the Hipparcos catalog number must not be in quotes.

Unfortunately DEL Tri already has been redefined in Celestia's catalog spectbins.stc.
It looks like you'll have to manually edit that file.
Selden

Topic author
NuclearVacuum
Posts: 41
Joined: 15.09.2008
Age: 34
With us: 16 years 2 months

DEL Tri

Post #10by NuclearVacuum » 02.11.2008, 16:36

Thank you, Selden. I manually altered DEL Tri, and now there is only the two stars of the system (no duplicates). Since we are on the discussion of DEL Tri, I thought I'd mention and show my code that I made for the system. This is the correct data for the two stars. This includes the proper distances, position, spectral type, and the radial brightness.

Code: Select all

Barycenter 10644 "DEL Tri"
   {
   RA         34.38458745
   Dec         +34.224231
   Distance      35.3
   }

"DEL Tri A"
   {
   OrbitBarycenter   "DEL Tri"
   SpectralType   "G0Ve"
   AppMag      4.9 # est. to equal 0.98 Solar radius
   EllipticalOrbit
      {
      Period      0.02743
      SemiMajorAxis   0.045
      Eccentricity   0.012
      Inclination      157
      ArgOfPericenter   0.00
      }
   }

"DEL Tri B"
   {
   OrbitBarycenter   "DEL Tri"
   SpectralType   "K4V"
   AppMag      7.35 # est. to equal 0.65 Solar radius
   EllipticalOrbit
      {
      Period      0.02743
      SemiMajorAxis   0.065
      Eccentricity   0.012
      Inclination      157
      ArgOfPericenter   180.00
      }
   }
Я люблю экзопланет


Return to “Development”