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

Feature Request Reinit for character array

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
@Talisman: That proves that indeed Hylie isn't initialized properly.
A new game should fix that.

There is a way to add characters in mid-game but I never use that.
If you like, I can figure that out tonight so you can continue with your save.
 
Calling the character init should work, but might be usefull to take a look at reinit so it actually does reinit the characters right.
 
Calling the character init should work, but might be usefull to take a look at reinit so it actually does reinit the characters right.
I think this isn't actually much of a bug. If I recall, characters aren't actually included in the Reinit at all.
They used to be at some point in the past, but we disabled that on purpose. Probably because that resets them all back to "default" or so.
Can't remember now; it was a long, LONG time ago.
 
I think indeed it is because they are being reset.
But maybe we could write a function which only reinits new characters.
 
I can't find reference to actually reinitializing the character array in earlier modpack versions.
Perhaps I misremember and it just was never possible.
Assuming this indeed never worked, I've marked this as a "Feature Request" and moved it to the Beta & Brainstorming forum rather than the Bug Tracker.

It IS possible though to initialize characters in mid-game, but this is the only simple example that I know of:
Code:
  if(GetCharacterIndex("B_keeper") == -1)
   {
     n = FindBlankCharSlot();
     CHARACTERS_QUANTITY++; // NK 05-04-05
     if(n != -1)
     {
       makeref(ch,Characters[n]);
       ch.old.name = "Ye Keeper"; // MAXIMUS 16.10.2006
       ch.old.lastname = "o' ye Hoarde"; // MAXIMUS 16.10.2006
       ch.name    = TranslateString("","Ye Keeper");
       ch.lastname    = TranslateString("","o' ye Hoarde");
       ch.id     = "B_keeper";
       ch.model   = "admiral";
       ch.sex = "man";
       ch.act.type = "citizen";
       ch.location = "none";
       ch.location.group = "goto";
       ch.location.locator = "goto1";
       ch.dialog.filename = "B_hoardkeeper.c";
       ch.nation = ENGLAND;
       ch.rank    = 1;
       ch.reputation = "None";
       ch.experience = "0";

       ch.skill.Leadership = 6;
       ch.skill.Fencing = 3;
       ch.skill.Sailing = 4;
       ch.skill.Accuracy = 9;
       ch.skill.Cannons = 5;
       ch.skill.Grappling = 5;
       ch.skill.Repair = 6;
       ch.skill.Defence = 8;
       ch.skill.Commerce = 7;
       ch.skill.Sneak = 8;
       ch.money = 10;
       LAi_SetStayType(ch);
       LAi_SetHP(ch, 200.0, 200.0);
       if(show) Log_SetStringToLog(TranslateString("","BK Keeper initialised."));
     }
   }
We could actually get rid of that, since I see little point in keeping it.
 
Back
Top