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

Career in Royal Navy

In the error log, I only found that the function cannot find a character by this id. Ive made my init line in the characters_init.c file right after NK's line, so many lines after mine, which all initialises characters- so im sure it isnt reaches max characters. It registers 14 new characters, and not even the first cxan be found. But others characters registered at the following lines in characters_init.c will there, and found by id. I will try the trace though <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> It sounds a very good tool
 
Ok, after the first successes with correcting the sound lag (thinking the same with Hook) and making the difficulty related blocking code, I start to feel dumb. Trace wont makes any lines for me in compile.log, not even the one ive put into NK.c for testng. I cant find the "some text" in it, and I dont think even NK's characters wont initialised.

Somehow trace wont work for me in init files. Though I can find NK's "for cycle" generated governor nieces via ID with my function, and I cant find mines. Huh...
 
Huh indeed! <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />
And I'm not in a position to help you until the weekend. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
Grr, I dont give up <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> til someone can figure out something, I continue exploring POTC codes.
 
That's good! Never give up and in the weekend I'll try to help. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
Just tried the files you had attached some posts before... The characters were created as they should. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

I've added Trace("wolfchar" + i + " was correctly added into the game."); on line 54 of DanielWolf.c, and upon starting a new game the correct lines appeared in compile.log.

In the console I've checked
string wolf = getCharacterIndex("wolfchar1");
LogIt(wolf);

and it was returning a correct number, not -1. So all should be good.
 
What a... XD I did the same, but no text in compile.log, and GetCharacterIndex(); returns -1. (It finds NK's chars though)

Im clueless.
How can I turn on the text return of Trace?

my engine.ini looks like this:

modules path = modules\
full_screen = 1
screen_x = 1024
screen_y = 768
;screen_x = 1024
;screen_y = 768
;screen_x = 768
;screen_y = 576
lockable_back_buffer = 0
screen_bpp = D3DFMT_R5G6B5
texture_degradation = 0
controls = pcs_controls
program_directory = PROGRAM
run = seadogs.c
show_fps = 1
safe_render = 0
texture_log = 0
geometry_log = 0
;offclass = soundservice
mem_profile = memory.mp
startFontIniFile = resource\ini\fonts.ini
font = interface_normal
numoftips = 0
tracefilesoff = 0
[script]
debuginfo = 1
codefiles = 0
runtimelog = 1

[sound]
sound path = resource\sounds\

[stats]
memory_stats = 0
update_mem_profile = 0




what can be the @!%# problem... Thanks for your help! Knowing that the code somehow working in other systems give me some relief.

Edited:
My only BIG problem is, that why the HECK trace isnt work? I posted a trace in NK.c, and not even that worked, but NK's chaarters are initialised, and avaliable by ID...
 
Do you mean there's no text at all in your compile.log? It's an empty file? Now that's very strange, besides, your engine.ini looks good to me. I really don't understand what is going on.


a quick question : what is that line for, at the begining of DanielWolffunctions.c : #include "characters\characters_init.c" ? characters_init.c should only be launched at the begining of a new game, when all characters are created - why do you call it later?
 
No, compile.log seems ok, with alot of lines, only it wont show anything I wrote in Trace("something");

Oh, that include is an obsolete call.
Til I figured out the rules of adding a new character, I tried to call AddGameCharacter(n, ch); in my function....
And that needed that file.
But that cant be done right ingame, and that include is obsolete. Somehowremaned there.
 
If you add a trace into the console and execute it, does it work as it should?
Trace("CAPT'N DAN, IT WORKS!");

Otherwise, I know that's a silly question - but, you do start a new game to test your work?
 
yep, but loading a savegame, starting a new game, pressing f11 to reinit, or not, produces the same. Cant find the chars by ID ^^ - but i have an idea to solve this, I will try.
 
Found another way to add my characters, this way you doesnt need to start a new game, you can start to use the mod in a previously saved game, (also its a goal in my future development <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> to remain like that) and now my mod files reduced to 1, the functions file, as I dont need the previously existent file in the init folder.

<b>Career in the Royal Navy mod v0.1 progress: </b>
Now, after the call of the JoinTheNavy() function,
you will:

- Get a Brig-Rigged sloop-of-war, with royal navy painting,

- Your officers, dependig on their role will get a new model, and face picture, (selected randomly from a variety for each officer type) so they "join the navy" with you,

- As a Royal Navy ship cant leave port without all officer slots properly filled, you will get a randomly generated, proper navy officer, depending on your level, with unique irish-scottish names, one for each officer role, missing only those that already filled with your previous officers, (who joined the navy also ^^) and they are succesfully added as passengers, officers, so you can go ashore with them also. They have of course models selected from a variety of random models, strictly for each different role.

- As the process is divided into dynamic functions, later option of having randomly generated officers standing in each of the english forts as aquitances for you, will only need a proper location coding, as all other is given.


<b>How it works:</b>
The officer generating process is a completely new way. As I want to bond the generating of skills, and other things to match the Royal Navy mod, which needs a tad different officers. A bit of variability.


<strike>problems:

Yet somehow if you give your level (currently 7) to the function, which generates the new officers, its supposed to generate 1-2 level lower, or 1-2 level higher, or the same level officers, as you. But lvl 7 as given parameter will generate lvl 70, 69, 71, 72 officers... Adding a : lvl = lvl / 10; line will not change ANYTHING ^^
If I give the function a lvl 10 parameter, it generates lvl 100, 101,102 officers <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
Yet I was unable to trace where it multiplies the damn level with 10...
But worked on that a very short time.</strike>


<b>Whats next:</b>
Yet new officers only have skills generated, depending on their type, and your level, so need to code to generate perks also... They will going to have less, and different kind of perks, as normal officers, so you need to play with the tactics, that who you need in the active four...

The generating process is in its childhood yet, so you only get righteously balanced officers til lvl 20, after that only their hp goes up, skills variability remain the same as in lvl20. Also need a perk calculating function.

<u>The really big, next step is</u> going to be the recruiting office in every english colony. for that I will use the smaller shipyard, that little room with the desk, and little brigg model. There will be sitting a blue coat navy lieutenant, accompanied with two marine soldiers in red, and there you can sign up.
So I need to learn the basics of location creation, and quest, and dialog making.
For that I appreciate links to tutorials <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> at the ancient times i think there was something like that, or any other help.

Continuing the work

Good winds, and godspeed!

<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />
 
Check the <a href="http://forum.piratesahoy.net//index.php?showtopic=11380" target="_blank">Tools, Tutorials and Information thread</a>.
 
Thanks!

Managed to solve the problem with the level. Now it creates lv 5-6, 7, or 8-9 officers, for a lvl 7 player. Also added officer's price, to newly created navy officers so now they are truly became officers ^^
 
Congratulations! <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
<b>Royal Navy Career Mod v0.1 progress:</b>

See the other features at the past posts <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
Todays progress:

Ok, after a bit of martial arts camping, im back to the keyboard. Today I managed to add a recruiting office to Redmond, (in "Redmond_Town_01" to locator: "Door_2" this is the door, which you can see at the street, starting at the right end, after you came thru te gate from the port)
Now marines standing right before it, and inside also a marine, and a blue coat navy lieutenant sitting in a chair.

Yet they are all using Rys Bloom dialog ^^ so the office inside, and the soldiers are just eyecandy, but still not bad for today.


<b>Whats next:</b>
-Learn to write dialogs,
-link the existing JoinTheNavy() function to the sitting recruiting officer's dialog,
-Make a justful perk calculating for my navy officer NPCs,

and so on.

<strike><b>
problems, and what I need some help with, if you please <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> :</b>
Until now, I managed to build my mod in a way, that you can use with a loaded game also.
Now I needed to add this recruiting office, so now I need to start a new game anyway.-

Is there any way, that I can recall something like buildings initialising, when My mod start?
I really want to write somehting like this in it.
I really want to give back the feature, that it can be used with saved game also.
f11 wont work of course.</strike>

Working tonight to learn dialogs, if you have any info about the above question, I will really appreciate it!

Building the Royal Navy ^^ :

captain Daniel Wolf
<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />

Good winds, and godspeed!
 
I think there is ; try looking in PROGRAM\MAXIMUS_functions.c all code referering to Isla de Muerte (around line 2300), maybe that can help you.
 
Thanks!!!! Im very pleased!
That turned out to be VERY helpful! I can load any older savegame, which was saved without my mod, and when my mod starts, it places the door to redmond, and its inside room accurately, and working!
So, back again at the "dont need to start a new game" trail.
the other good news is, that I dont need to edit Redmond.c anymore..

so:

All files of Career in Royal Navy mod yet:
-Dialog files
-My functions file
-and a line, which starts my mod.

Continuing the work

Good winds, and Godspeed!
<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />
 
Sounds good. Though personally I don't think it's very important to ensure no new game is required, because just about every patch changes so many things that starting a new game is required anyway. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />

BTW: Why didn't F11 work? You can initialize additional code by adding it to the Reinit function. Locations used to be added in this way before, including the blacksmiths and such, though I prefer not to have it done this way because it's confusing to work with it. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Your making good progress with your mod captain Dan. I'm curious on how you'll give skills and abilities to the officers we'll be able to recrute in this office... For a good navy ambiant, and when you'll be sailing big ships, it should require a whole staff of ultra-specialised officers. But that doesn't match with PotC current officer system, in which only three officers contribute at the ships skills no matter what type of officer they are. And when you are at high level, you don't need them anymore, only for taking the price ships and helping in fight, because you have max-outed all your stats and have all abilities.
I'm currently trying to change the officier system (leaving the three slots for the land party), when I have a bit of time. I'll eventually post some more infos later.
 
Back
Top