Ahoy fellow pirates & privateers!
I finally took the time to upload onto the new ftp server a small mod I had done some weeks ago. It's called beggars.rar' in the PotC section, in the 'a simple virtual sailor' folder. The idea was to give a beg animation to beggars sitting on the floor, like Henry the beggar in Redmond, to give more life to the game. A kind of communication/interaction without the dialog interface.
FOR TESTERS :
- backup the original PROGRAM\Loc_ai\types\Lai_poor.c somewhere,
- extract the 'beggar.rar' into your game directory, and overwrite the existing file. It should be compatible with any game version from stock PotC to the latest build version as it appears that the Lai_poor.c was forgotten by modders...
- if you're using stock PotC to Build 13 : add the following lines in RESOURCE\INI\ALIASES\sound_alias.ini
- if you're using a build 14 alpha version, you have to add this into PROGRAM\sound\ALIAS\sounds_english.c
- As you know, ingame beggars are not the only ones who sit on the ground. Therefore I've made so that only characters with a 'beggar' attribute will beg. This is easy to check. Run a new game and go to Redmond, look at Henry the Beggar. Nothing happen.
- Now give to Henry a 'beggar' attribute, with this line in Console.c :
and get closer to Henry. Surprise!
- If you want a spanish beggar, now use this line in Console.c
Now Henry won't beg anymore.
- If you want to test how two beggars will behave, make sure your main character is a male and get closer to him. Then run this on the console :
and wait. You can try to change your nation in the Relation interface. When you're tired of this, run those lines on the console :
- you can test extra things, like the afraid animation, the falling corpse animation etc. Tell me if you run into problems or weird issues.
FOR MODPACK COMPILERS, PIETER AND PIRATE_KK :
- Do not try to merge this file with the old one, this one is entirely rewritten and wouldn't be compatible.
- I didn't keep the russian comments ; I don't know if that will bother somebody
- I've used those kind of formulas :
in stead of simple new ones like this
that would require extra coding in PROGRAM\Loc_ai\LAi_utils.c and PROGRAM\Characters\character.c.
But if you think the other way is better, it's fine with me
I finally took the time to upload onto the new ftp server a small mod I had done some weeks ago. It's called beggars.rar' in the PotC section, in the 'a simple virtual sailor' folder. The idea was to give a beg animation to beggars sitting on the floor, like Henry the beggar in Redmond, to give more life to the game. A kind of communication/interaction without the dialog interface.
FOR TESTERS :
- backup the original PROGRAM\Loc_ai\types\Lai_poor.c somewhere,
- extract the 'beggar.rar' into your game directory, and overwrite the existing file. It should be compatible with any game version from stock PotC to the latest build version as it appears that the Lai_poor.c was forgotten by modders...
- if you're using stock PotC to Build 13 : add the following lines in RESOURCE\INI\ALIASES\sound_alias.ini
Code:
[beggar]
minDistance = 5.0
maxDistance = 40.0
name = VOICE\ENGLISH\Beggar_01.wav
[beggar_spa]
minDistance = 5.0
maxDistance = 40.0
name = VOICE\ENGLISH\Beggar_01.wav
name = VOICE\ENGLISH\Beggar_spa.wav
[beggars_eng]
minDistance = 5.0
maxDistance = 40.0
name = VOICE\ENGLISH\Eng_m_b_010.wav
name = VOICE\ENGLISH\Eng_m_b_008.wav
[beggars_fra]
minDistance = 5.0
maxDistance = 40.0
name = VOICE\ENGLISH\Fre_m_b_010.wav
name = VOICE\ENGLISH\Fre_m_b_009.wav
name = VOICE\ENGLISH\Fre_m_b_012.wav
[beggars_spa]
minDistance = 5.0
maxDistance = 40.0
name = VOICE\ENGLISH\Spa_m_b_007.wav
name = VOICE\ENGLISH\Spa_m_b_009.wav
name = VOICE\ENGLISH\Spa_m_b_024.wav
name = VOICE\ENGLISH\Spa_m_b_030.wav
Code:
makeref(tmpref, Sounds_Alias[n]);
tmpref.id = "beggar";
tmpref.minDistance = "5.0";
tmpref.maxDistance = "40.0";
tmpref.files.l1.name = "VOICE\ENGLISH\Beggar_01.wav";
n++;
makeref(tmpref, Sounds_Alias[n]);
tmpref.id = "beggar_spa";
tmpref.minDistance = "5.0";
tmpref.maxDistance = "40.0";
tmpref.files.l1.name = "VOICE\ENGLISH\Beggar_01.wav";
tmpref.files.l2.name = "VOICE\ENGLISH\Beggar_spa.wav";
n++;
makeref(tmpref, Sounds_Alias[n]);
tmpref.id = "beggars_eng";
tmpref.minDistance = "5.0";
tmpref.maxDistance = "40.0";
tmpref.files.l1.name = "VOICE\ENGLISH\Eng_m_b_010.wav";
tmpref.files.l2.name = "VOICE\ENGLISH\Eng_m_b_008.wav";
n++;
makeref(tmpref, Sounds_Alias[n]);
tmpref.id = "beggars_fra";
tmpref.minDistance = "5.0";
tmpref.maxDistance = "40.0";
tmpref.files.l1.name = "VOICE\ENGLISH\Fre_m_b_010.wav";
tmpref.files.l2.name = "VOICE\ENGLISH\Fre_m_b_009.wav";
tmpref.files.l3.name = "VOICE\ENGLISH\Fre_m_b_012.wav";
n++;
makeref(tmpref, Sounds_Alias[n]);
tmpref.id = "beggars_fra";
tmpref.minDistance = "5.0";
tmpref.maxDistance = "40.0";
tmpref.files.l1.name = "VOICE\ENGLISH\Spa_m_b_007.wav";
tmpref.files.l2.name = "VOICE\ENGLISH\Spa_m_b_009.wav";
tmpref.files.l3.name = "VOICE\ENGLISH\Spa_m_b_024.wav";
tmpref.files.l4.name = "VOICE\ENGLISH\Spa_m_b_030.wav";
n++;
- As you know, ingame beggars are not the only ones who sit on the ground. Therefore I've made so that only characters with a 'beggar' attribute will beg. This is easy to check. Run a new game and go to Redmond, look at Henry the Beggar. Nothing happen.
- Now give to Henry a 'beggar' attribute, with this line in Console.c :
Code:
Characters[GetCharacterIndex("Henry")].beggar = "Henry is now a beggar!";
- If you want a spanish beggar, now use this line in Console.c
Code:
Characters[GetCharacterIndex("Henry")].nation = SPAIN; [/quote]and listen carefully at Henry a few times.
- to remove the 'beggar' attribute to Henry, you can use this line : [code]DeleteAttribute(characterFromID("Henry"), "beggar");
- If you want to test how two beggars will behave, make sure your main character is a male and get closer to him. Then run this on the console :
Code:
Characters[GetCharacterIndex("Henry")].beggar = "Henry is now a beggar!";
Characters[GetCharacterIndex("blaze")].beggar = "Nathanael is really poor";
LAi_SetPoorType(pchar);
Code:
DeleteAttribute(Pchar, "beggar");
- you can test extra things, like the afraid animation, the falling corpse animation etc. Tell me if you run into problems or weird issues.
FOR MODPACK COMPILERS, PIETER AND PIRATE_KK :
- Do not try to merge this file with the old one, this one is entirely rewritten and wouldn't be compatible.
- I didn't keep the russian comments ; I don't know if that will bother somebody
- I've used those kind of formulas :
Code:
BeginChangeCharacterActions(chr);
chr.actions.dead.d1 = "Ground_Afraid_Death";
chr.actions.dead.d2 = "Ground_Afraid_Death";
EndChangeCharacterActions(chr);
Code:
LAi_SetGroundAfraidDead(chr);
But if you think the other way is better, it's fine with me