- New Feature: Spotter skill (available to every merc) allows a merc to be spotter for other snipers. Spotter items have to be in hands, spending APs cancels action.

- renamed GetObjectNCTHModifier to GetObjectModifier, as function is no longer used exclusively for NCTH

Warning: GameDir >= r1896 is required.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6694 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-12-19 20:03:48 +00:00
parent eff779a966
commit 80c1b65494
30 changed files with 723 additions and 445 deletions
+10 -2
View File
@@ -278,7 +278,8 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
strcmp(name, "FlashLightRange") == 0 ||
strcmp(name, "ItemChoiceTimeSetting") == 0 ||
strcmp(name, "buddyitem") == 0 ||
strcmp(name, "SleepModifier") == 0))
strcmp(name, "SleepModifier") == 0 ||
strcmp(name, "usSpotting") == 0))
{
pData->curElement = ELEMENT_PROPERTY;
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("itemStartElementHandle: going into element, name = %s",name) );
@@ -1438,6 +1439,12 @@ itemEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curItem.ubSleepModifier = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "usSpotting") == 0)
{
pData->curElement = ELEMENT;
// values between 0 and 100 only
pData->curItem.usSpotting = min(100, max(0, (INT16) atol(pData->szCharData) ) );
}
pData->maxReadDepth--;
}
@@ -2080,7 +2087,8 @@ BOOLEAN WriteItemStats()
FilePrintf(hFile,"\t\t<ItemChoiceTimeSetting>%d</ItemChoiceTimeSetting>\r\n", Item[cnt].usItemChoiceTimeSetting );
FilePrintf(hFile,"\t\t<buddyitem>%d</buddyitem>\r\n", Item[cnt].usBuddyItem );
FilePrintf(hFile,"\t\t<SleepModifier>%d</SleepModifier>\r\n", Item[cnt].ubSleepModifier );
FilePrintf(hFile,"\t\t<usSpotting>%d</usSpotting>\r\n", Item[cnt].usSpotting );
FilePrintf(hFile,"\t</ITEM>\r\n");
}
FilePrintf(hFile,"</ITEMLIST>\r\n");
+8 -10
View File
@@ -2128,6 +2128,9 @@ STR16 pTraitSkillsMenuStrings[] =
L"监听", //L"Eavesdrop",
L"呼叫支援", //L"Call reinforcements",
L"关闭接收器", //L"Switch off radio set",
// various
L"Spotter", // TODO.Translate
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2140,6 +2143,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"使用无线电设备持续监听敌军动向。", //L"Use your radio equipment to continously listen for enemy movement",
L"从邻区呼叫支援。", //L"Call in reinforcements from neighbouring sectors.",
L"关闭无线电设备以节约电池。", //L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.", // TODO.Translate
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2155,16 +2161,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - 恶魔的财产", //L" - posession by a demon"
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"Attack", // set militia to aggresive
// L"Hold Position", // set militia to stationary
// L"Retreat", // retreat militia
// L"Come to me", // retreat militia
// L"Get down", // retreat militia
// L"Cancel", // cancel this menu
//};
STR16 pRemoveMercStrings[] =
{
L"移除佣兵", // remove dead merc from current team
@@ -2398,6 +2394,7 @@ STR16 gzMercSkillTextNew[] =
L"间谍", // 41
L"Placeholder", // for radio operator (minor trait)
L"更多...",
L"various", // for VARIOUSSKILLS // TODO.Translate
};
//////////////////////////////////////////////////////////
@@ -7969,6 +7966,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%%暴力开门成功率\n", //L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%%射击生物准确率(CTH)\n", //L" %s%d%% cth with firearms against creatures\n",
L" %s%d%%医疗保证金\n", //L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n", // TODO.Translate
};
STR16 szBackgroundTitleText[] =
+8 -12
View File
@@ -2124,6 +2124,9 @@ STR16 pTraitSkillsMenuStrings[] = // TODO.Translate
L"Eavesdrop",
L"Call reinforcements",
L"Switch off radio set",
// various
L"Spotter", // TODO.Translate
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2136,6 +2139,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"Use your radio equipment to continously listen for enemy movement",
L"Call in reinforcements from neighbouring sectors.",
L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.", // TODO.Translate
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2151,18 +2157,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - posession by a demon",
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"Attack", // set militia to aggresive
// L"Hold Position", // set militia to stationary
// L"Retreat", // retreat militia
// L"Come to me", // retreat militia
// L"Get down", // retreat militia
// L"Cancel", // cancel this menu
//};
STR16 pRemoveMercStrings[] =
{
L"Verw.Huurl.", // remove dead merc from current team
@@ -2393,6 +2387,7 @@ STR16 gzMercSkillTextNew[] =
L"Spy", // 41
L"Placeholder", // for radio operator (minor trait)
L"More...",
L"various", // for VARIOUSSKILLS // TODO.Translate
};
//////////////////////////////////////////////////////////
@@ -7985,6 +7980,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%% cth with firearms against creatures\n",
L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n", // TODO.Translate
};
STR16 szBackgroundTitleText[] = // TODO.Translate
+9 -11
View File
@@ -2128,6 +2128,9 @@ STR16 pTraitSkillsMenuStrings[] =
L"Eavesdrop",
L"Call reinforcements",
L"Switch off radio set",
// various
L"Spotter",
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2140,6 +2143,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"Use your radio equipment to continously listen for enemy movement",
L"Call in reinforcements from neighbouring sectors.",
L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.",
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2155,16 +2161,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - posession by a demon",
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"Attack", // set militia to aggresive
// L"Hold Position", // set militia to stationary
// L"Retreat", // retreat militia
// L"Come to me", // retreat militia
// L"Get down", // retreat militia
// L"Cancel", // cancel this menu
//};
STR16 pRemoveMercStrings[] =
{
L"Remove Merc", // remove dead merc from current team
@@ -2397,7 +2393,8 @@ STR16 gzMercSkillTextNew[] =
L"Placeholder", // 40
L"Spy", // 41
L"Placeholder", // for radio operator (minor trait)
L"More...",
L"More...", // 43
L"various", // for VARIOUSSKILLS
};
//////////////////////////////////////////////////////////
@@ -7967,6 +7964,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%% cth with firearms against creatures\n",
L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n",
};
STR16 szBackgroundTitleText[] =
+8 -10
View File
@@ -2131,6 +2131,9 @@ STR16 pTraitSkillsMenuStrings[] = // TODO.Translate
L"Eavesdrop",
L"Call reinforcements",
L"Switch off radio set",
// various
L"Spotter", // TODO.Translate
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2143,6 +2146,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"Use your radio equipment to continously listen for enemy movement",
L"Call in reinforcements from neighbouring sectors.",
L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.", // TODO.Translate
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2158,16 +2164,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - posession by a demon",
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"Attaquez", // set militia to aggresive
// L"Tenez la Position", // set militia to stationary
// L"Retraite", // retreat militia
// L"Rejoignez-moi", // retreat militia
// L"Couchez-vous", // retreat militia
// L"Annuler", // cancel this menu
//};
STR16 pRemoveMercStrings[] =
{
L"Enlever Merc", // remove dead merc from current team
@@ -2401,6 +2397,7 @@ STR16 gzMercSkillTextNew[] =
L"Espion", // 41
L"Placeholder", // for radio operator (minor trait)
L"Plus...",
L"various", // for VARIOUSSKILLS // TODO.Translate
};
//////////////////////////////////////////////////////////
@@ -7970,6 +7967,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%% cth with firearms against creatures\n",
L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n", // TODO.Translate
};
STR16 szBackgroundTitleText[] = // TODO.Translate
+8 -11
View File
@@ -2126,6 +2126,9 @@ STR16 pTraitSkillsMenuStrings[] = // TODO.Translate
L"Eavesdrop",
L"Call reinforcements",
L"Switch off radio set",
// various
L"Spotter", // TODO.Translate
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2138,6 +2141,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"Use your radio equipment to continously listen for enemy movement",
L"Call in reinforcements from neighbouring sectors.",
L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.", // TODO.Translate
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2153,17 +2159,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - posession by a demon",
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"Attack", // set militia to aggresive
// L"Hold Position", // set militia to stationary
// L"Retreat", // retreat militia
// L"Come to me", // retreat militia
// L"Get down", // retreat militia
// L"Cancel", // cancel this menu
//};
STR16 pRemoveMercStrings[] ={
L"Söldner entfernen", // remove dead merc from current team
L"Abbrechen",
@@ -2407,6 +2402,7 @@ STR16 gzMercSkillTextNew[] =
L"Spion", // 41
L"Placeholder", // for radio operator (minor trait)
L"Mehr...",
L"various", // for VARIOUSSKILLS // TODO.Translate
};
// This is pop up help text for the options that are available to the merc
@@ -7793,6 +7789,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%% cth with firearms against creatures\n",
L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n", // TODO.Translate
};
STR16 szBackgroundTitleText[] = // TODO.Translate
+8 -11
View File
@@ -2120,6 +2120,9 @@ STR16 pTraitSkillsMenuStrings[] = // TODO.Translate
L"Eavesdrop",
L"Call reinforcements",
L"Switch off radio set",
// various
L"Spotter", // TODO.Translate
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2132,6 +2135,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"Use your radio equipment to continously listen for enemy movement",
L"Call in reinforcements from neighbouring sectors.",
L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.", // TODO.Translate
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2147,17 +2153,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - posession by a demon",
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"Attack", // set militia to aggresive
// L"Hold Position", // set militia to stationary
// L"Retreat", // retreat militia
// L"Come to me", // retreat militia
// L"Get down", // retreat militia
// L"Cancel", // cancel this menu
//};
STR16 pRemoveMercStrings[] =
{
L"Rimuovi Mercenario", // remove dead merc from current team
@@ -2389,6 +2384,7 @@ STR16 gzMercSkillTextNew[] =
L"Spy", // 41
L"Placeholder", // for radio operator (minor trait)
L"More...",
L"various", // for VARIOUSSKILLS // TODO.Translate
};
//////////////////////////////////////////////////////////
@@ -7972,6 +7968,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%% cth with firearms against creatures\n",
L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n", // TODO.Translate
};
STR16 szBackgroundTitleText[] = // TODO.Translate
+8 -11
View File
@@ -2136,6 +2136,9 @@ STR16 pTraitSkillsMenuStrings[] = // TODO.Translate
L"Eavesdrop",
L"Call reinforcements",
L"Switch off radio set",
// various
L"Spotter", // TODO.Translate
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2148,6 +2151,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"Use your radio equipment to continously listen for enemy movement",
L"Call in reinforcements from neighbouring sectors.",
L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.", // TODO.Translate
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2163,17 +2169,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - posession by a demon",
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"Atak", // set militia to aggresive
// L"Utrzymaj pozycję", // set militia to stationary
// L"Odwrót", // retreat militia
// L"Za mną", // retreat militia
// L"Padnij", // retreat militia
// L"Anuluj", // cancel this menu
//};
STR16 pRemoveMercStrings[] =
{
L"Usuń najemnika", // remove dead merc from current team
@@ -2404,6 +2399,7 @@ STR16 gzMercSkillTextNew[] =
L"Spy", // 41 // TODO.Translate
L"Placeholder", // for radio operator (minor trait)
L"Więcej...",
L"various", // for VARIOUSSKILLS // TODO.Translate
};
//////////////////////////////////////////////////////////
@@ -7996,6 +7992,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%% cth with firearms against creatures\n",
L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n", // TODO.Translate
};
STR16 szBackgroundTitleText[] = // TODO.Translate
+8 -11
View File
@@ -2128,6 +2128,9 @@ STR16 pTraitSkillsMenuStrings[] = // TODO.Translate
L"Eavesdrop",
L"Call reinforcements",
L"Switch off radio set",
// various
L"Spotter", // TODO.Translate
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2140,6 +2143,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"Use your radio equipment to continously listen for enemy movement",
L"Call in reinforcements from neighbouring sectors.",
L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.", // TODO.Translate
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2155,17 +2161,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - posession by a demon",
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"В атаку", // set militia to aggresive
// L"Держать оборону", // set militia to stationary
// L"Отступать", // retreat militia
// L"За мной", // retreat militia
// L"Ложись", // retreat militia
// L"Отмена", // cancel this menu
//};
STR16 pRemoveMercStrings[] =
{
L"Убрать бойца", // remove dead merc from current team
@@ -2396,6 +2391,7 @@ STR16 gzMercSkillTextNew[] =
L"Шпион", // 41
L"Placeholder", // for radio operator (minor trait)
L"Ещё...",
L"various", // for VARIOUSSKILLS // TODO.Translate
};
//////////////////////////////////////////////////////////
@@ -7970,6 +7966,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%% cth with firearms against creatures\n",
L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n", // TODO.Translate
};
STR16 szBackgroundTitleText[] = // TODO.Translate
+8 -11
View File
@@ -2128,6 +2128,9 @@ STR16 pTraitSkillsMenuStrings[] = // TODO.Translate
L"Eavesdrop",
L"Call reinforcements",
L"Switch off radio set",
// various
L"Spotter", // TODO.Translate
};
//Flugente: short description of the above skills for the skill selection menu
@@ -2140,6 +2143,9 @@ STR16 pTraitSkillsMenuDescStrings[] =
L"Use your radio equipment to continously listen for enemy movement",
L"Call in reinforcements from neighbouring sectors.",
L"Turn off radio set to save batteries.",
// various
L"Observe an area, granting allied snipers a bonus to cth on anything you see.", // TODO.Translate
};
STR16 pTraitSkillsDenialStrings[] =
@@ -2155,17 +2161,6 @@ STR16 pTraitSkillsDenialStrings[] =
L" - posession by a demon",
};
//STR16 pTalkToAllMenuStrings[] =
//{
// L"Attack", // set militia to aggresive
// L"Hold Position", // set militia to stationary
// L"Retreat", // retreat militia
// L"Come to me", // retreat militia
// L"Get down", // retreat militia
// L"Cancel", // cancel this menu
//};
STR16 pRemoveMercStrings[] =
{
L"Remove Merc", // remove dead merc from current team
@@ -2398,6 +2393,7 @@ STR16 gzMercSkillTextNew[] =
L"Spy", // 41
L"Placeholder", // for radio operator (minor trait)
L"More...",
L"various", // for VARIOUSSKILLS // TODO.Translate
};
//////////////////////////////////////////////////////////
@@ -7988,6 +7984,7 @@ STR16 szBackgroundText_Value[]=
L" %s%d%% chance of success with door breaching charges\n",
L" %s%d%% cth with firearms against creatures\n",
L" %s%d%% insurance cost\n",
L" %s%d%% effectiveness as spotter for fellow snipers\n", // TODO.Translate
};
STR16 szBackgroundTitleText[] = // TODO.Translate