• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Where are ship names stored during the game?

iamthejarha

Landlubber
I've been curious about this for a while. I know how to change the name of my starting ship, but are the names for all the ships you capture/encounter stored in your save files? I'm only asking because my main ship has a custom name (Emily's Love) that I can't mimic with the `in-game` keyboard (no apostrophe, bah), and I'd like to switch to the Mefisto without losing that custom name. Is that possible, or is all the necessary info stored in the save file and is thus inaccessible?
 
You would need to set it ingame with the code from the characters_init.c
I.E:
ch.Ship.Name = "Emily's Love";

you could work that into some dialog, I alway would use quests for that sort of thing but I'm not sure if it would be possible to just throw that in there. ch would obviously have to be pointing at your character.
You could also rig something up like NK(I think) did with the name where you can hit 'n' and set it to the text file.

CaptainDams was refering to adding the ship name to the game's database, but you prolly don't want tto see another Emily's love sailing around but your choice.

good luck.

Edit: Also I tried editing my save file(doing a text search for the name of your boat finds it pretty quick) and that didn't work so well.... though i didn't try very hard...I wouldn't recomend it.
 
Thanks, Verruckt. An idea like the one NK used for renaming the main character is what I was thinking of, which would be perfect. Now I just have to figure out how that was done, LOL. Of course, that's most of the fun, right? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/pirate2.gif" style="vertical-align:middle" emoid=":p:" border="0" alt="pirate2.gif" />
 
<!--`QuoteBegin-Verruckt`+--><div class='quotetop'>QUOTE(Verruckt)</div><div class='quotemain'><!--QuoteEBegin-->You could also rig something up like NK(I think) did with the name where you can hit 'n' and set it to the text file.[/quote]

Okay, I've been trying to figure out exactly how NK worked the character `name-change` into a `hot-key`, and these are the relative entries that I've found so far:

<i>In PROGRAMBuildSettings.h:</i>
#define FIRSTNAME ""
#define LASTNAME ""

<i>In PROGRAMCONTROLSinit_pc.c:</i>
CI_CreateAndSetControls( "", "NK_NameChange", CI_GetKeyCode("KEY_N"), 0, false );

<i>In PROGRAMseadogs.c:</i>
if(ControlName == "NK_NameChange") { ChangeName(GetMainCharacter()); }

<i>In PROGRAMCharacterscharacters_init.c:</i>
ChangeName(GetMainCharacter()); // NK, this sets mainchar name to name in ..BuildSettings.h


I want to make a `hot-key` that allows me to change my main ship's name, which can be set in BuildSettings.h (as #define SHIPNAME "", for example). The problem is that I haven't found where "ChangeName()" is defined as a function (I assume "GetMainCharacter()" is defined inside the game engine itself or something). Without knowing how it's defined, I don't know how to define my own function that will change the ship name. Any POTC code gurus out there know enough about this to help me out? I'm still digging through code and header files, trying to find this stuff, but I could <i>really</i> use a little help right now. There's a cask of rum in it for ya if you can! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/pirate2.gif" style="vertical-align:middle" emoid=":p:" border="0" alt="pirate2.gif" />
 
what i always do in those circumstances is go into windows explorer, `right-click` on the PROGRAM folder, and do a search for the function name <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" />

but why do you want to do it this way, since you can change ship names whenever you want in the ships interface?
 
<!--QuoteBegin-Kieron+--><div class='quotetop'>QUOTE(Kieron)</div><div class='quotemain'><!--QuoteEBegin-->what i always do in those circumstances is go into windows explorer, `right-click` on the PROGRAM folder, and do a search for the function name <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" />

but why do you want to do it this way, since you can change ship names whenever you want in the ships interface?<!--QuoteEnd--></div><!--QuoteEEnd-->

Two reasons, actually.
1: So I can have ship names that include characters like apostrophes, which aren't available on the `in-game` keyboard, and
2: because I've learned a lot just by taking on this little project, and now I'm eager to see if it <i>can</i> be done, even if doing so doesn't prove to be worth it.

I've used that method before, I'll give it another try and see what I can sort out.
 
Back
Top