Jump to content

[Plugin][WIP][0.23.X] Champagne Bottle v0.2 - Ship Name Generator


jimj316

Recommended Posts

A while ago I saw a request in the suggestions forum that was asking for a way to have the game generate ship names for the player. I realised that I'm always having trouble deciding on names, so I made this little plugin to help. Simply click the little button on the toolbar marked "CB" to open the menu, and poll the KSC workers what they think the ship would be named (please note, you may have to undergo some "workforce restructuring" before you get good suggestions).

This plugin uses blizzy78′s ToolBar plugin, included in the download.

ChampagneScreenie.png

Thanks to:

- TaranisElsu, for his code examples

- blizzy78, for developing the Toolbar plugin

- AzziWeaver, for helping think up like half of the ship name words :3

- codepoet, for working out how to actually change the ship name textbox!

Source code is included, under \GameData\Champagne\Source\. Source code is free to edit and distribute without permission, provided you credit me if anything of mine gets published.

Download from Curse

Enjoy!

Updated 04/02/2014: added ability to click to set the ship name directly (thanks to codepoet), support for user-made name patterns and word lists, and the option to keep ship names in their native Kerbal.

Updated 25/06/2014: re-uploaded to Curse.

Edited by jimj316
Link to comment
Share on other sites

FlightGlobals.ActiveVessel.vesselName should allow you to assign any string to the active vessel's name. The next time it saves, it should be good.

For unloaded shps, you'll need the ProtoVessel.vesselName property, but it should work the same way.

Link to comment
Share on other sites

@TimMartland, jfull: thank you very much! ^^

Maybe you could have a ship name generator dependant on the root part. Something like a probe or a capsule should have different sets of names for obvious reasons.

I am considering doing this, but for now it simply draws words from the same file. Later I will add the ability to customise word patterns, and that would be a good oppurtunity to add a systam that can do that.

FlightGlobals.ActiveVessel.vesselName should allow you to assign any string to the active vessel's name. The next time it saves, it should be good.

For unloaded shps, you'll need the ProtoVessel.vesselName property, but it should work the same way.

FlightGlobals.* only works when the vessel is in flight, and this plugin is meant to be used in the editor, but thanks anyway :P

Link to comment
Share on other sites

  • 2 weeks later...

I love this mod! Of course I'm working on a feline-inspired collection of word snipplets for my own enjoyment. Some of the names I generated so far:

KSV Bastet's Dream, HMAC Light Whisker, KAC Basement Cat's Ascension, ISS Longcat's Ear, HMS Spectral Can Opener, KAC Swift Purrer, HMS Lost Ear, SSat Ceiling Cat's Opportunity, MSS Chairman Meow's Blade, HMRC Copy Cat's Claw, HMSC Hipster Kitty's Thunder, MSS Tacgnol's Night...

Quick tutorial on how to change/add/replace word snipplets:

1) install the mod

2) open the Champagne folder in Game Data

3) open the .txt files in Notepad++ or something

4) edit away

Thanks bunches for this mod!

Link to comment
Share on other sites

Thank you!

In case anyone is wondering, it is totally ok to edit the word lists as described above, and even distribute them for others to use (you don't need to attribute me since they'll already know who made the mod :P). The program takes words from the four word lists (verbing.text is depreciated and is not used) and combined them in one of 5 name patterns:

  1. <class> <adjective> <noun>
  2. <class> <adjective> <title>
  3. <class> <title>
  4. <class> <person>'s <noun>
  5. <class> <noun>'s <noun>

These are presently hardcoded into the program, but the next version will add an additional text file that will allow these to be edited (and will hopefully allow arbitrary word lists, allow custom ship classes, and remove the ASS class). Sadly, this will require a bit of a code restructure, and I don't currently have the time :(

Link to comment
Share on other sites

That was some valuable info, thanks!

I spend a bit of time on my version for cat lovers and it works pretty well now. Half of the suggested names should be cat related. Everybody who wants to try it: Champagne Bottle - Cat Edition.

Use at your own risk, no warranties provided, feel free to edit and distribute. By downloading the files you agree to being kind to our fluffy feline overlords and not feeling offended by cat related words. =3

Install by extracting the .txt files in the zip into the Champagne mod folder.

Careful, this will overwrite the original word list from the mod! Backup your files first!

Link to comment
Share on other sites

FlightGlobals.ActiveVessel.vesselName should allow you to assign any string to the active vessel's name. The next time it saves, it should be good.

For unloaded shps, you'll need the ProtoVessel.vesselName property, but it should work the same way.

In the editor have you tried EditorLogic.fetch.shipNameField.Text="My WAcky new ship name"?

Link to comment
Share on other sites

  • 2 weeks later...

Updated to v0.2, adding the ability to change word patterns, add user word lists, the ship chass now auto-detects the type of vessel you're building, and you can now get ship names in the "Kerbal language" :3

Coming soon, the ability to set word patterns to only apply to a certain type of vessel, change the ship class letters, and mannually change the vessel type.

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...
  • 3 weeks later...
  • 10 months later...
  • 2 months later...
  • 1 year later...
  • 2 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...