• 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!

adding NPCs

Captain Normal

Landlubber
Ahoy there,

How can you add NPCs to the ports ? I want to add a few hireable officers if possible... with names and stats I've customized, rather than random ones from the taverns... I had a look at the name list, thinking I could add a name and just wait til he showed up but... there are thousands of combinations in there...

I want to have Guybrush Threepwood or possibly even LeChuck under my command... !
 
There are some tutorials being written to address this for the new build - I will see if I can get permission to reprint the one you need here. Hang loose! :cheeky xD:
 
Alrighty then... Im gonna try to wait! :cheeky

In the PROGRAMCharactersinit directory thers an officers.c file.. I looked in there and theres all the officer npcs entered in there with a couple random (empty) ones... I don't know if I ought to change these... I don't want to shaft the game.. Like rhys bloom... If I were to change the name, then references to him elsewhere in the code would not find it anymore...

Do the random officers that show up in the tavern, take their information from the empty random officer fields in this file, do you know?
 
No they don't, at least I don't think so. If you want to do something, make sure you make a copy of the original so you can always put it back.

Best thing to do is to select one officer's info, copy it, paste it, and then build on it from there. You WILL need to alter other files. I started to tell you what to do and then realized, it's a BIG JOB!!!

You have touched on the tip of the iceberg here - doing this is not an easy task - I struggled with it for quite some time before I got it working (with some help from the modders who hang out here, thank you!)... There are files that you need that you have NO IDEA you need... Sometimes it's just a line, other times it's a whole file...

I'm not really a coder, I'm more of a "`stumbler-upon`-er". I use UltraEdit to edit my files, and it has a great search utility that will search over files and find any term or phrase you ask - and print it to a temporary document - this is how I found what files I needed to change as it will search INSIDE the file as well as for filenames... http://www.ultraedit.com/ It's a free download, trial is 45 days, well worth the $ should you decide to keep it... I wouldn't be without it.

Now, things have changed too, with the new build... PMT has implemented a new system of officers that relies upon numbers. Long story... ANYHOW, Scheffnow is the one who wrote the tut I have - it's a little on the technical side but it'll help - I just need to ask him if it's okay to post it here as there might be updates to it that will make it better, clearer...
 
Actually I believe that those blank entries in the officers.c file are used for the hired officers. The code the randomises the officers does call up some data and i think that it comes from that file.
If you change them then you risk causing some problems whenever you try to hire an officer at a tavern.
 
:cheers Ah, see! I guess they're there for a reason. (DOH!) I never used them as I figured copy and paste an existing profile would do me...

See, like I've been telling ya, I don't know everything, guys! :)

Thanks, Sirus... :cheeky :cheers :yes
 
Right. You see, encounter officers (aka tavern officers; but _this_ is why they're called encounter) are in fact _first_ generated as fantoms, i.e. `not-permanent` characters.
If you choose to hire one, his/her stats are copied into a blank EncOfficer slot and the fantom is removed. That's why there's a fade out, so you don't see the switch.

When/if you fire that officer, his/her slot is opened up again.
 
Back
Top