Externalized (by Buggler)

- AWOL scientist location
- Brothel sector
- Call Kingpin over for boxing match
- fact Tony in building
- meet Carmen for reward
- moved John & Mary unescort sector from Mod_Settings.ini to LUA

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6495 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-10-14 11:57:08 +00:00
parent dcf1df3c72
commit 7f489a1b53
9 changed files with 116 additions and 26 deletions
+23 -3
View File
@@ -2372,9 +2372,9 @@ void LoadModSettings(){
//[Omerta]
//[Drassen]
gModSettings.ubJohnUnescortSectorX = iniReader.ReadInteger("Drassen", "JOHN_UNESCORT_SECTOR_X", 13);
gModSettings.ubJohnUnescortSectorY = iniReader.ReadInteger("Drassen", "JOHN_UNESCORT_SECTOR_Y", 2);
gModSettings.ubJohnUnescortSectorZ = iniReader.ReadInteger("Drassen", "JOHN_UNESCORT_SECTOR_Z", 0);
gModSettings.ubCarmenGiveRewardSectorX = iniReader.ReadInteger("Drassen", "CARMEN_GIVE_REWARD_SECTOR_X", 13);
gModSettings.ubCarmenGiveRewardSectorY = iniReader.ReadInteger("Drassen", "CARMEN_GIVE_REWARD_SECTOR_Y", 3);
gModSettings.ubCarmenGiveRewardSectorZ = iniReader.ReadInteger("Drassen", "CARMEN_GIVE_REWARD_SECTOR_Z", 0);
//[Alma]
gModSettings.sRocketRifleGridNo = iniReader.ReadInteger("Alma", "ROCKETRIFLE_POSITION", 10472);
@@ -2409,10 +2409,16 @@ void LoadModSettings(){
gModSettings.iHansGridNo = iniReader.ReadInteger("San Mona", "HANS_POSTION", 13523);
gModSettings.usPornShopRoomBrenda = iniReader.ReadInteger("San Mona", "PORN_SHOP_ROOM_BRENDA", 47);
gModSettings.usPornShopRoomTony = iniReader.ReadInteger("San Mona", "PORN_SHOP_ROOM_TONY", 50);
gModSettings.ubPornShopTonySectorX = iniReader.ReadInteger("San Mona", "PORN_SHOP_TONY_SECTOR_X", 5);
gModSettings.ubPornShopTonySectorY = iniReader.ReadInteger("San Mona", "PORN_SHOP_TONY_SECTOR_Y", 3);
gModSettings.ubPornShopTonySectorZ = iniReader.ReadInteger("San Mona", "PORN_SHOP_TONY_SECTOR_Z", 0);
gModSettings.iKyleMoneyGridNo = iniReader.ReadInteger("San Mona", "KYLE_MONEY_POSITION", 14952);
gModSettings.usLeatherShop = iniReader.ReadInteger("San Mona", "ANGELS_LEATHERSHOP", 2);
gModSettings.ubBrothelSectorX = iniReader.ReadInteger("San Mona", "BROTHEL_SECTOR_X", 5);
gModSettings.ubBrothelSectorY = iniReader.ReadInteger("San Mona", "BROTHEL_SECTOR_Y", 3);
gModSettings.iBambiDoorGridNo = iniReader.ReadInteger("San Mona", "DOOR_TO_BAMBIS_ROOM", 12290);
gModSettings.iCarlaDoorGridNo = iniReader.ReadInteger("San Mona", "DOOR_TO_CARLAS_ROOM", 13413);
gModSettings.iCindyDoorGridNo = iniReader.ReadInteger("San Mona", "DOOR_TO_CINDYS_ROOM", 11173);
@@ -2426,6 +2432,12 @@ void LoadModSettings(){
gModSettings.iBrothelDoor2 = iniReader.ReadInteger("San Mona", "BROTHEL_DOOR_2", 11176);
gModSettings.iBrothelDoor3 = iniReader.ReadInteger("San Mona", "BROTHEL_DOOR_3", 11177);
gModSettings.ubKingpinHouseSectorX = iniReader.ReadInteger("San Mona", "KINGPIN_HOUSE_SECTOR_X", 5);
gModSettings.ubKingpinHouseSectorY = iniReader.ReadInteger("San Mona", "KINGPIN_HOUSE_SECTOR_Y", 4);
gModSettings.ubKingpinHouseSectorZ = iniReader.ReadInteger("San Mona", "KINGPIN_HOUSE_SECTOR_Z", 0);
gModSettings.usKingpinRoomRangeStart = iniReader.ReadInteger("San Mona", "FIRST_ROOM_IN_KINGPIN_HOUSE", 30);
gModSettings.usKingpinRoomRangeEnd = iniReader.ReadInteger("San Mona", "LAST_ROOM_IN_KINGPIN_HOUSE", 39);
gModSettings.ubKingpinMoneySectorX = iniReader.ReadInteger("San Mona", "KINGPIN_MONEY_SECTOR_X", 5);
gModSettings.ubKingpinMoneySectorY = iniReader.ReadInteger("San Mona", "KINGPIN_MONEY_SECTOR_Y", 4);
gModSettings.ubKingpinMoneySectorZ = iniReader.ReadInteger("San Mona", "KINGPIN_MONEY_SECTOR_Z", 1);
@@ -2487,6 +2499,14 @@ void LoadModSettings(){
gModSettings.ubMeanwhileMedunaOutskirtsColMinY = iniReader.ReadInteger("Meanwhile", "MEDUNA_OUTSKIRTS_COL_MIN_Y", 14);
gModSettings.ubMeanwhileMedunaOutskirtsColMaxY = iniReader.ReadInteger("Meanwhile", "MEDUNA_OUTSKIRTS_COL_MAX_Y", 14);
gModSettings.ubMeanwhileAddMadlabSector1X = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_1_X", 7);
gModSettings.ubMeanwhileAddMadlabSector1Y = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_1_Y", 8);
gModSettings.ubMeanwhileAddMadlabSector2X = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_2_X", 16);
gModSettings.ubMeanwhileAddMadlabSector2Y = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_2_Y", 8);
gModSettings.ubMeanwhileAddMadlabSector3X = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_3_X", 11);
gModSettings.ubMeanwhileAddMadlabSector3Y = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_3_Y", 9);
gModSettings.ubMeanwhileAddMadlabSector4X = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_4_X", 4);
gModSettings.ubMeanwhileAddMadlabSector4Y = iniReader.ReadInteger("Meanwhile", "ADD_MADLAB_SECTOR_4_Y", 5);
}
// silversurfer: load item property modifiers
+26 -4
View File
@@ -1704,10 +1704,10 @@ typedef struct
//[Omerta]
//[Drassen]
//John & Mary disappear if unescort in sector
UINT8 ubJohnUnescortSectorX;
UINT8 ubJohnUnescortSectorY;
UINT8 ubJohnUnescortSectorZ;
//meet Carmen in sector for reward collection
UINT8 ubCarmenGiveRewardSectorX;
UINT8 ubCarmenGiveRewardSectorY;
UINT8 ubCarmenGiveRewardSectorZ;
//[Alma]
INT32 sRocketRifleGridNo;
@@ -1743,12 +1743,18 @@ typedef struct
INT32 iHansGridNo;
UINT16 usPornShopRoomBrenda;
UINT16 usPornShopRoomTony;
UINT8 ubPornShopTonySectorX;
UINT8 ubPornShopTonySectorY;
UINT8 ubPornShopTonySectorZ;
// Kyle Lemmons Leather Shop Deed Quest
INT32 iKyleMoneyGridNo;
//Brothel Quests
UINT16 usLeatherShop;
UINT8 ubBrothelSectorX;
UINT8 ubBrothelSectorY;
INT32 iCarlaDoorGridNo;
INT32 iCindyDoorGridNo;
INT32 iBambiDoorGridNo;
@@ -1761,6 +1767,12 @@ typedef struct
INT32 iBrothelDoor1;
INT32 iBrothelDoor2;
INT32 iBrothelDoor3;
UINT8 ubKingpinHouseSectorX;
UINT8 ubKingpinHouseSectorY;
UINT8 ubKingpinHouseSectorZ;
UINT16 usKingpinRoomRangeStart;
UINT16 usKingpinRoomRangeEnd;
//Kingpin Private Stash
UINT8 ubKingpinMoneySectorX;
@@ -1828,6 +1840,16 @@ typedef struct
UINT8 ubMeanwhileMedunaOutskirtsColMinY;
UINT8 ubMeanwhileMedunaOutskirtsColMaxY;
//add Madlab to location after scientist AWOL meanwhile scene
UINT8 ubMeanwhileAddMadlabSector1X;
UINT8 ubMeanwhileAddMadlabSector1Y;
UINT8 ubMeanwhileAddMadlabSector2X;
UINT8 ubMeanwhileAddMadlabSector2Y;
UINT8 ubMeanwhileAddMadlabSector3X;
UINT8 ubMeanwhileAddMadlabSector3Y;
UINT8 ubMeanwhileAddMadlabSector4X;
UINT8 ubMeanwhileAddMadlabSector4Y;
}MOD_SETTINGS;
// silversurfer: item property modifiers
+24
View File
@@ -395,6 +395,30 @@ void IniGlobalGameSetting(lua_State *L)
lua_pushinteger(L, gModSettings.ubHospitalSectorZ);
lua_setglobal(L, "iniHOSPITAL_SECTOR_Z");
lua_pushinteger(L, gModSettings.ubMeanwhileAddMadlabSector1X);
lua_setglobal(L, "iniADD_MADLAB_SECTOR_1_X");
lua_pushinteger(L, gModSettings.ubMeanwhileAddMadlabSector1Y);
lua_setglobal(L, "iniADD_MADLAB_SECTOR_1_Y");
lua_pushinteger(L, gModSettings.ubMeanwhileAddMadlabSector2X);
lua_setglobal(L, "iniADD_MADLAB_SECTOR_2_X");
lua_pushinteger(L, gModSettings.ubMeanwhileAddMadlabSector2Y);
lua_setglobal(L, "iniADD_MADLAB_SECTOR_2_Y");
lua_pushinteger(L, gModSettings.ubMeanwhileAddMadlabSector3X);
lua_setglobal(L, "iniADD_MADLAB_SECTOR_3_X");
lua_pushinteger(L, gModSettings.ubMeanwhileAddMadlabSector3Y);
lua_setglobal(L, "iniADD_MADLAB_SECTOR_3_Y");
lua_pushinteger(L, gModSettings.ubMeanwhileAddMadlabSector4X);
lua_setglobal(L, "iniADD_MADLAB_SECTOR_4_X");
lua_pushinteger(L, gModSettings.ubMeanwhileAddMadlabSector4Y);
lua_setglobal(L, "iniADD_MADLAB_SECTOR_4_Y");
// -------------------------------
// Other global variables
+12 -12
View File
@@ -750,25 +750,25 @@ void ProcessImplicationsOfMeanwhile( void )
StartQuest( QUEST_FIND_SCIENTIST, -1, -1 );
// place Madlab and robot!
if ( SectorInfo[ SECTOR( 7, MAP_ROW_H ) ].uiFlags & SF_USE_ALTERNATE_MAP )
if ( SectorInfo[ SECTOR( gModSettings.ubMeanwhileAddMadlabSector1X, gModSettings.ubMeanwhileAddMadlabSector1Y ) ].uiFlags & SF_USE_ALTERNATE_MAP ) //(7, 8)
{
sSectorX = 7;
sSectorY = MAP_ROW_H;
sSectorX = gModSettings.ubMeanwhileAddMadlabSector1X;
sSectorY = gModSettings.ubMeanwhileAddMadlabSector1Y;
}
else if ( SectorInfo[ SECTOR( 16, MAP_ROW_H ) ].uiFlags & SF_USE_ALTERNATE_MAP )
else if ( SectorInfo[ SECTOR( gModSettings.ubMeanwhileAddMadlabSector2X, gModSettings.ubMeanwhileAddMadlabSector2Y ) ].uiFlags & SF_USE_ALTERNATE_MAP ) //(16, 8)
{
sSectorX = 16;
sSectorY = MAP_ROW_H;
sSectorX = gModSettings.ubMeanwhileAddMadlabSector2X;
sSectorY = gModSettings.ubMeanwhileAddMadlabSector2Y;
}
else if ( SectorInfo[ SECTOR( 11, MAP_ROW_I ) ].uiFlags & SF_USE_ALTERNATE_MAP )
else if ( SectorInfo[ SECTOR( gModSettings.ubMeanwhileAddMadlabSector3X, gModSettings.ubMeanwhileAddMadlabSector3Y ) ].uiFlags & SF_USE_ALTERNATE_MAP ) //(11, 9)
{
sSectorX = 11;
sSectorY = MAP_ROW_I;
sSectorX = gModSettings.ubMeanwhileAddMadlabSector3X;
sSectorY = gModSettings.ubMeanwhileAddMadlabSector3Y;
}
else if ( SectorInfo[ SECTOR( 4, MAP_ROW_E ) ].uiFlags & SF_USE_ALTERNATE_MAP )
else if ( SectorInfo[ SECTOR( gModSettings.ubMeanwhileAddMadlabSector4X, gModSettings.ubMeanwhileAddMadlabSector4Y ) ].uiFlags & SF_USE_ALTERNATE_MAP ) //(4, 5)
{
sSectorX = 4;
sSectorY = MAP_ROW_E;
sSectorX = gModSettings.ubMeanwhileAddMadlabSector4X;
sSectorY = gModSettings.ubMeanwhileAddMadlabSector4Y;
}
else
{
+2 -1
View File
@@ -1156,7 +1156,8 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
break;
case FACT_TONY_IN_BUILDING:
gubFact[usFact] = CheckNPCSector( TONY, 5, MAP_ROW_C, 0 ) && NPCInRoom( TONY, gModSettings.usPornShopRoomTony );
gubFact[usFact] = CheckNPCSector( TONY, gModSettings.ubPornShopTonySectorX, gModSettings.ubPornShopTonySectorY, gModSettings.ubPornShopTonySectorZ ) &&
NPCInRoom( TONY, gModSettings.usPornShopRoomTony );
break;
case FACT_SHANK_SPEAKING:
+2 -2
View File
@@ -575,10 +575,10 @@ enum Facts
#define OMERTA_LEAVE_EQUIP_GRIDNO gModSettings.iOmertaDropOff //4868
// NB brothel rooms 88-90 removed because they are the antechamber
#define IN_BROTHEL( room ) (gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_C && (room) >= gModSettings.usBrothelRoomRangeStart && (room) <= gModSettings.usBrothelRoomRangeEnd) //91,119
#define IN_BROTHEL( room ) (gWorldSectorX == gModSettings.ubBrothelSectorX && gWorldSectorY == gModSettings.ubBrothelSectorY && (room) >= gModSettings.usBrothelRoomRangeStart && (room) <= gModSettings.usBrothelRoomRangeEnd) //5, 3, 91,119
#define IN_BROTHEL_GUARD_ROOM( room ) ( room == gModSettings.usBrothelGuardRoom ) //110
#define IN_KINGPIN_HOUSE( room ) ( gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_D && (room) >= 30 && (room) <= 39 )
#define IN_KINGPIN_HOUSE( room ) ( gWorldSectorX == gModSettings.ubKingpinHouseSectorX && gWorldSectorY == gModSettings.ubKingpinHouseSectorY && gbWorldSectorZ == gModSettings.ubKingpinHouseSectorZ && (room) >= gModSettings.usKingpinRoomRangeStart && (room) <= gModSettings.usKingpinRoomRangeEnd ) //5, 4, 0, 30, 39
#define LOYALTY_LOW_THRESHOLD 30
#define LOYALTY_OK_THRESHOLD 50
+17
View File
@@ -988,6 +988,23 @@ void HandleEarlyMorningEvents( void )
gMercProfiles[ RAT ].bSectorZ = 0;
}
// Does John leave country after quest completion?
if ( gubQuest[ QUEST_ESCORT_TOURISTS ] == QUESTDONE && (gMercProfiles[ JOHN ].sSectorX == 13) &&
(gMercProfiles[ JOHN ].sSectorY == MAP_ROW_B) && (gMercProfiles[ JOHN ].bSectorZ == 0) )
{
gMercProfiles[ JOHN ].sSectorX = 0;
gMercProfiles[ JOHN ].sSectorY = 0;
gMercProfiles[ JOHN ].bSectorZ = 0;
}
// Does Mary leave country after quest completion?
if ( gubQuest[ QUEST_ESCORT_TOURISTS ] == QUESTDONE && (gMercProfiles[ MARY ].sSectorX == 13) &&
(gMercProfiles[ MARY ].sSectorY == MAP_ROW_B) && (gMercProfiles[ MARY ].bSectorZ == 0) )
{
gMercProfiles[ MARY ].sSectorX = 0;
gMercProfiles[ MARY ].sSectorY = 0;
gMercProfiles[ MARY ].bSectorZ = 0;
}
// Empty money from pockets of Vince 69, Willis 80, and Jenny 132
SetMoneyInSoldierProfile( VINCE, 0 );
+2 -1
View File
@@ -2972,7 +2972,8 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
// increment number of heads on hand
gMercProfiles[ 78 ].bNPCData2++;
if (gWorldSectorX == 13 && gWorldSectorY == MAP_ROW_C && gbWorldSectorZ == 0)
if (gWorldSectorX == gModSettings.ubCarmenGiveRewardSectorX && gWorldSectorY == gModSettings.ubCarmenGiveRewardSectorY &&
gbWorldSectorZ == gModSettings.ubCarmenGiveRewardSectorZ) //13, 3, 0
{
TriggerNPCRecord( 78, 20 );
}
+8 -3
View File
@@ -1991,9 +1991,10 @@ BOOLEAN UnRecruitEPC( UINT8 ubCharNum )
// update sector values to current
//Buggler: code only works on map reload so consolidate to HandleEarlyMorningEvents
// check to see if this person should disappear from the map after this
if ( (ubCharNum == JOHN || ubCharNum == MARY) && pSoldier->sSectorX == gModSettings.ubJohnUnescortSectorX &&
pSoldier->sSectorY == gModSettings.ubJohnUnescortSectorY && pSoldier->bSectorZ == gModSettings.ubJohnUnescortSectorZ ) // ( 13, MAP_ROW_B, 0 )
/*if ( (ubCharNum == JOHN || ubCharNum == MARY) && pSoldier->sSectorX == 13 &&
pSoldier->sSectorY == MAP_ROW_B && pSoldier->bSectorZ == 0 )
{
gMercProfiles[ ubCharNum ].sSectorX = 0;
gMercProfiles[ ubCharNum ].sSectorY = 0;
@@ -2004,7 +2005,11 @@ BOOLEAN UnRecruitEPC( UINT8 ubCharNum )
gMercProfiles[ ubCharNum ].sSectorX = pSoldier->sSectorX;
gMercProfiles[ ubCharNum ].sSectorY = pSoldier->sSectorY;
gMercProfiles[ ubCharNum ].bSectorZ = pSoldier->bSectorZ;
}
}*/
gMercProfiles[ ubCharNum ].sSectorX = pSoldier->sSectorX;
gMercProfiles[ ubCharNum ].sSectorY = pSoldier->sSectorY;
gMercProfiles[ ubCharNum ].bSectorZ = pSoldier->bSectorZ;
// how do we decide whether or not to set this?
gMercProfiles[ ubCharNum ].ubMiscFlags3 |= PROFILE_MISC_FLAG3_PERMANENT_INSERTION_CODE;