mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
New feature: factories allows facilities to create items
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360075&#msg_360075 git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@2534 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -3352,6 +3352,14 @@ FACILITY_EVENT_RARITY = 1000
|
||||
; noticeable. Increase this for the opposite. Default = 50.
|
||||
FACILITY_DANGER_RATE = 50
|
||||
|
||||
;------------------------------------------------------------------------------------------------------------------------------
|
||||
; Facilities can produce items.
|
||||
; This requires defining production lines for each item in FacilityTypes.xml and some set up in SetFactoryLeftoverProgress(...)
|
||||
; and GetFactoryLeftoverProgress(...) in scripts/strategicmap.lua.
|
||||
;------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
FACTORIES = FALSE
|
||||
|
||||
;******************************************************************************************************************************
|
||||
; Activates the new additional repair mode.
|
||||
; While the old JA 1.13 repair system goes from soldier to soldier, this algorithm goes through item types, priorizing
|
||||
|
||||
@@ -78,6 +78,7 @@ Facts = {
|
||||
FACT_MARIA_ESCORTED = 116,
|
||||
FACT_ANGEL_LEFT_DEED = 120,
|
||||
FACT_CHALICE_STOLEN = 184,
|
||||
FACT_CONVO_ERNEST = 215,
|
||||
FACT_MUSEUM_ALARM_WENT_OFF = 278,
|
||||
FACT_KINGPIN_KNOWS_MONEY_GONE = 103,
|
||||
FACT_KINGPIN_DEAD = 308,
|
||||
@@ -194,6 +195,19 @@ Profil =
|
||||
ELDIN = 127,
|
||||
ELLIOT = 135,
|
||||
MADLAB = 146,
|
||||
DARYL = 150,
|
||||
}
|
||||
|
||||
Flags1 =
|
||||
{
|
||||
PROFILE_MISC_FLAG_RECRUITED = 1,
|
||||
PROFILE_MISC_FLAG_HAVESEENCREATURE = 2,
|
||||
PROFILE_MISC_FLAG_FORCENPCQUOTE = 4,
|
||||
PROFILE_MISC_FLAG_WOUNDEDBYPLAYER = 8,
|
||||
PROFILE_MISC_FLAG_TEMP_NPC_QUOTE_DATA_EXISTS = 16,
|
||||
PROFILE_MISC_FLAG_SAID_HOSTILE_QUOTE = 32,
|
||||
PROFILE_MISC_FLAG_EPCACTIVE = 64,
|
||||
PROFILE_MISC_FLAG_ALREADY_USED_ITEMS = 128,
|
||||
}
|
||||
|
||||
SoldierClass =
|
||||
@@ -378,8 +392,156 @@ ModSpecificFacts =
|
||||
TIXA_PRISON_VOLUNTEERSGAINED = 123,
|
||||
TIXA_PRISON_SUBLEVEL_VOLUNTEERSGAINED = 124,
|
||||
ALMA_PRISON_VOLUNTEERSGAINED = 125,
|
||||
|
||||
-- |||||||||||||||||||||||||||||||||| factories |||||||||||||||||||||||||||||||||||||
|
||||
FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_1 = 159, -- 9 products
|
||||
FACTORY_PROGRESS_CAMBRIA_HICKSFARM_1 = 168, -- 4 products
|
||||
FACTORY_PROGRESS_GRUMM_MUNITIONSFACTORY_1 = 172, -- 6 products
|
||||
FACTORY_PROGRESS_GRUMM_BOMBWORKSHOP_1 = 178, -- 5 products
|
||||
FACTORY_PROGRESS_GRUMM_ORTAFACTORY = 183, -- 6 products
|
||||
-- |||||||||||||||||||||||||||||||||| factories |||||||||||||||||||||||||||||||||||||
|
||||
}
|
||||
|
||||
FactorySpecialValues =
|
||||
{
|
||||
FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_UPGRADE = 6,
|
||||
}
|
||||
|
||||
-- sSectorX, sSectorY and bSectorZ indicate the sector coordinates
|
||||
-- usFacilityType is facility number from FacilitTypes.xml
|
||||
-- usProductionNumber denotes which FACTORY of the facility this is for
|
||||
-- sProgressLeft is the progress to be saved.
|
||||
--
|
||||
-- As factories can be added or removed in the xml at will, we can't hardcode their progress in the savegame.
|
||||
-- Therefore we let the modder store their progress in here via LUAFacts into the modder-administered part of the savefile.
|
||||
-- We also want factories to be deactivated initially (so the player doesn't suddenly lose money if he takes their sector). Initially all values are 0.
|
||||
-- In the code, values < 0 indicate a factory is offline, >= 0 online.
|
||||
-- We thus add '1' to every value, so we store the progress as 1 + sProgressLeft, this means a luafact value of <= 0 is offline, > 0 is online
|
||||
--
|
||||
-- We also use the Getter to check for other conditions, like quest progress. For example, even if we control Drassen, we can only use the T-Shirt factory once Doreen is gone.
|
||||
-- We achieve that by returning a value < -10 if these extra conditions are not satisfied.
|
||||
-- The code checks that too and won't allow us to even turn a factory on in this case, so the player knows he has something else to do first.
|
||||
function SetFactoryLeftoverProgress(sSectorX, sSectorY, bSectorZ, usFacilityType, usProductionNumber, sProgressLeft)
|
||||
|
||||
if ( bSectorZ == 0 ) then
|
||||
|
||||
if ( sSectorX == 13 and sSectorY == SectorY.MAP_ROW_C and usFacilityType == 23 ) then
|
||||
|
||||
SetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_1 + usProductionNumber, 1 + sProgressLeft)
|
||||
|
||||
-- if we 'finished' the upgrade (see comment in GetFactoryLeftoverProgress(...), notify us of that fact
|
||||
if ( usProductionNumber == FactorySpecialValues.FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_UPGRADE and sProgressLeft > 170 ) then
|
||||
|
||||
SetScreenMsg(FontColour.FONT_MCOLOR_LTGREEN, "Upgrade in T-Shirt Factory is finished.")
|
||||
|
||||
end
|
||||
|
||||
elseif ( sSectorX == 10 and sSectorY == SectorY.MAP_ROW_F and usFacilityType == 24 ) then
|
||||
|
||||
SetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_CAMBRIA_HICKSFARM_1 + usProductionNumber, 1 + sProgressLeft)
|
||||
|
||||
elseif ( sSectorX == 2 and sSectorY == SectorY.MAP_ROW_H and usFacilityType == 5 ) then
|
||||
|
||||
SetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_GRUMM_MUNITIONSFACTORY_1 + usProductionNumber, 1 + sProgressLeft)
|
||||
|
||||
elseif ( sSectorX == 2 and sSectorY == SectorY.MAP_ROW_G and usFacilityType == 25 ) then
|
||||
|
||||
SetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_GRUMM_BOMBWORKSHOP_1 + usProductionNumber, 1 + sProgressLeft)
|
||||
|
||||
elseif ( sSectorX == 4 and sSectorY == SectorY.MAP_ROW_K and usFacilityType == 15 ) then
|
||||
|
||||
SetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_GRUMM_ORTAFACTORY + usProductionNumber, 1 + sProgressLeft)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function GetFactoryLeftoverProgress(sSectorX, sSectorY, bSectorZ, usFacilityType, usProductionNumber, sProgressLeft)
|
||||
|
||||
CANT_ACTIVATE_FACTORY = -20
|
||||
|
||||
val = -1
|
||||
|
||||
if ( bSectorZ == 0 ) then
|
||||
|
||||
if ( sSectorX == 13 and sSectorY == SectorY.MAP_ROW_C and usFacilityType == 23 ) then
|
||||
|
||||
-- The T-Shirt factory can only be used once Doreen is gone, one way or the other
|
||||
if ( gubQuest( Quests.QUEST_FREE_CHILDREN ) == qStatus.QUESTDONE ) then
|
||||
|
||||
val = GetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_1 + usProductionNumber) - 1
|
||||
|
||||
-- The T-Shirt factory can be 'upgraded' to also produce uniforms
|
||||
-- The upgrade is not an item, it exists purely in the lua values
|
||||
-- We've set the upgrade time to be 03:01. As we set the progress on each full hour, there will be a point in time where the value is 180
|
||||
-- We use that value as 'upgrade has been done'. The upgrade cannot be built anymore -> val = CANT_ACTIVATE_FACTORY.
|
||||
-- The uniform production lines always return CANT_ACTIVATE_FACTORY if the upgrade is not there yet.
|
||||
if ( usProductionNumber == FactorySpecialValues.FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_UPGRADE and val > 170 ) then
|
||||
|
||||
val = CANT_ACTIVATE_FACTORY
|
||||
|
||||
elseif ( usProductionNumber > FactorySpecialValues.FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_UPGRADE ) then
|
||||
|
||||
tmp = GetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_1 + FactorySpecialValues.FACTORY_PROGRESS_DRASSEN_TSHIRTFACTORY_UPGRADE) - 1
|
||||
|
||||
if ( tmp < 170 ) then
|
||||
|
||||
val = CANT_ACTIVATE_FACTORY
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
val = CANT_ACTIVATE_FACTORY
|
||||
|
||||
end
|
||||
|
||||
elseif ( sSectorX == 10 and sSectorY == SectorY.MAP_ROW_F and usFacilityType == 24 ) then
|
||||
|
||||
-- the Hicks farm can only be used if the quest was solved by killing the Hicks family
|
||||
if ( MercIsDead(Profil.DARREL) and MercIsDead(Profil.DARYL) ) then
|
||||
|
||||
val = GetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_CAMBRIA_HICKSFARM_1 + usProductionNumber) - 1
|
||||
|
||||
else
|
||||
|
||||
val = CANT_ACTIVATE_FACTORY
|
||||
|
||||
end
|
||||
|
||||
elseif ( sSectorX == 2 and sSectorY == SectorY.MAP_ROW_H and usFacilityType == 5 ) then
|
||||
|
||||
val = GetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_GRUMM_MUNITIONSFACTORY_1 + usProductionNumber) - 1
|
||||
|
||||
elseif ( sSectorX == 2 and sSectorY == SectorY.MAP_ROW_G and usFacilityType == 25 ) then
|
||||
|
||||
val = GetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_GRUMM_BOMBWORKSHOP_1 + usProductionNumber) - 1
|
||||
|
||||
elseif ( sSectorX == 4 and sSectorY == SectorY.MAP_ROW_K and usFacilityType == 15 ) then
|
||||
|
||||
-- the Orta factory can only be used once Ernest gave us the rifles (and presumably control over the assembly lines)
|
||||
if ( (CheckFact( Facts.FACT_CONVO_ERNEST, 0 ) == true) ) then
|
||||
|
||||
val = GetModderLUAFact(ModSpecificFacts.FACTORY_PROGRESS_GRUMM_ORTAFACTORY + usProductionNumber) - 1
|
||||
|
||||
else
|
||||
|
||||
val = CANT_ACTIVATE_FACTORY
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return val
|
||||
|
||||
end
|
||||
|
||||
-- this function is called whenever we liberate a sector. If fFirstTime is true, this is the first time we liberate this sector
|
||||
function HandleSectorLiberation( sNewSectorX, sNewSectorY, bNewSectorZ, fFirstTime )
|
||||
|
||||
@@ -853,12 +1015,16 @@ MapSymbols = {
|
||||
FLAG = 10,
|
||||
QUESTIONMARK_BLUE = 11, -- sector might be relevant for a quest
|
||||
EXCLAMATIONMARK_BLUE = 12, -- sector is definetely relevant for a quest
|
||||
QUESTIONMARK_GREEN = 13, -- alternate colours for other uses?
|
||||
QUESTIONMARK_GREEN = 13, -- alternate colours for other uses
|
||||
EXCLAMATIONMARK_GREEN = 14,
|
||||
QUESTIONMARK_RED = 15,
|
||||
EXCLAMATIONMARK_RED = 16,
|
||||
QUESTIONMARK_YELLOW = 17,
|
||||
EXCLAMATIONMARK_YELLOW = 18,
|
||||
EXCLAMATIONMARK_YELLOW = 18,
|
||||
FACTORY_YELLOW = 19,
|
||||
FACTORY_GREEN = 20,
|
||||
FACTORY_RED = 21,
|
||||
FACTORY_NOCONTROL = 22,
|
||||
}
|
||||
|
||||
-- this function allows us to data for the intel/quest map
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
<FacilityType>19</FacilityType>
|
||||
<ubHidden>1</ubHidden>
|
||||
</FACILITY>
|
||||
<FACILITY>
|
||||
<SectorGrid>C13</SectorGrid>
|
||||
<FacilityType>23</FacilityType>
|
||||
<ubHidden>1</ubHidden>
|
||||
</FACILITY>
|
||||
<FACILITY>
|
||||
<SectorGrid>D13</SectorGrid>
|
||||
<FacilityType>18</FacilityType>
|
||||
@@ -238,6 +243,13 @@
|
||||
<FacilityType>10</FacilityType>
|
||||
<ubHidden>1</ubHidden>
|
||||
</FACILITY>
|
||||
|
||||
<!-- Hicks farm -->
|
||||
<FACILITY>
|
||||
<SectorGrid>F10</SectorGrid>
|
||||
<FacilityType>24</FacilityType>
|
||||
<ubHidden>1</ubHidden>
|
||||
</FACILITY>
|
||||
|
||||
<!-- ESTONI -->
|
||||
<FACILITY>
|
||||
@@ -257,6 +269,11 @@
|
||||
<FacilityType>18</FacilityType>
|
||||
<ubHidden>2</ubHidden>
|
||||
</FACILITY>
|
||||
<FACILITY>
|
||||
<SectorGrid>G2</SectorGrid>
|
||||
<FacilityType>25</FacilityType>
|
||||
<ubHidden>1</ubHidden>
|
||||
</FACILITY>
|
||||
<FACILITY>
|
||||
<SectorGrid>H1</SectorGrid>
|
||||
<FacilityType>18</FacilityType>
|
||||
|
||||
@@ -126,6 +126,55 @@
|
||||
<ubMinimumDexterity>70</ubMinimumDexterity>
|
||||
</CONDITIONS>
|
||||
</ASSIGNMENT>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create 7.62x39mm Box AP -->
|
||||
<usItemToCreate>1446</usItemToCreate>
|
||||
<sMinutesRequired>180</sMinutesRequired>
|
||||
<sGridNo_Creation>9972</sGridNo_Creation>
|
||||
<sHourlyCost>70</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>35</usOptional_LoyaltyRequired>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create 7.62x39mm Box HP -->
|
||||
<usItemToCreate>1447</usItemToCreate>
|
||||
<sMinutesRequired>180</sMinutesRequired>
|
||||
<sGridNo_Creation>9973</sGridNo_Creation>
|
||||
<sHourlyCost>50</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>35</usOptional_LoyaltyRequired>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create 7.62x39mm Box Tracer -->
|
||||
<usItemToCreate>1448</usItemToCreate>
|
||||
<sMinutesRequired>180</sMinutesRequired>
|
||||
<sGridNo_Creation>9974</sGridNo_Creation>
|
||||
<sHourlyCost>100</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>35</usOptional_LoyaltyRequired>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create 7.62x39mm Box Match -->
|
||||
<usItemToCreate>1449</usItemToCreate>
|
||||
<sMinutesRequired>180</sMinutesRequired>
|
||||
<sGridNo_Creation>9975</sGridNo_Creation>
|
||||
<sHourlyCost>150</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>35</usOptional_LoyaltyRequired>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create 7.62x39mm Box Cold -->
|
||||
<usItemToCreate>1451</usItemToCreate>
|
||||
<sMinutesRequired>180</sMinutesRequired>
|
||||
<sGridNo_Creation>9976</sGridNo_Creation>
|
||||
<sHourlyCost>80</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>35</usOptional_LoyaltyRequired>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create 7.62x39mm Box HP Cold -->
|
||||
<szProductionName>7.62x39 Box HP C</szProductionName> <!-- custom text, because the item text is very long ;-) -->
|
||||
<usItemToCreate>1452</usItemToCreate>
|
||||
<sMinutesRequired>180</sMinutesRequired>
|
||||
<sGridNo_Creation>9977</sGridNo_Creation>
|
||||
<sHourlyCost>60</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>35</usOptional_LoyaltyRequired>
|
||||
</PRODUCTIONLINE>
|
||||
</FACILITYTYPE>
|
||||
|
||||
<FACILITYTYPE>
|
||||
@@ -169,7 +218,7 @@
|
||||
</ASSIGNMENT>
|
||||
<ASSIGNMENT>
|
||||
<ubAssignmentType>STRATEGIC_MILITIA_MOVEMENT</ubAssignmentType>
|
||||
<szTooltipText>This military installation has a war room that allows you to move your militia in the strategic screen. You can order them to move via the 'W', 'A', 'S' or 'D' keys.</szTooltipText>
|
||||
<szTooltipText>This military installation has a war room that allows you to move your militia in the strategic screen.</szTooltipText>
|
||||
<ubStaffLimit>2</ubStaffLimit>
|
||||
<CONDITIONS>
|
||||
<ubMinimumWisdom>70</ubMinimumWisdom>
|
||||
@@ -301,6 +350,49 @@
|
||||
<szFacilityName>Laboratory</szFacilityName>
|
||||
<szFacilityShortName>Lab</szFacilityShortName>
|
||||
<ubTotalStaffLimit>0</ubTotalStaffLimit>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- Rocket Rifle -->
|
||||
<szAdditionalRequirementTips> - Requires storage access</szAdditionalRequirementTips>
|
||||
<usItemToCreate>55</usItemToCreate>
|
||||
<sMinutesRequired>600</sMinutesRequired>
|
||||
<sGridNo_Creation>17023</sGridNo_Creation>
|
||||
<sHourlyCost>700</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- Auto Rocket Rifle -->
|
||||
<usItemToCreate>65</usItemToCreate>
|
||||
<sMinutesRequired>720</sMinutesRequired>
|
||||
<sGridNo_Creation>17023</sGridNo_Creation>
|
||||
<sHourlyCost>700</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- Minirockets, AP -->
|
||||
<usItemToCreate>111</usItemToCreate>
|
||||
<sMinutesRequired>120</sMinutesRequired>
|
||||
<sGridNo_Creation>17026</sGridNo_Creation>
|
||||
<sHourlyCost>350</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- Minirockets, HE -->
|
||||
<usItemToCreate>112</usItemToCreate>
|
||||
<sMinutesRequired>120</sMinutesRequired>
|
||||
<sGridNo_Creation>17027</sGridNo_Creation>
|
||||
<sHourlyCost>350</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- Minirockets, HEAP -->
|
||||
<usItemToCreate>113</usItemToCreate>
|
||||
<sMinutesRequired>120</sMinutesRequired>
|
||||
<sGridNo_Creation>17028</sGridNo_Creation>
|
||||
<sHourlyCost>350</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- Minirockets, Cryo -->
|
||||
<usItemToCreate>1738</usItemToCreate>
|
||||
<sMinutesRequired>120</sMinutesRequired>
|
||||
<sGridNo_Creation>17029</sGridNo_Creation>
|
||||
<sHourlyCost>1000</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
</FACILITYTYPE>
|
||||
|
||||
<FACILITYTYPE>
|
||||
@@ -453,4 +545,226 @@
|
||||
</ASSIGNMENT>
|
||||
</FACILITYTYPE>
|
||||
|
||||
<FACILITYTYPE>
|
||||
<ubIndex>23</ubIndex>
|
||||
<szFacilityName>T-Shirt Factory</szFacilityName>
|
||||
<szFacilityShortName>Factory</szFacilityShortName>
|
||||
<ubTotalStaffLimit>4</ubTotalStaffLimit>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create string -->
|
||||
<szAdditionalRequirementTips> - Requires: Doreen quest</szAdditionalRequirementTips>
|
||||
<usItemToCreate>311</usItemToCreate>
|
||||
<sMinutesRequired>10</sMinutesRequired>
|
||||
<sGridNo_Creation>11306</sGridNo_Creation>
|
||||
<requires_staff>0</requires_staff>
|
||||
<sHourlyCost>2</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>15</usOptional_LoyaltyRequired>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create rag -->
|
||||
<usItemToCreate>1022</usItemToCreate>
|
||||
<sMinutesRequired>25</sMinutesRequired>
|
||||
<sGridNo_Creation>11307</sGridNo_Creation>
|
||||
<sHourlyCost>6</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>15</usOptional_LoyaltyRequired>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create Surgical mask from string + rag -->
|
||||
<usItemToCreate>1710</usItemToCreate>
|
||||
<sMinutesRequired>35</sMinutesRequired>
|
||||
<sGridNo_Creation>11309</sGridNo_Creation>
|
||||
<sHourlyCost>4</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>15</usOptional_LoyaltyRequired>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create Arulco T-Shirt from string + rag (2x) -->
|
||||
<usItemToCreate>194</usItemToCreate>
|
||||
<sMinutesRequired>120</sMinutesRequired>
|
||||
<sGridNo_Creation>12758</sGridNo_Creation>
|
||||
<sHourlyCost>7</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>15</usOptional_LoyaltyRequired>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create Deidranna T-Shirt from string + rag (2x) -->
|
||||
<usItemToCreate>195</usItemToCreate>
|
||||
<sMinutesRequired>120</sMinutesRequired>
|
||||
<sGridNo_Creation>12759</sGridNo_Creation>
|
||||
<sHourlyCost>7</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>15</usOptional_LoyaltyRequired>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create green T-Shirt from string + rag (2x) -->
|
||||
<usItemToCreate>1609</usItemToCreate>
|
||||
<sMinutesRequired>120</sMinutesRequired>
|
||||
<sGridNo_Creation>12917</sGridNo_Creation>
|
||||
<sHourlyCost>7</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>15</usOptional_LoyaltyRequired>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- we have to build an upgrade before we can create uniforms -->
|
||||
<szProductionName>Upgrade</szProductionName>
|
||||
<sMinutesRequired>181</sMinutesRequired>
|
||||
<sHourlyCost>100</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>15</usOptional_LoyaltyRequired>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create Field uniform from string (3x) + rag (3x) -->
|
||||
<szAdditionalRequirementTips> - Uniform requires upgrade</szAdditionalRequirementTips>
|
||||
<usItemToCreate>284</usItemToCreate>
|
||||
<sMinutesRequired>300</sMinutesRequired>
|
||||
<sGridNo_Creation>11316</sGridNo_Creation>
|
||||
<sHourlyCost>25</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>30</usOptional_LoyaltyRequired>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- create Field uniform from green T-Shirt, string (2x) + rag -->
|
||||
<usItemToCreate>284</usItemToCreate>
|
||||
<sMinutesRequired>180</sMinutesRequired>
|
||||
<sGridNo_Creation>11316</sGridNo_Creation>
|
||||
<sHourlyCost>37</sHourlyCost>
|
||||
<usOptional_LoyaltyRequired>30</usOptional_LoyaltyRequired>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>311</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1022</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>1609</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
</FACILITYTYPE>
|
||||
|
||||
<FACILITYTYPE>
|
||||
<ubIndex>24</ubIndex>
|
||||
<szFacilityName>Hicks Farm</szFacilityName>
|
||||
<szFacilityShortName>Farm</szFacilityShortName>
|
||||
<ubTotalStaffLimit>4</ubTotalStaffLimit>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- cow meat -->
|
||||
<szAdditionalRequirementTips> - Requires: Hicks dead</szAdditionalRequirementTips>
|
||||
<usItemToCreate>1565</usItemToCreate>
|
||||
<sMinutesRequired>300</sMinutesRequired>
|
||||
<sGridNo_Creation>15432</sGridNo_Creation>
|
||||
<sHourlyCost>2</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- bread -->
|
||||
<usItemToCreate>1567</usItemToCreate>
|
||||
<sMinutesRequired>100</sMinutesRequired>
|
||||
<sGridNo_Creation>15592</sGridNo_Creation>
|
||||
<sHourlyCost>2</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- apple pie -->
|
||||
<usItemToCreate>1568</usItemToCreate>
|
||||
<sMinutesRequired>90</sMinutesRequired>
|
||||
<sGridNo_Creation>15272</sGridNo_Creation>
|
||||
<sHourlyCost>3</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- milk -->
|
||||
<usItemToCreate>1572</usItemToCreate>
|
||||
<sMinutesRequired>60</sMinutesRequired>
|
||||
<sGridNo_Creation>15112</sGridNo_Creation>
|
||||
<sHourlyCost>2</sHourlyCost>
|
||||
</PRODUCTIONLINE>
|
||||
</FACILITYTYPE>
|
||||
|
||||
<FACILITYTYPE>
|
||||
<ubIndex>25</ubIndex>
|
||||
<szFacilityName>Bomb Workshop</szFacilityName>
|
||||
<szFacilityShortName>Workshop</szFacilityShortName>
|
||||
<ubTotalStaffLimit>2</ubTotalStaffLimit>
|
||||
<ASSIGNMENT>
|
||||
<ubAssignmentType>PRACTICE_EXPLOSIVES</ubAssignmentType>
|
||||
<szTooltipText>This well-equipped workshop has the tools you need to create some makeshift bombs. Very dangerous, but it just might be worth it.</szTooltipText>
|
||||
<ubStaffLimit>2</ubStaffLimit>
|
||||
<usPerformance>150</usPerformance>
|
||||
<CONDITIONS>
|
||||
<ubMinimumExplosives>70</ubMinimumExplosives>
|
||||
<ubMinimumMechanical>50</ubMinimumMechanical>
|
||||
</CONDITIONS>
|
||||
<INJURY>
|
||||
<ubChance>50</ubChance>
|
||||
<bBaseEffect>-5</bBaseEffect>
|
||||
<ubRange>4</ubRange>
|
||||
</INJURY>
|
||||
</ASSIGNMENT>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- 60mm Mortar Shell from TNT -->
|
||||
<usItemToCreate>140</usItemToCreate>
|
||||
<sMinutesRequired>60</sMinutesRequired>
|
||||
<sGridNo_Creation>19101</sGridNo_Creation>
|
||||
<requires_staff>1</requires_staff>
|
||||
<usOptional_ItemUsedUp>137</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>137</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- 60mm Mortar Shell from Mk2 Grenades -->
|
||||
<usItemToCreate>140</usItemToCreate>
|
||||
<sMinutesRequired>60</sMinutesRequired>
|
||||
<sGridNo_Creation>18941</sGridNo_Creation>
|
||||
<requires_staff>1</requires_staff>
|
||||
<usOptional_ItemUsedUp>135</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>135</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>135</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>135</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>135</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>135</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- 60mm Illumination Shell from Chemical Break Light -->
|
||||
<usItemToCreate>940</usItemToCreate>
|
||||
<sMinutesRequired>60</sMinutesRequired>
|
||||
<sGridNo_Creation>18781</sGridNo_Creation>
|
||||
<requires_staff>1</requires_staff>
|
||||
<usOptional_ItemUsedUp>146</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>146</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>146</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>146</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>146</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>146</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- 60mm Smoke Shell from Smoke Grenade -->
|
||||
<usItemToCreate>941</usItemToCreate>
|
||||
<sMinutesRequired>60</sMinutesRequired>
|
||||
<sGridNo_Creation>18461</sGridNo_Creation>
|
||||
<requires_staff>1</requires_staff>
|
||||
<usOptional_ItemUsedUp>151</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>151</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>151</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>151</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>151</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>151</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
<PRODUCTIONLINE>
|
||||
<!-- 60mm Mustard Gas Shell from Mustard Gas Grenade -->
|
||||
<usItemToCreate>951</usItemToCreate>
|
||||
<sMinutesRequired>60</sMinutesRequired>
|
||||
<sGridNo_Creation>18141</sGridNo_Creation>
|
||||
<requires_staff>1</requires_staff>
|
||||
<usOptional_ItemUsedUp>133</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>133</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>133</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>133</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>133</usOptional_ItemUsedUp>
|
||||
<usOptional_ItemUsedUp>133</usOptional_ItemUsedUp>
|
||||
</PRODUCTIONLINE>
|
||||
</FACILITYTYPE>
|
||||
|
||||
</FACILITYTYPES>
|
||||
Binary file not shown.
@@ -3346,6 +3346,14 @@ FACILITY_EVENT_RARITY = 1000
|
||||
; noticeable. Increase this for the opposite. Default = 50.
|
||||
FACILITY_DANGER_RATE = 50
|
||||
|
||||
;------------------------------------------------------------------------------------------------------------------------------
|
||||
; Facilities can produce items.
|
||||
; This requires defining production lines for each item in FacilityTypes.xml and some set up in SetFactoryLeftoverProgress(...)
|
||||
; and GetFactoryLeftoverProgress(...) in scripts/strategicmap.lua.
|
||||
;------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
FACTORIES = FALSE
|
||||
|
||||
;******************************************************************************************************************************
|
||||
; Activates the new additional repair mode.
|
||||
; While the old JA 1.13 repair system goes from soldier to soldier, this algorithm goes through item types, priorizing
|
||||
|
||||
@@ -77,6 +77,7 @@ Facts = {
|
||||
FACT_MARIA_ESCORTED = 116,
|
||||
FACT_ANGEL_LEFT_DEED = 120,
|
||||
FACT_CHALICE_STOLEN = 184,
|
||||
FACT_CONVO_ERNEST = 215,
|
||||
FACT_MUSEUM_ALARM_WENT_OFF = 278,
|
||||
FACT_KINGPIN_KNOWS_MONEY_GONE = 103,
|
||||
FACT_KINGPIN_DEAD = 308,
|
||||
@@ -189,6 +190,19 @@ Profil =
|
||||
ELDIN = 127,
|
||||
ELLIOT = 135,
|
||||
MADLAB = 146,
|
||||
DARYL = 150,
|
||||
}
|
||||
|
||||
Flags1 =
|
||||
{
|
||||
PROFILE_MISC_FLAG_RECRUITED = 1,
|
||||
PROFILE_MISC_FLAG_HAVESEENCREATURE = 2,
|
||||
PROFILE_MISC_FLAG_FORCENPCQUOTE = 4,
|
||||
PROFILE_MISC_FLAG_WOUNDEDBYPLAYER = 8,
|
||||
PROFILE_MISC_FLAG_TEMP_NPC_QUOTE_DATA_EXISTS = 16,
|
||||
PROFILE_MISC_FLAG_SAID_HOSTILE_QUOTE = 32,
|
||||
PROFILE_MISC_FLAG_EPCACTIVE = 64,
|
||||
PROFILE_MISC_FLAG_ALREADY_USED_ITEMS = 128,
|
||||
}
|
||||
|
||||
SoldierClass =
|
||||
@@ -364,6 +378,35 @@ Languages =
|
||||
LANGUAGE_CHINESE = 7,
|
||||
}
|
||||
|
||||
|
||||
-- sSectorX, sSectorY and bSectorZ indicate the sector coordinates
|
||||
-- usFacilityType is facility number from FacilitTypes.xml
|
||||
-- usProductionNumber denotes which FACTORY of the facility this is for
|
||||
-- sProgressLeft is the progress to be saved.
|
||||
--
|
||||
-- As factories can be added or removed in the xml at will, we can't hardcode their progress in the savegame.
|
||||
-- Therefore we let the modder store their progress in here via LUAFacts into the modder-administered part of the savefile.
|
||||
-- We also want factories to be deactivated initially (so the player doesn't suddenly lose money if he takes their sector). Initially all values are 0.
|
||||
-- In the code, values < 0 indicate a factory is offline, >= 0 online.
|
||||
-- We thus add '1' to every value, so we store the progress as 1 + sProgressLeft, this means a luafact value of <= 0 is offline, > 0 is online
|
||||
--
|
||||
-- We also use the Getter to check for other conditions, like quest progress. For example, even if we control Drassen, we can only use the T-Shirt factory once Doreen is gone.
|
||||
-- We achieve that by returning a value < -10 if these extra conditions are not satisfied.
|
||||
-- The code checks that too and won't allow us to even turn a factory on in this case, so the player knows he has something else to do first.
|
||||
function SetFactoryLeftoverProgress(sSectorX, sSectorY, bSectorZ, usFacilityType, usProductionNumber, sProgressLeft)
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
function GetFactoryLeftoverProgress(sSectorX, sSectorY, bSectorZ, usFacilityType, usProductionNumber, sProgressLeft)
|
||||
|
||||
val = -1
|
||||
|
||||
return val
|
||||
|
||||
end
|
||||
|
||||
-- this function is called whenever we liberate a sector. If fFirstTime is true, this is the first time we liberate this sector
|
||||
function HandleSectorLiberation( sNewSectorX, sNewSectorY, bNewSectorZ, fFirstTime )
|
||||
|
||||
@@ -450,12 +493,16 @@ MapSymbols = {
|
||||
FLAG = 10,
|
||||
QUESTIONMARK_BLUE = 11, -- sector might be relevant for a quest
|
||||
EXCLAMATIONMARK_BLUE = 12, -- sector is definetely relevant for a quest
|
||||
QUESTIONMARK_GREEN = 13, -- alternate colours for other uses?
|
||||
QUESTIONMARK_GREEN = 13, -- alternate colours for other uses
|
||||
EXCLAMATIONMARK_GREEN = 14,
|
||||
QUESTIONMARK_RED = 15,
|
||||
EXCLAMATIONMARK_RED = 16,
|
||||
QUESTIONMARK_YELLOW = 17,
|
||||
EXCLAMATIONMARK_YELLOW = 18,
|
||||
EXCLAMATIONMARK_YELLOW = 18,
|
||||
FACTORY_YELLOW = 19,
|
||||
FACTORY_GREEN = 20,
|
||||
FACTORY_RED = 21,
|
||||
FACTORY_NOCONTROL = 22,
|
||||
}
|
||||
|
||||
-- this function allows us to data for the intel/quest map
|
||||
|
||||
Reference in New Issue
Block a user