Name Generator

edited November 2010 in AstroSynthesis General
Ok, I'm asking for help. I've been trying to figure out the code for weeks and either I just haven't been able to get enough time to figure this out or I'm just bad at figuring out code. I know exactly what I want it to do, its just getting it to do what I want thats hard!

I want all systems/planets with populations greater than 10,000 to have names, and all with less to have numbers. I want subsectors to have different names than planets and systems, and, if possible, suns to have different names (or different name endings) than planets.

Is this possible? Any help or advice would be greatly appreciated!

Deinjur?

Danger is my middle name... ;)

Comments

  • If you want to be able to evaluate planet properties and use that information for naming purposes, you'll have to write a script that loops through all the systems and sets the name. You wont be able to do that sort of thing with the inspiration pad generators.
  • Ok, but if I don't want to make a script, could I base it off of the habitability of the system?

    Like, uninhabitable systems are numbered/default named, and habitable and hospitable planets get named?
  • Yes, you can use habitability w/ the ipp-based name generator. There's a section in the help file under 'advanced usage' that shows the variables that get set that you can use in name generators.
  • Ok, I'm making progress in figuring this out. I think I'm figuring out the questions I need to ask at least.

    So here's the next one: there is a Habitability and a Population variable in the AS naming generator. Can I somehow program the generator thus: if system is populated, use SystemName, if not populated, use DefaultName? This is what I've been trying to make work:

    Table: GetName
    [when]{$Population} > 0[do][@{SystemName}]
    [when]{$Population} = 0[do][@{DefaultName}] [end]

    But its not working. Any suggestions anyone?
  • This doesn't work either:

    Table: GetName
    [when]{$Population} = NotPopulated[do][@{DefaultName}]
    [when]{$Population} = Populated[do][@{SystemName}] [end]
  • This one is starting to get the right results, but there's still some scripting language showing up.

    Table: GetName
    [when]{$Population} = NotPopulated[do][@DefaultName]
    [when]{$Population} = Populated[do][@SystemName] [end]
  • Here's a sample of the strange text I'm getting as names:

    [when]Populated = NotPopulated[do]SS00-070107

    [when]Populated = Populated[do]Udiko

    So it looks like its doing the basic job of telling the generator when to use SystemName or DefaultName (and yes, I changed the DefaultNames a little)... but I don't know how to get rid of the rest of the text... PLUS, although the generator is saying that it is not populated, AS is showing some of the DefaultNamed systems as populated... But I'm not trying to fix this yet. One thing at a time.

    Any help/tips on what I'm missing here? How do I make the name generator lose the programming text?
  • You're getting the 'when' in the results because you're missing the corresponding 'end'. Plus, each line is a different entry in a table, so using multiple when's like that will just cause ipad to pick randomly one of them.

    But you dont need When's - thats what tables are for.
    table: GetName
    [@{$Population}&;#93;
    
    Table: Populated
    Udiko
    
    Table: NotPopulated
    S {$PositionXPad} {$PositionYPad} {$PositionZPad}
    
  • Ed, that was incredibly helpful! Thank you muchlies.
  • Okay, I've gone over this a few times and I must be missing something. For some reason, populated systems are getting DefaultNames, and thats not supposed to happen. It should give any unpopulated system a DefaultName (modified as shown below) and all populated systems a SystemName (and in this case I just put in about 10,000 names from my name generator). What am I doing wrong?

    Table: GetName
    [@{$Population}]

    Table: NotPopulated
    [@{$BodyType}Default][@{$Habitability}]{$PositionXPad}{$PositionYPad}{$PositionZPad}

    Table: StarDefault
    ST

    Table: Multiple Star SystemDefault
    MS

    Table: Close Multiple SystemDefault
    CM

    Table: TerrestrialDefault
    TD

    Table: Gas GiantDefault
    GG

    Table: Space StationDefault
    SS

    Table: White DwarfDefault
    WD

    Table: Neutron StarDefault
    NT

    Table: Black HoleDefault
    BH

    Table: NebulaDefault
    NB

    Table: Inhospitable
    00

    Table: Habitable
    01

    Table: Hospitable
    11

    Table: Populated
    (10,000+ System Names I created separately in another name generator)
  • Is there a list of the different Body Types? I'm assuming there are more than what is in the default generator, but I don't know for sure.

Leave a Comment