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

Fixed Crew attributes missing on new game

ANSEL

Corsair
Storm Modder
Hearts of Oak Donator
Haven't seen this error before. 14 okt Zip.
 

Attachments

  • error.zip
    212 bytes · Views: 75
  • system.zip
    708 bytes · Views: 61
When starting a new game in assassin I get the following errors when talking to a sailor in the tavern and hiring crew:
Code:
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 21
missed attribute: crew
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 21
null ap
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 21
no rAP data
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 242
missed attribute: crew
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 242
null ap
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 242
no rAP data
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 21
missed attribute: crew
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 21
null ap
RUNTIME ERROR - file: dialogs\Random_sailors_sit_tavern_dialog.c; line: 21
no rAP data
RUNTIME ERROR - file: interface\hirecrew.c; line: 94
missed attribute: morale
RUNTIME ERROR - file: interface\hirecrew.c; line: 94
no rAP data
RUNTIME ERROR - file: interface\hirecrew.c; line: 106
missed attribute: quantity
RUNTIME ERROR - file: interface\hirecrew.c; line: 106
no rAP data

On a free play with Jean Lafitte I only get the
Code:
RUNTIME ERROR - file: interface\hirecrew.c; line: 94
missed attribute: morale
RUNTIME ERROR - file: interface\hirecrew.c; line: 94
no rAP data
error
Is this something I screwed up or does someone else has an idea?
I think the crew stuff isn't set during first initialization. Anyone knows where that is set normally?
 
That's odd; didn't have that before. I can check earlier versions....

Simplest way to check should be:
1. Start Assassin
2. Hire crew at tavern
3. Check error.log file

Right?
 
This problem was NOT in the Saturday 25 July 2015 update, but IS in the 8 October one.
I have no intermediate versions available to check where and when it was introduced.
 
Do you have the character_init.c file from the 25 july version for me?
 
@Levis: Could it be that the SetBaseShipData function used to be called for the player on game start, but not anymore?
 
Do you have the character_init.c file from the 25 july version for me?
Yep, I think I figured it out!
Looks like you removed the call to SetAllShipData which used to call SetBaseShipData for every character.
That one then ensured that all sorts of variables, including the crew quantity/morale, would be set.
But that doesn't happen now anymore.
 
Your almost right :p
I removed the postinit for characters in the character_init file because it was called later for them. In here the SetBaseShipData was also called. But this wasn't called for the main character. So adding this to the maincharacter should fix the problem. It should still be called for everyone else in createcharacter (I believe)
 
So in characters_init.c:
Code:
  if(GetMainCharacterIndex()>=0)
   {
     SetMainCharacterIndex(GetMainCharacterIndex());
   }

   SetBaseShipData(GetMainCharacter()); // Levis
   //SetAllShipData();
   //SetAllFellows();
Seems to work. :onya

This may have left out more player ship initialization, so could have contributed to the weirdness players have experienced this past week.
 
So in characters_init.c:
Code:
  if(GetMainCharacterIndex()>=0)
   {
     SetMainCharacterIndex(GetMainCharacterIndex());
   }

   SetBaseShipData(GetMainCharacter()); // Levis
   //SetAllShipData();
   //SetAllFellows();
Seems to work. :onya

This may have left out more player ship initialization, so could have contributed to the weirdness players have experienced this past week.
if so I need to put it back, but we'll first see what this does. could very well be not having a fully initialized ship yourself caused some of the problems.
 
If it's still not working we might need to remove it from this statement:
Code:
    if(!CheckAttribute(character, "model.animation") || character.model.animation == "" || !CheckAttribute(character, "model.height"))
    {
        /*if(character.sex == "man")
        {
            character.model.animation = "man";
            character.model.height = 1.8;
        }else{
            character.model.animation = "woman"; // was towngirl. No real difference, IIRC.
            character.model.height = 1.75;
        }*/
        //Assume no postinit done.
        Character_PostInit(sti(character.index));
    }
In createcharacter
 
could very well be not having a fully initialized ship yourself caused some of the problems.
That's what I meant. :wp

If it's still not working we might need to remove it from this statement:
Code:
    if(!CheckAttribute(character, "model.animation") || character.model.animation == "" || !CheckAttribute(character, "model.height"))
    {
        /*if(character.sex == "man")
        {
            character.model.animation = "man";
            character.model.height = 1.8;
        }else{
            character.model.animation = "woman"; // was towngirl. No real difference, IIRC.
            character.model.height = 1.75;
        }*/
        //Assume no postinit done.
        Character_PostInit(sti(character.index));
    }
In createcharacter
I don't see it in there? :confused:
 
So in characters_init.c:
Code:
  if(GetMainCharacterIndex()>=0)
   {
     SetMainCharacterIndex(GetMainCharacterIndex());
   }

   SetBaseShipData(GetMainCharacter()); // Levis
   //SetAllShipData();
   //SetAllFellows();
Seems to work. :onya

This may have left out more player ship initialization, so could have contributed to the weirdness players have experienced this past week.
@Levis, how did we solve this issue again???
I cannot find the call to Character_PostInit for the player anywhere and the call to SetBaseShipData seems to have vanished as well.
I'm confused! :shock

EDIT: But somehow it DOES seem to work now. I just can't remember HOW.... o_O
 
Last edited:
Back
Top