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

Can't populate town

jean

Master Mariner
Storm Modder
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Hello! I have a big problem: in Eleuthera island, the first town (Governor's Harbour, where I made new locations ) has characters (tavern keeper, shipyarder, governor...), but the second town (Alice Town) has only usurer and store keeper, who are "genereted" by specifics files. So, to try, I créate another island with a town and added characters. For now there is all what you need in this town ( tavern keeper, shipyarder, governor...) but nobody in all Eleuthera island' town (Governor's Harbour and Alice Town have been deserted) .Is there a maximum characters in the game? Can we change it? <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

Hope you'll can answer me.


Bye! <img src="style_emoticons/<#EMO_DIR#>/trio-pirates.gif" style="vertical-align:middle" emoid=":trio" border="0" alt="trio-pirates.gif" />
 
<img src="style_emoticons/<#EMO_DIR#>/icon_sad.gif" style="vertical-align:middle" emoid=":sad" border="0" alt="icon_sad.gif" /> I have a little précision: in Eleuthera.c, if I put "Governors Harbour" characters first I haven't characters in Alice Town, and if I put "Alice Town" characters first I haven't characters in Governors Harbour. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
Thanks for your answer. It's so strange cause if I "mix" characters (one for Governors, one for Alice, one for Governors, one for Alice.....) I get all characters inside, but no traders. Bizarre!!!
 
I didn't know that but I think I havn't 32 characters in a town, except perhaps if citizens in the street and monsters in cave count. I have 2 at tavern, 1 townhall, 1 shipyard, 1 at church (x2 in Eleuthera.c) and also 1 usurer and 1 store keeper ( for 1 town). I forgot 4 street traders (who have vanished ). Perhaps it's too much..
Thanks a lot!

Edit: Perhaps there's a maximun characters for all the game, cause when I look an island as Cuba, "mine" is smaller and so less populate...and when I added an new island with a new town, this one had characters (who disappeared in all Eleuthera). And also when I "mix" characters I get all of them.

Very strange!!!
Thanks
 
Ask Pirate_KK to have a look at your files.
I imagine it's a simple fix; I just don't have time to look at it myself. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
<a href="http://www.piratesahoy.net/build/Build%2014%20Alpha%208%20WIP/Eleuthera_Philippe.rar" target="_blank">Philippe's Eleuthera</a>' is confusing me. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
There's a couple of AoP location models I am pretty sure are already in Alpha 8, but under a different name, but now I can't find them anymore. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
<!--quoteo(post=285423:date=Oct 20 2008, 03:16 PM:name=PeterWillemoes)--><div class='quotetop'>QUOTE (PeterWillemoes @ Oct 20 2008, 03:16 PM) <a href="index.php?act=findpost&pid=285423"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I dont know if you know it, philippe, but there is a character max of 32 citizens to a town.<!--QuoteEnd--></div><!--QuoteEEnd-->
That means 32 max at the same time in one location right?
I notice IM for example has way more than 32 total.
 
I saw it in a file once. I´ll have to look again to defend it. I definately knew, what I was talking about (back then...)
 
TownFantoms.c:
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->#define MAX_TOWN_FANTOMS 32<!--QuoteEnd--></div><!--QuoteEEnd-->


Characters_login.c:
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->for(i = 0; i < 32; i++)
{
LoginCharacter(&Characters[LOC_FANTOM_CHARACTERS + i], locID);
}<!--QuoteEnd--></div><!--QuoteEEnd-->
Are characters and enc_officers included in this sum? Can´t figure out the "&" and what it means, but I assumed, that this code includes them in the max_town_phantoms.
IF I am wrong and they are added to the total sum, which will be 64 or higher, i am truly sorry for causing a mess <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />

Could philippe run into problems with globals.c?
It defines a max global number of citizens, and his islands are additional to those already existing...
 
The problem Philppe mantions has its roots in making multiple characters with the same id attributes. Correcting that.

pirate_kk
 
<!--quoteo(post=301755:date=Feb 16 2009, 11:16 AM:name=PeterWillemoes)--><div class='quotetop'>QUOTE (PeterWillemoes @ Feb 16 2009, 11:16 AM) <a href="index.php?act=findpost&pid=301755"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->LoginCharacter(&Characters[LOC_FANTOM_CHARACTERS + i], locID);

Are characters and enc_officers included in this sum? Can´t figure out the "&" and what it means...<!--QuoteEnd--></div><!--QuoteEEnd-->

The & means "address of". It's like a ref variable.

Hook
 
What exactly does that mean, Hook? Unfortunately my programming knowledge remains not-so-impressive. Though my current actual work consists partly of programming, so I'm learning. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Ampersand (&) produces a reference to a variable. That means that some variable "points" at address in a memory of other. In PotC script, it's used to access attributes of objects. Also, parameters of function can be passed by reference, in contrary to default passing arguments by value. For example:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void fun1(int i)
{
  i = 10;
  trace("i="+i); // prints 'i=10'
}

void fun2(ref n)
{
  n = 5;
  trace("n="+n); // prints 'n=5'
}

void main()
{
  int i = 1;
  trace("i="+i); // prints 'i=1'
  fun1(i); // prints 'i=10'
  trace("i="+i); // prints 'i=1'
  fun2(&i); // prints 'n=5'
  trace("i="+i); // prints 'i=5'
}<!--c2--></div><!--ec2-->
 
Ah! I think I got it! I was just about to say that I still didn't get it, but now it makes sense.
So if you add the & in front of it, the same-called variable in the function you called will now also be available in the function that called that function.
(^ This probably sounds confusing though :wacko )
 
The variable name is only a label used in local scope of function. It's function's argument and its type what counts, not variable name. See changes I did in my <a href="http://forum.piratesahoy.net//index.php?showtopic=12337&view=findpost&p=301887" target="_blank">previous</a> post. Although argument's name inside function <i>fun2</i> is now <i>n</i>, when it was called referenced variable was <i>i</i>, so that will be changed in function <i>main</i>.

pirate_kk
 
Back
Top