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

Solved Weapon stats and Crew equipment

FaxMate

Sailor Apprentice
Hello guys,

so I tried modifying some files by simply changing parameters for sword locations and stuff, I also changed my crews swords to falchion swords in "Tales of a Seahawk". But I can´t remember what file and line that was because I´d like to change that. Also I´d like to change weapon stats on some weapons (dmg, piercing, block). Is that possible? If so how can I change that?

Thanks in advance
 
The easiest way to get free falchions is to edit "PROGRAM\console.c". Between the lines int limit; and switch(0), add this:
Code:
GiveItem2Character(PChar,"blade21");
In the game, press F12 to give yourself a falchion. Press it lots of times to give yourself some more. You can then hand them to your officers. Or, if you want your boarders to use them, put them in the weapons locker in your cabin.

To change weapon stats, edit "PROGRAM\ITEMS\initItems.c". Look for this line if you want to change the stats for the falchion:
Code:
  n = InitBlade(n, "blade21", "blade21",                 3,  14,  0.45,   7,  334, 24.0, 29.0, 29, 19,  "",        2,     0,    PERIOD_EARLY_EXPLORERS,      PERIOD_THE_SPANISH_MAIN); // Falchion//BB
Other swords are in the same area. Guns are a little further down. You can see what the various numbers mean in the header at the top of the table.
 
The easiest way to get free falchions is to edit "PROGRAM\console.c". Between the lines int limit; and switch(0), add this:
Code:
GiveItem2Character(PChar,"blade21");
In the game, press F12 to give yourself a falchion. Press it lots of times to give yourself some more. You can then hand them to your officers. Or, if you want your boarders to use them, put them in the weapons locker in your cabin.

To change weapon stats, edit "PROGRAM\ITEMS\initItems.c". Look for this line if you want to change the stats for the falchion:
Code:
  n = InitBlade(n, "blade21", "blade21",                 3,  14,  0.45,   7,  334, 24.0, 29.0, 29, 19,  "",        2,     0,    PERIOD_EARLY_EXPLORERS,      PERIOD_THE_SPANISH_MAIN); // Falchion//BB
Other swords are in the same area. Guns are a little further down. You can see what the various numbers mean in the header at the top of the table.

Thank you, is there a way of looking at the blade_xx to know which one Ißm editing or do I have to try that one out myself?

If you want to find back what files you edited, keep a clean copy of your code folders.
Then you can use WinMerge to see what changes you made.

Thank you, will do next time haha, Malcolm gives me in the Intro, Falchion swords instead of the standard cutlass, do you know the line to that by any chance?

Ugh, I really should have made a copy, cause I am only able to sell cargo but whether normal traders n´or shopkeepers have got any items in their shops.
 
Last edited by a moderator:
Thank you, is there a way of looking at the blade_xx to know which one Ißm editing or do I have to try that one out myself?
Use GM Viewer:
Tools, Tutorials and Information

Thank you, will do next time haha, Malcolm gives me in the Intro, Falchion swords instead of the standard cutlass, do you know the line to that by any chance?
'string boarder_blade = BOARDER_SPAREBLADE;' at the top of his dialog file.
That refers to InternalSettings.h:
Code:
#define BOARDER_SPAREBLADE           "blade4"   // ITEMID -  sword your boarders will get if the weaponslocker is empty, choose itemID from Items\initItems.c
 
Thanks for that, still don´t know how to fix my storekeepers, have you got any idea on that? haha
 
So my current problems are:

Whenever I start a new game and want to take my suff out of the chest, gold has no texture and there isn´t a sword in that particular chest and Malcolm keeps bugging me that I haven´t taken my equipment.

Storekeepers have normal ware lilke planks and gold but cna´t trade personal items, they just have no inventory.

Normal shops on the streets are empty as well.

I edited following files:

initItems.c
InternalSettings.h

Those I pretty much just watched for some other reasons to change the location of swords like the highlander on Jamaica. But nothing in Oxbay/Barbados.
islands.c
Periods.c
globals.c
BuildSettings.h
nations_init.c
nations.c


I renamed the location maybe that caused the problem.
 
You'll need to check your backup files.
Chances are there's a typo in your changes somewhere.

Check also the error.log that will hopefully be in your main game folder.
 
Well, there is a small problem, I was stupid enough to not create any back up files of the files I was editing..

But I have uploaded the error log
COMPILE ERROR - file: items\initItems.c; line: 2917
Invalid Expression

COMPILE ERROR - file: Periods.c; line: 900
Invalid Expression
 

Attachments

  • error.log
    4.2 KB · Views: 142
I think the reason to the Periods error line could be, that I changed some time periods where certain swords can appear and cannot.


upload_2020-3-26_19-45-1.png


I saw that the initItems.c error was actually a typing mistake, there was a plus after one of the periods.
 

Attachments

  • upload_2020-3-26_19-44-25.png
    upload_2020-3-26_19-44-25.png
    91.6 KB · Views: 170
I am going to hang myself at the top of my mast, it was a typing mistake.

Thanks for reminding me to make back up files and checking the error log. Haha

Hope all of you are healthy. :)
 
Well, there is a small problem, I was stupid enough to not create any back up files of the files I was editing..
Reinstall the game. Then you have a backup again.
Useful to keep several copies of the game anyway.

I think the reason to the Periods error line could be, that I changed some time periods where certain swords can appear and cannot.
Technically that shouldn't cause a problem; as long as you kept the syntax intact.
 
Back
Top