From 9a20b901b5d626fc433f0862aa2b05be4dad6a59 Mon Sep 17 00:00:00 2001 From: Flugente Date: Tue, 5 Mar 2013 01:17:21 +0000 Subject: [PATCH] - Prisoners of war are now spawned in prison sectors. They have fitting dialogue etc. Harming them slightly lowers global loyalty. The roomnumbers are set in SectorNames.xml. - Prisoner system: added ini options that allow display of surrender strength sum, and externalised surrender strength modifier. Proabilities for prisoner events were increased to more reasonable values. git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1613 4f8fa57e-7814-0410-bad4-adc449f26b7c --- Data-1.13/Ja2_Options.INI | 14 ++++-- Data-1.13/Scripts/StrategicTownLoyalty.lua | 6 +++ Data-1.13/TableData/CivGroupNames.xml | 5 ++- Data-1.13/TableData/Map/SectorNames.xml | 39 +++++++++++++++++ Data-UB/Ja2_Options.ini | 48 +++++++++++++++++++++ Data-UB/Scripts/StrategicTownLoyalty.lua | 14 ++++++ Data-UB/TableData/CivGroupNames.xml | 28 ++++++------ Data/NPCData/civ52.edt | Bin 4800 -> 10281 bytes 8 files changed, 135 insertions(+), 19 deletions(-) diff --git a/Data-1.13/Ja2_Options.INI b/Data-1.13/Ja2_Options.INI index 33e8df959..2723f7247 100644 --- a/Data-1.13/Ja2_Options.INI +++ b/Data-1.13/Ja2_Options.INI @@ -1303,7 +1303,7 @@ DISPLAY_SCOPE_MODES = TRUE ; external feeding ;------------------------------------------------------------------------------------------------------------------------------ -; determines wether we can allow to feed guns externally. 0 = no external feeding 1= only fro other mercs 2 = from other mercs and dedicated slots from ourself +; determines wether we can allow to feed guns externally. 0 = no external feeding 1= only for other mercs 2 = from other mercs and dedicated slots from ourself EXTERNAL_FEEDING = 2 ;------------------------------------------------------------------------------------------------------------------------------ @@ -2462,6 +2462,12 @@ ALLOW_TAKE_PRISONERS = TRUE ; can you offer enemies a surrender option? ENEMY_CAN_SURRENDER = TRUE +; display surrender values on asking for surrender. Helpful if you wonder why the enemy does no surrender at overhelming odds. +DISPLAY_SURRENDER_VALUES = TRUE + +; the higher this value, the more superiority you need over the enemy for them to surrender. Range: 2.0 - 10.0 +SURRENDER_MULTIPLIER = 5.0 + ; can you offer your own surrender to the enemy? This will not work while certain quests are active, or if the enemy already asked ; you to surrender, and you refused PLAYER_CAN_ASK_TO_SURRENDER = TRUE @@ -2470,10 +2476,10 @@ PLAYER_CAN_ASK_TO_SURRENDER = TRUE PRISONER_RETURN_TO_ARMY_CHANCE = 50 ; chance that interrogated soldiers decide to join your cause (they will be turned into militia) -PRISONER_DEFECT_CHANCE = 10 +PRISONER_DEFECT_CHANCE = 25 ; chance that interrogated soldiers can give info on enemy positions -PRISONER_INFO_BASECHANCE = 10 +PRISONER_INFO_BASECHANCE = 25 ; chance that interrogated soldiers detect a specific patrol (a soldier can detect only one max) PRISONER_INFO_DETECT_CHANCE = 5 @@ -2485,7 +2491,7 @@ PRISONER_INFO_NUMBER_CHANCE = 30 PRISONER_INFO_DIRECTION_CHANCE = 40 ; chance that interrogated soldiers get you ransom money -PRISONER_RANSOM_CHANCE = 10 +PRISONER_RANSOM_CHANCE = 25 ;****************************************************************************************************************************** ;****************************************************************************************************************************** diff --git a/Data-1.13/Scripts/StrategicTownLoyalty.lua b/Data-1.13/Scripts/StrategicTownLoyalty.lua index 49fc483b5..dbb03459c 100644 --- a/Data-1.13/Scripts/StrategicTownLoyalty.lua +++ b/Data-1.13/Scripts/StrategicTownLoyalty.lua @@ -164,6 +164,7 @@ EventGlobal = GLOBAL_LOYALTY_LOSE_SAM = 11, GLOBAL_LOYALTY_QUEEN_BATTLE_WON = 12, GLOBAL_LOYALTY_GRIZZLY_DEAD = 13, + GLOBAL_LOYALTY_PRISONERS_TORTURED = 14, } @@ -288,6 +289,11 @@ function HandleGlobalLoyaltyEvent( ubEventType, sSectorX, sSectorY, bSectorZ ) AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ ) end + elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_PRISONERS_TORTURED then + + iLoyaltyChange = -60 + AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ ) + end end diff --git a/Data-1.13/TableData/CivGroupNames.xml b/Data-1.13/TableData/CivGroupNames.xml index 549aa0b33..6fb00dad1 100644 --- a/Data-1.13/TableData/CivGroupNames.xml +++ b/Data-1.13/TableData/CivGroupNames.xml @@ -149,9 +149,10 @@ 0 + 21 - 0 - Empty Slot21 + 1 + Prisoner 0 0 diff --git a/Data-1.13/TableData/Map/SectorNames.xml b/Data-1.13/TableData/Map/SectorNames.xml index d3c7773ea..c7233dd36 100644 --- a/Data-1.13/TableData/Map/SectorNames.xml +++ b/Data-1.13/TableData/Map/SectorNames.xml @@ -163,6 +163,7 @@ Chitzena Mine 1 250 + 3 B3 @@ -479,6 +480,9 @@ San Mona 1 100 + 8 + 9 + 10 D6 @@ -950,6 +954,10 @@ Cambria 1 100 + 41 + 42 + 44 + 45 G10 @@ -1281,6 +1289,20 @@ 1 100 2 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 I14 @@ -1389,6 +1411,22 @@ Desert 0 1000 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 J10 @@ -1957,6 +1995,7 @@ Coastal, road 1 140 + 3 N8 diff --git a/Data-UB/Ja2_Options.ini b/Data-UB/Ja2_Options.ini index 2174e4f3e..fcc0b2d82 100644 --- a/Data-UB/Ja2_Options.ini +++ b/Data-UB/Ja2_Options.ini @@ -2389,6 +2389,54 @@ ENABLE_ALL_TERRORISTS = TRUE ENABLE_ALL_WEAPON_CACHES = FALSE +;****************************************************************************************************************************** +; Override each map's percent likelihood of an item appearing. +; Valid range = 0-100, where 0 uses the map values. +; (Mainly for modders, can possibly take the fun out of the game) +;****************************************************************************************************************************** + +MAP_ITEM_CHANCE_OVERRIDE = 0 + +;****************************************************************************************************************************** +; Prisoner system +;****************************************************************************************************************************** + +; can you capture enemy soldiers? +ALLOW_TAKE_PRISONERS = TRUE + +; can you offer enemies a surrender option? +ENEMY_CAN_SURRENDER = TRUE + +; display surrender values on asking for surrender. Helpful if you wonder why the enemy does no surrender at overhelming odds. +DISPLAY_SURRENDER_VALUES = TRUE + +; the higher this value, the more superiority you need over the enemy for them to surrender. Range: 2.0 - 10.0 +SURRENDER_MULTIPLIER = 5.0 + +; can you offer your own surrender to the enemy? This will not work while certain quests are active, or if the enemy already asked +; you to surrender, and you refused +PLAYER_CAN_ASK_TO_SURRENDER = TRUE + +; chance that released soldiers join the army again +PRISONER_RETURN_TO_ARMY_CHANCE = 50 + +; chance that interrogated soldiers decide to join your cause (they will be turned into militia) +PRISONER_DEFECT_CHANCE = 25 + +; chance that interrogated soldiers can give info on enemy positions +PRISONER_INFO_BASECHANCE = 25 + +; chance that interrogated soldiers detect a specific patrol (a soldier can detect only one max) +PRISONER_INFO_DETECT_CHANCE = 5 + +; chance that interrogated soldiers can give info on enemy numbers +PRISONER_INFO_NUMBER_CHANCE = 30 + +; chance that interrogated soldiers can give info on enemy movement directions +PRISONER_INFO_DIRECTION_CHANCE = 40 + +; chance that interrogated soldiers get you ransom money +PRISONER_RANSOM_CHANCE = 25 ;****************************************************************************************************************************** ;****************************************************************************************************************************** diff --git a/Data-UB/Scripts/StrategicTownLoyalty.lua b/Data-UB/Scripts/StrategicTownLoyalty.lua index a5ec5e4c9..73e1cd3b7 100644 --- a/Data-UB/Scripts/StrategicTownLoyalty.lua +++ b/Data-UB/Scripts/StrategicTownLoyalty.lua @@ -155,6 +155,8 @@ EventGlobal = { GLOBAL_LOYALTY_GAIN_SAM = 10, GLOBAL_LOYALTY_LOSE_SAM = 11, GLOBAL_LOYALTY_QUEEN_BATTLE_WON = 12, + GLOBAL_LOYALTY_GRIZZLY_DEAD = 13, + GLOBAL_LOYALTY_PRISONERS_TORTURED = 14, } @@ -272,6 +274,18 @@ local iLoyaltyChange = 0 iLoyaltyChange = -250 AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ ) + elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_GRIZZLY_DEAD then + + if ( CheckMercIsDead(3) == false ) then + iLoyaltyChange = 1000 + AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ ) + end + + elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_PRISONERS_TORTURED then + + iLoyaltyChange = -60 + AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ ) + end end diff --git a/Data-UB/TableData/CivGroupNames.xml b/Data-UB/TableData/CivGroupNames.xml index 3fbf2cf11..d30db3505 100644 --- a/Data-UB/TableData/CivGroupNames.xml +++ b/Data-UB/TableData/CivGroupNames.xml @@ -141,19 +141,21 @@ 1 - 20 - 0 - Empty Slot20 - 0 - 0 - - - 21 - 0 - Empty Slot21 - 0 - 0 - + + 20 + 0 + Militia + 0 + 0 + + + + 21 + 1 + Prisoner + 0 + 0 + 22 0 diff --git a/Data/NPCData/civ52.edt b/Data/NPCData/civ52.edt index 65521df062641188066cd9ee52ac43936f7b50ec..64e270660e6d9dae68a768aafe4fa3d82d669181 100644 GIT binary patch literal 10281 zcmeI1%T9w(5QgVbh^ua@uVCV;-MKI^E}`^7D`2>&JiY%v!?Bk{OA~es#By#qmFbs% zE@vr`d`TwnxFcy~-M2a^rNu~rXCphTC}b-S;+I=sObfjAoNbk}2=ukGl7n9;b7@QR{(;i8iW3-eF?hHJxrII_0yr>eANaHd_D@XfV?!oN` z*7)TXxWxjdf3x1})*#K;t3h80BI%QN7~?aR1nbtSh)18D^s_A(EznL~C2#owCcbtF zvUVWrQz<%+_Q+g``5N=)kJ+=x&^__Q!5QiGUzI-d!66F?xksw>8G|h-eAMsUpk;p} z{R_U$ge|c6)jmdj6=J=vkKzJle?2E`G=KHcEI|Kj*+(RM9|lW>|S) zHc}zBBcruPc%#{W>KiSQ^IGk%0$U`Jl!YjddG6+<$2H7Am@P9Wv6@UIPau~*oE|%5 z(Z^b1$Y89J=mbxlxzqQ521(RB)?3bV5fZinjcX-~^=GPL1?FOmWJ+4dP#TQKs*awQ zoLbl0*DOHhQqV-r%Qeg0gRDe(q{^A51wAynJo~t2Ri7VffpGqDfW9%>d(fL&I8!FA zy2m;*l`w|)jnw;69qDl`JGP9uLO;hYtmV)%7npTD9QsR4bDiZMq4L7|G3g;m9aNFg zUaDG1`p6>rtKpYh5ay>H(`07Mw_d2~9epr)q;k<8^F)o+Y4Yf2zhhe6_X-x^iLUWQ zze>(X9Mvrbh4i`^sxLcu(pq&e)TV>KrU&NvNz+%S!@mA>3kpQ3!Mu+&TOHBxPAc7rOF!s literal 4800 zcmeI#yA6Oa6hl#u!U}{x15u+$Fh8wRS}D1ybDN{rxa!rdN0$Z_@lt_mep4FrU+y>K z5evBA64wOox55z%xZf7n1n#%P5evBA5!VFncft`1xL?s2_kRysKNd)O53L^yq|c89 O(&xtl>GNZOq<$YGyeB09