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

Yet another Idea for a character

Jacob

Sailor
Storm Modder
Alright

So, I added yet ANOTHER character into the game (Ealderd The Snake) amd his sword (Viper Sword).

The problem is that game crashes while loading.

I adding necessary files in here, so you can have a look.


PS.

@Grey Roger I swear look at this picture, I couldn't upload anything xD
Zrzut ekranu (390).png
 

Attachments

  • Snakeish General.zip
    581.3 KB · Views: 116
  • compile.log
    3.4 KB · Views: 98
  • error.log
    381.4 KB · Views: 109
  • system.log
    439 bytes · Views: 104
Looking at "PROGRAM\Characters\characters_init.c":
  • In the "PLAYER_TYPE_ADVENTURER" section, you have duplicate cases for Bertorx and Xertelen. This probably isn't what's crashing the game but you don't need both, the game will only use one of them. You can also get rid of this bit:
    Code:
                   // Default
                   ch.shiplog.Entry.log0 = "An old friend of the family has bought me passage on a ship bound for the New World. But whether he did that out of kindness or just to get rid of me, I do not know. I have never had much luck in Europe and the little I own in this world was safely stored in my cabin. It will be difficult to get on my feet, but I am determined to succeed at last!";
                   // Deliberately no items
    It seems to have been copied from another section and does not belong here. The proper default code for "PLAYER_TYPE_ADVENTURER" is the part which gives you "bladeC2", just after your duplicate part about Xertelen.
  • In the "PLAYER_TYPE_MILITARY" section, you have a switch case for "Ealderd The Snake" but no switch to go with it. That may be what is crashing the game. As Ealderd is the only special military character, you could use an "if" block instead of a "switch" block, similar to what is done for sword master Bohdan Aleskeevich Voronov:
    Code:
           case PLAYER_TYPE_MILITARY:
               if (GetMySimpleOldName(ch) == "Ealderd   The Snake")
               {
                   ch.shiplog.Title.log0 = "My decision";
                   ch.shiplog.Entry.log0 = "I spent my 10 years as a General in Spanish colonies, I fought my kings enemies, helped their allies and negotiated with others my times before, but this time, it was different. I received an order from one of the spanish governors to attack and capture the pirate island. When I got there, I saw a pirate fleet, full of frigates, but when I saw through the spyglass was shocking. I saw my king leading the pirates. In anger I boldlessly charged them. We sunked 12 frigates but I got washed off from board. After spending 2 days in intensive care, I regained my consciousness in Nevis and from here my adventure begins.  "
                   GiveItem2Character(ch, "snakeb");
               }
               else
               {       
                   ch.shiplog.Entry.log0 = "I have fought in battles all across Europe and seen more men die than I have likely spoken to. The fact is, however, that the risk is too great and the rewards too small for my taste. So, looking for a new calling where I could put my particular set of skills to use, I have spent my life savings on a ship and made my way to the new world where they say a captain with a stout heart can make a name for themselves. If they don't mind the sight of a little blood that is and I, for one, never have.";
                   if(ENABLE_WEAPONSMOD)
                   {
                       GiveItem2Character(ch, "blade19+1");
                       GiveItem2Character(ch, "PiratesPistol+1");
                   }
                   else
                   {
                       GiveItem2Character(ch, "blade19");
                       GiveItem2Character(ch, "PiratesPistol");
                   }
               }
               GiveItem2Character(ch, "commonarmor");
           break;
@Pieter Boelen: are non-staff members blocked from attaching files in PM's?
 
alright I changed the code for a bit and now, there's another error.log

Scanning modules\
Loading modules...
Loaded 0
Reset...
Initializing CORE...
Creating atoms space: 128
done
initializing complete
Initializing DirectX 8
ERROR: Techniques: Find duplicate technique name: radeon8500sea
Techniques: 9 shaders compiled.
Techniques: 181 techniques compiled.
Techniques: compiled by 78770812 ticks.
BeginScene
The method call is invalid For example, a method's parameter may have an invalid value

and the compile.log
----------------------------------------
Build 14 (13th August 2021)
Savegame Compatibility: 14.943
----------------------------------------
Gauging: StartGauging
Gauging: starting init
Gauging: interface
Gauging: Storylines
Gauging: Profiles
Gauging: starting init
==> BuildSettings: Sets to default
==> BuildSettings: New settings applied
Gauging: load build settings
Gauging: periods
InitNations: NATIONS_QUANTITY=7, bGuest1NationExists=1, bGuest2NationExists=0
Gauging: nations
Gauging: preprocessor
Init encounters complete.
Gauging: enc
Gauging: cann
Gauging: goods
Gauging: ships
IslandsInit: 22 islands loaded.
Gauging: islands
Init weathers complete. 0 weathers found.
Gauging: weather
InitSounds (English): created 19 entries.
InitMusic: created 103 entries.
Gauging: Aliases
Gauging: sound
Main_LogoVideo() 0
PauseAllSounds
ResumeAllSounds
Main_LogoVideo() -1
Gauging: initgame start
Gauging: createlayers
Gauging: stores
Gauging: sound
Gauging: delete sea env
Gauging: towns
Number of locations: 840
Gauging: locations
IslandsInit: 22 islands loaded.
Gauging: islands
Gauging: wdmap
Gauging: dialogs
Gauging: teleport
bool CreateParticleEntity()
Gauging: particles
Items initialization complete. Loaded 1538 items.
Gauging: items
Gauging: quests
Gauging: sea ai groups
Gauging: questmapenc
Gauging: landenc
==> BuildSettings: Sets to default
==> BuildSettings: New settings applied
Gauging: load options
Gauging: models - Total number of models: 1205
InitSounds (English): created 19 entries.
InitMusic: created 103 entries.
InitOptionalMusic: now 104 entries.
Gauging: Aliases
Gauging: infoshow
Gauging: initgame done
Init character names complete.
SETTING MUSIC: music_main_menu
storyline\standard\SL_utils.c was loaded, unloading now...
storyline\standard\quests\both_reaction.c was loaded, unloading now...
storyline\standard\quests\quests_reaction.c was loaded, unloading now...
Init character names complete.
Init character names complete.
Gauging: start new game
bChangeNation set to 'true'
Gauging: ng iface
Gauging: perks
Gauging: officertypes
Gauging: periods
==> BuildSettings: New settings applied
==> BuildSettings: New settings applied
Gauging: nations
InitNations: NATIONS_QUANTITY=7, bGuest1NationExists=1, bGuest2NationExists=0
Gauging: characters
Gauging: ships
Gauging: ng initgame start
Gauging: createlayers
Gauging: stores
Gauging: sound
Gauging: delete sea env
Gauging: towns
Number of locations: 840
Gauging: locations
IslandsInit: 22 islands loaded.
Gauging: islands
Gauging: wdmap
Gauging: dialogs
Gauging: teleport
bool CreateParticleEntity()
Gauging: particles
Items initialization complete. Loaded 1538 items.
Gauging: items
Gauging: quests
Gauging: sea ai groups
Gauging: questmapenc
Gauging: landenc
==> BuildSettings: New settings applied
==> BuildSettings: New settings applied
Gauging: load options
Gauging: models - Total number of models: 1205
InitSounds (English): created 19 entries.
InitMusic: created 103 entries.
InitOptionalMusic: now 104 entries.
Gauging: Aliases
Gauging: infoshow
Gauging: ng initgame stop
storyline\standard\quests\both_reaction.c not loaded, loading now!
storyline\standard\quests\quests_reaction.c not loaded, loading now!
Gauging: start reinit
Gauging: preprocessor
Gauging: nosave
 

Attachments

  • characters_init.c
    49.2 KB · Views: 103
  • error.log
    172.5 KB · Views: 112
Remember, you can upload "system.log" and "compile.log" as well, you don't need to post their contents!

As for "characters_init.c", you now have this for "PLAYER_TYPE_MILITARY":
Code:
       case PLAYER_TYPE_MILITARY:
       switch(GetMySimpleOldName(ch))
            case PLAYER_TYPE_MILITARY:
The 'switch(GetMySimpleOldName(ch))' is not needed at all because you're checking for Ealdred with the 'if' block. The second 'case PLAYER_TYPE_MILITARY:' line also needs to be deleted.
 
Okay, I added all log files and init file.

it's still there
COMPILE ERROR - file: characters\characters_init.c; line: 736
Duplicate variable name: i
 

Attachments

  • system.log
    439 bytes · Views: 104
  • compile.log
    3.3 KB · Views: 81
  • error.log
    77.9 KB · Views: 92
  • characters_init.c
    48.7 KB · Views: 85
Also in the section for "PLAYER_TYPE_MILITARY":
Code:
               if(ENABLE_WEAPONSMOD) {
               {
                   GiveItem2Character(ch, "blade19+1");
                   GiveItem2Character(ch, "PiratesPistol+1");
               }
               else
               {
                   GiveItem2Character(ch, "blade19");
                   GiveItem2Character(ch, "PiratesPistol");
               }

Change this:
Code:
if(ENABLE_WEAPONSMOD) {
... to this....
Code:
if(ENABLE_WEAPONSMOD)
 
Yes now it works.

But now there's another problem

The blade Icon

The icon for Viper sword is completely invisible.
 
According to the definition of "snakeb" in "initItems.c", the icon for the sword is in "RESOURCE\Textures\INTERFACES\itemsGR.tga.tx", position 11. Have you added the icon for the sword into "itemsGR.tga.tx"? The file is not included in your "Snakeish General.zip".
 
Yes I added the icon for them.

After while, I thought I should add a new icon section, so I made to itemsSK.tga.tx
only Viper sword icon is there.
 

Attachments

  • initItems.c
    365.5 KB · Views: 85
  • .tx.zip
    389.2 KB · Views: 100
Good idea - as you might have guessed, "itemsGR.tga.tx" is my creation and I'm liable to need it for my own work!

The new file will need an entry in "RESOURCE\INI\INTERFACES\pictures.ini". The attached version should have what is needed.
 

Attachments

  • pictures.ini
    203.6 KB · Views: 95
Good idea - as you might have guessed, "itemsGR.tga.tx" is my creation and I'm liable to need it for my own work!

The new file will need an entry in "RESOURCE\INI\INTERFACES\pictures.ini". The attached version should have what is needed.

@Grey Roger I don't know how to thank you.
This new string surely will definitely help in order to add more items.

and I'll leave itemsGR as it should.

But I also had a thought.

How to add a gun, a shotgun to be blunt.

I searched my version of Stock PotC and I found a shotgun.
items1.tga.tx also shows it's icon.

Maybe we could use it?

I know shotgun ALREADY exists in New Horizons (on Nevis near Strange House)

Here's the pic

Zrzut ekranu (393).png
 
Last edited:
If you go to that "Strange House", you'll meet Clint Eastwood. If you're playing in Arcade mode, he'll be carrying the shotgun. Survive being hit by it and then fighting him, and the shotgun is yours. Since a pump-action shotgun is complete nonsense in the age of sail, if you're playing in Realistic mode then he carries a brace of four horse pistols instead. (Or, if you're playing in "Napoleonic" period and Realistic mode, he carries a Collier revolver.)

The blunderbuss, and the musketoon in most periods, are the age of sail's version of a shotgun.
 
@Jacob, it occurs to me a promotion for you is long overdue.
Welcome officially to the Storm Modders! :cheers
 
Back
Top